@lcap/nasl 3.3.3-beta.5 → 3.3.3-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/bak/translator.js +73 -15
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +11 -0
- package/out/common/BaseNode.js +51 -0
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/index.d.ts +1 -0
- package/out/common/index.js +1 -0
- package/out/common/index.js.map +1 -1
- package/out/common/utils.d.ts +2 -0
- package/out/common/utils.js +18 -0
- package/out/common/utils.js.map +1 -0
- package/out/concepts/Abort__.d.ts +2 -2
- package/out/concepts/Abort__.js +6 -2
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/Anchor__.d.ts +2 -2
- package/out/concepts/Anchor__.js +11 -7
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +3 -3
- package/out/concepts/AnonymousFunction__.js +37 -23
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.js +137 -69
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +2 -2
- package/out/concepts/Argument__.js +18 -13
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +2 -2
- package/out/concepts/Assignee__.js +33 -22
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +2 -2
- package/out/concepts/AssignmentLine__.js +3 -2
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +2 -2
- package/out/concepts/Assignment__.js +16 -12
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js +6 -3
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +2 -2
- package/out/concepts/AuthLogicForCallInterface__.js +62 -78
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +5 -8
- package/out/concepts/BackendVariable__.js +23 -18
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.d.ts +4 -7
- package/out/concepts/Backend__.js +16 -11
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.d.ts +2 -2
- package/out/concepts/BatchAssignment__.js +30 -22
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +2 -2
- package/out/concepts/BinaryExpression__.js +30 -18
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +10 -4
- package/out/concepts/BindAttribute__.js +144 -43
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +2 -2
- package/out/concepts/BindDirective__.js +16 -11
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +4 -7
- package/out/concepts/BindEvent__.js +32 -24
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +2 -2
- package/out/concepts/BindStyle__.js +15 -10
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +2 -2
- package/out/concepts/BooleanLiteral__.js +2 -2
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +2 -2
- package/out/concepts/CallAuthInterface__.js +36 -31
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +2 -2
- package/out/concepts/CallConnector__.js +25 -23
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +2 -2
- package/out/concepts/CallFunction__.js +31 -22
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +2 -2
- package/out/concepts/CallInterface__.js +16 -21
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +2 -3
- package/out/concepts/CallLogic__.js +47 -50
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +4 -4
- package/out/concepts/CallQueryComponent__.js +50 -42
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.d.ts +2 -2
- package/out/concepts/Comment__.js +3 -2
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +6 -3
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +6 -3
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +4 -7
- package/out/concepts/ConfigProperty__.js +18 -13
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +6 -3
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +4 -7
- package/out/concepts/Connection__.js +12 -8
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/Connector__.js +30 -15
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.d.ts +3 -3
- package/out/concepts/Constant__.js +18 -13
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +4 -7
- package/out/concepts/DataSource__.js +13 -9
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +3 -3
- package/out/concepts/Destination__.js +35 -29
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.d.ts +2 -2
- package/out/concepts/End__.js +17 -13
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +2 -2
- package/out/concepts/EntityIndex__.js +4 -3
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +2 -2
- package/out/concepts/EntityProperty__.js +22 -15
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +4 -7
- package/out/concepts/Entity__.js +29 -21
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +2 -2
- package/out/concepts/EnumItem__.js +4 -3
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +4 -7
- package/out/concepts/Enum__.js +16 -11
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +6 -3
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +2 -2
- package/out/concepts/ExternalDestination__.js +13 -8
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +2 -2
- package/out/concepts/ForEachStatement__.js +26 -18
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.js +18 -10
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +4 -7
- package/out/concepts/Frontend__.js +37 -21
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.d.ts +3 -3
- package/out/concepts/Function__.js +52 -33
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -2
- package/out/concepts/Identifier__.js +23 -18
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +2 -2
- package/out/concepts/IfStatement__.js +18 -13
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Integration__.js +17 -9
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.d.ts +2 -2
- package/out/concepts/InterfaceParam__.js +12 -8
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +4 -7
- package/out/concepts/Interface__.js +44 -33
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.d.ts +2 -2
- package/out/concepts/JSBlock__.js +3 -2
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.d.ts +2 -2
- package/out/concepts/JavaLogic__.js +6 -2
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +2 -2
- package/out/concepts/LogicItem__.js +7 -3
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +8 -11
- package/out/concepts/Logic__.js +141 -136
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +35 -27
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +2 -2
- package/out/concepts/Match__.js +29 -24
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +2 -2
- package/out/concepts/MemberExpression__.js +34 -27
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +4 -7
- package/out/concepts/MetadataType__.js +23 -15
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.js +6 -3
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.js +6 -3
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/Namespace__.js +66 -33
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +6 -6
- package/out/concepts/NewComposite__.js +95 -82
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +5 -5
- package/out/concepts/NewList__.js +42 -32
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +4 -4
- package/out/concepts/NewMap__.js +51 -41
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.d.ts +2 -2
- package/out/concepts/New__.js +3 -2
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/NullLiteral__.d.ts +2 -2
- package/out/concepts/NullLiteral__.js +2 -2
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +2 -2
- package/out/concepts/NumericLiteral__.js +12 -7
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +2 -2
- package/out/concepts/OqlQueryComponent__.js +22 -17
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.d.ts +8 -11
- package/out/concepts/OverriddenLogic__.js +135 -130
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.d.ts +3 -3
- package/out/concepts/Param__.js +29 -24
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +12 -6
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +2 -2
- package/out/concepts/ProcessElement__.js +92 -66
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.d.ts +2 -1
- package/out/concepts/ProcessOutcome__.js +5 -4
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.d.ts +2 -1
- package/out/concepts/ProcessOutcomes__.js +6 -5
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.d.ts +4 -7
- package/out/concepts/Process__.js +51 -34
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +2 -2
- package/out/concepts/QueryAggregateExpression__.js +8 -5
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +2 -2
- package/out/concepts/QueryFieldExpression__.js +5 -4
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +2 -2
- package/out/concepts/QueryFromExpression__.js +14 -9
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +2 -1
- package/out/concepts/QueryGroupByExpression__.js +12 -8
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +2 -2
- package/out/concepts/QueryJoinExpression__.js +18 -13
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +2 -2
- package/out/concepts/QueryLimitExpression__.js +12 -8
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +2 -2
- package/out/concepts/QueryOrderByExpression__.js +12 -8
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +6 -3
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Return__.d.ts +3 -3
- package/out/concepts/Return__.js +21 -16
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +4 -7
- package/out/concepts/Role__.js +7 -6
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +2 -2
- package/out/concepts/SelectMembers__.js +9 -5
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/Slot__.js +6 -3
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +2 -2
- package/out/concepts/SqlQueryComponent__.js +18 -13
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.d.ts +2 -2
- package/out/concepts/Start__.js +2 -2
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +2 -2
- package/out/concepts/StringInterpolation__.js +13 -8
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +2 -2
- package/out/concepts/StringLiteral__.js +4 -3
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +2 -2
- package/out/concepts/StructureProperty__.js +14 -10
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +4 -7
- package/out/concepts/Structure__.js +22 -14
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +2 -2
- package/out/concepts/SwitchCase__.js +18 -13
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.d.ts +2 -2
- package/out/concepts/SwitchStatement__.js +14 -9
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/TriggerEvent__.js +6 -3
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +4 -7
- package/out/concepts/TriggerLauncher__.js +7 -6
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -2
- package/out/concepts/TypeAnnotation__.js +61 -29
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +2 -2
- package/out/concepts/TypeParam__.js +4 -3
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +2 -2
- package/out/concepts/UnaryExpression__.js +18 -10
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +2 -1
- package/out/concepts/Unparsed__.js +2 -2
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +2 -2
- package/out/concepts/ValidationRule__.js +17 -12
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +5 -8
- package/out/concepts/Variable__.js +23 -18
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +7 -6
- package/out/concepts/ViewElement__.js +139 -101
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +8 -9
- package/out/concepts/View__.js +73 -62
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.d.ts +2 -2
- package/out/concepts/WhileStatement__.js +9 -7
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/manager/diagnostic.d.ts +1 -1
- package/out/manager/diagnostic.js +2 -3
- package/out/manager/diagnostic.js.map +1 -1
- package/out/natural/transformTSCode.d.ts +2 -2
- package/out/server/naslServer.d.ts +46 -55
- package/out/server/naslServer.js +302 -449
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +1 -1
- package/out/server/translator.js.map +1 -1
- package/out/templator/genCreateBlock.js +4 -4
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +6 -6
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +4 -4
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +2 -2
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +4 -4
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/translator/types.d.ts +16 -3
- package/out/translator/utils.d.ts +19 -1
- package/out/translator/utils.js +71 -2
- package/out/translator/utils.js.map +1 -1
- package/out/utils/time-slicing/constant.d.ts +35 -0
- package/out/utils/time-slicing/constant.js +40 -0
- package/out/utils/time-slicing/constant.js.map +1 -0
- package/out/utils/time-slicing/controller.d.ts +53 -0
- package/out/utils/time-slicing/controller.js +280 -0
- package/out/utils/time-slicing/controller.js.map +1 -0
- package/out/utils/time-slicing/index.d.ts +5 -0
- package/out/utils/time-slicing/index.js +26 -0
- package/out/utils/time-slicing/index.js.map +1 -0
- package/out/utils/time-slicing/page-state.d.ts +2 -0
- package/out/utils/time-slicing/page-state.js +14 -0
- package/out/utils/time-slicing/page-state.js.map +1 -0
- package/out/utils/time-slicing/performance.d.ts +11 -0
- package/out/utils/time-slicing/performance.js +51 -0
- package/out/utils/time-slicing/performance.js.map +1 -0
- package/out/utils/time-slicing/runner.d.ts +12 -0
- package/out/utils/time-slicing/runner.js +53 -0
- package/out/utils/time-slicing/runner.js.map +1 -0
- package/out/utils/time-slicing/tool.d.ts +24 -0
- package/out/utils/time-slicing/tool.js +47 -0
- package/out/utils/time-slicing/tool.js.map +1 -0
- package/out/utils/time-slicing/utils.d.ts +62 -0
- package/out/utils/time-slicing/utils.js +47 -0
- package/out/utils/time-slicing/utils.js.map +1 -0
- package/out/utils/time-slicing/wrapper.d.ts +18 -0
- package/out/utils/time-slicing/wrapper.js +55 -0
- package/out/utils/time-slicing/wrapper.js.map +1 -0
- package/out/utils/types.d.ts +7 -0
- package/package.json +1 -1
- package/src/bak/translator.js +75 -16
- package/src/common/BaseNode.ts +67 -6
- package/src/common/index.ts +1 -0
- package/src/common/utils.ts +17 -0
- package/src/concepts/Abort__.ts +12 -3
- package/src/concepts/Anchor__.ts +21 -8
- package/src/concepts/AnonymousFunction__.ts +45 -31
- package/src/concepts/App__.ts +137 -69
- package/src/concepts/Argument__.ts +31 -14
- package/src/concepts/Assignee__.ts +44 -23
- package/src/concepts/AssignmentLine__.ts +13 -3
- package/src/concepts/Assignment__.ts +26 -14
- package/src/concepts/Attribute__.ts +6 -3
- package/src/concepts/AuthLogicForCallInterface__.ts +69 -87
- package/src/concepts/BackendVariable__.ts +34 -19
- package/src/concepts/Backend__.ts +33 -12
- package/src/concepts/BatchAssignment__.ts +41 -23
- package/src/concepts/BinaryExpression__.ts +40 -20
- package/src/concepts/BindAttribute__.ts +151 -49
- package/src/concepts/BindDirective__.ts +25 -12
- package/src/concepts/BindEvent__.ts +43 -32
- package/src/concepts/BindStyle__.ts +24 -11
- package/src/concepts/BooleanLiteral__.ts +11 -3
- package/src/concepts/CallAuthInterface__.ts +45 -34
- package/src/concepts/CallConnector__.ts +34 -26
- package/src/concepts/CallFunction__.ts +34 -23
- package/src/concepts/CallInterface__.ts +25 -30
- package/src/concepts/CallLogic__.ts +60 -67
- package/src/concepts/CallQueryComponent__.ts +60 -52
- package/src/concepts/Comment__.ts +13 -3
- package/src/concepts/CompletionProperty__.ts +6 -3
- package/src/concepts/ConfigGroup__.ts +6 -3
- package/src/concepts/ConfigProperty__.ts +28 -15
- package/src/concepts/Configuration__.ts +6 -3
- package/src/concepts/Connection__.ts +28 -9
- package/src/concepts/Connector__.ts +30 -15
- package/src/concepts/Constant__.ts +28 -14
- package/src/concepts/DataSource__.ts +22 -10
- package/src/concepts/Destination__.ts +45 -36
- package/src/concepts/End__.ts +24 -15
- package/src/concepts/EntityIndex__.ts +13 -4
- package/src/concepts/EntityProperty__.ts +33 -17
- package/src/concepts/Entity__.ts +40 -25
- package/src/concepts/EnumItem__.ts +13 -4
- package/src/concepts/Enum__.ts +27 -13
- package/src/concepts/Event__.ts +6 -3
- package/src/concepts/ExternalDestination__.ts +22 -10
- package/src/concepts/ForEachStatement__.ts +36 -20
- package/src/concepts/FrontendLibrary__.ts +18 -10
- package/src/concepts/Frontend__.ts +48 -22
- package/src/concepts/Function__.ts +60 -36
- package/src/concepts/Identifier__.ts +32 -23
- package/src/concepts/IfStatement__.ts +28 -17
- package/src/concepts/Integration__.ts +17 -9
- package/src/concepts/InterfaceParam__.ts +22 -9
- package/src/concepts/Interface__.ts +55 -37
- package/src/concepts/JSBlock__.ts +12 -3
- package/src/concepts/JavaLogic__.ts +13 -3
- package/src/concepts/LogicItem__.ts +13 -4
- package/src/concepts/Logic__.ts +159 -149
- package/src/concepts/MatchCase__.ts +45 -32
- package/src/concepts/Match__.ts +39 -28
- package/src/concepts/MemberExpression__.ts +43 -28
- package/src/concepts/MetadataType__.ts +34 -16
- package/src/concepts/MsgTriggerEvent__.ts +6 -3
- package/src/concepts/MsgTriggerLauncher__.ts +6 -3
- package/src/concepts/Namespace__.ts +66 -33
- package/src/concepts/NewComposite__.ts +106 -87
- package/src/concepts/NewList__.ts +52 -38
- package/src/concepts/NewMap__.ts +61 -48
- package/src/concepts/New__.ts +13 -3
- package/src/concepts/NullLiteral__.ts +11 -3
- package/src/concepts/NumericLiteral__.ts +21 -8
- package/src/concepts/OqlQueryComponent__.ts +32 -21
- package/src/concepts/OverriddenLogic__.ts +153 -143
- package/src/concepts/Param__.ts +48 -34
- package/src/concepts/ProcessComponent__.ts +12 -6
- package/src/concepts/ProcessElement__.ts +102 -76
- package/src/concepts/ProcessOutcome__.ts +16 -8
- package/src/concepts/ProcessOutcomes__.ts +17 -9
- package/src/concepts/Process__.ts +62 -41
- package/src/concepts/QueryAggregateExpression__.ts +17 -6
- package/src/concepts/QueryFieldExpression__.ts +14 -5
- package/src/concepts/QueryFromExpression__.ts +24 -10
- package/src/concepts/QueryGroupByExpression__.ts +20 -9
- package/src/concepts/QueryJoinExpression__.ts +28 -14
- package/src/concepts/QueryLimitExpression__.ts +22 -9
- package/src/concepts/QueryOrderByExpression__.ts +23 -9
- package/src/concepts/QuerySelectExpression__.ts +6 -3
- package/src/concepts/Return__.ts +31 -17
- package/src/concepts/Role__.ts +17 -8
- package/src/concepts/SelectMembers__.ts +19 -6
- package/src/concepts/Slot__.ts +6 -3
- package/src/concepts/SqlQueryComponent__.ts +28 -14
- package/src/concepts/Start__.ts +11 -3
- package/src/concepts/StringInterpolation__.ts +16 -8
- package/src/concepts/StringLiteral__.ts +13 -4
- package/src/concepts/StructureProperty__.ts +24 -11
- package/src/concepts/Structure__.ts +33 -16
- package/src/concepts/SwitchCase__.ts +28 -17
- package/src/concepts/SwitchStatement__.ts +23 -10
- package/src/concepts/TriggerEvent__.ts +6 -3
- package/src/concepts/TriggerLauncher__.ts +17 -7
- package/src/concepts/TypeAnnotation__.ts +46 -30
- package/src/concepts/TypeParam__.ts +13 -4
- package/src/concepts/UnaryExpression__.ts +28 -12
- package/src/concepts/Unparsed__.ts +10 -3
- package/src/concepts/ValidationRule__.ts +27 -20
- package/src/concepts/Variable__.ts +34 -19
- package/src/concepts/ViewElement__.ts +165 -125
- package/src/concepts/View__.ts +108 -89
- package/src/concepts/WhileStatement__.ts +19 -10
- package/src/concepts/types__.ts +1 -1
- package/src/manager/diagnostic.ts +3 -4
- package/src/server/naslServer.ts +676 -729
- package/src/server/translator.ts +1 -1
- package/src/templator/genCreateBlock.ts +4 -4
- package/src/templator/genCurdEditMultipleKeyBlock.ts +6 -6
- package/src/templator/genCurdMultipleKeyBlock.ts +4 -4
- package/src/templator/genEditTableBlock.ts +2 -2
- package/src/templator/genUpdateBlock.ts +4 -4
- package/src/translator/types.ts +20 -5
- package/src/translator/utils.ts +78 -4
- package/src/utils/time-slicing/constant.ts +37 -0
- package/src/utils/time-slicing/controller.ts +342 -0
- package/src/utils/time-slicing/index.ts +6 -0
- package/src/utils/time-slicing/page-state.ts +12 -0
- package/src/utils/time-slicing/performance.ts +56 -0
- package/src/utils/time-slicing/runner.ts +54 -0
- package/src/utils/time-slicing/tool.ts +45 -0
- package/src/utils/time-slicing/utils.ts +90 -0
- package/src/utils/time-slicing/wrapper.ts +58 -0
- package/src/utils/types.ts +9 -0
- package/test/concepts/anonymous-function/__snapshots__/toEmbeddedTS.spec.ts.snap +8 -0
- package/test/concepts/anonymous-function/__snapshots__/toJS.spec.ts.snap +3 -0
- package/test/concepts/anonymous-function/__snapshots__/toVue.spec.ts.snap +6 -0
- package/test/concepts/anonymous-function/constant.ts +5 -0
- package/test/concepts/anonymous-function/fixtures/simple.json +85 -0
- package/test/concepts/anonymous-function/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/anonymous-function/toJS.spec.ts +14 -0
- package/test/concepts/anonymous-function/toVue.spec.ts +14 -0
- package/test/concepts/assignment/__snapshots__/toEmbeddedTS.spec.ts.snap +21 -0
- package/test/concepts/assignment/__snapshots__/toJS.spec.ts.snap +9 -0
- package/test/concepts/assignment/__snapshots__/toVue.spec.ts.snap +21 -0
- package/test/concepts/assignment/constant.ts +5 -0
- package/test/concepts/assignment/fixtures/both-space.json +4 -0
- package/test/concepts/assignment/fixtures/left-space.json +14 -0
- package/test/concepts/assignment/fixtures/right-space.json +8 -0
- package/test/concepts/assignment/fixtures/simple.json +12 -0
- package/test/concepts/assignment/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/assignment/toJS.spec.ts +14 -0
- package/test/concepts/assignment/toVue.spec.ts +14 -0
- package/test/concepts/batch-assignment/__snapshots__/toEmbeddedTS.spec.ts.snap +28 -0
- package/test/concepts/batch-assignment/__snapshots__/toJS.spec.ts.snap +13 -0
- package/test/concepts/batch-assignment/__snapshots__/toVue.spec.ts.snap +14 -0
- package/test/concepts/batch-assignment/constant.ts +5 -0
- package/test/concepts/batch-assignment/fixtures/muli-var-muli-value.json +144 -0
- package/test/concepts/batch-assignment/fixtures/simple-var-simple-value.json +36 -0
- package/test/concepts/batch-assignment/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/batch-assignment/toJS.spec.ts +14 -0
- package/test/concepts/batch-assignment/toVue.spec.ts +14 -0
- package/test/concepts/binary-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +25 -0
- package/test/concepts/binary-expression/__snapshots__/toJS.spec.ts.snap +17 -0
- package/test/concepts/binary-expression/__snapshots__/toVue.spec.ts.snap +19 -0
- package/test/concepts/binary-expression/constant.ts +5 -0
- package/test/concepts/binary-expression/fixtures/constant-nested.json +36 -0
- package/test/concepts/binary-expression/fixtures/constant-simple.json +12 -0
- package/test/concepts/binary-expression/fixtures/variable-nested.json +69 -0
- package/test/concepts/binary-expression/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/binary-expression/toJS.spec.ts +14 -0
- package/test/concepts/binary-expression/toVue.spec.ts +14 -0
- package/test/concepts/boolean-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/boolean-literal/toJS.spec.ts +2 -2
- package/test/concepts/boolean-literal/toVue.spec.ts +2 -2
- package/test/concepts/call-function/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-interface/__snapshots__/toEmbeddedTS.spec.ts.snap +6 -3
- package/test/concepts/call-interface/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +3 -3
- package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
- package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +2 -1
- package/test/concepts/call-logic/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/data-source/__snapshots__/toEmbeddedTS.spec.ts.snap +8 -0
- package/test/concepts/data-source/__snapshots__/toEmbeddedTSFile.spec.ts.snap +12 -0
- package/test/concepts/data-source/constant.ts +5 -0
- package/test/concepts/data-source/fixtures/normal.json +289 -0
- package/test/concepts/data-source/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/data-source/toEmbeddedTSFile.spec.ts +16 -0
- package/test/concepts/entity/__snapshots__/toEmbeddedTS.spec.ts.snap +74 -0
- package/test/concepts/entity/__snapshots__/toEmbeddedTSFile.spec.ts.snap +3 -0
- package/test/concepts/entity/constant.ts +5 -0
- package/test/concepts/entity/fixtures/normal.json +469 -0
- package/test/concepts/entity/toEmbeddedTS.spec.ts +15 -0
- package/test/concepts/entity/toEmbeddedTSFile.spec.ts +14 -0
- package/test/concepts/identifier/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/identifier/toJS.spec.ts +2 -2
- package/test/concepts/identifier/toVue.spec.ts +2 -2
- package/test/concepts/match/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/member-expression/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/member-expression/toVue.spec.ts +2 -2
- package/test/concepts/null-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/null-literal/toJS.spec.ts +2 -2
- package/test/concepts/null-literal/toVue.spec.ts +2 -2
- package/test/concepts/numeric-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/numeric-literal/toJS.spec.ts +2 -2
- package/test/concepts/numeric-literal/toVue.spec.ts +2 -2
- package/test/concepts/string-literal/toEmbeddedTS.spec.ts +4 -3
- package/test/concepts/string-literal/toJS.spec.ts +2 -2
- package/test/concepts/string-literal/toVue.spec.ts +2 -2
- package/test/concepts/validation-rule/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/validation-rule/validation-rule.spec.ts +2 -1
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +0 -2
- package/test/concepts/view-element/toEmbeddedTS.spec.ts +2 -1
- package/test/time-slicing/runner.spec.ts +28 -0
- package/test/time-slicing/time-slicing-nodejs.spec.ts +27 -0
- package/test/time-slicing/utils.ts +7 -0
- package/test/time-slicing/wrapper.spec.ts +92 -0
- package/ts-worker/lib/tsserver.js +10 -1
- package/ts-worker/package.json +1 -0
- package/ts-worker/src/index.js +13 -12
- package/ts-worker/webpack.config.js +1 -1
- package/.nyc_output/f2d14ce8-876a-4dc0-9aaf-e51d08d081ca.json +0 -1
- package/.nyc_output/processinfo/f2d14ce8-876a-4dc0-9aaf-e51d08d081ca.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -446
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/src/automate/engine/index.html +0 -116
- package/coverage/src/automate/engine/utils.js.html +0 -1414
- package/coverage/src/bak/index.html +0 -116
- package/coverage/src/bak/translator.js.html +0 -619
- package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +0 -175
- package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +0 -169
- package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +0 -1243
- package/coverage/src/breakpoint/generator/CallbackNode.ts.html +0 -145
- package/coverage/src/breakpoint/generator/index.html +0 -176
- package/coverage/src/breakpoint/generator/index.ts.html +0 -508
- package/coverage/src/breakpoint/index.html +0 -116
- package/coverage/src/breakpoint/index.ts.html +0 -94
- package/coverage/src/breakpoint/shared/constants.ts.html +0 -430
- package/coverage/src/breakpoint/shared/index.html +0 -176
- package/coverage/src/breakpoint/shared/index.ts.html +0 -94
- package/coverage/src/breakpoint/shared/operations.ts.html +0 -160
- package/coverage/src/breakpoint/shared/socket.ts.html +0 -1225
- package/coverage/src/breakpoint/shared/utils.ts.html +0 -961
- package/coverage/src/breakpoint/store/core.ts.html +0 -1600
- package/coverage/src/breakpoint/store/dock.ts.html +0 -583
- package/coverage/src/breakpoint/store/index.html +0 -146
- package/coverage/src/breakpoint/store/index.ts.html +0 -91
- package/coverage/src/common/BaseNode.ts.html +0 -3868
- package/coverage/src/common/Command.ts.html +0 -310
- package/coverage/src/common/EventEmitter.ts.html +0 -370
- package/coverage/src/common/Messager.ts.html +0 -820
- package/coverage/src/common/asyncFuncMap.ts.html +0 -127
- package/coverage/src/common/index.html +0 -191
- package/coverage/src/common/index.ts.html +0 -94
- package/coverage/src/concepts/Abort__.ts.html +0 -328
- package/coverage/src/concepts/Anchor__.ts.html +0 -604
- package/coverage/src/concepts/AnonymousFunction__.ts.html +0 -1951
- package/coverage/src/concepts/App__.ts.html +0 -13252
- package/coverage/src/concepts/Argument__.ts.html +0 -910
- package/coverage/src/concepts/Assignee__.ts.html +0 -2236
- package/coverage/src/concepts/AssignmentLine__.ts.html +0 -409
- package/coverage/src/concepts/Assignment__.ts.html +0 -1078
- package/coverage/src/concepts/Attribute__.ts.html +0 -733
- package/coverage/src/concepts/AuthInterface__.ts.html +0 -367
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +0 -1984
- package/coverage/src/concepts/AuthLogic__.ts.html +0 -781
- package/coverage/src/concepts/BackendVariable__.ts.html +0 -1483
- package/coverage/src/concepts/Backend__.ts.html +0 -1165
- package/coverage/src/concepts/BatchAssignment__.ts.html +0 -3250
- package/coverage/src/concepts/BinaryExpression__.ts.html +0 -1336
- package/coverage/src/concepts/BindAttribute__.ts.html +0 -3679
- package/coverage/src/concepts/BindDirective__.ts.html +0 -1921
- package/coverage/src/concepts/BindEvent__.ts.html +0 -3232
- package/coverage/src/concepts/BindStyle__.ts.html +0 -1612
- package/coverage/src/concepts/BooleanLiteral__.ts.html +0 -403
- package/coverage/src/concepts/CallAuthInterface__.ts.html +0 -1615
- package/coverage/src/concepts/CallConnector__.ts.html +0 -868
- package/coverage/src/concepts/CallFunction__.ts.html +0 -1966
- package/coverage/src/concepts/CallInterface__.ts.html +0 -2614
- package/coverage/src/concepts/CallLogic__.ts.html +0 -4420
- package/coverage/src/concepts/CallQueryComponent__.ts.html +0 -5308
- package/coverage/src/concepts/Comment__.ts.html +0 -376
- package/coverage/src/concepts/CompletionProperty__.ts.html +0 -925
- package/coverage/src/concepts/ConfigGroup__.ts.html +0 -1105
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +0 -424
- package/coverage/src/concepts/ConfigProperty__.ts.html +0 -1348
- package/coverage/src/concepts/Configuration__.ts.html +0 -1027
- package/coverage/src/concepts/Connection__.ts.html +0 -1360
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +0 -595
- package/coverage/src/concepts/Connector__.ts.html +0 -4255
- package/coverage/src/concepts/Constant__.ts.html +0 -913
- package/coverage/src/concepts/DataSource__.ts.html +0 -1771
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +0 -331
- package/coverage/src/concepts/Destination__.ts.html +0 -2563
- package/coverage/src/concepts/End__.ts.html +0 -433
- package/coverage/src/concepts/EntityIndex__.ts.html +0 -787
- package/coverage/src/concepts/EntityProperty__.ts.html +0 -2620
- package/coverage/src/concepts/Entity__.ts.html +0 -2872
- package/coverage/src/concepts/EnumItem__.ts.html +0 -535
- package/coverage/src/concepts/Enum__.ts.html +0 -1192
- package/coverage/src/concepts/Event__.ts.html +0 -1084
- package/coverage/src/concepts/ExternalDestination__.ts.html +0 -1033
- package/coverage/src/concepts/ForEachStatement__.ts.html +0 -1819
- package/coverage/src/concepts/FrontendLibrary__.ts.html +0 -1711
- package/coverage/src/concepts/FrontendVariable__.ts.html +0 -292
- package/coverage/src/concepts/Frontend__.ts.html +0 -3961
- package/coverage/src/concepts/Function__.ts.html +0 -3514
- package/coverage/src/concepts/Identifier__.ts.html +0 -1057
- package/coverage/src/concepts/IfStatement__.ts.html +0 -1486
- package/coverage/src/concepts/Integration__.ts.html +0 -1228
- package/coverage/src/concepts/InterfaceParam__.ts.html +0 -1087
- package/coverage/src/concepts/Interface__.ts.html +0 -3394
- package/coverage/src/concepts/JSBlock__.ts.html +0 -406
- package/coverage/src/concepts/JavaLogic__.ts.html +0 -460
- package/coverage/src/concepts/LogicItem__.ts.html +0 -1144
- package/coverage/src/concepts/Logic__.ts.html +0 -7078
- package/coverage/src/concepts/MatchCase__.ts.html +0 -2641
- package/coverage/src/concepts/Match__.ts.html +0 -2323
- package/coverage/src/concepts/MemberExpression__.ts.html +0 -1666
- package/coverage/src/concepts/MicroApp__.ts.html +0 -436
- package/coverage/src/concepts/Module__.ts.html +0 -9220
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +0 -1045
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +0 -1018
- package/coverage/src/concepts/Namespace__.ts.html +0 -7942
- package/coverage/src/concepts/NewComposite__.ts.html +0 -4684
- package/coverage/src/concepts/NewList__.ts.html +0 -1567
- package/coverage/src/concepts/NewMap__.ts.html +0 -2275
- package/coverage/src/concepts/New__.ts.html +0 -289
- package/coverage/src/concepts/NullLiteral__.ts.html +0 -349
- package/coverage/src/concepts/NumericLiteral__.ts.html +0 -661
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +0 -1123
- package/coverage/src/concepts/OverriddenLogic__.ts.html +0 -6817
- package/coverage/src/concepts/Param__.ts.html +0 -1609
- package/coverage/src/concepts/Point__.ts.html +0 -331
- package/coverage/src/concepts/ProcessComponent__.ts.html +0 -1666
- package/coverage/src/concepts/ProcessElement__.ts.html +0 -5884
- package/coverage/src/concepts/ProcessOutcome__.ts.html +0 -352
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +0 -343
- package/coverage/src/concepts/Process__.ts.html +0 -4768
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +0 -568
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +0 -583
- package/coverage/src/concepts/QueryFromExpression__.ts.html +0 -910
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +0 -559
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +0 -1567
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +0 -637
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +0 -679
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +0 -1714
- package/coverage/src/concepts/Rect__.ts.html +0 -373
- package/coverage/src/concepts/Return__.ts.html +0 -1258
- package/coverage/src/concepts/Role__.ts.html +0 -601
- package/coverage/src/concepts/SelectMembers__.ts.html +0 -1246
- package/coverage/src/concepts/Slot__.ts.html +0 -628
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +0 -964
- package/coverage/src/concepts/Start__.ts.html +0 -304
- package/coverage/src/concepts/StringInterpolation__.ts.html +0 -1078
- package/coverage/src/concepts/StringLiteral__.ts.html +0 -490
- package/coverage/src/concepts/StructureProperty__.ts.html +0 -1102
- package/coverage/src/concepts/Structure__.ts.html +0 -2053
- package/coverage/src/concepts/SwitchCase__.ts.html +0 -1063
- package/coverage/src/concepts/SwitchStatement__.ts.html +0 -826
- package/coverage/src/concepts/Theme__.ts.html +0 -358
- package/coverage/src/concepts/Transactional__.ts.html +0 -628
- package/coverage/src/concepts/TriggerEvent__.ts.html +0 -1012
- package/coverage/src/concepts/TriggerLauncher__.ts.html +0 -775
- package/coverage/src/concepts/TypeAnnotation__.ts.html +0 -3583
- package/coverage/src/concepts/TypeParam__.ts.html +0 -301
- package/coverage/src/concepts/UnaryExpression__.ts.html +0 -640
- package/coverage/src/concepts/Unparsed__.ts.html +0 -382
- package/coverage/src/concepts/UseComponent__.ts.html +0 -331
- package/coverage/src/concepts/ValidationRule__.ts.html +0 -1840
- package/coverage/src/concepts/Variable__.ts.html +0 -1435
- package/coverage/src/concepts/ViewBlock__.ts.html +0 -352
- package/coverage/src/concepts/ViewComponent__.ts.html +0 -4180
- package/coverage/src/concepts/ViewElement__.ts.html +0 -8557
- package/coverage/src/concepts/View__.ts.html +0 -8278
- package/coverage/src/concepts/WhileStatement__.ts.html +0 -991
- package/coverage/src/concepts/basics/stdlib/index.html +0 -341
- package/coverage/src/concepts/basics/stdlib/index.ts.html +0 -208
- package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +0 -565
- package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +0 -517
- package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +0 -226
- package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +0 -172
- package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +0 -214
- package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +0 -145
- package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +0 -589
- package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +0 -214
- package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +0 -229
- package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +0 -268
- package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +0 -1999
- package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +0 -3259
- package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +0 -6787
- package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +0 -1768
- package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +0 -163
- package/coverage/src/concepts/basics/types/coreTypeList.ts.html +0 -121
- package/coverage/src/concepts/basics/types/index.html +0 -131
- package/coverage/src/concepts/basics/types/index.ts.html +0 -160
- package/coverage/src/concepts/index.html +0 -1961
- package/coverage/src/concepts/index.ts.html +0 -103
- package/coverage/src/concepts/index__.ts.html +0 -451
- package/coverage/src/config.ts.html +0 -325
- package/coverage/src/decorators/index.html +0 -131
- package/coverage/src/decorators/index.ts.html +0 -574
- package/coverage/src/decorators/promise.ts.html +0 -169
- package/coverage/src/eventBus.ts.html +0 -100
- package/coverage/src/generator/compileComponent.ts.html +0 -142
- package/coverage/src/generator/genBundleFiles.ts.html +0 -1828
- package/coverage/src/generator/genHash.ts.html +0 -124
- package/coverage/src/generator/genMetaData.ts.html +0 -1042
- package/coverage/src/generator/genReleaseBody.ts.html +0 -1282
- package/coverage/src/generator/icestark.ts.html +0 -220
- package/coverage/src/generator/index.html +0 -266
- package/coverage/src/generator/index.ts.html +0 -106
- package/coverage/src/generator/microApp.ts.html +0 -172
- package/coverage/src/generator/permission.ts.html +0 -1036
- package/coverage/src/generator/qiankun.ts.html +0 -232
- package/coverage/src/generator/styleReplacer.ts.html +0 -199
- package/coverage/src/index.html +0 -146
- package/coverage/src/index.ts.html +0 -121
- package/coverage/src/manager/diagnostic.ts.html +0 -442
- package/coverage/src/manager/index.html +0 -131
- package/coverage/src/manager/stepRecorder.ts.html +0 -457
- package/coverage/src/sentry/index.html +0 -116
- package/coverage/src/sentry/index.ts.html +0 -676
- package/coverage/src/server/createUiTs.ts.html +0 -919
- package/coverage/src/server/entity2LogicNamespace.ts.html +0 -1294
- package/coverage/src/server/event.js.html +0 -526
- package/coverage/src/server/extendBaseNode.ts.html +0 -1762
- package/coverage/src/server/formatTsUtils.ts.html +0 -2689
- package/coverage/src/server/getConnector.ts.html +0 -316
- package/coverage/src/server/getExtensionModules.ts.html +0 -178
- package/coverage/src/server/getFunctions.ts.html +0 -133
- package/coverage/src/server/getInterfaces.ts.html +0 -229
- package/coverage/src/server/getLogging.ts.html +0 -100
- package/coverage/src/server/getLogics.ts.html +0 -1363
- package/coverage/src/server/getMemberIdentifier.ts.html +0 -1606
- package/coverage/src/server/getProcessComponents.ts.html +0 -112
- package/coverage/src/server/getProcesses.ts.html +0 -2023
- package/coverage/src/server/getValidates.ts.html +0 -115
- package/coverage/src/server/index.html +0 -401
- package/coverage/src/server/index.ts.html +0 -229
- package/coverage/src/server/naslServer.ts.html +0 -14290
- package/coverage/src/server/naslStdlibMap.ts.html +0 -241
- package/coverage/src/server/process2LogicNamespace.ts.html +0 -454
- package/coverage/src/server/translator.ts.html +0 -2566
- package/coverage/src/service/creator/add.configs.js.html +0 -379
- package/coverage/src/service/creator/errHandles.js.html +0 -322
- package/coverage/src/service/creator/index.html +0 -146
- package/coverage/src/service/creator/index.js.html +0 -352
- package/coverage/src/service/datasource/api.js.html +0 -118
- package/coverage/src/service/datasource/index.html +0 -131
- package/coverage/src/service/datasource/index.js.html +0 -103
- package/coverage/src/service/logic/api.js.html +0 -109
- package/coverage/src/service/logic/index.html +0 -131
- package/coverage/src/service/logic/index.js.html +0 -103
- package/coverage/src/service/storage/api.js.html +0 -202
- package/coverage/src/service/storage/index.html +0 -206
- package/coverage/src/service/storage/index.ts.html +0 -103
- package/coverage/src/service/storage/init.ts.html +0 -2710
- package/coverage/src/service/storage/jsoner.ts.html +0 -502
- package/coverage/src/service/storage/map.ts.html +0 -256
- package/coverage/src/service/storage/service.ts.html +0 -331
- package/coverage/src/service/storage/storagePoint.ts.html +0 -304
- package/coverage/src/templator/genCallComponentLogic.ts.html +0 -163
- package/coverage/src/templator/genCreateBlock.ts.html +0 -1093
- package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +0 -1609
- package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +0 -2254
- package/coverage/src/templator/genEditTableBlock.ts.html +0 -955
- package/coverage/src/templator/genEnumSelectBlock.ts.html +0 -178
- package/coverage/src/templator/genGetBlock.ts.html +0 -451
- package/coverage/src/templator/genGridViewBlock.ts.html +0 -1114
- package/coverage/src/templator/genListViewBlock.ts.html +0 -475
- package/coverage/src/templator/genQueryComponent.ts.html +0 -1207
- package/coverage/src/templator/genSelectBlock.ts.html +0 -1243
- package/coverage/src/templator/genTableBlock.ts.html +0 -910
- package/coverage/src/templator/genUpdateBlock.ts.html +0 -1192
- package/coverage/src/templator/index.html +0 -326
- package/coverage/src/templator/index.ts.html +0 -154
- package/coverage/src/templator/utils.ts.html +0 -1861
- package/coverage/src/translator/constant.ts.html +0 -106
- package/coverage/src/translator/index.html +0 -146
- package/coverage/src/translator/index.ts.html +0 -94
- package/coverage/src/translator/utils.ts.html +0 -397
- package/coverage/src/utils/cookie.ts.html +0 -265
- package/coverage/src/utils/env.ts.html +0 -91
- package/coverage/src/utils/index.html +0 -236
- package/coverage/src/utils/index.ts.html +0 -655
- package/coverage/src/utils/logger.ts.html +0 -145
- package/coverage/src/utils/sortTsString.ts.html +0 -187
- package/coverage/src/utils/string.ts.html +0 -400
- package/coverage/src/utils/time-slicing.ts.html +0 -412
- package/coverage/src/utils/traverse.ts.html +0 -568
- package/coverage/src/utils/window.ts.html +0 -112
- package/out/utils/time-slicing.d.ts +0 -41
- package/out/utils/time-slicing.js +0 -82
- package/out/utils/time-slicing.js.map +0 -1
- package/src/utils/time-slicing.ts +0 -111
|
@@ -1,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 { stdlibNamespace, CallLogic } from '../concepts';
|
|
3
13
|
|
|
4
14
|
import * as babelParser from '@babel/parser';
|
|
@@ -1557,59 +1567,68 @@ export class ViewElement extends BaseNode {
|
|
|
1557
1567
|
return Boolean(this.slotScope);
|
|
1558
1568
|
}
|
|
1559
1569
|
|
|
1560
|
-
|
|
1570
|
+
@withGenerator
|
|
1571
|
+
*toEmbeddedTSDefinition(state = createCompilerState()): TranslatorGenerator {
|
|
1572
|
+
const self = this;
|
|
1561
1573
|
let code = '';
|
|
1562
1574
|
code += indent((state?.tabSize || 0) + 1);
|
|
1563
1575
|
// 登录组件不翻译
|
|
1564
|
-
if (
|
|
1565
|
-
code += `${
|
|
1566
|
-
} else if (
|
|
1567
|
-
code += `${
|
|
1568
|
-
} else if (Object.keys(PAGE_COMPONENT_INCLUDE_TAG_MAP).includes(
|
|
1569
|
-
if (
|
|
1570
|
-
code += `${
|
|
1571
|
-
|
|
1576
|
+
if (self.toHump(self.tag) === 'lcapLogin' || self.staticClass === 'login-form') {
|
|
1577
|
+
code += `${self.name}: nasl.ui.div<any>;\n`;
|
|
1578
|
+
} else if (self.tag === 'u-table-view-column-dynamic') {
|
|
1579
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any, any>;\n`;
|
|
1580
|
+
} else if (Object.keys(PAGE_COMPONENT_INCLUDE_TAG_MAP).includes(self.tag)) {
|
|
1581
|
+
if (self.bindAttrs?.findIndex((attr) => attr.name === 'data-source') > -1) {
|
|
1582
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<__elements_completionProperty['${
|
|
1583
|
+
self.name
|
|
1584
|
+
}']['dataSource']>;\n`;
|
|
1572
1585
|
} else {
|
|
1573
|
-
code += `${
|
|
1586
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any>;\n`;
|
|
1574
1587
|
}
|
|
1575
1588
|
} else {
|
|
1576
|
-
code += `${
|
|
1589
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any>;\n`;
|
|
1577
1590
|
}
|
|
1578
|
-
if (Array.isArray(
|
|
1579
|
-
|
|
1580
|
-
code += element.toEmbeddedTSDefinition(shiftState(state, code));
|
|
1591
|
+
if (Array.isArray(self.children)) {
|
|
1592
|
+
yield* wrapForEach(self.children, function* warpForEachGenerator(element) {
|
|
1593
|
+
code += yield* element.toEmbeddedTSDefinition(shiftState(state, code));
|
|
1581
1594
|
});
|
|
1582
1595
|
}
|
|
1583
1596
|
return code;
|
|
1584
1597
|
}
|
|
1585
1598
|
|
|
1586
|
-
|
|
1599
|
+
@withGenerator
|
|
1600
|
+
*toEmbeddedTSVariableDefinition(
|
|
1601
|
+
state = createCompilerState(),
|
|
1602
|
+
variableList?: string[],
|
|
1603
|
+
nameLevel?: string,
|
|
1604
|
+
): TranslatorGenerator {
|
|
1605
|
+
const self = this;
|
|
1587
1606
|
let code = '';
|
|
1588
1607
|
let currentLevel = nameLevel ? `${nameLevel}?.` : '';
|
|
1589
|
-
currentLevel += `${
|
|
1590
|
-
if (PAGE_COMPONENT_INCLUDE_TAG_MAP?.[
|
|
1608
|
+
currentLevel += `${self.name}?.()`;
|
|
1609
|
+
if (PAGE_COMPONENT_INCLUDE_TAG_MAP?.[self.tag]) {
|
|
1591
1610
|
code += indent((state?.tabSize || 0) + 2);
|
|
1592
|
-
code += `${
|
|
1593
|
-
if (Array.isArray(
|
|
1594
|
-
|
|
1595
|
-
.filter((attr) => PAGE_COMPONENT_INCLUDE_TAG_MAP[
|
|
1596
|
-
|
|
1597
|
-
code += attr.toEmbeddedTSVariableDefinition(
|
|
1611
|
+
code += `${self.name}: {\n`;
|
|
1612
|
+
if (Array.isArray(self.bindAttrs)) {
|
|
1613
|
+
yield* wrapForEach(
|
|
1614
|
+
self.bindAttrs.filter((attr) => PAGE_COMPONENT_INCLUDE_TAG_MAP[self.tag]?.[attr.name]),
|
|
1615
|
+
function* warpForEachGenerator(attr) {
|
|
1616
|
+
code += yield* attr.toEmbeddedTSVariableDefinition(
|
|
1598
1617
|
shiftState(state, code, { inline: true }),
|
|
1599
1618
|
variableList,
|
|
1600
|
-
|
|
1619
|
+
self.name,
|
|
1601
1620
|
currentLevel,
|
|
1602
1621
|
);
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
if (['u-select', 'van-pickerson'].includes(
|
|
1622
|
+
},
|
|
1623
|
+
);
|
|
1624
|
+
if (['u-select', 'van-pickerson'].includes(self.tag)) {
|
|
1606
1625
|
code += indent((state?.tabSize || 0) + 3);
|
|
1607
1626
|
code += `pageNumber: nasl.core.Long\n`;
|
|
1608
1627
|
code += indent((state?.tabSize || 0) + 3);
|
|
1609
1628
|
code += `filterText: nasl.core.String\n`;
|
|
1610
1629
|
} else if (
|
|
1611
|
-
['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(
|
|
1612
|
-
|
|
1630
|
+
['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(self.tag) &&
|
|
1631
|
+
self.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1
|
|
1613
1632
|
) {
|
|
1614
1633
|
code += indent((state?.tabSize || 0) + 3);
|
|
1615
1634
|
code += `sorting: {
|
|
@@ -1621,26 +1640,29 @@ export class ViewElement extends BaseNode {
|
|
|
1621
1640
|
code += indent((state?.tabSize || 0) + 2);
|
|
1622
1641
|
code += `};\n`;
|
|
1623
1642
|
}
|
|
1624
|
-
if (Array.isArray(
|
|
1625
|
-
|
|
1626
|
-
code += element.toEmbeddedTSVariableDefinition(shiftState(state, code), variableList, currentLevel);
|
|
1643
|
+
if (Array.isArray(self.children)) {
|
|
1644
|
+
yield* wrapForEach(self.children, function* warpForEachGenerator(element) {
|
|
1645
|
+
code += yield* element.toEmbeddedTSVariableDefinition(shiftState(state, code), variableList, currentLevel);
|
|
1627
1646
|
});
|
|
1628
1647
|
}
|
|
1629
1648
|
return code;
|
|
1630
1649
|
}
|
|
1631
1650
|
|
|
1632
|
-
|
|
1651
|
+
@withGenerator
|
|
1652
|
+
*toEmbeddedTSVariableFunctionDefinition(state = createCompilerState(), parentLevel?: number): TranslatorGenerator {
|
|
1653
|
+
const self = this;
|
|
1633
1654
|
let code = '';
|
|
1634
1655
|
code += indent((state?.tabSize || 0) + 2);
|
|
1635
1656
|
let levelIndex = parentLevel || 0;
|
|
1636
|
-
code += `${
|
|
1637
|
-
if (
|
|
1638
|
-
const currentType =
|
|
1639
|
-
const _this =
|
|
1657
|
+
code += `${self.name}: () => {\n`;
|
|
1658
|
+
if (self.tag === 'template' && self.haveScope() && self.parentNode instanceof ViewElement) {
|
|
1659
|
+
const currentType = self.parentNode.tag === 'u-table-view-column-dynamic' ? 'CurrentDynamic' : 'Current';
|
|
1660
|
+
const _this = self.parentNode;
|
|
1640
1661
|
let genericity = '';
|
|
1641
1662
|
if (_this.tag === 'u-table-view-column-dynamic') {
|
|
1642
|
-
genericity += `<${(_this.parentNode as any).__tsVariableDataSourceTypeName}, ${
|
|
1643
|
-
|
|
1663
|
+
genericity += `<${(_this.parentNode as any).__tsVariableDataSourceTypeName}, ${
|
|
1664
|
+
(_this as any).__tsVariableDataSourceTypeName
|
|
1665
|
+
}>`;
|
|
1644
1666
|
} else {
|
|
1645
1667
|
let targetNode: any = _this;
|
|
1646
1668
|
while (!targetNode.__tsVariableDataSourceTypeName && targetNode?.parentNode instanceof ViewElement) {
|
|
@@ -1652,10 +1674,10 @@ export class ViewElement extends BaseNode {
|
|
|
1652
1674
|
code += `let current${levelIndex === 0 ? '' : levelIndex}: nasl.ui.${currentType}${genericity}\n`;
|
|
1653
1675
|
levelIndex++;
|
|
1654
1676
|
}
|
|
1655
|
-
const attr =
|
|
1677
|
+
const attr = self.bindAttrs?.find((item) => item.name === 'data-source');
|
|
1656
1678
|
if (attr && attr.expression) {
|
|
1657
|
-
const datasourceName = `datasourceName${
|
|
1658
|
-
(
|
|
1679
|
+
const datasourceName = `datasourceName${self.name}`;
|
|
1680
|
+
(self as any).__tsVariableDataSourceTypeName = datasourceName;
|
|
1659
1681
|
if (
|
|
1660
1682
|
attr.expression instanceof MemberExpression ||
|
|
1661
1683
|
attr.expression instanceof Identifier ||
|
|
@@ -1666,7 +1688,7 @@ export class ViewElement extends BaseNode {
|
|
|
1666
1688
|
inline: true,
|
|
1667
1689
|
noNeedParams: true,
|
|
1668
1690
|
};
|
|
1669
|
-
let value = attr.expression.toEmbeddedTS(
|
|
1691
|
+
let value = yield* attr.expression.toEmbeddedTS(
|
|
1670
1692
|
shiftState(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}),
|
|
1671
1693
|
);
|
|
1672
1694
|
code += indent((state?.tabSize || 0) + 3);
|
|
@@ -1675,7 +1697,7 @@ export class ViewElement extends BaseNode {
|
|
|
1675
1697
|
} else {
|
|
1676
1698
|
code += indent((state?.tabSize || 0) + 3);
|
|
1677
1699
|
code += `const __funcName = () => { return `;
|
|
1678
|
-
code += attr.expression.toEmbeddedTS(shiftState(state, code));
|
|
1700
|
+
code += yield* attr.expression.toEmbeddedTS(shiftState(state, code));
|
|
1679
1701
|
code += '};\n';
|
|
1680
1702
|
code += indent((state?.tabSize || 0) + 3);
|
|
1681
1703
|
code += `type ${datasourceName} = nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName>>;\n`;
|
|
@@ -1684,16 +1706,17 @@ export class ViewElement extends BaseNode {
|
|
|
1684
1706
|
}
|
|
1685
1707
|
code += indent((state?.tabSize || 0) + 3);
|
|
1686
1708
|
code += `return {\n`;
|
|
1687
|
-
if (Array.isArray(
|
|
1688
|
-
|
|
1689
|
-
.filter((attr) => PAGE_COMPONENT_INCLUDE_TAG_MAP[
|
|
1690
|
-
|
|
1691
|
-
code += attr.toEmbeddedTSVariableFunctionDefinition(shiftState(state, code, { inline: true }));
|
|
1692
|
-
}
|
|
1709
|
+
if (Array.isArray(self.bindAttrs)) {
|
|
1710
|
+
yield* wrapForEach(
|
|
1711
|
+
self.bindAttrs.filter((attr) => PAGE_COMPONENT_INCLUDE_TAG_MAP[self.tag]?.[attr.name]),
|
|
1712
|
+
function* warpForEachGenerator(attr) {
|
|
1713
|
+
code += yield* attr.toEmbeddedTSVariableFunctionDefinition(shiftState(state, code, { inline: true }));
|
|
1714
|
+
},
|
|
1715
|
+
);
|
|
1693
1716
|
}
|
|
1694
|
-
if (Array.isArray(
|
|
1695
|
-
|
|
1696
|
-
code += element.toEmbeddedTSVariableFunctionDefinition(
|
|
1717
|
+
if (Array.isArray(self.children)) {
|
|
1718
|
+
yield* wrapForEach(self.children, function* warpForEachGenerator(element) {
|
|
1719
|
+
code += yield* element.toEmbeddedTSVariableFunctionDefinition(
|
|
1697
1720
|
shiftState({ ...state, tabSize: state.tabSize + 2 }, code),
|
|
1698
1721
|
levelIndex,
|
|
1699
1722
|
);
|
|
@@ -1741,9 +1764,9 @@ export class ViewElement extends BaseNode {
|
|
|
1741
1764
|
}
|
|
1742
1765
|
return code;
|
|
1743
1766
|
}
|
|
1744
|
-
getDatasourceTypeCodeStr(state?: TranslatorState, eleArr?: Array<ViewElement>)
|
|
1767
|
+
*getDatasourceTypeCodeStr(state?: TranslatorState, eleArr?: Array<ViewElement>) {
|
|
1745
1768
|
let code = '';
|
|
1746
|
-
(eleArr
|
|
1769
|
+
yield* wrapForEach(eleArr ?? [], function* wrapForEach(element, index) {
|
|
1747
1770
|
const bindAttrs = element.bindAttrs;
|
|
1748
1771
|
if (bindAttrs && bindAttrs.length) {
|
|
1749
1772
|
const attr = bindAttrs.find((item) => item.name === 'data-source');
|
|
@@ -1760,14 +1783,14 @@ export class ViewElement extends BaseNode {
|
|
|
1760
1783
|
inline: true,
|
|
1761
1784
|
noNeedParams: true,
|
|
1762
1785
|
};
|
|
1763
|
-
let value = attr.expression.toEmbeddedTS(
|
|
1786
|
+
let value = yield* attr.expression.toEmbeddedTS(
|
|
1764
1787
|
shiftState(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}),
|
|
1765
1788
|
);
|
|
1766
1789
|
code += `type ${datasourceName} = `;
|
|
1767
1790
|
code += `nasl.ui.GetItemTypeFromDataSource<typeof ${value}>;\n`;
|
|
1768
1791
|
} else {
|
|
1769
1792
|
code += `const __funcName${index} = () => { return`;
|
|
1770
|
-
code += attr.expression.toEmbeddedTS(shiftState(state, code));
|
|
1793
|
+
code += yield* attr.expression.toEmbeddedTS(shiftState(state, code));
|
|
1771
1794
|
code += '};\n';
|
|
1772
1795
|
code += `type ${datasourceName} = `;
|
|
1773
1796
|
code += `nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName${index}>>;\n`;
|
|
@@ -1779,10 +1802,10 @@ export class ViewElement extends BaseNode {
|
|
|
1779
1802
|
code += indent((state?.tabSize || 0) + 2);
|
|
1780
1803
|
return code;
|
|
1781
1804
|
}
|
|
1782
|
-
@
|
|
1783
|
-
toEmbeddedTS(state
|
|
1784
|
-
const
|
|
1785
|
-
|
|
1805
|
+
@withSourceMapGenerator
|
|
1806
|
+
*toEmbeddedTS(state = createCompilerState(), parentLevel?: number): TranslatorGenerator {
|
|
1807
|
+
const self = this;
|
|
1808
|
+
const { parentNode, app, tag, staticClass, name, bindDirectives, bindRoles, bindEvents, children } = self;
|
|
1786
1809
|
const chineseTsName = (name: string) => {
|
|
1787
1810
|
let tsName = name;
|
|
1788
1811
|
// 匹配所有特殊字符都转为_
|
|
@@ -1792,21 +1815,20 @@ export class ViewElement extends BaseNode {
|
|
|
1792
1815
|
}
|
|
1793
1816
|
return tsName;
|
|
1794
1817
|
};
|
|
1795
|
-
|
|
1796
1818
|
// 过滤模板的登录中的一些翻译,这里只过滤h5表格中的两个列
|
|
1797
1819
|
if (
|
|
1798
|
-
(parentNode.concept === 'ViewElement' && parentNode.tag &&
|
|
1820
|
+
(parentNode.concept === 'ViewElement' && parentNode.tag && self.toHump(parentNode.tag) === 'lcapLogin') ||
|
|
1799
1821
|
staticClass === 'login-cell'
|
|
1800
1822
|
) {
|
|
1801
1823
|
return '';
|
|
1802
1824
|
}
|
|
1803
1825
|
// pc事件翻译
|
|
1804
|
-
if (
|
|
1805
|
-
let code = `new nasl.ui.div({name: __elements.${
|
|
1826
|
+
if (self.toHump(tag) === 'lcapLogin') {
|
|
1827
|
+
let code = `new nasl.ui.div({name: __elements.${self.name},\n`;
|
|
1806
1828
|
// 事件
|
|
1807
|
-
if (Array.isArray(
|
|
1808
|
-
|
|
1809
|
-
code += event.toEmbeddedTS(
|
|
1829
|
+
if (Array.isArray(self.bindEvents)) {
|
|
1830
|
+
yield* wrapForEach(self.bindEvents, function* warpForEachGenerator(event) {
|
|
1831
|
+
code += yield* event.toEmbeddedTS(
|
|
1810
1832
|
shiftState(state, code, {
|
|
1811
1833
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1812
1834
|
}),
|
|
@@ -1814,20 +1836,19 @@ export class ViewElement extends BaseNode {
|
|
|
1814
1836
|
code += '\n';
|
|
1815
1837
|
});
|
|
1816
1838
|
}
|
|
1817
|
-
|
|
1818
1839
|
code += `}),\n`;
|
|
1819
1840
|
return code;
|
|
1820
1841
|
}
|
|
1821
1842
|
let levelIndex = parentLevel || 0;
|
|
1822
|
-
if (tag === 'template' &&
|
|
1823
|
-
const slotTarget = !
|
|
1843
|
+
if (tag === 'template' && self.haveScope()) {
|
|
1844
|
+
const slotTarget = !self.slotTarget ? 'slotDefault' : 'slot' + self.toFirstUpper(self.toHump(self.slotTarget));
|
|
1824
1845
|
let code = '';
|
|
1825
1846
|
code += `${slotTarget}: (current${levelIndex === 0 ? '' : levelIndex})=> {\n`;
|
|
1826
|
-
code +=
|
|
1847
|
+
code += yield* self.getDatasourceTypeCodeStr(state, self.children);
|
|
1827
1848
|
levelIndex++;
|
|
1828
1849
|
code += 'return [';
|
|
1829
|
-
|
|
1830
|
-
code += element.toEmbeddedTS(
|
|
1850
|
+
yield* wrapForEach(self.children, function* warpForEachGenerator(element) {
|
|
1851
|
+
code += yield* element.toEmbeddedTS(
|
|
1831
1852
|
shiftState(state, code, {
|
|
1832
1853
|
tabSize: state?.tabSize || 0,
|
|
1833
1854
|
}),
|
|
@@ -1839,13 +1860,13 @@ export class ViewElement extends BaseNode {
|
|
|
1839
1860
|
code += '},\n';
|
|
1840
1861
|
return code;
|
|
1841
1862
|
} else if (tag === 'template') {
|
|
1842
|
-
const slotTarget = !
|
|
1863
|
+
const slotTarget = !self.slotTarget ? 'slotDefault' : 'slot' + self.toFirstUpper(self.toHump(self.slotTarget));
|
|
1843
1864
|
let code = '';
|
|
1844
1865
|
code += `${slotTarget}: ()=> {\n`;
|
|
1845
|
-
code +=
|
|
1866
|
+
code += yield* self.getDatasourceTypeCodeStr(state, self.children);
|
|
1846
1867
|
code += 'return [';
|
|
1847
|
-
|
|
1848
|
-
code += element.toEmbeddedTS(
|
|
1868
|
+
yield* wrapForEach(self.children, function* warpForEachGenerator(element) {
|
|
1869
|
+
code += yield* element.toEmbeddedTS(
|
|
1849
1870
|
shiftState(state, code, {
|
|
1850
1871
|
tabSize: state?.tabSize || 0,
|
|
1851
1872
|
}),
|
|
@@ -1858,9 +1879,8 @@ export class ViewElement extends BaseNode {
|
|
|
1858
1879
|
code += '},\n';
|
|
1859
1880
|
return code;
|
|
1860
1881
|
}
|
|
1861
|
-
|
|
1862
1882
|
// 后面那个name是为了查找引用的时候用的
|
|
1863
|
-
let code = `new nasl.ui.${
|
|
1883
|
+
let code = `new nasl.ui.${self.toHump(tag)}${self.getTypeArgmentsStr(state)}({name: __elements.${name},\n`;
|
|
1864
1884
|
// 是否开启权限
|
|
1865
1885
|
// const hasAuth = Array.isArray(bindDirectives)
|
|
1866
1886
|
// ? !!bindDirectives.filter((directive) => directive.name === 'auth').length
|
|
@@ -1869,7 +1889,7 @@ export class ViewElement extends BaseNode {
|
|
|
1869
1889
|
if (Array.isArray(bindRoles) && bindRoles.length) {
|
|
1870
1890
|
code += indent((state?.tabSize || 0) + 2);
|
|
1871
1891
|
code += 'roles: [\n';
|
|
1872
|
-
bindRoles
|
|
1892
|
+
yield* wrapForEach(bindRoles, function* warpForEachGenerator(role) {
|
|
1873
1893
|
code += indent((state?.tabSize || 0) + 3);
|
|
1874
1894
|
code += `${app.getNamespace()}.roles.${chineseTsName(role)}.${chineseTsName(role)},`;
|
|
1875
1895
|
code += '\n';
|
|
@@ -1877,11 +1897,10 @@ export class ViewElement extends BaseNode {
|
|
|
1877
1897
|
code += indent((state?.tabSize || 0) + 2);
|
|
1878
1898
|
code += '],\n';
|
|
1879
1899
|
}
|
|
1880
|
-
|
|
1881
1900
|
// 事件
|
|
1882
1901
|
if (Array.isArray(bindEvents)) {
|
|
1883
|
-
bindEvents
|
|
1884
|
-
code += event.toEmbeddedTS(
|
|
1902
|
+
yield* wrapForEach(bindEvents, function* warpForEachGenerator(event) {
|
|
1903
|
+
code += yield* event.toEmbeddedTS(
|
|
1885
1904
|
shiftState(state, code, {
|
|
1886
1905
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1887
1906
|
}),
|
|
@@ -1889,31 +1908,30 @@ export class ViewElement extends BaseNode {
|
|
|
1889
1908
|
code += '\n';
|
|
1890
1909
|
});
|
|
1891
1910
|
}
|
|
1892
|
-
|
|
1893
1911
|
// 子元素
|
|
1894
1912
|
if (Array.isArray(children)) {
|
|
1895
1913
|
code += indent((state?.tabSize || 0) + 1);
|
|
1896
|
-
|
|
1897
|
-
if (Array.isArray(this.bindAttrs)) {
|
|
1914
|
+
if (Array.isArray(self.bindAttrs)) {
|
|
1898
1915
|
code += `bindAttr: () => [\n`;
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
)
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
)
|
|
1916
|
+
yield* wrapForEach(self.bindAttrs, function* warpForEachGenerator(attr) {
|
|
1917
|
+
code += (yield* attr.toEmbeddedTS(shiftState(state, code, { tabSize: 1 }))) + ',\n';
|
|
1918
|
+
});
|
|
1919
|
+
yield* wrapForEach(self.bindDirectives, function* warpForEachGenerator(directive) {
|
|
1920
|
+
code += (yield* directive.toEmbeddedTS(shiftState(state, code, { tabSize: 1 }))) + ',\n';
|
|
1921
|
+
});
|
|
1922
|
+
yield* wrapForEach(self.bindStyles, function* warpForEachGenerator(bindStyle) {
|
|
1923
|
+
code += (yield* bindStyle.toEmbeddedTS(shiftState(state, code, { tabSize: 1 }))) + ',\n';
|
|
1924
|
+
});
|
|
1906
1925
|
code += indent((state?.tabSize || 0) + 2) + '],\n';
|
|
1907
1926
|
}
|
|
1908
|
-
|
|
1909
1927
|
// 如果子集中有插槽的就
|
|
1910
1928
|
if (children.find((item) => item.tag === 'template' && item.slotTarget)) {
|
|
1911
1929
|
code += indent((state?.tabSize || 0) + 2);
|
|
1912
1930
|
const defaultArr: ViewElement[] = [];
|
|
1913
1931
|
// 先把插槽翻译了
|
|
1914
|
-
children
|
|
1932
|
+
yield* wrapForEach(children, function* warpForEachGenerator(element) {
|
|
1915
1933
|
if (element.tag === 'template') {
|
|
1916
|
-
code += element.toEmbeddedTS(
|
|
1934
|
+
code += yield* element.toEmbeddedTS(
|
|
1917
1935
|
shiftState(state, code, {
|
|
1918
1936
|
tabSize: state?.tabSize || 0,
|
|
1919
1937
|
}),
|
|
@@ -1927,10 +1945,10 @@ export class ViewElement extends BaseNode {
|
|
|
1927
1945
|
if (defaultArr.length) {
|
|
1928
1946
|
code += indent((state?.tabSize || 0) + 2);
|
|
1929
1947
|
code += `slotDefault: ()=> {\n`;
|
|
1930
|
-
code +=
|
|
1948
|
+
code += yield* self.getDatasourceTypeCodeStr(state, defaultArr);
|
|
1931
1949
|
code += 'return [';
|
|
1932
|
-
defaultArr
|
|
1933
|
-
code += element.toEmbeddedTS(
|
|
1950
|
+
yield* wrapForEach(defaultArr, function* warpForEachGenerator(element) {
|
|
1951
|
+
code += yield* element.toEmbeddedTS(
|
|
1934
1952
|
shiftState(state, code, {
|
|
1935
1953
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1936
1954
|
}),
|
|
@@ -1946,10 +1964,10 @@ export class ViewElement extends BaseNode {
|
|
|
1946
1964
|
} else {
|
|
1947
1965
|
code += indent((state?.tabSize || 0) + 2);
|
|
1948
1966
|
code += `slotDefault: ()=> {\n`;
|
|
1949
|
-
code +=
|
|
1967
|
+
code += yield* self.getDatasourceTypeCodeStr(state, children);
|
|
1950
1968
|
code += 'return [';
|
|
1951
|
-
children
|
|
1952
|
-
code += element.toEmbeddedTS(
|
|
1969
|
+
yield* wrapForEach(children, function* warpForEachGenerator(element) {
|
|
1970
|
+
code += yield* element.toEmbeddedTS(
|
|
1953
1971
|
shiftState(state, code, {
|
|
1954
1972
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1955
1973
|
}),
|
|
@@ -1963,16 +1981,13 @@ export class ViewElement extends BaseNode {
|
|
|
1963
1981
|
code += '}\n';
|
|
1964
1982
|
}
|
|
1965
1983
|
}
|
|
1966
|
-
|
|
1967
1984
|
code += indent(state?.tabSize || 0) + '})';
|
|
1968
|
-
|
|
1969
1985
|
// 顶层元素是单独的表达式
|
|
1970
1986
|
if (parentNode.concept === 'View') {
|
|
1971
1987
|
code += ';\n';
|
|
1972
1988
|
} else {
|
|
1973
1989
|
code += ',\n';
|
|
1974
1990
|
}
|
|
1975
|
-
|
|
1976
1991
|
return code;
|
|
1977
1992
|
}
|
|
1978
1993
|
|
|
@@ -2603,6 +2618,13 @@ export class ViewElement extends BaseNode {
|
|
|
2603
2618
|
return null;
|
|
2604
2619
|
}
|
|
2605
2620
|
|
|
2621
|
+
// 获取双向绑定的属性
|
|
2622
|
+
getSyncBindAttrs() {
|
|
2623
|
+
return (this.bindAttrs || []).filter((bindAttr) => {
|
|
2624
|
+
return !bindAttr?.shouldExcluded && bindAttr?.sync && bindAttr?.expression;
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2606
2628
|
/**
|
|
2607
2629
|
* 转换成 Vue 的模板格式
|
|
2608
2630
|
*/
|
|
@@ -2694,6 +2716,20 @@ export class ViewElement extends BaseNode {
|
|
|
2694
2716
|
|
|
2695
2717
|
result && result !== 'undefined' && parts.push(result);
|
|
2696
2718
|
});
|
|
2719
|
+
if (options?.finalCode !== false) {
|
|
2720
|
+
const eventNames: string[] = [];
|
|
2721
|
+
(this.bindEvents || []).forEach((bindEvent) => {
|
|
2722
|
+
eventNames.push(bindEvent?.name);
|
|
2723
|
+
});
|
|
2724
|
+
const syncBindAttrs = this.getSyncBindAttrs();
|
|
2725
|
+
(syncBindAttrs || []).forEach((bindAttr) => {
|
|
2726
|
+
const syncEventName = bindAttr.syncEventName;
|
|
2727
|
+
if (!eventNames.includes(syncEventName)) {
|
|
2728
|
+
const argsList = ['$event', ...(bindAttr.getArgsList() || [])];
|
|
2729
|
+
parts.push(`@${syncEventName}="${bindAttr.syncMethodName}(${argsList.join(', ')})"`);
|
|
2730
|
+
}
|
|
2731
|
+
});
|
|
2732
|
+
}
|
|
2697
2733
|
if (vIfs.length === 2) parts.push(`v-if="(${vIfs[0]}) && (${vIfs[1]})"`);
|
|
2698
2734
|
else if (vIfs.length === 1) parts.push(`v-if="${vIfs[0]}"`);
|
|
2699
2735
|
|
|
@@ -2732,25 +2768,29 @@ export class ViewElement extends BaseNode {
|
|
|
2732
2768
|
}
|
|
2733
2769
|
}
|
|
2734
2770
|
};
|
|
2735
|
-
|
|
2736
|
-
if (
|
|
2737
|
-
|
|
2738
|
-
if (valueAttr?.type === "dynamic" && numberType) {
|
|
2739
|
-
if (numberType == 'Decimal') {
|
|
2740
|
-
let variableName = ''
|
|
2741
|
-
if (valueAttr?.expression) {
|
|
2742
|
-
variableName = valueAttr?.expression?.name
|
|
2743
|
-
}
|
|
2744
|
-
pushDecimalLeng(2, variableName)
|
|
2745
|
-
!checkAttr("step") && parts.push(`:step="0.01"`);
|
|
2746
|
-
} else {
|
|
2747
|
-
pushDecimalLeng(0)
|
|
2748
|
-
}
|
|
2749
|
-
} else {
|
|
2750
|
-
pushDecimalLeng(0)
|
|
2751
|
-
|
|
2752
|
-
}
|
|
2771
|
+
// 许彤需求 不需要 number-input 的精度属性 要跟之前反着写 有就删除 不允许翻译
|
|
2772
|
+
if (hasdecimalLength) {
|
|
2773
|
+
// parts.delete(`:decimal-length="${len}"`)
|
|
2753
2774
|
}
|
|
2775
|
+
|
|
2776
|
+
// if (!hasdecimalLength) {
|
|
2777
|
+
|
|
2778
|
+
// if (valueAttr?.type === "dynamic" && numberType) {
|
|
2779
|
+
// if (numberType == 'Decimal') {
|
|
2780
|
+
// let variableName = ''
|
|
2781
|
+
// if (valueAttr?.expression) {
|
|
2782
|
+
// variableName = valueAttr?.expression?.name
|
|
2783
|
+
// }
|
|
2784
|
+
// pushDecimalLeng(2, variableName)
|
|
2785
|
+
// !checkAttr("step") && parts.push(`:step="0.01"`);
|
|
2786
|
+
// } else {
|
|
2787
|
+
// pushDecimalLeng(0)
|
|
2788
|
+
// }
|
|
2789
|
+
// } else {
|
|
2790
|
+
// pushDecimalLeng(0)
|
|
2791
|
+
|
|
2792
|
+
// }
|
|
2793
|
+
// }
|
|
2754
2794
|
!checkAttr("highPrecision") && parts.push(`:highPrecision="true"`);
|
|
2755
2795
|
}
|
|
2756
2796
|
if (['u-modal', 'u-drawer'].includes(this.tag)) {
|