@lcap/nasl 1.0.2 → 2.12.0-beta
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/index.js +11 -0
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/uniqueName.js +1 -1
- package/out/automate/engine/uniqueName.js.map +1 -1
- package/out/automate/engine/utils.d.ts +1 -0
- package/out/automate/engine/utils.js +89 -67
- package/out/automate/engine/utils.js.map +1 -1
- package/out/concepts/App__.d.ts +51 -49
- package/out/concepts/App__.js +86 -54
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.js +1 -1
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.js +1 -1
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/Assignment__.js +1 -1
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js +1 -1
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/BinaryExpression__.js +1 -1
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +3 -3
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +1 -1
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +11 -6
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.js +1 -1
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallFunction__.js +8 -3
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.js +1 -1
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +23 -21
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +9 -8
- package/out/concepts/CallQueryComponent__.js +89 -79
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +2 -2
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +1 -1
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.d.ts +1 -0
- package/out/concepts/ConfigGroup__.js +8 -1
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.js +1 -1
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +1 -0
- package/out/concepts/ConfigProperty__.js +4 -1
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.d.ts +1 -0
- package/out/concepts/Configuration__.js +4 -1
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Constant__.js +1 -1
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataElement__.js +1 -1
- package/out/concepts/DataElement__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +143 -0
- package/out/concepts/DataSource__.js +316 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/Destination__.js +8 -8
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.js +3 -3
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +5 -0
- package/out/concepts/EntityIndex__.js +7 -1
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +9 -0
- package/out/concepts/EntityProperty__.js +20 -3
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +5 -0
- package/out/concepts/Entity__.js +21 -11
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.js +1 -1
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.js +11 -5
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +1 -1
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +3 -3
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.d.ts +18 -0
- package/out/concepts/Function__.js +96 -1
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +3 -13
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +9 -9
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +1 -1
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.js +19 -12
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +1 -1
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/LogicItem__.js +1 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +41 -42
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +1 -1
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.d.ts +1 -85
- package/out/concepts/Module__.js +6 -107
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.d.ts +0 -86
- package/out/concepts/Namespace__.js +1 -108
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NullLiteral__.js +1 -1
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.js +1 -1
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/Param__.d.ts +2 -1
- package/out/concepts/Param__.js +1 -1
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js +1 -1
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +1 -1
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +26 -11
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +1 -1
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/Process__.js +17 -10
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +1 -1
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +9 -2
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +4 -0
- package/out/concepts/QueryFromExpression__.js +14 -3
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.js +1 -1
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +4 -0
- package/out/concepts/QueryJoinExpression__.js +15 -4
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js +1 -1
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.js +1 -1
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +1 -1
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js +1 -1
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.js +1 -1
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +11 -4
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/Slot__.js +1 -1
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +10 -0
- package/out/concepts/SqlQueryComponent__.js +32 -5
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.js +1 -1
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringLiteral__.js +1 -1
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js +1 -1
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js +20 -13
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.js +6 -6
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +1 -1
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/Theme__.js +1 -1
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.js +1 -1
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +8 -0
- package/out/concepts/TypeAnnotation__.js +46 -4
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.js +1 -1
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +1 -1
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.js +1 -1
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js +1 -1
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.js +1 -1
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.js +1 -1
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewComponent__.js +1 -1
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.js +18 -18
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.js +25 -23
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +5 -5
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +278 -0
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/index__.d.ts +1 -0
- package/out/concepts/index__.js +1 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/generator/genBundleFiles.js +8 -3
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.js +13 -12
- package/out/generator/genMetaData.js.map +1 -1
- package/out/server/createUiTs.js +1 -0
- package/out/server/createUiTs.js.map +1 -1
- package/out/server/getLogics.js +9 -1
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getProcesses.d.ts +3 -0
- package/out/server/getProcesses.js +61 -1
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/naslServer.js +128 -6
- package/out/server/naslServer.js.map +1 -1
- package/out/server/process2LogicNamespace.js +10 -1
- package/out/server/process2LogicNamespace.js.map +1 -1
- package/out/server/translator.js +19 -1
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.js +2 -2
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +15 -11
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +15 -12
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +25 -21
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +12 -12
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.js +21 -20
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +6 -3
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +5 -5
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genSelectBlock.js +8 -7
- package/out/templator/genSelectBlock.js.map +1 -1
- package/out/templator/genTableBlock.js +17 -15
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +15 -11
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.d.ts +2 -2
- package/out/templator/utils.js.map +1 -1
- package/out/test/integration/connect-file.js +6 -6
- package/out/test/integration/connect-file.js.map +1 -1
- package/out/translator/index.js +1 -1
- package/out/translator/index.js.map +1 -1
- package/out/utils/index.d.ts +4 -0
- package/out/utils/index.js +32 -1
- package/out/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/automate/engine/index.js +12 -1
- package/src/automate/engine/uniqueName.js +1 -1
- package/src/automate/engine/utils.js +92 -67
- package/src/concepts/App__.ts +165 -95
- package/src/concepts/Argument__.ts +1 -1
- package/src/concepts/Assignee__.ts +1 -1
- package/src/concepts/Assignment__.ts +1 -1
- package/src/concepts/Attribute__.ts +1 -1
- package/src/concepts/BinaryExpression__.ts +1 -1
- package/src/concepts/BindAttribute__.ts +3 -3
- package/src/concepts/BindDirective__.ts +1 -1
- package/src/concepts/BindEvent__.ts +10 -6
- package/src/concepts/BooleanLiteral__.ts +1 -1
- package/src/concepts/CallFunction__.ts +19 -16
- package/src/concepts/CallInterface__.ts +1 -1
- package/src/concepts/CallLogic__.ts +23 -23
- package/src/concepts/CallQueryComponent__.ts +96 -113
- package/src/concepts/Comment__.ts +2 -2
- package/src/concepts/CompletionProperty__.ts +1 -1
- package/src/concepts/ConfigGroup__.ts +4 -2
- package/src/concepts/ConfigPropertyValue__.ts +1 -1
- package/src/concepts/ConfigProperty__.ts +5 -1
- package/src/concepts/Configuration__.ts +4 -1
- package/src/concepts/Constant__.ts +1 -1
- package/src/concepts/DataElement__.ts +1 -1
- package/src/concepts/DataSource__.ts +389 -0
- package/src/concepts/Destination__.ts +24 -8
- package/src/concepts/End__.ts +3 -3
- package/src/concepts/EntityIndex__.ts +8 -1
- package/src/concepts/EntityProperty__.ts +21 -3
- package/src/concepts/Entity__.ts +24 -12
- package/src/concepts/EnumItem__.ts +1 -1
- package/src/concepts/Enum__.ts +24 -5
- package/src/concepts/Event__.ts +1 -1
- package/src/concepts/ForEachStatement__.ts +3 -3
- package/src/concepts/Function__.ts +97 -3
- package/src/concepts/Identifier__.ts +12 -13
- package/src/concepts/IfStatement__.ts +10 -10
- package/src/concepts/InterfaceParam__.ts +1 -1
- package/src/concepts/Interface__.ts +20 -12
- package/src/concepts/JSBlock__.ts +1 -1
- package/src/concepts/LogicItem__.ts +1 -1
- package/src/concepts/Logic__.ts +41 -39
- package/src/concepts/MemberExpression__.ts +1 -1
- package/src/concepts/Module__.ts +9 -204
- package/src/concepts/Namespace__.ts +1 -204
- package/src/concepts/NullLiteral__.ts +1 -1
- package/src/concepts/NumericLiteral__.ts +1 -1
- package/src/concepts/Param__.ts +3 -2
- package/src/concepts/Point__.ts +1 -1
- package/src/concepts/ProcessComponent__.ts +1 -1
- package/src/concepts/ProcessElement__.ts +29 -13
- package/src/concepts/ProcessOutcome__.ts +1 -1
- package/src/concepts/Process__.ts +17 -11
- package/src/concepts/QueryAggregateExpression__.ts +1 -1
- package/src/concepts/QueryFieldExpression__.ts +10 -2
- package/src/concepts/QueryFromExpression__.ts +14 -3
- package/src/concepts/QueryGroupByExpression__.ts +1 -1
- package/src/concepts/QueryJoinExpression__.ts +15 -4
- package/src/concepts/QueryLimitExpression__.ts +1 -1
- package/src/concepts/QueryOrderByExpression__.ts +1 -1
- package/src/concepts/QuerySelectExpression__.ts +1 -1
- package/src/concepts/Rect__.ts +1 -1
- package/src/concepts/Return__.ts +1 -1
- package/src/concepts/Role__.ts +11 -5
- package/src/concepts/Slot__.ts +1 -1
- package/src/concepts/SqlQueryComponent__.ts +30 -11
- package/src/concepts/Start__.ts +1 -1
- package/src/concepts/StringLiteral__.ts +1 -1
- package/src/concepts/StructureProperty__.ts +1 -1
- package/src/concepts/Structure__.ts +20 -12
- package/src/concepts/SwitchCase__.ts +6 -6
- package/src/concepts/SwitchStatement__.ts +1 -1
- package/src/concepts/Theme__.ts +1 -1
- package/src/concepts/Transactional__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +45 -23
- package/src/concepts/TypeParam__.ts +1 -1
- package/src/concepts/UnaryExpression__.ts +1 -1
- package/src/concepts/Unparsed__.ts +1 -1
- package/src/concepts/UseComponent__.ts +1 -1
- package/src/concepts/ValidationRule__.ts +1 -1
- package/src/concepts/Variable__.ts +1 -1
- package/src/concepts/ViewComponent__.ts +1 -1
- package/src/concepts/ViewElement__.ts +19 -19
- package/src/concepts/View__.ts +25 -23
- package/src/concepts/WhileStatement__.ts +5 -5
- package/src/concepts/basics/stdlib/nasl.util.ts +279 -0
- package/src/concepts/index__.ts +1 -0
- package/src/generator/genBundleFiles.ts +8 -3
- package/src/generator/genMetaData.ts +13 -13
- package/src/server/createUiTs.ts +1 -0
- package/src/server/getLogics.ts +11 -3
- package/src/server/getProcesses.ts +61 -0
- package/src/server/naslServer.ts +124 -6
- package/src/server/process2LogicNamespace.ts +29 -19
- package/src/server/translator.ts +22 -1
- package/src/service/storage/init.ts +2 -2
- package/src/templator/genCreateBlock.ts +16 -13
- package/src/templator/genCurdEditMultipleKeyBlock.ts +16 -13
- package/src/templator/genCurdMultipleKeyBlock.ts +26 -22
- package/src/templator/genEditTableBlock.ts +14 -13
- package/src/templator/genGridViewBlock.ts +22 -21
- package/src/templator/genListViewBlock.ts +9 -5
- package/src/templator/genQueryComponent.ts +6 -6
- package/src/templator/genSelectBlock.ts +9 -8
- package/src/templator/genTableBlock.ts +18 -16
- package/src/templator/genUpdateBlock.ts +16 -12
- package/src/templator/utils.ts +2 -2
- package/src/test/integration/connect-file.ts +6 -6
- package/src/translator/index.ts +1 -1
- package/src/utils/index.ts +32 -0
|
@@ -84,13 +84,11 @@ export class CallQueryComponent extends LogicItem {
|
|
|
84
84
|
limit: QueryLimitExpression = undefined;
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
|
-
*
|
|
87
|
+
* 局部版本
|
|
88
88
|
*/
|
|
89
89
|
@property()
|
|
90
90
|
ideVersion: string = undefined;
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
94
92
|
/**
|
|
95
93
|
* @param source 需要合并的部分参数
|
|
96
94
|
*/
|
|
@@ -104,7 +102,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
104
102
|
return super.from(source, parentNode, parentKey) as CallQueryComponent;
|
|
105
103
|
}
|
|
106
104
|
|
|
107
|
-
|
|
108
105
|
/**
|
|
109
106
|
* 设置select
|
|
110
107
|
*/
|
|
@@ -204,7 +201,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
204
201
|
});
|
|
205
202
|
}
|
|
206
203
|
|
|
207
|
-
|
|
204
|
+
getQueryGroupByExpressionExistingNames(excludedList: Array<QueryGroupByExpression> = []) {
|
|
208
205
|
const excludedSet = new Set(excludedList);
|
|
209
206
|
return (this.groupBy || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
210
207
|
}
|
|
@@ -345,8 +342,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
345
342
|
return node;
|
|
346
343
|
}
|
|
347
344
|
|
|
348
|
-
|
|
349
|
-
|
|
350
345
|
/**
|
|
351
346
|
* 插入查询排序子句
|
|
352
347
|
* @internal
|
|
@@ -379,8 +374,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
379
374
|
return queryOrderByExpression;
|
|
380
375
|
}
|
|
381
376
|
|
|
382
|
-
|
|
383
|
-
|
|
384
377
|
/**
|
|
385
378
|
* 插入查询排序子句
|
|
386
379
|
* @param queryOrderByExpressionOptions 查询排序子句参数
|
|
@@ -403,8 +396,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
403
396
|
return node;
|
|
404
397
|
}
|
|
405
398
|
|
|
406
|
-
|
|
407
|
-
|
|
408
399
|
/**
|
|
409
400
|
* 添加查询排序子句
|
|
410
401
|
* @internal
|
|
@@ -424,8 +415,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
424
415
|
return this._insertQueryOrderByExpressionInOrderByAt(options as any, index);
|
|
425
416
|
}
|
|
426
417
|
|
|
427
|
-
|
|
428
|
-
|
|
429
418
|
/**
|
|
430
419
|
* 添加查询排序子句
|
|
431
420
|
* @param queryOrderByExpressionOptions 查询排序子句参数
|
|
@@ -449,9 +438,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
449
438
|
return node;
|
|
450
439
|
}
|
|
451
440
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
441
|
/**
|
|
456
442
|
* 删除类型标注
|
|
457
443
|
* @param name 类型标注名称
|
|
@@ -500,8 +486,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
500
486
|
return params;
|
|
501
487
|
}
|
|
502
488
|
|
|
503
|
-
|
|
504
|
-
|
|
505
489
|
/**
|
|
506
490
|
* 删除查询选择子句
|
|
507
491
|
* @param name 查询选择子句名称
|
|
@@ -527,8 +511,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
527
511
|
return select.delete();
|
|
528
512
|
}
|
|
529
513
|
|
|
530
|
-
|
|
531
|
-
|
|
532
514
|
/**
|
|
533
515
|
* 删除查询 From 子句
|
|
534
516
|
* @param name 查询 From 子句名称
|
|
@@ -554,8 +536,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
554
536
|
return from.delete();
|
|
555
537
|
}
|
|
556
538
|
|
|
557
|
-
|
|
558
|
-
|
|
559
539
|
/**
|
|
560
540
|
* 删除逻辑项
|
|
561
541
|
* @param name 逻辑项名称
|
|
@@ -581,8 +561,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
581
561
|
return where.delete();
|
|
582
562
|
}
|
|
583
563
|
|
|
584
|
-
|
|
585
|
-
|
|
586
564
|
/**
|
|
587
565
|
* 删除查询分组
|
|
588
566
|
* @param name 查询分组名称
|
|
@@ -608,8 +586,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
608
586
|
return queryGroupByExpression.delete();
|
|
609
587
|
}
|
|
610
588
|
|
|
611
|
-
|
|
612
|
-
|
|
613
589
|
/**
|
|
614
590
|
* 删除逻辑项
|
|
615
591
|
* @param name 逻辑项名称
|
|
@@ -635,8 +611,6 @@ export class CallQueryComponent extends LogicItem {
|
|
|
635
611
|
return having.delete();
|
|
636
612
|
}
|
|
637
613
|
|
|
638
|
-
|
|
639
|
-
|
|
640
614
|
/**
|
|
641
615
|
* 删除查询排序子句
|
|
642
616
|
* @param queryOrderByExpression 已有的查询排序子句实例
|
|
@@ -644,12 +618,10 @@ export class CallQueryComponent extends LogicItem {
|
|
|
644
618
|
removeQueryOrderByExpressionInOrderBy(queryOrderByExpression: QueryOrderByExpression): void;
|
|
645
619
|
|
|
646
620
|
removeQueryOrderByExpressionInOrderBy(options: QueryOrderByExpression) {
|
|
647
|
-
|
|
621
|
+
const queryOrderByExpression: QueryOrderByExpression = options;
|
|
648
622
|
return queryOrderByExpression.delete();
|
|
649
623
|
}
|
|
650
624
|
|
|
651
|
-
|
|
652
|
-
|
|
653
625
|
/**
|
|
654
626
|
* 删除查询分页子句
|
|
655
627
|
* @param name 查询分页子句名称
|
|
@@ -751,16 +723,16 @@ export class CallQueryComponent extends LogicItem {
|
|
|
751
723
|
if (list.length === 0)
|
|
752
724
|
return code;
|
|
753
725
|
|
|
754
|
-
code += indent(state
|
|
726
|
+
code += indent((state?.tabSize || 0) + 1) + `.${key}(() => `;
|
|
755
727
|
list.forEach((item, index) => {
|
|
756
728
|
if (index > 0)
|
|
757
|
-
code += `,\n${indent(state
|
|
729
|
+
code += `,\n${indent((state?.tabSize || 0) + 2)}() => `;
|
|
758
730
|
code += item?.toEmbeddedTS?.(shiftState(state, code, { tabSize: 0 }));
|
|
759
731
|
});
|
|
760
732
|
if (list.length > 1) {
|
|
761
733
|
if (multipleErrorType)
|
|
762
|
-
code += `,\n${indent(state
|
|
763
|
-
code += `\n${indent(state
|
|
734
|
+
code += `,\n${indent((state?.tabSize || 0) + 2)}() => ${multipleErrorType}`;
|
|
735
|
+
code += `\n${indent((state?.tabSize || 0) + 1)}`;
|
|
764
736
|
}
|
|
765
737
|
code += ')\n';
|
|
766
738
|
|
|
@@ -819,7 +791,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
819
791
|
}
|
|
820
792
|
// 聚合属性别名
|
|
821
793
|
this.select.selectElements.forEach((item, index, array) => {
|
|
822
|
-
code += indent(state
|
|
794
|
+
code += indent((state?.tabSize || 0) + 1);
|
|
823
795
|
const { asName, aggregateName, aggregateParam } = item;
|
|
824
796
|
if (asName)
|
|
825
797
|
code += `const __${asName} = `;
|
|
@@ -835,9 +807,9 @@ export class CallQueryComponent extends LogicItem {
|
|
|
835
807
|
});
|
|
836
808
|
|
|
837
809
|
if (this.from)
|
|
838
|
-
code += this.from.toEmbeddedTS(shiftState(state, code, { tabSize: state
|
|
810
|
+
code += this.from.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
|
|
839
811
|
else
|
|
840
|
-
code += `${indent(state
|
|
812
|
+
code += `${indent((state?.tabSize || 0) + 1)}nasl.langUtil.FROM()\n`;
|
|
841
813
|
|
|
842
814
|
// where 子句
|
|
843
815
|
code = this.toEmbeddedTSOfSubPart('WHERE', this.where ? [this.where] : [], {
|
|
@@ -878,8 +850,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
878
850
|
});
|
|
879
851
|
|
|
880
852
|
code += '\n';
|
|
881
|
-
code += indent(state
|
|
882
|
-
code += indent(state
|
|
853
|
+
code += indent((state?.tabSize || 0) + 1) + 'return;\n';
|
|
854
|
+
code += indent((state?.tabSize || 0)) + '})();\n';
|
|
883
855
|
return code;
|
|
884
856
|
}
|
|
885
857
|
|
|
@@ -888,6 +860,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
888
860
|
return [];
|
|
889
861
|
|
|
890
862
|
const entityName = node.entityName;
|
|
863
|
+
const entityNamespace = node.entityNamespace;
|
|
891
864
|
entities.push({
|
|
892
865
|
concept: 'StructureProperty',
|
|
893
866
|
name: utils.firstLowerCase(entityName),
|
|
@@ -895,7 +868,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
895
868
|
concept: 'TypeAnnotation',
|
|
896
869
|
typeKind: 'reference',
|
|
897
870
|
typeName: entityName,
|
|
898
|
-
typeNamespace:
|
|
871
|
+
typeNamespace: entityNamespace,
|
|
899
872
|
},
|
|
900
873
|
});
|
|
901
874
|
|
|
@@ -906,7 +879,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
906
879
|
return entities;
|
|
907
880
|
}
|
|
908
881
|
|
|
909
|
-
genPropertyListOfAggregate(node: CallQueryComponent) {
|
|
882
|
+
genPropertyListOfAggregate(node: CallQueryComponent, entities: Entity[]) {
|
|
910
883
|
return node.select.selectElements
|
|
911
884
|
.filter((item) => item.aggregateName && item.asName)
|
|
912
885
|
.map((item) => {
|
|
@@ -917,9 +890,9 @@ export class CallQueryComponent extends LogicItem {
|
|
|
917
890
|
typeName = 'Double';
|
|
918
891
|
} else {
|
|
919
892
|
const { entityAsName, propertyName } = item.aggregateParam;
|
|
920
|
-
const entity =
|
|
893
|
+
const entity = entities.find((item: Entity) => item.name === entityAsName);
|
|
921
894
|
const property = entity?.properties.find((item) => item.name === propertyName);
|
|
922
|
-
typeName = property?.typeAnnotation
|
|
895
|
+
typeName = property?.typeAnnotation?.typeName;
|
|
923
896
|
}
|
|
924
897
|
return {
|
|
925
898
|
concept: 'StructureProperty',
|
|
@@ -934,22 +907,23 @@ export class CallQueryComponent extends LogicItem {
|
|
|
934
907
|
});
|
|
935
908
|
}
|
|
936
909
|
|
|
937
|
-
genPropertyListOfGroupBy(node: CallQueryComponent) {
|
|
910
|
+
genPropertyListOfGroupBy(node: CallQueryComponent, entities: Entity[]) {
|
|
938
911
|
return node.groupBy
|
|
939
912
|
.filter((item) => item.groupElement && (item.groupElement as QueryFieldExpression).propertyName && (item.groupElement as QueryFieldExpression).asName)
|
|
940
913
|
.map((item) => {
|
|
941
914
|
const { entityAsName, propertyName, asName } = item.groupElement as QueryFieldExpression;
|
|
942
|
-
const entity =
|
|
915
|
+
const entity = entities.find((item: Entity) => item.name === entityAsName);
|
|
943
916
|
const property = entity?.properties.find((item) => item.name === propertyName);
|
|
944
|
-
const
|
|
917
|
+
const propertyTypeAnnotation = property.typeAnnotation;
|
|
918
|
+
|
|
945
919
|
return {
|
|
946
920
|
concept: 'StructureProperty',
|
|
947
921
|
name: asName,
|
|
948
922
|
typeAnnotation: {
|
|
949
|
-
concept:
|
|
950
|
-
typeKind:
|
|
951
|
-
typeName,
|
|
952
|
-
typeNamespace:
|
|
923
|
+
concept: propertyTypeAnnotation.concept,
|
|
924
|
+
typeKind: propertyTypeAnnotation.typeKind,
|
|
925
|
+
typeName: propertyTypeAnnotation.typeName,
|
|
926
|
+
typeNamespace: propertyTypeAnnotation.typeNamespace,
|
|
953
927
|
},
|
|
954
928
|
};
|
|
955
929
|
});
|
|
@@ -966,13 +940,14 @@ export class CallQueryComponent extends LogicItem {
|
|
|
966
940
|
|
|
967
941
|
saveStructure() {
|
|
968
942
|
// 没有数据源时不初始化数据结构
|
|
969
|
-
if (!this.
|
|
943
|
+
if (!this.entityInfos.length) {
|
|
970
944
|
return;
|
|
971
945
|
}
|
|
972
|
-
|
|
946
|
+
const entityNamespace = this.from?.entityNamespace;
|
|
947
|
+
const entities = this.app.findNodeByCompleteName(entityNamespace);
|
|
973
948
|
if (!this.isAutoInfer()) {
|
|
974
949
|
// 存量应用走之前的逻辑
|
|
975
|
-
return this.saveStructureNoInfer();
|
|
950
|
+
return this.saveStructureNoInfer(entities);
|
|
976
951
|
}
|
|
977
952
|
|
|
978
953
|
const groupBy = this.groupBy;
|
|
@@ -999,35 +974,35 @@ export class CallQueryComponent extends LogicItem {
|
|
|
999
974
|
const groupByLength = groupBy.filter((item) => (item.groupElement as QueryFieldExpression)?.propertyName && (item.groupElement as QueryFieldExpression).asName).length;
|
|
1000
975
|
const aggregateLength = selectElements.filter((item) => item.aggregateName && item.asName).length;
|
|
1001
976
|
|
|
977
|
+
|
|
978
|
+
|
|
1002
979
|
// 1. 有分组
|
|
1003
980
|
if (groupByLength) {
|
|
1004
981
|
if (!aggregateLength && groupByLength === 1) {
|
|
1005
982
|
// 1.1 单分组无聚合:`PageOf<列的类型>`
|
|
1006
|
-
const { entityAsName, propertyName } = groupBy[0].groupElement as
|
|
1007
|
-
const entity =
|
|
1008
|
-
const property = entity?.properties.find((item) => item.name === propertyName);
|
|
1009
|
-
const
|
|
983
|
+
const { entityAsName, propertyName } = groupBy[0].groupElement as QueryFieldExpression;
|
|
984
|
+
const entity = entities.find((item: Entity) => item.name === entityAsName);
|
|
985
|
+
const property = entity?.properties.find((item: any) => item.name === propertyName);
|
|
986
|
+
const propertyTypeAnnotation = property.typeAnnotation;
|
|
1010
987
|
|
|
1011
988
|
typeAnnotation = TypeAnnotation.from({
|
|
1012
|
-
text: `PageOf<${typeName}>`,
|
|
989
|
+
text: `PageOf<${propertyTypeAnnotation.typeName}>`,
|
|
1013
990
|
concept: 'TypeAnnotation',
|
|
1014
991
|
typeKind: 'generic',
|
|
1015
992
|
typeName: 'PageOf',
|
|
1016
993
|
typeNamespace: `nasl.collection`,
|
|
1017
|
-
typeArguments: [
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
}, this.typeAnnotation, 'typeAnnotation'),
|
|
1024
|
-
],
|
|
994
|
+
typeArguments: [TypeAnnotation.from({
|
|
995
|
+
concept: propertyTypeAnnotation.concept,
|
|
996
|
+
typeKind: propertyTypeAnnotation.typeKind,
|
|
997
|
+
typeName: propertyTypeAnnotation.typeName,
|
|
998
|
+
typeNamespace: propertyTypeAnnotation.typeNamespace,
|
|
999
|
+
}, this.typeAnnotation, 'typeAnnotation')],
|
|
1025
1000
|
}, this, 'typeAnnotation');
|
|
1026
1001
|
} else {
|
|
1027
1002
|
// 1.2 多分组:`PageOf<Structure>`
|
|
1028
1003
|
const structure = this.genStructure(structureName, [
|
|
1029
|
-
...this.genPropertyListOfGroupBy(this),
|
|
1030
|
-
...this.genPropertyListOfAggregate(this),
|
|
1004
|
+
...this.genPropertyListOfGroupBy(this, entities),
|
|
1005
|
+
...this.genPropertyListOfAggregate(this, entities),
|
|
1031
1006
|
]);
|
|
1032
1007
|
this.app.addStructure(structure);
|
|
1033
1008
|
|
|
@@ -1061,9 +1036,9 @@ export class CallQueryComponent extends LogicItem {
|
|
|
1061
1036
|
} else {
|
|
1062
1037
|
// 2.1.3. 其他返回列类型,包含:`Integer`、`Long`、`Double`
|
|
1063
1038
|
const { entityAsName, propertyName } = selectElements[0].aggregateParam;
|
|
1064
|
-
const entity =
|
|
1065
|
-
const property = entity?.properties.find((item) => item.name === propertyName);
|
|
1066
|
-
typeName = property?.typeAnnotation
|
|
1039
|
+
const entity = entities.find((item: Entity) => item.name === entityAsName);
|
|
1040
|
+
const property = entity?.properties.find((item: any) => item.name === propertyName);
|
|
1041
|
+
typeName = property?.typeAnnotation?.typeName;
|
|
1067
1042
|
}
|
|
1068
1043
|
typeAnnotation = TypeAnnotation.from({
|
|
1069
1044
|
concept: 'TypeAnnotation',
|
|
@@ -1074,7 +1049,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
1074
1049
|
} else {
|
|
1075
1050
|
// 2.2. 多聚合:`Structure`(自动创建 `Structure`)
|
|
1076
1051
|
const structure = this.genStructure(structureName, [
|
|
1077
|
-
...this.genPropertyListOfAggregate(this),
|
|
1052
|
+
...this.genPropertyListOfAggregate(this, entities),
|
|
1078
1053
|
]);
|
|
1079
1054
|
this.app.addStructure(structure);
|
|
1080
1055
|
|
|
@@ -1089,7 +1064,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
1089
1064
|
// 2.3. 无聚合(默认情况):`PageOf<Structure>`(自动创建 `Structure`)
|
|
1090
1065
|
const structure = this.genStructure(structureName, [
|
|
1091
1066
|
...this.genPropertyListOfFrom(this.from),
|
|
1092
|
-
...this.genPropertyListOfAggregate(this),
|
|
1067
|
+
...this.genPropertyListOfAggregate(this, entities),
|
|
1093
1068
|
]);
|
|
1094
1069
|
this.app.addStructure(structure);
|
|
1095
1070
|
|
|
@@ -1114,10 +1089,10 @@ export class CallQueryComponent extends LogicItem {
|
|
|
1114
1089
|
this.update({ typeAnnotation });
|
|
1115
1090
|
}
|
|
1116
1091
|
|
|
1117
|
-
saveStructureNoInfer() {
|
|
1092
|
+
saveStructureNoInfer(entities: any[] = []) {
|
|
1118
1093
|
const source = this.genStructure(null, [
|
|
1119
1094
|
...this.genPropertyListOfFrom(this.from),
|
|
1120
|
-
...this.genPropertyListOfAggregate(this),
|
|
1095
|
+
...this.genPropertyListOfAggregate(this, entities),
|
|
1121
1096
|
]);
|
|
1122
1097
|
if (this.typeAnnotation) {
|
|
1123
1098
|
const structure = this.app.structures.find((item) => item.name === this.typeAnnotation.typeName);
|
|
@@ -1162,53 +1137,61 @@ export class CallQueryComponent extends LogicItem {
|
|
|
1162
1137
|
} catch {}
|
|
1163
1138
|
}
|
|
1164
1139
|
|
|
1165
|
-
|
|
1140
|
+
getEntityInfos(node: QueryFromExpression | QueryJoinExpression, set = new Set()) {
|
|
1166
1141
|
if (node?.entityName)
|
|
1167
|
-
set.add(
|
|
1142
|
+
set.add({
|
|
1143
|
+
namespace: node.entityNamespace,
|
|
1144
|
+
name: node.entityName,
|
|
1145
|
+
});
|
|
1168
1146
|
|
|
1169
1147
|
node?.joinParts?.forEach((child) => {
|
|
1170
|
-
this.
|
|
1148
|
+
this.getEntityInfos(child, set);
|
|
1171
1149
|
});
|
|
1172
1150
|
return Array.from(set);
|
|
1173
1151
|
}
|
|
1174
1152
|
|
|
1175
|
-
get
|
|
1176
|
-
return this.
|
|
1153
|
+
get entityInfos() {
|
|
1154
|
+
return this.getEntityInfos(this.from);
|
|
1177
1155
|
}
|
|
1178
1156
|
|
|
1179
1157
|
getCompletionPropertyOfEntities() {
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
.
|
|
1184
|
-
.
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
concept: '
|
|
1190
|
-
name:
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1158
|
+
const firstEntityInfo: any = this.entityInfos[0];
|
|
1159
|
+
if (firstEntityInfo) {
|
|
1160
|
+
const namespace = firstEntityInfo.namespace;
|
|
1161
|
+
const entities: Entity[] = this.app.findNodeByCompleteName(namespace);
|
|
1162
|
+
if (Array.isArray(entities)) {
|
|
1163
|
+
const children = this.entityInfos
|
|
1164
|
+
.map(({ name }) => entities.find((item) => item.name === name))
|
|
1165
|
+
.filter((item) => item)
|
|
1166
|
+
.map((entity) => ({
|
|
1167
|
+
concept: 'Entity',
|
|
1168
|
+
name: entity.name,
|
|
1169
|
+
children: entity.properties.map((property) => {
|
|
1170
|
+
const completionProperty = new CompletionProperty({
|
|
1171
|
+
concept: 'CompletionProperty',
|
|
1172
|
+
name: property.name,
|
|
1173
|
+
value: `${entity.name}.${property.name}`,
|
|
1174
|
+
expression: LogicItem.from({
|
|
1175
|
+
concept: 'QueryFieldExpression',
|
|
1176
|
+
name: property.name,
|
|
1177
|
+
value: `${entity.name}.${property.name}`,
|
|
1178
|
+
entityAsName: entity.name,
|
|
1179
|
+
propertyName: property.name,
|
|
1180
|
+
}),
|
|
1181
|
+
});
|
|
1182
|
+
completionProperty.icon = 'property';
|
|
1183
|
+
return completionProperty;
|
|
1198
1184
|
}),
|
|
1199
|
-
});
|
|
1200
|
-
|
|
1201
|
-
return
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
icon: 'category',
|
|
1210
|
-
children,
|
|
1211
|
-
};
|
|
1185
|
+
}));
|
|
1186
|
+
if (children.length) {
|
|
1187
|
+
return {
|
|
1188
|
+
name: '实体',
|
|
1189
|
+
icon: 'category',
|
|
1190
|
+
children,
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1212
1195
|
}
|
|
1213
1196
|
|
|
1214
1197
|
getCompletionPropertyOfAggregateAsNames() {
|
|
@@ -1263,7 +1246,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
1263
1246
|
//================================================================================
|
|
1264
1247
|
}
|
|
1265
1248
|
|
|
1266
|
-
classMap
|
|
1249
|
+
classMap.CallQueryComponent = CallQueryComponent;
|
|
1267
1250
|
export default CallQueryComponent;
|
|
1268
1251
|
//================================================================================
|
|
1269
1252
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -79,7 +79,7 @@ export class Comment extends LogicItem {
|
|
|
79
79
|
@withSourceMap()
|
|
80
80
|
toEmbeddedTS(state?: TranslatorState): string {
|
|
81
81
|
let code = '';
|
|
82
|
-
code += `\n${indent(state
|
|
82
|
+
code += `\n${indent((state?.tabSize || 0))}
|
|
83
83
|
/**
|
|
84
84
|
* 注释不用翻译
|
|
85
85
|
*/
|
|
@@ -92,7 +92,7 @@ export class Comment extends LogicItem {
|
|
|
92
92
|
//================================================================================
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
classMap
|
|
95
|
+
classMap.Comment = Comment;
|
|
96
96
|
export default Comment;
|
|
97
97
|
//================================================================================
|
|
98
98
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -246,7 +246,7 @@ export class CompletionProperty extends BaseNode {
|
|
|
246
246
|
//================================================================================
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
classMap
|
|
249
|
+
classMap.CompletionProperty = CompletionProperty;
|
|
250
250
|
export default CompletionProperty;
|
|
251
251
|
//================================================================================
|
|
252
252
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -275,14 +275,16 @@ export class ConfigGroup extends BaseNode {
|
|
|
275
275
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
276
276
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
277
277
|
//================================================================================
|
|
278
|
-
|
|
278
|
+
getProperty(name = '') {
|
|
279
|
+
return this.properties.find((item) => item.name === name);
|
|
280
|
+
}
|
|
279
281
|
//================================================================================
|
|
280
282
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
281
283
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
282
284
|
//================================================================================
|
|
283
285
|
}
|
|
284
286
|
|
|
285
|
-
classMap
|
|
287
|
+
classMap.ConfigGroup = ConfigGroup;
|
|
286
288
|
export default ConfigGroup;
|
|
287
289
|
//================================================================================
|
|
288
290
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -104,7 +104,7 @@ export class ConfigPropertyValue extends BaseNode {
|
|
|
104
104
|
//================================================================================
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
classMap
|
|
107
|
+
classMap.ConfigPropertyValue = ConfigPropertyValue;
|
|
108
108
|
export default ConfigPropertyValue;
|
|
109
109
|
//================================================================================
|
|
110
110
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -292,13 +292,17 @@ export class ConfigProperty extends BaseNode {
|
|
|
292
292
|
...object,
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
+
|
|
296
|
+
getPropertyEnv(env = '') {
|
|
297
|
+
return this.values.find((item) => item.env === env);
|
|
298
|
+
}
|
|
295
299
|
//================================================================================
|
|
296
300
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
297
301
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
298
302
|
//================================================================================
|
|
299
303
|
}
|
|
300
304
|
|
|
301
|
-
classMap
|
|
305
|
+
classMap.ConfigProperty = ConfigProperty;
|
|
302
306
|
export default ConfigProperty;
|
|
303
307
|
//================================================================================
|
|
304
308
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -271,6 +271,9 @@ export class Configuration extends BaseNode {
|
|
|
271
271
|
],
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
+
getGroup(name = '') {
|
|
275
|
+
return this.groups.find((item) => item.name === name);
|
|
276
|
+
}
|
|
274
277
|
|
|
275
278
|
//================================================================================
|
|
276
279
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -278,7 +281,7 @@ export class Configuration extends BaseNode {
|
|
|
278
281
|
//================================================================================
|
|
279
282
|
}
|
|
280
283
|
|
|
281
|
-
classMap
|
|
284
|
+
classMap.Configuration = Configuration;
|
|
282
285
|
export default Configuration;
|
|
283
286
|
//================================================================================
|
|
284
287
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -253,7 +253,7 @@ export class Constant extends BaseNode {
|
|
|
253
253
|
//================================================================================
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
classMap
|
|
256
|
+
classMap.Constant = Constant;
|
|
257
257
|
export default Constant;
|
|
258
258
|
//================================================================================
|
|
259
259
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -127,7 +127,7 @@ export class DataElement extends BaseNode {
|
|
|
127
127
|
//================================================================================
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
classMap
|
|
130
|
+
classMap.DataElement = DataElement;
|
|
131
131
|
export default DataElement;
|
|
132
132
|
//================================================================================
|
|
133
133
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|