@lcap/nasl 1.0.2 → 2.12.0
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 +34 -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.d.ts +1 -0
- package/out/automate/engine/utils.js +92 -67
- 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__.d.ts +51 -49
- package/out/concepts/App__.js +86 -53
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +2 -2
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +10 -3
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +15 -6
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +4 -0
- package/out/concepts/BooleanLiteral__.js +11 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallFunction__.js +8 -2
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallLogic__.js +48 -30
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +8 -7
- package/out/concepts/CallQueryComponent__.js +86 -76
- 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/ConfigGroup__.d.ts +1 -0
- package/out/concepts/ConfigGroup__.js +7 -0
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +1 -0
- package/out/concepts/ConfigProperty__.js +3 -0
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.d.ts +1 -0
- package/out/concepts/Configuration__.js +3 -0
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +143 -0
- package/out/concepts/DataSource__.js +318 -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 +2 -2
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +5 -0
- package/out/concepts/EntityIndex__.js +6 -0
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +9 -0
- package/out/concepts/EntityProperty__.js +19 -2
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +5 -0
- package/out/concepts/Entity__.js +20 -10
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/Enum__.js +12 -6
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +2 -2
- 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 +6 -15
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +8 -8
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Interface__.js +19 -12
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +3 -5
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/Logic__.js +44 -44
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/Module__.d.ts +116 -194
- package/out/concepts/Module__.js +31 -114
- 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/Param__.d.ts +2 -1
- package/out/concepts/Param__.js +1 -1
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +30 -10
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/Process__.d.ts +1 -1
- package/out/concepts/Process__.js +17 -10
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +8 -1
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +4 -0
- package/out/concepts/QueryFromExpression__.js +13 -2
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +4 -0
- package/out/concepts/QueryJoinExpression__.js +14 -3
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/Return__.js +1 -1
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +10 -3
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +14 -0
- package/out/concepts/SqlQueryComponent__.js +48 -5
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +1 -1
- package/out/concepts/StringLiteral__.js +1 -1
- package/out/concepts/StructureProperty__.js +6 -5
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js +19 -12
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +1 -1
- package/out/concepts/SwitchCase__.js +23 -25
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +1 -6
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +8 -0
- package/out/concepts/TypeAnnotation__.js +44 -2
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/Variable__.js +1 -1
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.js +25 -20
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +0 -2
- package/out/concepts/View__.js +27 -32
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +4 -4
- 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 +280 -2
- 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/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.d.ts +3 -1
- package/out/generator/genBundleFiles.js +23 -5
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.d.ts +1 -0
- package/out/generator/genMetaData.js +20 -12
- 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/createUiTs.js +1 -0
- package/out/server/createUiTs.js.map +1 -1
- package/out/server/getLogics.js +27 -1
- 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 +4 -0
- package/out/server/getProcesses.js +69 -1
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/naslServer.d.ts +1 -0
- package/out/server/naslServer.js +223 -26
- 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 +37 -1
- 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 +95 -84
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +34 -24
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +28 -18
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +45 -29
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +15 -13
- 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 +29 -24
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +7 -5
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.js +25 -26
- 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 +31 -21
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +34 -24
- 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 +5 -0
- package/out/utils/index.js +50 -1
- package/out/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/automate/engine/index.js +33 -8
- package/src/automate/engine/operators.js +114 -17
- package/src/automate/engine/uniqueName.js +77 -9
- package/src/automate/engine/utils.js +95 -68
- 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 +128 -94
- package/src/concepts/BindAttribute__.ts +2 -2
- package/src/concepts/BindDirective__.ts +9 -7
- package/src/concepts/BindEvent__.ts +14 -6
- package/src/concepts/BooleanLiteral__.ts +12 -0
- package/src/concepts/CallFunction__.ts +6 -2
- package/src/concepts/CallLogic__.ts +47 -32
- package/src/concepts/CallQueryComponent__.ts +92 -81
- package/src/concepts/Comment__.ts +1 -1
- package/src/concepts/ConfigGroup__.ts +3 -1
- package/src/concepts/ConfigProperty__.ts +4 -0
- package/src/concepts/Configuration__.ts +3 -0
- package/src/concepts/DataSource__.ts +391 -0
- package/src/concepts/Destination__.ts +24 -8
- package/src/concepts/End__.ts +2 -2
- package/src/concepts/EntityIndex__.ts +7 -0
- package/src/concepts/EntityProperty__.ts +20 -2
- package/src/concepts/Entity__.ts +23 -11
- package/src/concepts/Enum__.ts +25 -6
- package/src/concepts/ForEachStatement__.ts +2 -2
- package/src/concepts/Function__.ts +95 -1
- package/src/concepts/Identifier__.ts +15 -15
- package/src/concepts/IfStatement__.ts +9 -9
- package/src/concepts/Interface__.ts +20 -12
- package/src/concepts/JSBlock__.ts +3 -12
- package/src/concepts/Logic__.ts +45 -79
- package/src/concepts/Module__.ts +141 -342
- package/src/concepts/Namespace__.ts +1 -204
- package/src/concepts/Param__.ts +3 -2
- package/src/concepts/ProcessElement__.ts +33 -12
- package/src/concepts/Process__.ts +18 -12
- package/src/concepts/QueryFieldExpression__.ts +9 -1
- package/src/concepts/QueryFromExpression__.ts +13 -2
- package/src/concepts/QueryJoinExpression__.ts +14 -3
- package/src/concepts/Return__.ts +1 -1
- package/src/concepts/Role__.ts +10 -4
- package/src/concepts/SqlQueryComponent__.ts +47 -11
- package/src/concepts/StringLiteral__.ts +1 -1
- package/src/concepts/StructureProperty__.ts +6 -9
- package/src/concepts/Structure__.ts +19 -11
- package/src/concepts/SwitchCase__.ts +23 -27
- package/src/concepts/SwitchStatement__.ts +1 -5
- package/src/concepts/TypeAnnotation__.ts +43 -2
- package/src/concepts/Variable__.ts +1 -1
- package/src/concepts/ViewElement__.ts +26 -39
- package/src/concepts/View__.ts +29 -34
- package/src/concepts/WhileStatement__.ts +4 -4
- 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 +281 -2
- package/src/concepts/basics/types/index.ts +1 -0
- package/src/concepts/index__.ts +1 -0
- package/src/generator/genBundleFiles.ts +28 -7
- package/src/generator/genMetaData.ts +22 -13
- package/src/index.ts +1 -1
- package/src/server/createUiTs.ts +1 -0
- package/src/server/getLogics.ts +29 -4
- package/src/server/getMemberIdentifier.ts +4 -0
- package/src/server/getProcesses.ts +68 -0
- package/src/server/naslServer.ts +227 -30
- package/src/server/process2LogicNamespace.ts +29 -19
- package/src/server/translator.ts +39 -1
- package/src/service/creator/errHandles.js +6 -0
- package/src/service/storage/init.ts +97 -86
- package/src/templator/genCreateBlock.ts +35 -26
- package/src/templator/genCurdEditMultipleKeyBlock.ts +29 -21
- package/src/templator/genCurdMultipleKeyBlock.ts +46 -31
- package/src/templator/genEditTableBlock.ts +17 -14
- package/src/templator/genEnumSelectBlock.ts +1 -1
- package/src/templator/genGridViewBlock.ts +30 -25
- package/src/templator/genListViewBlock.ts +10 -7
- package/src/templator/genQueryComponent.ts +28 -27
- package/src/templator/genSelectBlock.ts +9 -8
- package/src/templator/genTableBlock.ts +32 -23
- package/src/templator/genUpdateBlock.ts +35 -25
- 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 +51 -0
|
@@ -416,6 +416,29 @@ export default new Namespace({
|
|
|
416
416
|
}),
|
|
417
417
|
],
|
|
418
418
|
}),
|
|
419
|
+
new Function({
|
|
420
|
+
name: 'AddAll',
|
|
421
|
+
description: '为集合添加多项内容,并返回集合长度',
|
|
422
|
+
params: [
|
|
423
|
+
new Param({
|
|
424
|
+
name: 'list',
|
|
425
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
426
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
427
|
+
}),
|
|
428
|
+
}),
|
|
429
|
+
new Param({
|
|
430
|
+
name: 'addlist',
|
|
431
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
432
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
433
|
+
}),
|
|
434
|
+
}),
|
|
435
|
+
],
|
|
436
|
+
returns: [
|
|
437
|
+
new Return({
|
|
438
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
439
|
+
}),
|
|
440
|
+
],
|
|
441
|
+
}),
|
|
419
442
|
new Function({
|
|
420
443
|
name: 'Insert',
|
|
421
444
|
description: '为集合指定索引插入项(原索引项依次后推)',
|
|
@@ -555,7 +578,7 @@ export default new Namespace({
|
|
|
555
578
|
new Param({
|
|
556
579
|
name: 'digits',
|
|
557
580
|
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
558
|
-
description:
|
|
581
|
+
description: '保留小数位数',
|
|
559
582
|
defaultValue: '2',
|
|
560
583
|
defaultExpression: new NumericLiteral({ value: '2' }),
|
|
561
584
|
}),
|
|
@@ -568,7 +591,7 @@ export default new Namespace({
|
|
|
568
591
|
{ text: 'true', value: 'true' },
|
|
569
592
|
{ text: 'false', value: 'false' },
|
|
570
593
|
],
|
|
571
|
-
description:
|
|
594
|
+
description: '是否显示千分位:true显示,false不显示',
|
|
572
595
|
}),
|
|
573
596
|
],
|
|
574
597
|
returns: [
|
|
@@ -748,5 +771,261 @@ export default new Namespace({
|
|
|
748
771
|
}),
|
|
749
772
|
],
|
|
750
773
|
}),
|
|
774
|
+
new Function({
|
|
775
|
+
name: 'ListSort',
|
|
776
|
+
description: '为集合按规则排序',
|
|
777
|
+
params: [
|
|
778
|
+
new Param({
|
|
779
|
+
name: 'list',
|
|
780
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
781
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
782
|
+
}),
|
|
783
|
+
}),
|
|
784
|
+
new Param({
|
|
785
|
+
name: 'by',
|
|
786
|
+
defaultExpression: new Function({
|
|
787
|
+
name: '',
|
|
788
|
+
description: '',
|
|
789
|
+
params: [
|
|
790
|
+
new Param({
|
|
791
|
+
name: 'item',
|
|
792
|
+
typeAnnotation: null,
|
|
793
|
+
}),
|
|
794
|
+
],
|
|
795
|
+
}),
|
|
796
|
+
}),
|
|
797
|
+
new Param({
|
|
798
|
+
name: 'sort',
|
|
799
|
+
description: '下拉选择升序、降序',
|
|
800
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
|
|
801
|
+
defaultValue: 'asc',
|
|
802
|
+
defaultExpression: new BooleanLiteral({ value: 'true' }),
|
|
803
|
+
options: [
|
|
804
|
+
{ text: 'asc', value: 'true' },
|
|
805
|
+
{ text: 'desc', value: 'false' },
|
|
806
|
+
],
|
|
807
|
+
}),
|
|
808
|
+
],
|
|
809
|
+
returns: [],
|
|
810
|
+
}),
|
|
811
|
+
new Function({
|
|
812
|
+
name: 'ListFind',
|
|
813
|
+
description: '筛选符合条件的第一个项',
|
|
814
|
+
params: [
|
|
815
|
+
new Param({
|
|
816
|
+
name: 'list',
|
|
817
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
818
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
819
|
+
}),
|
|
820
|
+
}),
|
|
821
|
+
new Param({
|
|
822
|
+
name: 'by',
|
|
823
|
+
defaultExpression: new Function({
|
|
824
|
+
name: '',
|
|
825
|
+
description: '',
|
|
826
|
+
params: [
|
|
827
|
+
new Param({
|
|
828
|
+
name: 'item',
|
|
829
|
+
typeAnnotation: null,
|
|
830
|
+
}),
|
|
831
|
+
],
|
|
832
|
+
}),
|
|
833
|
+
}),
|
|
834
|
+
],
|
|
835
|
+
returns: [
|
|
836
|
+
new Return({
|
|
837
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
838
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
839
|
+
}),
|
|
840
|
+
}),
|
|
841
|
+
],
|
|
842
|
+
}),
|
|
843
|
+
new Function({
|
|
844
|
+
name: 'ListFindIndex',
|
|
845
|
+
description: '筛选符合条件的第一个项的索引值',
|
|
846
|
+
params: [
|
|
847
|
+
new Param({
|
|
848
|
+
name: 'list',
|
|
849
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
850
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
851
|
+
}),
|
|
852
|
+
}),
|
|
853
|
+
new Param({
|
|
854
|
+
name: 'by',
|
|
855
|
+
defaultExpression: new Function({
|
|
856
|
+
name: '',
|
|
857
|
+
description: '',
|
|
858
|
+
params: [
|
|
859
|
+
new Param({
|
|
860
|
+
name: 'item',
|
|
861
|
+
typeAnnotation: null,
|
|
862
|
+
}),
|
|
863
|
+
],
|
|
864
|
+
}),
|
|
865
|
+
}),
|
|
866
|
+
],
|
|
867
|
+
returns: [
|
|
868
|
+
new Return({
|
|
869
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
870
|
+
}),
|
|
871
|
+
],
|
|
872
|
+
}),
|
|
873
|
+
new Function({
|
|
874
|
+
name: 'ListFindAll',
|
|
875
|
+
description: '筛选符合条件的所有项',
|
|
876
|
+
params: [
|
|
877
|
+
new Param({
|
|
878
|
+
name: 'list',
|
|
879
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
880
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
881
|
+
}),
|
|
882
|
+
}),
|
|
883
|
+
new Param({
|
|
884
|
+
name: 'by',
|
|
885
|
+
defaultExpression: new Function({
|
|
886
|
+
name: '',
|
|
887
|
+
description: '',
|
|
888
|
+
params: [
|
|
889
|
+
new Param({
|
|
890
|
+
name: 'item',
|
|
891
|
+
typeAnnotation: null,
|
|
892
|
+
}),
|
|
893
|
+
],
|
|
894
|
+
}),
|
|
895
|
+
}),
|
|
896
|
+
],
|
|
897
|
+
returns: [
|
|
898
|
+
new Return({
|
|
899
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
900
|
+
}),
|
|
901
|
+
],
|
|
902
|
+
}),
|
|
903
|
+
new Function({
|
|
904
|
+
name: 'ListReverse',
|
|
905
|
+
description: '为集合反向排序',
|
|
906
|
+
params: [
|
|
907
|
+
new Param({
|
|
908
|
+
name: 'list',
|
|
909
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
910
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
911
|
+
}),
|
|
912
|
+
}),
|
|
913
|
+
],
|
|
914
|
+
returns: [],
|
|
915
|
+
}),
|
|
916
|
+
new Function({
|
|
917
|
+
name: 'ListDistinct',
|
|
918
|
+
description: '为集合去除重复项',
|
|
919
|
+
params: [
|
|
920
|
+
new Param({
|
|
921
|
+
name: 'list',
|
|
922
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
923
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
924
|
+
}),
|
|
925
|
+
}),
|
|
926
|
+
],
|
|
927
|
+
returns: [],
|
|
928
|
+
}),
|
|
929
|
+
new Function({
|
|
930
|
+
name: 'ListSlice',
|
|
931
|
+
description: '将集合按照规则切片,返回切片后的子集合',
|
|
932
|
+
params: [
|
|
933
|
+
new Param({
|
|
934
|
+
name: 'list',
|
|
935
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
936
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
937
|
+
}),
|
|
938
|
+
}),
|
|
939
|
+
new Param({
|
|
940
|
+
name: 'start',
|
|
941
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
942
|
+
}),
|
|
943
|
+
new Param({
|
|
944
|
+
name: 'end',
|
|
945
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
946
|
+
}),
|
|
947
|
+
],
|
|
948
|
+
returns: [
|
|
949
|
+
new Return({
|
|
950
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
951
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
952
|
+
}),
|
|
953
|
+
}),
|
|
954
|
+
],
|
|
955
|
+
}),
|
|
956
|
+
new Function({
|
|
957
|
+
name: 'ListSliceToPageOf',
|
|
958
|
+
description: '将集合按照规则切片,返回切片后的PageOf集合',
|
|
959
|
+
params: [
|
|
960
|
+
new Param({
|
|
961
|
+
name: 'list',
|
|
962
|
+
typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
963
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
964
|
+
}),
|
|
965
|
+
}),
|
|
966
|
+
new Param({
|
|
967
|
+
name: 'page',
|
|
968
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
969
|
+
}),
|
|
970
|
+
new Param({
|
|
971
|
+
name: 'size',
|
|
972
|
+
typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
973
|
+
}),
|
|
974
|
+
],
|
|
975
|
+
returns: [
|
|
976
|
+
new Return({
|
|
977
|
+
typeAnnotation: TypeAnnotation.createGeneric('PageOf', {
|
|
978
|
+
typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
979
|
+
}),
|
|
980
|
+
}),
|
|
981
|
+
],
|
|
982
|
+
}),
|
|
983
|
+
new Function({
|
|
984
|
+
name: 'New',
|
|
985
|
+
description: '根据参数选择的类型,返回该参数的实例化对象',
|
|
986
|
+
typeParams: [
|
|
987
|
+
new TypeParam({
|
|
988
|
+
name: 'T',
|
|
989
|
+
}),
|
|
990
|
+
],
|
|
991
|
+
params: [
|
|
992
|
+
],
|
|
993
|
+
returns: [
|
|
994
|
+
new Return({
|
|
995
|
+
typeAnnotation: TypeAnnotation.createTypeParam('T'),
|
|
996
|
+
}),
|
|
997
|
+
],
|
|
998
|
+
}),
|
|
999
|
+
// new Function({
|
|
1000
|
+
// name: 'CreatePageOf',
|
|
1001
|
+
// description: '将List<T>集合转换为分页集合PageOf<T>',
|
|
1002
|
+
// params: [
|
|
1003
|
+
// new Param({
|
|
1004
|
+
// name: 'list',
|
|
1005
|
+
// typeAnnotation: TypeAnnotation.createGeneric('List', {
|
|
1006
|
+
// typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
1007
|
+
// }),
|
|
1008
|
+
// }),
|
|
1009
|
+
// new Param({
|
|
1010
|
+
// name: 'page',
|
|
1011
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
1012
|
+
// }),
|
|
1013
|
+
// new Param({
|
|
1014
|
+
// name: 'size',
|
|
1015
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
1016
|
+
// }),
|
|
1017
|
+
// new Param({
|
|
1018
|
+
// name: 'total',
|
|
1019
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
|
|
1020
|
+
// }),
|
|
1021
|
+
// ],
|
|
1022
|
+
// returns: [
|
|
1023
|
+
// new Return({
|
|
1024
|
+
// typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
|
|
1025
|
+
// typeArguments: [TypeAnnotation.createTypeParam('T')],
|
|
1026
|
+
// }),
|
|
1027
|
+
// }),
|
|
1028
|
+
// ],
|
|
1029
|
+
// }),
|
|
751
1030
|
],
|
|
752
1031
|
});
|
|
@@ -16,6 +16,7 @@ primitiveTypeList.forEach((typeAnnotation) => {
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
export { collectionStructures, collectionTypeList } from '../stdlib/nasl.collection';
|
|
19
|
+
export { processStructures, processTypeList } from '../stdlib/nasl.process';
|
|
19
20
|
export { uiStructures, uiTypeList } from '../stdlib/nasl.ui';
|
|
20
21
|
export { interfaceTypeList } from '../stdlib/nasl.interface';
|
|
21
22
|
export { interfaceStructures } from '../stdlib/nasl.interface';
|
package/src/concepts/index__.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './StructureProperty__';
|
|
|
8
8
|
export * from './Enum__';
|
|
9
9
|
export * from './EnumItem__';
|
|
10
10
|
export * from './DataElement__';
|
|
11
|
+
export * from './DataSource__';
|
|
11
12
|
export * from './Entity__';
|
|
12
13
|
export * from './EntityProperty__';
|
|
13
14
|
export * from './EntityIndex__';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { App, Module, View, BaseNode, Entity, Structure, Enum, uiStructures, collectionStructures, Logic, Interface, Process } from '../concepts';
|
|
1
|
+
import { App, Module, View, BaseNode, Entity, Structure, Enum, uiStructures, collectionStructures, processStructures, Logic, Interface, Process } from '../concepts';
|
|
2
2
|
import * as utils from '../utils';
|
|
3
3
|
import { genHash, RawOptions } from '.';
|
|
4
4
|
import { compileComponent } from './compileComponent';
|
|
@@ -20,8 +20,8 @@ export interface PageOptions {
|
|
|
20
20
|
hasUserCenter: boolean;
|
|
21
21
|
hasAuth: boolean;
|
|
22
22
|
domainName: string;
|
|
23
|
-
nuimsDomain: string;
|
|
24
23
|
auth: boolean;
|
|
24
|
+
subPage: object;
|
|
25
25
|
documentTitle?: string;
|
|
26
26
|
router: {
|
|
27
27
|
notFound: string;
|
|
@@ -44,8 +44,12 @@ export async function genBundleFiles(app: App,
|
|
|
44
44
|
USER_STATIC_URL: string;
|
|
45
45
|
extendedConfig: string;
|
|
46
46
|
lowcodeDomain: string;
|
|
47
|
+
envLcpDomain: any,
|
|
48
|
+
envNuimsDomain: any,
|
|
47
49
|
appid: string;
|
|
48
50
|
}) {
|
|
51
|
+
const fnNuimsDomain = config?.envNuimsDomain?.[config?.env] || config?.nuimsDomain;
|
|
52
|
+
const fnLowcodeDomain = config?.envLcpDomain?.[config?.env]?.lcpDomain || config?.lowcodeDomain;
|
|
49
53
|
const modules: Module[] = [];
|
|
50
54
|
const views: View[] = [];
|
|
51
55
|
const entities: Entity[] = [];
|
|
@@ -56,7 +60,13 @@ export async function genBundleFiles(app: App,
|
|
|
56
60
|
const processes: Process[] = [];
|
|
57
61
|
|
|
58
62
|
app.views && views.push(...app.views);
|
|
59
|
-
|
|
63
|
+
if (Array.isArray(app.dataSources)) {
|
|
64
|
+
app.dataSources.forEach((dataSource) => {
|
|
65
|
+
if (Array.isArray(dataSource.entities)) {
|
|
66
|
+
entities.push(...dataSource.entities);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
60
70
|
app.structures && structures.push(...app.structures);
|
|
61
71
|
app.enums && enums.push(...app.enums);
|
|
62
72
|
app.logics && logics.push(...app.logics);
|
|
@@ -67,7 +77,6 @@ export async function genBundleFiles(app: App,
|
|
|
67
77
|
|
|
68
78
|
modules.forEach((module: Module) => {
|
|
69
79
|
module.views && views.push(...module.views);
|
|
70
|
-
module.entities && entities.push(...module.entities);
|
|
71
80
|
module.structures && structures.push(...module.structures);
|
|
72
81
|
module.enums && enums.push(...module.enums);
|
|
73
82
|
module.logics && logics.push(...module.logics);
|
|
@@ -130,8 +139,8 @@ export async function genBundleFiles(app: App,
|
|
|
130
139
|
hasUserCenter: app.hasUserCenter,
|
|
131
140
|
hasAuth: app.hasAuth,
|
|
132
141
|
domainName: app.name,
|
|
133
|
-
nuimsDomain: config.nuimsDomain,
|
|
134
142
|
auth: view.auth,
|
|
143
|
+
subPage: view.children,
|
|
135
144
|
documentTitle: app.documentTitle,
|
|
136
145
|
router: {
|
|
137
146
|
notFound: '/',
|
|
@@ -212,6 +221,14 @@ export async function genBundleFiles(app: App,
|
|
|
212
221
|
});
|
|
213
222
|
}
|
|
214
223
|
|
|
224
|
+
if (Array.isArray(processStructures)) {
|
|
225
|
+
const namespace = 'nasl.process';
|
|
226
|
+
processStructures.forEach((node) => {
|
|
227
|
+
const id = `${namespace}.${node.name}`;
|
|
228
|
+
dataTypesMap[id] = node;
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
215
232
|
if (Array.isArray(logics)) {
|
|
216
233
|
allLogics.push(...logics);
|
|
217
234
|
}
|
|
@@ -247,9 +264,11 @@ export async function genBundleFiles(app: App,
|
|
|
247
264
|
},
|
|
248
265
|
},
|
|
249
266
|
extendedConfig: config.extendedConfig,
|
|
250
|
-
lowcodeDomain:
|
|
267
|
+
lowcodeDomain: fnLowcodeDomain,
|
|
251
268
|
tenant: config.tenant,
|
|
252
269
|
env: config.env,
|
|
270
|
+
nuimsDomain: fnNuimsDomain,
|
|
271
|
+
envNuimsDomain: config.envNuimsDomain,
|
|
253
272
|
indexName,
|
|
254
273
|
}, null, 4);
|
|
255
274
|
|
|
@@ -336,6 +355,8 @@ export async function genBundleFiles(app: App,
|
|
|
336
355
|
tenant: data.tenant,
|
|
337
356
|
env: data.env,
|
|
338
357
|
extendedConfig: data.extendedConfig,
|
|
358
|
+
nuimsDomain: data.nuimsDomain,
|
|
359
|
+
envNuimsDomain: data.envNuimsDomain,
|
|
339
360
|
envConfig: {
|
|
340
361
|
lowcodeDomain: data.lowcodeDomain,
|
|
341
362
|
},
|
|
@@ -345,7 +366,7 @@ export async function genBundleFiles(app: App,
|
|
|
345
366
|
|
|
346
367
|
if (config.env === 'dev') {
|
|
347
368
|
// 加载资源js
|
|
348
|
-
const domain =
|
|
369
|
+
const domain = fnLowcodeDomain.slice(fnLowcodeDomain.indexOf('.') + 1);
|
|
349
370
|
const targetUrl = `${location.origin}/empty?url=${domain}&appid=${config.appid}`;
|
|
350
371
|
const str = `
|
|
351
372
|
if(!document.querySelector("iframe[name='iframeEmpty']")){
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { App, View, BaseNode, Module, Interface, Entity, Structure, Enum, uiStructures, collectionStructures, Logic, Process } from '../concepts';
|
|
1
|
+
import { App, View, BaseNode, Module, Interface, Entity, Structure, Enum, uiStructures, collectionStructures, processStructures, Logic, Process, DataSource } from '../concepts';
|
|
2
2
|
|
|
3
3
|
export function genMetaData(app: App,
|
|
4
4
|
config: {
|
|
5
5
|
tenant: string;
|
|
6
6
|
env: string;
|
|
7
7
|
nuimsDomain: string;
|
|
8
|
+
envNuimsDomain: Object;
|
|
8
9
|
STATIC_URL: string;
|
|
9
10
|
USER_STATIC_URL: string;
|
|
10
11
|
extendedConfig: string;
|
|
@@ -12,7 +13,7 @@ export function genMetaData(app: App,
|
|
|
12
13
|
}) {
|
|
13
14
|
const modules: Module[] = [];
|
|
14
15
|
const views: View[] = [];
|
|
15
|
-
const
|
|
16
|
+
const dataSources: DataSource[] = [];
|
|
16
17
|
const structures: Structure[] = [];
|
|
17
18
|
const enums: Enum[] = [];
|
|
18
19
|
const logics: Logic[] = [];
|
|
@@ -20,7 +21,7 @@ export function genMetaData(app: App,
|
|
|
20
21
|
const processes: Process[] = [];
|
|
21
22
|
|
|
22
23
|
const {
|
|
23
|
-
|
|
24
|
+
dataSources: appDataSources = [],
|
|
24
25
|
structures: appStructures = [],
|
|
25
26
|
enums: appEnums = [],
|
|
26
27
|
logics: appLogics = [],
|
|
@@ -28,7 +29,7 @@ export function genMetaData(app: App,
|
|
|
28
29
|
dependencies: appDependencies = [],
|
|
29
30
|
processes: appProcesses = [],
|
|
30
31
|
} = app || {};
|
|
31
|
-
|
|
32
|
+
dataSources.push(...appDataSources);
|
|
32
33
|
structures.push(...appStructures);
|
|
33
34
|
enums.push(...appEnums);
|
|
34
35
|
logics.push(...appLogics);
|
|
@@ -42,14 +43,12 @@ export function genMetaData(app: App,
|
|
|
42
43
|
modules.forEach((module: Module) => {
|
|
43
44
|
const {
|
|
44
45
|
views: moduleViews = [],
|
|
45
|
-
entities: moduleEntities = [],
|
|
46
46
|
structures: moduleStructures = [],
|
|
47
47
|
enums: moduleEnums = [],
|
|
48
48
|
logics: moduleLogics = [],
|
|
49
49
|
interfaces: moduleInterfaces = [],
|
|
50
50
|
} = module;
|
|
51
51
|
views.push(...moduleViews);
|
|
52
|
-
entities.push(...moduleEntities);
|
|
53
52
|
structures.push(...moduleStructures);
|
|
54
53
|
enums.push(...moduleEnums);
|
|
55
54
|
logics.push(...moduleLogics);
|
|
@@ -93,13 +92,15 @@ export function genMetaData(app: App,
|
|
|
93
92
|
enumsMap[name] = enumObj;
|
|
94
93
|
});
|
|
95
94
|
}
|
|
96
|
-
if (Array.isArray(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
if (Array.isArray(dataSources)) {
|
|
96
|
+
dataSources.forEach((dataSource)=> {
|
|
97
|
+
dataSource.entities.forEach((entity) => {
|
|
98
|
+
dataTypes.push(entity);
|
|
99
|
+
const ns = entity.ns;
|
|
100
|
+
if (Array.isArray(ns?.logics)) {
|
|
101
|
+
allLogics.push(...ns.logics);
|
|
102
|
+
}
|
|
103
|
+
});
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
106
|
if (Array.isArray(structures)) {
|
|
@@ -127,6 +128,14 @@ export function genMetaData(app: App,
|
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
130
|
|
|
131
|
+
if (Array.isArray(processStructures)) {
|
|
132
|
+
const namespace = 'nasl.process';
|
|
133
|
+
processStructures.forEach((node) => {
|
|
134
|
+
const id = `${namespace}.${node.name}`;
|
|
135
|
+
dataTypesMap[id] = node;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
130
139
|
if (Array.isArray(logics)) {
|
|
131
140
|
allLogics.push(...logics);
|
|
132
141
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,5 +8,5 @@ export * as genBlock from './templator';
|
|
|
8
8
|
export * as utils from './utils';
|
|
9
9
|
export * from './config';
|
|
10
10
|
export * from './eventBus';
|
|
11
|
-
export { loadApp, loadAppSync } from './service/storage/init';
|
|
11
|
+
export { loadApp, loadAppSync, handleApp } from './service/storage/init';
|
|
12
12
|
import './automate/engine';
|
package/src/server/createUiTs.ts
CHANGED
|
@@ -12,6 +12,7 @@ const naslStdlibMap: any = {
|
|
|
12
12
|
'nasl.langUtil.ts': require('!!raw-loader!../../../file-storage/data/stdlib/nasl.langUtil.ts').default,
|
|
13
13
|
'nasl.annotation.ts': require('!!raw-loader!../../../file-storage/data/stdlib/nasl.annotation.ts').default,
|
|
14
14
|
'nasl.validation.ts': require('!!raw-loader!../../../file-storage/data/stdlib/nasl.validation.ts').default,
|
|
15
|
+
'nasl.process.ts': require('!!raw-loader!../../../file-storage/data/stdlib/nasl.process.ts').default,
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export default function formatUiTs(allComponent: any) {
|
package/src/server/getLogics.ts
CHANGED
|
@@ -24,8 +24,8 @@ function iterator(tree: FakeNode | FakeProcessNode, searchContent: string, fakeN
|
|
|
24
24
|
if (tree.children) {
|
|
25
25
|
tree.children.forEach((c) => {
|
|
26
26
|
const childFakeNode = {};
|
|
27
|
-
if(c.title?.toLowerCase().includes(searchContent) || c.name?.toLowerCase().includes(searchContent))
|
|
28
|
-
fakeNode.children.push({...c});
|
|
27
|
+
if (c.title?.toLowerCase().includes(searchContent) || c.name?.toLowerCase().includes(searchContent))
|
|
28
|
+
fakeNode.children.push({ ...c });
|
|
29
29
|
else if (iterator(c, searchContent, childFakeNode)) {
|
|
30
30
|
fakeNode.children.push(childFakeNode);
|
|
31
31
|
}
|
|
@@ -63,7 +63,15 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
|
|
|
63
63
|
const result = [];
|
|
64
64
|
|
|
65
65
|
if (needAllLogic) {
|
|
66
|
-
const nc =
|
|
66
|
+
const nc: Namespace[] = [];
|
|
67
|
+
if (Array.isArray(app.dataSources)) {
|
|
68
|
+
app.dataSources.forEach((dataSource) => {
|
|
69
|
+
if (Array.isArray(dataSource.entities)) {
|
|
70
|
+
const list = dataSource.entities.map((entity) => entity.ns);
|
|
71
|
+
nc.push(...list);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
67
75
|
nc.map((item) => {
|
|
68
76
|
item.logics = item.logics.filter((logic) => !logic.name.startsWith('import'));
|
|
69
77
|
item.expanded = true;
|
|
@@ -120,12 +128,18 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
|
|
|
120
128
|
});
|
|
121
129
|
tree.expanded = true;
|
|
122
130
|
result.push(tree);
|
|
123
|
-
|
|
124
131
|
const systemTree = new Namespace({
|
|
125
132
|
name: 'category',
|
|
126
133
|
path: `nasl`,
|
|
127
134
|
title: '系统逻辑',
|
|
128
135
|
children: [
|
|
136
|
+
new Namespace({
|
|
137
|
+
name: 'category',
|
|
138
|
+
path: `process`,
|
|
139
|
+
title: '流程逻辑',
|
|
140
|
+
logics: stdlibNamespace.findChild('process').logics,
|
|
141
|
+
expanded: true,
|
|
142
|
+
}),
|
|
129
143
|
new Namespace({
|
|
130
144
|
name: 'category',
|
|
131
145
|
path: `browser`,
|
|
@@ -150,6 +164,8 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
|
|
|
150
164
|
],
|
|
151
165
|
expanded: true,
|
|
152
166
|
});
|
|
167
|
+
if (!app.processes.length)
|
|
168
|
+
systemTree.children.shift();
|
|
153
169
|
|
|
154
170
|
systemTree.expanded = true;
|
|
155
171
|
systemTree.children.forEach((child) => (child.expanded = true));
|
|
@@ -161,6 +177,13 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
|
|
|
161
177
|
path: `nasl`,
|
|
162
178
|
title: '系统逻辑',
|
|
163
179
|
children: [
|
|
180
|
+
new Namespace({
|
|
181
|
+
name: 'category',
|
|
182
|
+
path: `process`,
|
|
183
|
+
title: '流程逻辑',
|
|
184
|
+
logics: stdlibNamespace.findChild('process').logics,
|
|
185
|
+
expanded: true,
|
|
186
|
+
}),
|
|
164
187
|
new Namespace({
|
|
165
188
|
name: 'category',
|
|
166
189
|
path: `configuration`,
|
|
@@ -171,6 +194,8 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
|
|
|
171
194
|
],
|
|
172
195
|
expanded: true,
|
|
173
196
|
});
|
|
197
|
+
if (!app.processes.length)
|
|
198
|
+
systemTree.children.shift();
|
|
174
199
|
|
|
175
200
|
systemTree.expanded = true;
|
|
176
201
|
systemTree.children.forEach((child) => (child.expanded = true));
|
|
@@ -76,6 +76,10 @@ function createType2Annotation(type: string): TypeAnnotation {
|
|
|
76
76
|
typeAnnotation = TypeAnnotation.createReference(types[types.length - 1], {
|
|
77
77
|
typeNamespace: 'nasl.ui',
|
|
78
78
|
});
|
|
79
|
+
} else if (type.startsWith('nasl.process')) {
|
|
80
|
+
typeAnnotation = TypeAnnotation.createReference(types[types.length - 1], {
|
|
81
|
+
typeNamespace: 'nasl.process',
|
|
82
|
+
});
|
|
79
83
|
} else if (type.startsWith('nasl.collection')) {
|
|
80
84
|
typeAnnotation = TypeAnnotation.createGeneric(types[types.length - 1], {
|
|
81
85
|
typeNamespace: 'nasl.collection',
|