@lcap/nasl 3.3.3-beta.5 → 3.3.3-beta.7
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/bak/translator.js +73 -15
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +11 -0
- package/out/common/BaseNode.js +51 -0
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/index.d.ts +1 -0
- package/out/common/index.js +1 -0
- package/out/common/index.js.map +1 -1
- package/out/common/utils.d.ts +2 -0
- package/out/common/utils.js +18 -0
- package/out/common/utils.js.map +1 -0
- package/out/concepts/Abort__.d.ts +2 -2
- package/out/concepts/Abort__.js +6 -2
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/Anchor__.d.ts +2 -2
- package/out/concepts/Anchor__.js +11 -7
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +3 -3
- package/out/concepts/AnonymousFunction__.js +37 -23
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.js +137 -69
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +2 -2
- package/out/concepts/Argument__.js +18 -13
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +2 -2
- package/out/concepts/Assignee__.js +33 -22
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +2 -2
- package/out/concepts/AssignmentLine__.js +3 -2
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +2 -2
- package/out/concepts/Assignment__.js +16 -12
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js +6 -3
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +2 -2
- package/out/concepts/AuthLogicForCallInterface__.js +62 -78
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +5 -8
- package/out/concepts/BackendVariable__.js +23 -18
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.d.ts +4 -7
- package/out/concepts/Backend__.js +16 -11
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.d.ts +2 -2
- package/out/concepts/BatchAssignment__.js +30 -22
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +2 -2
- package/out/concepts/BinaryExpression__.js +30 -18
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +10 -4
- package/out/concepts/BindAttribute__.js +144 -43
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +2 -2
- package/out/concepts/BindDirective__.js +16 -11
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +4 -7
- package/out/concepts/BindEvent__.js +32 -24
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +2 -2
- package/out/concepts/BindStyle__.js +15 -10
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +2 -2
- package/out/concepts/BooleanLiteral__.js +2 -2
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +2 -2
- package/out/concepts/CallAuthInterface__.js +36 -31
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +2 -2
- package/out/concepts/CallConnector__.js +25 -23
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +2 -2
- package/out/concepts/CallFunction__.js +31 -22
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +2 -2
- package/out/concepts/CallInterface__.js +16 -21
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +2 -3
- package/out/concepts/CallLogic__.js +47 -50
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +4 -4
- package/out/concepts/CallQueryComponent__.js +50 -42
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.d.ts +2 -2
- package/out/concepts/Comment__.js +3 -2
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +6 -3
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +6 -3
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +4 -7
- package/out/concepts/ConfigProperty__.js +18 -13
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +6 -3
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +4 -7
- package/out/concepts/Connection__.js +12 -8
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/Connector__.js +30 -15
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.d.ts +3 -3
- package/out/concepts/Constant__.js +18 -13
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +4 -7
- package/out/concepts/DataSource__.js +13 -9
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +3 -3
- package/out/concepts/Destination__.js +35 -29
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.d.ts +2 -2
- package/out/concepts/End__.js +17 -13
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +2 -2
- package/out/concepts/EntityIndex__.js +4 -3
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +2 -2
- package/out/concepts/EntityProperty__.js +22 -15
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +4 -7
- package/out/concepts/Entity__.js +29 -21
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +2 -2
- package/out/concepts/EnumItem__.js +4 -3
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +4 -7
- package/out/concepts/Enum__.js +16 -11
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +6 -3
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +2 -2
- package/out/concepts/ExternalDestination__.js +13 -8
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +2 -2
- package/out/concepts/ForEachStatement__.js +26 -18
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.js +18 -10
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +4 -7
- package/out/concepts/Frontend__.js +37 -21
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.d.ts +3 -3
- package/out/concepts/Function__.js +52 -33
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -2
- package/out/concepts/Identifier__.js +23 -18
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +2 -2
- package/out/concepts/IfStatement__.js +18 -13
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Integration__.js +17 -9
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.d.ts +2 -2
- package/out/concepts/InterfaceParam__.js +12 -8
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +4 -7
- package/out/concepts/Interface__.js +44 -33
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.d.ts +2 -2
- package/out/concepts/JSBlock__.js +3 -2
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.d.ts +2 -2
- package/out/concepts/JavaLogic__.js +6 -2
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +2 -2
- package/out/concepts/LogicItem__.js +7 -3
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +8 -11
- package/out/concepts/Logic__.js +141 -136
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +35 -27
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +2 -2
- package/out/concepts/Match__.js +29 -24
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +2 -2
- package/out/concepts/MemberExpression__.js +34 -27
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +4 -7
- package/out/concepts/MetadataType__.js +23 -15
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.js +6 -3
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.js +6 -3
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/Namespace__.js +66 -33
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +6 -6
- package/out/concepts/NewComposite__.js +95 -82
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +5 -5
- package/out/concepts/NewList__.js +42 -32
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +4 -4
- package/out/concepts/NewMap__.js +51 -41
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.d.ts +2 -2
- package/out/concepts/New__.js +3 -2
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/NullLiteral__.d.ts +2 -2
- package/out/concepts/NullLiteral__.js +2 -2
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +2 -2
- package/out/concepts/NumericLiteral__.js +12 -7
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +2 -2
- package/out/concepts/OqlQueryComponent__.js +22 -17
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.d.ts +8 -11
- package/out/concepts/OverriddenLogic__.js +135 -130
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.d.ts +3 -3
- package/out/concepts/Param__.js +29 -24
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +12 -6
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +2 -2
- package/out/concepts/ProcessElement__.js +92 -66
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.d.ts +2 -1
- package/out/concepts/ProcessOutcome__.js +5 -4
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.d.ts +2 -1
- package/out/concepts/ProcessOutcomes__.js +6 -5
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.d.ts +4 -7
- package/out/concepts/Process__.js +51 -34
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +2 -2
- package/out/concepts/QueryAggregateExpression__.js +8 -5
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +2 -2
- package/out/concepts/QueryFieldExpression__.js +5 -4
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +2 -2
- package/out/concepts/QueryFromExpression__.js +14 -9
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +2 -1
- package/out/concepts/QueryGroupByExpression__.js +12 -8
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +2 -2
- package/out/concepts/QueryJoinExpression__.js +18 -13
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +2 -2
- package/out/concepts/QueryLimitExpression__.js +12 -8
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +2 -2
- package/out/concepts/QueryOrderByExpression__.js +12 -8
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +6 -3
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Return__.d.ts +3 -3
- package/out/concepts/Return__.js +21 -16
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +4 -7
- package/out/concepts/Role__.js +7 -6
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +2 -2
- package/out/concepts/SelectMembers__.js +9 -5
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/Slot__.js +6 -3
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +2 -2
- package/out/concepts/SqlQueryComponent__.js +18 -13
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.d.ts +2 -2
- package/out/concepts/Start__.js +2 -2
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +2 -2
- package/out/concepts/StringInterpolation__.js +13 -8
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +2 -2
- package/out/concepts/StringLiteral__.js +4 -3
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +2 -2
- package/out/concepts/StructureProperty__.js +14 -10
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +4 -7
- package/out/concepts/Structure__.js +22 -14
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +2 -2
- package/out/concepts/SwitchCase__.js +18 -13
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.d.ts +2 -2
- package/out/concepts/SwitchStatement__.js +14 -9
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/TriggerEvent__.js +6 -3
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +4 -7
- package/out/concepts/TriggerLauncher__.js +7 -6
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -2
- package/out/concepts/TypeAnnotation__.js +61 -29
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +2 -2
- package/out/concepts/TypeParam__.js +4 -3
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +2 -2
- package/out/concepts/UnaryExpression__.js +18 -10
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +2 -1
- package/out/concepts/Unparsed__.js +2 -2
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +2 -2
- package/out/concepts/ValidationRule__.js +17 -12
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +5 -8
- package/out/concepts/Variable__.js +23 -18
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +7 -6
- package/out/concepts/ViewElement__.js +139 -101
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +8 -9
- package/out/concepts/View__.js +73 -62
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.d.ts +2 -2
- package/out/concepts/WhileStatement__.js +9 -7
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/manager/diagnostic.d.ts +1 -1
- package/out/manager/diagnostic.js +2 -3
- package/out/manager/diagnostic.js.map +1 -1
- package/out/natural/transformTSCode.d.ts +2 -2
- package/out/server/naslServer.d.ts +46 -55
- package/out/server/naslServer.js +302 -449
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +1 -1
- package/out/server/translator.js.map +1 -1
- package/out/templator/genCreateBlock.js +4 -4
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +6 -6
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +4 -4
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +2 -2
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +4 -4
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/translator/types.d.ts +16 -3
- package/out/translator/utils.d.ts +19 -1
- package/out/translator/utils.js +71 -2
- package/out/translator/utils.js.map +1 -1
- package/out/utils/time-slicing/constant.d.ts +35 -0
- package/out/utils/time-slicing/constant.js +40 -0
- package/out/utils/time-slicing/constant.js.map +1 -0
- package/out/utils/time-slicing/controller.d.ts +53 -0
- package/out/utils/time-slicing/controller.js +280 -0
- package/out/utils/time-slicing/controller.js.map +1 -0
- package/out/utils/time-slicing/index.d.ts +5 -0
- package/out/utils/time-slicing/index.js +26 -0
- package/out/utils/time-slicing/index.js.map +1 -0
- package/out/utils/time-slicing/page-state.d.ts +2 -0
- package/out/utils/time-slicing/page-state.js +14 -0
- package/out/utils/time-slicing/page-state.js.map +1 -0
- package/out/utils/time-slicing/performance.d.ts +11 -0
- package/out/utils/time-slicing/performance.js +51 -0
- package/out/utils/time-slicing/performance.js.map +1 -0
- package/out/utils/time-slicing/runner.d.ts +12 -0
- package/out/utils/time-slicing/runner.js +53 -0
- package/out/utils/time-slicing/runner.js.map +1 -0
- package/out/utils/time-slicing/tool.d.ts +24 -0
- package/out/utils/time-slicing/tool.js +47 -0
- package/out/utils/time-slicing/tool.js.map +1 -0
- package/out/utils/time-slicing/utils.d.ts +62 -0
- package/out/utils/time-slicing/utils.js +47 -0
- package/out/utils/time-slicing/utils.js.map +1 -0
- package/out/utils/time-slicing/wrapper.d.ts +18 -0
- package/out/utils/time-slicing/wrapper.js +55 -0
- package/out/utils/time-slicing/wrapper.js.map +1 -0
- package/out/utils/types.d.ts +7 -0
- package/package.json +1 -1
- package/src/bak/translator.js +75 -16
- package/src/common/BaseNode.ts +67 -6
- package/src/common/index.ts +1 -0
- package/src/common/utils.ts +17 -0
- package/src/concepts/Abort__.ts +12 -3
- package/src/concepts/Anchor__.ts +21 -8
- package/src/concepts/AnonymousFunction__.ts +45 -31
- package/src/concepts/App__.ts +137 -69
- package/src/concepts/Argument__.ts +31 -14
- package/src/concepts/Assignee__.ts +44 -23
- package/src/concepts/AssignmentLine__.ts +13 -3
- package/src/concepts/Assignment__.ts +26 -14
- package/src/concepts/Attribute__.ts +6 -3
- package/src/concepts/AuthLogicForCallInterface__.ts +69 -87
- package/src/concepts/BackendVariable__.ts +34 -19
- package/src/concepts/Backend__.ts +33 -12
- package/src/concepts/BatchAssignment__.ts +41 -23
- package/src/concepts/BinaryExpression__.ts +40 -20
- package/src/concepts/BindAttribute__.ts +151 -49
- package/src/concepts/BindDirective__.ts +25 -12
- package/src/concepts/BindEvent__.ts +43 -32
- package/src/concepts/BindStyle__.ts +24 -11
- package/src/concepts/BooleanLiteral__.ts +11 -3
- package/src/concepts/CallAuthInterface__.ts +45 -34
- package/src/concepts/CallConnector__.ts +34 -26
- package/src/concepts/CallFunction__.ts +34 -23
- package/src/concepts/CallInterface__.ts +25 -30
- package/src/concepts/CallLogic__.ts +60 -67
- package/src/concepts/CallQueryComponent__.ts +60 -52
- package/src/concepts/Comment__.ts +13 -3
- package/src/concepts/CompletionProperty__.ts +6 -3
- package/src/concepts/ConfigGroup__.ts +6 -3
- package/src/concepts/ConfigProperty__.ts +28 -15
- package/src/concepts/Configuration__.ts +6 -3
- package/src/concepts/Connection__.ts +28 -9
- package/src/concepts/Connector__.ts +30 -15
- package/src/concepts/Constant__.ts +28 -14
- package/src/concepts/DataSource__.ts +22 -10
- package/src/concepts/Destination__.ts +45 -36
- package/src/concepts/End__.ts +24 -15
- package/src/concepts/EntityIndex__.ts +13 -4
- package/src/concepts/EntityProperty__.ts +33 -17
- package/src/concepts/Entity__.ts +40 -25
- package/src/concepts/EnumItem__.ts +13 -4
- package/src/concepts/Enum__.ts +27 -13
- package/src/concepts/Event__.ts +6 -3
- package/src/concepts/ExternalDestination__.ts +22 -10
- package/src/concepts/ForEachStatement__.ts +36 -20
- package/src/concepts/FrontendLibrary__.ts +18 -10
- package/src/concepts/Frontend__.ts +48 -22
- package/src/concepts/Function__.ts +60 -36
- package/src/concepts/Identifier__.ts +32 -23
- package/src/concepts/IfStatement__.ts +28 -17
- package/src/concepts/Integration__.ts +17 -9
- package/src/concepts/InterfaceParam__.ts +22 -9
- package/src/concepts/Interface__.ts +55 -37
- package/src/concepts/JSBlock__.ts +12 -3
- package/src/concepts/JavaLogic__.ts +13 -3
- package/src/concepts/LogicItem__.ts +13 -4
- package/src/concepts/Logic__.ts +159 -149
- package/src/concepts/MatchCase__.ts +45 -32
- package/src/concepts/Match__.ts +39 -28
- package/src/concepts/MemberExpression__.ts +43 -28
- package/src/concepts/MetadataType__.ts +34 -16
- package/src/concepts/MsgTriggerEvent__.ts +6 -3
- package/src/concepts/MsgTriggerLauncher__.ts +6 -3
- package/src/concepts/Namespace__.ts +66 -33
- package/src/concepts/NewComposite__.ts +106 -87
- package/src/concepts/NewList__.ts +52 -38
- package/src/concepts/NewMap__.ts +61 -48
- package/src/concepts/New__.ts +13 -3
- package/src/concepts/NullLiteral__.ts +11 -3
- package/src/concepts/NumericLiteral__.ts +21 -8
- package/src/concepts/OqlQueryComponent__.ts +32 -21
- package/src/concepts/OverriddenLogic__.ts +153 -143
- package/src/concepts/Param__.ts +48 -34
- package/src/concepts/ProcessComponent__.ts +12 -6
- package/src/concepts/ProcessElement__.ts +102 -76
- package/src/concepts/ProcessOutcome__.ts +16 -8
- package/src/concepts/ProcessOutcomes__.ts +17 -9
- package/src/concepts/Process__.ts +62 -41
- package/src/concepts/QueryAggregateExpression__.ts +17 -6
- package/src/concepts/QueryFieldExpression__.ts +14 -5
- package/src/concepts/QueryFromExpression__.ts +24 -10
- package/src/concepts/QueryGroupByExpression__.ts +20 -9
- package/src/concepts/QueryJoinExpression__.ts +28 -14
- package/src/concepts/QueryLimitExpression__.ts +22 -9
- package/src/concepts/QueryOrderByExpression__.ts +23 -9
- package/src/concepts/QuerySelectExpression__.ts +6 -3
- package/src/concepts/Return__.ts +31 -17
- package/src/concepts/Role__.ts +17 -8
- package/src/concepts/SelectMembers__.ts +19 -6
- package/src/concepts/Slot__.ts +6 -3
- package/src/concepts/SqlQueryComponent__.ts +28 -14
- package/src/concepts/Start__.ts +11 -3
- package/src/concepts/StringInterpolation__.ts +16 -8
- package/src/concepts/StringLiteral__.ts +13 -4
- package/src/concepts/StructureProperty__.ts +24 -11
- package/src/concepts/Structure__.ts +33 -16
- package/src/concepts/SwitchCase__.ts +28 -17
- package/src/concepts/SwitchStatement__.ts +23 -10
- package/src/concepts/TriggerEvent__.ts +6 -3
- package/src/concepts/TriggerLauncher__.ts +17 -7
- package/src/concepts/TypeAnnotation__.ts +46 -30
- package/src/concepts/TypeParam__.ts +13 -4
- package/src/concepts/UnaryExpression__.ts +28 -12
- package/src/concepts/Unparsed__.ts +10 -3
- package/src/concepts/ValidationRule__.ts +27 -20
- package/src/concepts/Variable__.ts +34 -19
- package/src/concepts/ViewElement__.ts +165 -125
- package/src/concepts/View__.ts +108 -89
- package/src/concepts/WhileStatement__.ts +19 -10
- package/src/concepts/types__.ts +1 -1
- package/src/manager/diagnostic.ts +3 -4
- package/src/server/naslServer.ts +676 -729
- package/src/server/translator.ts +1 -1
- package/src/templator/genCreateBlock.ts +4 -4
- package/src/templator/genCurdEditMultipleKeyBlock.ts +6 -6
- package/src/templator/genCurdMultipleKeyBlock.ts +4 -4
- package/src/templator/genEditTableBlock.ts +2 -2
- package/src/templator/genUpdateBlock.ts +4 -4
- package/src/translator/types.ts +20 -5
- package/src/translator/utils.ts +78 -4
- package/src/utils/time-slicing/constant.ts +37 -0
- package/src/utils/time-slicing/controller.ts +342 -0
- package/src/utils/time-slicing/index.ts +6 -0
- package/src/utils/time-slicing/page-state.ts +12 -0
- package/src/utils/time-slicing/performance.ts +56 -0
- package/src/utils/time-slicing/runner.ts +54 -0
- package/src/utils/time-slicing/tool.ts +45 -0
- package/src/utils/time-slicing/utils.ts +90 -0
- package/src/utils/time-slicing/wrapper.ts +58 -0
- package/src/utils/types.ts +9 -0
- package/test/concepts/anonymous-function/__snapshots__/toEmbeddedTS.spec.ts.snap +8 -0
- package/test/concepts/anonymous-function/__snapshots__/toJS.spec.ts.snap +3 -0
- package/test/concepts/anonymous-function/__snapshots__/toVue.spec.ts.snap +6 -0
- package/test/concepts/anonymous-function/constant.ts +5 -0
- package/test/concepts/anonymous-function/fixtures/simple.json +85 -0
- package/test/concepts/anonymous-function/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/anonymous-function/toJS.spec.ts +14 -0
- package/test/concepts/anonymous-function/toVue.spec.ts +14 -0
- package/test/concepts/assignment/__snapshots__/toEmbeddedTS.spec.ts.snap +21 -0
- package/test/concepts/assignment/__snapshots__/toJS.spec.ts.snap +9 -0
- package/test/concepts/assignment/__snapshots__/toVue.spec.ts.snap +21 -0
- package/test/concepts/assignment/constant.ts +5 -0
- package/test/concepts/assignment/fixtures/both-space.json +4 -0
- package/test/concepts/assignment/fixtures/left-space.json +14 -0
- package/test/concepts/assignment/fixtures/right-space.json +8 -0
- package/test/concepts/assignment/fixtures/simple.json +12 -0
- package/test/concepts/assignment/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/assignment/toJS.spec.ts +14 -0
- package/test/concepts/assignment/toVue.spec.ts +14 -0
- package/test/concepts/batch-assignment/__snapshots__/toEmbeddedTS.spec.ts.snap +28 -0
- package/test/concepts/batch-assignment/__snapshots__/toJS.spec.ts.snap +13 -0
- package/test/concepts/batch-assignment/__snapshots__/toVue.spec.ts.snap +14 -0
- package/test/concepts/batch-assignment/constant.ts +5 -0
- package/test/concepts/batch-assignment/fixtures/muli-var-muli-value.json +144 -0
- package/test/concepts/batch-assignment/fixtures/simple-var-simple-value.json +36 -0
- package/test/concepts/batch-assignment/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/batch-assignment/toJS.spec.ts +14 -0
- package/test/concepts/batch-assignment/toVue.spec.ts +14 -0
- package/test/concepts/binary-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +25 -0
- package/test/concepts/binary-expression/__snapshots__/toJS.spec.ts.snap +17 -0
- package/test/concepts/binary-expression/__snapshots__/toVue.spec.ts.snap +19 -0
- package/test/concepts/binary-expression/constant.ts +5 -0
- package/test/concepts/binary-expression/fixtures/constant-nested.json +36 -0
- package/test/concepts/binary-expression/fixtures/constant-simple.json +12 -0
- package/test/concepts/binary-expression/fixtures/variable-nested.json +69 -0
- package/test/concepts/binary-expression/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/binary-expression/toJS.spec.ts +14 -0
- package/test/concepts/binary-expression/toVue.spec.ts +14 -0
- package/test/concepts/boolean-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/boolean-literal/toJS.spec.ts +2 -2
- package/test/concepts/boolean-literal/toVue.spec.ts +2 -2
- package/test/concepts/call-function/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-interface/__snapshots__/toEmbeddedTS.spec.ts.snap +6 -3
- package/test/concepts/call-interface/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +3 -3
- package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
- package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +2 -1
- package/test/concepts/call-logic/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/data-source/__snapshots__/toEmbeddedTS.spec.ts.snap +8 -0
- package/test/concepts/data-source/__snapshots__/toEmbeddedTSFile.spec.ts.snap +12 -0
- package/test/concepts/data-source/constant.ts +5 -0
- package/test/concepts/data-source/fixtures/normal.json +289 -0
- package/test/concepts/data-source/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/data-source/toEmbeddedTSFile.spec.ts +16 -0
- package/test/concepts/entity/__snapshots__/toEmbeddedTS.spec.ts.snap +74 -0
- package/test/concepts/entity/__snapshots__/toEmbeddedTSFile.spec.ts.snap +3 -0
- package/test/concepts/entity/constant.ts +5 -0
- package/test/concepts/entity/fixtures/normal.json +469 -0
- package/test/concepts/entity/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/entity/toEmbeddedTSFile.spec.ts +14 -0
- package/test/concepts/identifier/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/identifier/toJS.spec.ts +2 -2
- package/test/concepts/identifier/toVue.spec.ts +2 -2
- package/test/concepts/match/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/member-expression/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/member-expression/toVue.spec.ts +2 -2
- package/test/concepts/null-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/null-literal/toJS.spec.ts +2 -2
- package/test/concepts/null-literal/toVue.spec.ts +2 -2
- package/test/concepts/numeric-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/numeric-literal/toJS.spec.ts +2 -2
- package/test/concepts/numeric-literal/toVue.spec.ts +2 -2
- package/test/concepts/string-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/string-literal/toJS.spec.ts +2 -2
- package/test/concepts/string-literal/toVue.spec.ts +2 -2
- package/test/concepts/validation-rule/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/validation-rule/validation-rule.spec.ts +2 -1
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +0 -2
- package/test/concepts/view-element/toEmbeddedTS.spec.ts +2 -1
- package/test/time-slicing/runner.spec.ts +28 -0
- package/test/time-slicing/time-slicing-nodejs.spec.ts +27 -0
- package/test/time-slicing/utils.ts +7 -0
- package/test/time-slicing/wrapper.spec.ts +92 -0
- package/ts-worker/lib/tsserver.js +10 -1
- package/ts-worker/package.json +1 -0
- package/ts-worker/src/index.js +13 -12
- package/ts-worker/webpack.config.js +1 -1
- package/.nyc_output/f2d14ce8-876a-4dc0-9aaf-e51d08d081ca.json +0 -1
- package/.nyc_output/processinfo/f2d14ce8-876a-4dc0-9aaf-e51d08d081ca.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -446
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/src/automate/engine/index.html +0 -116
- package/coverage/src/automate/engine/utils.js.html +0 -1414
- package/coverage/src/bak/index.html +0 -116
- package/coverage/src/bak/translator.js.html +0 -619
- package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +0 -175
- package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +0 -169
- package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +0 -1243
- package/coverage/src/breakpoint/generator/CallbackNode.ts.html +0 -145
- package/coverage/src/breakpoint/generator/index.html +0 -176
- package/coverage/src/breakpoint/generator/index.ts.html +0 -508
- package/coverage/src/breakpoint/index.html +0 -116
- package/coverage/src/breakpoint/index.ts.html +0 -94
- package/coverage/src/breakpoint/shared/constants.ts.html +0 -430
- package/coverage/src/breakpoint/shared/index.html +0 -176
- package/coverage/src/breakpoint/shared/index.ts.html +0 -94
- package/coverage/src/breakpoint/shared/operations.ts.html +0 -160
- package/coverage/src/breakpoint/shared/socket.ts.html +0 -1225
- package/coverage/src/breakpoint/shared/utils.ts.html +0 -961
- package/coverage/src/breakpoint/store/core.ts.html +0 -1600
- package/coverage/src/breakpoint/store/dock.ts.html +0 -583
- package/coverage/src/breakpoint/store/index.html +0 -146
- package/coverage/src/breakpoint/store/index.ts.html +0 -91
- package/coverage/src/common/BaseNode.ts.html +0 -3868
- package/coverage/src/common/Command.ts.html +0 -310
- package/coverage/src/common/EventEmitter.ts.html +0 -370
- package/coverage/src/common/Messager.ts.html +0 -820
- package/coverage/src/common/asyncFuncMap.ts.html +0 -127
- package/coverage/src/common/index.html +0 -191
- package/coverage/src/common/index.ts.html +0 -94
- package/coverage/src/concepts/Abort__.ts.html +0 -328
- package/coverage/src/concepts/Anchor__.ts.html +0 -604
- package/coverage/src/concepts/AnonymousFunction__.ts.html +0 -1951
- package/coverage/src/concepts/App__.ts.html +0 -13252
- package/coverage/src/concepts/Argument__.ts.html +0 -910
- package/coverage/src/concepts/Assignee__.ts.html +0 -2236
- package/coverage/src/concepts/AssignmentLine__.ts.html +0 -409
- package/coverage/src/concepts/Assignment__.ts.html +0 -1078
- package/coverage/src/concepts/Attribute__.ts.html +0 -733
- package/coverage/src/concepts/AuthInterface__.ts.html +0 -367
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +0 -1984
- package/coverage/src/concepts/AuthLogic__.ts.html +0 -781
- package/coverage/src/concepts/BackendVariable__.ts.html +0 -1483
- package/coverage/src/concepts/Backend__.ts.html +0 -1165
- package/coverage/src/concepts/BatchAssignment__.ts.html +0 -3250
- package/coverage/src/concepts/BinaryExpression__.ts.html +0 -1336
- package/coverage/src/concepts/BindAttribute__.ts.html +0 -3679
- package/coverage/src/concepts/BindDirective__.ts.html +0 -1921
- package/coverage/src/concepts/BindEvent__.ts.html +0 -3232
- package/coverage/src/concepts/BindStyle__.ts.html +0 -1612
- package/coverage/src/concepts/BooleanLiteral__.ts.html +0 -403
- package/coverage/src/concepts/CallAuthInterface__.ts.html +0 -1615
- package/coverage/src/concepts/CallConnector__.ts.html +0 -868
- package/coverage/src/concepts/CallFunction__.ts.html +0 -1966
- package/coverage/src/concepts/CallInterface__.ts.html +0 -2614
- package/coverage/src/concepts/CallLogic__.ts.html +0 -4420
- package/coverage/src/concepts/CallQueryComponent__.ts.html +0 -5308
- package/coverage/src/concepts/Comment__.ts.html +0 -376
- package/coverage/src/concepts/CompletionProperty__.ts.html +0 -925
- package/coverage/src/concepts/ConfigGroup__.ts.html +0 -1105
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +0 -424
- package/coverage/src/concepts/ConfigProperty__.ts.html +0 -1348
- package/coverage/src/concepts/Configuration__.ts.html +0 -1027
- package/coverage/src/concepts/Connection__.ts.html +0 -1360
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +0 -595
- package/coverage/src/concepts/Connector__.ts.html +0 -4255
- package/coverage/src/concepts/Constant__.ts.html +0 -913
- package/coverage/src/concepts/DataSource__.ts.html +0 -1771
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +0 -331
- package/coverage/src/concepts/Destination__.ts.html +0 -2563
- package/coverage/src/concepts/End__.ts.html +0 -433
- package/coverage/src/concepts/EntityIndex__.ts.html +0 -787
- package/coverage/src/concepts/EntityProperty__.ts.html +0 -2620
- package/coverage/src/concepts/Entity__.ts.html +0 -2872
- package/coverage/src/concepts/EnumItem__.ts.html +0 -535
- package/coverage/src/concepts/Enum__.ts.html +0 -1192
- package/coverage/src/concepts/Event__.ts.html +0 -1084
- package/coverage/src/concepts/ExternalDestination__.ts.html +0 -1033
- package/coverage/src/concepts/ForEachStatement__.ts.html +0 -1819
- package/coverage/src/concepts/FrontendLibrary__.ts.html +0 -1711
- package/coverage/src/concepts/FrontendVariable__.ts.html +0 -292
- package/coverage/src/concepts/Frontend__.ts.html +0 -3961
- package/coverage/src/concepts/Function__.ts.html +0 -3514
- package/coverage/src/concepts/Identifier__.ts.html +0 -1057
- package/coverage/src/concepts/IfStatement__.ts.html +0 -1486
- package/coverage/src/concepts/Integration__.ts.html +0 -1228
- package/coverage/src/concepts/InterfaceParam__.ts.html +0 -1087
- package/coverage/src/concepts/Interface__.ts.html +0 -3394
- package/coverage/src/concepts/JSBlock__.ts.html +0 -406
- package/coverage/src/concepts/JavaLogic__.ts.html +0 -460
- package/coverage/src/concepts/LogicItem__.ts.html +0 -1144
- package/coverage/src/concepts/Logic__.ts.html +0 -7078
- package/coverage/src/concepts/MatchCase__.ts.html +0 -2641
- package/coverage/src/concepts/Match__.ts.html +0 -2323
- package/coverage/src/concepts/MemberExpression__.ts.html +0 -1666
- package/coverage/src/concepts/MicroApp__.ts.html +0 -436
- package/coverage/src/concepts/Module__.ts.html +0 -9220
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +0 -1045
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +0 -1018
- package/coverage/src/concepts/Namespace__.ts.html +0 -7942
- package/coverage/src/concepts/NewComposite__.ts.html +0 -4684
- package/coverage/src/concepts/NewList__.ts.html +0 -1567
- package/coverage/src/concepts/NewMap__.ts.html +0 -2275
- package/coverage/src/concepts/New__.ts.html +0 -289
- package/coverage/src/concepts/NullLiteral__.ts.html +0 -349
- package/coverage/src/concepts/NumericLiteral__.ts.html +0 -661
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +0 -1123
- package/coverage/src/concepts/OverriddenLogic__.ts.html +0 -6817
- package/coverage/src/concepts/Param__.ts.html +0 -1609
- package/coverage/src/concepts/Point__.ts.html +0 -331
- package/coverage/src/concepts/ProcessComponent__.ts.html +0 -1666
- package/coverage/src/concepts/ProcessElement__.ts.html +0 -5884
- package/coverage/src/concepts/ProcessOutcome__.ts.html +0 -352
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +0 -343
- package/coverage/src/concepts/Process__.ts.html +0 -4768
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +0 -568
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +0 -583
- package/coverage/src/concepts/QueryFromExpression__.ts.html +0 -910
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +0 -559
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +0 -1567
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +0 -637
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +0 -679
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +0 -1714
- package/coverage/src/concepts/Rect__.ts.html +0 -373
- package/coverage/src/concepts/Return__.ts.html +0 -1258
- package/coverage/src/concepts/Role__.ts.html +0 -601
- package/coverage/src/concepts/SelectMembers__.ts.html +0 -1246
- package/coverage/src/concepts/Slot__.ts.html +0 -628
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +0 -964
- package/coverage/src/concepts/Start__.ts.html +0 -304
- package/coverage/src/concepts/StringInterpolation__.ts.html +0 -1078
- package/coverage/src/concepts/StringLiteral__.ts.html +0 -490
- package/coverage/src/concepts/StructureProperty__.ts.html +0 -1102
- package/coverage/src/concepts/Structure__.ts.html +0 -2053
- package/coverage/src/concepts/SwitchCase__.ts.html +0 -1063
- package/coverage/src/concepts/SwitchStatement__.ts.html +0 -826
- package/coverage/src/concepts/Theme__.ts.html +0 -358
- package/coverage/src/concepts/Transactional__.ts.html +0 -628
- package/coverage/src/concepts/TriggerEvent__.ts.html +0 -1012
- package/coverage/src/concepts/TriggerLauncher__.ts.html +0 -775
- package/coverage/src/concepts/TypeAnnotation__.ts.html +0 -3583
- package/coverage/src/concepts/TypeParam__.ts.html +0 -301
- package/coverage/src/concepts/UnaryExpression__.ts.html +0 -640
- package/coverage/src/concepts/Unparsed__.ts.html +0 -382
- package/coverage/src/concepts/UseComponent__.ts.html +0 -331
- package/coverage/src/concepts/ValidationRule__.ts.html +0 -1840
- package/coverage/src/concepts/Variable__.ts.html +0 -1435
- package/coverage/src/concepts/ViewBlock__.ts.html +0 -352
- package/coverage/src/concepts/ViewComponent__.ts.html +0 -4180
- package/coverage/src/concepts/ViewElement__.ts.html +0 -8557
- package/coverage/src/concepts/View__.ts.html +0 -8278
- package/coverage/src/concepts/WhileStatement__.ts.html +0 -991
- package/coverage/src/concepts/basics/stdlib/index.html +0 -341
- package/coverage/src/concepts/basics/stdlib/index.ts.html +0 -208
- package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +0 -565
- package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +0 -517
- package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +0 -226
- package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +0 -172
- package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +0 -214
- package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +0 -145
- package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +0 -589
- package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +0 -214
- package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +0 -229
- package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +0 -268
- package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +0 -1999
- package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +0 -3259
- package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +0 -6787
- package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +0 -1768
- package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +0 -163
- package/coverage/src/concepts/basics/types/coreTypeList.ts.html +0 -121
- package/coverage/src/concepts/basics/types/index.html +0 -131
- package/coverage/src/concepts/basics/types/index.ts.html +0 -160
- package/coverage/src/concepts/index.html +0 -1961
- package/coverage/src/concepts/index.ts.html +0 -103
- package/coverage/src/concepts/index__.ts.html +0 -451
- package/coverage/src/config.ts.html +0 -325
- package/coverage/src/decorators/index.html +0 -131
- package/coverage/src/decorators/index.ts.html +0 -574
- package/coverage/src/decorators/promise.ts.html +0 -169
- package/coverage/src/eventBus.ts.html +0 -100
- package/coverage/src/generator/compileComponent.ts.html +0 -142
- package/coverage/src/generator/genBundleFiles.ts.html +0 -1828
- package/coverage/src/generator/genHash.ts.html +0 -124
- package/coverage/src/generator/genMetaData.ts.html +0 -1042
- package/coverage/src/generator/genReleaseBody.ts.html +0 -1282
- package/coverage/src/generator/icestark.ts.html +0 -220
- package/coverage/src/generator/index.html +0 -266
- package/coverage/src/generator/index.ts.html +0 -106
- package/coverage/src/generator/microApp.ts.html +0 -172
- package/coverage/src/generator/permission.ts.html +0 -1036
- package/coverage/src/generator/qiankun.ts.html +0 -232
- package/coverage/src/generator/styleReplacer.ts.html +0 -199
- package/coverage/src/index.html +0 -146
- package/coverage/src/index.ts.html +0 -121
- package/coverage/src/manager/diagnostic.ts.html +0 -442
- package/coverage/src/manager/index.html +0 -131
- package/coverage/src/manager/stepRecorder.ts.html +0 -457
- package/coverage/src/sentry/index.html +0 -116
- package/coverage/src/sentry/index.ts.html +0 -676
- package/coverage/src/server/createUiTs.ts.html +0 -919
- package/coverage/src/server/entity2LogicNamespace.ts.html +0 -1294
- package/coverage/src/server/event.js.html +0 -526
- package/coverage/src/server/extendBaseNode.ts.html +0 -1762
- package/coverage/src/server/formatTsUtils.ts.html +0 -2689
- package/coverage/src/server/getConnector.ts.html +0 -316
- package/coverage/src/server/getExtensionModules.ts.html +0 -178
- package/coverage/src/server/getFunctions.ts.html +0 -133
- package/coverage/src/server/getInterfaces.ts.html +0 -229
- package/coverage/src/server/getLogging.ts.html +0 -100
- package/coverage/src/server/getLogics.ts.html +0 -1363
- package/coverage/src/server/getMemberIdentifier.ts.html +0 -1606
- package/coverage/src/server/getProcessComponents.ts.html +0 -112
- package/coverage/src/server/getProcesses.ts.html +0 -2023
- package/coverage/src/server/getValidates.ts.html +0 -115
- package/coverage/src/server/index.html +0 -401
- package/coverage/src/server/index.ts.html +0 -229
- package/coverage/src/server/naslServer.ts.html +0 -14290
- package/coverage/src/server/naslStdlibMap.ts.html +0 -241
- package/coverage/src/server/process2LogicNamespace.ts.html +0 -454
- package/coverage/src/server/translator.ts.html +0 -2566
- package/coverage/src/service/creator/add.configs.js.html +0 -379
- package/coverage/src/service/creator/errHandles.js.html +0 -322
- package/coverage/src/service/creator/index.html +0 -146
- package/coverage/src/service/creator/index.js.html +0 -352
- package/coverage/src/service/datasource/api.js.html +0 -118
- package/coverage/src/service/datasource/index.html +0 -131
- package/coverage/src/service/datasource/index.js.html +0 -103
- package/coverage/src/service/logic/api.js.html +0 -109
- package/coverage/src/service/logic/index.html +0 -131
- package/coverage/src/service/logic/index.js.html +0 -103
- package/coverage/src/service/storage/api.js.html +0 -202
- package/coverage/src/service/storage/index.html +0 -206
- package/coverage/src/service/storage/index.ts.html +0 -103
- package/coverage/src/service/storage/init.ts.html +0 -2710
- package/coverage/src/service/storage/jsoner.ts.html +0 -502
- package/coverage/src/service/storage/map.ts.html +0 -256
- package/coverage/src/service/storage/service.ts.html +0 -331
- package/coverage/src/service/storage/storagePoint.ts.html +0 -304
- package/coverage/src/templator/genCallComponentLogic.ts.html +0 -163
- package/coverage/src/templator/genCreateBlock.ts.html +0 -1093
- package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +0 -1609
- package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +0 -2254
- package/coverage/src/templator/genEditTableBlock.ts.html +0 -955
- package/coverage/src/templator/genEnumSelectBlock.ts.html +0 -178
- package/coverage/src/templator/genGetBlock.ts.html +0 -451
- package/coverage/src/templator/genGridViewBlock.ts.html +0 -1114
- package/coverage/src/templator/genListViewBlock.ts.html +0 -475
- package/coverage/src/templator/genQueryComponent.ts.html +0 -1207
- package/coverage/src/templator/genSelectBlock.ts.html +0 -1243
- package/coverage/src/templator/genTableBlock.ts.html +0 -910
- package/coverage/src/templator/genUpdateBlock.ts.html +0 -1192
- package/coverage/src/templator/index.html +0 -326
- package/coverage/src/templator/index.ts.html +0 -154
- package/coverage/src/templator/utils.ts.html +0 -1861
- package/coverage/src/translator/constant.ts.html +0 -106
- package/coverage/src/translator/index.html +0 -146
- package/coverage/src/translator/index.ts.html +0 -94
- package/coverage/src/translator/utils.ts.html +0 -397
- package/coverage/src/utils/cookie.ts.html +0 -265
- package/coverage/src/utils/env.ts.html +0 -91
- package/coverage/src/utils/index.html +0 -236
- package/coverage/src/utils/index.ts.html +0 -655
- package/coverage/src/utils/logger.ts.html +0 -145
- package/coverage/src/utils/sortTsString.ts.html +0 -187
- package/coverage/src/utils/string.ts.html +0 -400
- package/coverage/src/utils/time-slicing.ts.html +0 -412
- package/coverage/src/utils/traverse.ts.html +0 -568
- package/coverage/src/utils/window.ts.html +0 -112
- package/out/utils/time-slicing.d.ts +0 -41
- package/out/utils/time-slicing.js +0 -82
- package/out/utils/time-slicing.js.map +0 -1
- package/src/utils/time-slicing.ts +0 -111
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach, returnOrigin } from '../utils/time-slicing';
|
|
1
2
|
import Namespace from './Namespace__';
|
|
2
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
TranslatorState,
|
|
5
|
+
shiftState,
|
|
6
|
+
withSourceMap,
|
|
7
|
+
indent,
|
|
8
|
+
createCompilerState,
|
|
9
|
+
withSourceMapGenerator,
|
|
10
|
+
withGenerator,
|
|
11
|
+
TranslatorGenerator,
|
|
12
|
+
} from '../translator';
|
|
3
13
|
import { ElementToVueOptions } from './ViewElement__';
|
|
4
14
|
import asyncFuncMap from '../common/asyncFuncMap';
|
|
5
15
|
|
|
@@ -805,9 +815,12 @@ export class Function extends BaseNode {
|
|
|
805
815
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
806
816
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
807
817
|
params.index = index;
|
|
808
|
-
} else
|
|
809
|
-
|
|
810
|
-
(
|
|
818
|
+
} else {
|
|
819
|
+
const q = (t as any)[parentKey];
|
|
820
|
+
if ((q.__v_raw || q) === n) {
|
|
821
|
+
params.index = 0;
|
|
822
|
+
(this as any)[parentKey] = undefined;
|
|
823
|
+
}
|
|
811
824
|
}
|
|
812
825
|
}
|
|
813
826
|
return params;
|
|
@@ -858,9 +871,12 @@ export class Function extends BaseNode {
|
|
|
858
871
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
859
872
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
860
873
|
params.index = index;
|
|
861
|
-
} else
|
|
862
|
-
|
|
863
|
-
(
|
|
874
|
+
} else {
|
|
875
|
+
const q = (t as any)[parentKey];
|
|
876
|
+
if ((q.__v_raw || q) === n) {
|
|
877
|
+
params.index = 0;
|
|
878
|
+
(this as any)[parentKey] = undefined;
|
|
879
|
+
}
|
|
864
880
|
}
|
|
865
881
|
}
|
|
866
882
|
return params;
|
|
@@ -911,9 +927,12 @@ export class Function extends BaseNode {
|
|
|
911
927
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
912
928
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
913
929
|
params.index = index;
|
|
914
|
-
} else
|
|
915
|
-
|
|
916
|
-
(
|
|
930
|
+
} else {
|
|
931
|
+
const q = (t as any)[parentKey];
|
|
932
|
+
if ((q.__v_raw || q) === n) {
|
|
933
|
+
params.index = 0;
|
|
934
|
+
(this as any)[parentKey] = undefined;
|
|
935
|
+
}
|
|
917
936
|
}
|
|
918
937
|
}
|
|
919
938
|
return params;
|
|
@@ -964,9 +983,12 @@ export class Function extends BaseNode {
|
|
|
964
983
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
965
984
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
966
985
|
params.index = index;
|
|
967
|
-
} else
|
|
968
|
-
|
|
969
|
-
(
|
|
986
|
+
} else {
|
|
987
|
+
const q = (t as any)[parentKey];
|
|
988
|
+
if ((q.__v_raw || q) === n) {
|
|
989
|
+
params.index = 0;
|
|
990
|
+
(this as any)[parentKey] = undefined;
|
|
991
|
+
}
|
|
970
992
|
}
|
|
971
993
|
}
|
|
972
994
|
return params;
|
|
@@ -1017,9 +1039,12 @@ export class Function extends BaseNode {
|
|
|
1017
1039
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1018
1040
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1019
1041
|
params.index = index;
|
|
1020
|
-
} else
|
|
1021
|
-
|
|
1022
|
-
(
|
|
1042
|
+
} else {
|
|
1043
|
+
const q = (t as any)[parentKey];
|
|
1044
|
+
if ((q.__v_raw || q) === n) {
|
|
1045
|
+
params.index = 0;
|
|
1046
|
+
(this as any)[parentKey] = undefined;
|
|
1047
|
+
}
|
|
1023
1048
|
}
|
|
1024
1049
|
}
|
|
1025
1050
|
return params;
|
|
@@ -1073,32 +1098,29 @@ export class Function extends BaseNode {
|
|
|
1073
1098
|
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
1074
1099
|
}
|
|
1075
1100
|
|
|
1076
|
-
@
|
|
1077
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
1101
|
+
@withSourceMapGenerator
|
|
1102
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
1103
|
+
const self = this;
|
|
1078
1104
|
let code = '';
|
|
1079
|
-
if (
|
|
1105
|
+
if (self.returnExpression) {
|
|
1080
1106
|
code += `(`;
|
|
1081
|
-
|
|
1082
|
-
code += param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1083
|
-
if (index !==
|
|
1107
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
1108
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1109
|
+
if (index !== self.params.length - 1) code += ', ';
|
|
1084
1110
|
});
|
|
1085
1111
|
code += `)`;
|
|
1086
|
-
if (
|
|
1112
|
+
if (self.returns.length) {
|
|
1087
1113
|
code += ': ';
|
|
1088
|
-
code +=
|
|
1114
|
+
code += yield* self.returns[0].typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
1089
1115
|
}
|
|
1090
1116
|
code += ` => (`;
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
code +=
|
|
1094
|
-
this.returnExpression.toEmbeddedTS &&
|
|
1095
|
-
this.returnExpression.toEmbeddedTS(shiftState(state, code, { tabSize: state.tabSize + 1 }));
|
|
1117
|
+
if (self.returnExpression?.toEmbeddedTS) {
|
|
1118
|
+
code += yield* self.returnExpression.toEmbeddedTS(shiftState(state, code, { tabSize: state.tabSize + 1 }));
|
|
1096
1119
|
}
|
|
1097
1120
|
code += `${indent(state.tabSize)})`;
|
|
1098
1121
|
} else {
|
|
1099
1122
|
code += '__IDENTIFIER__';
|
|
1100
1123
|
}
|
|
1101
|
-
|
|
1102
1124
|
return code;
|
|
1103
1125
|
}
|
|
1104
1126
|
|
|
@@ -1163,15 +1185,17 @@ export class Function extends BaseNode {
|
|
|
1163
1185
|
return code;
|
|
1164
1186
|
}
|
|
1165
1187
|
|
|
1166
|
-
|
|
1188
|
+
@withGenerator
|
|
1189
|
+
*toEmbeddedTSDefinition(state = createCompilerState()): TranslatorGenerator {
|
|
1190
|
+
const self = this;
|
|
1167
1191
|
let code = '(';
|
|
1168
|
-
|
|
1169
|
-
code += param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1170
|
-
if (index !==
|
|
1192
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
1193
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1194
|
+
if (index !== self.params.length - 1) code += ', ';
|
|
1171
1195
|
});
|
|
1172
1196
|
code += `) => (`;
|
|
1173
|
-
if (
|
|
1174
|
-
code +=
|
|
1197
|
+
if (self.returns.length) {
|
|
1198
|
+
code += yield* self.returns[0].typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
1175
1199
|
} else {
|
|
1176
1200
|
code += 'any';
|
|
1177
1201
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
withSourceMap,
|
|
5
|
+
createCompilerState,
|
|
6
|
+
withSourceMapGenerator,
|
|
7
|
+
withGenerator,
|
|
8
|
+
TranslatorGenerator,
|
|
9
|
+
} from '../translator';
|
|
2
10
|
import { BindAttribute, CallLogic, TypeAnnotation } from '..';
|
|
3
11
|
import { ElementToVueOptions } from './ViewElement__';
|
|
4
12
|
import { findConceptKeyWordByNamespace } from '../utils';
|
|
@@ -200,23 +208,26 @@ export class Identifier extends LogicItem {
|
|
|
200
208
|
return this.name || '-';
|
|
201
209
|
}
|
|
202
210
|
|
|
203
|
-
@
|
|
204
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
211
|
+
@withSourceMapGenerator
|
|
212
|
+
*toEmbeddedTS(state = createCompilerState(), options?: any): TranslatorGenerator {
|
|
213
|
+
const self = this;
|
|
214
|
+
// new实体,连线修改实体字段,无法同步到new实体的字段上,因为解构赋值后的property查找不回去,所以改成obj.
|
|
215
|
+
if (options?.isNewcomposite){
|
|
216
|
+
return `__obj.${this.name}`;
|
|
217
|
+
}
|
|
205
218
|
// 只有data-source可以是函数 ,也可能是属性
|
|
206
|
-
if (
|
|
207
|
-
const { view } =
|
|
219
|
+
if (self.parentNode instanceof BindAttribute && self.parentNode.name === 'data-source') {
|
|
220
|
+
const { view } = self;
|
|
208
221
|
const viewLogics = view.logics;
|
|
209
|
-
const findLogic = viewLogics.find((item) => item.name ===
|
|
222
|
+
const findLogic = viewLogics.find((item) => item.name === self.name);
|
|
210
223
|
if (findLogic) {
|
|
211
|
-
return
|
|
224
|
+
return self.name;
|
|
212
225
|
}
|
|
213
226
|
}
|
|
214
|
-
|
|
215
227
|
// 全局变量在不是页面的地方放置,就会报错
|
|
216
|
-
if (
|
|
228
|
+
if (self.namespace?.startsWith('app.frontends') && self.namespace?.endsWith('variables') && !self.frontend) {
|
|
217
229
|
return '__FRONTENDVARIABLES__';
|
|
218
230
|
}
|
|
219
|
-
|
|
220
231
|
// 如果是nasl.util.Enum 的子集里的 Identifier > MemberExpression > Argument > callfunction
|
|
221
232
|
// nasl.util.Enum 的 右侧是转成字符串的
|
|
222
233
|
// 如果是identifier 而且枚举
|
|
@@ -228,28 +239,26 @@ export class Identifier extends LogicItem {
|
|
|
228
239
|
// return str.includes('.enums.') ? str : str + '.toString()';
|
|
229
240
|
// }
|
|
230
241
|
// }
|
|
231
|
-
|
|
232
242
|
// having 下选择的变量不生成 namespace 前缀
|
|
233
|
-
if (
|
|
234
|
-
return `__${
|
|
243
|
+
if (self.namespace === 'inner' && self.getAncestor('CallQueryComponent')) {
|
|
244
|
+
return `__${self.name}` || '__IDENTIFIER__';
|
|
235
245
|
}
|
|
236
|
-
const logicAncestor =
|
|
237
|
-
|
|
246
|
+
const logicAncestor = self.getAncestor('CallLogic') as CallLogic;
|
|
238
247
|
if (
|
|
239
248
|
logicAncestor &&
|
|
240
249
|
logicAncestor.calleeName === 'getCustomConfig' &&
|
|
241
250
|
logicAncestor.calleeNamespace === 'nasl.configuration'
|
|
242
251
|
) {
|
|
243
|
-
if (
|
|
244
|
-
return
|
|
245
|
-
? `${
|
|
246
|
-
:
|
|
252
|
+
if (self.view) {
|
|
253
|
+
return self.namespace
|
|
254
|
+
? `${self.namespace}.Custom${self.name}.FrontEnd${self.name}`
|
|
255
|
+
: self.name || '__IDENTIFIER__';
|
|
247
256
|
}
|
|
248
|
-
return
|
|
249
|
-
? `${
|
|
250
|
-
:
|
|
257
|
+
return self.namespace
|
|
258
|
+
? `${self.namespace}.Custom${self.name}.BackEnd${self.name}`
|
|
259
|
+
: self.name || '__IDENTIFIER__';
|
|
251
260
|
}
|
|
252
|
-
return
|
|
261
|
+
return self.namespace ? `${self.namespace}.${self.name}` : self.name || '__IDENTIFIER__';
|
|
253
262
|
}
|
|
254
263
|
|
|
255
264
|
// 方便快速取值
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
shiftState,
|
|
5
|
+
withSourceMap,
|
|
6
|
+
indent,
|
|
7
|
+
createCompilerState,
|
|
8
|
+
withSourceMapGenerator,
|
|
9
|
+
withGenerator,
|
|
10
|
+
TranslatorGenerator,
|
|
11
|
+
} from '../translator';
|
|
2
12
|
|
|
3
13
|
//================================================================================
|
|
4
14
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -367,9 +377,12 @@ export class IfStatement extends LogicItem {
|
|
|
367
377
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
368
378
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
369
379
|
params.index = index;
|
|
370
|
-
} else
|
|
371
|
-
|
|
372
|
-
(
|
|
380
|
+
} else {
|
|
381
|
+
const q = (t as any)[parentKey];
|
|
382
|
+
if ((q.__v_raw || q) === n) {
|
|
383
|
+
params.index = 0;
|
|
384
|
+
(this as any)[parentKey] = undefined;
|
|
385
|
+
}
|
|
373
386
|
}
|
|
374
387
|
}
|
|
375
388
|
return params;
|
|
@@ -422,35 +435,33 @@ export class IfStatement extends LogicItem {
|
|
|
422
435
|
return code;
|
|
423
436
|
}
|
|
424
437
|
|
|
425
|
-
@
|
|
426
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
438
|
+
@withSourceMapGenerator
|
|
439
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
440
|
+
const self = this;
|
|
427
441
|
let code = '';
|
|
428
442
|
code += 'if (nasl.core.ensureBoolean(';
|
|
429
|
-
code +=
|
|
430
|
-
?
|
|
443
|
+
code += self.test
|
|
444
|
+
? yield* self.test.toEmbeddedTS(
|
|
431
445
|
shiftState(state, code, {
|
|
432
446
|
tabSize: 0,
|
|
433
447
|
}),
|
|
434
448
|
)
|
|
435
449
|
: '__IDENTIFIER__';
|
|
436
|
-
|
|
437
450
|
code += ')) {\n';
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
code += `${logicItem.toEmbeddedTS(
|
|
451
|
+
if (Array.isArray(self.consequent)) {
|
|
452
|
+
yield* wrapForEach(self.consequent, function* warpForEachGenerator(logicItem) {
|
|
453
|
+
code += `${yield* logicItem.toEmbeddedTS(
|
|
442
454
|
shiftState(state, code, {
|
|
443
455
|
tabSize: (state?.tabSize || 0) + 1,
|
|
444
456
|
}),
|
|
445
457
|
)};\n`;
|
|
446
458
|
});
|
|
447
459
|
}
|
|
448
|
-
|
|
449
460
|
code += `${indent(state?.tabSize || 0)}}`;
|
|
450
|
-
if (Array.isArray(
|
|
461
|
+
if (Array.isArray(self.alternate)) {
|
|
451
462
|
code += ' else {\n';
|
|
452
|
-
|
|
453
|
-
code += `${logicItem.toEmbeddedTS(
|
|
463
|
+
yield* wrapForEach(self.alternate, function* warpForEachGenerator(logicItem) {
|
|
464
|
+
code += `${yield* logicItem.toEmbeddedTS(
|
|
454
465
|
shiftState(state, code, {
|
|
455
466
|
tabSize: (state?.tabSize || 0) + 1,
|
|
456
467
|
}),
|
|
@@ -104,7 +104,7 @@ export class Integration extends BaseNode {
|
|
|
104
104
|
|
|
105
105
|
getConnectorExistingNames(excludedList: Array<Connector> = []) {
|
|
106
106
|
const excludedSet = new Set(excludedList);
|
|
107
|
-
return ((this.connectors as Connector[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
107
|
+
return ((this.connectors as Connector[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
108
108
|
}
|
|
109
109
|
getConnectorUniqueName(name = 'connector1') {
|
|
110
110
|
return utils.unique(name, this.getConnectorExistingNames(), undefined, false);
|
|
@@ -296,12 +296,16 @@ export class Integration extends BaseNode {
|
|
|
296
296
|
// @ts-ignore
|
|
297
297
|
const n = microApp.__v_raw || microApp;
|
|
298
298
|
if (Array.isArray((t as any)[parentKey])) {
|
|
299
|
-
|
|
299
|
+
// @ts-ignore
|
|
300
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
300
301
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
301
302
|
params.index = index;
|
|
302
|
-
} else
|
|
303
|
-
|
|
304
|
-
(
|
|
303
|
+
} else {
|
|
304
|
+
const q = (t as any)[parentKey];
|
|
305
|
+
if ((q.__v_raw || q) === n) {
|
|
306
|
+
params.index = 0;
|
|
307
|
+
(this as any)[parentKey] = undefined;
|
|
308
|
+
}
|
|
305
309
|
}
|
|
306
310
|
}
|
|
307
311
|
return params;
|
|
@@ -348,12 +352,16 @@ export class Integration extends BaseNode {
|
|
|
348
352
|
// @ts-ignore
|
|
349
353
|
const n = module.__v_raw || module;
|
|
350
354
|
if (Array.isArray((t as any)[parentKey])) {
|
|
351
|
-
|
|
355
|
+
// @ts-ignore
|
|
356
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
352
357
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
353
358
|
params.index = index;
|
|
354
|
-
} else
|
|
355
|
-
|
|
356
|
-
(
|
|
359
|
+
} else {
|
|
360
|
+
const q = (t as any)[parentKey];
|
|
361
|
+
if ((q.__v_raw || q) === n) {
|
|
362
|
+
params.index = 0;
|
|
363
|
+
(this as any)[parentKey] = undefined;
|
|
364
|
+
}
|
|
357
365
|
}
|
|
358
366
|
}
|
|
359
367
|
return params;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
1
2
|
import { dataTypesMap } from './basics/types';
|
|
2
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
TranslatorState,
|
|
5
|
+
shiftState,
|
|
6
|
+
withSourceMap,
|
|
7
|
+
withSourceMapGenerator,
|
|
8
|
+
withGenerator,
|
|
9
|
+
TranslatorGenerator,
|
|
10
|
+
createCompilerState,
|
|
11
|
+
} from '../translator';
|
|
3
12
|
import StructureProperty from './StructureProperty__';
|
|
4
13
|
import Structure from './Structure__';
|
|
5
14
|
import { getNodeByNodeCallee, getNaslNodeByNodeCallee } from '../automate/engine/utils';
|
|
@@ -262,9 +271,12 @@ export class InterfaceParam extends BaseNode {
|
|
|
262
271
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
263
272
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
264
273
|
params.index = index;
|
|
265
|
-
} else
|
|
266
|
-
|
|
267
|
-
(
|
|
274
|
+
} else {
|
|
275
|
+
const q = (t as any)[parentKey];
|
|
276
|
+
if ((q.__v_raw || q) === n) {
|
|
277
|
+
params.index = 0;
|
|
278
|
+
(this as any)[parentKey] = undefined;
|
|
279
|
+
}
|
|
268
280
|
}
|
|
269
281
|
}
|
|
270
282
|
return params;
|
|
@@ -310,15 +322,16 @@ export class InterfaceParam extends BaseNode {
|
|
|
310
322
|
return !!this.module;
|
|
311
323
|
}
|
|
312
324
|
|
|
313
|
-
@
|
|
314
|
-
toEmbeddedTS(state
|
|
315
|
-
|
|
325
|
+
@withSourceMapGenerator
|
|
326
|
+
*toEmbeddedTS(state = createCompilerState(), isOptionalParameter?: boolean): TranslatorGenerator {
|
|
327
|
+
const self = this;
|
|
328
|
+
let code = self.tsName;
|
|
316
329
|
if (isOptionalParameter) {
|
|
317
330
|
code += '?';
|
|
318
331
|
}
|
|
319
|
-
if (
|
|
332
|
+
if (self.typeAnnotation) {
|
|
320
333
|
code += ': ';
|
|
321
|
-
code +=
|
|
334
|
+
code += yield* self.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
322
335
|
}
|
|
323
336
|
// toTS暂时不需要默认值
|
|
324
337
|
// if (this.defaultValue) {
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import type { EmbeddedTSFileGenerator } from '../utils';
|
|
3
|
+
import {
|
|
4
|
+
TranslatorState,
|
|
5
|
+
shiftState,
|
|
6
|
+
withSourceMap,
|
|
7
|
+
createCompilerState,
|
|
8
|
+
withSourceMapGenerator,
|
|
9
|
+
withGenerator,
|
|
10
|
+
TranslatorGenerator,
|
|
11
|
+
} from '../translator';
|
|
2
12
|
import Namespace from './Namespace__';
|
|
3
13
|
import TypeAnnotation from './TypeAnnotation__';
|
|
4
14
|
import Structure from './Structure__';
|
|
@@ -545,9 +555,12 @@ export class Interface extends BaseNode {
|
|
|
545
555
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
546
556
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
547
557
|
params.index = index;
|
|
548
|
-
} else
|
|
549
|
-
|
|
550
|
-
(
|
|
558
|
+
} else {
|
|
559
|
+
const q = (t as any)[parentKey];
|
|
560
|
+
if ((q.__v_raw || q) === n) {
|
|
561
|
+
params.index = 0;
|
|
562
|
+
(this as any)[parentKey] = undefined;
|
|
563
|
+
}
|
|
551
564
|
}
|
|
552
565
|
}
|
|
553
566
|
return params;
|
|
@@ -598,9 +611,12 @@ export class Interface extends BaseNode {
|
|
|
598
611
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
599
612
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
600
613
|
params.index = index;
|
|
601
|
-
} else
|
|
602
|
-
|
|
603
|
-
(
|
|
614
|
+
} else {
|
|
615
|
+
const q = (t as any)[parentKey];
|
|
616
|
+
if ((q.__v_raw || q) === n) {
|
|
617
|
+
params.index = 0;
|
|
618
|
+
(this as any)[parentKey] = undefined;
|
|
619
|
+
}
|
|
604
620
|
}
|
|
605
621
|
}
|
|
606
622
|
return params;
|
|
@@ -651,9 +667,12 @@ export class Interface extends BaseNode {
|
|
|
651
667
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
652
668
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
653
669
|
params.index = index;
|
|
654
|
-
} else
|
|
655
|
-
|
|
656
|
-
(
|
|
670
|
+
} else {
|
|
671
|
+
const q = (t as any)[parentKey];
|
|
672
|
+
if ((q.__v_raw || q) === n) {
|
|
673
|
+
params.index = 0;
|
|
674
|
+
(this as any)[parentKey] = undefined;
|
|
675
|
+
}
|
|
657
676
|
}
|
|
658
677
|
}
|
|
659
678
|
return params;
|
|
@@ -831,12 +850,12 @@ export class Interface extends BaseNode {
|
|
|
831
850
|
});
|
|
832
851
|
}
|
|
833
852
|
|
|
834
|
-
toEmbeddedTSFile() {
|
|
853
|
+
*toEmbeddedTSFile(): EmbeddedTSFileGenerator {
|
|
835
854
|
let code = `namespace ${this.getTsNamespace()} {\n`;
|
|
836
855
|
|
|
837
856
|
const state = createCompilerState(code, { tabSize: 1 });
|
|
838
857
|
try {
|
|
839
|
-
code += this.toEmbeddedTS(state);
|
|
858
|
+
code += yield* this.toEmbeddedTS(state);
|
|
840
859
|
} catch (err) {
|
|
841
860
|
code += '';
|
|
842
861
|
console.log(err);
|
|
@@ -954,70 +973,69 @@ export class Interface extends BaseNode {
|
|
|
954
973
|
return this.name;
|
|
955
974
|
}
|
|
956
975
|
|
|
957
|
-
@
|
|
958
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
976
|
+
@withSourceMapGenerator
|
|
977
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
978
|
+
const self = this;
|
|
959
979
|
let code = '';
|
|
960
|
-
const getCheckerCode = ()
|
|
961
|
-
if (
|
|
980
|
+
const getCheckerCode = function* getCheckerCode() {
|
|
981
|
+
if (self.validation) {
|
|
962
982
|
code += '\n(';
|
|
963
|
-
code +=
|
|
983
|
+
code += yield * self.validation.toEmbeddedTS(shiftState(state, code));
|
|
964
984
|
code += ');\n';
|
|
965
985
|
}
|
|
966
986
|
};
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
this.params.forEach((param, index) => {
|
|
987
|
+
code += `export function ${self.tsName}(`;
|
|
988
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
970
989
|
if (index === 0) {
|
|
971
990
|
code += '{';
|
|
972
991
|
}
|
|
973
992
|
code += param.tsName;
|
|
974
|
-
if (index !==
|
|
993
|
+
if (index !== self.params.length - 1) {
|
|
975
994
|
code += ', ';
|
|
976
995
|
} else {
|
|
977
996
|
code += '}:';
|
|
978
997
|
}
|
|
979
998
|
});
|
|
980
|
-
|
|
999
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
981
1000
|
if (index === 0) {
|
|
982
1001
|
code += '{';
|
|
983
1002
|
}
|
|
984
|
-
code += param.toEmbeddedTS(shiftState(state, code), !(param as InterfaceParam).required);
|
|
985
|
-
if (index !==
|
|
1003
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code), !(param as InterfaceParam).required);
|
|
1004
|
+
if (index !== self.params.length - 1) {
|
|
986
1005
|
code += ', ';
|
|
987
1006
|
} else {
|
|
988
1007
|
code += '}';
|
|
989
1008
|
}
|
|
990
1009
|
});
|
|
991
1010
|
code += `):`;
|
|
992
|
-
if (
|
|
993
|
-
|
|
994
|
-
code += ret.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
1011
|
+
if (self.returns && self.returns.length > 0) {
|
|
1012
|
+
yield* wrapForEach(self.returns, function* warpForEachGenerator(ret) {
|
|
1013
|
+
code += yield* ret.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
995
1014
|
});
|
|
996
|
-
|
|
997
1015
|
code += '{\n';
|
|
998
|
-
getCheckerCode();
|
|
999
|
-
code +=
|
|
1016
|
+
yield* getCheckerCode();
|
|
1017
|
+
code += self.module
|
|
1000
1018
|
? ''
|
|
1001
|
-
: `let logic =${(
|
|
1019
|
+
: `let logic =${(self.parentNode as Namespace).getTsNamespace()}.logics.${self.originLogicName};\n`;
|
|
1002
1020
|
code += 'let ';
|
|
1003
|
-
code +=
|
|
1021
|
+
code += yield* self.returns[0].toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1004
1022
|
code += ';\n';
|
|
1005
1023
|
code += `return `;
|
|
1006
|
-
code +=
|
|
1024
|
+
code += self.returns[0].tsName || '__return;';
|
|
1007
1025
|
code += '\n }';
|
|
1008
1026
|
} else {
|
|
1009
1027
|
code += 'void {\n';
|
|
1010
|
-
getCheckerCode();
|
|
1011
|
-
code +=
|
|
1028
|
+
yield* getCheckerCode();
|
|
1029
|
+
code += self.module
|
|
1012
1030
|
? ''
|
|
1013
|
-
: `let logic =${(
|
|
1031
|
+
: `let logic =${(self.parentNode as Namespace).getTsNamespace()}.logics.${self.originLogicName};\n`;
|
|
1014
1032
|
code += '};';
|
|
1015
1033
|
}
|
|
1016
1034
|
code += '\n';
|
|
1017
1035
|
return code;
|
|
1018
1036
|
}
|
|
1019
1037
|
|
|
1020
|
-
getNamespace() {
|
|
1038
|
+
getNamespace(): string {
|
|
1021
1039
|
// 针对 Connector 下的 Interface 需要做额外的兼容处理
|
|
1022
1040
|
// 本来 Connector 对应的 Namespace 是 connector,走默认逻辑就成
|
|
1023
1041
|
// 但是后端在翻译 Connector 下的 Interface 时选择的前缀为 extensions 故这里需要强行改成 extensions
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
withSourceMap,
|
|
4
|
+
TranslatorState,
|
|
5
|
+
createCompilerState,
|
|
6
|
+
withSourceMapGenerator,
|
|
7
|
+
withGenerator,
|
|
8
|
+
TranslatorGenerator,
|
|
9
|
+
} from '../translator';
|
|
2
10
|
//================================================================================
|
|
3
11
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
4
12
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -138,8 +146,9 @@ export class JSBlock extends LogicItem {
|
|
|
138
146
|
})();`;
|
|
139
147
|
}
|
|
140
148
|
|
|
141
|
-
@
|
|
142
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
149
|
+
@withSourceMapGenerator
|
|
150
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
151
|
+
const self = this;
|
|
143
152
|
return 'nasl.core.universalVariable';
|
|
144
153
|
}
|
|
145
154
|
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
indent,
|
|
5
|
+
createCompilerState,
|
|
6
|
+
withSourceMapGenerator,
|
|
7
|
+
withGenerator,
|
|
8
|
+
TranslatorGenerator,
|
|
9
|
+
} from '../translator';
|
|
2
10
|
//================================================================================
|
|
3
11
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
4
12
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -84,9 +92,11 @@ export class JavaLogic extends LogicItem {
|
|
|
84
92
|
* @param state 编译状态
|
|
85
93
|
* @returns 生成的代码
|
|
86
94
|
*/
|
|
87
|
-
|
|
95
|
+
@withGenerator
|
|
96
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
97
|
+
const self = this;
|
|
88
98
|
let code = '';
|
|
89
|
-
const ret =
|
|
99
|
+
const ret = self.logic.returns[0];
|
|
90
100
|
if (ret) {
|
|
91
101
|
code += `${indent(state?.tabSize || 0)}return ${ret.name};`;
|
|
92
102
|
} else {
|