@lcap/nasl 3.3.3-beta.6 → 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 +31 -19
- 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 +20 -29
- 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 +19 -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 +5 -5
- 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/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 +42 -21
- 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 +33 -42
- 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 +28 -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/toEmbeddedTS.spec.ts +2 -1
- 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/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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"concept": "BinaryExpression",
|
|
3
|
+
"left": {
|
|
4
|
+
"concept": "BinaryExpression",
|
|
5
|
+
"left": {
|
|
6
|
+
"concept": "MemberExpression",
|
|
7
|
+
"object": {
|
|
8
|
+
"concept": "StringLiteral",
|
|
9
|
+
"value": "123"
|
|
10
|
+
},
|
|
11
|
+
"property": {
|
|
12
|
+
"concept": "Identifier",
|
|
13
|
+
"name": "length"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"right": {
|
|
17
|
+
"concept": "NumericLiteral",
|
|
18
|
+
"value": "3",
|
|
19
|
+
"typeAnnotation": {
|
|
20
|
+
"concept": "TypeAnnotation",
|
|
21
|
+
"typeKind": "primitive",
|
|
22
|
+
"typeNamespace": "nasl.core",
|
|
23
|
+
"typeName": "Long",
|
|
24
|
+
"typeArguments": null,
|
|
25
|
+
"returnType": null,
|
|
26
|
+
"properties": null
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"operator": "=="
|
|
30
|
+
},
|
|
31
|
+
"right": {
|
|
32
|
+
"concept": "BooleanLiteral",
|
|
33
|
+
"value": "false"
|
|
34
|
+
},
|
|
35
|
+
"operator": "&&"
|
|
36
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"concept": "BinaryExpression",
|
|
3
|
+
"left": {
|
|
4
|
+
"concept": "BinaryExpression",
|
|
5
|
+
"left": {
|
|
6
|
+
"concept": "MemberExpression",
|
|
7
|
+
"object": {
|
|
8
|
+
"concept": "Identifier",
|
|
9
|
+
"name": "param1"
|
|
10
|
+
},
|
|
11
|
+
"property": {
|
|
12
|
+
"concept": "Identifier",
|
|
13
|
+
"name": "length"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"right": {
|
|
17
|
+
"concept": "NumericLiteral",
|
|
18
|
+
"value": "3",
|
|
19
|
+
"typeAnnotation": {
|
|
20
|
+
"concept": "TypeAnnotation",
|
|
21
|
+
"name": "",
|
|
22
|
+
"typeKind": "primitive",
|
|
23
|
+
"typeNamespace": "nasl.core",
|
|
24
|
+
"typeName": "Long",
|
|
25
|
+
"typeArguments": null,
|
|
26
|
+
"returnType": null,
|
|
27
|
+
"properties": null
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"operator": "=="
|
|
31
|
+
},
|
|
32
|
+
"right": {
|
|
33
|
+
"concept": "BinaryExpression",
|
|
34
|
+
"left": {
|
|
35
|
+
"concept": "MemberExpression",
|
|
36
|
+
"object": {
|
|
37
|
+
"concept": "MemberExpression",
|
|
38
|
+
"object": {
|
|
39
|
+
"concept": "Identifier",
|
|
40
|
+
"name": "param3"
|
|
41
|
+
},
|
|
42
|
+
"property": {
|
|
43
|
+
"concept": "Identifier",
|
|
44
|
+
"name": "updatedBy"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"property": {
|
|
48
|
+
"concept": "Identifier",
|
|
49
|
+
"name": "length"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"right": {
|
|
53
|
+
"concept": "NumericLiteral",
|
|
54
|
+
"value": "0",
|
|
55
|
+
"typeAnnotation": {
|
|
56
|
+
"concept": "TypeAnnotation",
|
|
57
|
+
"name": "",
|
|
58
|
+
"typeKind": "primitive",
|
|
59
|
+
"typeNamespace": "nasl.core",
|
|
60
|
+
"typeName": "Long",
|
|
61
|
+
"typeArguments": null,
|
|
62
|
+
"returnType": null,
|
|
63
|
+
"properties": null
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"operator": "!="
|
|
67
|
+
},
|
|
68
|
+
"operator": "||"
|
|
69
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import type { BinaryExpression } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
4
|
+
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
5
|
+
import { ConceptName, cases } from './constant';
|
|
6
|
+
|
|
7
|
+
describe(`${ConceptName}:toEmbeddedTS`, () => {
|
|
8
|
+
cases.forEach((name) => {
|
|
9
|
+
it(name, () => {
|
|
10
|
+
const data = readFixture(ConceptName, name);
|
|
11
|
+
const node = getNodeByData<BinaryExpression>(data);
|
|
12
|
+
expect(formatTs(runSync(node.toEmbeddedTS()))).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import type { BinaryExpression } from '../../../out';
|
|
3
|
+
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
4
|
+
import { ConceptName, cases } from './constant';
|
|
5
|
+
|
|
6
|
+
describe(`${ConceptName}:toJS`, () => {
|
|
7
|
+
cases.forEach((name) => {
|
|
8
|
+
it(name, () => {
|
|
9
|
+
const data = readFixture(ConceptName, name);
|
|
10
|
+
const node = getNodeByData<BinaryExpression>(data);
|
|
11
|
+
expect(formatTs(node.toJS())).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import type { BinaryExpression } from '../../../out';
|
|
3
|
+
import { readFixture, formatVue, getNodeByData } from '../utils';
|
|
4
|
+
import { ConceptName, cases } from './constant';
|
|
5
|
+
|
|
6
|
+
describe(`${ConceptName}:toVue`, () => {
|
|
7
|
+
cases.forEach((name) => {
|
|
8
|
+
it(name, () => {
|
|
9
|
+
const data = readFixture(ConceptName, name);
|
|
10
|
+
const node = getNodeByData<BinaryExpression>(data);
|
|
11
|
+
expect(formatVue(node.toVue())).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BooleanLiteral } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
3
4
|
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
4
5
|
import { ConceptName, cases } from './constant';
|
|
5
6
|
|
|
@@ -7,8 +8,8 @@ describe(`${ConceptName}:toEmbeddedTS`, () => {
|
|
|
7
8
|
cases.forEach((name) => {
|
|
8
9
|
it(name, () => {
|
|
9
10
|
const data = readFixture(ConceptName, name);
|
|
10
|
-
const node = getNodeByData<
|
|
11
|
-
expect(formatTs(node.toEmbeddedTS())).toMatchSnapshot();
|
|
11
|
+
const node = getNodeByData<BooleanLiteral>(data);
|
|
12
|
+
expect(formatTs(runSync(node.toEmbeddedTS()))).toMatchSnapshot();
|
|
12
13
|
});
|
|
13
14
|
});
|
|
14
15
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BooleanLiteral } from '../../../out';
|
|
3
3
|
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
4
4
|
import { ConceptName, cases } from './constant';
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ describe(`${ConceptName}:toJS`, () => {
|
|
|
7
7
|
cases.forEach((name) => {
|
|
8
8
|
it(name, () => {
|
|
9
9
|
const data = readFixture(ConceptName, name);
|
|
10
|
-
const node = getNodeByData<
|
|
10
|
+
const node = getNodeByData<BooleanLiteral>(data);
|
|
11
11
|
expect(formatTs(node.toJS())).toMatchSnapshot();
|
|
12
12
|
});
|
|
13
13
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BooleanLiteral } from '../../../out';
|
|
3
3
|
import { readFixture, formatVue, getNodeByData } from '../utils';
|
|
4
4
|
import { ConceptName, cases } from './constant';
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ describe(`${ConceptName}:toVue`, () => {
|
|
|
7
7
|
cases.forEach((name) => {
|
|
8
8
|
it(name, () => {
|
|
9
9
|
const data = readFixture(ConceptName, name);
|
|
10
|
-
const node = getNodeByData<
|
|
10
|
+
const node = getNodeByData<BooleanLiteral>(data);
|
|
11
11
|
expect(formatVue(node.toVue())).toMatchSnapshot();
|
|
12
12
|
});
|
|
13
13
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import type { CallFunction } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
3
4
|
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
4
5
|
import { ConceptName, cases } from './constant';
|
|
5
6
|
|
|
@@ -8,7 +9,7 @@ describe(`${ConceptName}:toEmbeddedTS`, () => {
|
|
|
8
9
|
it(name, () => {
|
|
9
10
|
const data = readFixture(ConceptName, name);
|
|
10
11
|
const node = getNodeByData<CallFunction>(data);
|
|
11
|
-
expect(formatTs(node.toEmbeddedTS())).toMatchSnapshot();
|
|
12
|
+
expect(formatTs(runSync(node.toEmbeddedTS()))).toMatchSnapshot();
|
|
12
13
|
});
|
|
13
14
|
});
|
|
14
15
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import type { CallInterface } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
3
4
|
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
4
5
|
import { ConceptName, cases } from './constant';
|
|
5
6
|
|
|
@@ -8,7 +9,7 @@ describe(`${ConceptName}:toEmbeddedTS`, () => {
|
|
|
8
9
|
it(name, () => {
|
|
9
10
|
const data = readFixture(ConceptName, name);
|
|
10
11
|
const node = getNodeByData<CallInterface>(data);
|
|
11
|
-
expect(formatTs(node.toEmbeddedTS())).toMatchSnapshot();
|
|
12
|
+
expect(formatTs(runSync(node.toEmbeddedTS()))).toMatchSnapshot();
|
|
12
13
|
});
|
|
13
14
|
});
|
|
14
15
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import type { CallLogic } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
3
4
|
import { readFixture, getNodeByData } from '../utils';
|
|
4
5
|
import { ConceptName, cases } from './constant';
|
|
5
6
|
|
|
@@ -13,7 +14,7 @@ describe(`${ConceptName}:getQuickInfoOffset`, () => {
|
|
|
13
14
|
it(name, () => {
|
|
14
15
|
const data = readFixture(ConceptName, name);
|
|
15
16
|
const node = getNodeByData<CallLogic>(data);
|
|
16
|
-
const tsCode = node.toEmbeddedTS();
|
|
17
|
+
const tsCode = runSync(node.toEmbeddedTS());
|
|
17
18
|
expect({
|
|
18
19
|
code: tsCode,
|
|
19
20
|
...node.getQuickInfoOffset(fakeInputOffset, tsCode),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { expect } from 'chai';
|
|
2
2
|
import type { CallLogic } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
3
4
|
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
4
5
|
import { ConceptName, cases } from './constant';
|
|
5
6
|
|
|
@@ -8,7 +9,7 @@ describe(`${ConceptName}:toEmbeddedTS`, () => {
|
|
|
8
9
|
it(name, () => {
|
|
9
10
|
const data = readFixture(ConceptName, name);
|
|
10
11
|
const node = getNodeByData<CallLogic>(data);
|
|
11
|
-
expect(formatTs(node.toEmbeddedTS())).toMatchSnapshot();
|
|
12
|
+
expect(formatTs(runSync(node.toEmbeddedTS()))).toMatchSnapshot();
|
|
12
13
|
});
|
|
13
14
|
});
|
|
14
15
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`data-source:toEmbeddedTSFile normal 1`] = `"/embedded/a432432423/datasources/defaultDS.ts"`;
|
|
4
|
+
|
|
5
|
+
exports[`data-source:toEmbeddedTSFile normal 2`] = `
|
|
6
|
+
"namespace app.dataSources {
|
|
7
|
+
export namespace defaultDS {
|
|
8
|
+
const name = \\"defaultDS\\";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
"
|
|
12
|
+
`;
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
{
|
|
2
|
+
"concept": "App",
|
|
3
|
+
"changedTime": 1695734781025,
|
|
4
|
+
"name": "a432432423",
|
|
5
|
+
"id": "f4db7fdf-dbfc-4cb8-a637-db943dbccd95",
|
|
6
|
+
"ideVersion": "3.3",
|
|
7
|
+
"title": "苏方舟3.3测试(勿删)",
|
|
8
|
+
"icon": "",
|
|
9
|
+
"desc": "",
|
|
10
|
+
"dnsAddr": "http://a432432423.defaulttenant.lcap.hatest.163yun.com",
|
|
11
|
+
"hasUserCenter": true,
|
|
12
|
+
"hasAuth": true,
|
|
13
|
+
"dataSources": [
|
|
14
|
+
{
|
|
15
|
+
"__$Selected": true,
|
|
16
|
+
"concept": "DataSource",
|
|
17
|
+
"name": "defaultDS",
|
|
18
|
+
"description": "默认数据源",
|
|
19
|
+
"entities": []
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"structures": [],
|
|
23
|
+
"enums": [],
|
|
24
|
+
"logics": [],
|
|
25
|
+
"overriddenLogics": [],
|
|
26
|
+
"interfaces": [],
|
|
27
|
+
"frontends": [],
|
|
28
|
+
"backend": {
|
|
29
|
+
"concept": "Backend",
|
|
30
|
+
"name": "",
|
|
31
|
+
"variables": [
|
|
32
|
+
{
|
|
33
|
+
"concept": "BackendVariable",
|
|
34
|
+
"name": "httpRequest",
|
|
35
|
+
"description": "httpRequest对象,可在逻辑中使用,用于获取当前请求的属性,例如: cookie、header、ip等",
|
|
36
|
+
"typeAnnotation": {
|
|
37
|
+
"concept": "TypeAnnotation",
|
|
38
|
+
"name": "",
|
|
39
|
+
"typeKind": "generic",
|
|
40
|
+
"typeNamespace": "nasl.http",
|
|
41
|
+
"typeName": "HttpRequest",
|
|
42
|
+
"typeArguments": [
|
|
43
|
+
{
|
|
44
|
+
"concept": "TypeAnnotation",
|
|
45
|
+
"name": "",
|
|
46
|
+
"typeKind": "primitive",
|
|
47
|
+
"typeNamespace": "nasl.core",
|
|
48
|
+
"typeName": "String",
|
|
49
|
+
"typeArguments": null,
|
|
50
|
+
"returnType": null,
|
|
51
|
+
"properties": null
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"returnType": null,
|
|
55
|
+
"properties": null
|
|
56
|
+
},
|
|
57
|
+
"defaultValue": null,
|
|
58
|
+
"scope": "request"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"concept": "BackendVariable",
|
|
62
|
+
"name": "httpResponse",
|
|
63
|
+
"description": "httpResponse对象,可用于全局逻辑中,可返回header、cookie等",
|
|
64
|
+
"typeAnnotation": {
|
|
65
|
+
"concept": "TypeAnnotation",
|
|
66
|
+
"name": "",
|
|
67
|
+
"typeKind": "generic",
|
|
68
|
+
"typeNamespace": "nasl.http",
|
|
69
|
+
"typeName": "HttpResponse",
|
|
70
|
+
"typeArguments": [
|
|
71
|
+
{
|
|
72
|
+
"concept": "TypeAnnotation",
|
|
73
|
+
"name": "",
|
|
74
|
+
"typeKind": "primitive",
|
|
75
|
+
"typeNamespace": "nasl.core",
|
|
76
|
+
"typeName": "String",
|
|
77
|
+
"typeArguments": null,
|
|
78
|
+
"returnType": null,
|
|
79
|
+
"properties": null
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"returnType": null,
|
|
83
|
+
"properties": null
|
|
84
|
+
},
|
|
85
|
+
"defaultValue": null,
|
|
86
|
+
"scope": "request"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"concept": "BackendVariable",
|
|
90
|
+
"name": "currentUser",
|
|
91
|
+
"description": "当前用户信息,包含userId,userName、extendInfos",
|
|
92
|
+
"typeAnnotation": {
|
|
93
|
+
"concept": "TypeAnnotation",
|
|
94
|
+
"name": "",
|
|
95
|
+
"typeKind": "reference",
|
|
96
|
+
"typeNamespace": "extensions.lcap_auth.structures",
|
|
97
|
+
"typeName": "LCAPUser",
|
|
98
|
+
"typeArguments": null,
|
|
99
|
+
"returnType": null,
|
|
100
|
+
"properties": null
|
|
101
|
+
},
|
|
102
|
+
"defaultValue": null,
|
|
103
|
+
"scope": "request"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"processes": [],
|
|
108
|
+
"roles": [],
|
|
109
|
+
"configuration": {
|
|
110
|
+
"concept": "Configuration",
|
|
111
|
+
"name": "",
|
|
112
|
+
"groups": [
|
|
113
|
+
{
|
|
114
|
+
"concept": "ConfigGroup",
|
|
115
|
+
"name": "custom",
|
|
116
|
+
"properties": [
|
|
117
|
+
{
|
|
118
|
+
"concept": "ConfigProperty",
|
|
119
|
+
"changedTime": 1696679455452,
|
|
120
|
+
"name": "config_test",
|
|
121
|
+
"description": "测试参数",
|
|
122
|
+
"values": [
|
|
123
|
+
{
|
|
124
|
+
"env": "dev",
|
|
125
|
+
"value": "prod"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"env": "online",
|
|
129
|
+
"value": "dev"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"isPrivate": false
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"concept": "ConfigGroup",
|
|
138
|
+
"name": "auth",
|
|
139
|
+
"properties": [
|
|
140
|
+
{
|
|
141
|
+
"concept": "ConfigProperty",
|
|
142
|
+
"name": "Normal",
|
|
143
|
+
"description": "普通登录",
|
|
144
|
+
"values": [
|
|
145
|
+
{
|
|
146
|
+
"concept": null,
|
|
147
|
+
"env": "dev",
|
|
148
|
+
"value": "{\"category\":\"main\"}"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"concept": null,
|
|
152
|
+
"env": "online",
|
|
153
|
+
"value": "{\"category\":\"main\"}"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"isPrivate": false
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"concept": "ConfigGroup",
|
|
162
|
+
"name": "system",
|
|
163
|
+
"properties": [
|
|
164
|
+
{
|
|
165
|
+
"concept": "ConfigProperty",
|
|
166
|
+
"name": "uniformPathPrefix",
|
|
167
|
+
"description": "统一路径前缀,接口请求以该路径开头。",
|
|
168
|
+
"values": [
|
|
169
|
+
{
|
|
170
|
+
"concept": "ConfigPropertyValue",
|
|
171
|
+
"name": "",
|
|
172
|
+
"env": "dev",
|
|
173
|
+
"value": "/"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"concept": "ConfigPropertyValue",
|
|
177
|
+
"name": "",
|
|
178
|
+
"env": "online",
|
|
179
|
+
"value": "/"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"isPrivate": false
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"concept": "ConfigProperty",
|
|
186
|
+
"name": "multipartReqMaxFileSize",
|
|
187
|
+
"description": "接口中单个文件上传大小限制,需要带上单位MB、KB,接口中单个文件大小不能超过此限制。",
|
|
188
|
+
"values": [
|
|
189
|
+
{
|
|
190
|
+
"concept": "ConfigPropertyValue",
|
|
191
|
+
"name": "",
|
|
192
|
+
"env": "dev",
|
|
193
|
+
"value": "50MB"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"concept": "ConfigPropertyValue",
|
|
197
|
+
"name": "",
|
|
198
|
+
"env": "online",
|
|
199
|
+
"value": "50MB"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"isPrivate": false
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"concept": "ConfigProperty",
|
|
206
|
+
"name": "multipartReqMaxSize",
|
|
207
|
+
"description": "单次请求接口大小限制,需要带上单位MB、KB,单次请求接口大小不能超过此限制。",
|
|
208
|
+
"values": [
|
|
209
|
+
{
|
|
210
|
+
"concept": "ConfigPropertyValue",
|
|
211
|
+
"name": "",
|
|
212
|
+
"env": "dev",
|
|
213
|
+
"value": "50MB"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"concept": "ConfigPropertyValue",
|
|
217
|
+
"name": "",
|
|
218
|
+
"env": "online",
|
|
219
|
+
"value": "50MB"
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"isPrivate": false
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"concept": "ConfigProperty",
|
|
226
|
+
"name": "appTimeZone",
|
|
227
|
+
"description": "发布的应用的时间日期函数使用的时区信息,影响日期时间的展示、计算。",
|
|
228
|
+
"values": [
|
|
229
|
+
{
|
|
230
|
+
"concept": "ConfigPropertyValue",
|
|
231
|
+
"name": "",
|
|
232
|
+
"env": "dev",
|
|
233
|
+
"value": "user"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"concept": "ConfigPropertyValue",
|
|
237
|
+
"name": "",
|
|
238
|
+
"env": "online",
|
|
239
|
+
"value": "user"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"isPrivate": false
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"concept": "ConfigGroup",
|
|
248
|
+
"name": "dataSource",
|
|
249
|
+
"properties": [
|
|
250
|
+
{
|
|
251
|
+
"concept": "ConfigProperty",
|
|
252
|
+
"changedTime": 1695825031769,
|
|
253
|
+
"name": "defaultDS",
|
|
254
|
+
"description": null,
|
|
255
|
+
"values": [
|
|
256
|
+
{
|
|
257
|
+
"concept": "ConfigPropertyValue",
|
|
258
|
+
"name": "",
|
|
259
|
+
"env": "dev",
|
|
260
|
+
"value": "{\"configName\":null,\"configId\":null,\"database\":\"defaulttenant-dev-a432432423-409ayq\",\"schemaName\":null,\"host\":\"59.111.97.81\",\"port\":3306,\"username\":\"defau_631vF_user\",\"password\":\"VWh7huCtJE\",\"type\":\"mysql\",\"driverType\":null,\"dataBaseMode\":\"Platform_Generation\",\"rdsInstanceName\":\"ha-test-defaulttenant\",\"status\":null,\"backupUrl\":null,\"customConfigs\":\"{\\\"database\\\":\\\"defaulttenant-dev-a432432423-409ayq\\\"}\"}"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"concept": "ConfigPropertyValue",
|
|
264
|
+
"name": "",
|
|
265
|
+
"env": "online",
|
|
266
|
+
"value": "{\"configName\":null,\"configId\":null,\"database\":\"defaulttenant-online-a432432423-QRC3gJ\",\"schemaName\":null,\"host\":\"59.111.97.81\",\"port\":3306,\"username\":\"defau_umKJv_user\",\"password\":\"A1slkwyCon\",\"type\":\"mysql\",\"driverType\":null,\"dataBaseMode\":\"Platform_Generation\",\"rdsInstanceName\":\"ha-test-defaulttenant\",\"status\":1,\"backupUrl\":null,\"customConfigs\":\"{\\\"database\\\":\\\"defaulttenant-online-a432432423-QRC3gJ\\\"}\"}"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"isPrivate": false
|
|
270
|
+
}
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
"dependencies": [],
|
|
276
|
+
"interfaceDependencies": [],
|
|
277
|
+
"integration": null,
|
|
278
|
+
"authLogics": [],
|
|
279
|
+
"authLogicsForCallInterface": [],
|
|
280
|
+
"connections": [],
|
|
281
|
+
"triggerLaunchers": [],
|
|
282
|
+
"preferenceMap": {
|
|
283
|
+
"namingConvention.tableName": "camelCase",
|
|
284
|
+
"namingConvention.columnName": "camelCase",
|
|
285
|
+
"javaLogicEnabled": false,
|
|
286
|
+
"onDemandInterfaceGeneration": "true",
|
|
287
|
+
"serverValidationRules": "custom"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import type { DataSource } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
4
|
+
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
5
|
+
import { ConceptName, cases } from './constant';
|
|
6
|
+
|
|
7
|
+
describe(`${ConceptName}:toEmbeddedTS`, () => {
|
|
8
|
+
cases.forEach((name) => {
|
|
9
|
+
it(name, () => {
|
|
10
|
+
const data = readFixture(ConceptName, name);
|
|
11
|
+
const node = getNodeByData<DataSource>(data);
|
|
12
|
+
expect(formatTs(runSync(node.toEmbeddedTS()))).toMatchSnapshot();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { expect } from 'chai';
|
|
2
|
+
import type { DataSource } from '../../../out';
|
|
3
|
+
import { runGeneratorSync as runSync } from '../../../out/utils';
|
|
4
|
+
import { readFixture, formatTs, getNodeByData } from '../utils';
|
|
5
|
+
import { ConceptName, cases } from './constant';
|
|
6
|
+
|
|
7
|
+
describe(`${ConceptName}:toEmbeddedTSFile`, () => {
|
|
8
|
+
cases.forEach((name) => {
|
|
9
|
+
it(name, () => {
|
|
10
|
+
const data = readFixture(ConceptName, name);
|
|
11
|
+
const node = getNodeByData<DataSource>(data);
|
|
12
|
+
expect(node.getEmbeddedFilePath()).toMatchSnapshot();
|
|
13
|
+
expect(formatTs(runSync(node.toEmbeddedTSFile()).code)).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
});
|