@lcap/nasl 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/automate/engine/utils.js +16 -0
- package/out/automate/engine/utils.js.map +1 -1
- package/out/common/BaseNode.d.ts +1 -1
- package/out/common/BaseNode.js +13 -3
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.d.ts +1 -0
- package/out/concepts/App__.js +4 -1
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +11 -0
- package/out/concepts/Assignee__.js +34 -0
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/CallFunction__.js +1 -2
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +31 -2
- package/out/concepts/CallQueryComponent__.js +286 -51
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Constant__.js +6 -6
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/Destination__.js +18 -4
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/EntityIndex__.js +4 -2
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +3 -5
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +1 -0
- package/out/concepts/Entity__.js +7 -1
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +1 -0
- package/out/concepts/Enum__.js +6 -2
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Identifier__.js +1 -1
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +9 -4
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Param__.d.ts +1 -1
- package/out/concepts/Param__.js +14 -7
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +8 -2
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +1 -1
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +1 -0
- package/out/concepts/QueryFieldExpression__.js +3 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +3 -0
- package/out/concepts/QueryGroupByExpression__.js +20 -0
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/Return__.d.ts +1 -1
- package/out/concepts/Return__.js +15 -10
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/StringLiteral__.js +1 -8
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js +5 -5
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.js +12 -4
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +1 -1
- package/out/concepts/Variable__.js +15 -10
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.js +1 -1
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +1 -1
- package/out/concepts/View__.js +15 -4
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.configuration.js +1 -1
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +2 -0
- package/out/concepts/basics/stdlib/nasl.interface.js +4 -4
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +21 -37
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +1 -1
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -1
- package/out/concepts/basics/types/index.d.ts +1 -0
- package/out/concepts/basics/types/index.js +3 -1
- package/out/concepts/basics/types/index.js.map +1 -1
- package/out/enums/KEYWORDS.js +0 -7
- package/out/enums/KEYWORDS.js.map +1 -1
- package/out/manager/diagnostic.d.ts +1 -1
- package/out/{test/integration/connect-file copy.d.ts → server/extendBaseNode.d.ts} +0 -0
- package/out/server/extendBaseNode.js +323 -0
- package/out/server/extendBaseNode.js.map +1 -0
- package/out/server/getLogics.js +22 -1
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +47 -2
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.d.ts +4 -2
- package/out/server/getProcesses.js +160 -20
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/getScope.d.ts +1 -0
- package/out/server/getScope.js +4 -0
- package/out/server/getScope.js.map +1 -1
- package/out/server/index.d.ts +1 -0
- package/out/server/index.js +1 -0
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +7 -5
- package/out/server/naslServer.js +96 -362
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.d.ts +1 -1
- package/out/server/translator.js +3 -1
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.js +18 -10
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genGetBlock.js +1 -1
- package/out/templator/genGetBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +7 -4
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genSelectBlock.js +5 -15
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +1 -1
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.d.ts +3 -1
- package/out/templator/utils.js +2 -1
- package/out/templator/utils.js.map +1 -1
- package/package.json +1 -2
- package/src/automate/engine/utils.js +16 -2
- package/src/common/BaseNode.ts +14 -3
- package/src/concepts/App__.ts +6 -39
- package/src/concepts/Assignee__.ts +30 -0
- package/src/concepts/CallFunction__.ts +1 -2
- package/src/concepts/CallQueryComponent__.ts +294 -54
- package/src/concepts/Constant__.ts +6 -6
- package/src/concepts/Destination__.ts +18 -20
- package/src/concepts/EntityIndex__.ts +4 -2
- package/src/concepts/EntityProperty__.ts +3 -5
- package/src/concepts/Entity__.ts +15 -3
- package/src/concepts/Enum__.ts +7 -15
- package/src/concepts/Identifier__.ts +1 -10
- package/src/concepts/InterfaceParam__.ts +9 -4
- package/src/concepts/Param__.ts +14 -7
- package/src/concepts/ProcessElement__.ts +9 -3
- package/src/concepts/QueryAggregateExpression__.ts +1 -1
- package/src/concepts/QueryFieldExpression__.ts +4 -0
- package/src/concepts/QueryGroupByExpression__.ts +23 -0
- package/src/concepts/Return__.ts +15 -10
- package/src/concepts/StringLiteral__.ts +1 -8
- package/src/concepts/StructureProperty__.ts +5 -5
- package/src/concepts/TypeAnnotation__.ts +12 -4
- package/src/concepts/Variable__.ts +15 -10
- package/src/concepts/ViewElement__.ts +2 -2
- package/src/concepts/View__.ts +16 -4
- package/src/concepts/basics/stdlib/nasl.configuration.ts +1 -1
- package/src/concepts/basics/stdlib/nasl.interface.ts +1 -1
- package/src/concepts/basics/stdlib/nasl.util.ts +21 -37
- package/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts +1 -1
- package/src/concepts/basics/types/index.ts +1 -0
- package/src/enums/KEYWORDS.ts +0 -7
- package/src/manager/diagnostic.ts +1 -1
- package/src/server/extendBaseNode.ts +318 -0
- package/src/server/getLogics.ts +22 -1
- package/src/server/getMemberIdentifier.ts +49 -2
- package/src/server/getProcesses.ts +170 -21
- package/src/server/getScope.ts +5 -0
- package/src/server/index.ts +1 -0
- package/src/server/naslServer.ts +100 -355
- package/src/server/translator.ts +3 -1
- package/src/service/storage/init.ts +18 -11
- package/src/templator/genGetBlock.ts +1 -1
- package/src/templator/genQueryComponent.ts +7 -4
- package/src/templator/genSelectBlock.ts +5 -15
- package/src/templator/genUpdateBlock.ts +1 -1
- package/src/templator/utils.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.browser copy.d.ts +0 -3
- package/out/concepts/basics/stdlib/nasl.browser copy.js +0 -70
- package/out/concepts/basics/stdlib/nasl.browser copy.js.map +0 -1
- package/out/terms/LEVEL_NAME_MAP.d.ts +0 -26
- package/out/terms/LEVEL_NAME_MAP.js +0 -30
- package/out/terms/LEVEL_NAME_MAP.js.map +0 -1
- package/out/test/integration/connect-file copy.js +0 -50
- package/out/test/integration/connect-file copy.js.map +0 -1
- package/out/test/integration/node-nasl-server.d.ts +0 -1
- package/out/test/integration/node-nasl-server.js +0 -41
- package/out/test/integration/node-nasl-server.js.map +0 -1
|
@@ -83,7 +83,7 @@ async function doAction(app: any, actionItem: any) {
|
|
|
83
83
|
}
|
|
84
84
|
view?.children?.forEach((item) => loopEle(item, checkAuth));
|
|
85
85
|
if (view instanceof ViewElement) {
|
|
86
|
-
if (view.tag === 'u-uploader') {
|
|
86
|
+
if (view.tag === 'u-uploader' || view.tag === 'van-uploader') {
|
|
87
87
|
const bute = view?.bindAttrs.find((item) => item.name === 'url');
|
|
88
88
|
if (checkAuth) {
|
|
89
89
|
if (bute?.value.endsWith('/import') && !view.view.parentAuth) {
|
|
@@ -273,7 +273,10 @@ function handleApp(app: any) {
|
|
|
273
273
|
if (app._timer) {
|
|
274
274
|
clearTimeout(app._timer);
|
|
275
275
|
}
|
|
276
|
-
if (!
|
|
276
|
+
if (!app._noTimer) {
|
|
277
|
+
app._noTimer = event.noTimer;
|
|
278
|
+
}
|
|
279
|
+
if (!app._noTimer) {
|
|
277
280
|
app._timer = setTimeout(() => {
|
|
278
281
|
console.error('收集超时,请及时排查原因');
|
|
279
282
|
app.emit('refresh');
|
|
@@ -295,20 +298,24 @@ function handleApp(app: any) {
|
|
|
295
298
|
if (app._timer) {
|
|
296
299
|
clearTimeout(app._timer);
|
|
297
300
|
}
|
|
298
|
-
|
|
301
|
+
// 结束收集时,立即将全局收集变量状态重置,防止下次收集数据混乱
|
|
302
|
+
const collectingList = app._collectingList;
|
|
303
|
+
const actionMsg = app._actionMsg;
|
|
304
|
+
const action = app._action;
|
|
305
|
+
app._collectingList = [];
|
|
306
|
+
app._actionMsg = '';
|
|
307
|
+
app._action = '';
|
|
308
|
+
app._noTimer = undefined;
|
|
309
|
+
if (Array.isArray(collectingList) && collectingList.length) {
|
|
299
310
|
embeddedTSEmitter.emit('change', {
|
|
300
|
-
value:
|
|
311
|
+
value: collectingList,
|
|
301
312
|
});
|
|
302
313
|
await doAction(app, {
|
|
303
|
-
list:
|
|
304
|
-
actionMsg
|
|
305
|
-
action
|
|
314
|
+
list: collectingList,
|
|
315
|
+
actionMsg,
|
|
316
|
+
action,
|
|
306
317
|
});
|
|
307
318
|
}
|
|
308
|
-
|
|
309
|
-
app._collectingList = [];
|
|
310
|
-
app._actionMsg = '';
|
|
311
|
-
app._action = '';
|
|
312
319
|
} else if (app._isCollectingCount < 0) {
|
|
313
320
|
app._isCollectingCount = 0;
|
|
314
321
|
throw Error('关闭收集有问题,请排查');
|
|
@@ -24,7 +24,7 @@ export function genGetTemplate(entity: Entity, nameGroup: NameGroup) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function genLoadLogic(getLogic: Logic, nameGroup: NameGroup) {
|
|
27
|
-
const params = [genLogicParam(`${getLogic.params[0].name}`,
|
|
27
|
+
const params = [genLogicParam(`${getLogic.params[0].name}`, nameGroup.viewParamId)];
|
|
28
28
|
|
|
29
29
|
return NaslNode.Logic({
|
|
30
30
|
name: nameGroup.viewLogicLoad,
|
|
@@ -106,10 +106,13 @@ export function genQueryAssignment(allEntities: Array<Entity>, nameGroup: NameGr
|
|
|
106
106
|
}),
|
|
107
107
|
right: NaslQueryExpression.CallQueryComponent({
|
|
108
108
|
label: '数据查询',
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
ideVersion: '2.11', // 2.11版本新创建的数据查询组件,返回类型将自动推断
|
|
110
|
+
typeAnnotation: NaslCollectionTypeAnnotation.PageOf([
|
|
111
|
+
NaslTypeAnnotation.Reference({
|
|
112
|
+
typeNamespace: `${parentNamespace}.structures`,
|
|
113
|
+
typeName: nameGroup.structure,
|
|
114
|
+
}),
|
|
115
|
+
]),
|
|
113
116
|
select: NaslQueryExpression.QuerySelectExpression({
|
|
114
117
|
label: '查询组件Select子句',
|
|
115
118
|
distinct: false,
|
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
*/
|
|
16
16
|
export function genSelectTemplate(property: EntityProperty, nameGroup: NameGroup) {
|
|
17
17
|
return `<u-select clearable placeholder="请选择" ref="${nameGroup.viewElementMainView}" :data-source="${nameGroup.viewLogicLoad}" data-schema="${nameGroup.structure}"
|
|
18
|
-
text-field="${nameGroup.
|
|
19
|
-
value-field="${nameGroup.
|
|
18
|
+
text-field="${nameGroup.lowerEntity}.${property.name}"
|
|
19
|
+
value-field="${nameGroup.lowerEntity}.id" :pageable="true" :remote-paging="true">
|
|
20
20
|
</u-select>`;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -29,8 +29,8 @@ export function genSelectTemplate(property: EntityProperty, nameGroup: NameGroup
|
|
|
29
29
|
export function genH5SelectTemplate(property: EntityProperty, nameGroup: NameGroup) {
|
|
30
30
|
const label = property.label || property.name;
|
|
31
31
|
return `<van-cascader title="请选择" placeholder="请选择" ref="${nameGroup.viewElementMainView}" :data-source="${nameGroup.viewLogicLoad}" data-schema="${nameGroup.structure}"
|
|
32
|
-
text-field="${nameGroup.
|
|
33
|
-
value-field="${nameGroup.
|
|
32
|
+
text-field="${nameGroup.lowerEntity}.${property.name}"
|
|
33
|
+
value-field="${nameGroup.lowerEntity}.id" :pageable="true" :remote-paging="true" labelField="${label}">
|
|
34
34
|
</van-cascader>`;
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -90,7 +90,7 @@ export function genSelectBlock(entity: Entity, view: View) {
|
|
|
90
90
|
const viewElementMainView = view.getViewElementUniqueName('select');
|
|
91
91
|
const nameGroup = genUniqueQueryNameGroup(parentNode, view, viewElementMainView, false);
|
|
92
92
|
nameGroup.viewElementMainView = viewElementMainView;
|
|
93
|
-
nameGroup.
|
|
93
|
+
nameGroup.lowerEntity = utils.firstLowerCase(entity.name);
|
|
94
94
|
|
|
95
95
|
const displayedProperty = getFirstDisplayedProperty(entity);
|
|
96
96
|
|
|
@@ -115,16 +115,6 @@ export function genSelectBlock(entity: Entity, view: View) {
|
|
|
115
115
|
"viewLogics": [
|
|
116
116
|
${JSON.stringify(genLoadSelectLogic(entity, nameGroup, newLogic))}
|
|
117
117
|
],
|
|
118
|
-
"viewVariables": [
|
|
119
|
-
{
|
|
120
|
-
"concept": "Variable",
|
|
121
|
-
"name": "${nameGroup.viewVariableEntity}",
|
|
122
|
-
"typeAnnotation": ${JSON.stringify(NaslTypeAnnotation.Reference({
|
|
123
|
-
typeNamespace: entity.getNamespace(),
|
|
124
|
-
typeName: entity.name,
|
|
125
|
-
}))}
|
|
126
|
-
}
|
|
127
|
-
],
|
|
128
118
|
"logics": ${JSON.stringify(newLogics)},
|
|
129
119
|
"structures": ${JSON.stringify(newStructures)}
|
|
130
120
|
}
|
|
@@ -226,7 +226,7 @@ function genSubmitLogic(updateLogic: Logic, nameGroup: NameGroup) {
|
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
function genLoadLogic(getLogic: Logic, nameGroup: NameGroup) {
|
|
229
|
-
const params = [genLogicParam(`${getLogic.params[0].name}`,
|
|
229
|
+
const params = [genLogicParam(`${getLogic.params[0].name}`, nameGroup.viewParamId)];
|
|
230
230
|
return NaslNode.Logic({
|
|
231
231
|
name: nameGroup.viewLogicLoad,
|
|
232
232
|
description: '',
|
package/src/templator/utils.ts
CHANGED
|
@@ -440,6 +440,7 @@ export const NaslQueryExpression = {
|
|
|
440
440
|
orderBy,
|
|
441
441
|
logicName,
|
|
442
442
|
structureName,
|
|
443
|
+
ideVersion,
|
|
443
444
|
}: {
|
|
444
445
|
label?: string;
|
|
445
446
|
typeAnnotation: any;
|
|
@@ -452,6 +453,7 @@ export const NaslQueryExpression = {
|
|
|
452
453
|
orderBy: any[];
|
|
453
454
|
logicName: string;
|
|
454
455
|
structureName: string;
|
|
456
|
+
ideVersion: string
|
|
455
457
|
}) => ({
|
|
456
458
|
concept: 'CallQueryComponent',
|
|
457
459
|
name: '',
|
|
@@ -467,6 +469,7 @@ export const NaslQueryExpression = {
|
|
|
467
469
|
orderBy,
|
|
468
470
|
logicName,
|
|
469
471
|
structureName,
|
|
472
|
+
ideVersion,
|
|
470
473
|
}),
|
|
471
474
|
};
|
|
472
475
|
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const Namespace__1 = __importDefault(require("../../Namespace__"));
|
|
7
|
-
const Param__1 = __importDefault(require("../../Param__"));
|
|
8
|
-
const Logic__1 = __importDefault(require("../../Logic__"));
|
|
9
|
-
const TypeAnnotation__1 = __importDefault(require("../../TypeAnnotation__"));
|
|
10
|
-
exports.default = new Namespace__1.default({
|
|
11
|
-
name: 'browser',
|
|
12
|
-
logics: [
|
|
13
|
-
new Logic__1.default({
|
|
14
|
-
name: 'requestFullscreen',
|
|
15
|
-
params: [],
|
|
16
|
-
}),
|
|
17
|
-
new Logic__1.default({
|
|
18
|
-
name: 'exitFullscreen',
|
|
19
|
-
}),
|
|
20
|
-
new Logic__1.default({
|
|
21
|
-
name: 'hasAuth',
|
|
22
|
-
params: [
|
|
23
|
-
new Param__1.default({
|
|
24
|
-
name: 'authPath',
|
|
25
|
-
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
26
|
-
}),
|
|
27
|
-
],
|
|
28
|
-
returns: [],
|
|
29
|
-
}),
|
|
30
|
-
new Logic__1.default({
|
|
31
|
-
name: 'getDistance',
|
|
32
|
-
params: [
|
|
33
|
-
new Param__1.default({
|
|
34
|
-
name: 'Point1',
|
|
35
|
-
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
36
|
-
}),
|
|
37
|
-
new Param__1.default({
|
|
38
|
-
name: 'Point2',
|
|
39
|
-
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
40
|
-
}),
|
|
41
|
-
],
|
|
42
|
-
returns: [],
|
|
43
|
-
}),
|
|
44
|
-
new Logic__1.default({
|
|
45
|
-
name: 'logOut',
|
|
46
|
-
params: [
|
|
47
|
-
new Param__1.default({
|
|
48
|
-
name: 'Point1',
|
|
49
|
-
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
50
|
-
}),
|
|
51
|
-
new Param__1.default({
|
|
52
|
-
name: 'Point2',
|
|
53
|
-
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
54
|
-
}),
|
|
55
|
-
],
|
|
56
|
-
returns: [],
|
|
57
|
-
}),
|
|
58
|
-
new Logic__1.default({
|
|
59
|
-
name: 'getConfiguration',
|
|
60
|
-
params: [
|
|
61
|
-
new Param__1.default({
|
|
62
|
-
name: 'name',
|
|
63
|
-
typeAnnotation: TypeAnnotation__1.default.createPrimitive('String'),
|
|
64
|
-
}),
|
|
65
|
-
],
|
|
66
|
-
returns: [],
|
|
67
|
-
}),
|
|
68
|
-
],
|
|
69
|
-
});
|
|
70
|
-
//# sourceMappingURL=nasl.browser%20copy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nasl.browser copy.js","sourceRoot":"","sources":["../../../../src/concepts/basics/stdlib/nasl.browser copy.ts"],"names":[],"mappings":";;;;;AAAA,mEAA0C;AAC1C,2DAAkC;AAElC,2DAAkC;AAClC,6EAAoD;AAEpD,kBAAe,IAAI,oBAAS,CAAC;IACzB,IAAI,EAAE,SAAS;IACf,MAAM,EAAE;QACJ,IAAI,gBAAK,CAAC;YACN,IAAI,EAAE,mBAAmB;YACzB,MAAM,EAAE,EACP;SACJ,CAAC;QACF,IAAI,gBAAK,CAAC;YACN,IAAI,EAAE,gBAAgB;SACzB,CAAC;QACF,IAAI,gBAAK,CAAC;YACN,IAAI,EAAE,SAAS;YACf,M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page: string;
|
|
5
|
-
view: string;
|
|
6
|
-
block: string;
|
|
7
|
-
logic: string;
|
|
8
|
-
param: string;
|
|
9
|
-
timer: string;
|
|
10
|
-
variable: string;
|
|
11
|
-
return: string;
|
|
12
|
-
interface: string;
|
|
13
|
-
dataNode: string;
|
|
14
|
-
entity: string;
|
|
15
|
-
structure: string;
|
|
16
|
-
enum: string;
|
|
17
|
-
enumItem: string;
|
|
18
|
-
property: string;
|
|
19
|
-
element: string;
|
|
20
|
-
attr: string;
|
|
21
|
-
event: string;
|
|
22
|
-
directive: string;
|
|
23
|
-
logicItem: string;
|
|
24
|
-
logicNode: string;
|
|
25
|
-
expressionNode: string;
|
|
26
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LEVEL_NAME_MAP = void 0;
|
|
4
|
-
exports.LEVEL_NAME_MAP = {
|
|
5
|
-
app: '应用',
|
|
6
|
-
service: '服务',
|
|
7
|
-
page: '页面',
|
|
8
|
-
view: '子页面',
|
|
9
|
-
block: '区块',
|
|
10
|
-
logic: '逻辑',
|
|
11
|
-
param: '输入参数',
|
|
12
|
-
timer: '定时任务',
|
|
13
|
-
variable: '局部变量',
|
|
14
|
-
return: '输出参数',
|
|
15
|
-
interface: '接口',
|
|
16
|
-
dataNode: '数据',
|
|
17
|
-
entity: '实体',
|
|
18
|
-
structure: '数据结构',
|
|
19
|
-
enum: '枚举',
|
|
20
|
-
enumItem: '枚举项',
|
|
21
|
-
property: '属性',
|
|
22
|
-
element: '元素',
|
|
23
|
-
attr: '属性',
|
|
24
|
-
event: '事件',
|
|
25
|
-
directive: '指令',
|
|
26
|
-
logicItem: '逻辑项',
|
|
27
|
-
logicNode: '逻辑节点',
|
|
28
|
-
expressionNode: '表达式节点',
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=LEVEL_NAME_MAP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LEVEL_NAME_MAP.js","sourceRoot":"","sources":["../../src/terms/LEVEL_NAME_MAP.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC1B,GAAG,EAAE,IAAI;IACT,OAAO,EAAE,IAAI;IAEb,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,IAAI;IAEX,KAAK,EAAE,IAAI;IACX,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,IAAI;IAEf,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,IAAI;IAEd,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;IAEf,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,OAAO;CAC1B,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
const chai_1 = require("chai");
|
|
27
|
-
const path = __importStar(require("path"));
|
|
28
|
-
const nasl = __importStar(require("../.."));
|
|
29
|
-
describe('connect-file', () => {
|
|
30
|
-
it('loadApp', async () => {
|
|
31
|
-
await nasl.connect('file', path.join(__dirname, '../examples/app1.json'));
|
|
32
|
-
const app = await nasl.loadApp();
|
|
33
|
-
console.log(app);
|
|
34
|
-
(0, chai_1.expect)(app.id).to.equal('app1');
|
|
35
|
-
});
|
|
36
|
-
it('batchAction', async () => {
|
|
37
|
-
await nasl.connect('file', path.join(__dirname, '../examples/app1.json'));
|
|
38
|
-
const app = await nasl.loadApp();
|
|
39
|
-
if (app.entities.length > 0) {
|
|
40
|
-
const oldLength = app.entities.length;
|
|
41
|
-
await app.entities[0].delete();
|
|
42
|
-
(0, chai_1.expect)(app.entities.length).to.equal(oldLength - 1);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
await app.addEntity();
|
|
46
|
-
(0, chai_1.expect)(app.entities.length).to.equal(1);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=connect-file%20copy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect-file copy.js","sourceRoot":"","sources":["../../../src/test/integration/connect-file copy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+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|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const path = __importStar(require("path"));
|
|
30
|
-
const nasl = __importStar(require("../.."));
|
|
31
|
-
const naslServer_1 = __importDefault(require("../../server/naslServer"));
|
|
32
|
-
describe('node-nasl-server', () => {
|
|
33
|
-
it('loadNASLServer', async () => {
|
|
34
|
-
await nasl.connect('file', path.join(__dirname, '../examples/app1.json'));
|
|
35
|
-
const app = await nasl.loadApp();
|
|
36
|
-
// console.log(app);
|
|
37
|
-
// expect(app.id).to.equal('app1');
|
|
38
|
-
await naslServer_1.default.openApp(app);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
//# sourceMappingURL=node-nasl-server.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-nasl-server.js","sourceRoot":"","sources":["../../../src/test/integration/node-nasl-server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA6B;AAC7B,4CAA8B;AAC9B,yEAAqD;AAErD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAC9B,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,EAAE;QAC5B,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC;QAC1E,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;QACjC,oBAAoB;QACpB,mCAAmC;QACnC,MAAM,oBAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|