@lcap/nasl 3.4.0-beta.6 → 3.5.0-alpha.1
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/.mocharc.js +1 -1
- package/out/automate/engine/uniqueName.js +7 -3
- package/out/automate/engine/uniqueName.js.map +1 -1
- package/out/automate/engine/utils.d.ts +1 -1
- package/out/automate/engine/utils.js +6 -6
- package/out/automate/engine/utils.js.map +1 -1
- package/out/bak/translator.js +2 -1
- package/out/bak/translator.js.map +1 -1
- package/out/breakpoint/generator/AfterStartNode.js +1 -1
- package/out/breakpoint/generator/AfterStartNode.js.map +1 -1
- package/out/breakpoint/generator/BeforeEndNode.js +1 -1
- package/out/breakpoint/generator/BeforeEndNode.js.map +1 -1
- package/out/breakpoint/generator/BreakpointNode.js +3 -3
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
- package/out/common/BaseNode.d.ts +16 -12
- package/out/common/BaseNode.js +41 -140
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/Command.js +1 -2
- package/out/common/Command.js.map +1 -1
- package/out/common/EventEmitter.d.ts +1 -1
- package/out/common/EventEmitter.js +8 -2
- package/out/common/EventEmitter.js.map +1 -1
- package/out/common/Messager.js +0 -2
- package/out/common/Messager.js.map +1 -1
- package/out/common/utils.d.ts +2 -2
- package/out/common/utils.js.map +1 -1
- package/out/concepts/Abort__.d.ts +1 -1
- package/out/concepts/Abort__.js +9 -17
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/AbstractInterface__.d.ts +1 -1
- package/out/concepts/AbstractInterface__.js +5 -9
- package/out/concepts/AbstractInterface__.js.map +1 -1
- package/out/concepts/Anchor__.d.ts +1 -1
- package/out/concepts/Anchor__.js +6 -19
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +5 -5
- package/out/concepts/AnonymousFunction__.js +28 -53
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.d.ts +19 -19
- package/out/concepts/App__.js +243 -295
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +3 -3
- package/out/concepts/Argument__.js +12 -35
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +2 -2
- package/out/concepts/Assignee__.js +41 -46
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +1 -1
- package/out/concepts/AssignmentLine__.js +13 -21
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +2 -2
- package/out/concepts/Assignment__.js +43 -38
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.d.ts +6 -6
- package/out/concepts/Attribute__.js +16 -74
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthInterface__.d.ts +3 -3
- package/out/concepts/AuthInterface__.js +11 -24
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +2 -2
- package/out/concepts/AuthLogicForCallInterface__.js +44 -50
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.d.ts +7 -7
- package/out/concepts/AuthLogic__.js +11 -24
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +10 -10
- package/out/concepts/BackendVariable__.js +37 -58
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.d.ts +3 -3
- package/out/concepts/Backend__.js +21 -33
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.d.ts +4 -4
- package/out/concepts/BatchAssignment__.js +45 -53
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +1 -1
- package/out/concepts/BinaryExpression__.js +15 -33
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +13 -13
- package/out/concepts/BindAttribute__.js +29 -87
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +7 -7
- package/out/concepts/BindDirective__.js +19 -66
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +11 -11
- package/out/concepts/BindEvent__.js +43 -66
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +7 -7
- package/out/concepts/BindStyle__.js +19 -36
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/Block__.d.ts +1 -1
- package/out/concepts/Block__.js +15 -20
- package/out/concepts/Block__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +1 -1
- package/out/concepts/BooleanLiteral__.js +5 -18
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +6 -5
- package/out/concepts/CallAuthInterface__.js +22 -27
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +3 -3
- package/out/concepts/CallConnector__.js +16 -29
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +4 -4
- package/out/concepts/CallFunction__.js +59 -59
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +7 -6
- package/out/concepts/CallInterface__.js +65 -63
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +5 -5
- package/out/concepts/CallLogic__.js +116 -116
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +15 -15
- package/out/concepts/CallQueryComponent__.js +83 -114
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.d.ts +1 -1
- package/out/concepts/Comment__.js +5 -18
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.d.ts +2 -2
- package/out/concepts/CompletionProperty__.js +18 -62
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.d.ts +3 -3
- package/out/concepts/ConfigGroup__.js +21 -33
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.d.ts +2 -2
- package/out/concepts/ConfigPropertyValue__.js +11 -29
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +4 -4
- package/out/concepts/ConfigProperty__.js +21 -43
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.d.ts +4 -4
- package/out/concepts/Configuration__.js +21 -28
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +4 -4
- package/out/concepts/Connection__.js +21 -43
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/ConnectorTrigger__.d.ts +7 -7
- package/out/concepts/ConnectorTrigger__.js +11 -34
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.d.ts +15 -15
- package/out/concepts/Connector__.js +87 -124
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.d.ts +11 -11
- package/out/concepts/Constant__.js +28 -43
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/CountersignPolicy__.d.ts +28 -0
- package/out/concepts/CountersignPolicy__.js +62 -0
- package/out/concepts/CountersignPolicy__.js.map +1 -0
- package/out/concepts/DataSource__.d.ts +4 -4
- package/out/concepts/DataSource__.js +22 -44
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.js +5 -23
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/DefaultValue__.d.ts +2 -2
- package/out/concepts/DefaultValue__.js +43 -25
- package/out/concepts/DefaultValue__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +5 -5
- package/out/concepts/Destination__.js +33 -53
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.d.ts +1 -1
- package/out/concepts/End__.js +9 -17
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +5 -5
- package/out/concepts/EntityIndex__.js +15 -43
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +13 -9
- package/out/concepts/EntityProperty__.js +41 -119
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +7 -7
- package/out/concepts/Entity__.js +40 -64
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +4 -4
- package/out/concepts/EnumItem__.js +11 -37
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +5 -5
- package/out/concepts/Enum__.js +23 -54
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.d.ts +5 -5
- package/out/concepts/Event__.js +21 -53
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +2 -2
- package/out/concepts/ExternalDestination__.js +38 -33
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +2 -2
- package/out/concepts/ForEachStatement__.js +28 -73
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.d.ts +5 -5
- package/out/concepts/FrontendLibrary__.js +30 -47
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/FrontendVariable__.d.ts +13 -1
- package/out/concepts/FrontendVariable__.js +23 -13
- package/out/concepts/FrontendVariable__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +8 -8
- package/out/concepts/Frontend__.js +91 -108
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.d.ts +8 -8
- package/out/concepts/Function__.js +53 -73
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/I18nInfo__.d.ts +1 -1
- package/out/concepts/I18nInfo__.js +5 -28
- package/out/concepts/I18nInfo__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -2
- package/out/concepts/Identifier__.js +43 -38
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +1 -1
- package/out/concepts/IfStatement__.js +43 -30
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/ImportedInterface__.d.ts +1 -1
- package/out/concepts/ImportedInterface__.js +5 -14
- package/out/concepts/ImportedInterface__.js.map +1 -1
- package/out/concepts/Integration__.d.ts +5 -5
- package/out/concepts/Integration__.js +21 -33
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.d.ts +11 -11
- package/out/concepts/InterfaceParam__.js +11 -49
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +16 -15
- package/out/concepts/Interface__.js +43 -81
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.d.ts +1 -1
- package/out/concepts/JSBlock__.js +9 -22
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.d.ts +1 -1
- package/out/concepts/JavaLogic__.js +5 -28
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +12 -12
- package/out/concepts/LogicItem__.js +18 -45
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +20 -19
- package/out/concepts/Logic__.js +110 -155
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +36 -43
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +3 -3
- package/out/concepts/Match__.js +84 -56
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +3 -2
- package/out/concepts/MemberExpression__.js +58 -48
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +6 -14
- package/out/concepts/MetadataType__.js +36 -77
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/MicroApp__.d.ts +1 -1
- package/out/concepts/MicroApp__.js +5 -48
- package/out/concepts/MicroApp__.js.map +1 -1
- package/out/concepts/Module__.d.ts +16 -16
- package/out/concepts/Module__.js +126 -190
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.d.ts +8 -8
- package/out/concepts/MsgTriggerEvent__.js +21 -28
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.d.ts +5 -5
- package/out/concepts/MsgTriggerLauncher__.js +21 -33
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/MultiApprovalPolicy__.d.ts +26 -0
- package/out/concepts/MultiApprovalPolicy__.js +59 -0
- package/out/concepts/MultiApprovalPolicy__.js.map +1 -0
- package/out/concepts/Namespace__.d.ts +12 -12
- package/out/concepts/Namespace__.js +115 -140
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +6 -6
- package/out/concepts/NewComposite__.js +70 -71
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +2 -2
- package/out/concepts/NewList__.js +19 -30
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +2 -2
- package/out/concepts/NewMap__.js +28 -39
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.d.ts +1 -1
- package/out/concepts/New__.js +5 -13
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/NullLiteral__.d.ts +2 -2
- package/out/concepts/NullLiteral__.js +6 -14
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +3 -3
- package/out/concepts/NumericLiteral__.js +8 -26
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +4 -4
- package/out/concepts/OqlQueryComponent__.js +18 -41
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.d.ts +18 -18
- package/out/concepts/OverriddenLogic__.js +108 -148
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.d.ts +15 -15
- package/out/concepts/Param__.js +60 -66
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.d.ts +1 -1
- package/out/concepts/Point__.js +5 -23
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.d.ts +5 -5
- package/out/concepts/ProcessComponent__.js +30 -57
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +29 -13
- package/out/concepts/ProcessElement__.js +119 -119
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.d.ts +1 -1
- package/out/concepts/ProcessOutcome__.js +9 -22
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.d.ts +1 -1
- package/out/concepts/ProcessOutcomes__.js +13 -21
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.d.ts +11 -9
- package/out/concepts/Process__.js +64 -85
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +2 -2
- package/out/concepts/QueryAggregateExpression__.js +5 -28
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +1 -1
- package/out/concepts/QueryFieldExpression__.js +9 -32
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +2 -2
- package/out/concepts/QueryFromExpression__.js +36 -35
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +1 -1
- package/out/concepts/QueryGroupByExpression__.js +5 -18
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +2 -2
- package/out/concepts/QueryJoinExpression__.js +22 -48
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +1 -1
- package/out/concepts/QueryLimitExpression__.js +5 -23
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +1 -1
- package/out/concepts/QueryOrderByExpression__.js +5 -23
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.d.ts +3 -3
- package/out/concepts/QuerySelectExpression__.js +28 -35
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.d.ts +1 -1
- package/out/concepts/Rect__.js +5 -33
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.d.ts +13 -13
- package/out/concepts/Return__.js +30 -52
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +2 -2
- package/out/concepts/Role__.js +15 -38
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +2 -2
- package/out/concepts/SelectMembers__.js +19 -31
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/SequentialPolicy__.d.ts +20 -0
- package/out/concepts/SequentialPolicy__.js +48 -0
- package/out/concepts/SequentialPolicy__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +5 -5
- package/out/concepts/Slot__.js +11 -49
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +4 -4
- package/out/concepts/SqlQueryComponent__.js +16 -44
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.d.ts +1 -1
- package/out/concepts/Start__.js +9 -17
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StaticString__.d.ts +49 -0
- package/out/concepts/StaticString__.js +91 -0
- package/out/concepts/StaticString__.js.map +1 -0
- package/out/concepts/StringInterpolation__.d.ts +2 -2
- package/out/concepts/StringInterpolation__.js +22 -23
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +2 -2
- package/out/concepts/StringLiteral__.js +10 -23
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +11 -7
- package/out/concepts/StructureProperty__.js +23 -66
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +7 -6
- package/out/concepts/Structure__.js +30 -52
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +1 -1
- package/out/concepts/SwitchCase__.js +36 -24
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.d.ts +2 -2
- package/out/concepts/SwitchStatement__.js +36 -20
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/Theme__.d.ts +1 -1
- package/out/concepts/Theme__.js +13 -21
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.d.ts +9 -9
- package/out/concepts/Transactional__.js +11 -34
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TriggerEvent__.d.ts +9 -78
- package/out/concepts/TriggerEvent__.js +15 -118
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +4 -4
- package/out/concepts/TriggerLauncher__.js +11 -39
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +7 -6
- package/out/concepts/TypeAnnotation__.js +41 -65
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +1 -1
- package/out/concepts/TypeParam__.js +11 -24
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +1 -1
- package/out/concepts/UnaryExpression__.js +5 -23
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +2 -2
- package/out/concepts/Unparsed__.js +6 -19
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.d.ts +1 -1
- package/out/concepts/UseComponent__.js +5 -23
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +3 -3
- package/out/concepts/ValidationRule__.js +48 -51
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +16 -16
- package/out/concepts/Variable__.js +38 -54
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewBlock__.d.ts +1 -1
- package/out/concepts/ViewBlock__.js +5 -28
- package/out/concepts/ViewBlock__.js.map +1 -1
- package/out/concepts/ViewComponent__.d.ts +8 -8
- package/out/concepts/ViewComponent__.js +110 -121
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +9 -9
- package/out/concepts/ViewElement__.js +138 -162
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +25 -13
- package/out/concepts/View__.js +197 -184
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.d.ts +1 -1
- package/out/concepts/WhileStatement__.js +36 -24
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/index.d.ts +12 -0
- package/out/concepts/basics/stdlib/index.js +46 -1
- package/out/concepts/basics/stdlib/index.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -5
- package/out/concepts/basics/stdlib/nasl.auth.js +76 -69
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +4 -2
- package/out/concepts/basics/stdlib/nasl.browser.js +54 -45
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -5
- package/out/concepts/basics/stdlib/nasl.collection.js +29 -24
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +4 -2
- package/out/concepts/basics/stdlib/nasl.configuration.js +27 -18
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -3
- package/out/concepts/basics/stdlib/nasl.core.js +25 -27
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.event.d.ts +4 -2
- package/out/concepts/basics/stdlib/nasl.event.js +16 -7
- package/out/concepts/basics/stdlib/nasl.event.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.http.d.ts +7 -5
- package/out/concepts/basics/stdlib/nasl.http.js +78 -73
- package/out/concepts/basics/stdlib/nasl.http.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +6 -4
- package/out/concepts/basics/stdlib/nasl.interface.js +28 -22
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.io.d.ts +4 -2
- package/out/concepts/basics/stdlib/nasl.io.js +30 -21
- package/out/concepts/basics/stdlib/nasl.io.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.logging.d.ts +4 -2
- package/out/concepts/basics/stdlib/nasl.logging.js +33 -24
- package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.process.d.ts +6 -4
- package/out/concepts/basics/stdlib/nasl.process.js +541 -536
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +6 -4
- package/out/concepts/basics/stdlib/nasl.ui.js +400 -425
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.d.ts +5 -4
- package/out/concepts/basics/stdlib/nasl.util.js +716 -702
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +4 -2
- package/out/concepts/basics/stdlib/nasl.validation.js +191 -182
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -1
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +4 -5
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +29 -8
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -1
- package/out/concepts/index.d.ts +2 -1
- package/out/concepts/index.js +18 -2
- package/out/concepts/index.js.map +1 -1
- package/out/concepts/index__.d.ts +4 -0
- package/out/concepts/index__.js +4 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/types__.d.ts +0 -127
- package/out/concepts/types__.js +0 -2
- package/out/concepts/utils/asserts.d.ts +6676 -0
- package/out/concepts/utils/asserts.js +8870 -0
- package/out/concepts/utils/asserts.js.map +1 -0
- package/out/concepts/utils/types.d.ts +430 -0
- package/out/concepts/utils/types.js +3 -0
- package/out/concepts/utils/types.js.map +1 -0
- package/out/decorators/index.d.ts +10 -7
- package/out/decorators/index.js +12 -8
- package/out/decorators/index.js.map +1 -1
- package/out/generator/genBundleFiles.js +33 -1
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.js +32 -3
- package/out/generator/genMetaData.js.map +1 -1
- package/out/generator/genReleaseBody.js.map +1 -1
- package/out/manager/diagnostic.js +3 -1
- package/out/manager/diagnostic.js.map +1 -1
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.d.ts +4 -5
- package/out/server/formatTsUtils.js +13 -12
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getConnector.js +19 -1
- package/out/server/getConnector.js.map +1 -1
- package/out/server/getFunctions.js +2 -2
- package/out/server/getFunctions.js.map +1 -1
- package/out/server/getLogging.js +1 -1
- package/out/server/getLogging.js.map +1 -1
- package/out/server/getLogics.d.ts +1 -0
- package/out/server/getLogics.js +17 -13
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.d.ts +4 -4
- package/out/server/getMemberIdentifier.js +22 -1
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcessComponents.js +1 -1
- package/out/server/getProcessComponents.js.map +1 -1
- package/out/server/getProcesses.js +56 -6
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/getValidates.d.ts +1 -1
- package/out/server/getValidates.js +2 -2
- package/out/server/getValidates.js.map +1 -1
- package/out/server/index.js +1 -0
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +8 -12
- package/out/server/naslServer.js +58 -76
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +3 -0
- package/out/server/translator.js.map +1 -1
- package/out/service/creator/errHandles.js +6 -3
- package/out/service/creator/errHandles.js.map +1 -1
- package/out/service/storage/init.d.ts +2 -0
- package/out/service/storage/init.js +35 -20
- package/out/service/storage/init.js.map +1 -1
- package/out/translator/types.d.ts +1 -0
- package/out/translator/utils.d.ts +1 -1
- package/out/translator/utils.js +1 -2
- package/out/translator/utils.js.map +1 -1
- package/out/utils/i18nInfo.js +0 -30
- package/out/utils/i18nInfo.js.map +1 -1
- package/out/utils/time-slicing/controller.d.ts +1 -1
- package/out/utils/time-slicing/controller.js +79 -65
- package/out/utils/time-slicing/controller.js.map +1 -1
- package/out/utils/time-slicing/performance.js +0 -1
- package/out/utils/time-slicing/performance.js.map +1 -1
- package/out/utils/time-slicing/runner.d.ts +1 -1
- package/out/utils/time-slicing/runner.js +4 -5
- package/out/utils/time-slicing/runner.js.map +1 -1
- package/out/utils/time-slicing/tool.d.ts +1 -1
- package/out/utils/types.d.ts +5 -0
- package/package.json +2 -2
- package/sandbox/stdlib/nasl.configuration.ts +16 -1
- package/sandbox/stdlib/nasl.core.ts +3 -0
- package/sandbox/stdlib/nasl.oql.ts +19 -2
- package/sandbox/stdlib/nasl.util.ts +2 -2
- package/src/automate/engine/utils.js +6 -6
- package/src/bak/translator.js +2 -1
- package/src/common/BaseNode.ts +30 -30
- package/src/common/Command.ts +1 -1
- package/src/common/EventEmitter.ts +6 -1
- package/src/common/utils.ts +2 -2
- package/src/concepts/Abort__.ts +5 -6
- package/src/concepts/AbstractInterface__.ts +5 -5
- package/src/concepts/Anchor__.ts +7 -9
- package/src/concepts/AnonymousFunction__.ts +23 -29
- package/src/concepts/App__.ts +89 -73
- package/src/concepts/Argument__.ts +11 -15
- package/src/concepts/Assignee__.ts +13 -11
- package/src/concepts/AssignmentLine__.ts +5 -5
- package/src/concepts/Assignment__.ts +24 -25
- package/src/concepts/Attribute__.ts +10 -20
- package/src/concepts/AuthInterface__.ts +9 -15
- package/src/concepts/AuthLogicForCallInterface__.ts +43 -33
- package/src/concepts/AuthLogic__.ts +11 -13
- package/src/concepts/BackendVariable__.ts +39 -30
- package/src/concepts/Backend__.ts +10 -10
- package/src/concepts/BatchAssignment__.ts +23 -18
- package/src/concepts/BinaryExpression__.ts +14 -14
- package/src/concepts/BindAttribute__.ts +25 -34
- package/src/concepts/BindDirective__.ts +14 -21
- package/src/concepts/BindEvent__.ts +31 -30
- package/src/concepts/BindStyle__.ts +14 -15
- package/src/concepts/Block__.ts +9 -8
- package/src/concepts/BooleanLiteral__.ts +5 -7
- package/src/concepts/CallAuthInterface__.ts +16 -16
- package/src/concepts/CallConnector__.ts +15 -14
- package/src/concepts/CallFunction__.ts +23 -22
- package/src/concepts/CallInterface__.ts +25 -23
- package/src/concepts/CallLogic__.ts +127 -85
- package/src/concepts/CallQueryComponent__.ts +41 -32
- package/src/concepts/Comment__.ts +5 -7
- package/src/concepts/CompletionProperty__.ts +6 -13
- package/src/concepts/ConfigGroup__.ts +10 -10
- package/src/concepts/ConfigPropertyValue__.ts +6 -8
- package/src/concepts/ConfigProperty__.ts +13 -15
- package/src/concepts/Configuration__.ts +10 -9
- package/src/concepts/Connection__.ts +10 -12
- package/src/concepts/ConnectorTrigger__.ts +11 -14
- package/src/concepts/Connector__.ts +33 -33
- package/src/concepts/Constant__.ts +35 -26
- package/src/concepts/CountersignPolicy__.ts +78 -0
- package/src/concepts/DataSource__.ts +10 -12
- package/src/concepts/DatabaseTypeAnnotation__.ts +5 -7
- package/src/concepts/DefaultValue__.ts +18 -8
- package/src/concepts/Destination__.ts +18 -18
- package/src/concepts/End__.ts +7 -8
- package/src/concepts/EntityIndex__.ts +9 -13
- package/src/concepts/EntityProperty__.ts +18 -28
- package/src/concepts/Entity__.ts +19 -22
- package/src/concepts/EnumItem__.ts +8 -10
- package/src/concepts/Enum__.ts +12 -14
- package/src/concepts/Event__.ts +11 -15
- package/src/concepts/ExternalDestination__.ts +12 -15
- package/src/concepts/ForEachStatement__.ts +28 -41
- package/src/concepts/FrontendLibrary__.ts +14 -14
- package/src/concepts/FrontendVariable__.ts +22 -6
- package/src/concepts/Frontend__.ts +48 -30
- package/src/concepts/Function__.ts +26 -23
- package/src/concepts/I18nInfo__.ts +5 -8
- package/src/concepts/Identifier__.ts +12 -15
- package/src/concepts/IfStatement__.ts +9 -9
- package/src/concepts/ImportedInterface__.ts +5 -7
- package/src/concepts/Integration__.ts +11 -11
- package/src/concepts/InterfaceParam__.ts +20 -24
- package/src/concepts/Interface__.ts +26 -31
- package/src/concepts/JSBlock__.ts +5 -7
- package/src/concepts/JavaLogic__.ts +5 -9
- package/src/concepts/LogicItem__.ts +21 -25
- package/src/concepts/Logic__.ts +87 -81
- package/src/concepts/MatchCase__.ts +20 -18
- package/src/concepts/Match__.ts +48 -23
- package/src/concepts/MemberExpression__.ts +32 -29
- package/src/concepts/MetadataType__.ts +15 -34
- package/src/concepts/MicroApp__.ts +5 -12
- package/src/concepts/Module__.ts +47 -43
- package/src/concepts/MsgTriggerEvent__.ts +14 -14
- package/src/concepts/MsgTriggerLauncher__.ts +11 -12
- package/src/concepts/MultiApprovalPolicy__.ts +72 -0
- package/src/concepts/Namespace__.ts +40 -32
- package/src/concepts/NewComposite__.ts +43 -28
- package/src/concepts/NewList__.ts +14 -14
- package/src/concepts/NewMap__.ts +17 -16
- package/src/concepts/New__.ts +5 -6
- package/src/concepts/NullLiteral__.ts +6 -7
- package/src/concepts/NumericLiteral__.ts +8 -10
- package/src/concepts/OqlQueryComponent__.ts +12 -14
- package/src/concepts/OverriddenLogic__.ts +81 -71
- package/src/concepts/Param__.ts +40 -40
- package/src/concepts/Point__.ts +5 -7
- package/src/concepts/ProcessComponent__.ts +13 -15
- package/src/concepts/ProcessElement__.ts +101 -34
- package/src/concepts/ProcessOutcome__.ts +5 -7
- package/src/concepts/ProcessOutcomes__.ts +5 -6
- package/src/concepts/Process__.ts +29 -25
- package/src/concepts/QueryAggregateExpression__.ts +6 -10
- package/src/concepts/QueryFieldExpression__.ts +6 -10
- package/src/concepts/QueryFromExpression__.ts +8 -11
- package/src/concepts/QueryGroupByExpression__.ts +5 -7
- package/src/concepts/QueryJoinExpression__.ts +11 -14
- package/src/concepts/QueryLimitExpression__.ts +5 -8
- package/src/concepts/QueryOrderByExpression__.ts +5 -8
- package/src/concepts/QuerySelectExpression__.ts +11 -10
- package/src/concepts/Rect__.ts +5 -9
- package/src/concepts/Return__.ts +30 -26
- package/src/concepts/Role__.ts +7 -10
- package/src/concepts/SelectMembers__.ts +10 -10
- package/src/concepts/SequentialPolicy__.ts +60 -0
- package/src/concepts/Slot__.ts +9 -15
- package/src/concepts/SqlQueryComponent__.ts +11 -16
- package/src/concepts/Start__.ts +5 -6
- package/src/concepts/StaticString__.ts +104 -0
- package/src/concepts/StringInterpolation__.ts +13 -9
- package/src/concepts/StringLiteral__.ts +6 -8
- package/src/concepts/StructureProperty__.ts +16 -20
- package/src/concepts/Structure__.ts +14 -15
- package/src/concepts/SwitchCase__.ts +7 -8
- package/src/concepts/SwitchStatement__.ts +8 -8
- package/src/concepts/Theme__.ts +5 -5
- package/src/concepts/Transactional__.ts +13 -16
- package/src/concepts/TriggerEvent__.ts +22 -177
- package/src/concepts/TriggerLauncher__.ts +9 -13
- package/src/concepts/TypeAnnotation__.ts +22 -18
- package/src/concepts/TypeParam__.ts +5 -6
- package/src/concepts/UnaryExpression__.ts +5 -8
- package/src/concepts/Unparsed__.ts +6 -8
- package/src/concepts/UseComponent__.ts +5 -7
- package/src/concepts/ValidationRule__.ts +13 -16
- package/src/concepts/Variable__.ts +50 -37
- package/src/concepts/ViewBlock__.ts +5 -8
- package/src/concepts/ViewComponent__.ts +68 -47
- package/src/concepts/ViewElement__.ts +114 -89
- package/src/concepts/View__.ts +183 -91
- package/src/concepts/WhileStatement__.ts +7 -8
- package/src/concepts/basics/stdlib/index.ts +66 -20
- package/src/concepts/basics/stdlib/nasl.auth.ts +167 -149
- package/src/concepts/basics/stdlib/nasl.browser.ts +143 -132
- package/src/concepts/basics/stdlib/nasl.collection.ts +54 -39
- package/src/concepts/basics/stdlib/nasl.configuration.ts +19 -9
- package/src/concepts/basics/stdlib/nasl.core.ts +41 -35
- package/src/concepts/basics/stdlib/nasl.event.ts +27 -17
- package/src/concepts/basics/stdlib/nasl.http.ts +170 -158
- package/src/concepts/basics/stdlib/nasl.interface.ts +48 -37
- package/src/concepts/basics/stdlib/nasl.io.ts +54 -44
- package/src/concepts/basics/stdlib/nasl.logging.ts +56 -55
- package/src/concepts/basics/stdlib/nasl.process.ts +610 -594
- package/src/concepts/basics/stdlib/nasl.ui.ts +1005 -986
- package/src/concepts/basics/stdlib/nasl.util.ts +2270 -2251
- package/src/concepts/basics/stdlib/nasl.validation.ts +567 -556
- package/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts +19 -23
- package/src/concepts/index.ts +9 -1
- package/src/concepts/index__.ts +4 -0
- package/src/concepts/types__.ts +0 -254
- package/src/concepts/utils/asserts.ts +9530 -0
- package/src/concepts/utils/types.ts +670 -0
- package/src/decorators/index.ts +17 -16
- package/src/generator/genBundleFiles.ts +34 -2
- package/src/generator/genMetaData.ts +31 -3
- package/src/generator/genReleaseBody.ts +41 -40
- package/src/server/extendBaseNode.ts +2 -1
- package/src/server/formatTsUtils.ts +21 -20
- package/src/server/getConnector.ts +21 -2
- package/src/server/getFunctions.ts +3 -3
- package/src/server/getLogging.ts +2 -2
- package/src/server/getLogics.ts +16 -12
- package/src/server/getMemberIdentifier.ts +26 -5
- package/src/server/getProcessComponents.ts +2 -2
- package/src/server/getProcesses.ts +56 -6
- package/src/server/getValidates.ts +3 -2
- package/src/server/index.ts +2 -1
- package/src/server/naslServer.ts +51 -60
- package/src/server/translator.ts +3 -0
- package/src/service/creator/errHandles.js +7 -4
- package/src/service/storage/init.ts +34 -7
- package/src/translator/types.ts +1 -0
- package/src/translator/utils.ts +1 -2
- package/src/utils/i18nInfo.ts +0 -30
- package/src/utils/time-slicing/controller.ts +34 -23
- package/src/utils/time-slicing/runner.ts +7 -9
- package/src/utils/time-slicing/tool.ts +1 -1
- package/src/utils/types.ts +6 -0
- package/test/concepts/anonymous-function/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/anonymous-function/toJS.spec.ts +2 -2
- package/test/concepts/anonymous-function/toVue.spec.ts +2 -2
- package/test/concepts/assignment/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/assignment/toJS.spec.ts +2 -2
- package/test/concepts/assignment/toVue.spec.ts +2 -2
- package/test/concepts/batch-assignment/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/batch-assignment/toJS.spec.ts +2 -2
- package/test/concepts/batch-assignment/toVue.spec.ts +2 -2
- package/test/concepts/binary-expression/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/binary-expression/toJS.spec.ts +2 -2
- package/test/concepts/binary-expression/toVue.spec.ts +2 -2
- package/test/concepts/boolean-literal/toEmbeddedTS.spec.ts +3 -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 +3 -3
- package/test/concepts/call-function/toJS.spec.ts +2 -2
- package/test/concepts/call-interface/__snapshots__/toEmbeddedTS.spec.ts.snap +6 -9
- package/test/concepts/call-interface/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/call-interface/toJS.spec.ts +2 -2
- package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +27 -3
- package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +18 -3
- package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +15 -0
- package/test/concepts/call-logic/__snapshots__/toUI.spec.ts.snap +7 -0
- package/test/concepts/call-logic/__snapshots__/toVue.spec.ts.snap +101 -0
- package/test/concepts/call-logic/__snapshots__/toVueDesigner.spec.ts.snap +7 -0
- package/test/concepts/call-logic/fixtures/json-deserialize.json +173 -0
- package/test/concepts/call-logic/fixtures/json-serialize-with-string.json +177 -0
- package/test/concepts/call-logic/fixtures/json-serialize.json +178 -0
- package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +3 -3
- package/test/concepts/call-logic/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/call-logic/toJS.spec.ts +2 -2
- package/test/concepts/call-logic/toUI.spec.ts +16 -0
- package/test/concepts/call-logic/toVue.spec.ts +14 -0
- package/test/concepts/call-logic/toVueDesigner.spec.ts +16 -0
- package/test/concepts/data-source/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/data-source/toEmbeddedTSFile.spec.ts +3 -3
- package/test/concepts/entity/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/entity/toEmbeddedTSFile.spec.ts +2 -2
- package/test/concepts/identifier/toEmbeddedTS.spec.ts +3 -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 +3 -3
- package/test/concepts/match/toJS.spec.ts +2 -2
- package/test/concepts/member-expression/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/member-expression/toJS.spec.ts +2 -2
- package/test/concepts/member-expression/toVue.spec.ts +2 -2
- package/test/concepts/null-literal/toEmbeddedTS.spec.ts +3 -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 +3 -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 +3 -3
- package/test/concepts/string-literal/toJS.spec.ts +2 -2
- package/test/concepts/string-literal/toVue.spec.ts +2 -2
- package/test/concepts/utils.ts +2 -2
- package/test/concepts/validation-rule/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/validation-rule/toJS.spec.ts +2 -2
- package/test/concepts/validation-rule/validation-rule.spec.ts +3 -3
- package/test/concepts/view-element/toEmbeddedTS.spec.ts +3 -3
- package/test/concepts/view-element/toVue.spec.ts +2 -2
- package/test/time-slicing/runner.spec.ts +5 -1
- package/test/time-slicing/time-slicing-nodejs.spec.ts +1 -1
- package/test/time-slicing/wrapper.spec.ts +1 -1
- package/tsconfig.json +2 -1
package/src/concepts/Logic__.ts
CHANGED
|
@@ -18,19 +18,19 @@ import {
|
|
|
18
18
|
withGenerator,
|
|
19
19
|
TranslatorGenerator,
|
|
20
20
|
} from '../translator';
|
|
21
|
-
import Namespace from './Namespace__';
|
|
22
|
-
import CallQueryComponent from './CallQueryComponent__';
|
|
23
|
-
import ForEachStatement from './ForEachStatement__';
|
|
24
|
-
import Assignment from './Assignment__';
|
|
25
|
-
import Identifier from './Identifier__';
|
|
26
|
-
import BindEvent from './BindEvent__';
|
|
27
|
-
import BatchAssignment from './BatchAssignment__';
|
|
28
|
-
import OqlQueryComponent from './OqlQueryComponent__';
|
|
29
|
-
import Match from './Match__';
|
|
30
|
-
import MatchCase from './MatchCase__';
|
|
31
|
-
import TypeAnnotation from './TypeAnnotation__';
|
|
32
|
-
import CallInterface from './CallInterface__';
|
|
33
|
-
import CallLogic from './CallLogic__';
|
|
21
|
+
import type Namespace from './Namespace__';
|
|
22
|
+
import type CallQueryComponent from './CallQueryComponent__';
|
|
23
|
+
import type ForEachStatement from './ForEachStatement__';
|
|
24
|
+
import type Assignment from './Assignment__';
|
|
25
|
+
import type Identifier from './Identifier__';
|
|
26
|
+
import type BindEvent from './BindEvent__';
|
|
27
|
+
import type BatchAssignment from './BatchAssignment__';
|
|
28
|
+
import type OqlQueryComponent from './OqlQueryComponent__';
|
|
29
|
+
import type Match from './Match__';
|
|
30
|
+
import type MatchCase from './MatchCase__';
|
|
31
|
+
import type TypeAnnotation from './TypeAnnotation__';
|
|
32
|
+
import type CallInterface from './CallInterface__';
|
|
33
|
+
import type CallLogic from './CallLogic__';
|
|
34
34
|
import { CUSTOM_CONNECTOR_EDITABLE_SUFFIX } from './basics/constants';
|
|
35
35
|
import type Interface from './Interface__';
|
|
36
36
|
|
|
@@ -39,37 +39,37 @@ import type Interface from './Interface__';
|
|
|
39
39
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
40
40
|
//================================================================================
|
|
41
41
|
import { EventPayload, Params } from '../common/EventEmitter';
|
|
42
|
-
import { concept, excludedInJSON, property,
|
|
42
|
+
import { concept, excludedInJSON, property, getConceptConstructor, getBaseNode } from '../decorators';
|
|
43
43
|
|
|
44
44
|
import * as utils from '../utils';
|
|
45
|
+
import * as types from './utils/types';
|
|
46
|
+
import * as asserts from './utils/asserts';
|
|
45
47
|
import { v4 as uuidv4 } from 'uuid';
|
|
46
48
|
import BaseNode from '../common/BaseNode';
|
|
47
|
-
import Transactional from './Transactional__';
|
|
48
|
-
import TypeParam from './TypeParam__';
|
|
49
|
-
import Param from './Param__';
|
|
50
|
-
import Return from './Return__';
|
|
51
|
-
import Variable from './Variable__';
|
|
52
|
-
import LogicItem from './LogicItem__';
|
|
53
|
-
import Module from './Module__';
|
|
54
|
-
import Connector from './Connector__';
|
|
55
|
-
import View from './View__';
|
|
56
|
-
import ProcessElement from './ProcessElement__';
|
|
57
|
-
import App from './App__';
|
|
58
|
-
import Frontend from './Frontend__';
|
|
59
|
-
import Process from './Process__';
|
|
49
|
+
import type Transactional from './Transactional__';
|
|
50
|
+
import type TypeParam from './TypeParam__';
|
|
51
|
+
import type Param from './Param__';
|
|
52
|
+
import type Return from './Return__';
|
|
53
|
+
import type Variable from './Variable__';
|
|
54
|
+
import type LogicItem from './LogicItem__';
|
|
55
|
+
import type Module from './Module__';
|
|
56
|
+
import type Connector from './Connector__';
|
|
57
|
+
import type View from './View__';
|
|
58
|
+
import type ProcessElement from './ProcessElement__';
|
|
59
|
+
import type App from './App__';
|
|
60
|
+
import type Frontend from './Frontend__';
|
|
61
|
+
import type Process from './Process__';
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
64
|
* 逻辑
|
|
63
65
|
*/
|
|
64
|
-
@className
|
|
65
66
|
@concept('逻辑')
|
|
66
|
-
// @ts-ignore
|
|
67
67
|
export class Logic extends BaseNode {
|
|
68
68
|
/** 类名 */
|
|
69
|
-
static readonly ConceptName = 'Logic';
|
|
69
|
+
static readonly ConceptName: string = 'Logic';
|
|
70
70
|
|
|
71
71
|
/** 继承链 */
|
|
72
|
-
static readonly inheritanceChain = ['BaseNode'];
|
|
72
|
+
static readonly inheritanceChain: string[] = ['BaseNode'];
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
75
|
* 产品概念
|
|
@@ -82,42 +82,36 @@ export class Logic extends BaseNode {
|
|
|
82
82
|
* 逻辑名称
|
|
83
83
|
*/
|
|
84
84
|
@property()
|
|
85
|
-
// @ts-ignore
|
|
86
85
|
name!: string;
|
|
87
86
|
|
|
88
87
|
/**
|
|
89
88
|
* 逻辑标题
|
|
90
89
|
*/
|
|
91
90
|
@property()
|
|
92
|
-
// @ts-ignore
|
|
93
91
|
title!: string;
|
|
94
92
|
|
|
95
93
|
/**
|
|
96
94
|
* 逻辑描述
|
|
97
95
|
*/
|
|
98
96
|
@property()
|
|
99
|
-
// @ts-ignore
|
|
100
97
|
description!: string;
|
|
101
98
|
|
|
102
99
|
/**
|
|
103
100
|
* 触发方式
|
|
104
101
|
*/
|
|
105
102
|
@property()
|
|
106
|
-
// @ts-ignore
|
|
107
103
|
triggerType!: string;
|
|
108
104
|
|
|
109
105
|
/**
|
|
110
106
|
* 定时任务表达式
|
|
111
107
|
*/
|
|
112
108
|
@property()
|
|
113
|
-
// @ts-ignore
|
|
114
109
|
cron!: string;
|
|
115
110
|
|
|
116
111
|
/**
|
|
117
112
|
* 是否可覆写
|
|
118
113
|
*/
|
|
119
114
|
@property()
|
|
120
|
-
// @ts-ignore
|
|
121
115
|
overridable!: boolean;
|
|
122
116
|
|
|
123
117
|
/**
|
|
@@ -126,7 +120,6 @@ export class Logic extends BaseNode {
|
|
|
126
120
|
@property({
|
|
127
121
|
objectRef: 'Transactional',
|
|
128
122
|
})
|
|
129
|
-
// @ts-ignore
|
|
130
123
|
transactional!: Transactional;
|
|
131
124
|
|
|
132
125
|
/**
|
|
@@ -376,6 +369,7 @@ export class Logic extends BaseNode {
|
|
|
376
369
|
_insertTypeParamAt(options: string | Partial<TypeParam> | TypeParam, index: number) {
|
|
377
370
|
const typeParamOptions: any = {};
|
|
378
371
|
const relationOptions = { parentNode: this, parentKey: 'typeParams' };
|
|
372
|
+
const TypeParam = getConceptConstructor('TypeParam');
|
|
379
373
|
let typeParam: TypeParam;
|
|
380
374
|
if (!options) {
|
|
381
375
|
typeParam = TypeParam.from(
|
|
@@ -395,7 +389,7 @@ export class Logic extends BaseNode {
|
|
|
395
389
|
this,
|
|
396
390
|
'typeParams',
|
|
397
391
|
);
|
|
398
|
-
} else if (options
|
|
392
|
+
} else if (asserts.isTypeParam(options)) {
|
|
399
393
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
400
394
|
typeParam = options;
|
|
401
395
|
Object.assign(typeParam, relationOptions);
|
|
@@ -525,6 +519,7 @@ export class Logic extends BaseNode {
|
|
|
525
519
|
_insertParamAt(options: string | Partial<Param> | Param, index: number) {
|
|
526
520
|
const paramOptions: any = {};
|
|
527
521
|
const relationOptions = { parentNode: this, parentKey: 'params' };
|
|
522
|
+
const Param = getConceptConstructor('Param');
|
|
528
523
|
let param: Param;
|
|
529
524
|
if (!options) {
|
|
530
525
|
param = Param.from(
|
|
@@ -544,7 +539,7 @@ export class Logic extends BaseNode {
|
|
|
544
539
|
this,
|
|
545
540
|
'params',
|
|
546
541
|
);
|
|
547
|
-
} else if (options
|
|
542
|
+
} else if (asserts.isParam(options)) {
|
|
548
543
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
549
544
|
param = options;
|
|
550
545
|
Object.assign(param, relationOptions);
|
|
@@ -674,6 +669,7 @@ export class Logic extends BaseNode {
|
|
|
674
669
|
_insertReturnAt(options: string | Partial<Return> | Return, index: number) {
|
|
675
670
|
const retOptions: any = {};
|
|
676
671
|
const relationOptions = { parentNode: this, parentKey: 'returns' };
|
|
672
|
+
const Return = getConceptConstructor('Return');
|
|
677
673
|
let ret: Return;
|
|
678
674
|
if (!options) {
|
|
679
675
|
ret = Return.from(
|
|
@@ -693,7 +689,7 @@ export class Logic extends BaseNode {
|
|
|
693
689
|
this,
|
|
694
690
|
'returns',
|
|
695
691
|
);
|
|
696
|
-
} else if (options
|
|
692
|
+
} else if (asserts.isReturn(options)) {
|
|
697
693
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
698
694
|
ret = options;
|
|
699
695
|
Object.assign(ret, relationOptions);
|
|
@@ -823,6 +819,7 @@ export class Logic extends BaseNode {
|
|
|
823
819
|
_insertVariableAt(options: string | Partial<Variable> | Variable, index: number) {
|
|
824
820
|
const variableOptions: any = {};
|
|
825
821
|
const relationOptions = { parentNode: this, parentKey: 'variables' };
|
|
822
|
+
const Variable = getConceptConstructor('Variable');
|
|
826
823
|
let variable: Variable;
|
|
827
824
|
if (!options) {
|
|
828
825
|
variable = Variable.from(
|
|
@@ -842,7 +839,7 @@ export class Logic extends BaseNode {
|
|
|
842
839
|
this,
|
|
843
840
|
'variables',
|
|
844
841
|
);
|
|
845
|
-
} else if (options
|
|
842
|
+
} else if (asserts.isVariable(options)) {
|
|
846
843
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
847
844
|
variable = options;
|
|
848
845
|
Object.assign(variable, relationOptions);
|
|
@@ -961,8 +958,9 @@ export class Logic extends BaseNode {
|
|
|
961
958
|
_insertItemInBodyAt(options: Partial<LogicItem> | LogicItem, index: number) {
|
|
962
959
|
const logicItemOptions: any = {};
|
|
963
960
|
const relationOptions = { parentNode: this, parentKey: 'body' };
|
|
961
|
+
const LogicItem = getConceptConstructor('LogicItem');
|
|
964
962
|
let logicItem: LogicItem;
|
|
965
|
-
if (options
|
|
963
|
+
if (asserts.isLogicItem(options)) {
|
|
966
964
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
967
965
|
logicItem = options;
|
|
968
966
|
Object.assign(logicItem, relationOptions);
|
|
@@ -1061,8 +1059,9 @@ export class Logic extends BaseNode {
|
|
|
1061
1059
|
_insertItemInPlaygroundAt(options: Partial<LogicItem> | LogicItem, index: number) {
|
|
1062
1060
|
const logicItemOptions: any = {};
|
|
1063
1061
|
const relationOptions = { parentNode: this, parentKey: 'playground' };
|
|
1062
|
+
const LogicItem = getConceptConstructor('LogicItem');
|
|
1064
1063
|
let logicItem: LogicItem;
|
|
1065
|
-
if (options
|
|
1064
|
+
if (asserts.isLogicItem(options)) {
|
|
1066
1065
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1067
1066
|
logicItem = options;
|
|
1068
1067
|
Object.assign(logicItem, relationOptions);
|
|
@@ -1501,6 +1500,7 @@ export class Logic extends BaseNode {
|
|
|
1501
1500
|
* 创建的时候 打开事务 通过开关设置数据库事务
|
|
1502
1501
|
*/
|
|
1503
1502
|
openTransactional(flag: boolean) {
|
|
1503
|
+
const Transactional = getConceptConstructor('Transactional');
|
|
1504
1504
|
if (flag) {
|
|
1505
1505
|
const transactional = new Transactional({
|
|
1506
1506
|
enabled: flag,
|
|
@@ -1575,7 +1575,7 @@ export class Logic extends BaseNode {
|
|
|
1575
1575
|
if (Array.isArray(this.params)) {
|
|
1576
1576
|
this.params.forEach((param) => {
|
|
1577
1577
|
code += `${indent((state?.tabSize || 0) + 1)}`;
|
|
1578
|
-
code += param.toJS(
|
|
1578
|
+
code += param.toJS(state);
|
|
1579
1579
|
code += ';\n';
|
|
1580
1580
|
});
|
|
1581
1581
|
}
|
|
@@ -1583,7 +1583,7 @@ export class Logic extends BaseNode {
|
|
|
1583
1583
|
if (Array.isArray(this.variables)) {
|
|
1584
1584
|
this.variables.forEach((variable) => {
|
|
1585
1585
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
1586
|
-
code += variable.toJS(
|
|
1586
|
+
code += variable.toJS(state);
|
|
1587
1587
|
code += ';\n';
|
|
1588
1588
|
});
|
|
1589
1589
|
}
|
|
@@ -1592,7 +1592,7 @@ export class Logic extends BaseNode {
|
|
|
1592
1592
|
if (Array.isArray(this.returns)) {
|
|
1593
1593
|
this.returns.forEach((ret) => {
|
|
1594
1594
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
1595
|
-
code += ret.toJS(
|
|
1595
|
+
code += ret.toJS(state);
|
|
1596
1596
|
code += ';\n';
|
|
1597
1597
|
});
|
|
1598
1598
|
}
|
|
@@ -1732,13 +1732,10 @@ export class Logic extends BaseNode {
|
|
|
1732
1732
|
let code = '';
|
|
1733
1733
|
if (!prefix) code += `${noName ? '' : `${self.name}:`} function(`;
|
|
1734
1734
|
else code += `function ${self.name}(`; // 加空格会导致无法查询到引用
|
|
1735
|
-
yield* wrapForEach(
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
if (index !== self.params.length - 1) code += ', ';
|
|
1740
|
-
},
|
|
1741
|
-
);
|
|
1735
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
1736
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1737
|
+
if (index !== self.params.length - 1) code += ', ';
|
|
1738
|
+
});
|
|
1742
1739
|
code += `) {\n`;
|
|
1743
1740
|
code += prependCode || '';
|
|
1744
1741
|
code += '\n';
|
|
@@ -1762,14 +1759,15 @@ export class Logic extends BaseNode {
|
|
|
1762
1759
|
}
|
|
1763
1760
|
} else if (
|
|
1764
1761
|
self.body.length <= 2 &&
|
|
1765
|
-
!(self.parentNode
|
|
1766
|
-
!(self.parentNode
|
|
1762
|
+
!asserts.isNamespace(self.parentNode) &&
|
|
1763
|
+
!asserts.isProcess(self.parentNode)
|
|
1767
1764
|
) {
|
|
1768
1765
|
code += indent((state?.tabSize || 0) + 1);
|
|
1769
1766
|
code += `${indent(state?.tabSize || 0 + 4)}const __LogicEmpty: any = null;`;
|
|
1770
1767
|
}
|
|
1771
1768
|
yield* wrapForEach(self.body, function* warpForEachGenerator(item) {
|
|
1772
|
-
code += yield* item.toEmbeddedTS?.(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 })) ??
|
|
1769
|
+
code += yield* item.toEmbeddedTS?.(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 })) ??
|
|
1770
|
+
returnOrigin('');
|
|
1773
1771
|
code += ';\n';
|
|
1774
1772
|
});
|
|
1775
1773
|
}
|
|
@@ -1837,8 +1835,8 @@ export class Logic extends BaseNode {
|
|
|
1837
1835
|
const advanceMap: Map<Return | Variable, Assignment | BatchAssignment> = new Map();
|
|
1838
1836
|
// const needGetSourceMapOqlList: Promise<any>[] = [];
|
|
1839
1837
|
yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
|
|
1840
|
-
if (el && (el
|
|
1841
|
-
if (el
|
|
1838
|
+
if (el && (asserts.isBatchAssignment(el) || (asserts.isAssignment(el) && el.left?.name))) {
|
|
1839
|
+
if (asserts.isAssignment(el)) {
|
|
1842
1840
|
const advanceVar = self.variables?.find(
|
|
1843
1841
|
(variable) => !variable.typeAnnotation && el.left?.name === variable.name,
|
|
1844
1842
|
);
|
|
@@ -1849,12 +1847,13 @@ export class Logic extends BaseNode {
|
|
|
1849
1847
|
if (advanceRn && !advanceMap.get(advanceRn)) {
|
|
1850
1848
|
advanceMap.set(advanceRn, el);
|
|
1851
1849
|
}
|
|
1852
|
-
} else if (el
|
|
1850
|
+
} else if (asserts.isBatchAssignment(el)) {
|
|
1853
1851
|
yield* wrapForEach(el.assignmentLines, function* warpForEachGenerator({ leftIndex }) {
|
|
1854
1852
|
const leftCode =
|
|
1855
1853
|
leftIndex.length === 1
|
|
1856
1854
|
? yield* el.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
1857
|
-
: yield* el.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1855
|
+
: yield* el.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1856
|
+
returnOrigin('');
|
|
1858
1857
|
const advanceVar = self.variables?.find(
|
|
1859
1858
|
(variable) => !variable.typeAnnotation && leftCode === variable.name,
|
|
1860
1859
|
);
|
|
@@ -1872,7 +1871,8 @@ export class Logic extends BaseNode {
|
|
|
1872
1871
|
// 兼容 return 没有类型情况
|
|
1873
1872
|
if (self.returns.length && self.returns[0].typeAnnotation) {
|
|
1874
1873
|
code += ': ';
|
|
1875
|
-
code += yield* self.returns[0].typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1874
|
+
code += yield* self.returns[0].typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1875
|
+
returnOrigin('');
|
|
1876
1876
|
}
|
|
1877
1877
|
code += '{\n';
|
|
1878
1878
|
// 用于虚拟节点的查找引用
|
|
@@ -1918,19 +1918,20 @@ export class Logic extends BaseNode {
|
|
|
1918
1918
|
code += `${indent((state?.tabSize || 0) + 1)}// @ts-ignore\n`;
|
|
1919
1919
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
1920
1920
|
code += yield* node.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1921
|
-
if (assignment
|
|
1921
|
+
if (asserts.isBatchAssignment(assignment)) {
|
|
1922
1922
|
yield* wrapForEach(assignment.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
1923
1923
|
const leftCode =
|
|
1924
1924
|
leftIndex.length === 1
|
|
1925
1925
|
? yield* assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
1926
|
-
: yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1926
|
+
: yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1927
|
+
returnOrigin('');
|
|
1927
1928
|
if (leftCode === node.name) {
|
|
1928
1929
|
const rightNode: any =
|
|
1929
1930
|
rightIndex.length === 1
|
|
1930
1931
|
? assignment.rights[rightIndex[0]]?.expression
|
|
1931
1932
|
: assignment.rights[rightIndex[0]]?.members[rightIndex[1]];
|
|
1932
1933
|
// 当右边有明确类型时,直接使用其类型。旧版本数据查询不能直接使用其 typeAnnotation
|
|
1933
|
-
if (rightNode?.typeAnnotation && !(rightNode
|
|
1934
|
+
if (rightNode?.typeAnnotation && !(asserts.isCallQueryComponent(rightNode) && !rightNode.isAutoInfer())) {
|
|
1934
1935
|
if (rightNode.concept === 'NewComposite' && rightNode.typeAnnotation?.typeKind === 'anonymousStructure') {
|
|
1935
1936
|
code += '= ';
|
|
1936
1937
|
code += (yield* rightNode.getInitCode(shiftState(state, code, { inline: true }))) || 'null';
|
|
@@ -1939,11 +1940,13 @@ export class Logic extends BaseNode {
|
|
|
1939
1940
|
code += (yield* rightNode.getNewCompositeCode(shiftState(state, code, { inline: true }))) || 'null';
|
|
1940
1941
|
} else {
|
|
1941
1942
|
code += ': ';
|
|
1942
|
-
code += yield* rightNode.typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1943
|
+
code += yield* rightNode.typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1944
|
+
returnOrigin('null');
|
|
1943
1945
|
}
|
|
1944
1946
|
} else {
|
|
1945
1947
|
code += ' = ';
|
|
1946
|
-
const rightCode = yield* rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1948
|
+
const rightCode = yield* rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1949
|
+
returnOrigin('');
|
|
1947
1950
|
code += yield* self.getRightCode(rightCode, assignment, rightNode);
|
|
1948
1951
|
}
|
|
1949
1952
|
}
|
|
@@ -1968,20 +1971,21 @@ export class Logic extends BaseNode {
|
|
|
1968
1971
|
) {
|
|
1969
1972
|
const rightNode: any = assignment.right;
|
|
1970
1973
|
code += ' = ';
|
|
1971
|
-
code +=
|
|
1974
|
+
code += yield* rightNode.getNewCompositeCode(shiftState(state, code, { inline: true }));
|
|
1972
1975
|
} else {
|
|
1973
1976
|
const rightNode: any = assignment.right;
|
|
1974
1977
|
// 当右边有明确类型时,直接使用其类型。旧版本数据查询不能直接使用其 typeAnnotation
|
|
1975
|
-
if (rightNode?.typeAnnotation && !(rightNode
|
|
1978
|
+
if (rightNode?.typeAnnotation && !(asserts.isCallQueryComponent(rightNode) && !rightNode.isAutoInfer())) {
|
|
1976
1979
|
code += ': ';
|
|
1977
|
-
code += yield* rightNode.typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1980
|
+
code += yield* rightNode.typeAnnotation?.toEmbeddedTS(shiftState(state, code, { inline: true })) ??
|
|
1981
|
+
returnOrigin('null');
|
|
1978
1982
|
} else {
|
|
1979
1983
|
code += ' = ';
|
|
1980
1984
|
let rightCode = '';
|
|
1981
1985
|
// 因为右侧枚举要赋值就得new 一下;
|
|
1982
1986
|
if (
|
|
1983
1987
|
rightNode &&
|
|
1984
|
-
rightNode
|
|
1988
|
+
asserts.isIdentifier(rightNode) &&
|
|
1985
1989
|
rightNode.namespace &&
|
|
1986
1990
|
rightNode.namespace.endsWith('enums')
|
|
1987
1991
|
) {
|
|
@@ -2010,7 +2014,7 @@ export class Logic extends BaseNode {
|
|
|
2010
2014
|
code += `${indent((state?.tabSize || 0) + 1)}return ${this.returns[0].name};\n`;
|
|
2011
2015
|
} else {
|
|
2012
2016
|
// 如果长度小于2 并且不是虚拟节点就 加 报错,
|
|
2013
|
-
if (self.body.length <= 2 && !(self.parentNode
|
|
2017
|
+
if (self.body.length <= 2 && !asserts.isNamespace(self.parentNode)) {
|
|
2014
2018
|
if (self.body.length && self.body[0].concept === 'JavaLogic') {
|
|
2015
2019
|
code += '';
|
|
2016
2020
|
} else {
|
|
@@ -2019,7 +2023,8 @@ export class Logic extends BaseNode {
|
|
|
2019
2023
|
}
|
|
2020
2024
|
}
|
|
2021
2025
|
yield* wrapForEach(self.body, function* warpForEachGenerator(item) {
|
|
2022
|
-
code += yield* item.toEmbeddedTS?.(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 })) ??
|
|
2026
|
+
code += yield* item.toEmbeddedTS?.(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 })) ??
|
|
2027
|
+
returnOrigin('');
|
|
2023
2028
|
code += ';\n';
|
|
2024
2029
|
});
|
|
2025
2030
|
}
|
|
@@ -2103,7 +2108,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2103
2108
|
// 需要类型推导的局部变量/返回值需要调整申明顺序
|
|
2104
2109
|
const advanceMap: Map<Return | Variable, Assignment | BatchAssignment> = new Map();
|
|
2105
2110
|
this.traverseChildren((el) => {
|
|
2106
|
-
if (el && (el
|
|
2111
|
+
if (el && (asserts.isBatchAssignment(el) || (asserts.isAssignment(el) && el.left?.name))) {
|
|
2107
2112
|
const jsCode = el.toJS();
|
|
2108
2113
|
const advanceVar = this.variables?.find(
|
|
2109
2114
|
(variable) => !variable.typeAnnotation && jsCode.includes(`${variable.name} = `),
|
|
@@ -2170,10 +2175,10 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2170
2175
|
|
|
2171
2176
|
*getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any) {
|
|
2172
2177
|
code = code.replaceAll('\n', ' ');
|
|
2173
|
-
if (assignment
|
|
2178
|
+
if (asserts.isAssignment(assignment) && !assignment.right) return code;
|
|
2174
2179
|
|
|
2175
2180
|
// 调用接口,参数替换成 null
|
|
2176
|
-
if (rightNode
|
|
2181
|
+
if (asserts.isCallInterface(rightNode)) {
|
|
2177
2182
|
const { _interface } = rightNode.getModuleInterface();
|
|
2178
2183
|
return _interface
|
|
2179
2184
|
? `${rightNode.tsCalleeKey}(${(_interface as unknown as Interface).params.map(() => 'null').join(',')})`
|
|
@@ -2181,7 +2186,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2181
2186
|
}
|
|
2182
2187
|
|
|
2183
2188
|
// 调用服务端逻辑,参数替换成 null
|
|
2184
|
-
if (rightNode
|
|
2189
|
+
if (asserts.isCallLogic(rightNode) && rightNode.calleeNamespace === 'app.logics') {
|
|
2185
2190
|
const calleeName = rightNode?.calleeName;
|
|
2186
2191
|
const calleeLogic = this.app.logics.find((l) => l.name === calleeName);
|
|
2187
2192
|
return calleeLogic ? `app.logics.${calleeName}(${calleeLogic.params.map(() => 'null').join(',')})` : null;
|
|
@@ -2246,7 +2251,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2246
2251
|
if (code.includes(expressionTsCode)) {
|
|
2247
2252
|
let typeCode = '';
|
|
2248
2253
|
yield* wrapForEach(matchCase.patterns, function* wrapForEach(pattern, index) {
|
|
2249
|
-
if (pattern
|
|
2254
|
+
if (asserts.isTypeAnnotation(pattern)) {
|
|
2250
2255
|
if (index === 0) {
|
|
2251
2256
|
typeCode += yield* pattern.toEmbeddedTS();
|
|
2252
2257
|
} else {
|
|
@@ -2362,7 +2367,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2362
2367
|
_path = `/${this.connector.parentKey}/${this.connector.name}`;
|
|
2363
2368
|
}
|
|
2364
2369
|
}
|
|
2365
|
-
if (this.parentNode
|
|
2370
|
+
if (asserts.isFrontendLibrary(this.parentNode)) {
|
|
2366
2371
|
_path += `/frontends/${this.parentNode.type}`;
|
|
2367
2372
|
} else if (this.parentNode.concept === 'BindEvent' && this.parentNode?.parentNode.concept === 'Frontend') {
|
|
2368
2373
|
_path += `/frontends/${this.parentNode.parentNode.name}/bindEvents/${name}.ts`;
|
|
@@ -2416,7 +2421,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2416
2421
|
const set = new Set();
|
|
2417
2422
|
utils.traverse(
|
|
2418
2423
|
({ node }) => {
|
|
2419
|
-
if (node
|
|
2424
|
+
if (asserts.isCallQueryComponent(node)) {
|
|
2420
2425
|
set.add(node);
|
|
2421
2426
|
}
|
|
2422
2427
|
},
|
|
@@ -2433,6 +2438,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2433
2438
|
|
|
2434
2439
|
// 通过开关设置数据库事务
|
|
2435
2440
|
setTransactionEnabled(flag: boolean) {
|
|
2441
|
+
const Transactional = getConceptConstructor('Transactional');
|
|
2436
2442
|
this.setTransactional(
|
|
2437
2443
|
new Transactional({
|
|
2438
2444
|
enabled: flag,
|
|
@@ -2530,7 +2536,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2530
2536
|
|
|
2531
2537
|
// 获取bindEvent下的logic的名称
|
|
2532
2538
|
getEventLogicName(type?: string) {
|
|
2533
|
-
if (this.parentNode
|
|
2539
|
+
if (asserts.isBindEvent(this.parentNode)) {
|
|
2534
2540
|
if (type === 'chinese') {
|
|
2535
2541
|
const bindEvent = this.parentNode;
|
|
2536
2542
|
const bindChineseName = bindEvent.getPageViewEventChineseName();
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
withGenerator,
|
|
10
10
|
TranslatorGenerator,
|
|
11
11
|
} from '../translator';
|
|
12
|
-
import Match from './Match__';
|
|
13
|
-
import MemberExpression from './MemberExpression__';
|
|
14
|
-
import BooleanLiteral from './BooleanLiteral__';
|
|
12
|
+
import type Match from './Match__';
|
|
13
|
+
import type MemberExpression from './MemberExpression__';
|
|
14
|
+
import type BooleanLiteral from './BooleanLiteral__';
|
|
15
15
|
import { ElementToVueOptions } from './ViewElement__';
|
|
16
16
|
|
|
17
17
|
//================================================================================
|
|
@@ -19,26 +19,25 @@ import { ElementToVueOptions } from './ViewElement__';
|
|
|
19
19
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
20
20
|
//================================================================================
|
|
21
21
|
import { EventPayload, Params } from '../common/EventEmitter';
|
|
22
|
-
import { concept, excludedInJSON, property,
|
|
22
|
+
import { concept, excludedInJSON, property, getConceptConstructor, getBaseNode } from '../decorators';
|
|
23
23
|
|
|
24
24
|
import * as utils from '../utils';
|
|
25
|
+
import * as types from './utils/types';
|
|
26
|
+
import * as asserts from './utils/asserts';
|
|
25
27
|
import { v4 as uuidv4 } from 'uuid';
|
|
26
|
-
import BaseNode from '../common/BaseNode';
|
|
27
28
|
import LogicItem from './LogicItem__';
|
|
28
|
-
import TypeAnnotation from './TypeAnnotation__';
|
|
29
|
+
import type TypeAnnotation from './TypeAnnotation__';
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* 匹配分支
|
|
32
33
|
*/
|
|
33
|
-
@className
|
|
34
34
|
@concept('匹配分支')
|
|
35
|
-
// @ts-ignore
|
|
36
35
|
export class MatchCase extends LogicItem {
|
|
37
36
|
/** 类名 */
|
|
38
|
-
static readonly ConceptName = 'MatchCase';
|
|
37
|
+
static readonly ConceptName: string = 'MatchCase';
|
|
39
38
|
|
|
40
39
|
/** 继承链 */
|
|
41
|
-
static readonly inheritanceChain = ['LogicItem', 'BaseNode'];
|
|
40
|
+
static readonly inheritanceChain: string[] = ['LogicItem', 'BaseNode'];
|
|
42
41
|
|
|
43
42
|
/**
|
|
44
43
|
* 产品概念
|
|
@@ -142,6 +141,7 @@ export class MatchCase extends LogicItem {
|
|
|
142
141
|
_insertLogicItemInPatternsAt(options: string | Partial<LogicItem> | LogicItem, index: number) {
|
|
143
142
|
const logicItemOptions: any = {};
|
|
144
143
|
const relationOptions = { parentNode: this, parentKey: 'patterns' };
|
|
144
|
+
const LogicItem = getConceptConstructor('LogicItem');
|
|
145
145
|
let logicItem: LogicItem;
|
|
146
146
|
if (!options) {
|
|
147
147
|
logicItem = LogicItem.from(
|
|
@@ -161,7 +161,7 @@ export class MatchCase extends LogicItem {
|
|
|
161
161
|
this,
|
|
162
162
|
'patterns',
|
|
163
163
|
);
|
|
164
|
-
} else if (options
|
|
164
|
+
} else if (asserts.isLogicItem(options)) {
|
|
165
165
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
166
166
|
logicItem = options;
|
|
167
167
|
Object.assign(logicItem, relationOptions);
|
|
@@ -280,8 +280,9 @@ export class MatchCase extends LogicItem {
|
|
|
280
280
|
_insertItemInBodyAt(options: Partial<LogicItem> | LogicItem, index: number) {
|
|
281
281
|
const logicItemOptions: any = {};
|
|
282
282
|
const relationOptions = { parentNode: this, parentKey: 'body' };
|
|
283
|
+
const LogicItem = getConceptConstructor('LogicItem');
|
|
283
284
|
let logicItem: LogicItem;
|
|
284
|
-
if (options
|
|
285
|
+
if (asserts.isLogicItem(options)) {
|
|
285
286
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
286
287
|
logicItem = options;
|
|
287
288
|
Object.assign(logicItem, relationOptions);
|
|
@@ -397,6 +398,7 @@ export class MatchCase extends LogicItem {
|
|
|
397
398
|
_insertTypeAnnotationAt(options: string | Partial<TypeAnnotation> | TypeAnnotation, index: number) {
|
|
398
399
|
const typeAnnotationOptions: any = {};
|
|
399
400
|
const relationOptions = { parentNode: this, parentKey: 'patterns' };
|
|
401
|
+
const TypeAnnotation = getConceptConstructor('TypeAnnotation');
|
|
400
402
|
let typeAnnotation: TypeAnnotation;
|
|
401
403
|
if (!options) {
|
|
402
404
|
typeAnnotation = TypeAnnotation.from(
|
|
@@ -416,7 +418,7 @@ export class MatchCase extends LogicItem {
|
|
|
416
418
|
this,
|
|
417
419
|
'patterns',
|
|
418
420
|
);
|
|
419
|
-
} else if (options
|
|
421
|
+
} else if (asserts.isTypeAnnotation(options)) {
|
|
420
422
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
421
423
|
typeAnnotation = options;
|
|
422
424
|
Object.assign(typeAnnotation, relationOptions);
|
|
@@ -661,10 +663,10 @@ export class MatchCase extends LogicItem {
|
|
|
661
663
|
const { patterns } = caseItem || {};
|
|
662
664
|
if (Array.isArray(patterns)) {
|
|
663
665
|
patterns.forEach((pattern) => {
|
|
664
|
-
if (pattern
|
|
666
|
+
if (asserts.isTypeAnnotation(pattern)) {
|
|
665
667
|
const patternTypeKey = pattern.typeKey;
|
|
666
668
|
map[patternTypeKey] = true;
|
|
667
|
-
} else if (pattern
|
|
669
|
+
} else if (asserts.isMemberExpression(pattern) || asserts.isBooleanLiteral(pattern)) {
|
|
668
670
|
const patternValue = pattern.getValue();
|
|
669
671
|
map[patternValue] = true;
|
|
670
672
|
}
|
|
@@ -747,7 +749,7 @@ export class MatchCase extends LogicItem {
|
|
|
747
749
|
if (Array.isArray(this.patterns)) {
|
|
748
750
|
const patternStrArr = this.patterns.map((pattern) => {
|
|
749
751
|
let patternStr = '';
|
|
750
|
-
if (pattern
|
|
752
|
+
if (asserts.isTypeAnnotation(pattern)) {
|
|
751
753
|
patternStr += `this.$isInstanceOf(${expression.toJS?.()}, '${pattern.sortedTypeKey}')`;
|
|
752
754
|
} else {
|
|
753
755
|
patternStr += `this.$global.isEqual(${expression.toJS?.()}, ${pattern.toJS?.()})`;
|
|
@@ -796,7 +798,7 @@ export class MatchCase extends LogicItem {
|
|
|
796
798
|
if (Array.isArray(self.patterns) && self.patterns.length) {
|
|
797
799
|
yield* wrapForEach(self.patterns, function* warpForEachGenerator(pattern, index) {
|
|
798
800
|
// nasl.code.isUnionType<typeof ccc, List<Integer> | List<Boolean>>
|
|
799
|
-
if (pattern
|
|
801
|
+
if (asserts.isTypeAnnotation(pattern)) {
|
|
800
802
|
if (index === 0) {
|
|
801
803
|
code += `nasl.core.isUnionType<typeof `;
|
|
802
804
|
code += `${parentCode},`;
|
|
@@ -892,7 +894,7 @@ export class MatchCase extends LogicItem {
|
|
|
892
894
|
if (Array.isArray(this.patterns) && this.patterns.length) {
|
|
893
895
|
this.patterns.forEach((pattern, index) => {
|
|
894
896
|
// nasl.code.isUnionType<typeof ccc, List<Integer> | List<Boolean>>
|
|
895
|
-
if (pattern
|
|
897
|
+
if (asserts.isTypeAnnotation(pattern)) {
|
|
896
898
|
if (index === 0) {
|
|
897
899
|
code += `nasl.core.isUnionType<typeof `;
|
|
898
900
|
code += `${parentCode},`;
|