@lcap/nasl 3.3.3-beta.1 → 3.3.3-beta.2
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/automate/engine/index.d.ts +4 -0
- package/out/automate/engine/index.js +443 -0
- package/out/automate/engine/index.js.map +1 -0
- package/out/automate/engine/operators.d.ts +24 -0
- package/out/automate/engine/operators.js +252 -0
- package/out/automate/engine/operators.js.map +1 -0
- package/out/automate/engine/uniqueName.d.ts +12 -0
- package/out/automate/engine/uniqueName.js +112 -0
- package/out/automate/engine/uniqueName.js.map +1 -0
- package/out/automate/engine/utils.d.ts +25 -0
- package/out/automate/engine/utils.js +444 -0
- package/out/automate/engine/utils.js.map +1 -0
- package/out/automate/engine/viewCache.d.ts +19 -0
- package/out/automate/engine/viewCache.js +45 -0
- package/out/automate/engine/viewCache.js.map +1 -0
- package/out/automate/template/myProcess.d.ts +10 -0
- package/out/automate/template/myProcess.js +11498 -0
- package/out/automate/template/myProcess.js.map +1 -0
- package/out/automate/upgrader/2.12.d.ts +7 -0
- package/out/automate/upgrader/2.12.js +63 -0
- package/out/automate/upgrader/2.12.js.map +1 -0
- package/out/automate/upgrader/2.14-components.d.ts +1115 -0
- package/out/automate/upgrader/2.14-components.js +1087 -0
- package/out/automate/upgrader/2.14-components.js.map +1 -0
- package/out/automate/upgrader/2.14.d.ts +10 -0
- package/out/automate/upgrader/2.14.js +236 -0
- package/out/automate/upgrader/2.14.js.map +1 -0
- package/out/automate/upgrader/2.14.old.d.ts +1 -0
- package/out/automate/upgrader/2.14.old.js +125 -0
- package/out/automate/upgrader/2.14.old.js.map +1 -0
- package/out/automate/upgrader/2.16.d.ts +10 -0
- package/out/automate/upgrader/2.16.js +75 -0
- package/out/automate/upgrader/2.16.js.map +1 -0
- package/out/automate/upgrader/2.17.d.ts +21 -0
- package/out/automate/upgrader/2.17.js +557 -0
- package/out/automate/upgrader/2.17.js.map +1 -0
- package/out/automate/upgrader/2.18.d.ts +10 -0
- package/out/automate/upgrader/2.18.js +107 -0
- package/out/automate/upgrader/2.18.js.map +1 -0
- package/out/automate/upgrader/2.20.d.ts +17 -0
- package/out/automate/upgrader/2.20.js +68 -0
- package/out/automate/upgrader/2.20.js.map +1 -0
- package/out/bak/translator.d.ts +1 -0
- package/out/bak/translator.js +225 -0
- package/out/bak/translator.js.map +1 -0
- package/out/breakpoint/generator/AfterStartNode.d.ts +7 -0
- package/out/breakpoint/generator/AfterStartNode.js +30 -0
- package/out/breakpoint/generator/AfterStartNode.js.map +1 -0
- package/out/breakpoint/generator/BeforeEndNode.d.ts +7 -0
- package/out/breakpoint/generator/BeforeEndNode.js +28 -0
- package/out/breakpoint/generator/BeforeEndNode.js.map +1 -0
- package/out/breakpoint/generator/BreakpointNode.d.ts +15 -0
- package/out/breakpoint/generator/BreakpointNode.js +284 -0
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -0
- package/out/breakpoint/generator/CallbackNode.d.ts +4 -0
- package/out/breakpoint/generator/CallbackNode.js +22 -0
- package/out/breakpoint/generator/CallbackNode.js.map +1 -0
- package/out/breakpoint/generator/FragmentNode.d.ts +4 -0
- package/out/breakpoint/generator/FragmentNode.js +18 -0
- package/out/breakpoint/generator/FragmentNode.js.map +1 -0
- package/out/breakpoint/generator/index.d.ts +4 -0
- package/out/breakpoint/generator/index.js +119 -0
- package/out/breakpoint/generator/index.js.map +1 -0
- package/out/breakpoint/index.d.ts +3 -0
- package/out/breakpoint/index.js +20 -0
- package/out/breakpoint/index.js.map +1 -0
- package/out/breakpoint/shared/constants.d.ts +37 -0
- package/out/breakpoint/shared/constants.js +106 -0
- package/out/breakpoint/shared/constants.js.map +1 -0
- package/out/breakpoint/shared/index.d.ts +3 -0
- package/out/breakpoint/shared/index.js +33 -0
- package/out/breakpoint/shared/index.js.map +1 -0
- package/out/breakpoint/shared/operations.d.ts +10 -0
- package/out/breakpoint/shared/operations.js +25 -0
- package/out/breakpoint/shared/operations.js.map +1 -0
- package/out/breakpoint/shared/socket.d.ts +48 -0
- package/out/breakpoint/shared/socket.js +257 -0
- package/out/breakpoint/shared/socket.js.map +1 -0
- package/out/breakpoint/shared/utils.d.ts +27 -0
- package/out/breakpoint/shared/utils.js +229 -0
- package/out/breakpoint/shared/utils.js.map +1 -0
- package/out/breakpoint/store/core.d.ts +80 -0
- package/out/breakpoint/store/core.js +416 -0
- package/out/breakpoint/store/core.js.map +1 -0
- package/out/breakpoint/store/dock.d.ts +1 -0
- package/out/breakpoint/store/dock.js +160 -0
- package/out/breakpoint/store/dock.js.map +1 -0
- package/out/breakpoint/store/index.d.ts +2 -0
- package/out/breakpoint/store/index.js +19 -0
- package/out/breakpoint/store/index.js.map +1 -0
- package/out/common/BaseNode.d.ts +335 -0
- package/out/common/BaseNode.js +1300 -0
- package/out/common/BaseNode.js.map +1 -0
- package/out/common/Command.d.ts +21 -0
- package/out/common/Command.js +79 -0
- package/out/common/Command.js.map +1 -0
- package/out/common/ComponentAPI.d.ts +110 -0
- package/out/common/ComponentAPI.js +3 -0
- package/out/common/ComponentAPI.js.map +1 -0
- package/out/common/EventEmitter.d.ts +59 -0
- package/out/common/EventEmitter.js +69 -0
- package/out/common/EventEmitter.js.map +1 -0
- package/out/common/Messager.d.ts +91 -0
- package/out/common/Messager.js +207 -0
- package/out/common/Messager.js.map +1 -0
- package/out/common/asyncFuncMap.d.ts +2 -0
- package/out/common/asyncFuncMap.js +16 -0
- package/out/common/asyncFuncMap.js.map +1 -0
- package/out/common/index.d.ts +3 -0
- package/out/common/index.js +20 -0
- package/out/common/index.js.map +1 -0
- package/out/concepts/Abort__.d.ts +26 -0
- package/out/concepts/Abort__.js +82 -0
- package/out/concepts/Abort__.js.map +1 -0
- package/out/concepts/Anchor__.d.ts +46 -0
- package/out/concepts/Anchor__.js +204 -0
- package/out/concepts/Anchor__.js.map +1 -0
- package/out/concepts/AnonymousFunction__.d.ts +173 -0
- package/out/concepts/AnonymousFunction__.js +535 -0
- package/out/concepts/AnonymousFunction__.js.map +1 -0
- package/out/concepts/App__.d.ts +1772 -0
- package/out/concepts/App__.js +2707 -0
- package/out/concepts/App__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +67 -0
- package/out/concepts/Argument__.js +313 -0
- package/out/concepts/Argument__.js.map +1 -0
- package/out/concepts/Assignee__.d.ts +289 -0
- package/out/concepts/Assignee__.js +435 -0
- package/out/concepts/Assignee__.js.map +1 -0
- package/out/concepts/AssignmentLine__.d.ts +42 -0
- package/out/concepts/AssignmentLine__.js +113 -0
- package/out/concepts/AssignmentLine__.js.map +1 -0
- package/out/concepts/Assignment__.d.ts +75 -0
- package/out/concepts/Assignment__.js +339 -0
- package/out/concepts/Assignment__.js.map +1 -0
- package/out/concepts/Attribute__.d.ts +98 -0
- package/out/concepts/Attribute__.js +212 -0
- package/out/concepts/Attribute__.js.map +1 -0
- package/out/concepts/AuthInterface__.d.ts +36 -0
- package/out/concepts/AuthInterface__.js +85 -0
- package/out/concepts/AuthInterface__.js.map +1 -0
- package/out/concepts/AuthLogicForCallInterface__.d.ts +139 -0
- package/out/concepts/AuthLogicForCallInterface__.js +529 -0
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -0
- package/out/concepts/AuthLogic__.d.ts +67 -0
- package/out/concepts/AuthLogic__.js +221 -0
- package/out/concepts/AuthLogic__.js.map +1 -0
- package/out/concepts/BackendVariable__.d.ts +138 -0
- package/out/concepts/BackendVariable__.js +452 -0
- package/out/concepts/BackendVariable__.js.map +1 -0
- package/out/concepts/Backend__.d.ts +135 -0
- package/out/concepts/Backend__.js +281 -0
- package/out/concepts/Backend__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +253 -0
- package/out/concepts/BatchAssignment__.js +870 -0
- package/out/concepts/BatchAssignment__.js.map +1 -0
- package/out/concepts/BinaryExpression__.d.ts +72 -0
- package/out/concepts/BinaryExpression__.js +420 -0
- package/out/concepts/BinaryExpression__.js.map +1 -0
- package/out/concepts/BindAttribute__.d.ts +324 -0
- package/out/concepts/BindAttribute__.js +1077 -0
- package/out/concepts/BindAttribute__.js.map +1 -0
- package/out/concepts/BindDirective__.d.ts +163 -0
- package/out/concepts/BindDirective__.js +562 -0
- package/out/concepts/BindDirective__.js.map +1 -0
- package/out/concepts/BindEvent__.d.ts +253 -0
- package/out/concepts/BindEvent__.js +932 -0
- package/out/concepts/BindEvent__.js.map +1 -0
- package/out/concepts/BindStyle__.d.ts +140 -0
- package/out/concepts/BindStyle__.js +439 -0
- package/out/concepts/BindStyle__.js.map +1 -0
- package/out/concepts/BooleanLiteral__.d.ts +36 -0
- package/out/concepts/BooleanLiteral__.js +108 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -0
- package/out/concepts/CallAuthInterface__.d.ts +126 -0
- package/out/concepts/CallAuthInterface__.js +411 -0
- package/out/concepts/CallAuthInterface__.js.map +1 -0
- package/out/concepts/CallConnector__.d.ts +47 -0
- package/out/concepts/CallConnector__.js +266 -0
- package/out/concepts/CallConnector__.js.map +1 -0
- package/out/concepts/CallFunction__.d.ts +159 -0
- package/out/concepts/CallFunction__.js +578 -0
- package/out/concepts/CallFunction__.js.map +1 -0
- package/out/concepts/CallInterface__.d.ts +130 -0
- package/out/concepts/CallInterface__.js +796 -0
- package/out/concepts/CallInterface__.js.map +1 -0
- package/out/concepts/CallLogic__.d.ts +231 -0
- package/out/concepts/CallLogic__.js +1344 -0
- package/out/concepts/CallLogic__.js.map +1 -0
- package/out/concepts/CallQueryComponent__.d.ts +433 -0
- package/out/concepts/CallQueryComponent__.js +1293 -0
- package/out/concepts/CallQueryComponent__.js.map +1 -0
- package/out/concepts/Comment__.d.ts +33 -0
- package/out/concepts/Comment__.js +104 -0
- package/out/concepts/Comment__.js.map +1 -0
- package/out/concepts/CompletionProperty__.d.ts +105 -0
- package/out/concepts/CompletionProperty__.js +275 -0
- package/out/concepts/CompletionProperty__.js.map +1 -0
- package/out/concepts/ConfigGroup__.d.ts +125 -0
- package/out/concepts/ConfigGroup__.js +260 -0
- package/out/concepts/ConfigGroup__.js.map +1 -0
- package/out/concepts/ConfigPropertyValue__.d.ts +45 -0
- package/out/concepts/ConfigPropertyValue__.js +109 -0
- package/out/concepts/ConfigPropertyValue__.js.map +1 -0
- package/out/concepts/ConfigProperty__.d.ts +154 -0
- package/out/concepts/ConfigProperty__.js +331 -0
- package/out/concepts/ConfigProperty__.js.map +1 -0
- package/out/concepts/Configuration__.d.ts +124 -0
- package/out/concepts/Configuration__.js +233 -0
- package/out/concepts/Configuration__.js.map +1 -0
- package/out/concepts/Connection__.d.ts +166 -0
- package/out/concepts/Connection__.js +341 -0
- package/out/concepts/Connection__.js.map +1 -0
- package/out/concepts/ConnectorTrigger__.d.ts +79 -0
- package/out/concepts/ConnectorTrigger__.js +159 -0
- package/out/concepts/ConnectorTrigger__.js.map +1 -0
- package/out/concepts/Connector__.d.ts +570 -0
- package/out/concepts/Connector__.js +878 -0
- package/out/concepts/Connector__.js.map +1 -0
- package/out/concepts/Constant__.d.ts +111 -0
- package/out/concepts/Constant__.js +261 -0
- package/out/concepts/Constant__.js.map +1 -0
- package/out/concepts/DataSource__.d.ts +169 -0
- package/out/concepts/DataSource__.js +471 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +32 -0
- package/out/concepts/DatabaseTypeAnnotation__.js +81 -0
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
- package/out/concepts/Destination__.d.ts +158 -0
- package/out/concepts/Destination__.js +802 -0
- package/out/concepts/Destination__.js.map +1 -0
- package/out/concepts/End__.d.ts +25 -0
- package/out/concepts/End__.js +116 -0
- package/out/concepts/End__.js.map +1 -0
- package/out/concepts/EntityIndex__.d.ts +96 -0
- package/out/concepts/EntityIndex__.js +223 -0
- package/out/concepts/EntityIndex__.js.map +1 -0
- package/out/concepts/EntityProperty__.d.ts +275 -0
- package/out/concepts/EntityProperty__.js +836 -0
- package/out/concepts/EntityProperty__.js.map +1 -0
- package/out/concepts/Entity__.d.ts +340 -0
- package/out/concepts/Entity__.js +748 -0
- package/out/concepts/Entity__.js.map +1 -0
- package/out/concepts/EnumItem__.d.ts +65 -0
- package/out/concepts/EnumItem__.js +154 -0
- package/out/concepts/EnumItem__.js.map +1 -0
- package/out/concepts/Enum__.d.ts +139 -0
- package/out/concepts/Enum__.js +340 -0
- package/out/concepts/Enum__.js.map +1 -0
- package/out/concepts/Event__.d.ts +144 -0
- package/out/concepts/Event__.js +255 -0
- package/out/concepts/Event__.js.map +1 -0
- package/out/concepts/ExternalDestination__.d.ts +76 -0
- package/out/concepts/ExternalDestination__.js +292 -0
- package/out/concepts/ExternalDestination__.js.map +1 -0
- package/out/concepts/ForEachStatement__.d.ts +171 -0
- package/out/concepts/ForEachStatement__.js +516 -0
- package/out/concepts/ForEachStatement__.js.map +1 -0
- package/out/concepts/FrontendLibrary__.d.ts +214 -0
- package/out/concepts/FrontendLibrary__.js +363 -0
- package/out/concepts/FrontendLibrary__.js.map +1 -0
- package/out/concepts/FrontendVariable__.d.ts +22 -0
- package/out/concepts/FrontendVariable__.js +65 -0
- package/out/concepts/FrontendVariable__.js.map +1 -0
- package/out/concepts/Frontend__.d.ts +478 -0
- package/out/concepts/Frontend__.js +867 -0
- package/out/concepts/Frontend__.js.map +1 -0
- package/out/concepts/Function__.d.ts +418 -0
- package/out/concepts/Function__.js +781 -0
- package/out/concepts/Function__.js.map +1 -0
- package/out/concepts/Identifier__.d.ts +52 -0
- package/out/concepts/Identifier__.js +304 -0
- package/out/concepts/Identifier__.js.map +1 -0
- package/out/concepts/IfStatement__.d.ts +159 -0
- package/out/concepts/IfStatement__.js +341 -0
- package/out/concepts/IfStatement__.js.map +1 -0
- package/out/concepts/Integration__.d.ts +144 -0
- package/out/concepts/Integration__.js +292 -0
- package/out/concepts/Integration__.js.map +1 -0
- package/out/concepts/InterfaceParam__.d.ts +136 -0
- package/out/concepts/InterfaceParam__.js +302 -0
- package/out/concepts/InterfaceParam__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +331 -0
- package/out/concepts/Interface__.js +895 -0
- package/out/concepts/Interface__.js.map +1 -0
- package/out/concepts/JSBlock__.d.ts +35 -0
- package/out/concepts/JSBlock__.js +170 -0
- package/out/concepts/JSBlock__.js.map +1 -0
- package/out/concepts/JavaLogic__.d.ts +43 -0
- package/out/concepts/JavaLogic__.js +126 -0
- package/out/concepts/JavaLogic__.js.map +1 -0
- package/out/concepts/LogicItem__.d.ts +152 -0
- package/out/concepts/LogicItem__.js +288 -0
- package/out/concepts/LogicItem__.js.map +1 -0
- package/out/concepts/Logic__.d.ts +644 -0
- package/out/concepts/Logic__.js +1845 -0
- package/out/concepts/Logic__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +259 -0
- package/out/concepts/MatchCase__.js +693 -0
- package/out/concepts/MatchCase__.js.map +1 -0
- package/out/concepts/Match__.d.ts +125 -0
- package/out/concepts/Match__.js +689 -0
- package/out/concepts/Match__.js.map +1 -0
- package/out/concepts/MemberExpression__.d.ts +75 -0
- package/out/concepts/MemberExpression__.js +490 -0
- package/out/concepts/MemberExpression__.js.map +1 -0
- package/out/concepts/MetadataType__.d.ts +245 -0
- package/out/concepts/MetadataType__.js +483 -0
- package/out/concepts/MetadataType__.js.map +1 -0
- package/out/concepts/MicroApp__.d.ts +52 -0
- package/out/concepts/MicroApp__.js +121 -0
- package/out/concepts/MicroApp__.js.map +1 -0
- package/out/concepts/Module__.d.ts +1321 -0
- package/out/concepts/Module__.js +1804 -0
- package/out/concepts/Module__.js.map +1 -0
- package/out/concepts/MsgTriggerEvent__.d.ts +138 -0
- package/out/concepts/MsgTriggerEvent__.js +233 -0
- package/out/concepts/MsgTriggerEvent__.js.map +1 -0
- package/out/concepts/MsgTriggerLauncher__.d.ts +127 -0
- package/out/concepts/MsgTriggerLauncher__.js +228 -0
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -0
- package/out/concepts/Namespace__.d.ts +1070 -0
- package/out/concepts/Namespace__.js +1440 -0
- package/out/concepts/Namespace__.js.map +1 -0
- package/out/concepts/NewComposite__.d.ts +349 -0
- package/out/concepts/NewComposite__.js +1242 -0
- package/out/concepts/NewComposite__.js.map +1 -0
- package/out/concepts/NewList__.d.ts +137 -0
- package/out/concepts/NewList__.js +451 -0
- package/out/concepts/NewList__.js.map +1 -0
- package/out/concepts/NewMap__.d.ts +226 -0
- package/out/concepts/NewMap__.js +568 -0
- package/out/concepts/NewMap__.js.map +1 -0
- package/out/concepts/New__.d.ts +21 -0
- package/out/concepts/New__.js +70 -0
- package/out/concepts/New__.js.map +1 -0
- package/out/concepts/NullLiteral__.d.ts +27 -0
- package/out/concepts/NullLiteral__.js +83 -0
- package/out/concepts/NullLiteral__.js.map +1 -0
- package/out/concepts/NumericLiteral__.d.ts +57 -0
- package/out/concepts/NumericLiteral__.js +186 -0
- package/out/concepts/NumericLiteral__.js.map +1 -0
- package/out/concepts/OqlQueryComponent__.d.ts +74 -0
- package/out/concepts/OqlQueryComponent__.js +364 -0
- package/out/concepts/OqlQueryComponent__.js.map +1 -0
- package/out/concepts/OverriddenLogic__.d.ts +635 -0
- package/out/concepts/OverriddenLogic__.js +1660 -0
- package/out/concepts/OverriddenLogic__.js.map +1 -0
- package/out/concepts/Param__.d.ts +173 -0
- package/out/concepts/Param__.js +517 -0
- package/out/concepts/Param__.js.map +1 -0
- package/out/concepts/Point__.d.ts +32 -0
- package/out/concepts/Point__.js +81 -0
- package/out/concepts/Point__.js.map +1 -0
- package/out/concepts/ProcessComponent__.d.ts +220 -0
- package/out/concepts/ProcessComponent__.js +349 -0
- package/out/concepts/ProcessComponent__.js.map +1 -0
- package/out/concepts/ProcessElement__.d.ts +647 -0
- package/out/concepts/ProcessElement__.js +1261 -0
- package/out/concepts/ProcessElement__.js.map +1 -0
- package/out/concepts/ProcessOutcome__.d.ts +32 -0
- package/out/concepts/ProcessOutcome__.js +92 -0
- package/out/concepts/ProcessOutcome__.js.map +1 -0
- package/out/concepts/ProcessOutcomes__.d.ts +32 -0
- package/out/concepts/ProcessOutcomes__.js +91 -0
- package/out/concepts/ProcessOutcomes__.js.map +1 -0
- package/out/concepts/Process__.d.ts +614 -0
- package/out/concepts/Process__.js +1059 -0
- package/out/concepts/Process__.js.map +1 -0
- package/out/concepts/QueryAggregateExpression__.d.ts +52 -0
- package/out/concepts/QueryAggregateExpression__.js +155 -0
- package/out/concepts/QueryAggregateExpression__.js.map +1 -0
- package/out/concepts/QueryFieldExpression__.d.ts +54 -0
- package/out/concepts/QueryFieldExpression__.js +162 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -0
- package/out/concepts/QueryFromExpression__.d.ts +99 -0
- package/out/concepts/QueryFromExpression__.js +214 -0
- package/out/concepts/QueryFromExpression__.js.map +1 -0
- package/out/concepts/QueryGroupByExpression__.d.ts +47 -0
- package/out/concepts/QueryGroupByExpression__.js +146 -0
- package/out/concepts/QueryGroupByExpression__.js.map +1 -0
- package/out/concepts/QueryJoinExpression__.d.ts +186 -0
- package/out/concepts/QueryJoinExpression__.js +337 -0
- package/out/concepts/QueryJoinExpression__.js.map +1 -0
- package/out/concepts/QueryLimitExpression__.d.ts +58 -0
- package/out/concepts/QueryLimitExpression__.js +166 -0
- package/out/concepts/QueryLimitExpression__.js.map +1 -0
- package/out/concepts/QueryOrderByExpression__.d.ts +69 -0
- package/out/concepts/QueryOrderByExpression__.js +179 -0
- package/out/concepts/QueryOrderByExpression__.js.map +1 -0
- package/out/concepts/QuerySelectExpression__.d.ts +204 -0
- package/out/concepts/QuerySelectExpression__.js +305 -0
- package/out/concepts/QuerySelectExpression__.js.map +1 -0
- package/out/concepts/Rect__.d.ts +40 -0
- package/out/concepts/Rect__.js +97 -0
- package/out/concepts/Rect__.js.map +1 -0
- package/out/concepts/Return__.d.ts +135 -0
- package/out/concepts/Return__.js +398 -0
- package/out/concepts/Return__.js.map +1 -0
- package/out/concepts/Role__.d.ts +63 -0
- package/out/concepts/Role__.js +171 -0
- package/out/concepts/Role__.js.map +1 -0
- package/out/concepts/SelectMembers__.d.ts +143 -0
- package/out/concepts/SelectMembers__.js +299 -0
- package/out/concepts/SelectMembers__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +75 -0
- package/out/concepts/Slot__.js +171 -0
- package/out/concepts/Slot__.js.map +1 -0
- package/out/concepts/SqlQueryComponent__.d.ts +72 -0
- package/out/concepts/SqlQueryComponent__.js +287 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -0
- package/out/concepts/Start__.d.ts +25 -0
- package/out/concepts/Start__.js +75 -0
- package/out/concepts/Start__.js.map +1 -0
- package/out/concepts/StringInterpolation__.d.ts +116 -0
- package/out/concepts/StringInterpolation__.js +271 -0
- package/out/concepts/StringInterpolation__.js.map +1 -0
- package/out/concepts/StringLiteral__.d.ts +39 -0
- package/out/concepts/StringLiteral__.js +140 -0
- package/out/concepts/StringLiteral__.js.map +1 -0
- package/out/concepts/StructureProperty__.d.ts +136 -0
- package/out/concepts/StructureProperty__.js +326 -0
- package/out/concepts/StructureProperty__.js.map +1 -0
- package/out/concepts/Structure__.d.ts +248 -0
- package/out/concepts/Structure__.js +485 -0
- package/out/concepts/Structure__.js.map +1 -0
- package/out/concepts/SwitchCase__.d.ts +95 -0
- package/out/concepts/SwitchCase__.js +279 -0
- package/out/concepts/SwitchCase__.js.map +1 -0
- package/out/concepts/SwitchStatement__.d.ts +85 -0
- package/out/concepts/SwitchStatement__.js +206 -0
- package/out/concepts/SwitchStatement__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +38 -0
- package/out/concepts/Theme__.js +90 -0
- package/out/concepts/Theme__.js.map +1 -0
- package/out/concepts/Transactional__.d.ts +88 -0
- package/out/concepts/Transactional__.js +170 -0
- package/out/concepts/Transactional__.js.map +1 -0
- package/out/concepts/TriggerEvent__.d.ts +121 -0
- package/out/concepts/TriggerEvent__.js +230 -0
- package/out/concepts/TriggerEvent__.js.map +1 -0
- package/out/concepts/TriggerLauncher__.d.ts +82 -0
- package/out/concepts/TriggerLauncher__.js +222 -0
- package/out/concepts/TriggerLauncher__.js.map +1 -0
- package/out/concepts/TypeAnnotation__.d.ts +300 -0
- package/out/concepts/TypeAnnotation__.js +1055 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -0
- package/out/concepts/TypeParam__.d.ts +26 -0
- package/out/concepts/TypeParam__.js +81 -0
- package/out/concepts/TypeParam__.js.map +1 -0
- package/out/concepts/UnaryExpression__.d.ts +50 -0
- package/out/concepts/UnaryExpression__.js +196 -0
- package/out/concepts/UnaryExpression__.js.map +1 -0
- package/out/concepts/Unparsed__.d.ts +33 -0
- package/out/concepts/Unparsed__.js +102 -0
- package/out/concepts/Unparsed__.js.map +1 -0
- package/out/concepts/UseComponent__.d.ts +32 -0
- package/out/concepts/UseComponent__.js +81 -0
- package/out/concepts/UseComponent__.js.map +1 -0
- package/out/concepts/ValidationRule__.d.ts +148 -0
- package/out/concepts/ValidationRule__.js +495 -0
- package/out/concepts/ValidationRule__.js.map +1 -0
- package/out/concepts/Variable__.d.ts +155 -0
- package/out/concepts/Variable__.js +448 -0
- package/out/concepts/Variable__.js.map +1 -0
- package/out/concepts/ViewBlock__.d.ts +36 -0
- package/out/concepts/ViewBlock__.js +89 -0
- package/out/concepts/ViewBlock__.js.map +1 -0
- package/out/concepts/ViewComponent__.d.ts +566 -0
- package/out/concepts/ViewComponent__.js +788 -0
- package/out/concepts/ViewComponent__.js.map +1 -0
- package/out/concepts/ViewElement__.d.ts +629 -0
- package/out/concepts/ViewElement__.js +2307 -0
- package/out/concepts/ViewElement__.js.map +1 -0
- package/out/concepts/View__.d.ts +724 -0
- package/out/concepts/View__.js +2192 -0
- package/out/concepts/View__.js.map +1 -0
- package/out/concepts/WhileStatement__.d.ts +98 -0
- package/out/concepts/WhileStatement__.js +243 -0
- package/out/concepts/WhileStatement__.js.map +1 -0
- package/out/concepts/basics/stdlib/index.d.ts +4 -0
- package/out/concepts/basics/stdlib/index.js +45 -0
- package/out/concepts/basics/stdlib/index.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.auth.js +164 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.browser.js +149 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.collection.js +52 -0
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js +33 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.core.js +49 -0
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.event.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.event.js +25 -0
- package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.http.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.http.js +169 -0
- package/out/concepts/basics/stdlib/nasl.http.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.interface.js +43 -0
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.io.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.io.js +52 -0
- package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.logging.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.logging.js +56 -0
- package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.process.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.process.js +638 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.ui.js +1063 -0
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.util.js +2255 -0
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
- package/out/concepts/basics/stdlib/nasl.validation.js +565 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +5 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +26 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -0
- package/out/concepts/basics/stdlib/timeZone.d.ts +5 -0
- package/out/concepts/basics/stdlib/timeZone.js +196 -0
- package/out/concepts/basics/stdlib/timeZone.js.map +1 -0
- package/out/concepts/basics/types/coreTypeList.d.ts +2 -0
- package/out/concepts/basics/types/coreTypeList.js +15 -0
- package/out/concepts/basics/types/coreTypeList.js.map +1 -0
- package/out/concepts/basics/types/index.d.ts +16 -0
- package/out/concepts/basics/types/index.js +35 -0
- package/out/concepts/basics/types/index.js.map +1 -0
- package/out/concepts/index.d.ts +6 -0
- package/out/concepts/index.js +25 -0
- package/out/concepts/index.js.map +1 -0
- package/out/concepts/index__.d.ts +123 -0
- package/out/concepts/index__.js +140 -0
- package/out/concepts/index__.js.map +1 -0
- package/out/concepts/types__.d.ts +125 -0
- package/out/concepts/types__.js +3 -0
- package/out/concepts/types__.js.map +1 -0
- package/out/config.d.ts +43 -0
- package/out/config.js +72 -0
- package/out/config.js.map +1 -0
- package/out/decorators/index.d.ts +57 -0
- package/out/decorators/index.js +170 -0
- package/out/decorators/index.js.map +1 -0
- package/out/decorators/promise.d.ts +7 -0
- package/out/decorators/promise.js +28 -0
- package/out/decorators/promise.js.map +1 -0
- package/out/enums/KEYWORDS.d.ts +6 -0
- package/out/enums/KEYWORDS.js +1244 -0
- package/out/enums/KEYWORDS.js.map +1 -0
- package/out/enums/LEVEL_NAME_MAP.d.ts +26 -0
- package/out/enums/LEVEL_NAME_MAP.js +30 -0
- package/out/enums/LEVEL_NAME_MAP.js.map +1 -0
- package/out/eventBus.d.ts +3 -0
- package/out/eventBus.js +7 -0
- package/out/eventBus.js.map +1 -0
- package/out/generator/compileComponent.d.ts +11 -0
- package/out/generator/compileComponent.js +12 -0
- package/out/generator/compileComponent.js.map +1 -0
- package/out/generator/genBundleFiles.d.ts +34 -0
- package/out/generator/genBundleFiles.js +546 -0
- package/out/generator/genBundleFiles.js.map +1 -0
- package/out/generator/genHash.d.ts +7 -0
- package/out/generator/genHash.js +39 -0
- package/out/generator/genHash.js.map +1 -0
- package/out/generator/genMetaData.d.ts +31 -0
- package/out/generator/genMetaData.js +314 -0
- package/out/generator/genMetaData.js.map +1 -0
- package/out/generator/genReleaseBody.d.ts +72 -0
- package/out/generator/genReleaseBody.js +322 -0
- package/out/generator/genReleaseBody.js.map +1 -0
- package/out/generator/icestark.d.ts +2 -0
- package/out/generator/icestark.js +48 -0
- package/out/generator/icestark.js.map +1 -0
- package/out/generator/index.d.ts +7 -0
- package/out/generator/index.js +24 -0
- package/out/generator/index.js.map +1 -0
- package/out/generator/microApp.d.ts +2 -0
- package/out/generator/microApp.js +36 -0
- package/out/generator/microApp.js.map +1 -0
- package/out/generator/permission.d.ts +10 -0
- package/out/generator/permission.js +295 -0
- package/out/generator/permission.js.map +1 -0
- package/out/generator/qiankun.d.ts +2 -0
- package/out/generator/qiankun.js +52 -0
- package/out/generator/qiankun.js.map +1 -0
- package/out/generator/styleReplacer.d.ts +3 -0
- package/out/generator/styleReplacer.js +68 -0
- package/out/generator/styleReplacer.js.map +1 -0
- package/out/index.d.ts +13 -0
- package/out/index.js +67 -0
- package/out/index.js.map +1 -0
- package/out/manager/diagnostic.d.ts +35 -0
- package/out/manager/diagnostic.js +63 -0
- package/out/manager/diagnostic.js.map +1 -0
- package/out/manager/stepRecorder.d.ts +20 -0
- package/out/manager/stepRecorder.js +114 -0
- package/out/manager/stepRecorder.js.map +1 -0
- package/out/natural/componentData.d.ts +31 -0
- package/out/natural/componentData.js +85 -0
- package/out/natural/componentData.js.map +1 -0
- package/out/natural/genNaturalTS.d.ts +3 -0
- package/out/natural/genNaturalTS.js +90 -0
- package/out/natural/genNaturalTS.js.map +1 -0
- package/out/natural/index.d.ts +2 -0
- package/out/natural/index.js +19 -0
- package/out/natural/index.js.map +1 -0
- package/out/natural/naslStdlibMap.d.ts +2 -0
- package/out/natural/naslStdlibMap.js +26 -0
- package/out/natural/naslStdlibMap.js.map +1 -0
- package/out/natural/transformTSCode.d.ts +7 -0
- package/out/natural/transformTSCode.js +920 -0
- package/out/natural/transformTSCode.js.map +1 -0
- package/out/sentry/index.d.ts +34 -0
- package/out/sentry/index.js +149 -0
- package/out/sentry/index.js.map +1 -0
- package/out/server/createUiTs.d.ts +16 -0
- package/out/server/createUiTs.js +296 -0
- package/out/server/createUiTs.js.map +1 -0
- package/out/server/entity2LogicNamespace.d.ts +10 -0
- package/out/server/entity2LogicNamespace.js +382 -0
- package/out/server/entity2LogicNamespace.js.map +1 -0
- package/out/server/event.d.ts +30 -0
- package/out/server/event.js +151 -0
- package/out/server/event.js.map +1 -0
- package/out/server/extendBaseNode.d.ts +1 -0
- package/out/server/extendBaseNode.js +544 -0
- package/out/server/extendBaseNode.js.map +1 -0
- package/out/server/formatTsUtils.d.ts +37 -0
- package/out/server/formatTsUtils.js +852 -0
- package/out/server/formatTsUtils.js.map +1 -0
- package/out/server/getConnector.d.ts +14 -0
- package/out/server/getConnector.js +78 -0
- package/out/server/getConnector.js.map +1 -0
- package/out/server/getExtensionModules.d.ts +3 -0
- package/out/server/getExtensionModules.js +34 -0
- package/out/server/getExtensionModules.js.map +1 -0
- package/out/server/getFunctions.d.ts +3 -0
- package/out/server/getFunctions.js +20 -0
- package/out/server/getFunctions.js.map +1 -0
- package/out/server/getInterfaces.d.ts +2 -0
- package/out/server/getInterfaces.js +48 -0
- package/out/server/getInterfaces.js.map +1 -0
- package/out/server/getLogging.d.ts +1 -0
- package/out/server/getLogging.js +9 -0
- package/out/server/getLogging.js.map +1 -0
- package/out/server/getLogics.d.ts +4 -0
- package/out/server/getLogics.js +381 -0
- package/out/server/getLogics.js.map +1 -0
- package/out/server/getMemberIdentifier.d.ts +17 -0
- package/out/server/getMemberIdentifier.js +482 -0
- package/out/server/getMemberIdentifier.js.map +1 -0
- package/out/server/getProcessComponents.d.ts +2 -0
- package/out/server/getProcessComponents.js +13 -0
- package/out/server/getProcessComponents.js.map +1 -0
- package/out/server/getProcesses.d.ts +33 -0
- package/out/server/getProcesses.js +597 -0
- package/out/server/getProcesses.js.map +1 -0
- package/out/server/getScope.d.ts +13 -0
- package/out/server/getScope.js +61 -0
- package/out/server/getScope.js.map +1 -0
- package/out/server/getValidates.d.ts +3 -0
- package/out/server/getValidates.js +14 -0
- package/out/server/getValidates.js.map +1 -0
- package/out/server/index.d.ts +5 -0
- package/out/server/index.js +42 -0
- package/out/server/index.js.map +1 -0
- package/out/server/naslServer.d.ts +383 -0
- package/out/server/naslServer.js +4729 -0
- package/out/server/naslServer.js.map +1 -0
- package/out/server/naslStdlibMap.d.ts +2 -0
- package/out/server/naslStdlibMap.js +54 -0
- package/out/server/naslStdlibMap.js.map +1 -0
- package/out/server/process2LogicNamespace.d.ts +26 -0
- package/out/server/process2LogicNamespace.js +109 -0
- package/out/server/process2LogicNamespace.js.map +1 -0
- package/out/server/translator.d.ts +26 -0
- package/out/server/translator.js +809 -0
- package/out/server/translator.js.map +1 -0
- package/out/service/creator/add.configs.d.ts +1 -0
- package/out/service/creator/add.configs.js +103 -0
- package/out/service/creator/add.configs.js.map +1 -0
- package/out/service/creator/errHandles.d.ts +18 -0
- package/out/service/creator/errHandles.js +68 -0
- package/out/service/creator/errHandles.js.map +1 -0
- package/out/service/creator/index.d.ts +1 -0
- package/out/service/creator/index.js +87 -0
- package/out/service/creator/index.js.map +1 -0
- package/out/service/datasource/api.d.ts +12 -0
- package/out/service/datasource/api.js +14 -0
- package/out/service/datasource/api.js.map +1 -0
- package/out/service/datasource/index.d.ts +2 -0
- package/out/service/datasource/index.js +10 -0
- package/out/service/datasource/index.js.map +1 -0
- package/out/service/defaultErrorMessage.json +98 -0
- package/out/service/logic/api.d.ts +9 -0
- package/out/service/logic/api.js +11 -0
- package/out/service/logic/api.js.map +1 -0
- package/out/service/logic/checktypeSocket.d.ts +5 -0
- package/out/service/logic/checktypeSocket.js +55 -0
- package/out/service/logic/checktypeSocket.js.map +1 -0
- package/out/service/logic/index.d.ts +2 -0
- package/out/service/logic/index.js +10 -0
- package/out/service/logic/index.js.map +1 -0
- package/out/service/storage/api.d.ts +54 -0
- package/out/service/storage/api.js +42 -0
- package/out/service/storage/api.js.map +1 -0
- package/out/service/storage/index.d.ts +2 -0
- package/out/service/storage/index.js +10 -0
- package/out/service/storage/index.js.map +1 -0
- package/out/service/storage/init.d.ts +102 -0
- package/out/service/storage/init.js +1150 -0
- package/out/service/storage/init.js.map +1 -0
- package/out/service/storage/jsoner.d.ts +36 -0
- package/out/service/storage/jsoner.js +129 -0
- package/out/service/storage/jsoner.js.map +1 -0
- package/out/service/storage/map.d.ts +4 -0
- package/out/service/storage/map.js +54 -0
- package/out/service/storage/map.js.map +1 -0
- package/out/service/storage/service.d.ts +25 -0
- package/out/service/storage/service.js +80 -0
- package/out/service/storage/service.js.map +1 -0
- package/out/service/storage/storagePoint.d.ts +17 -0
- package/out/service/storage/storagePoint.js +76 -0
- package/out/service/storage/storagePoint.js.map +1 -0
- package/out/service/video/BaseService.d.ts +7 -0
- package/out/service/video/BaseService.js +61 -0
- package/out/service/video/BaseService.js.map +1 -0
- package/out/service/video/MainCallbackService.d.ts +12 -0
- package/out/service/video/MainCallbackService.js +183 -0
- package/out/service/video/MainCallbackService.js.map +1 -0
- package/out/service/video/VideoTranscribe.d.ts +15 -0
- package/out/service/video/VideoTranscribe.js +96 -0
- package/out/service/video/VideoTranscribe.js.map +1 -0
- package/out/service/video/publishService.d.ts +1 -0
- package/out/service/video/publishService.js +58 -0
- package/out/service/video/publishService.js.map +1 -0
- package/out/templator/genCallComponentLogic.d.ts +17 -0
- package/out/templator/genCallComponentLogic.js +29 -0
- package/out/templator/genCallComponentLogic.js.map +1 -0
- package/out/templator/genCreateBlock.d.ts +10 -0
- package/out/templator/genCreateBlock.js +349 -0
- package/out/templator/genCreateBlock.js.map +1 -0
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js +533 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -0
- package/out/templator/genCurdMultipleKeyBlock.d.ts +34 -0
- package/out/templator/genCurdMultipleKeyBlock.js +707 -0
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -0
- package/out/templator/genEditTableBlock.d.ts +51 -0
- package/out/templator/genEditTableBlock.js +326 -0
- package/out/templator/genEditTableBlock.js.map +1 -0
- package/out/templator/genEnumSelectBlock.d.ts +10 -0
- package/out/templator/genEnumSelectBlock.js +26 -0
- package/out/templator/genEnumSelectBlock.js.map +1 -0
- package/out/templator/genGetBlock.d.ts +6 -0
- package/out/templator/genGetBlock.js +138 -0
- package/out/templator/genGetBlock.js.map +1 -0
- package/out/templator/genGridViewBlock.d.ts +55 -0
- package/out/templator/genGridViewBlock.js +359 -0
- package/out/templator/genGridViewBlock.js.map +1 -0
- package/out/templator/genListViewBlock.d.ts +19 -0
- package/out/templator/genListViewBlock.js +148 -0
- package/out/templator/genListViewBlock.js.map +1 -0
- package/out/templator/genQueryComponent.d.ts +34 -0
- package/out/templator/genQueryComponent.js +349 -0
- package/out/templator/genQueryComponent.js.map +1 -0
- package/out/templator/genSelectBlock.d.ts +45 -0
- package/out/templator/genSelectBlock.js +388 -0
- package/out/templator/genSelectBlock.js.map +1 -0
- package/out/templator/genTableBlock.d.ts +53 -0
- package/out/templator/genTableBlock.js +304 -0
- package/out/templator/genTableBlock.js.map +1 -0
- package/out/templator/genUpdateBlock.d.ts +6 -0
- package/out/templator/genUpdateBlock.js +389 -0
- package/out/templator/genUpdateBlock.js.map +1 -0
- package/out/templator/index.d.ts +19 -0
- package/out/templator/index.js +38 -0
- package/out/templator/index.js.map +1 -0
- package/out/templator/utils.d.ts +688 -0
- package/out/templator/utils.js +482 -0
- package/out/templator/utils.js.map +1 -0
- package/out/translator/constant.d.ts +6 -0
- package/out/translator/constant.js +10 -0
- package/out/translator/constant.js.map +1 -0
- package/out/translator/index.d.ts +3 -0
- package/out/translator/index.js +20 -0
- package/out/translator/index.js.map +1 -0
- package/out/translator/types.d.ts +33 -0
- package/out/translator/types.js +3 -0
- package/out/translator/types.js.map +1 -0
- package/out/translator/utils.d.ts +25 -0
- package/out/translator/utils.js +129 -0
- package/out/translator/utils.js.map +1 -0
- package/out/utils/cookie.d.ts +9 -0
- package/out/utils/cookie.js +62 -0
- package/out/utils/cookie.js.map +1 -0
- package/out/utils/env.d.ts +2 -0
- package/out/utils/env.js +6 -0
- package/out/utils/env.js.map +1 -0
- package/out/utils/index.d.ts +44 -0
- package/out/utils/index.js +220 -0
- package/out/utils/index.js.map +1 -0
- package/out/utils/logger.d.ts +7 -0
- package/out/utils/logger.js +23 -0
- package/out/utils/logger.js.map +1 -0
- package/out/utils/sortTsString.d.ts +1 -0
- package/out/utils/sortTsString.js +44 -0
- package/out/utils/sortTsString.js.map +1 -0
- package/out/utils/string.d.ts +52 -0
- package/out/utils/string.js +139 -0
- package/out/utils/string.js.map +1 -0
- package/out/utils/time-slicing.d.ts +41 -0
- package/out/utils/time-slicing.js +82 -0
- package/out/utils/time-slicing.js.map +1 -0
- package/out/utils/traverse.d.ts +36 -0
- package/out/utils/traverse.js +143 -0
- package/out/utils/traverse.js.map +1 -0
- package/out/utils/types.d.ts +1 -0
- package/out/utils/types.js +3 -0
- package/out/utils/types.js.map +1 -0
- package/out/utils/window.d.ts +7 -0
- package/out/utils/window.js +14 -0
- package/out/utils/window.js.map +1 -0
- package/package.json +1 -1
- package/src/bak/translator.js +6 -5
- package/src/concepts/Argument__.ts +6 -1
- package/src/concepts/Assignment__.ts +32 -13
- package/src/concepts/CallFunction__.ts +22 -3
- package/src/concepts/NewList__.ts +24 -4
- package/src/concepts/NewMap__.ts +14 -4
- package/src/concepts/ViewElement__.ts +1 -1
- package/src/server/translator.ts +3 -0
- package/src/service/creator/add.configs.js +1 -1
- package/src/utils/cookie.ts +2 -2
- package/src/utils/sortTsString.ts +9 -4
- package/test/concepts/call-function/__snapshots__/toEmbeddedTS.spec.ts.snap +26 -0
- package/test/concepts/call-function/__snapshots__/toJS.spec.ts.snap +26 -0
- package/test/concepts/call-function/constant.ts +5 -0
- package/test/concepts/call-function/fixtures/from-string.json +100 -0
- package/test/concepts/call-function/fixtures/to-string-global-tz.json +99 -0
- package/test/concepts/call-function/fixtures/to-string-no-tz.json +89 -0
- package/test/concepts/call-function/fixtures/to-string-user-tz.json +101 -0
- package/test/concepts/call-function/fixtures/to-string-utc-tz.json +101 -0
- package/test/concepts/call-function/toEmbeddedTS.spec.ts +14 -0
- package/test/concepts/call-function/toJS.spec.ts +14 -0
- package/.nyc_output/4f2d526f-9422-4abc-993d-0857e05a5009.json +0 -1
- package/.nyc_output/processinfo/4f2d526f-9422-4abc-993d-0857e05a5009.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
|
@@ -0,0 +1,1300 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
25
|
+
if (mod && mod.__esModule) return mod;
|
|
26
|
+
var result = {};
|
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
28
|
+
__setModuleDefault(result, mod);
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
31
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
33
|
+
};
|
|
34
|
+
var BaseNode_1;
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.BaseNode = exports.setActionable = void 0;
|
|
37
|
+
const lodash_1 = require("lodash");
|
|
38
|
+
const uuid_1 = require("uuid");
|
|
39
|
+
const map_1 = require("../service/storage/map");
|
|
40
|
+
const utils = __importStar(require("../utils"));
|
|
41
|
+
const EventEmitter_1 = require("./EventEmitter");
|
|
42
|
+
const decorators_1 = require("../decorators");
|
|
43
|
+
const sentry_1 = require("../sentry");
|
|
44
|
+
const operations_1 = __importDefault(require("../breakpoint/shared/operations"));
|
|
45
|
+
const eventBus_1 = __importDefault(require("../eventBus"));
|
|
46
|
+
let actionable = true;
|
|
47
|
+
function setActionable(value) {
|
|
48
|
+
actionable = value;
|
|
49
|
+
}
|
|
50
|
+
exports.setActionable = setActionable;
|
|
51
|
+
// 确保属性都是定义过的
|
|
52
|
+
function ensureDefined(object, concept) {
|
|
53
|
+
if (!object) {
|
|
54
|
+
return object;
|
|
55
|
+
}
|
|
56
|
+
const newObject = {};
|
|
57
|
+
const actualConcept = object?.concept || concept;
|
|
58
|
+
if (actualConcept) {
|
|
59
|
+
const propertyMap = (0, decorators_1.getConceptPropertyMap)(actualConcept);
|
|
60
|
+
for (const key in object) {
|
|
61
|
+
const property = propertyMap.get(key);
|
|
62
|
+
if (property) {
|
|
63
|
+
const objProperty = object[key] ?? null;
|
|
64
|
+
const propertyConcept = property?.objectRef;
|
|
65
|
+
if (propertyConcept) {
|
|
66
|
+
if (Array.isArray(objProperty)) {
|
|
67
|
+
newObject[key] = objProperty.map((objItem) => {
|
|
68
|
+
return ensureDefined(objItem, propertyConcept);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
newObject[key] = ensureDefined(objProperty, propertyConcept);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
newObject[key] = objProperty;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
newObject.concept = actualConcept;
|
|
81
|
+
}
|
|
82
|
+
return newObject;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 顶点类
|
|
86
|
+
* 属性均为只读,仅在初始化和 load 的情况下可以修改
|
|
87
|
+
*/
|
|
88
|
+
let BaseNode = BaseNode_1 = class BaseNode extends EventEmitter_1.EventEmitter {
|
|
89
|
+
static ConceptName = 'BaseNode';
|
|
90
|
+
/**
|
|
91
|
+
* 可修改标志,内部属性
|
|
92
|
+
* 标记在构造函数结束后是否可修改
|
|
93
|
+
*/
|
|
94
|
+
_mutable = true;
|
|
95
|
+
/** 节点类别缓存 */
|
|
96
|
+
_concept;
|
|
97
|
+
/**
|
|
98
|
+
* 概念
|
|
99
|
+
*/
|
|
100
|
+
get concept() {
|
|
101
|
+
return this._concept ?? this.constructor.ConceptName;
|
|
102
|
+
}
|
|
103
|
+
set concept(val) {
|
|
104
|
+
console.warn(`[警告] 尽快移除变更 concept 值的操作,下个版本 concept 将会改为只读。\n当前变更:${this.concept} -> ${val},原始节点类别:${this.constructor.ConceptName}`);
|
|
105
|
+
if (val !== this.concept) {
|
|
106
|
+
if (val === this.constructor.ConceptName) {
|
|
107
|
+
delete this._concept;
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this._concept = val;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* toJSON 时需要去除的键,为了避免出现 CircularJSON
|
|
116
|
+
*/
|
|
117
|
+
JSON_EXCLUDED_KEYS;
|
|
118
|
+
/**
|
|
119
|
+
* 唯一 Id
|
|
120
|
+
*/
|
|
121
|
+
id = (0, uuid_1.v4)().replace(/-/g, '');
|
|
122
|
+
/**
|
|
123
|
+
* 变动时间
|
|
124
|
+
*/
|
|
125
|
+
changedTime;
|
|
126
|
+
/**
|
|
127
|
+
* 分支名称
|
|
128
|
+
*/
|
|
129
|
+
branchName;
|
|
130
|
+
/**
|
|
131
|
+
* 合并代码相关
|
|
132
|
+
*/
|
|
133
|
+
workingCopy;
|
|
134
|
+
branch;
|
|
135
|
+
/**
|
|
136
|
+
* 断点状态
|
|
137
|
+
* undefined ==> 未设置
|
|
138
|
+
* null ==> 已删除
|
|
139
|
+
* 'ENABLED' ==> 启用断点
|
|
140
|
+
* 'DISABLED' ==> 禁用断点
|
|
141
|
+
*/
|
|
142
|
+
breakpoint;
|
|
143
|
+
/**
|
|
144
|
+
* 父节点
|
|
145
|
+
*/
|
|
146
|
+
parentNode = null;
|
|
147
|
+
parentKey = '';
|
|
148
|
+
/**
|
|
149
|
+
* 是否正在编辑
|
|
150
|
+
* 前端 UI 状态
|
|
151
|
+
*/
|
|
152
|
+
editable;
|
|
153
|
+
/**
|
|
154
|
+
* 是否可以删除
|
|
155
|
+
* 前端 UI 状态
|
|
156
|
+
*/
|
|
157
|
+
removable;
|
|
158
|
+
/**
|
|
159
|
+
* 是否正在编辑
|
|
160
|
+
* 前端 UI 状态
|
|
161
|
+
*/
|
|
162
|
+
editing;
|
|
163
|
+
/**
|
|
164
|
+
* 是否正在请求
|
|
165
|
+
* 前端 UI 状态
|
|
166
|
+
*/
|
|
167
|
+
loading;
|
|
168
|
+
/**
|
|
169
|
+
* 节点是否为展开状态
|
|
170
|
+
* 前端 UI 状态
|
|
171
|
+
*/
|
|
172
|
+
expanded;
|
|
173
|
+
/**
|
|
174
|
+
* 节点是否显示
|
|
175
|
+
* 前端 UI 状态
|
|
176
|
+
*/
|
|
177
|
+
hidden;
|
|
178
|
+
/**
|
|
179
|
+
* 页面树节点是否显示
|
|
180
|
+
* 前端 UI 状态
|
|
181
|
+
*/
|
|
182
|
+
pageTreeNodeHidden;
|
|
183
|
+
/**
|
|
184
|
+
* 逻辑树节点是否显示
|
|
185
|
+
* 前端 UI 状态
|
|
186
|
+
*/
|
|
187
|
+
logicTreeNodeHidden;
|
|
188
|
+
/**
|
|
189
|
+
* 数据树节点是否显示
|
|
190
|
+
* 前端 UI 状态
|
|
191
|
+
*/
|
|
192
|
+
dataTreeNodeHidden;
|
|
193
|
+
/**
|
|
194
|
+
* 数据树节点是否显示
|
|
195
|
+
* 前端 UI 状态
|
|
196
|
+
*/
|
|
197
|
+
processTreeNodeHidden;
|
|
198
|
+
/**
|
|
199
|
+
* 数据树节点是否展开
|
|
200
|
+
* 前端 UI 状态
|
|
201
|
+
*/
|
|
202
|
+
logicTreeNodeExpanded;
|
|
203
|
+
/**
|
|
204
|
+
* 用于挂 embeddedTS 的 sourceMap
|
|
205
|
+
*/
|
|
206
|
+
sourceMap;
|
|
207
|
+
/**
|
|
208
|
+
* 是否为叶子节点
|
|
209
|
+
* 前端 UI 状态
|
|
210
|
+
*/
|
|
211
|
+
isLeaf;
|
|
212
|
+
storageJSON;
|
|
213
|
+
/**
|
|
214
|
+
* 当前节点上报错详细信息
|
|
215
|
+
*/
|
|
216
|
+
tsErrorDetail;
|
|
217
|
+
name = '';
|
|
218
|
+
/**
|
|
219
|
+
* 当前节点的类型标注
|
|
220
|
+
*/
|
|
221
|
+
__TypeAnnotation;
|
|
222
|
+
/**
|
|
223
|
+
* 当前节点的类型标注是不是正确的
|
|
224
|
+
*/
|
|
225
|
+
__isCorrectTypeAnnotation;
|
|
226
|
+
/**
|
|
227
|
+
* @param source 需要合并的部分参数
|
|
228
|
+
*/
|
|
229
|
+
constructor(source) {
|
|
230
|
+
super();
|
|
231
|
+
if (this.hasOwnProperty('JSON_EXCLUDED_KEYS') && this.JSON_EXCLUDED_KEYS === undefined)
|
|
232
|
+
delete this.JSON_EXCLUDED_KEYS;
|
|
233
|
+
/**
|
|
234
|
+
* 监听action,delete,update事件
|
|
235
|
+
*/
|
|
236
|
+
this.on('create', this.genActionListener);
|
|
237
|
+
this.on('delete', this.genActionListener);
|
|
238
|
+
this.on('update', this.genActionListener);
|
|
239
|
+
/**
|
|
240
|
+
* 监听action,delete,update事件
|
|
241
|
+
*/
|
|
242
|
+
this.on('create', () => operations_1.default.create(this));
|
|
243
|
+
this.on('delete', () => operations_1.default.delete(this));
|
|
244
|
+
this.on('update', () => operations_1.default.update(this));
|
|
245
|
+
}
|
|
246
|
+
subConstructor(source) {
|
|
247
|
+
const propertyMap = (0, decorators_1.getConceptPropertyMap)(this.concept || this.constructor.name);
|
|
248
|
+
const properties = Array.from(new Set([...Object.keys(this), ...Object.keys(source)])).filter((key) => propertyMap.has(key));
|
|
249
|
+
// 测试时用的标记属性
|
|
250
|
+
if (process.env.NODE_ENV === 'testing') {
|
|
251
|
+
properties.push('__$Selected', '__TypeAnnotation');
|
|
252
|
+
}
|
|
253
|
+
properties.forEach((key) => {
|
|
254
|
+
if (key === 'concept') {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
const sourceItem = source[key] !== undefined ? source[key] : this[key];
|
|
258
|
+
let property = propertyMap.get(key);
|
|
259
|
+
let objectRefCtor;
|
|
260
|
+
// 测试环境下,类型节点由外部注入,所以需要在初始化的时候必须带上类型节点
|
|
261
|
+
if (process.env.NODE_ENV === 'testing' && key === '__TypeAnnotation' && sourceItem) {
|
|
262
|
+
property = { objectRef: 'TypeAnnotation' };
|
|
263
|
+
}
|
|
264
|
+
try {
|
|
265
|
+
if (property?.objectRef) {
|
|
266
|
+
const arr = property.objectRef.split(' | ');
|
|
267
|
+
for (let i = 0; i < arr.length; i++) {
|
|
268
|
+
objectRefCtor = (0, decorators_1.getConceptConstructor)(arr[i]);
|
|
269
|
+
if (sourceItem instanceof objectRefCtor) {
|
|
270
|
+
sourceItem.parentNode = this;
|
|
271
|
+
sourceItem.parentKey = key;
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
// 数组的情况也在这里做掉了
|
|
277
|
+
const val = objectRefCtor && sourceItem && !(sourceItem instanceof objectRefCtor) ? this.instantiateSub(sourceItem, key) : sourceItem;
|
|
278
|
+
if (val !== undefined) {
|
|
279
|
+
this[key] = val;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
catch (e) {
|
|
283
|
+
// Function has non-object prototype 'undefined' in instanceof check
|
|
284
|
+
if (!e.message.includes('Function has non-object prototype'))
|
|
285
|
+
throw e;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
operations_1.default.create(this);
|
|
289
|
+
// node 环境下需要删除当前节点的 concept 属性
|
|
290
|
+
if (utils.isNode && ('concept' in this) && !this.concept) {
|
|
291
|
+
Reflect.deleteProperty(this, 'concept');
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
fixInstantiate() {
|
|
295
|
+
const propertyMap = (0, decorators_1.getConceptPropertyMap)(this.concept ?? this.constructor.name);
|
|
296
|
+
const properties = Object.keys(this).filter((key) => propertyMap.has(key));
|
|
297
|
+
properties.forEach((key) => {
|
|
298
|
+
const property = propertyMap.get(key);
|
|
299
|
+
const sourceItem = this[key];
|
|
300
|
+
const objectRefCtor = property.objectRef && (0, decorators_1.getConceptConstructor)(property.objectRef);
|
|
301
|
+
if (objectRefCtor) {
|
|
302
|
+
if (Array.isArray(sourceItem)) {
|
|
303
|
+
sourceItem.forEach((item, index) => {
|
|
304
|
+
if (item instanceof objectRefCtor) {
|
|
305
|
+
item.parentNode = this;
|
|
306
|
+
item.parentKey = key;
|
|
307
|
+
item.fixInstantiate();
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
sourceItem[index] = this.instantiateSub(item instanceof BaseNode_1 ? item.toJSON() : item, key);
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
else if (sourceItem instanceof objectRefCtor) {
|
|
315
|
+
sourceItem.parentNode = this;
|
|
316
|
+
sourceItem.parentKey = key;
|
|
317
|
+
sourceItem.fixInstantiate();
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
this[key] = this.instantiateSub(sourceItem instanceof BaseNode_1 ? sourceItem.toJSON() : sourceItem, key);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
getIndexOfParent() {
|
|
326
|
+
let index = -1;
|
|
327
|
+
const { parentNode } = this;
|
|
328
|
+
if (parentNode) {
|
|
329
|
+
const { parentKey } = this;
|
|
330
|
+
const parentProperty = parentNode[parentKey];
|
|
331
|
+
if (Array.isArray(parentProperty)) {
|
|
332
|
+
index = parentProperty.indexOf(this);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return index;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* 为存储点生成行为监听器
|
|
339
|
+
* @param action
|
|
340
|
+
* @returns
|
|
341
|
+
*/
|
|
342
|
+
genActionListener($event) {
|
|
343
|
+
// eventList是要被发送给后端的数据
|
|
344
|
+
if (!$event.eventList) {
|
|
345
|
+
$event.eventList = [];
|
|
346
|
+
}
|
|
347
|
+
if (!$event.eventStop) {
|
|
348
|
+
$event.eventList.push($event);
|
|
349
|
+
}
|
|
350
|
+
$event.originEvent = $event.originEvent || $event;
|
|
351
|
+
this.onChange($event);
|
|
352
|
+
if (this.concept === 'App') {
|
|
353
|
+
this.emit('storage', $event);
|
|
354
|
+
}
|
|
355
|
+
else if (this.parentNode && this.parentNode.emit) {
|
|
356
|
+
const event = {
|
|
357
|
+
action: 'update',
|
|
358
|
+
path: this.parentNode?.getNodePath(false),
|
|
359
|
+
object: {},
|
|
360
|
+
oldObject: {},
|
|
361
|
+
originEvent: $event.originEvent,
|
|
362
|
+
eventList: $event.eventList,
|
|
363
|
+
// eventStop为true后,数据不再存入eventList,就不再会将冒泡数据发送给后端
|
|
364
|
+
eventStop: true,
|
|
365
|
+
};
|
|
366
|
+
this.parentNode?.emit('update', event);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
createNode({ parentNode, parentKey, index }) {
|
|
370
|
+
if (!actionable) {
|
|
371
|
+
eventBus_1.default.emit('NotActionable');
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
if (parentNode) {
|
|
375
|
+
const property = parentNode[parentKey];
|
|
376
|
+
if (Array.isArray(property) && index !== -1) {
|
|
377
|
+
property.splice(index, 0, this);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
parentNode[parentKey] = this;
|
|
381
|
+
}
|
|
382
|
+
this.parentNode = parentNode;
|
|
383
|
+
this.parentKey = parentKey;
|
|
384
|
+
this.create({
|
|
385
|
+
index,
|
|
386
|
+
parentKey,
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
toTemplateJSON() {
|
|
391
|
+
return this._toJSON((source) => {
|
|
392
|
+
delete source.id;
|
|
393
|
+
return source;
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* 创建节点
|
|
398
|
+
*/
|
|
399
|
+
create(parentParams) {
|
|
400
|
+
if (!actionable) {
|
|
401
|
+
this._delete();
|
|
402
|
+
eventBus_1.default.emit('NotActionable');
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
this.emit('create', {
|
|
406
|
+
action: 'create',
|
|
407
|
+
path: this.getNodePath(true),
|
|
408
|
+
object: this.toJSON(),
|
|
409
|
+
...parentParams,
|
|
410
|
+
oldObject: null,
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* 如果有父节点,则删除节点,在添加时调用
|
|
415
|
+
*/
|
|
416
|
+
ensureDelete() {
|
|
417
|
+
if (!actionable) {
|
|
418
|
+
eventBus_1.default.emit('NotActionable');
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
// 批量赋值因为连线的问题需要特殊处理一下.
|
|
422
|
+
if (this.parentNode?.concept === 'SelectMembers') {
|
|
423
|
+
this.parentNode.ensureDelete();
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
if (this.concept === 'SelectMembers' && this.parentNode) {
|
|
427
|
+
const node = this.parentNode;
|
|
428
|
+
node.changeLinesLocation(this);
|
|
429
|
+
}
|
|
430
|
+
if (this.parentNode && this.parentKey) {
|
|
431
|
+
const path = this.getNodePath(false);
|
|
432
|
+
const parentParams = this._delete();
|
|
433
|
+
if (parentParams && parentParams.index !== -1) {
|
|
434
|
+
if (Array.isArray(this.parentNode[this.parentKey])) {
|
|
435
|
+
this.emit('delete', {
|
|
436
|
+
action: 'delete',
|
|
437
|
+
path,
|
|
438
|
+
object: null,
|
|
439
|
+
...parentParams,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
else {
|
|
443
|
+
const parentPath = this.parentNode.getNodePath(false);
|
|
444
|
+
this.parentNode.emit('update', {
|
|
445
|
+
action: 'update',
|
|
446
|
+
path: parentPath,
|
|
447
|
+
object: {
|
|
448
|
+
[this.parentKey]: null,
|
|
449
|
+
},
|
|
450
|
+
oldObject: {
|
|
451
|
+
[this.parentKey]: this.toJSON(),
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* 删除节点
|
|
460
|
+
*/
|
|
461
|
+
delete() {
|
|
462
|
+
if (!actionable) {
|
|
463
|
+
eventBus_1.default.emit('NotActionable');
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (this.parentNode?.concept === 'Match' && this.parentKey === 'expression') {
|
|
467
|
+
this.parentNode.setExpressionWitchCase(null);
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
// 批量赋值因为连线的问题需要特殊处理一下.
|
|
471
|
+
if (this.parentNode?.concept === 'SelectMembers') {
|
|
472
|
+
const node = this.parentNode;
|
|
473
|
+
node.delete();
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
if (this.concept === 'SelectMembers') {
|
|
477
|
+
const node = this.parentNode;
|
|
478
|
+
node.changeLinesLocation(this);
|
|
479
|
+
}
|
|
480
|
+
// 自定义连接器下的namespace删除的时候需要同时删除对应的logic
|
|
481
|
+
if (this.concept === 'Namespace' && this.parentNode.concept === 'Connector') {
|
|
482
|
+
this.logics.forEach(logic => logic?.delete());
|
|
483
|
+
}
|
|
484
|
+
const useIndex = ['BindEvent', 'Identifier'].includes(this.concept);
|
|
485
|
+
const path = this.getNodePath(useIndex);
|
|
486
|
+
const parentParams = this._delete();
|
|
487
|
+
if (parentParams && parentParams.index !== -1) {
|
|
488
|
+
if (Array.isArray(this.parentNode[this.parentKey])) {
|
|
489
|
+
if (process.env.NODE_ENV === 'development') {
|
|
490
|
+
console.log('删除节点', this);
|
|
491
|
+
}
|
|
492
|
+
this.emit('delete', {
|
|
493
|
+
action: 'delete',
|
|
494
|
+
path,
|
|
495
|
+
object: null,
|
|
496
|
+
...parentParams,
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
const parentPath = this.parentNode.getNodePath(false);
|
|
501
|
+
this.parentNode.emit('update', {
|
|
502
|
+
action: 'update',
|
|
503
|
+
path: parentPath,
|
|
504
|
+
object: {
|
|
505
|
+
[this.parentKey]: null,
|
|
506
|
+
},
|
|
507
|
+
oldObject: {
|
|
508
|
+
[this.parentKey]: this.toJSON(),
|
|
509
|
+
},
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* 更新节点
|
|
516
|
+
*/
|
|
517
|
+
update({ field, ...object }) {
|
|
518
|
+
if (!actionable) {
|
|
519
|
+
eventBus_1.default.emit('NotActionable');
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
const path = this.getNodePath(false);
|
|
523
|
+
const oldObject = {};
|
|
524
|
+
for (const key in object) {
|
|
525
|
+
if (key === 'concept') {
|
|
526
|
+
continue;
|
|
527
|
+
}
|
|
528
|
+
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
529
|
+
const oldProperty = this[key] ?? null;
|
|
530
|
+
oldObject[key] = oldProperty;
|
|
531
|
+
if (Array.isArray(oldProperty)) {
|
|
532
|
+
oldObject[key] = oldProperty.map((item) => {
|
|
533
|
+
let propertyItem = item ?? null;
|
|
534
|
+
if (item instanceof BaseNode_1) {
|
|
535
|
+
propertyItem = item.toJSON();
|
|
536
|
+
}
|
|
537
|
+
return propertyItem;
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
else if (oldProperty instanceof BaseNode_1) {
|
|
541
|
+
oldObject[key] = oldProperty.toJSON();
|
|
542
|
+
}
|
|
543
|
+
const property = object[key] ?? null;
|
|
544
|
+
this[key] = property;
|
|
545
|
+
const objectRefCtor = (0, decorators_1.getConceptConstructor)(property?.concept);
|
|
546
|
+
if (Array.isArray(property)) {
|
|
547
|
+
this[key] = property.map((item) => {
|
|
548
|
+
let propertyItem = item ?? null;
|
|
549
|
+
const propertyObjectRefCtor = (0, decorators_1.getConceptConstructor)(item?.concept);
|
|
550
|
+
if (propertyObjectRefCtor?.from) {
|
|
551
|
+
propertyItem = propertyObjectRefCtor.from(item, this, key);
|
|
552
|
+
}
|
|
553
|
+
return propertyItem;
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
else if (objectRefCtor?.from) {
|
|
557
|
+
this[key] = objectRefCtor.from(property, this, key);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
const newObject = {};
|
|
562
|
+
const propertyMap = (0, decorators_1.getConceptPropertyMap)(this.concept ?? this.constructor.name);
|
|
563
|
+
for (const key in object) {
|
|
564
|
+
const property = propertyMap.get(key);
|
|
565
|
+
if (property) {
|
|
566
|
+
const objProperty = object[key] ?? null;
|
|
567
|
+
const propertyConcept = property?.objectRef;
|
|
568
|
+
if (propertyConcept) {
|
|
569
|
+
if (Array.isArray(objProperty)) {
|
|
570
|
+
newObject[key] = objProperty.map((objItem) => {
|
|
571
|
+
return ensureDefined(objItem, propertyConcept);
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
newObject[key] = ensureDefined(objProperty, propertyConcept);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
newObject[key] = objProperty;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
if (process.env.NODE_ENV === 'development') {
|
|
584
|
+
console.log('更新节点', 'path', path, 'oldObject', oldObject, 'newObject', newObject);
|
|
585
|
+
}
|
|
586
|
+
this.emit('update', {
|
|
587
|
+
action: 'update',
|
|
588
|
+
path,
|
|
589
|
+
object: newObject,
|
|
590
|
+
oldObject,
|
|
591
|
+
field,
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
_delete() {
|
|
595
|
+
/* override */
|
|
596
|
+
return {
|
|
597
|
+
propertyName: '',
|
|
598
|
+
index: -1,
|
|
599
|
+
object: null,
|
|
600
|
+
oldObject: this,
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
static from(source, parentNode, parentKey) {
|
|
604
|
+
// 有一些继承的情况
|
|
605
|
+
const Ctor = decorators_1.classMap.get(source?.concept) || this;
|
|
606
|
+
if (Ctor && source instanceof Ctor) {
|
|
607
|
+
if (parentNode) {
|
|
608
|
+
source.parentNode = parentNode;
|
|
609
|
+
}
|
|
610
|
+
if (parentKey) {
|
|
611
|
+
source.parentKey = parentKey;
|
|
612
|
+
}
|
|
613
|
+
return source;
|
|
614
|
+
}
|
|
615
|
+
if (Ctor) {
|
|
616
|
+
const instance = new Ctor();
|
|
617
|
+
if (parentNode) {
|
|
618
|
+
instance.parentNode = parentNode;
|
|
619
|
+
}
|
|
620
|
+
if (parentKey) {
|
|
621
|
+
instance.parentKey = parentKey;
|
|
622
|
+
}
|
|
623
|
+
instance.subConstructor({
|
|
624
|
+
...source,
|
|
625
|
+
concept: source?.concept ?? this?.prototype?.concept ?? Ctor.ConceptName ?? Ctor.name,
|
|
626
|
+
parentNode,
|
|
627
|
+
});
|
|
628
|
+
return instance;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
get nodePath() {
|
|
632
|
+
return this.getNodePath(false);
|
|
633
|
+
}
|
|
634
|
+
getNodePath(useIndex) {
|
|
635
|
+
let node = this;
|
|
636
|
+
let useIndexKeys = [];
|
|
637
|
+
let option = {};
|
|
638
|
+
if (Array.isArray(useIndex)) {
|
|
639
|
+
useIndexKeys = useIndex;
|
|
640
|
+
useIndex = false;
|
|
641
|
+
}
|
|
642
|
+
else if (useIndex && typeof useIndex === 'object') {
|
|
643
|
+
option = useIndex;
|
|
644
|
+
}
|
|
645
|
+
let isNodeSelf = true;
|
|
646
|
+
const pathArr = [];
|
|
647
|
+
while (node) {
|
|
648
|
+
let path = '';
|
|
649
|
+
const { parentNode } = node;
|
|
650
|
+
if (parentNode) {
|
|
651
|
+
const { parentKey } = node;
|
|
652
|
+
path = parentKey;
|
|
653
|
+
const parentProperty = parentNode[parentKey];
|
|
654
|
+
if (Array.isArray(parentProperty)) {
|
|
655
|
+
const { name } = node;
|
|
656
|
+
// 如果存在同名节点,使用下标来表示NodePath
|
|
657
|
+
const siblingNode = name
|
|
658
|
+
? parentProperty.find((child) => {
|
|
659
|
+
// 因为proxy的关系,导致两边的引用不相同,所以这里需要判断id
|
|
660
|
+
return child?.name === name && child !== node && child?.id !== node?.id;
|
|
661
|
+
})
|
|
662
|
+
: null;
|
|
663
|
+
if (!(option.useName && name) && (siblingNode || !name || (useIndex && isNodeSelf) || useIndexKeys.includes(node.concept))) {
|
|
664
|
+
const index = parentProperty.findIndex((item) => {
|
|
665
|
+
if (item === node) {
|
|
666
|
+
return true;
|
|
667
|
+
}
|
|
668
|
+
return item?.id && item?.id === node?.id;
|
|
669
|
+
});
|
|
670
|
+
path += `[${index}]`;
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
path += `[name=${name}]`;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
pathArr.unshift(path);
|
|
677
|
+
}
|
|
678
|
+
node = parentNode;
|
|
679
|
+
isNodeSelf = false;
|
|
680
|
+
}
|
|
681
|
+
pathArr.unshift('app');
|
|
682
|
+
return pathArr.join('.');
|
|
683
|
+
}
|
|
684
|
+
/**
|
|
685
|
+
* 上层节点
|
|
686
|
+
*/
|
|
687
|
+
get upperNode() {
|
|
688
|
+
// eslint-disable-next-line consistent-this
|
|
689
|
+
let _upperNode = this;
|
|
690
|
+
while (!!_upperNode && _upperNode.concept === this.concept) {
|
|
691
|
+
_upperNode = _upperNode.parentNode;
|
|
692
|
+
}
|
|
693
|
+
return _upperNode;
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* 根节点
|
|
697
|
+
*/
|
|
698
|
+
get rootNode() {
|
|
699
|
+
return this.getAncestor('App');
|
|
700
|
+
}
|
|
701
|
+
getAncestor(concept) {
|
|
702
|
+
let { upperNode } = this;
|
|
703
|
+
while (upperNode && upperNode.concept && upperNode.concept !== concept) {
|
|
704
|
+
upperNode = upperNode.upperNode;
|
|
705
|
+
}
|
|
706
|
+
return upperNode;
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
*
|
|
710
|
+
* @param source
|
|
711
|
+
* @param Ctor
|
|
712
|
+
* @param completeList
|
|
713
|
+
* @param idsList
|
|
714
|
+
*/
|
|
715
|
+
handleSource(source, completeList) {
|
|
716
|
+
const { id, concept } = source || {};
|
|
717
|
+
const actualSource = source instanceof BaseNode_1 ? source : (0, map_1.getSourceFromMap)(id, concept);
|
|
718
|
+
completeList.push(actualSource || source);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* 获取当前的TsName
|
|
722
|
+
*/
|
|
723
|
+
get tsName() {
|
|
724
|
+
if (this.name) {
|
|
725
|
+
let tsName = this.name;
|
|
726
|
+
// 匹配所有特殊字符都转为_
|
|
727
|
+
tsName = tsName.replace(/\W/g, '_');
|
|
728
|
+
if (/^\d/.test(tsName)) {
|
|
729
|
+
tsName = `$${tsName}`;
|
|
730
|
+
}
|
|
731
|
+
return tsName;
|
|
732
|
+
}
|
|
733
|
+
return '';
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* 生成json
|
|
737
|
+
* @param instance
|
|
738
|
+
* @param Ctor
|
|
739
|
+
*/
|
|
740
|
+
genSources(instance, filerFn) {
|
|
741
|
+
if (!instance) {
|
|
742
|
+
return instance;
|
|
743
|
+
}
|
|
744
|
+
if (Array.isArray(instance)) {
|
|
745
|
+
return instance.map((item) => (item && item._toJSON ? item._toJSON(filerFn) : item));
|
|
746
|
+
}
|
|
747
|
+
return instance && instance._toJSON ? instance._toJSON(filerFn) : instance;
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* 实例化一个 JSON
|
|
751
|
+
* 由于有 from,只能先实例化父级,再实例化子级
|
|
752
|
+
* @param obj
|
|
753
|
+
* @param parentNode
|
|
754
|
+
* @returns
|
|
755
|
+
*/
|
|
756
|
+
instantiate(source, parentNode, parentKey) {
|
|
757
|
+
if (source instanceof BaseNode_1) {
|
|
758
|
+
if (!source.parentNode || !source.parentKey) {
|
|
759
|
+
source.parentNode = parentNode;
|
|
760
|
+
source.parentKey = parentKey;
|
|
761
|
+
}
|
|
762
|
+
return source;
|
|
763
|
+
}
|
|
764
|
+
if (source && source.concept && decorators_1.classMap.get(source.concept)) {
|
|
765
|
+
const Ctor = decorators_1.classMap.get(source.concept);
|
|
766
|
+
const instance = Ctor.from(source, parentNode, parentKey);
|
|
767
|
+
if (instance && instance.toStorageJSON)
|
|
768
|
+
instance.storageJSON = instance.toStorageJSON();
|
|
769
|
+
return instance;
|
|
770
|
+
}
|
|
771
|
+
return source;
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* 激活 JSON 内部实例
|
|
775
|
+
* @param source
|
|
776
|
+
*/
|
|
777
|
+
instantiateSub(source, parentKey) {
|
|
778
|
+
if (!source) {
|
|
779
|
+
return;
|
|
780
|
+
}
|
|
781
|
+
const completeList = [];
|
|
782
|
+
let isArray;
|
|
783
|
+
// 暂时通过是否有name判断数据是否全
|
|
784
|
+
if (Array.isArray(source)) {
|
|
785
|
+
isArray = true;
|
|
786
|
+
source.forEach((sourceItem) => {
|
|
787
|
+
this.handleSource(sourceItem, completeList);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
this.handleSource(source, completeList);
|
|
792
|
+
}
|
|
793
|
+
const instanceList = completeList.map((item) => this.instantiate(item, this, parentKey));
|
|
794
|
+
if (isArray) {
|
|
795
|
+
return instanceList;
|
|
796
|
+
}
|
|
797
|
+
if (Array.isArray(instanceList) && instanceList.length) {
|
|
798
|
+
return instanceList[0];
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
plainAssign(source) {
|
|
802
|
+
this._mutable = true;
|
|
803
|
+
const oldId = this.id;
|
|
804
|
+
Object.keys(source).forEach((key) => {
|
|
805
|
+
const value = source[key];
|
|
806
|
+
if (typeof value !== 'object' && typeof value !== 'function')
|
|
807
|
+
this[key] = value;
|
|
808
|
+
});
|
|
809
|
+
this._mutable = false;
|
|
810
|
+
}
|
|
811
|
+
pick(source, keys = []) {
|
|
812
|
+
const obj = {};
|
|
813
|
+
keys.forEach((key) => (obj[key] = source[key]));
|
|
814
|
+
// 这里统一用 assign,集中处理 id 的问题
|
|
815
|
+
// this.assign(obj);
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* 从对象中深度获取
|
|
819
|
+
* @param source
|
|
820
|
+
* @param keys
|
|
821
|
+
* @example 比如一般后端返回只是添加了个 id
|
|
822
|
+
* ```
|
|
823
|
+
* this.deepPick(result, ['id'])
|
|
824
|
+
*/
|
|
825
|
+
deepPick(source, keys = []) {
|
|
826
|
+
utils.traverse((current) => {
|
|
827
|
+
const subSource = current.jsonPath ? (0, lodash_1.at)(source, [current.jsonPath])[0] : source;
|
|
828
|
+
const target = current.jsonPath ? (0, lodash_1.at)(this, [current.jsonPath])[0] : this;
|
|
829
|
+
if (!target)
|
|
830
|
+
return;
|
|
831
|
+
const obj = {};
|
|
832
|
+
keys.forEach((key) => {
|
|
833
|
+
if (subSource.hasOwnProperty(key)) {
|
|
834
|
+
obj[key] = subSource[key];
|
|
835
|
+
}
|
|
836
|
+
});
|
|
837
|
+
// 这里统一用 assign,集中处理 id 的问题
|
|
838
|
+
target.assign ? target.assign(obj) : Object.assign(target, obj);
|
|
839
|
+
}, { node: source }, { mode: 'anyObject' });
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* 去除循环依赖,转为纯 JSON
|
|
843
|
+
* @param parentKey 外面的 key,提供给 JSON.stringify 使用
|
|
844
|
+
* @param excludedKeys 需要额外排除的 keys
|
|
845
|
+
*/
|
|
846
|
+
toJSON() {
|
|
847
|
+
return this._toJSON();
|
|
848
|
+
}
|
|
849
|
+
_toJSON(filerFn) {
|
|
850
|
+
const propertyMap = (0, decorators_1.getConceptPropertyMap)(this.concept || this.constructor.name);
|
|
851
|
+
const source = {};
|
|
852
|
+
propertyMap.forEach((property, key) => {
|
|
853
|
+
if (property) {
|
|
854
|
+
const { objectRef: propertyObjectRef } = property;
|
|
855
|
+
if (!propertyObjectRef) {
|
|
856
|
+
source[key] = this[key];
|
|
857
|
+
}
|
|
858
|
+
else {
|
|
859
|
+
const sources = this.genSources(this[key], filerFn);
|
|
860
|
+
source[key] = sources;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
// @ts-ignore
|
|
865
|
+
source.concept = this.concept;
|
|
866
|
+
return filerFn ? filerFn(source) : source;
|
|
867
|
+
}
|
|
868
|
+
/**
|
|
869
|
+
* 转为单层的 JSON
|
|
870
|
+
* @param parentKey 外面的 key,提供给 JSON.stringify 使用
|
|
871
|
+
* @param excludedKeys 需要额外排除的 keys
|
|
872
|
+
*/
|
|
873
|
+
toPlainJSON(parentKey, excludedKeys = []) {
|
|
874
|
+
const JSON_EXCLUDED_KEYS = new Set(this.JSON_EXCLUDED_KEYS || []); // Object.getPrototypeOf(this).constructor.JSON_EXCLUDED_KEYS || [];
|
|
875
|
+
excludedKeys.forEach((key) => JSON_EXCLUDED_KEYS.add(key));
|
|
876
|
+
const temp = {};
|
|
877
|
+
Object.keys(this).forEach((key) => {
|
|
878
|
+
const value = this[key];
|
|
879
|
+
if (!JSON_EXCLUDED_KEYS.has(key) && typeof value !== 'object' && typeof value !== 'function')
|
|
880
|
+
temp[key] = value;
|
|
881
|
+
});
|
|
882
|
+
return JSON.parse(JSON.stringify(temp));
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* 查找引用
|
|
886
|
+
*/
|
|
887
|
+
async findUsage() {
|
|
888
|
+
/* override */
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* 通过当前节点,查找被引用的节点
|
|
892
|
+
*/
|
|
893
|
+
async nodeFindRefNodes() {
|
|
894
|
+
/* override */
|
|
895
|
+
}
|
|
896
|
+
async findReadOnlyLogicUsage() {
|
|
897
|
+
/* override */
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* 重命名
|
|
901
|
+
*/
|
|
902
|
+
async changeName(newValue, updateAll = false) {
|
|
903
|
+
/* override */
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* 准备删除
|
|
907
|
+
*/
|
|
908
|
+
async prepareDelete(cb) {
|
|
909
|
+
/* override */
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* 添加参数准备
|
|
913
|
+
*/
|
|
914
|
+
async addParamsPrepare() {
|
|
915
|
+
/* override */
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* 获取当前节点类型
|
|
919
|
+
*/
|
|
920
|
+
async getCurrentTypeAnnotation() {
|
|
921
|
+
/* override */
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* 获取当前节点的下一级内容
|
|
925
|
+
*/
|
|
926
|
+
getSelectRef(newTypeAnnotation, needNewStructure = false) {
|
|
927
|
+
/* override */
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* 销毁
|
|
931
|
+
* 从 Map 中删除点和子节点
|
|
932
|
+
*/
|
|
933
|
+
destroy() {
|
|
934
|
+
// utils.traverse((current) => , { node: this }, {
|
|
935
|
+
// mode: 'anyObject',
|
|
936
|
+
// excludedKeySet: this.JSON_EXCLUDED_KEYS,
|
|
937
|
+
// });
|
|
938
|
+
}
|
|
939
|
+
onChange($event) {
|
|
940
|
+
this.emit('change', $event);
|
|
941
|
+
}
|
|
942
|
+
onCreate($event) {
|
|
943
|
+
/* override */
|
|
944
|
+
}
|
|
945
|
+
onDelete($event) {
|
|
946
|
+
/* override */
|
|
947
|
+
}
|
|
948
|
+
/**
|
|
949
|
+
* 移动节点
|
|
950
|
+
* @param sourceNode
|
|
951
|
+
* @param position
|
|
952
|
+
*/
|
|
953
|
+
moveNode(options) {
|
|
954
|
+
if (!actionable) {
|
|
955
|
+
eventBus_1.default.emit('NotActionable');
|
|
956
|
+
return;
|
|
957
|
+
}
|
|
958
|
+
const { sourceNode, position } = options;
|
|
959
|
+
if (this.concept === 'App') {
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
let actionMsg = `移动${this.constructor.nodeTitle}`;
|
|
963
|
+
if (this.name) {
|
|
964
|
+
actionMsg += `“${this.name}”`;
|
|
965
|
+
}
|
|
966
|
+
sourceNode.app.emit('collect:start', {
|
|
967
|
+
actionMsg,
|
|
968
|
+
});
|
|
969
|
+
// 如果是兄弟节点之前的移动
|
|
970
|
+
if (position !== 'append' && this.concept !== sourceNode.concept) {
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
// 先删
|
|
974
|
+
this.delete();
|
|
975
|
+
if (position === 'append') {
|
|
976
|
+
let { action } = options;
|
|
977
|
+
if (!action)
|
|
978
|
+
action = `add${this.concept}`;
|
|
979
|
+
const parentNode = sourceNode;
|
|
980
|
+
parentNode[action](this);
|
|
981
|
+
}
|
|
982
|
+
else {
|
|
983
|
+
const parentNode = sourceNode?.parentNode;
|
|
984
|
+
const parentKey = sourceNode?.parentKey || '';
|
|
985
|
+
const list = parentNode[parentKey];
|
|
986
|
+
if (Array.isArray(list)) {
|
|
987
|
+
let index = list.indexOf(sourceNode);
|
|
988
|
+
if (position === 'insertAfter') {
|
|
989
|
+
index += 1;
|
|
990
|
+
}
|
|
991
|
+
Object.assign(this, {
|
|
992
|
+
parentNode,
|
|
993
|
+
parentKey,
|
|
994
|
+
});
|
|
995
|
+
// 和原开发沟通过,可注释掉这行,否则拖拽的时候会更新name
|
|
996
|
+
// if (this.concept === 'ViewElement') this.name = (this as unknown as ViewElement).getViewElementUniqueName(this.name);
|
|
997
|
+
list.splice(index, 0, this);
|
|
998
|
+
this.create({
|
|
999
|
+
index,
|
|
1000
|
+
parentNode,
|
|
1001
|
+
parentKey,
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
sourceNode.app.emit('collect:end');
|
|
1006
|
+
}
|
|
1007
|
+
// 其他节点替换本nasl节点
|
|
1008
|
+
replaceNode(newNode) {
|
|
1009
|
+
const oldNode = this;
|
|
1010
|
+
const { parentNode, parentKey, offsetX, offsetY, app } = oldNode;
|
|
1011
|
+
const { logic } = oldNode;
|
|
1012
|
+
if (!Array.isArray(parentNode[parentKey])) {
|
|
1013
|
+
/**
|
|
1014
|
+
* match切换分支,需要调用setExpressionWitchCase,补全分支的信息
|
|
1015
|
+
*/
|
|
1016
|
+
if (parentNode.concept === 'Match' && parentKey === 'expression') {
|
|
1017
|
+
parentNode.setExpressionWitchCase(newNode);
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
parentNode.update({
|
|
1021
|
+
[parentKey]: newNode,
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
else {
|
|
1025
|
+
app.emit('collect:start', {
|
|
1026
|
+
actionMsg: '删除属性变量',
|
|
1027
|
+
});
|
|
1028
|
+
if (parentNode.concept === 'Logic') {
|
|
1029
|
+
if (parentKey === 'body') {
|
|
1030
|
+
const expIndex = logic.body.findIndex((item) => item === oldNode);
|
|
1031
|
+
logic.insertItemInBodyAt(newNode, expIndex);
|
|
1032
|
+
}
|
|
1033
|
+
else {
|
|
1034
|
+
const expIndex = logic.playground.findIndex((item) => item === oldNode);
|
|
1035
|
+
Object.assign(newNode, { offsetX, offsetY });
|
|
1036
|
+
logic.insertItemInPlaygroundAt(newNode, expIndex);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
else {
|
|
1040
|
+
const expIndex = parentNode[parentKey].findIndex((item) => item === oldNode);
|
|
1041
|
+
const firstUpperText = parentKey[0].toUpperCase() + parentKey.slice(1, parentKey.length);
|
|
1042
|
+
Object.assign(newNode, { offsetX, offsetY });
|
|
1043
|
+
if (parentNode.concept === 'MatchCase') {
|
|
1044
|
+
parentKey === 'body' ? parentNode.insertItemInBodyAt(newNode, expIndex) : parentNode.insertLogicItemInPatternsAt(newNode, expIndex);
|
|
1045
|
+
}
|
|
1046
|
+
else if (parentNode[`insertItemIn${firstUpperText}At`])
|
|
1047
|
+
parentNode[`insertItemIn${firstUpperText}At`](newNode, expIndex);
|
|
1048
|
+
else
|
|
1049
|
+
parentNode.insertItemAt(newNode, expIndex);
|
|
1050
|
+
}
|
|
1051
|
+
oldNode.delete();
|
|
1052
|
+
app.emit('collect:end');
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* 获取添加时的默认选项
|
|
1057
|
+
* @returns
|
|
1058
|
+
*/
|
|
1059
|
+
static getDefaultOptions() {
|
|
1060
|
+
return {};
|
|
1061
|
+
}
|
|
1062
|
+
traverseChildren(cb) {
|
|
1063
|
+
function traverse(node) {
|
|
1064
|
+
cb(node);
|
|
1065
|
+
const propertyMap = (0, decorators_1.getConceptPropertyMap)(node?.concept);
|
|
1066
|
+
if (!propertyMap)
|
|
1067
|
+
return;
|
|
1068
|
+
for (const property of propertyMap.keys()) {
|
|
1069
|
+
const child = node[property];
|
|
1070
|
+
if (!child)
|
|
1071
|
+
continue;
|
|
1072
|
+
else if (Array.isArray(child))
|
|
1073
|
+
child.forEach((node) => traverse(node));
|
|
1074
|
+
else
|
|
1075
|
+
traverse(child);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
traverse(this);
|
|
1079
|
+
}
|
|
1080
|
+
/**
|
|
1081
|
+
* 获取当前节点在nasl标注节点上的节点
|
|
1082
|
+
*/
|
|
1083
|
+
getCurrentAnnotatedJSON() {
|
|
1084
|
+
return this.__TypeAnnotation;
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* 获取
|
|
1088
|
+
* 当前this上下文 的Source 和 父级文件级别的节点
|
|
1089
|
+
*/
|
|
1090
|
+
getCurrentSource() {
|
|
1091
|
+
const node = this;
|
|
1092
|
+
let { sourceMap } = node;
|
|
1093
|
+
let fileNode = node;
|
|
1094
|
+
// 如果没有sourceMap,就继续向上找 ,或者到module结束
|
|
1095
|
+
// 如果 节点找到 app 或者module 停止 或者entity找到DataSource为止
|
|
1096
|
+
// 如果当前节点是view就不要向上查找了
|
|
1097
|
+
while (!sourceMap && fileNode && !(fileNode.parentNode.concept === 'App')) {
|
|
1098
|
+
fileNode = fileNode.parentNode;
|
|
1099
|
+
sourceMap = fileNode?.sourceMap;
|
|
1100
|
+
}
|
|
1101
|
+
const currentSource = sourceMap && sourceMap.get(node);
|
|
1102
|
+
if (currentSource) {
|
|
1103
|
+
return { currentSource, fileNode };
|
|
1104
|
+
}
|
|
1105
|
+
return { fileNode };
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* 获取
|
|
1109
|
+
* 当前this上下文 的Source 和 父级文件级别的节点
|
|
1110
|
+
*/
|
|
1111
|
+
getFileConceptNode(concept) {
|
|
1112
|
+
const node = this;
|
|
1113
|
+
let { sourceMap } = node;
|
|
1114
|
+
let fileNode = node;
|
|
1115
|
+
// 如果没有sourceMap,就继续向上找 ,或者到module结束
|
|
1116
|
+
// 如果 节点找到 app 或者module 停止 或者entity找到DataSource为止
|
|
1117
|
+
// 如果当前节点是view就不要向上查找了
|
|
1118
|
+
while (!sourceMap && fileNode && !(fileNode.parentNode.concept === 'App')) {
|
|
1119
|
+
fileNode = fileNode.parentNode;
|
|
1120
|
+
sourceMap = fileNode?.sourceMap;
|
|
1121
|
+
}
|
|
1122
|
+
const arr = [];
|
|
1123
|
+
sourceMap &&
|
|
1124
|
+
sourceMap.forEach((value, key) => {
|
|
1125
|
+
if (key.concept === concept)
|
|
1126
|
+
arr.push({ key, value });
|
|
1127
|
+
});
|
|
1128
|
+
return arr;
|
|
1129
|
+
}
|
|
1130
|
+
get isTreeLeaf() {
|
|
1131
|
+
if (this.concept === 'EntityProperty' ||
|
|
1132
|
+
this.concept === 'InterfaceParam' ||
|
|
1133
|
+
this.concept === 'Param' ||
|
|
1134
|
+
this.concept === 'Return' ||
|
|
1135
|
+
this.concept === 'StructureProperty' ||
|
|
1136
|
+
this.concept === 'Variable' ||
|
|
1137
|
+
this.concept === 'FrontendVariable') {
|
|
1138
|
+
if (this.typeAnnotation || (this.__TypeAnnotation && this.parentKey === 'virtualParams')) {
|
|
1139
|
+
return !this.hasChildren;
|
|
1140
|
+
}
|
|
1141
|
+
return true;
|
|
1142
|
+
}
|
|
1143
|
+
return false;
|
|
1144
|
+
}
|
|
1145
|
+
get hasChildren() {
|
|
1146
|
+
const typeAnnotation = this.typeAnnotation || this.__TypeAnnotation;
|
|
1147
|
+
if (typeAnnotation) {
|
|
1148
|
+
const { typeKind, typeNamespace, typeName, properties } = typeAnnotation;
|
|
1149
|
+
if (typeKind === 'reference' || typeKind === 'generic') {
|
|
1150
|
+
if (typeNamespace.endsWith('.enums'))
|
|
1151
|
+
return null;
|
|
1152
|
+
return [{}];
|
|
1153
|
+
}
|
|
1154
|
+
if (typeNamespace === 'nasl.core' && ['String', 'Text', 'Email'].includes(typeName)) {
|
|
1155
|
+
return [{}];
|
|
1156
|
+
}
|
|
1157
|
+
if (typeKind === 'anonymousStructure' && properties?.length) {
|
|
1158
|
+
return [{}];
|
|
1159
|
+
}
|
|
1160
|
+
return null;
|
|
1161
|
+
}
|
|
1162
|
+
return null;
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* 使用新的 concept 在当前节点生成新的数据
|
|
1166
|
+
*/
|
|
1167
|
+
changeConceptNode(concept) {
|
|
1168
|
+
return new Proxy(this, {
|
|
1169
|
+
get(target, p, receiver) {
|
|
1170
|
+
if (p === 'concept') {
|
|
1171
|
+
return concept;
|
|
1172
|
+
}
|
|
1173
|
+
return target[p];
|
|
1174
|
+
},
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
collectNodes(input) {
|
|
1178
|
+
const pre = typeof input === 'undefined'
|
|
1179
|
+
? (node) => node && typeof node.concept === 'string'
|
|
1180
|
+
: typeof input === 'string'
|
|
1181
|
+
? (node) => node?.concept === input
|
|
1182
|
+
: input;
|
|
1183
|
+
const nodes = [];
|
|
1184
|
+
const self = this;
|
|
1185
|
+
if (pre(self)) {
|
|
1186
|
+
nodes.push(self);
|
|
1187
|
+
}
|
|
1188
|
+
this.traverseChildren((current) => {
|
|
1189
|
+
if (pre(current)) {
|
|
1190
|
+
nodes.push(current);
|
|
1191
|
+
}
|
|
1192
|
+
});
|
|
1193
|
+
return nodes;
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1196
|
+
__decorate([
|
|
1197
|
+
(0, decorators_1.excludedInJSON)()
|
|
1198
|
+
], BaseNode.prototype, "_mutable", void 0);
|
|
1199
|
+
__decorate([
|
|
1200
|
+
(0, decorators_1.excludedInJSON)()
|
|
1201
|
+
], BaseNode.prototype, "_concept", void 0);
|
|
1202
|
+
__decorate([
|
|
1203
|
+
(0, decorators_1.property)()
|
|
1204
|
+
], BaseNode.prototype, "concept", null);
|
|
1205
|
+
__decorate([
|
|
1206
|
+
(0, decorators_1.property)()
|
|
1207
|
+
], BaseNode.prototype, "changedTime", void 0);
|
|
1208
|
+
__decorate([
|
|
1209
|
+
(0, decorators_1.property)()
|
|
1210
|
+
], BaseNode.prototype, "branchName", void 0);
|
|
1211
|
+
__decorate([
|
|
1212
|
+
(0, decorators_1.property)()
|
|
1213
|
+
], BaseNode.prototype, "workingCopy", void 0);
|
|
1214
|
+
__decorate([
|
|
1215
|
+
(0, decorators_1.property)()
|
|
1216
|
+
], BaseNode.prototype, "branch", void 0);
|
|
1217
|
+
__decorate([
|
|
1218
|
+
(0, decorators_1.property)()
|
|
1219
|
+
], BaseNode.prototype, "breakpoint", void 0);
|
|
1220
|
+
__decorate([
|
|
1221
|
+
(0, decorators_1.circular)()
|
|
1222
|
+
], BaseNode.prototype, "parentNode", void 0);
|
|
1223
|
+
__decorate([
|
|
1224
|
+
(0, decorators_1.excludedInJSON)()
|
|
1225
|
+
], BaseNode.prototype, "editable", void 0);
|
|
1226
|
+
__decorate([
|
|
1227
|
+
(0, decorators_1.excludedInJSON)()
|
|
1228
|
+
], BaseNode.prototype, "removable", void 0);
|
|
1229
|
+
__decorate([
|
|
1230
|
+
(0, decorators_1.excludedInJSON)()
|
|
1231
|
+
], BaseNode.prototype, "editing", void 0);
|
|
1232
|
+
__decorate([
|
|
1233
|
+
(0, decorators_1.excludedInJSON)()
|
|
1234
|
+
], BaseNode.prototype, "loading", void 0);
|
|
1235
|
+
__decorate([
|
|
1236
|
+
(0, decorators_1.excludedInJSON)()
|
|
1237
|
+
], BaseNode.prototype, "expanded", void 0);
|
|
1238
|
+
__decorate([
|
|
1239
|
+
(0, decorators_1.excludedInJSON)()
|
|
1240
|
+
], BaseNode.prototype, "hidden", void 0);
|
|
1241
|
+
__decorate([
|
|
1242
|
+
(0, decorators_1.excludedInJSON)()
|
|
1243
|
+
], BaseNode.prototype, "pageTreeNodeHidden", void 0);
|
|
1244
|
+
__decorate([
|
|
1245
|
+
(0, decorators_1.excludedInJSON)()
|
|
1246
|
+
], BaseNode.prototype, "logicTreeNodeHidden", void 0);
|
|
1247
|
+
__decorate([
|
|
1248
|
+
(0, decorators_1.excludedInJSON)()
|
|
1249
|
+
], BaseNode.prototype, "dataTreeNodeHidden", void 0);
|
|
1250
|
+
__decorate([
|
|
1251
|
+
(0, decorators_1.excludedInJSON)()
|
|
1252
|
+
], BaseNode.prototype, "processTreeNodeHidden", void 0);
|
|
1253
|
+
__decorate([
|
|
1254
|
+
(0, decorators_1.excludedInJSON)()
|
|
1255
|
+
], BaseNode.prototype, "logicTreeNodeExpanded", void 0);
|
|
1256
|
+
__decorate([
|
|
1257
|
+
(0, decorators_1.excludedInJSON)()
|
|
1258
|
+
], BaseNode.prototype, "sourceMap", void 0);
|
|
1259
|
+
__decorate([
|
|
1260
|
+
(0, decorators_1.excludedInJSON)()
|
|
1261
|
+
], BaseNode.prototype, "isLeaf", void 0);
|
|
1262
|
+
__decorate([
|
|
1263
|
+
(0, decorators_1.excludedInJSON)()
|
|
1264
|
+
], BaseNode.prototype, "storageJSON", void 0);
|
|
1265
|
+
__decorate([
|
|
1266
|
+
(0, decorators_1.property)()
|
|
1267
|
+
], BaseNode.prototype, "name", void 0);
|
|
1268
|
+
__decorate([
|
|
1269
|
+
(0, decorators_1.excludedInJSON)()
|
|
1270
|
+
], BaseNode.prototype, "__TypeAnnotation", void 0);
|
|
1271
|
+
__decorate([
|
|
1272
|
+
(0, decorators_1.excludedInJSON)()
|
|
1273
|
+
], BaseNode.prototype, "__isCorrectTypeAnnotation", void 0);
|
|
1274
|
+
__decorate([
|
|
1275
|
+
(0, decorators_1.action)('查找引用')
|
|
1276
|
+
], BaseNode.prototype, "findUsage", null);
|
|
1277
|
+
__decorate([
|
|
1278
|
+
(0, decorators_1.action)('通过当前节点,查找被引用的节点')
|
|
1279
|
+
], BaseNode.prototype, "nodeFindRefNodes", null);
|
|
1280
|
+
__decorate([
|
|
1281
|
+
(0, decorators_1.action)('重命名')
|
|
1282
|
+
], BaseNode.prototype, "changeName", null);
|
|
1283
|
+
__decorate([
|
|
1284
|
+
(0, decorators_1.action)('准备删除')
|
|
1285
|
+
], BaseNode.prototype, "prepareDelete", null);
|
|
1286
|
+
__decorate([
|
|
1287
|
+
(0, decorators_1.action)('添加参数准备')
|
|
1288
|
+
], BaseNode.prototype, "addParamsPrepare", null);
|
|
1289
|
+
__decorate([
|
|
1290
|
+
(0, decorators_1.action)('获取当前节点类型')
|
|
1291
|
+
], BaseNode.prototype, "getCurrentTypeAnnotation", null);
|
|
1292
|
+
__decorate([
|
|
1293
|
+
(0, decorators_1.action)('获取当前节点的下一级内容')
|
|
1294
|
+
], BaseNode.prototype, "getSelectRef", null);
|
|
1295
|
+
BaseNode = BaseNode_1 = __decorate([
|
|
1296
|
+
sentry_1.sentryMonitorNaslNode
|
|
1297
|
+
], BaseNode);
|
|
1298
|
+
exports.BaseNode = BaseNode;
|
|
1299
|
+
exports.default = BaseNode;
|
|
1300
|
+
//# sourceMappingURL=BaseNode.js.map
|