@lcap/nasl 2.12.0-beta → 2.12.0-beta.1
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.d.ts +1 -0
- package/out/automate/engine/index.js +23 -12
- package/out/automate/engine/index.js.map +1 -1
- package/out/automate/engine/operators.d.ts +10 -2
- package/out/automate/engine/operators.js +105 -7
- package/out/automate/engine/operators.js.map +1 -1
- package/out/automate/engine/uniqueName.d.ts +8 -2
- package/out/automate/engine/uniqueName.js +72 -4
- package/out/automate/engine/uniqueName.js.map +1 -1
- package/out/automate/engine/utils.js +4 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/automate/template/process.d.ts +9 -0
- package/out/automate/template/process.js +10976 -0
- package/out/automate/template/process.js.map +1 -0
- package/out/bak/translator.js +1 -0
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +5 -0
- package/out/common/BaseNode.js +24 -3
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.js +3 -2
- 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 +1 -1
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +9 -2
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +6 -2
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +4 -0
- package/out/concepts/BooleanLiteral__.js +12 -1
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallFunction__.js +2 -1
- 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 +27 -11
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +1 -1
- package/out/concepts/CallQueryComponent__.js +3 -3
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +1 -1
- 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__.js +1 -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__.js +1 -1
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +1 -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__.js +2 -0
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/End__.js +1 -1
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.js +1 -1
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +1 -1
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.js +2 -2
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +3 -2
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +1 -1
- 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 +2 -2
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +2 -4
- 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 +7 -6
- 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 +118 -112
- package/out/concepts/Module__.js +25 -7
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.js +2 -2
- 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__.js +2 -2
- 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 +7 -2
- 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__.d.ts +1 -1
- package/out/concepts/Process__.js +2 -2
- 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 +1 -1
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +1 -1
- 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__.js +1 -1
- 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 +2 -2
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +1 -1
- 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 +4 -0
- package/out/concepts/SqlQueryComponent__.js +16 -0
- 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__.d.ts +1 -1
- package/out/concepts/StringLiteral__.js +2 -2
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js +5 -4
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js +1 -1
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +1 -1
- package/out/concepts/SwitchCase__.js +19 -21
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +2 -7
- 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__.js +2 -2
- 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 +2 -2
- 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 +9 -4
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +0 -2
- package/out/concepts/View__.js +4 -11
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +1 -1
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.js +20 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.process.d.ts +4 -0
- package/out/concepts/basics/stdlib/nasl.process.js +410 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.ui.js +1 -11
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +25 -25
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/types/index.d.ts +1 -0
- package/out/concepts/basics/types/index.js +4 -1
- package/out/concepts/basics/types/index.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +3 -1
- package/out/generator/genBundleFiles.js +16 -3
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.d.ts +1 -0
- package/out/generator/genMetaData.js +7 -0
- package/out/generator/genMetaData.js.map +1 -1
- package/out/index.d.ts +1 -1
- package/out/index.js +2 -1
- package/out/index.js.map +1 -1
- package/out/server/getLogics.js +18 -0
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +5 -0
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.d.ts +1 -0
- package/out/server/getProcesses.js +9 -1
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/naslServer.d.ts +1 -0
- package/out/server/naslServer.js +98 -23
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +21 -3
- package/out/server/translator.js.map +1 -1
- package/out/service/creator/errHandles.js +5 -0
- package/out/service/creator/errHandles.js.map +1 -1
- package/out/service/storage/init.d.ts +1 -0
- package/out/service/storage/init.js +94 -83
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +20 -14
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +13 -6
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +20 -8
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +3 -1
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genEnumSelectBlock.js +1 -1
- package/out/templator/genEnumSelectBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.js +8 -4
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +1 -2
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +20 -21
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genTableBlock.js +14 -6
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +20 -14
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.js +19 -1
- package/out/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/automate/engine/index.js +21 -7
- package/src/automate/engine/operators.js +114 -17
- package/src/automate/engine/uniqueName.js +77 -9
- package/src/automate/engine/utils.js +4 -2
- package/src/automate/template/process.js +10999 -0
- package/src/bak/translator.js +1 -0
- package/src/common/BaseNode.ts +21 -4
- package/src/concepts/App__.ts +4 -40
- 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 +1 -1
- package/src/concepts/BindDirective__.ts +8 -6
- package/src/concepts/BindEvent__.ts +6 -2
- package/src/concepts/BooleanLiteral__.ts +13 -1
- package/src/concepts/CallFunction__.ts +15 -14
- package/src/concepts/CallInterface__.ts +1 -1
- package/src/concepts/CallLogic__.ts +26 -11
- package/src/concepts/CallQueryComponent__.ts +32 -4
- package/src/concepts/Comment__.ts +1 -1
- package/src/concepts/CompletionProperty__.ts +1 -1
- package/src/concepts/ConfigGroup__.ts +1 -1
- package/src/concepts/ConfigPropertyValue__.ts +1 -1
- package/src/concepts/ConfigProperty__.ts +1 -1
- package/src/concepts/Configuration__.ts +1 -1
- package/src/concepts/Constant__.ts +1 -1
- package/src/concepts/DataElement__.ts +1 -1
- package/src/concepts/DataSource__.ts +2 -0
- package/src/concepts/End__.ts +1 -1
- package/src/concepts/EntityIndex__.ts +1 -1
- package/src/concepts/EntityProperty__.ts +1 -1
- package/src/concepts/Entity__.ts +1 -1
- package/src/concepts/EnumItem__.ts +1 -1
- package/src/concepts/Enum__.ts +1 -1
- package/src/concepts/Event__.ts +1 -1
- package/src/concepts/ForEachStatement__.ts +1 -1
- package/src/concepts/Function__.ts +5 -5
- package/src/concepts/Identifier__.ts +3 -2
- package/src/concepts/IfStatement__.ts +1 -1
- package/src/concepts/InterfaceParam__.ts +1 -1
- package/src/concepts/Interface__.ts +2 -2
- package/src/concepts/JSBlock__.ts +2 -11
- package/src/concepts/LogicItem__.ts +1 -1
- package/src/concepts/Logic__.ts +8 -44
- package/src/concepts/MemberExpression__.ts +1 -1
- package/src/concepts/Module__.ts +141 -147
- package/src/concepts/Namespace__.ts +2 -2
- package/src/concepts/NullLiteral__.ts +1 -1
- package/src/concepts/NumericLiteral__.ts +1 -1
- package/src/concepts/Param__.ts +2 -2
- package/src/concepts/Point__.ts +1 -1
- package/src/concepts/ProcessComponent__.ts +1 -1
- package/src/concepts/ProcessElement__.ts +8 -3
- package/src/concepts/ProcessOutcome__.ts +1 -1
- package/src/concepts/Process__.ts +3 -3
- package/src/concepts/QueryAggregateExpression__.ts +1 -1
- package/src/concepts/QueryFieldExpression__.ts +1 -1
- package/src/concepts/QueryFromExpression__.ts +1 -1
- package/src/concepts/QueryGroupByExpression__.ts +1 -1
- package/src/concepts/QueryJoinExpression__.ts +1 -1
- 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 +2 -2
- package/src/concepts/Role__.ts +1 -1
- package/src/concepts/Slot__.ts +1 -1
- package/src/concepts/SqlQueryComponent__.ts +17 -0
- package/src/concepts/Start__.ts +1 -1
- package/src/concepts/StringLiteral__.ts +2 -2
- package/src/concepts/StructureProperty__.ts +5 -8
- package/src/concepts/Structure__.ts +1 -1
- package/src/concepts/SwitchCase__.ts +19 -23
- package/src/concepts/SwitchStatement__.ts +2 -6
- package/src/concepts/Theme__.ts +1 -1
- package/src/concepts/Transactional__.ts +1 -1
- package/src/concepts/TypeAnnotation__.ts +21 -2
- 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 +2 -2
- package/src/concepts/ViewComponent__.ts +1 -1
- package/src/concepts/ViewElement__.ts +10 -23
- package/src/concepts/View__.ts +6 -13
- package/src/concepts/WhileStatement__.ts +1 -1
- package/src/concepts/basics/stdlib/nasl.auth.ts +20 -0
- package/src/concepts/basics/stdlib/nasl.process.ts +406 -0
- package/src/concepts/basics/stdlib/nasl.ui.ts +1 -11
- package/src/concepts/basics/stdlib/nasl.util.ts +25 -25
- package/src/concepts/basics/types/index.ts +1 -0
- package/src/generator/genBundleFiles.ts +21 -5
- package/src/generator/genMetaData.ts +10 -1
- package/src/index.ts +1 -1
- package/src/server/getLogics.ts +18 -1
- package/src/server/getMemberIdentifier.ts +4 -0
- package/src/server/getProcesses.ts +8 -1
- package/src/server/naslServer.ts +107 -28
- package/src/server/translator.ts +20 -3
- package/src/service/creator/errHandles.js +6 -0
- package/src/service/storage/init.ts +96 -85
- package/src/templator/genCreateBlock.ts +20 -14
- package/src/templator/genCurdEditMultipleKeyBlock.ts +13 -8
- package/src/templator/genCurdMultipleKeyBlock.ts +20 -9
- package/src/templator/genEditTableBlock.ts +3 -1
- package/src/templator/genEnumSelectBlock.ts +1 -1
- package/src/templator/genGridViewBlock.ts +8 -4
- package/src/templator/genListViewBlock.ts +1 -2
- package/src/templator/genQueryComponent.ts +22 -21
- package/src/templator/genTableBlock.ts +14 -7
- package/src/templator/genUpdateBlock.ts +20 -14
- package/src/utils/index.ts +19 -0
|
@@ -84,11 +84,13 @@ 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
|
+
|
|
92
94
|
/**
|
|
93
95
|
* @param source 需要合并的部分参数
|
|
94
96
|
*/
|
|
@@ -102,6 +104,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
102
104
|
return super.from(source, parentNode, parentKey) as CallQueryComponent;
|
|
103
105
|
}
|
|
104
106
|
|
|
107
|
+
|
|
105
108
|
/**
|
|
106
109
|
* 设置select
|
|
107
110
|
*/
|
|
@@ -201,7 +204,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
201
204
|
});
|
|
202
205
|
}
|
|
203
206
|
|
|
204
|
-
|
|
207
|
+
getQueryGroupByExpressionExistingNames(excludedList: Array<QueryGroupByExpression> = []) {
|
|
205
208
|
const excludedSet = new Set(excludedList);
|
|
206
209
|
return (this.groupBy || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
207
210
|
}
|
|
@@ -342,6 +345,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
342
345
|
return node;
|
|
343
346
|
}
|
|
344
347
|
|
|
348
|
+
|
|
349
|
+
|
|
345
350
|
/**
|
|
346
351
|
* 插入查询排序子句
|
|
347
352
|
* @internal
|
|
@@ -374,6 +379,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
374
379
|
return queryOrderByExpression;
|
|
375
380
|
}
|
|
376
381
|
|
|
382
|
+
|
|
383
|
+
|
|
377
384
|
/**
|
|
378
385
|
* 插入查询排序子句
|
|
379
386
|
* @param queryOrderByExpressionOptions 查询排序子句参数
|
|
@@ -396,6 +403,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
396
403
|
return node;
|
|
397
404
|
}
|
|
398
405
|
|
|
406
|
+
|
|
407
|
+
|
|
399
408
|
/**
|
|
400
409
|
* 添加查询排序子句
|
|
401
410
|
* @internal
|
|
@@ -415,6 +424,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
415
424
|
return this._insertQueryOrderByExpressionInOrderByAt(options as any, index);
|
|
416
425
|
}
|
|
417
426
|
|
|
427
|
+
|
|
428
|
+
|
|
418
429
|
/**
|
|
419
430
|
* 添加查询排序子句
|
|
420
431
|
* @param queryOrderByExpressionOptions 查询排序子句参数
|
|
@@ -438,6 +449,9 @@ export class CallQueryComponent extends LogicItem {
|
|
|
438
449
|
return node;
|
|
439
450
|
}
|
|
440
451
|
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
441
455
|
/**
|
|
442
456
|
* 删除类型标注
|
|
443
457
|
* @param name 类型标注名称
|
|
@@ -486,6 +500,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
486
500
|
return params;
|
|
487
501
|
}
|
|
488
502
|
|
|
503
|
+
|
|
504
|
+
|
|
489
505
|
/**
|
|
490
506
|
* 删除查询选择子句
|
|
491
507
|
* @param name 查询选择子句名称
|
|
@@ -511,6 +527,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
511
527
|
return select.delete();
|
|
512
528
|
}
|
|
513
529
|
|
|
530
|
+
|
|
531
|
+
|
|
514
532
|
/**
|
|
515
533
|
* 删除查询 From 子句
|
|
516
534
|
* @param name 查询 From 子句名称
|
|
@@ -536,6 +554,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
536
554
|
return from.delete();
|
|
537
555
|
}
|
|
538
556
|
|
|
557
|
+
|
|
558
|
+
|
|
539
559
|
/**
|
|
540
560
|
* 删除逻辑项
|
|
541
561
|
* @param name 逻辑项名称
|
|
@@ -561,6 +581,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
561
581
|
return where.delete();
|
|
562
582
|
}
|
|
563
583
|
|
|
584
|
+
|
|
585
|
+
|
|
564
586
|
/**
|
|
565
587
|
* 删除查询分组
|
|
566
588
|
* @param name 查询分组名称
|
|
@@ -586,6 +608,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
586
608
|
return queryGroupByExpression.delete();
|
|
587
609
|
}
|
|
588
610
|
|
|
611
|
+
|
|
612
|
+
|
|
589
613
|
/**
|
|
590
614
|
* 删除逻辑项
|
|
591
615
|
* @param name 逻辑项名称
|
|
@@ -611,6 +635,8 @@ export class CallQueryComponent extends LogicItem {
|
|
|
611
635
|
return having.delete();
|
|
612
636
|
}
|
|
613
637
|
|
|
638
|
+
|
|
639
|
+
|
|
614
640
|
/**
|
|
615
641
|
* 删除查询排序子句
|
|
616
642
|
* @param queryOrderByExpression 已有的查询排序子句实例
|
|
@@ -618,10 +644,12 @@ export class CallQueryComponent extends LogicItem {
|
|
|
618
644
|
removeQueryOrderByExpressionInOrderBy(queryOrderByExpression: QueryOrderByExpression): void;
|
|
619
645
|
|
|
620
646
|
removeQueryOrderByExpressionInOrderBy(options: QueryOrderByExpression) {
|
|
621
|
-
|
|
647
|
+
let queryOrderByExpression: QueryOrderByExpression = options;
|
|
622
648
|
return queryOrderByExpression.delete();
|
|
623
649
|
}
|
|
624
650
|
|
|
651
|
+
|
|
652
|
+
|
|
625
653
|
/**
|
|
626
654
|
* 删除查询分页子句
|
|
627
655
|
* @param name 查询分页子句名称
|
|
@@ -1246,7 +1274,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
1246
1274
|
//================================================================================
|
|
1247
1275
|
}
|
|
1248
1276
|
|
|
1249
|
-
classMap
|
|
1277
|
+
classMap['CallQueryComponent'] = CallQueryComponent;
|
|
1250
1278
|
export default CallQueryComponent;
|
|
1251
1279
|
//================================================================================
|
|
1252
1280
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -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
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -284,7 +284,7 @@ export class ConfigGroup extends BaseNode {
|
|
|
284
284
|
//================================================================================
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
classMap
|
|
287
|
+
classMap['ConfigGroup'] = ConfigGroup;
|
|
288
288
|
export default ConfigGroup;
|
|
289
289
|
//================================================================================
|
|
290
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
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -302,7 +302,7 @@ export class ConfigProperty extends BaseNode {
|
|
|
302
302
|
//================================================================================
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
-
classMap
|
|
305
|
+
classMap['ConfigProperty'] = ConfigProperty;
|
|
306
306
|
export default ConfigProperty;
|
|
307
307
|
//================================================================================
|
|
308
308
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -281,7 +281,7 @@ export class Configuration extends BaseNode {
|
|
|
281
281
|
//================================================================================
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
classMap
|
|
284
|
+
classMap['Configuration'] = Configuration;
|
|
285
285
|
export default Configuration;
|
|
286
286
|
//================================================================================
|
|
287
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
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -330,6 +330,8 @@ export class DataSource extends BaseNode {
|
|
|
330
330
|
@withSourceMap()
|
|
331
331
|
toEmbeddedTS(state?: TranslatorState): string {
|
|
332
332
|
let code = `export namespace ${this.name} {\n`;
|
|
333
|
+
code += 'const name = ';
|
|
334
|
+
code += '"' + this.name + '";\n';
|
|
333
335
|
code += '}\n';
|
|
334
336
|
return code;
|
|
335
337
|
}
|
package/src/concepts/End__.ts
CHANGED
|
@@ -83,7 +83,7 @@ export class End extends LogicItem {
|
|
|
83
83
|
//================================================================================
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
classMap
|
|
86
|
+
classMap['End'] = End;
|
|
87
87
|
export default End;
|
|
88
88
|
//================================================================================
|
|
89
89
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -217,7 +217,7 @@ export class EntityIndex extends BaseNode {
|
|
|
217
217
|
//================================================================================
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
classMap
|
|
220
|
+
classMap['EntityIndex'] = EntityIndex;
|
|
221
221
|
export default EntityIndex;
|
|
222
222
|
//================================================================================
|
|
223
223
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -581,7 +581,7 @@ export class EntityProperty extends BaseNode {
|
|
|
581
581
|
//================================================================================
|
|
582
582
|
}
|
|
583
583
|
|
|
584
|
-
classMap
|
|
584
|
+
classMap['EntityProperty'] = EntityProperty;
|
|
585
585
|
export default EntityProperty;
|
|
586
586
|
//================================================================================
|
|
587
587
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Entity__.ts
CHANGED
|
@@ -740,7 +740,7 @@ export class Entity extends BaseNode {
|
|
|
740
740
|
//================================================================================
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
classMap
|
|
743
|
+
classMap['Entity'] = Entity;
|
|
744
744
|
export default Entity;
|
|
745
745
|
//================================================================================
|
|
746
746
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -132,7 +132,7 @@ export class EnumItem extends BaseNode {
|
|
|
132
132
|
//================================================================================
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
classMap
|
|
135
|
+
classMap['EnumItem'] = EnumItem;
|
|
136
136
|
export default EnumItem;
|
|
137
137
|
//================================================================================
|
|
138
138
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Enum__.ts
CHANGED
|
@@ -362,7 +362,7 @@ export class Enum extends BaseNode {
|
|
|
362
362
|
//================================================================================
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
classMap
|
|
365
|
+
classMap['Enum'] = Enum;
|
|
366
366
|
export default Enum;
|
|
367
367
|
//================================================================================
|
|
368
368
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
package/src/concepts/Event__.ts
CHANGED
|
@@ -309,7 +309,7 @@ export class Event extends BaseNode {
|
|
|
309
309
|
//================================================================================
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
classMap
|
|
312
|
+
classMap['Event'] = Event;
|
|
313
313
|
export default Event;
|
|
314
314
|
//================================================================================
|
|
315
315
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -562,7 +562,7 @@ export class ForEachStatement extends LogicItem {
|
|
|
562
562
|
//================================================================================
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
-
classMap
|
|
565
|
+
classMap['ForEachStatement'] = ForEachStatement;
|
|
566
566
|
export default ForEachStatement;
|
|
567
567
|
//================================================================================
|
|
568
568
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -685,7 +685,7 @@ export class Function extends BaseNode {
|
|
|
685
685
|
}
|
|
686
686
|
|
|
687
687
|
|
|
688
|
-
|
|
688
|
+
|
|
689
689
|
|
|
690
690
|
/**
|
|
691
691
|
* 删除类型参数
|
|
@@ -963,7 +963,7 @@ export class Function extends BaseNode {
|
|
|
963
963
|
if (this.parentNode) {
|
|
964
964
|
let parentNodeNamespace = '';
|
|
965
965
|
if ((this.parentNode as Namespace).getNamespace) {
|
|
966
|
-
parentNodeNamespace = (this.parentNode as Namespace).getNamespace();
|
|
966
|
+
parentNodeNamespace = [(this.parentNode as Namespace).getNamespace(), this.parentNode.name].join('.');
|
|
967
967
|
}
|
|
968
968
|
return `${parentNodeNamespace}`;
|
|
969
969
|
} else
|
|
@@ -985,7 +985,7 @@ export class Function extends BaseNode {
|
|
|
985
985
|
code += this.returns[0].typeAnnotation.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
986
986
|
}
|
|
987
987
|
code += ` => (`;
|
|
988
|
-
|
|
988
|
+
|
|
989
989
|
if (this.returnExpression) {
|
|
990
990
|
code += this.returnExpression.toEmbeddedTS && this.returnExpression.toEmbeddedTS(shiftState(state, code, { tabSize: state.tabSize + 1 }));
|
|
991
991
|
}
|
|
@@ -993,7 +993,7 @@ export class Function extends BaseNode {
|
|
|
993
993
|
} else {
|
|
994
994
|
code += '__IDENTIFIER__';
|
|
995
995
|
}
|
|
996
|
-
|
|
996
|
+
|
|
997
997
|
return code;
|
|
998
998
|
}
|
|
999
999
|
get calleeKey() {
|
|
@@ -1008,7 +1008,7 @@ export class Function extends BaseNode {
|
|
|
1008
1008
|
//================================================================================
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
|
-
classMap
|
|
1011
|
+
classMap['Function'] = Function;
|
|
1012
1012
|
export default Function;
|
|
1013
1013
|
//================================================================================
|
|
1014
1014
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -85,7 +85,7 @@ export class Identifier extends LogicItem {
|
|
|
85
85
|
let name = this.name;
|
|
86
86
|
const namespace = this.namespace;
|
|
87
87
|
if (namespace) {
|
|
88
|
-
if ((this.namespace.endsWith('nasl.browser') || this.namespace.endsWith('nasl.auth') || this.namespace.endsWith('nasl.configuration'))) {
|
|
88
|
+
if ((this.namespace.endsWith('nasl.browser') || this.namespace.endsWith('nasl.auth') || this.namespace.endsWith('nasl.configuration') || this.namespace.endsWith('nasl.process'))) {
|
|
89
89
|
name = `$global.${this.name}`;
|
|
90
90
|
} else if (this.isEnum()) {
|
|
91
91
|
name = `$utils.EnumList("${this.name}")`;
|
|
@@ -126,7 +126,7 @@ export class Identifier extends LogicItem {
|
|
|
126
126
|
let name = this.name;
|
|
127
127
|
const namespace = this.namespace;
|
|
128
128
|
if (namespace) {
|
|
129
|
-
if (namespace.endsWith('nasl.browser') || namespace.endsWith('nasl.auth') || namespace.endsWith('nasl.configuration')) {
|
|
129
|
+
if (namespace.endsWith('nasl.browser') || namespace.endsWith('nasl.auth') || namespace.endsWith('nasl.configuration') || this.namespace.endsWith('nasl.process')) {
|
|
130
130
|
name = `$global.${this.name}`;
|
|
131
131
|
} else if (this.isEnum()) {
|
|
132
132
|
name = `$utils.EnumList("${this.name}")`;
|
|
@@ -137,6 +137,7 @@ export class Identifier extends LogicItem {
|
|
|
137
137
|
|| namespace?.endsWith('nasl.browser')
|
|
138
138
|
|| namespace?.endsWith('nasl.auth')
|
|
139
139
|
|| namespace?.endsWith('nasl.configuration')
|
|
140
|
+
|| namespace?.endsWith('nasl.process')
|
|
140
141
|
|| this.isEnum())
|
|
141
142
|
&& !isMemberExpressionProperty ? `this.${name}` : name;
|
|
142
143
|
}
|
|
@@ -438,7 +438,7 @@ export class IfStatement extends LogicItem {
|
|
|
438
438
|
//================================================================================
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
classMap
|
|
441
|
+
classMap['IfStatement'] = IfStatement;
|
|
442
442
|
export default IfStatement;
|
|
443
443
|
//================================================================================
|
|
444
444
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -333,7 +333,7 @@ export class InterfaceParam extends BaseNode {
|
|
|
333
333
|
//================================================================================
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
classMap
|
|
336
|
+
classMap['InterfaceParam'] = InterfaceParam;
|
|
337
337
|
export default InterfaceParam;
|
|
338
338
|
//================================================================================
|
|
339
339
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -581,7 +581,7 @@ export class Interface extends BaseNode {
|
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
get calleeKey(): string {
|
|
584
|
-
return `${this.getTsNamespace()}.${this.name}
|
|
584
|
+
return `${this.getTsNamespace()}.${this.name}`;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
get calleewholeKey() {
|
|
@@ -762,7 +762,7 @@ export class Interface extends BaseNode {
|
|
|
762
762
|
//================================================================================
|
|
763
763
|
}
|
|
764
764
|
|
|
765
|
-
classMap
|
|
765
|
+
classMap['Interface'] = Interface;
|
|
766
766
|
export default Interface;
|
|
767
767
|
//================================================================================
|
|
768
768
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
@@ -35,8 +35,6 @@ export class JSBlock extends LogicItem {
|
|
|
35
35
|
@property()
|
|
36
36
|
code: string = undefined;
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
38
|
/**
|
|
41
39
|
* @param source 需要合并的部分参数
|
|
42
40
|
*/
|
|
@@ -50,7 +48,6 @@ export class JSBlock extends LogicItem {
|
|
|
50
48
|
return super.from(source, parentNode, parentKey) as JSBlock;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
|
|
54
51
|
/**
|
|
55
52
|
* 设置代码内容
|
|
56
53
|
*/
|
|
@@ -63,10 +60,6 @@ export class JSBlock extends LogicItem {
|
|
|
63
60
|
});
|
|
64
61
|
}
|
|
65
62
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
63
|
//================================================================================
|
|
71
64
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
72
65
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
@@ -76,11 +69,9 @@ export class JSBlock extends LogicItem {
|
|
|
76
69
|
/**
|
|
77
70
|
* 生成 JS 脚本
|
|
78
71
|
*/
|
|
79
|
-
return `
|
|
72
|
+
return `await (async () => {
|
|
80
73
|
${this.code}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
await jsBlock_number();`;
|
|
74
|
+
})();`;
|
|
84
75
|
}
|
|
85
76
|
|
|
86
77
|
toEmbeddedTS(state?: TranslatorState): string {
|
|
@@ -245,7 +245,7 @@ export class LogicItem extends BaseNode {
|
|
|
245
245
|
//================================================================================
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
classMap
|
|
248
|
+
classMap['LogicItem'] = LogicItem;
|
|
249
249
|
export default LogicItem;
|
|
250
250
|
//================================================================================
|
|
251
251
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|