-
Notifications
You must be signed in to change notification settings - Fork 0
/
arc_tools_project_construct.js
86 lines (77 loc) · 2.03 KB
/
arc_tools_project_construct.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
"use strict";
var TOOLSLIB = require('./arc_tools_lib');
var FILTERLIB = TOOLSLIB.arccore.filter;
var filterlibResponse = FILTERLIB.create({
operationID: "okYViiI-TFampiKJ28nQ4Q",
operationName: "ARC Project Constructor",
operationDescription: "Constructs a new ARC Project JSON document.",
inputFilterSpec: {
____label: "ARC Project Descriptor",
____description: "Configuration data for Encapsule arc_* command line tools suite.",
____types: "jsObject",
____defaultValue: {},
name: {
____accept: ["jsUndefined", "jsString"]
},
description: {
____accept: ["jsUndefined", "jsString"]
},
agent: {
____types: "jsObject",
____defaultValue: {},
name: {
____accept: "jsString",
____defaultValue: TOOLSLIB.meta.name
},
version: {
____accept: "jsString",
____defaultValue: TOOLSLIB.meta.version
}
},
options: {
____types: "jsObject",
____defaultValue: {}
},
directories: {
____types: "jsArray",
____defaultValue: [],
element: {
____accept: "jsString"
}
},
projectState: {
____accept: "jsObject",
____defaultValue: {}
}
},
bodyFunction: function bodyFunction(request_) {
var response = {
error: null,
result: null
};
var errors = [];
var inBreakScope = false;
while (!inBreakScope) {
inBreakScope = true;
var innerResponse = TOOLSLIB.arccore.graph.directed.create({
name: TOOLSLIB.arccore.identifier.irut.fromEther(),
description: "arctools project state cache"
});
if (innerResponse.error) {
errors.unshift(innerResponse.error);
break;
}
response.result = request_;
response.result.projectState = innerResponse.result;
break;
}
if (errors.length) {
response.error = errors.join(" ");
}
return response;
}
});
if (filterlibResponse.error) {
throw new Error(filterlibResponse.error);
}
module.exports = filterlibResponse.result;