@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
|
@@ -2040,9 +2040,12 @@ export class Namespace extends BaseNode {
|
|
|
2040
2040
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2041
2041
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2042
2042
|
params.index = index;
|
|
2043
|
-
} else
|
|
2044
|
-
|
|
2045
|
-
(
|
|
2043
|
+
} else {
|
|
2044
|
+
const q = (t as any)[parentKey];
|
|
2045
|
+
if ((q.__v_raw || q) === n) {
|
|
2046
|
+
params.index = 0;
|
|
2047
|
+
(this as any)[parentKey] = undefined;
|
|
2048
|
+
}
|
|
2046
2049
|
}
|
|
2047
2050
|
}
|
|
2048
2051
|
return params;
|
|
@@ -2093,9 +2096,12 @@ export class Namespace extends BaseNode {
|
|
|
2093
2096
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2094
2097
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2095
2098
|
params.index = index;
|
|
2096
|
-
} else
|
|
2097
|
-
|
|
2098
|
-
(
|
|
2099
|
+
} else {
|
|
2100
|
+
const q = (t as any)[parentKey];
|
|
2101
|
+
if ((q.__v_raw || q) === n) {
|
|
2102
|
+
params.index = 0;
|
|
2103
|
+
(this as any)[parentKey] = undefined;
|
|
2104
|
+
}
|
|
2099
2105
|
}
|
|
2100
2106
|
}
|
|
2101
2107
|
return params;
|
|
@@ -2146,9 +2152,12 @@ export class Namespace extends BaseNode {
|
|
|
2146
2152
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2147
2153
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2148
2154
|
params.index = index;
|
|
2149
|
-
} else
|
|
2150
|
-
|
|
2151
|
-
(
|
|
2155
|
+
} else {
|
|
2156
|
+
const q = (t as any)[parentKey];
|
|
2157
|
+
if ((q.__v_raw || q) === n) {
|
|
2158
|
+
params.index = 0;
|
|
2159
|
+
(this as any)[parentKey] = undefined;
|
|
2160
|
+
}
|
|
2152
2161
|
}
|
|
2153
2162
|
}
|
|
2154
2163
|
return params;
|
|
@@ -2199,9 +2208,12 @@ export class Namespace extends BaseNode {
|
|
|
2199
2208
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2200
2209
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2201
2210
|
params.index = index;
|
|
2202
|
-
} else
|
|
2203
|
-
|
|
2204
|
-
(
|
|
2211
|
+
} else {
|
|
2212
|
+
const q = (t as any)[parentKey];
|
|
2213
|
+
if ((q.__v_raw || q) === n) {
|
|
2214
|
+
params.index = 0;
|
|
2215
|
+
(this as any)[parentKey] = undefined;
|
|
2216
|
+
}
|
|
2205
2217
|
}
|
|
2206
2218
|
}
|
|
2207
2219
|
return params;
|
|
@@ -2252,9 +2264,12 @@ export class Namespace extends BaseNode {
|
|
|
2252
2264
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2253
2265
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2254
2266
|
params.index = index;
|
|
2255
|
-
} else
|
|
2256
|
-
|
|
2257
|
-
(
|
|
2267
|
+
} else {
|
|
2268
|
+
const q = (t as any)[parentKey];
|
|
2269
|
+
if ((q.__v_raw || q) === n) {
|
|
2270
|
+
params.index = 0;
|
|
2271
|
+
(this as any)[parentKey] = undefined;
|
|
2272
|
+
}
|
|
2258
2273
|
}
|
|
2259
2274
|
}
|
|
2260
2275
|
return params;
|
|
@@ -2305,9 +2320,12 @@ export class Namespace extends BaseNode {
|
|
|
2305
2320
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2306
2321
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2307
2322
|
params.index = index;
|
|
2308
|
-
} else
|
|
2309
|
-
|
|
2310
|
-
(
|
|
2323
|
+
} else {
|
|
2324
|
+
const q = (t as any)[parentKey];
|
|
2325
|
+
if ((q.__v_raw || q) === n) {
|
|
2326
|
+
params.index = 0;
|
|
2327
|
+
(this as any)[parentKey] = undefined;
|
|
2328
|
+
}
|
|
2311
2329
|
}
|
|
2312
2330
|
}
|
|
2313
2331
|
return params;
|
|
@@ -2358,9 +2376,12 @@ export class Namespace extends BaseNode {
|
|
|
2358
2376
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2359
2377
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2360
2378
|
params.index = index;
|
|
2361
|
-
} else
|
|
2362
|
-
|
|
2363
|
-
(
|
|
2379
|
+
} else {
|
|
2380
|
+
const q = (t as any)[parentKey];
|
|
2381
|
+
if ((q.__v_raw || q) === n) {
|
|
2382
|
+
params.index = 0;
|
|
2383
|
+
(this as any)[parentKey] = undefined;
|
|
2384
|
+
}
|
|
2364
2385
|
}
|
|
2365
2386
|
}
|
|
2366
2387
|
return params;
|
|
@@ -2411,9 +2432,12 @@ export class Namespace extends BaseNode {
|
|
|
2411
2432
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2412
2433
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2413
2434
|
params.index = index;
|
|
2414
|
-
} else
|
|
2415
|
-
|
|
2416
|
-
(
|
|
2435
|
+
} else {
|
|
2436
|
+
const q = (t as any)[parentKey];
|
|
2437
|
+
if ((q.__v_raw || q) === n) {
|
|
2438
|
+
params.index = 0;
|
|
2439
|
+
(this as any)[parentKey] = undefined;
|
|
2440
|
+
}
|
|
2417
2441
|
}
|
|
2418
2442
|
}
|
|
2419
2443
|
return params;
|
|
@@ -2489,9 +2513,12 @@ export class Namespace extends BaseNode {
|
|
|
2489
2513
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2490
2514
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2491
2515
|
params.index = index;
|
|
2492
|
-
} else
|
|
2493
|
-
|
|
2494
|
-
(
|
|
2516
|
+
} else {
|
|
2517
|
+
const q = (t as any)[parentKey];
|
|
2518
|
+
if ((q.__v_raw || q) === n) {
|
|
2519
|
+
params.index = 0;
|
|
2520
|
+
(this as any)[parentKey] = undefined;
|
|
2521
|
+
}
|
|
2495
2522
|
}
|
|
2496
2523
|
}
|
|
2497
2524
|
return params;
|
|
@@ -2542,9 +2569,12 @@ export class Namespace extends BaseNode {
|
|
|
2542
2569
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2543
2570
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2544
2571
|
params.index = index;
|
|
2545
|
-
} else
|
|
2546
|
-
|
|
2547
|
-
(
|
|
2572
|
+
} else {
|
|
2573
|
+
const q = (t as any)[parentKey];
|
|
2574
|
+
if ((q.__v_raw || q) === n) {
|
|
2575
|
+
params.index = 0;
|
|
2576
|
+
(this as any)[parentKey] = undefined;
|
|
2577
|
+
}
|
|
2548
2578
|
}
|
|
2549
2579
|
}
|
|
2550
2580
|
return params;
|
|
@@ -2595,9 +2625,12 @@ export class Namespace extends BaseNode {
|
|
|
2595
2625
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
2596
2626
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2597
2627
|
params.index = index;
|
|
2598
|
-
} else
|
|
2599
|
-
|
|
2600
|
-
(
|
|
2628
|
+
} else {
|
|
2629
|
+
const q = (t as any)[parentKey];
|
|
2630
|
+
if ((q.__v_raw || q) === n) {
|
|
2631
|
+
params.index = 0;
|
|
2632
|
+
(this as any)[parentKey] = undefined;
|
|
2633
|
+
}
|
|
2601
2634
|
}
|
|
2602
2635
|
}
|
|
2603
2636
|
return params;
|
|
@@ -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
|
import { ElementToVueOptions } from './ViewElement__';
|
|
3
13
|
import MemberExpression from './MemberExpression__';
|
|
4
14
|
import StructureProperty from './StructureProperty__';
|
|
@@ -688,9 +698,12 @@ export class NewComposite extends LogicItem {
|
|
|
688
698
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
689
699
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
690
700
|
params.index = index;
|
|
691
|
-
} else
|
|
692
|
-
|
|
693
|
-
(
|
|
701
|
+
} else {
|
|
702
|
+
const q = (t as any)[parentKey];
|
|
703
|
+
if ((q.__v_raw || q) === n) {
|
|
704
|
+
params.index = 0;
|
|
705
|
+
(this as any)[parentKey] = undefined;
|
|
706
|
+
}
|
|
694
707
|
}
|
|
695
708
|
}
|
|
696
709
|
return params;
|
|
@@ -741,9 +754,12 @@ export class NewComposite extends LogicItem {
|
|
|
741
754
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
742
755
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
743
756
|
params.index = index;
|
|
744
|
-
} else
|
|
745
|
-
|
|
746
|
-
(
|
|
757
|
+
} else {
|
|
758
|
+
const q = (t as any)[parentKey];
|
|
759
|
+
if ((q.__v_raw || q) === n) {
|
|
760
|
+
params.index = 0;
|
|
761
|
+
(this as any)[parentKey] = undefined;
|
|
762
|
+
}
|
|
747
763
|
}
|
|
748
764
|
}
|
|
749
765
|
return params;
|
|
@@ -794,9 +810,12 @@ export class NewComposite extends LogicItem {
|
|
|
794
810
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
795
811
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
796
812
|
params.index = index;
|
|
797
|
-
} else
|
|
798
|
-
|
|
799
|
-
(
|
|
813
|
+
} else {
|
|
814
|
+
const q = (t as any)[parentKey];
|
|
815
|
+
if ((q.__v_raw || q) === n) {
|
|
816
|
+
params.index = 0;
|
|
817
|
+
(this as any)[parentKey] = undefined;
|
|
818
|
+
}
|
|
800
819
|
}
|
|
801
820
|
}
|
|
802
821
|
return params;
|
|
@@ -847,9 +866,12 @@ export class NewComposite extends LogicItem {
|
|
|
847
866
|
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
848
867
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
849
868
|
params.index = index;
|
|
850
|
-
} else
|
|
851
|
-
|
|
852
|
-
(
|
|
869
|
+
} else {
|
|
870
|
+
const q = (t as any)[parentKey];
|
|
871
|
+
if ((q.__v_raw || q) === n) {
|
|
872
|
+
params.index = 0;
|
|
873
|
+
(this as any)[parentKey] = undefined;
|
|
874
|
+
}
|
|
853
875
|
}
|
|
854
876
|
}
|
|
855
877
|
return params;
|
|
@@ -1216,29 +1238,30 @@ export class NewComposite extends LogicItem {
|
|
|
1216
1238
|
return code;
|
|
1217
1239
|
}
|
|
1218
1240
|
|
|
1219
|
-
@
|
|
1220
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
1241
|
+
@withSourceMapGenerator
|
|
1242
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
1243
|
+
const self = this;
|
|
1221
1244
|
const indent0 = indent(state?.tabSize || 0);
|
|
1222
1245
|
const indent1 = indent((state?.tabSize || 0) + 1);
|
|
1223
1246
|
const indent2 = indent((state?.tabSize || 0) + 2);
|
|
1224
1247
|
const indent3 = indent((state?.tabSize || 0) + 3);
|
|
1225
1248
|
let code = '';
|
|
1226
|
-
if (!
|
|
1249
|
+
if (!self.typeAnnotation) {
|
|
1227
1250
|
code += '__IDENTIFIER__';
|
|
1228
|
-
} else if (
|
|
1251
|
+
} else if (self.typeAnnotation.typeKind !== 'anonymousStructure') {
|
|
1229
1252
|
const rightMap = new Map();
|
|
1230
1253
|
code += `${indent0}(() => { \n`;
|
|
1231
1254
|
// 提供sourcemap,获取类型标注和上下文可选变量
|
|
1232
|
-
|
|
1255
|
+
yield* wrapForEach(self.rights, function* warpForEachGenerator(right) {
|
|
1233
1256
|
code += indent1;
|
|
1234
|
-
rightMap.set(right.expression, right.expression.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1257
|
+
rightMap.set(right.expression, yield* right.expression.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1235
1258
|
code += rightMap.get(right.expression);
|
|
1236
1259
|
code += ';\n';
|
|
1237
1260
|
if (right.members?.length) {
|
|
1238
1261
|
code += indent2;
|
|
1239
1262
|
}
|
|
1240
|
-
right.members
|
|
1241
|
-
rightMap.set(member, member.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1263
|
+
yield* wrapForEach(right.members, function* warpForEachGenerator(member) {
|
|
1264
|
+
rightMap.set(member, yield* member.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1242
1265
|
code += rightMap.get(member);
|
|
1243
1266
|
code += '; ';
|
|
1244
1267
|
});
|
|
@@ -1246,93 +1269,92 @@ export class NewComposite extends LogicItem {
|
|
|
1246
1269
|
});
|
|
1247
1270
|
// 方便ts报错检查
|
|
1248
1271
|
code += `${indent1}function __newComposite() {\n`;
|
|
1249
|
-
const { typeAnnotation } =
|
|
1272
|
+
const { typeAnnotation } = self;
|
|
1250
1273
|
if (
|
|
1251
1274
|
['nasl.ui', 'nasl.interface', 'nasl.http'].includes(typeAnnotation.typeNamespace) &&
|
|
1252
1275
|
typeAnnotation.typeKind === 'generic'
|
|
1253
1276
|
) {
|
|
1254
1277
|
code += `${indent2}let __obj = new ${typeAnnotation.typeNamespace}.${typeAnnotation.typeName}`;
|
|
1255
1278
|
code += '({';
|
|
1256
|
-
|
|
1279
|
+
yield* wrapForEach(self.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
1257
1280
|
const leftSecondIndex = leftIndex[1];
|
|
1258
1281
|
const [rightFirst, rightSecond] = [rightIndex[0], rightIndex[1]];
|
|
1259
|
-
const leftItem =
|
|
1282
|
+
const leftItem = self.properties[leftSecondIndex];
|
|
1260
1283
|
const rightItem =
|
|
1261
1284
|
rightSecond !== undefined
|
|
1262
|
-
?
|
|
1263
|
-
:
|
|
1285
|
+
? self.rights[rightFirst].members[rightSecond]
|
|
1286
|
+
: self.rights[rightFirst].expression;
|
|
1264
1287
|
const rightTs = rightMap.get(rightItem);
|
|
1265
|
-
code += `${leftItem.toEmbeddedTS(shiftState(state, code, { inline: true }))}:`;
|
|
1288
|
+
code += `${yield* leftItem.toEmbeddedTS(shiftState(state, code, { inline: true }))}:`;
|
|
1266
1289
|
code += `${['__IDENTIFIER__', '__IDENTIFIER__()'].includes(rightTs) ? 'null' : rightMap.get(rightItem)},\n `;
|
|
1267
1290
|
});
|
|
1268
1291
|
code += '})\n';
|
|
1269
1292
|
} else {
|
|
1270
1293
|
code += `${indent2}let __obj = nasl.util.New<`;
|
|
1271
|
-
code +=
|
|
1294
|
+
code += yield* self.typeAnnotation.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1272
1295
|
code += `>();\n`;
|
|
1273
1296
|
}
|
|
1274
1297
|
// 是否是左边的顶层连线
|
|
1275
|
-
const leftTopIndex =
|
|
1298
|
+
const leftTopIndex = self.assignmentLines.findIndex(({ leftIndex }) => leftIndex[1] === undefined);
|
|
1276
1299
|
if (leftTopIndex !== -1) {
|
|
1277
|
-
const { rightIndex } =
|
|
1300
|
+
const { rightIndex } = self.assignmentLines[leftTopIndex];
|
|
1278
1301
|
const rightExpression =
|
|
1279
1302
|
rightIndex[1] !== undefined
|
|
1280
|
-
?
|
|
1281
|
-
:
|
|
1282
|
-
code += `__obj = ${rightExpression.toEmbeddedTS(shiftState(state, code, { inline: true }))};`;
|
|
1303
|
+
? self.rights[rightIndex[0]].members[rightIndex[1]]
|
|
1304
|
+
: self.rights[rightIndex[0]].expression;
|
|
1305
|
+
code += `__obj = ${yield* rightExpression.toEmbeddedTS(shiftState(state, code, { inline: true }))};`;
|
|
1283
1306
|
code += '\n';
|
|
1284
1307
|
} else {
|
|
1285
1308
|
// 左侧properties的identifier的类型标注
|
|
1286
1309
|
code += `${indent2}const { `;
|
|
1287
|
-
|
|
1288
|
-
code += item.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1289
|
-
if (index <
|
|
1310
|
+
yield* wrapForEach(self.properties, function* warpForEachGenerator(item, index) {
|
|
1311
|
+
code += yield* item.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1312
|
+
if (index < self.properties.length - 1) code += ', ';
|
|
1290
1313
|
});
|
|
1291
1314
|
code += ' } = __obj;\n';
|
|
1292
|
-
|
|
1315
|
+
yield* wrapForEach(self.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
1293
1316
|
const leftSecondIndex = leftIndex[1];
|
|
1294
1317
|
const [rightFirst, rightSecond] = [rightIndex[0], rightIndex[1]];
|
|
1295
|
-
const leftItem =
|
|
1318
|
+
const leftItem = self.properties[leftSecondIndex];
|
|
1296
1319
|
const rightItem =
|
|
1297
1320
|
rightSecond !== undefined
|
|
1298
|
-
?
|
|
1299
|
-
:
|
|
1321
|
+
? self.rights[rightFirst].members[rightSecond]
|
|
1322
|
+
: self.rights[rightFirst].expression;
|
|
1300
1323
|
const rightTs = rightMap.get(rightItem);
|
|
1301
1324
|
code += `${indent2}nasl.core.compareNew(`;
|
|
1302
1325
|
code += `${['__IDENTIFIER__', '__IDENTIFIER__()'].includes(rightTs) ? 'null' : rightMap.get(rightItem)}, `;
|
|
1303
|
-
code += `${leftItem.toEmbeddedTS(shiftState(state, code, { inline: true }))});\n`;
|
|
1326
|
+
code += `${yield* leftItem.toEmbeddedTS(shiftState(state, code, { inline: true }), { isNewcomposite: true })});\n`;
|
|
1304
1327
|
});
|
|
1305
1328
|
}
|
|
1306
1329
|
code += `${indent2}return __obj;\n`;
|
|
1307
1330
|
code += `${indent1}};\n`;
|
|
1308
|
-
|
|
1309
1331
|
code += `${indent1}return __newComposite();\n`;
|
|
1310
1332
|
code += `${indent0}})()`;
|
|
1311
1333
|
} else {
|
|
1312
1334
|
const nameMap = new Map();
|
|
1313
1335
|
const rightMap = new Map();
|
|
1314
|
-
|
|
1336
|
+
yield* wrapForEach(self.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
1315
1337
|
const leftSecondIndex = leftIndex[1];
|
|
1316
1338
|
const [rightFirst, rightSecond] = [rightIndex[0], rightIndex[1]];
|
|
1317
|
-
const leftItem =
|
|
1339
|
+
const leftItem = self.properties[leftSecondIndex];
|
|
1318
1340
|
const rightItem =
|
|
1319
|
-
rightSecond !== undefined ?
|
|
1341
|
+
rightSecond !== undefined ? self.rights[rightFirst].members[rightSecond] : self.rights[rightFirst].expression;
|
|
1320
1342
|
nameMap.set(leftItem.name, rightItem);
|
|
1321
1343
|
rightMap.set(rightItem, null);
|
|
1322
1344
|
});
|
|
1323
1345
|
code += `${indent0}(() => { \n`;
|
|
1324
1346
|
// 提供sourcemap,获取类型标注和上下文可选变量
|
|
1325
|
-
|
|
1347
|
+
yield* wrapForEach(self.rights, function* warpForEachGenerator(right) {
|
|
1326
1348
|
code += indent1;
|
|
1327
|
-
let ts = right.expression.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1349
|
+
let ts = yield* right.expression.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1328
1350
|
if (rightMap.has(right.expression)) rightMap.set(right.expression, ts);
|
|
1329
1351
|
code += ts;
|
|
1330
1352
|
code += ';\n';
|
|
1331
1353
|
if (right.members?.length) {
|
|
1332
1354
|
code += indent2;
|
|
1333
1355
|
}
|
|
1334
|
-
right.members
|
|
1335
|
-
ts = member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1356
|
+
yield* wrapForEach(right.members, function* warpForEachGenerator(member) {
|
|
1357
|
+
ts = yield* member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1336
1358
|
if (rightMap.has(member)) rightMap.set(member, ts);
|
|
1337
1359
|
code += ts;
|
|
1338
1360
|
code += '; ';
|
|
@@ -1341,9 +1363,9 @@ export class NewComposite extends LogicItem {
|
|
|
1341
1363
|
});
|
|
1342
1364
|
// 方便ts报错检查
|
|
1343
1365
|
code += `${indent1}function __newComposite() {\n`;
|
|
1344
|
-
|
|
1366
|
+
yield* wrapForEach(self.properties, function* warpForEachGenerator(property, index) {
|
|
1345
1367
|
const temp = `temp${index}`;
|
|
1346
|
-
const propertyType =
|
|
1368
|
+
const propertyType = self.typeAnnotation.properties[index]?.typeAnnotation;
|
|
1347
1369
|
const { name } = property;
|
|
1348
1370
|
const rightItem = nameMap.get(name);
|
|
1349
1371
|
const ts = rightMap.get(rightItem);
|
|
@@ -1354,9 +1376,9 @@ export class NewComposite extends LogicItem {
|
|
|
1354
1376
|
code += `${indent2}let ${temp}${ts === 'null' ? ':void' : ''} = ${ts}; `;
|
|
1355
1377
|
}
|
|
1356
1378
|
code += `let `;
|
|
1357
|
-
code += `${property.toEmbeddedTS(shiftState(state, code, { inline: true }))}: `;
|
|
1379
|
+
code += `${yield* property.toEmbeddedTS(shiftState(state, code, { inline: true }))}: `;
|
|
1358
1380
|
if (propertyType) {
|
|
1359
|
-
const typeTs = propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1381
|
+
const typeTs = yield* propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1360
1382
|
code += typeTs;
|
|
1361
1383
|
code += ` = ${temp};\n`;
|
|
1362
1384
|
// 如果是字段是union类型,且赋值的是当前union允许的类型,会导致property.name类型推断成temp的类型
|
|
@@ -1367,25 +1389,23 @@ export class NewComposite extends LogicItem {
|
|
|
1367
1389
|
}
|
|
1368
1390
|
} else if (propertyType) {
|
|
1369
1391
|
code += `${indent2}let ${property.name}: `;
|
|
1370
|
-
code += `${propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }))}; `;
|
|
1392
|
+
code += `${yield* propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }))}; `;
|
|
1371
1393
|
code += `<`;
|
|
1372
|
-
code += `${property.toEmbeddedTS(shiftState(state, code, { inline: true }))}`;
|
|
1394
|
+
code += `${yield* property.toEmbeddedTS(shiftState(state, code, { inline: true }))}`;
|
|
1373
1395
|
code += `>${property.name};\n`;
|
|
1374
1396
|
} else {
|
|
1375
1397
|
code += `${indent2}const `;
|
|
1376
|
-
code += property.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1398
|
+
code += yield* property.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1377
1399
|
code += ';\n';
|
|
1378
1400
|
}
|
|
1379
1401
|
});
|
|
1380
1402
|
code += `${indent2}return {\n`;
|
|
1381
|
-
|
|
1403
|
+
yield* wrapForEach(self.properties, function* warpForEachGenerator(property) {
|
|
1382
1404
|
code += `${indent3}${property.name},\n`;
|
|
1383
1405
|
});
|
|
1384
1406
|
code += `${indent3}__name: "AStructure_${genHash(JSON.stringify(this))}" as const,\n`;
|
|
1385
1407
|
code += `${indent2}}\n`;
|
|
1386
|
-
|
|
1387
1408
|
code += `${indent1}};\n`;
|
|
1388
|
-
|
|
1389
1409
|
code += `${indent1}return __newComposite();\n`;
|
|
1390
1410
|
code += `${indent0}})()`;
|
|
1391
1411
|
}
|
|
@@ -1412,7 +1432,8 @@ export class NewComposite extends LogicItem {
|
|
|
1412
1432
|
return code;
|
|
1413
1433
|
}
|
|
1414
1434
|
|
|
1415
|
-
getInitCode(state?: TranslatorState)
|
|
1435
|
+
*getInitCode(state?: TranslatorState) {
|
|
1436
|
+
const self = this;
|
|
1416
1437
|
const indent1 = indent((state?.tabSize || 0) + 1);
|
|
1417
1438
|
const indent2 = indent((state?.tabSize || 0) + 2);
|
|
1418
1439
|
const indent3 = indent((state?.tabSize || 0) + 3);
|
|
@@ -1420,7 +1441,7 @@ export class NewComposite extends LogicItem {
|
|
|
1420
1441
|
let code = '';
|
|
1421
1442
|
const nameMap = new Map();
|
|
1422
1443
|
const rightMap = new Map();
|
|
1423
|
-
|
|
1444
|
+
yield* wrapForEach(self.assignmentLines, ({ leftIndex, rightIndex }) => {
|
|
1424
1445
|
const leftSecondIndex = leftIndex[1];
|
|
1425
1446
|
const [rightFirst, rightSecond] = [rightIndex[0], rightIndex[1]];
|
|
1426
1447
|
const leftItem = this.properties[leftSecondIndex];
|
|
@@ -1431,24 +1452,26 @@ export class NewComposite extends LogicItem {
|
|
|
1431
1452
|
});
|
|
1432
1453
|
code += '(() => { ';
|
|
1433
1454
|
// 提供sourcemap,获取类型标注和上下文可选变量
|
|
1434
|
-
this.rights
|
|
1435
|
-
let ts = right.expression.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1455
|
+
yield* wrapForEach(this.rights, function* wrapForEach(right) {
|
|
1456
|
+
let ts = yield* right.expression.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1436
1457
|
if (rightMap.has(right.expression)) rightMap.set(right.expression, ts);
|
|
1437
|
-
right.members
|
|
1438
|
-
ts = member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1439
|
-
if (rightMap.has(member))
|
|
1440
|
-
|
|
1458
|
+
for (const member of right.members) {
|
|
1459
|
+
ts = yield* member.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1460
|
+
if (rightMap.has(member)) {
|
|
1461
|
+
rightMap.set(member, ts);
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1441
1464
|
});
|
|
1442
1465
|
// 方便ts报错检查
|
|
1443
1466
|
code += 'function __newComposite() { ';
|
|
1444
|
-
this.properties
|
|
1467
|
+
yield* wrapForEach(this.properties, function* wrapForEach(property, index) {
|
|
1445
1468
|
const { name } = property;
|
|
1446
|
-
const propertyType =
|
|
1469
|
+
const propertyType = self.typeAnnotation.properties[index]?.typeAnnotation;
|
|
1447
1470
|
const rightItem = nameMap.get(name);
|
|
1448
1471
|
let ts = rightMap.get(rightItem);
|
|
1449
|
-
ts =
|
|
1472
|
+
ts = yield* self.getForeachCode(ts);
|
|
1450
1473
|
if (propertyType) {
|
|
1451
|
-
code += `const ${name}: ${propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }))}; `;
|
|
1474
|
+
code += `const ${name}: ${yield* propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }))}; `;
|
|
1452
1475
|
} else if (ts !== undefined) {
|
|
1453
1476
|
code += `const ${name} = ${['__IDENTIFIER__', '__IDENTIFIER__()'].includes(ts) ? null : ts}; `;
|
|
1454
1477
|
} else {
|
|
@@ -1469,7 +1492,7 @@ export class NewComposite extends LogicItem {
|
|
|
1469
1492
|
return code;
|
|
1470
1493
|
}
|
|
1471
1494
|
|
|
1472
|
-
getNewCompositeCode(state?: TranslatorState)
|
|
1495
|
+
*getNewCompositeCode(state?: TranslatorState) {
|
|
1473
1496
|
const indent0 = indent(state?.tabSize || 0);
|
|
1474
1497
|
const indent1 = indent((state?.tabSize || 0) + 1);
|
|
1475
1498
|
const indent2 = indent((state?.tabSize || 0) + 2);
|
|
@@ -1478,42 +1501,38 @@ export class NewComposite extends LogicItem {
|
|
|
1478
1501
|
const rightMap = new Map();
|
|
1479
1502
|
code += `${indent0}(() => { \n`;
|
|
1480
1503
|
// 提供sourcemap,获取类型标注和上下文可选变量
|
|
1481
|
-
this.rights
|
|
1504
|
+
for (const right of this.rights) {
|
|
1482
1505
|
code += indent1;
|
|
1483
|
-
rightMap.set(right.expression, right.expression.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1506
|
+
rightMap.set(right.expression, yield* right.expression.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1484
1507
|
// code += rightMap.get(right.expression);
|
|
1485
1508
|
// code += ';\n';
|
|
1486
1509
|
if (right.members?.length) {
|
|
1487
1510
|
code += indent2;
|
|
1488
1511
|
}
|
|
1489
|
-
right.members
|
|
1490
|
-
rightMap.set(member, member.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
});
|
|
1494
|
-
// code += right.members.length ? '\n' : '';
|
|
1495
|
-
});
|
|
1512
|
+
for (const member of right.members) {
|
|
1513
|
+
rightMap.set(member, yield* member.toEmbeddedTS(shiftState(state, code, { inline: true })));
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1496
1516
|
// 方便ts报错检查
|
|
1497
1517
|
code += `${indent1}function __newComposite() {\n`;
|
|
1498
1518
|
const { typeAnnotation } = this;
|
|
1499
1519
|
if (['nasl.ui', 'nasl.interface', 'nasl.http'].includes(typeAnnotation.typeNamespace)) {
|
|
1500
1520
|
code += `${indent2}let __obj = new ${typeAnnotation.typeNamespace}.${typeAnnotation.typeName}`;
|
|
1501
1521
|
code += '({';
|
|
1502
|
-
|
|
1522
|
+
for (const { leftIndex, rightIndex } of this.assignmentLines) {
|
|
1503
1523
|
const leftSecondIndex = leftIndex[1];
|
|
1504
1524
|
const [rightFirst, rightSecond] = [rightIndex[0], rightIndex[1]];
|
|
1505
1525
|
const leftItem = this.properties[leftSecondIndex];
|
|
1506
1526
|
const rightItem =
|
|
1507
1527
|
rightSecond !== undefined ? this.rights[rightFirst].members[rightSecond] : this.rights[rightFirst].expression;
|
|
1508
1528
|
const rightTs = rightMap.get(rightItem);
|
|
1509
|
-
code += `${leftItem.toEmbeddedTS(shiftState(state, code, { inline: true }))}:`;
|
|
1529
|
+
code += `${yield* leftItem.toEmbeddedTS(shiftState(state, code, { inline: true }))}:`;
|
|
1510
1530
|
code += `${['__IDENTIFIER__', '__IDENTIFIER__()'].includes(rightTs) ? 'null' : rightMap.get(rightItem)},\n `;
|
|
1511
|
-
}
|
|
1531
|
+
}
|
|
1512
1532
|
code += '})\n';
|
|
1513
1533
|
}
|
|
1514
1534
|
code += `${indent2}return __obj;\n`;
|
|
1515
1535
|
code += `${indent1}};\n`;
|
|
1516
|
-
|
|
1517
1536
|
code += `${indent1}return __newComposite();\n`;
|
|
1518
1537
|
code += `${indent0}})()`;
|
|
1519
1538
|
return code;
|
|
@@ -1558,12 +1577,12 @@ export class NewComposite extends LogicItem {
|
|
|
1558
1577
|
this.app.emit('collect:end');
|
|
1559
1578
|
}
|
|
1560
1579
|
|
|
1561
|
-
getForeachCode(code: string)
|
|
1580
|
+
*getForeachCode(code: string) {
|
|
1562
1581
|
// ForEachStatement 内部变量需要替换处理,如 item、index
|
|
1563
1582
|
const forEachStatement = this.getAncestor('ForEachStatement') as ForEachStatement;
|
|
1564
1583
|
if (forEachStatement && code) {
|
|
1565
1584
|
code = code.replaceAll('\n', ' ');
|
|
1566
|
-
code = new Logic().handleForEachCode(code, forEachStatement);
|
|
1585
|
+
code = yield* new Logic().handleForEachCode(code, forEachStatement);
|
|
1567
1586
|
}
|
|
1568
1587
|
return code;
|
|
1569
1588
|
}
|