@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
package/src/concepts/View__.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
wrapForEachToGenerator as wrapForEach,
|
|
3
|
+
wrapIteratorToGenerator as wrapIterator,
|
|
4
|
+
returnOrigin,
|
|
5
|
+
} from '../utils/time-slicing';
|
|
6
|
+
import type { EmbeddedTSFileGenerator } from '../utils';
|
|
1
7
|
import Namespace from './Namespace__';
|
|
2
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
TranslatorState,
|
|
10
|
+
shiftState,
|
|
11
|
+
withSourceMap,
|
|
12
|
+
indent,
|
|
13
|
+
createCompilerState,
|
|
14
|
+
withSourceMapGenerator,
|
|
15
|
+
withGenerator,
|
|
16
|
+
TranslatorGenerator,
|
|
17
|
+
} from '../translator';
|
|
3
18
|
import translator from '../bak/translator';
|
|
4
19
|
import { ElementToVueOptions } from './ViewElement__';
|
|
5
20
|
import { Structure } from './Structure__';
|
|
@@ -10,6 +25,12 @@ import Match from './Match__';
|
|
|
10
25
|
import BatchAssignment from './BatchAssignment__';
|
|
11
26
|
import CallInterface from './CallInterface__';
|
|
12
27
|
import CallLogic from './CallLogic__';
|
|
28
|
+
import BindAttribute from './BindAttribute__';
|
|
29
|
+
const getBranchCopyUniCode = () => (window as any)?.BranchCopyUniCode
|
|
30
|
+
|
|
31
|
+
const removedViewElementCache: {
|
|
32
|
+
[key: string]: number | bigint;
|
|
33
|
+
} = {} // 临时记录删除的页面元素计数的最大值
|
|
13
34
|
|
|
14
35
|
//================================================================================
|
|
15
36
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -29,11 +50,6 @@ import BindEvent from './BindEvent__';
|
|
|
29
50
|
import Module from './Module__';
|
|
30
51
|
import Frontend from './Frontend__';
|
|
31
52
|
import App from './App__';
|
|
32
|
-
|
|
33
|
-
const getBranchCopyUniCode = () => (window as any)?.BranchCopyUniCode
|
|
34
|
-
const removedViewElementCache : {
|
|
35
|
-
[key: string]: number | bigint;
|
|
36
|
-
}= {} // 临时记录删除的页面元素计数的最大值
|
|
37
53
|
/**
|
|
38
54
|
* 页面
|
|
39
55
|
*/
|
|
@@ -1567,7 +1583,7 @@ export class View extends BaseNode {
|
|
|
1567
1583
|
}
|
|
1568
1584
|
const newPrefix = newName.replace(/\d*$/, '');
|
|
1569
1585
|
const newPrefixNum = removedViewElementCache?.[newPrefix] ? removedViewElementCache[newPrefix] : 1
|
|
1570
|
-
const startNum = newPrefixNum < Number.MAX_SAFE_INTEGER ?
|
|
1586
|
+
const startNum = newPrefixNum < Number.MAX_SAFE_INTEGER ? newPrefixNum as number + 1 : BigInt(newPrefixNum) + BigInt(1);
|
|
1571
1587
|
const viewElementUniqueName = utils.uniqueMax(newName, this.existingViewElement, removedViewElementCache?.[newPrefix] ? startNum : newPrefixNum);
|
|
1572
1588
|
this.existingViewElement.add(viewElementUniqueName);
|
|
1573
1589
|
return viewElementUniqueName;
|
|
@@ -1819,6 +1835,7 @@ export class View extends BaseNode {
|
|
|
1819
1835
|
first: this.children.find((child) => child.isIndex)?.name,
|
|
1820
1836
|
auth: this.auth ? 'loginAuth' : undefined,
|
|
1821
1837
|
viewBindEvents: this.getViewBindEvents(),
|
|
1838
|
+
viewBindSyncAttrs: this.getViewBindSyncAttrs(),
|
|
1822
1839
|
viewExpressions: this.getViewExpressions(),
|
|
1823
1840
|
elements: componentList,
|
|
1824
1841
|
elementsAll: componentListExtra,
|
|
@@ -1837,15 +1854,15 @@ export class View extends BaseNode {
|
|
|
1837
1854
|
methods: {
|
|
1838
1855
|
async onKeyDown(e) {
|
|
1839
1856
|
${this.bindEvents
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1857
|
+
.filter((event) => ['keydown'].includes(event.name))
|
|
1858
|
+
.map((event) => `await this.${event.view.name}_${event.name}(e);`)
|
|
1859
|
+
.join('\n')}
|
|
1843
1860
|
},
|
|
1844
1861
|
async onKeyUp(e) {
|
|
1845
1862
|
${this.bindEvents
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1863
|
+
.filter((event) => ['keyup'].includes(event.name))
|
|
1864
|
+
.map((event) => `await this.${event.view.name}_${event.name}(e);`)
|
|
1865
|
+
.join('\n')}
|
|
1849
1866
|
}
|
|
1850
1867
|
}
|
|
1851
1868
|
};`;
|
|
@@ -1870,7 +1887,7 @@ export class View extends BaseNode {
|
|
|
1870
1887
|
code += translator(definition, this);
|
|
1871
1888
|
code += '};\n';
|
|
1872
1889
|
return code;
|
|
1873
|
-
|
|
1890
|
+
}
|
|
1874
1891
|
|
|
1875
1892
|
genVueTemplate(options?: ElementToVueOptions) {
|
|
1876
1893
|
return this.elements?.map((element) => `${element?.toVue(options)}\n`).join('');
|
|
@@ -1989,9 +2006,7 @@ export class View extends BaseNode {
|
|
|
1989
2006
|
elementsAttrsAll(elements: Array<ViewElement>, componentListExtra: Array<ViewElement>) {
|
|
1990
2007
|
if (elements) {
|
|
1991
2008
|
elements.forEach((item: ViewElement) => {
|
|
1992
|
-
|
|
1993
|
-
componentListExtra.push(item);
|
|
1994
|
-
}
|
|
2009
|
+
componentListExtra.push(item);
|
|
1995
2010
|
if (item.children.length > 0) {
|
|
1996
2011
|
this.elementsAttrsAll(item.children, componentListExtra);
|
|
1997
2012
|
}
|
|
@@ -1999,8 +2014,9 @@ export class View extends BaseNode {
|
|
|
1999
2014
|
}
|
|
2000
2015
|
}
|
|
2001
2016
|
|
|
2002
|
-
@
|
|
2003
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
2017
|
+
@withSourceMapGenerator
|
|
2018
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
2019
|
+
const self = this;
|
|
2004
2020
|
function chineseTsName(name: string) {
|
|
2005
2021
|
let tsName = name;
|
|
2006
2022
|
// 匹配所有特殊字符都转为_
|
|
@@ -2009,16 +2025,15 @@ export class View extends BaseNode {
|
|
|
2009
2025
|
}
|
|
2010
2026
|
// 获取虚拟logic的参数和内容
|
|
2011
2027
|
// 用作展示和tots查找引用
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
let code = `export namespace ${this.tsName} {\n`;
|
|
2028
|
+
self.getElementLogicRoot();
|
|
2029
|
+
let code = `export namespace ${self.tsName} {\n`;
|
|
2015
2030
|
// 角色
|
|
2016
|
-
if (Array.isArray(
|
|
2031
|
+
if (Array.isArray(self.bindRoles) && self.bindRoles.length) {
|
|
2017
2032
|
code += indent((state?.tabSize || 0) + 1);
|
|
2018
2033
|
code += 'export let __bindRoles = [\n';
|
|
2019
|
-
|
|
2034
|
+
yield* wrapForEach(self.bindRoles, function* warpForEachGenerator(role) {
|
|
2020
2035
|
code += indent((state?.tabSize || 0) + 1);
|
|
2021
|
-
code += `${
|
|
2036
|
+
code += `${self.app.getNamespace()}.roles.${chineseTsName(role)}.${chineseTsName(role)},`;
|
|
2022
2037
|
code += '\n';
|
|
2023
2038
|
});
|
|
2024
2039
|
code += '\n';
|
|
@@ -2027,24 +2042,24 @@ export class View extends BaseNode {
|
|
|
2027
2042
|
}
|
|
2028
2043
|
// 需要类型推导的局部变量/返回值需要调整申明顺序
|
|
2029
2044
|
const advanceMap: Map<Variable, Assignment | BatchAssignment> = new Map();
|
|
2030
|
-
|
|
2045
|
+
yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
|
|
2031
2046
|
if (el && (el instanceof BatchAssignment || (el instanceof Assignment && el.left?.name))) {
|
|
2032
2047
|
// 子页面内部逻辑过滤
|
|
2033
|
-
if (el.view !==
|
|
2048
|
+
if (el.view !== self) return;
|
|
2034
2049
|
if (el instanceof Assignment) {
|
|
2035
|
-
const advanceVar =
|
|
2050
|
+
const advanceVar = self.variables?.find(
|
|
2036
2051
|
(variable) => !variable.typeAnnotation && el.left?.name === variable.name,
|
|
2037
2052
|
);
|
|
2038
2053
|
if (advanceVar && !advanceMap.get(advanceVar)) {
|
|
2039
2054
|
advanceMap.set(advanceVar, el);
|
|
2040
2055
|
}
|
|
2041
2056
|
} else if (el instanceof BatchAssignment) {
|
|
2042
|
-
el.assignmentLines
|
|
2057
|
+
yield* wrapForEach(el.assignmentLines, function* warpForEachGenerator({ leftIndex }) {
|
|
2043
2058
|
const leftCode =
|
|
2044
2059
|
leftIndex.length === 1
|
|
2045
|
-
? el.left?.expression?.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2046
|
-
: el.left?.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2047
|
-
const advanceVar =
|
|
2060
|
+
? yield* el.left?.expression?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('')
|
|
2061
|
+
: yield* el.left?.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
2062
|
+
const advanceVar = self.variables?.find(
|
|
2048
2063
|
(variable) => !variable.typeAnnotation && leftCode === variable.name,
|
|
2049
2064
|
);
|
|
2050
2065
|
if (advanceVar && !advanceMap.get(advanceVar)) {
|
|
@@ -2054,40 +2069,40 @@ export class View extends BaseNode {
|
|
|
2054
2069
|
}
|
|
2055
2070
|
}
|
|
2056
2071
|
});
|
|
2057
|
-
if (Array.isArray(
|
|
2058
|
-
|
|
2072
|
+
if (Array.isArray(self.params)) {
|
|
2073
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param) {
|
|
2059
2074
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
2060
|
-
code += param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2075
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2061
2076
|
code += ';\n';
|
|
2062
2077
|
});
|
|
2063
2078
|
}
|
|
2064
|
-
if (Array.isArray(
|
|
2065
|
-
|
|
2079
|
+
if (Array.isArray(self.variables)) {
|
|
2080
|
+
yield* wrapForEach(self.variables, function* warpForEachGenerator(variable) {
|
|
2066
2081
|
if (!advanceMap.get(variable)) {
|
|
2067
2082
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
2068
|
-
code += variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2083
|
+
code += yield* variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2069
2084
|
code += ';\n';
|
|
2070
2085
|
}
|
|
2071
2086
|
});
|
|
2072
2087
|
}
|
|
2073
|
-
advanceMap.
|
|
2088
|
+
yield* wrapIterator(advanceMap.entries(), function* warpForEachGenerator([variable, assignment]) {
|
|
2074
2089
|
code += `${indent((state?.tabSize || 0) + 1)}// @ts-ignore\n`;
|
|
2075
2090
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
2076
|
-
code += variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2091
|
+
code += yield* variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2077
2092
|
code += ' = ';
|
|
2078
2093
|
if (assignment instanceof BatchAssignment) {
|
|
2079
|
-
assignment.assignmentLines
|
|
2094
|
+
yield* wrapForEach(assignment.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
2080
2095
|
const leftCode =
|
|
2081
2096
|
leftIndex.length === 1
|
|
2082
|
-
? assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2083
|
-
: assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2097
|
+
? yield* assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2098
|
+
: yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
2084
2099
|
if (leftCode === variable.name) {
|
|
2085
2100
|
const rightNode =
|
|
2086
2101
|
rightIndex.length === 1
|
|
2087
2102
|
? assignment.rights[rightIndex[0]]?.expression
|
|
2088
2103
|
: assignment.rights[rightIndex[0]]?.members[rightIndex[1]];
|
|
2089
|
-
const rightCode = rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2090
|
-
code +=
|
|
2104
|
+
const rightCode = yield* rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
2105
|
+
code += yield* self.getRightCode(rightCode, assignment, rightNode);
|
|
2091
2106
|
}
|
|
2092
2107
|
});
|
|
2093
2108
|
} else {
|
|
@@ -2103,18 +2118,17 @@ export class View extends BaseNode {
|
|
|
2103
2118
|
}
|
|
2104
2119
|
rightCode +=
|
|
2105
2120
|
assignment.right && assignment.right.toEmbeddedTS
|
|
2106
|
-
? assignment.right.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2121
|
+
? yield* assignment.right.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2107
2122
|
: '__RIGHT__';
|
|
2108
|
-
code +=
|
|
2123
|
+
code += yield* self.getRightCode(rightCode, assignment, assignment.right);
|
|
2109
2124
|
}
|
|
2110
2125
|
code += ';\n';
|
|
2111
2126
|
});
|
|
2112
|
-
|
|
2113
2127
|
// elements类型声明定义
|
|
2114
2128
|
code += `interface __elements {\n`;
|
|
2115
2129
|
// 生成所有的name和类型定义
|
|
2116
|
-
|
|
2117
|
-
code += element.toEmbeddedTSDefinition(
|
|
2130
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(element) {
|
|
2131
|
+
code += yield* element.toEmbeddedTSDefinition(
|
|
2118
2132
|
shiftState(state, code, {
|
|
2119
2133
|
tabSize: (state?.tabSize || 0) + 1,
|
|
2120
2134
|
}),
|
|
@@ -2122,40 +2136,37 @@ export class View extends BaseNode {
|
|
|
2122
2136
|
});
|
|
2123
2137
|
code += `${indent((state?.tabSize || 0) + 1)}}\n`;
|
|
2124
2138
|
code += `let __elements: __elements;\n`;
|
|
2125
|
-
|
|
2126
|
-
if (Array.isArray(this.elements)) {
|
|
2139
|
+
if (Array.isArray(self.elements)) {
|
|
2127
2140
|
code += `${indent((state?.tabSize || 0) + 1)}interface `;
|
|
2128
2141
|
code += `__elements_completionProperty {\n`;
|
|
2129
2142
|
const componentList: Array<ViewElement> = [];
|
|
2130
|
-
|
|
2143
|
+
self.elementsAttrs(self.elements, componentList);
|
|
2131
2144
|
const variableList: string[] = [];
|
|
2132
|
-
|
|
2133
|
-
code += item.toEmbeddedTSVariableDefinition(shiftState(state, code, { inline: true }), variableList);
|
|
2145
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(item) {
|
|
2146
|
+
code += yield* item.toEmbeddedTSVariableDefinition(shiftState(state, code, { inline: true }), variableList);
|
|
2134
2147
|
});
|
|
2135
2148
|
code += indent((state?.tabSize || 0) + 1) + `}\n`;
|
|
2136
2149
|
code += indent((state?.tabSize || 0) + 1);
|
|
2137
2150
|
code += `let __elements_completionProperty: __elements_completionProperty;\n`;
|
|
2138
|
-
|
|
2139
2151
|
code += indent((state?.tabSize || 0) + 1);
|
|
2140
2152
|
code += `let __elements_variable_function = {\n`;
|
|
2141
|
-
|
|
2142
|
-
code += item.toEmbeddedTSVariableFunctionDefinition(shiftState(state, code, { inline: true }));
|
|
2153
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(item) {
|
|
2154
|
+
code += yield* item.toEmbeddedTSVariableFunctionDefinition(shiftState(state, code, { inline: true }));
|
|
2143
2155
|
});
|
|
2144
2156
|
code += indent((state?.tabSize || 0) + 1) + `}\n`;
|
|
2145
|
-
|
|
2146
2157
|
code += indent((state?.tabSize || 0) + 1);
|
|
2147
2158
|
code += `let __elements_stashFunctionVariable = {\n`;
|
|
2148
|
-
variableList
|
|
2159
|
+
yield* wrapForEach(variableList, function* warpForEachGenerator(item) {
|
|
2149
2160
|
code += indent((state?.tabSize || 0) + 2);
|
|
2150
2161
|
code += `${item}`;
|
|
2151
2162
|
});
|
|
2152
2163
|
code += indent((state?.tabSize || 0) + 1) + `}\n`;
|
|
2153
2164
|
}
|
|
2154
2165
|
// 逻辑
|
|
2155
|
-
if (Array.isArray(
|
|
2166
|
+
if (Array.isArray(self.logics) && self.logics.length) {
|
|
2156
2167
|
code += indent((state?.tabSize || 0) + 1);
|
|
2157
|
-
|
|
2158
|
-
code += logic.toEmbeddedTS(
|
|
2168
|
+
yield* wrapForEach(self.logics, function* warpForEachGenerator(logic) {
|
|
2169
|
+
code += yield* logic.toEmbeddedTS(
|
|
2159
2170
|
shiftState(state, code, {
|
|
2160
2171
|
tabSize: (state?.tabSize || 0) + 2,
|
|
2161
2172
|
}),
|
|
@@ -2166,9 +2177,9 @@ export class View extends BaseNode {
|
|
|
2166
2177
|
code += indent((state?.tabSize || 0) + 1);
|
|
2167
2178
|
}
|
|
2168
2179
|
// 事件
|
|
2169
|
-
if (Array.isArray(
|
|
2170
|
-
|
|
2171
|
-
code += event.toEmbeddedTS(
|
|
2180
|
+
if (Array.isArray(self.bindEvents)) {
|
|
2181
|
+
yield* wrapForEach(self.bindEvents, function* warpForEachGenerator(event) {
|
|
2182
|
+
code += yield* event.toEmbeddedTS(
|
|
2172
2183
|
shiftState(state, code, {
|
|
2173
2184
|
tabSize: state?.tabSize || 0,
|
|
2174
2185
|
}),
|
|
@@ -2177,18 +2188,16 @@ export class View extends BaseNode {
|
|
|
2177
2188
|
code += '\n';
|
|
2178
2189
|
});
|
|
2179
2190
|
}
|
|
2180
|
-
|
|
2181
2191
|
// render函数
|
|
2182
2192
|
code += `\n${indent((state?.tabSize || 0) + 1)}`;
|
|
2183
2193
|
code += `export function __render(`;
|
|
2184
2194
|
code += `){\n`;
|
|
2185
2195
|
code += indent(state?.tabSize || 0);
|
|
2186
|
-
|
|
2187
2196
|
// elements 元素
|
|
2188
|
-
if (Array.isArray(
|
|
2197
|
+
if (Array.isArray(self.elements)) {
|
|
2189
2198
|
// 生成嵌套式的内容
|
|
2190
|
-
|
|
2191
|
-
code += element.toEmbeddedTS(
|
|
2199
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(element) {
|
|
2200
|
+
code += yield* element.toEmbeddedTS(
|
|
2192
2201
|
shiftState(state, code, {
|
|
2193
2202
|
tabSize: (state?.tabSize || 0) + 3,
|
|
2194
2203
|
}),
|
|
@@ -2196,20 +2205,16 @@ export class View extends BaseNode {
|
|
|
2196
2205
|
code += '\n';
|
|
2197
2206
|
});
|
|
2198
2207
|
}
|
|
2199
|
-
|
|
2200
2208
|
code += `\n${indent((state?.tabSize || 0) + 1)}}\n`;
|
|
2201
|
-
|
|
2202
|
-
if (Array.isArray(this.params)) {
|
|
2209
|
+
if (Array.isArray(self.params)) {
|
|
2203
2210
|
code += `${indent((state?.tabSize || 0) + 1)}export function $destination(options: {`;
|
|
2204
|
-
|
|
2211
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
2205
2212
|
code += `${param.name}?: `;
|
|
2206
|
-
code += param.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
2213
|
+
code += yield* param.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
2207
2214
|
code += ', ';
|
|
2208
2215
|
});
|
|
2209
|
-
|
|
2210
2216
|
// 锚点
|
|
2211
2217
|
code += `_anchor?: nasl.core.String`;
|
|
2212
|
-
|
|
2213
2218
|
code += '}){}\n';
|
|
2214
2219
|
}
|
|
2215
2220
|
code += `${indent(state?.tabSize || 0)}}\n`;
|
|
@@ -2327,14 +2332,14 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2327
2332
|
return code;
|
|
2328
2333
|
}
|
|
2329
2334
|
|
|
2330
|
-
toEmbeddedTSFile() {
|
|
2335
|
+
*toEmbeddedTSFile(): EmbeddedTSFileGenerator {
|
|
2331
2336
|
let code = `namespace ${this.getTsNamespace()} {\n`;
|
|
2332
2337
|
const state = createCompilerState(code, {
|
|
2333
2338
|
tabSize: 1,
|
|
2334
2339
|
});
|
|
2335
2340
|
|
|
2336
2341
|
try {
|
|
2337
|
-
code += this.toEmbeddedTS(state);
|
|
2342
|
+
code += yield* this.toEmbeddedTS(state);
|
|
2338
2343
|
} catch (err) {
|
|
2339
2344
|
code += '';
|
|
2340
2345
|
console.log(err);
|
|
@@ -2464,6 +2469,20 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2464
2469
|
return bindEvents;
|
|
2465
2470
|
}
|
|
2466
2471
|
|
|
2472
|
+
// 获取页面内所有开启了双向绑定的属性
|
|
2473
|
+
getViewBindSyncAttrs() {
|
|
2474
|
+
const bindSyncAttrs: BindAttribute[] = [];
|
|
2475
|
+
this.elements.forEach((item) => {
|
|
2476
|
+
utils.traverse(
|
|
2477
|
+
(current) => {
|
|
2478
|
+
bindSyncAttrs.push(...(current.node as ViewElement).getSyncBindAttrs())
|
|
2479
|
+
},
|
|
2480
|
+
{ node: item },
|
|
2481
|
+
);
|
|
2482
|
+
});
|
|
2483
|
+
return bindSyncAttrs;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2467
2486
|
// 获取页面上需要替换的表达式
|
|
2468
2487
|
getViewExpressions() {
|
|
2469
2488
|
const bindExpressions: any[] = [];
|
|
@@ -2588,7 +2607,7 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2588
2607
|
|
|
2589
2608
|
const prefix = viewElement?.name.replace(/\d*$/, '');
|
|
2590
2609
|
let lastDigit = viewElement?.name.match(/\d+$/)?.[0];
|
|
2591
|
-
if(lastDigit === undefined) return;
|
|
2610
|
+
if (lastDigit === undefined) return;
|
|
2592
2611
|
|
|
2593
2612
|
//@ts-ignore
|
|
2594
2613
|
lastDigit = lastDigit < Number.MAX_SAFE_INTEGER ? parseInt(lastDigit) : BigInt(lastDigit);
|
|
@@ -2596,15 +2615,15 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2596
2615
|
if (removedViewElementCache?.[prefix]) {
|
|
2597
2616
|
//@ts-ignore
|
|
2598
2617
|
if (lastDigit > removedViewElementCache[prefix])
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
}else {
|
|
2618
|
+
//@ts-ignore
|
|
2619
|
+
removedViewElementCache[prefix] = lastDigit;
|
|
2620
|
+
} else {
|
|
2602
2621
|
//@ts-ignore
|
|
2603
2622
|
removedViewElementCache[prefix] = lastDigit;
|
|
2604
2623
|
}
|
|
2605
2624
|
}
|
|
2606
2625
|
|
|
2607
|
-
getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any)
|
|
2626
|
+
*getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any) {
|
|
2608
2627
|
code = code.replaceAll('\n', ' ');
|
|
2609
2628
|
const logic = assignment.logic;
|
|
2610
2629
|
const logicRtn = logic?.returns[0];
|
|
@@ -2637,7 +2656,7 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2637
2656
|
|
|
2638
2657
|
// 处理 current.item、current1.item 等数据
|
|
2639
2658
|
if (/current(\d)*\.item/.test(code)) {
|
|
2640
|
-
code = this.handleCurrentItemCode(code, logic);
|
|
2659
|
+
code = yield* this.handleCurrentItemCode(code, logic);
|
|
2641
2660
|
return code;
|
|
2642
2661
|
}
|
|
2643
2662
|
|
|
@@ -2682,16 +2701,16 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2682
2701
|
return viewElements;
|
|
2683
2702
|
}
|
|
2684
2703
|
|
|
2685
|
-
handleCurrentItemCode(code: string, logic: Logic)
|
|
2704
|
+
*handleCurrentItemCode(code: string, logic: Logic) {
|
|
2686
2705
|
const viewElementsWithDataSource: ViewElement[] = this.getAncestorViewElementsWithDataSource(logic);
|
|
2687
|
-
viewElementsWithDataSource
|
|
2706
|
+
yield* wrapForEach(viewElementsWithDataSource, function* wrapForEach(viewElement, index) {
|
|
2688
2707
|
const currentIndex = viewElementsWithDataSource.length - 1 - index;
|
|
2689
2708
|
const currentItemCode = `current${currentIndex === 0 ? '' : currentIndex}.item`;
|
|
2690
2709
|
if (code.includes(currentItemCode)) {
|
|
2691
2710
|
const dataSource = viewElement.bindAttrs.find((bAttr) => bAttr.name === 'data-source');
|
|
2692
2711
|
if (dataSource) {
|
|
2693
2712
|
const view = viewElement.getAncestor('View') as View;
|
|
2694
|
-
const dataSourceTS = dataSource.expression.toEmbeddedTS();
|
|
2713
|
+
const dataSourceTS = yield* dataSource.expression.toEmbeddedTS();
|
|
2695
2714
|
const logic = view.logics.find((logic) => logic.name === dataSourceTS);
|
|
2696
2715
|
if (logic) {
|
|
2697
2716
|
code = code.replaceAll(
|
|
@@ -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
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
4
14
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -269,29 +279,28 @@ export class WhileStatement extends LogicItem {
|
|
|
269
279
|
return code;
|
|
270
280
|
}
|
|
271
281
|
|
|
272
|
-
@
|
|
273
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
282
|
+
@withSourceMapGenerator
|
|
283
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
284
|
+
const self = this;
|
|
274
285
|
let code = '';
|
|
275
286
|
code += 'while (nasl.core.ensureBoolean(';
|
|
276
|
-
code +=
|
|
277
|
-
?
|
|
287
|
+
code += self.test
|
|
288
|
+
? yield* self.test.toEmbeddedTS(
|
|
278
289
|
shiftState(state, code, {
|
|
279
290
|
tabSize: 0,
|
|
280
291
|
}),
|
|
281
292
|
)
|
|
282
293
|
: '__IDENTIFIER__';
|
|
283
294
|
code += ')) {\n';
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
code += `${logicItem.toEmbeddedTS(
|
|
295
|
+
if (Array.isArray(self.body)) {
|
|
296
|
+
yield* wrapForEach(self.body, function* warpForEachGenerator(logicItem) {
|
|
297
|
+
code += `${yield* logicItem.toEmbeddedTS(
|
|
288
298
|
shiftState(state, code, {
|
|
289
299
|
tabSize: (state?.tabSize || 0) + 1,
|
|
290
300
|
}),
|
|
291
301
|
)};\n`;
|
|
292
302
|
});
|
|
293
303
|
}
|
|
294
|
-
|
|
295
304
|
code += `${indent(state?.tabSize || 0)}}\n`;
|
|
296
305
|
return code;
|
|
297
306
|
}
|
package/src/concepts/types__.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as tsProtocol from 'typescript/lib/protocol';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseNode } from '../concepts';
|
|
3
|
+
import { timeSlicingWithList } from '../utils';
|
|
3
4
|
|
|
4
5
|
// export interface TypeCheckNote {
|
|
5
6
|
// status: string,
|
|
@@ -99,9 +100,7 @@ export class DiagnosticManager {
|
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
pushAll(records: DiagnosticRecord[]) {
|
|
102
|
-
|
|
103
|
-
this.push(record);
|
|
104
|
-
}
|
|
103
|
+
return timeSlicingWithList(records, (record) => this.push(record));
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
filterDiagnostics(showTSError?: boolean) {
|