@lcap/nasl 3.6.0-alpha.7 → 3.6.0-alpha.8
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 +26 -0
- package/out/automate/engine/operators.js +364 -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 +116 -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 +440 -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 +11502 -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 +305 -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 +18 -0
- package/out/breakpoint/generator/BreakpointNode.js +293 -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 +37 -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 +108 -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 +217 -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 +377 -0
- package/out/common/BaseNode.js +1432 -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 +112 -0
- package/out/common/ComponentAPI.js +3 -0
- package/out/common/ComponentAPI.js.map +1 -0
- package/out/common/EventEmitter.d.ts +61 -0
- package/out/common/EventEmitter.js +71 -0
- package/out/common/EventEmitter.js.map +1 -0
- package/out/common/Messager.d.ts +91 -0
- package/out/common/Messager.js +205 -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 +4 -0
- package/out/common/index.js +21 -0
- package/out/common/index.js.map +1 -0
- 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 +28 -0
- package/out/concepts/Abort__.js +80 -0
- package/out/concepts/Abort__.js.map +1 -0
- package/out/concepts/AbstractInterface__.d.ts +22 -0
- package/out/concepts/AbstractInterface__.js +56 -0
- package/out/concepts/AbstractInterface__.js.map +1 -0
- package/out/concepts/Anchor__.d.ts +48 -0
- package/out/concepts/Anchor__.js +200 -0
- package/out/concepts/Anchor__.js.map +1 -0
- package/out/concepts/AnonymousFunction__.d.ts +180 -0
- package/out/concepts/AnonymousFunction__.js +555 -0
- package/out/concepts/AnonymousFunction__.js.map +1 -0
- package/out/concepts/App__.d.ts +1818 -0
- package/out/concepts/App__.js +2983 -0
- package/out/concepts/App__.js.map +1 -0
- package/out/concepts/Argument__.d.ts +70 -0
- package/out/concepts/Argument__.js +270 -0
- package/out/concepts/Argument__.js.map +1 -0
- package/out/concepts/Assignee__.d.ts +291 -0
- package/out/concepts/Assignee__.js +461 -0
- package/out/concepts/Assignee__.js.map +1 -0
- package/out/concepts/AssignmentLine__.d.ts +44 -0
- package/out/concepts/AssignmentLine__.js +114 -0
- package/out/concepts/AssignmentLine__.js.map +1 -0
- package/out/concepts/Assignment__.d.ts +77 -0
- package/out/concepts/Assignment__.js +338 -0
- package/out/concepts/Assignment__.js.map +1 -0
- package/out/concepts/Attribute__.d.ts +112 -0
- package/out/concepts/Attribute__.js +208 -0
- package/out/concepts/Attribute__.js.map +1 -0
- package/out/concepts/AuthInterface__.d.ts +38 -0
- package/out/concepts/AuthInterface__.js +74 -0
- package/out/concepts/AuthInterface__.js.map +1 -0
- package/out/concepts/AuthLogicForCallInterface__.d.ts +141 -0
- package/out/concepts/AuthLogicForCallInterface__.js +514 -0
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -0
- package/out/concepts/AuthLogic__.d.ts +69 -0
- package/out/concepts/AuthLogic__.js +210 -0
- package/out/concepts/AuthLogic__.js.map +1 -0
- package/out/concepts/BackendVariable__.d.ts +145 -0
- package/out/concepts/BackendVariable__.js +502 -0
- package/out/concepts/BackendVariable__.js.map +1 -0
- package/out/concepts/Backend__.d.ts +134 -0
- package/out/concepts/Backend__.js +280 -0
- package/out/concepts/Backend__.js.map +1 -0
- package/out/concepts/BatchAssignment__.d.ts +255 -0
- package/out/concepts/BatchAssignment__.js +881 -0
- package/out/concepts/BatchAssignment__.js.map +1 -0
- package/out/concepts/BinaryExpression__.d.ts +76 -0
- package/out/concepts/BinaryExpression__.js +422 -0
- package/out/concepts/BinaryExpression__.js.map +1 -0
- package/out/concepts/BindAttribute__.d.ts +329 -0
- package/out/concepts/BindAttribute__.js +1130 -0
- package/out/concepts/BindAttribute__.js.map +1 -0
- package/out/concepts/BindDirective__.d.ts +170 -0
- package/out/concepts/BindDirective__.js +573 -0
- package/out/concepts/BindDirective__.js.map +1 -0
- package/out/concepts/BindEvent__.d.ts +254 -0
- package/out/concepts/BindEvent__.js +959 -0
- package/out/concepts/BindEvent__.js.map +1 -0
- package/out/concepts/BindStyle__.d.ts +142 -0
- package/out/concepts/BindStyle__.js +453 -0
- package/out/concepts/BindStyle__.js.map +1 -0
- package/out/concepts/Block__.d.ts +84 -0
- package/out/concepts/Block__.js +215 -0
- package/out/concepts/Block__.js.map +1 -0
- package/out/concepts/BooleanLiteral__.d.ts +38 -0
- package/out/concepts/BooleanLiteral__.js +97 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -0
- package/out/concepts/BusinessComponent__.d.ts +641 -0
- package/out/concepts/BusinessComponent__.js +1944 -0
- package/out/concepts/BusinessComponent__.js.map +1 -0
- package/out/concepts/BusinessLogic__.d.ts +38 -0
- package/out/concepts/BusinessLogic__.js +358 -0
- package/out/concepts/BusinessLogic__.js.map +1 -0
- package/out/concepts/CallAuthInterface__.d.ts +130 -0
- package/out/concepts/CallAuthInterface__.js +438 -0
- package/out/concepts/CallAuthInterface__.js.map +1 -0
- package/out/concepts/CallConnector__.d.ts +49 -0
- package/out/concepts/CallConnector__.js +257 -0
- package/out/concepts/CallConnector__.js.map +1 -0
- package/out/concepts/CallEvent__.d.ts +101 -0
- package/out/concepts/CallEvent__.js +280 -0
- package/out/concepts/CallEvent__.js.map +1 -0
- package/out/concepts/CallFunction__.d.ts +162 -0
- package/out/concepts/CallFunction__.js +600 -0
- package/out/concepts/CallFunction__.js.map +1 -0
- package/out/concepts/CallInterface__.d.ts +136 -0
- package/out/concepts/CallInterface__.js +814 -0
- package/out/concepts/CallInterface__.js.map +1 -0
- package/out/concepts/CallLogic__.d.ts +235 -0
- package/out/concepts/CallLogic__.js +1361 -0
- package/out/concepts/CallLogic__.js.map +1 -0
- package/out/concepts/CallQueryComponent__.d.ts +435 -0
- package/out/concepts/CallQueryComponent__.js +1235 -0
- package/out/concepts/CallQueryComponent__.js.map +1 -0
- package/out/concepts/Comment__.d.ts +35 -0
- package/out/concepts/Comment__.js +94 -0
- package/out/concepts/Comment__.js.map +1 -0
- package/out/concepts/CompletionProperty__.d.ts +107 -0
- package/out/concepts/CompletionProperty__.js +239 -0
- package/out/concepts/CompletionProperty__.js.map +1 -0
- package/out/concepts/ConfigGroup__.d.ts +127 -0
- package/out/concepts/ConfigGroup__.js +258 -0
- package/out/concepts/ConfigGroup__.js.map +1 -0
- package/out/concepts/ConfigPropertyValue__.d.ts +47 -0
- package/out/concepts/ConfigPropertyValue__.js +93 -0
- package/out/concepts/ConfigPropertyValue__.js.map +1 -0
- package/out/concepts/ConfigProperty__.d.ts +153 -0
- package/out/concepts/ConfigProperty__.js +321 -0
- package/out/concepts/ConfigProperty__.js.map +1 -0
- package/out/concepts/Configuration__.d.ts +126 -0
- package/out/concepts/Configuration__.js +236 -0
- package/out/concepts/Configuration__.js.map +1 -0
- package/out/concepts/Connection__.d.ts +165 -0
- package/out/concepts/Connection__.js +330 -0
- package/out/concepts/Connection__.js.map +1 -0
- package/out/concepts/ConnectorTrigger__.d.ts +81 -0
- package/out/concepts/ConnectorTrigger__.js +138 -0
- package/out/concepts/ConnectorTrigger__.js.map +1 -0
- package/out/concepts/Connector__.d.ts +929 -0
- package/out/concepts/Connector__.js +1343 -0
- package/out/concepts/Connector__.js.map +1 -0
- package/out/concepts/Constant__.d.ts +121 -0
- package/out/concepts/Constant__.js +331 -0
- package/out/concepts/Constant__.js.map +1 -0
- package/out/concepts/CountersignPolicy__.d.ts +28 -0
- package/out/concepts/CountersignPolicy__.js +62 -0
- package/out/concepts/CountersignPolicy__.js.map +1 -0
- package/out/concepts/DataSource__.d.ts +168 -0
- package/out/concepts/DataSource__.js +460 -0
- package/out/concepts/DataSource__.js.map +1 -0
- package/out/concepts/DatabaseTypeAnnotation__.d.ts +34 -0
- package/out/concepts/DatabaseTypeAnnotation__.js +65 -0
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
- package/out/concepts/DefaultValue__.d.ts +104 -0
- package/out/concepts/DefaultValue__.js +242 -0
- package/out/concepts/DefaultValue__.js.map +1 -0
- package/out/concepts/Destination__.d.ts +160 -0
- package/out/concepts/Destination__.js +799 -0
- package/out/concepts/Destination__.js.map +1 -0
- package/out/concepts/End__.d.ts +27 -0
- package/out/concepts/End__.js +115 -0
- package/out/concepts/End__.js.map +1 -0
- package/out/concepts/EntityIndex__.d.ts +98 -0
- package/out/concepts/EntityIndex__.js +201 -0
- package/out/concepts/EntityIndex__.js.map +1 -0
- package/out/concepts/EntityProperty__.d.ts +293 -0
- package/out/concepts/EntityProperty__.js +824 -0
- package/out/concepts/EntityProperty__.js.map +1 -0
- package/out/concepts/Entity__.d.ts +339 -0
- package/out/concepts/Entity__.js +764 -0
- package/out/concepts/Entity__.js.map +1 -0
- package/out/concepts/EnumItem__.d.ts +67 -0
- package/out/concepts/EnumItem__.js +131 -0
- package/out/concepts/EnumItem__.js.map +1 -0
- package/out/concepts/Enum__.d.ts +138 -0
- package/out/concepts/Enum__.js +321 -0
- package/out/concepts/Enum__.js.map +1 -0
- package/out/concepts/Event__.d.ts +160 -0
- package/out/concepts/Event__.js +294 -0
- package/out/concepts/Event__.js.map +1 -0
- package/out/concepts/ExternalDestination__.d.ts +78 -0
- package/out/concepts/ExternalDestination__.js +309 -0
- package/out/concepts/ExternalDestination__.js.map +1 -0
- package/out/concepts/ForEachStatement__.d.ts +173 -0
- package/out/concepts/ForEachStatement__.js +497 -0
- package/out/concepts/ForEachStatement__.js.map +1 -0
- package/out/concepts/FrontendLibrary__.d.ts +216 -0
- package/out/concepts/FrontendLibrary__.js +364 -0
- package/out/concepts/FrontendLibrary__.js.map +1 -0
- package/out/concepts/FrontendType__.d.ts +308 -0
- package/out/concepts/FrontendType__.js +606 -0
- package/out/concepts/FrontendType__.js.map +1 -0
- package/out/concepts/FrontendVariable__.d.ts +36 -0
- package/out/concepts/FrontendVariable__.js +77 -0
- package/out/concepts/FrontendVariable__.js.map +1 -0
- package/out/concepts/Frontend__.d.ts +420 -0
- package/out/concepts/Frontend__.js +915 -0
- package/out/concepts/Frontend__.js.map +1 -0
- package/out/concepts/Function__.d.ts +420 -0
- package/out/concepts/Function__.js +805 -0
- package/out/concepts/Function__.js.map +1 -0
- package/out/concepts/I18nInfo__.d.ts +46 -0
- package/out/concepts/I18nInfo__.js +90 -0
- package/out/concepts/I18nInfo__.js.map +1 -0
- package/out/concepts/Identifier__.d.ts +59 -0
- package/out/concepts/Identifier__.js +326 -0
- package/out/concepts/Identifier__.js.map +1 -0
- package/out/concepts/IfStatement__.d.ts +161 -0
- package/out/concepts/IfStatement__.js +372 -0
- package/out/concepts/IfStatement__.js.map +1 -0
- package/out/concepts/ImportedInterface__.d.ts +20 -0
- package/out/concepts/ImportedInterface__.js +48 -0
- package/out/concepts/ImportedInterface__.js.map +1 -0
- package/out/concepts/Integration__.d.ts +146 -0
- package/out/concepts/Integration__.js +296 -0
- package/out/concepts/Integration__.js.map +1 -0
- package/out/concepts/InterfaceParam__.d.ts +146 -0
- package/out/concepts/InterfaceParam__.js +342 -0
- package/out/concepts/InterfaceParam__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +328 -0
- package/out/concepts/Interface__.js +892 -0
- package/out/concepts/Interface__.js.map +1 -0
- package/out/concepts/JSBlock__.d.ts +37 -0
- package/out/concepts/JSBlock__.js +104 -0
- package/out/concepts/JSBlock__.js.map +1 -0
- package/out/concepts/JavaLogic__.d.ts +45 -0
- package/out/concepts/JavaLogic__.js +109 -0
- package/out/concepts/JavaLogic__.js.map +1 -0
- package/out/concepts/LogicItem__.d.ts +155 -0
- package/out/concepts/LogicItem__.js +284 -0
- package/out/concepts/LogicItem__.js.map +1 -0
- package/out/concepts/Logic__.d.ts +649 -0
- package/out/concepts/Logic__.js +1939 -0
- package/out/concepts/Logic__.js.map +1 -0
- package/out/concepts/MatchCase__.d.ts +261 -0
- package/out/concepts/MatchCase__.js +706 -0
- package/out/concepts/MatchCase__.js.map +1 -0
- package/out/concepts/Match__.d.ts +127 -0
- package/out/concepts/Match__.js +731 -0
- package/out/concepts/Match__.js.map +1 -0
- package/out/concepts/MemberExpression__.d.ts +80 -0
- package/out/concepts/MemberExpression__.js +529 -0
- package/out/concepts/MemberExpression__.js.map +1 -0
- package/out/concepts/MetadataType__.d.ts +236 -0
- package/out/concepts/MetadataType__.js +464 -0
- package/out/concepts/MetadataType__.js.map +1 -0
- package/out/concepts/MicroApp__.d.ts +54 -0
- package/out/concepts/MicroApp__.js +80 -0
- package/out/concepts/MicroApp__.js.map +1 -0
- package/out/concepts/Module__.d.ts +1171 -0
- package/out/concepts/Module__.js +1747 -0
- package/out/concepts/Module__.js.map +1 -0
- package/out/concepts/MsgTriggerEvent__.d.ts +140 -0
- package/out/concepts/MsgTriggerEvent__.js +236 -0
- package/out/concepts/MsgTriggerEvent__.js.map +1 -0
- package/out/concepts/MsgTriggerLauncher__.d.ts +129 -0
- package/out/concepts/MsgTriggerLauncher__.js +226 -0
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -0
- package/out/concepts/MultiApprovalPolicy__.d.ts +26 -0
- package/out/concepts/MultiApprovalPolicy__.js +59 -0
- package/out/concepts/MultiApprovalPolicy__.js.map +1 -0
- package/out/concepts/Namespace__.d.ts +1086 -0
- package/out/concepts/Namespace__.js +1555 -0
- package/out/concepts/Namespace__.js.map +1 -0
- package/out/concepts/NewComposite__.d.ts +353 -0
- package/out/concepts/NewComposite__.js +1277 -0
- package/out/concepts/NewComposite__.js.map +1 -0
- package/out/concepts/NewList__.d.ts +141 -0
- package/out/concepts/NewList__.js +470 -0
- package/out/concepts/NewList__.js.map +1 -0
- package/out/concepts/NewMap__.d.ts +231 -0
- package/out/concepts/NewMap__.js +604 -0
- package/out/concepts/NewMap__.js.map +1 -0
- package/out/concepts/New__.d.ts +23 -0
- package/out/concepts/New__.js +65 -0
- package/out/concepts/New__.js.map +1 -0
- package/out/concepts/NullLiteral__.d.ts +29 -0
- package/out/concepts/NullLiteral__.js +77 -0
- package/out/concepts/NullLiteral__.js.map +1 -0
- package/out/concepts/NumericLiteral__.d.ts +59 -0
- package/out/concepts/NumericLiteral__.js +177 -0
- package/out/concepts/NumericLiteral__.js.map +1 -0
- package/out/concepts/OqlQueryComponent__.d.ts +76 -0
- package/out/concepts/OqlQueryComponent__.js +351 -0
- package/out/concepts/OqlQueryComponent__.js.map +1 -0
- package/out/concepts/OverriddenLogic__.d.ts +634 -0
- package/out/concepts/OverriddenLogic__.js +1661 -0
- package/out/concepts/OverriddenLogic__.js.map +1 -0
- package/out/concepts/Paginate__.d.ts +97 -0
- package/out/concepts/Paginate__.js +267 -0
- package/out/concepts/Paginate__.js.map +1 -0
- package/out/concepts/ParamWithGroup__.d.ts +39 -0
- package/out/concepts/ParamWithGroup__.js +85 -0
- package/out/concepts/ParamWithGroup__.js.map +1 -0
- package/out/concepts/Param__.d.ts +182 -0
- package/out/concepts/Param__.js +524 -0
- package/out/concepts/Param__.js.map +1 -0
- package/out/concepts/Point__.d.ts +34 -0
- package/out/concepts/Point__.js +65 -0
- package/out/concepts/Point__.js.map +1 -0
- package/out/concepts/ProcessComponent__.d.ts +222 -0
- package/out/concepts/ProcessComponent__.js +340 -0
- package/out/concepts/ProcessComponent__.js.map +1 -0
- package/out/concepts/ProcessElement__.d.ts +665 -0
- package/out/concepts/ProcessElement__.js +1354 -0
- package/out/concepts/ProcessElement__.js.map +1 -0
- package/out/concepts/ProcessOutcome__.d.ts +34 -0
- package/out/concepts/ProcessOutcome__.js +97 -0
- package/out/concepts/ProcessOutcome__.js.map +1 -0
- package/out/concepts/ProcessOutcomes__.d.ts +34 -0
- package/out/concepts/ProcessOutcomes__.js +104 -0
- package/out/concepts/ProcessOutcomes__.js.map +1 -0
- package/out/concepts/Process__.d.ts +615 -0
- package/out/concepts/Process__.js +1117 -0
- package/out/concepts/Process__.js.map +1 -0
- package/out/concepts/QueryAggregateExpression__.d.ts +54 -0
- package/out/concepts/QueryAggregateExpression__.js +140 -0
- package/out/concepts/QueryAggregateExpression__.js.map +1 -0
- package/out/concepts/QueryFieldExpression__.d.ts +56 -0
- package/out/concepts/QueryFieldExpression__.js +142 -0
- package/out/concepts/QueryFieldExpression__.js.map +1 -0
- package/out/concepts/QueryFromExpression__.d.ts +101 -0
- package/out/concepts/QueryFromExpression__.js +227 -0
- package/out/concepts/QueryFromExpression__.js.map +1 -0
- package/out/concepts/QueryGroupByExpression__.d.ts +50 -0
- package/out/concepts/QueryGroupByExpression__.js +142 -0
- package/out/concepts/QueryGroupByExpression__.js.map +1 -0
- package/out/concepts/QueryJoinExpression__.d.ts +188 -0
- package/out/concepts/QueryJoinExpression__.js +327 -0
- package/out/concepts/QueryJoinExpression__.js.map +1 -0
- package/out/concepts/QueryLimitExpression__.d.ts +60 -0
- package/out/concepts/QueryLimitExpression__.js +159 -0
- package/out/concepts/QueryLimitExpression__.js.map +1 -0
- package/out/concepts/QueryOrderByExpression__.d.ts +71 -0
- package/out/concepts/QueryOrderByExpression__.js +172 -0
- package/out/concepts/QueryOrderByExpression__.js.map +1 -0
- package/out/concepts/QuerySelectExpression__.d.ts +206 -0
- package/out/concepts/QuerySelectExpression__.js +308 -0
- package/out/concepts/QuerySelectExpression__.js.map +1 -0
- package/out/concepts/Rect__.d.ts +42 -0
- package/out/concepts/Rect__.js +71 -0
- package/out/concepts/Rect__.js.map +1 -0
- package/out/concepts/Return__.d.ts +147 -0
- package/out/concepts/Return__.js +429 -0
- package/out/concepts/Return__.js.map +1 -0
- package/out/concepts/Role__.d.ts +62 -0
- package/out/concepts/Role__.js +151 -0
- package/out/concepts/Role__.js.map +1 -0
- package/out/concepts/SelectMembers__.d.ts +145 -0
- package/out/concepts/SelectMembers__.js +300 -0
- package/out/concepts/SelectMembers__.js.map +1 -0
- package/out/concepts/SequentialPolicy__.d.ts +20 -0
- package/out/concepts/SequentialPolicy__.js +48 -0
- package/out/concepts/SequentialPolicy__.js.map +1 -0
- package/out/concepts/Slot__.d.ts +77 -0
- package/out/concepts/Slot__.js +141 -0
- package/out/concepts/Slot__.js.map +1 -0
- package/out/concepts/SqlQueryComponent__.d.ts +74 -0
- package/out/concepts/SqlQueryComponent__.js +269 -0
- package/out/concepts/SqlQueryComponent__.js.map +1 -0
- package/out/concepts/Start__.d.ts +27 -0
- package/out/concepts/Start__.js +69 -0
- package/out/concepts/Start__.js.map +1 -0
- package/out/concepts/StaticString__.d.ts +49 -0
- package/out/concepts/StaticString__.js +91 -0
- package/out/concepts/StaticString__.js.map +1 -0
- package/out/concepts/StringInterpolation__.d.ts +118 -0
- package/out/concepts/StringInterpolation__.js +284 -0
- package/out/concepts/StringInterpolation__.js.map +1 -0
- package/out/concepts/StringLiteral__.d.ts +45 -0
- package/out/concepts/StringLiteral__.js +159 -0
- package/out/concepts/StringLiteral__.js.map +1 -0
- package/out/concepts/StructureProperty__.d.ts +154 -0
- package/out/concepts/StructureProperty__.js +338 -0
- package/out/concepts/StructureProperty__.js.map +1 -0
- package/out/concepts/Structure__.d.ts +250 -0
- package/out/concepts/Structure__.js +508 -0
- package/out/concepts/Structure__.js.map +1 -0
- package/out/concepts/SwitchCase__.d.ts +97 -0
- package/out/concepts/SwitchCase__.js +305 -0
- package/out/concepts/SwitchCase__.js.map +1 -0
- package/out/concepts/SwitchStatement__.d.ts +87 -0
- package/out/concepts/SwitchStatement__.js +234 -0
- package/out/concepts/SwitchStatement__.js.map +1 -0
- package/out/concepts/Theme__.d.ts +40 -0
- package/out/concepts/Theme__.js +84 -0
- package/out/concepts/Theme__.js.map +1 -0
- package/out/concepts/Transactional__.d.ts +90 -0
- package/out/concepts/Transactional__.js +149 -0
- package/out/concepts/Transactional__.js.map +1 -0
- package/out/concepts/TriggerEvent__.d.ts +54 -0
- package/out/concepts/TriggerEvent__.js +137 -0
- package/out/concepts/TriggerEvent__.js.map +1 -0
- package/out/concepts/TriggerLauncher__.d.ts +81 -0
- package/out/concepts/TriggerLauncher__.js +197 -0
- package/out/concepts/TriggerLauncher__.js.map +1 -0
- package/out/concepts/TypeAnnotation__.d.ts +305 -0
- package/out/concepts/TypeAnnotation__.js +1095 -0
- package/out/concepts/TypeAnnotation__.js.map +1 -0
- package/out/concepts/TypeParam__.d.ts +28 -0
- package/out/concepts/TypeParam__.js +71 -0
- package/out/concepts/TypeParam__.js.map +1 -0
- package/out/concepts/UnaryExpression__.d.ts +52 -0
- package/out/concepts/UnaryExpression__.js +191 -0
- package/out/concepts/UnaryExpression__.js.map +1 -0
- package/out/concepts/Unparsed__.d.ts +36 -0
- package/out/concepts/Unparsed__.js +91 -0
- package/out/concepts/Unparsed__.js.map +1 -0
- package/out/concepts/UseComponent__.d.ts +34 -0
- package/out/concepts/UseComponent__.js +65 -0
- package/out/concepts/UseComponent__.js.map +1 -0
- package/out/concepts/ValidationRule__.d.ts +152 -0
- package/out/concepts/ValidationRule__.js +535 -0
- package/out/concepts/ValidationRule__.js.map +1 -0
- package/out/concepts/Variable__.d.ts +164 -0
- package/out/concepts/Variable__.js +505 -0
- package/out/concepts/Variable__.js.map +1 -0
- package/out/concepts/ViewBlock__.d.ts +38 -0
- package/out/concepts/ViewBlock__.js +68 -0
- package/out/concepts/ViewBlock__.js.map +1 -0
- package/out/concepts/ViewComponent__.d.ts +568 -0
- package/out/concepts/ViewComponent__.js +809 -0
- package/out/concepts/ViewComponent__.js.map +1 -0
- package/out/concepts/ViewElement__.d.ts +656 -0
- package/out/concepts/ViewElement__.js +2727 -0
- package/out/concepts/ViewElement__.js.map +1 -0
- package/out/concepts/View__.d.ts +747 -0
- package/out/concepts/View__.js +2633 -0
- package/out/concepts/View__.js.map +1 -0
- package/out/concepts/WhileStatement__.d.ts +100 -0
- package/out/concepts/WhileStatement__.js +269 -0
- package/out/concepts/WhileStatement__.js.map +1 -0
- package/out/concepts/basics/constants.d.ts +1 -0
- package/out/concepts/basics/constants.js +6 -0
- package/out/concepts/basics/constants.js.map +1 -0
- package/out/concepts/basics/stdlib/index.d.ts +16 -0
- package/out/concepts/basics/stdlib/index.js +90 -0
- package/out/concepts/basics/stdlib/index.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.auth.d.ts +9 -0
- package/out/concepts/basics/stdlib/nasl.auth.js +206 -0
- package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.browser.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.browser.js +158 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.collection.d.ts +9 -0
- package/out/concepts/basics/stdlib/nasl.collection.js +57 -0
- package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.configuration.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js +65 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.core.d.ts +7 -0
- package/out/concepts/basics/stdlib/nasl.core.js +47 -0
- package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.event.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.event.js +34 -0
- package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.http.d.ts +9 -0
- package/out/concepts/basics/stdlib/nasl.http.js +174 -0
- package/out/concepts/basics/stdlib/nasl.http.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.interface.d.ts +9 -0
- package/out/concepts/basics/stdlib/nasl.interface.js +49 -0
- package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.io.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.io.js +61 -0
- package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.logging.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.logging.js +65 -0
- package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.process.d.ts +9 -0
- package/out/concepts/basics/stdlib/nasl.process.js +643 -0
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.ui.d.ts +9 -0
- package/out/concepts/basics/stdlib/nasl.ui.js +1038 -0
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.util.d.ts +6 -0
- package/out/concepts/basics/stdlib/nasl.util.js +2285 -0
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
- package/out/concepts/basics/stdlib/nasl.validation.d.ts +5 -0
- package/out/concepts/basics/stdlib/nasl.validation.js +574 -0
- package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +4 -0
- package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +47 -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 +7 -0
- package/out/concepts/index.js +41 -0
- package/out/concepts/index.js.map +1 -0
- package/out/concepts/index__.d.ts +138 -0
- package/out/concepts/index__.js +155 -0
- package/out/concepts/index__.js.map +1 -0
- package/out/concepts/types__.d.ts +0 -0
- package/out/concepts/types__.js +1 -0
- package/out/concepts/types__.js.map +1 -0
- package/out/concepts/utils/asserts.d.ts +6982 -0
- package/out/concepts/utils/asserts.js +9276 -0
- package/out/concepts/utils/asserts.js.map +1 -0
- package/out/concepts/utils/quick-info.d.ts +13 -0
- package/out/concepts/utils/quick-info.js +51 -0
- package/out/concepts/utils/quick-info.js.map +1 -0
- package/out/concepts/utils/types.d.ts +450 -0
- package/out/concepts/utils/types.js +3 -0
- package/out/concepts/utils/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 +67 -0
- package/out/decorators/index.js +213 -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 +1248 -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 +37 -0
- package/out/generator/genBundleFiles.js +678 -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 +365 -0
- package/out/generator/genMetaData.js.map +1 -0
- package/out/generator/genReleaseBody.d.ts +72 -0
- package/out/generator/genReleaseBody.js +333 -0
- package/out/generator/genReleaseBody.js.map +1 -0
- package/out/generator/icestark.d.ts +2 -0
- package/out/generator/icestark.js +50 -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 +14 -0
- package/out/generator/permission.js +296 -0
- package/out/generator/permission.js.map +1 -0
- package/out/generator/qiankun.d.ts +2 -0
- package/out/generator/qiankun.js +54 -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 +64 -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 +87 -0
- package/out/natural/genNaturalTS.js.map +1 -0
- package/out/natural/index.d.ts +4 -0
- package/out/natural/index.js +21 -0
- package/out/natural/index.js.map +1 -0
- package/out/natural/naslStdlibMap.d.ts +1 -0
- package/out/natural/naslStdlibMap.js +35 -0
- package/out/natural/naslStdlibMap.js.map +1 -0
- package/out/natural/prompt/analyzeClaims.d.ts +1 -0
- package/out/natural/prompt/analyzeClaims.js +21 -0
- package/out/natural/prompt/analyzeClaims.js.map +1 -0
- package/out/natural/prompt/executeClaims.d.ts +1 -0
- package/out/natural/prompt/executeClaims.js +73 -0
- package/out/natural/prompt/executeClaims.js.map +1 -0
- package/out/natural/transformTSCode.d.ts +7 -0
- package/out/natural/transformTSCode.js +931 -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 +17 -0
- package/out/server/createUiTs.js +268 -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 +605 -0
- package/out/server/extendBaseNode.js.map +1 -0
- package/out/server/formatTsUtils.d.ts +36 -0
- package/out/server/formatTsUtils.js +854 -0
- package/out/server/formatTsUtils.js.map +1 -0
- package/out/server/getConnector.d.ts +14 -0
- package/out/server/getConnector.js +101 -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 +5 -0
- package/out/server/getLogics.js +454 -0
- package/out/server/getLogics.js.map +1 -0
- package/out/server/getMemberIdentifier.d.ts +17 -0
- package/out/server/getMemberIdentifier.js +594 -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 +647 -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 +43 -0
- package/out/server/index.js.map +1 -0
- package/out/server/naslServer.d.ts +375 -0
- package/out/server/naslServer.js +4735 -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 +847 -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 +71 -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 +105 -0
- package/out/service/storage/init.js +1232 -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 +148 -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 +372 -0
- package/out/templator/genCreateBlock.js.map +1 -0
- package/out/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js +527 -0
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -0
- package/out/templator/genCurdMultipleKeyBlock.d.ts +61 -0
- package/out/templator/genCurdMultipleKeyBlock.js +1378 -0
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -0
- package/out/templator/genEditTableBlock.d.ts +51 -0
- package/out/templator/genEditTableBlock.js +325 -0
- package/out/templator/genEditTableBlock.js.map +1 -0
- package/out/templator/genEnumSelectBlock.d.ts +10 -0
- package/out/templator/genEnumSelectBlock.js +53 -0
- package/out/templator/genEnumSelectBlock.js.map +1 -0
- package/out/templator/genGetBlock.d.ts +6 -0
- package/out/templator/genGetBlock.js +139 -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 +344 -0
- package/out/templator/genQueryComponent.js.map +1 -0
- package/out/templator/genSelectBlock.d.ts +45 -0
- package/out/templator/genSelectBlock.js +415 -0
- package/out/templator/genSelectBlock.js.map +1 -0
- package/out/templator/genTableBlock.d.ts +55 -0
- package/out/templator/genTableBlock.js +421 -0
- package/out/templator/genTableBlock.js.map +1 -0
- package/out/templator/genUpdateBlock.d.ts +6 -0
- package/out/templator/genUpdateBlock.js +414 -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 +683 -0
- package/out/templator/utils.js +472 -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 +49 -0
- package/out/translator/types.js +3 -0
- package/out/translator/types.js.map +1 -0
- package/out/translator/utils.d.ts +44 -0
- package/out/translator/utils.js +241 -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/i18nInfo.d.ts +5 -0
- package/out/utils/i18nInfo.js +36 -0
- package/out/utils/i18nInfo.js.map +1 -0
- package/out/utils/index.d.ts +61 -0
- package/out/utils/index.js +386 -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 +64 -0
- package/out/utils/string.js +153 -0
- package/out/utils/string.js.map +1 -0
- 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 +294 -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 +50 -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 +52 -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/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 +13 -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/sandbox/stdlib/nasl.oql.ts +2 -2
- package/src/concepts/NewComposite__.ts +2 -2
- package/src/server/translator.ts +1 -1
- package/src/templator/genTableBlock.ts +5 -1
- package/test/concepts/new-composite/__snapshots__/getQuickInfoOffset.spec.ts.snap +7 -7
- package/test/concepts/new-composite/__snapshots__/toEmbeddedTS.spec.ts.snap +11 -7
- package/test/concepts/view-element/__snapshots__/toEmbeddedTS.spec.ts.snap +139 -189
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +9 -1
|
@@ -0,0 +1,1232 @@
|
|
|
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 __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.loadAppSync = exports.mountDatabaseTypes = exports.loadApp = exports.handleApp = exports.taskQueue = exports.operationRecordPlayback = exports.operationRecordQuery = exports.doOperationRecord = exports.operationRecordInfoMap = exports.databaseTypes = exports.breakpoint = exports.batchInstruct = exports.batchAction = exports.batchQuery = void 0;
|
|
30
|
+
const lodash_1 = require("lodash");
|
|
31
|
+
const concepts_1 = require("../../concepts");
|
|
32
|
+
const breakpoint_1 = require("../../breakpoint");
|
|
33
|
+
const decorators_1 = require("../../decorators");
|
|
34
|
+
const config_1 = require("../../config");
|
|
35
|
+
const service_1 = __importDefault(require("./service"));
|
|
36
|
+
const uuid_1 = require("uuid");
|
|
37
|
+
const stepRecorder_1 = __importDefault(require("../../manager/stepRecorder"));
|
|
38
|
+
const jsoner = __importStar(require("./jsoner"));
|
|
39
|
+
/// #if !process.env.NODE_ENV || process.env.BUILD_TARGET === 'node'
|
|
40
|
+
const fs = __importStar(require("fs-extra"));
|
|
41
|
+
/// #endif
|
|
42
|
+
exports.batchQuery = service_1.default.batchQuery;
|
|
43
|
+
exports.batchAction = service_1.default.batchAction;
|
|
44
|
+
exports.batchInstruct = service_1.default.batchInstruct;
|
|
45
|
+
exports.breakpoint = service_1.default.breakpoint;
|
|
46
|
+
let tabTimestamp;
|
|
47
|
+
exports.databaseTypes = service_1.default.databaseTypes;
|
|
48
|
+
exports.operationRecordInfoMap = new Map();
|
|
49
|
+
// 操作栈记录
|
|
50
|
+
function doOperationRecord(operation) {
|
|
51
|
+
const request = indexedDB.open('naslData', 1);
|
|
52
|
+
request.onupgradeneeded = (event) => {
|
|
53
|
+
const db = event.target.result;
|
|
54
|
+
const objectStore = db.createObjectStore('operationRecord', { autoIncrement: true });
|
|
55
|
+
objectStore.createIndex('appId', 'appId');
|
|
56
|
+
objectStore.createIndex('timestamp', 'timestamp');
|
|
57
|
+
};
|
|
58
|
+
request.onsuccess = (event) => {
|
|
59
|
+
try {
|
|
60
|
+
const db = event.target.result;
|
|
61
|
+
const transaction = db.transaction('operationRecord', 'readwrite');
|
|
62
|
+
const objectStore = transaction.objectStore('operationRecord');
|
|
63
|
+
operation.appId = exports.operationRecordInfoMap.get('appId');
|
|
64
|
+
operation.branchId = exports.operationRecordInfoMap.get('branchId');
|
|
65
|
+
operation.accountId = exports.operationRecordInfoMap.get('accountId');
|
|
66
|
+
operation.userId = exports.operationRecordInfoMap.get('userId');
|
|
67
|
+
operation.phone = exports.operationRecordInfoMap.get('phone');
|
|
68
|
+
// 将时间戳添加到记录中
|
|
69
|
+
operation.timestamp = Date.now();
|
|
70
|
+
// 这份数据不存在向上的引用,因此用cloneDeep没有关系
|
|
71
|
+
objectStore.put((0, lodash_1.cloneDeep)(operation));
|
|
72
|
+
transaction.oncomplete = () => {
|
|
73
|
+
db.close();
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
catch (err) {
|
|
77
|
+
console.log(err);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
request.onerror = function (event) {
|
|
81
|
+
console.log('Failed to open database');
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
exports.doOperationRecord = doOperationRecord;
|
|
85
|
+
// 删除失效数据
|
|
86
|
+
async function deleteExpiredRecords() {
|
|
87
|
+
return new Promise((resolve, reject) => {
|
|
88
|
+
const request = indexedDB.open('naslData', 1);
|
|
89
|
+
request.onupgradeneeded = (event) => {
|
|
90
|
+
const db = event.target.result;
|
|
91
|
+
const objectStore = db.createObjectStore('operationRecord', { autoIncrement: true });
|
|
92
|
+
objectStore.createIndex('appId', 'appId');
|
|
93
|
+
objectStore.createIndex('timestamp', 'timestamp');
|
|
94
|
+
};
|
|
95
|
+
request.onsuccess = (event) => {
|
|
96
|
+
const db = event.target.result;
|
|
97
|
+
const transaction = db.transaction('operationRecord', 'readwrite');
|
|
98
|
+
const objectStore = transaction.objectStore('operationRecord');
|
|
99
|
+
const index = objectStore.index('timestamp');
|
|
100
|
+
// 设置有效期,默认7天
|
|
101
|
+
const localStorageExpiresAt = window.localStorage.getItem('expiresAt');
|
|
102
|
+
const expiresAt = Date.now() - (localStorageExpiresAt ? +localStorageExpiresAt : 7 * 24 * 60 * 60 * 1000);
|
|
103
|
+
const range = IDBKeyRange.upperBound(expiresAt);
|
|
104
|
+
const expiredRecordsRequest = index.openCursor(range);
|
|
105
|
+
expiredRecordsRequest.onsuccess = (event) => {
|
|
106
|
+
const cursor = event.target.result;
|
|
107
|
+
if (cursor) {
|
|
108
|
+
objectStore.delete(cursor.primaryKey);
|
|
109
|
+
cursor.continue();
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
resolve(void 0);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
transaction.oncomplete = () => {
|
|
116
|
+
db.close();
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
request.onerror = (event) => {
|
|
120
|
+
reject('Failed to open database');
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
// 操作栈查询
|
|
125
|
+
function operationRecordQuery(app) {
|
|
126
|
+
return new Promise((resolve, reject) => {
|
|
127
|
+
const appId = app?.id;
|
|
128
|
+
const branchId = app?.__branchId;
|
|
129
|
+
const request = indexedDB.open('naslData', 1);
|
|
130
|
+
request.onsuccess = (event) => {
|
|
131
|
+
const db = event.target.result;
|
|
132
|
+
const transaction = db.transaction('operationRecord', 'readonly');
|
|
133
|
+
const objectStore = transaction.objectStore('operationRecord');
|
|
134
|
+
const index = objectStore.index('appId'); // 查询 'appId' 索引
|
|
135
|
+
const range = IDBKeyRange.only(appId);
|
|
136
|
+
const result = [];
|
|
137
|
+
const request = index.openCursor(range);
|
|
138
|
+
request.onsuccess = (event) => {
|
|
139
|
+
const cursor = event.target.result;
|
|
140
|
+
if (cursor) {
|
|
141
|
+
const record = cursor.value;
|
|
142
|
+
const branchId = exports.operationRecordInfoMap.get('branchId');
|
|
143
|
+
if (record.branchId === branchId) {
|
|
144
|
+
result.push(record);
|
|
145
|
+
}
|
|
146
|
+
cursor.continue();
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
console.log('操作记录栈:', result);
|
|
150
|
+
resolve(result);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
transaction.oncomplete = () => {
|
|
154
|
+
db.close();
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
request.onerror = (event) => {
|
|
158
|
+
reject('Failed to open database');
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
exports.operationRecordQuery = operationRecordQuery;
|
|
163
|
+
// 获取父对象
|
|
164
|
+
function getParentInfo(appJson, path) {
|
|
165
|
+
const pathArr = [];
|
|
166
|
+
(path?.split('.') || []).forEach((pathItem) => {
|
|
167
|
+
const arrayPropertyKey = pathItem.split('[')[0];
|
|
168
|
+
const matchArr = pathItem.match(/\[(.+?)\]/);
|
|
169
|
+
if (matchArr) {
|
|
170
|
+
pathArr.push(arrayPropertyKey, matchArr[0]);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
pathArr.push(pathItem);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
pathArr.pop();
|
|
177
|
+
let parentPath = '';
|
|
178
|
+
pathArr.forEach((pathItem, index) => {
|
|
179
|
+
const matchArr = pathItem.match(/\[(.+?)\]/);
|
|
180
|
+
if (matchArr || index === 0) {
|
|
181
|
+
parentPath += pathItem;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
parentPath += `.${pathItem}`;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
const parentNode = jsoner.queryNodeByPath(appJson, parentPath);
|
|
188
|
+
return {
|
|
189
|
+
parentPath,
|
|
190
|
+
parentNode,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
// 操作记录回放
|
|
194
|
+
async function operationRecordPlayback(app, operationRecordAction) {
|
|
195
|
+
const operationRecord = await operationRecordQuery(app);
|
|
196
|
+
let operationRecordIndex = exports.operationRecordInfoMap.get('operationRecordIndex');
|
|
197
|
+
if ([null, undefined].includes(operationRecordIndex)) {
|
|
198
|
+
operationRecordIndex = operationRecord?.length;
|
|
199
|
+
}
|
|
200
|
+
const appJson = app.toJSON();
|
|
201
|
+
if (operationRecordAction === 'undo') {
|
|
202
|
+
if (operationRecordIndex > 0) {
|
|
203
|
+
const currentRecordItem = operationRecord?.[operationRecordIndex];
|
|
204
|
+
const { type, action: recordItemAction } = currentRecordItem || {};
|
|
205
|
+
// 多人协作
|
|
206
|
+
if (type === 'cooperation' && recordItemAction === 'confirmPull') {
|
|
207
|
+
console.log(`当前所处栈位置:${operationRecordIndex},已经进行了多人协作“合并”操作,无法继续对操作栈进行回放!`);
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
operationRecordIndex--;
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
console.log(`当前所处栈位置:${operationRecordIndex},无法继续回放`);
|
|
214
|
+
console.log('当前appJSON:', appJson);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
if (operationRecordIndex < operationRecord?.length) {
|
|
220
|
+
operationRecordIndex++;
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
console.log(`当前所处栈位置:${operationRecordIndex},无法继续前进`);
|
|
224
|
+
console.log('当前appJSON:', appJson);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
exports.operationRecordInfoMap.set('operationRecordIndex', operationRecordIndex);
|
|
229
|
+
const currentIndex = operationRecordIndex;
|
|
230
|
+
([...operationRecord].splice(currentIndex, operationRecord?.length) || []).reverse()?.forEach((recordItem) => {
|
|
231
|
+
const { actionItem } = recordItem || {};
|
|
232
|
+
const { list } = actionItem || {};
|
|
233
|
+
[...(list || [])].reverse().forEach((actionItem) => {
|
|
234
|
+
const { path, action, object, oldObject, parentKey, index: oldIndex } = actionItem || {};
|
|
235
|
+
const { parentNode } = getParentInfo(appJson, path);
|
|
236
|
+
let newPath = path;
|
|
237
|
+
// 如果涉及到改名操作,需要特殊处理
|
|
238
|
+
if (operationRecordAction === 'undo' && action === 'update' && object?.name) {
|
|
239
|
+
const pathArr = path?.split('.') || [];
|
|
240
|
+
const lastPathItem = pathArr?.pop();
|
|
241
|
+
if (lastPathItem) {
|
|
242
|
+
pathArr.push(lastPathItem.replace(/(name=)[^\]]+/, `$1${object?.name}`));
|
|
243
|
+
}
|
|
244
|
+
newPath = pathArr.join('.');
|
|
245
|
+
}
|
|
246
|
+
const node = jsoner.queryNodeByPath(appJson, newPath);
|
|
247
|
+
switch (action) {
|
|
248
|
+
case 'create':
|
|
249
|
+
if (Array.isArray(parentNode)) {
|
|
250
|
+
const index = parentNode.indexOf(node);
|
|
251
|
+
if (index !== -1) {
|
|
252
|
+
parentNode.splice(index, 1);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
parentNode[parentKey] = null;
|
|
257
|
+
}
|
|
258
|
+
break;
|
|
259
|
+
case 'delete':
|
|
260
|
+
if (Array.isArray(parentNode) && oldIndex !== -1) {
|
|
261
|
+
parentNode.splice(oldIndex, 0, oldObject);
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
parentNode[parentKey] = oldObject;
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
case 'update':
|
|
268
|
+
for (const key in oldObject) {
|
|
269
|
+
if (node) {
|
|
270
|
+
node[key] = oldObject[key] ?? null;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
console.log('当前所处栈位置:', currentIndex);
|
|
278
|
+
console.log('当前appJSON:', appJson);
|
|
279
|
+
return appJson;
|
|
280
|
+
}
|
|
281
|
+
exports.operationRecordPlayback = operationRecordPlayback;
|
|
282
|
+
function getLogic(key, app, diffLogicList) {
|
|
283
|
+
if (!diffLogicList.includes(key)) {
|
|
284
|
+
diffLogicList.push(key);
|
|
285
|
+
if (key.startsWith('app')) {
|
|
286
|
+
const index = key.lastIndexOf('.');
|
|
287
|
+
const name = key.slice(index + 1);
|
|
288
|
+
const logic = app.logics.find((item) => item.name === name);
|
|
289
|
+
if (logic && logic.body && logic.body.length > 2) {
|
|
290
|
+
logic.body.map((item) => getStatement(item, app, diffLogicList));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
else if (key.startsWith('extensions')) {
|
|
294
|
+
const _pathArr = key.split('.');
|
|
295
|
+
const _name = _pathArr[1];
|
|
296
|
+
const _path = _pathArr[3];
|
|
297
|
+
const _list = app.dependencies;
|
|
298
|
+
const _module = _list.find((it) => {
|
|
299
|
+
const name = it.name.replaceAll('-', '_');
|
|
300
|
+
return name === _name;
|
|
301
|
+
});
|
|
302
|
+
const logic = _module?.logics?.find((item) => item.name === _path);
|
|
303
|
+
if (logic && logic.body && logic.body.length > 2) {
|
|
304
|
+
logic.body.map((item) => getStatement(item, app, diffLogicList));
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/* 获取LogicITEM */
|
|
310
|
+
function getStatement(state, app, diffLogicList) {
|
|
311
|
+
let logicItems = [];
|
|
312
|
+
switch (state.concept) {
|
|
313
|
+
case 'Assignment':
|
|
314
|
+
logicItems = [state.left, state.right];
|
|
315
|
+
break;
|
|
316
|
+
case 'IfStatement':
|
|
317
|
+
logicItems = [...state.consequent, ...state.alternate];
|
|
318
|
+
break;
|
|
319
|
+
case 'ForEachStatement':
|
|
320
|
+
logicItems = [...state.body, state.each, state.start, state.end];
|
|
321
|
+
break;
|
|
322
|
+
case 'Match':
|
|
323
|
+
logicItems = [state.expression, ...state.cases.map(getStatement).flat(1)];
|
|
324
|
+
break;
|
|
325
|
+
case 'MatchCase':
|
|
326
|
+
logicItems = [...state.patterns, ...state.body];
|
|
327
|
+
break;
|
|
328
|
+
case 'SwitchStatement':
|
|
329
|
+
logicItems = state.cases.map(getStatement).flat(1);
|
|
330
|
+
break;
|
|
331
|
+
case 'SwitchCase':
|
|
332
|
+
logicItems = [state.test, ...state.consequent];
|
|
333
|
+
break;
|
|
334
|
+
case 'WhileStatement':
|
|
335
|
+
logicItems = [state.test, ...state.body];
|
|
336
|
+
break;
|
|
337
|
+
case 'CallLogic':
|
|
338
|
+
logicItems = state.arguments?.map((item) => item.expression);
|
|
339
|
+
getLogic(state.calleewholeKey, app, diffLogicList);
|
|
340
|
+
break;
|
|
341
|
+
case 'CallFunction':
|
|
342
|
+
logicItems = state.arguments?.map((item) => item.expression);
|
|
343
|
+
break;
|
|
344
|
+
case 'CallInterface':
|
|
345
|
+
logicItems = state.arguments?.map((item) => item.expression);
|
|
346
|
+
break;
|
|
347
|
+
case 'ExternalDestination':
|
|
348
|
+
logicItems = [state.anchor, state.link];
|
|
349
|
+
break;
|
|
350
|
+
case 'BatchAssignment':
|
|
351
|
+
logicItems = [state.left?.expression, ...state.left?.members, ...state.rights.map((item) => [item?.expression, ...item?.members]).flat(1)];
|
|
352
|
+
break;
|
|
353
|
+
case 'MemberExpression':
|
|
354
|
+
logicItems = [state.object, state.property];
|
|
355
|
+
break;
|
|
356
|
+
case 'StringInterpolation':
|
|
357
|
+
logicItems = [...state.expressions];
|
|
358
|
+
break;
|
|
359
|
+
case 'NewComposite':
|
|
360
|
+
logicItems = [...state.rights.map((item) => item.expression)];
|
|
361
|
+
break;
|
|
362
|
+
case 'NewList':
|
|
363
|
+
logicItems = [...state.items];
|
|
364
|
+
break;
|
|
365
|
+
default:
|
|
366
|
+
break;
|
|
367
|
+
}
|
|
368
|
+
return logicItems.filter((item) => !!item);
|
|
369
|
+
}
|
|
370
|
+
/* 小程序影响的服务端发布 */
|
|
371
|
+
function getMiniAppChange(target, obj, action) {
|
|
372
|
+
if (!target.app.miniEnable) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
/* 分端以后需要改 */
|
|
376
|
+
const len = target.nodePath?.split('.').length;
|
|
377
|
+
if (len > 2) {
|
|
378
|
+
return false;
|
|
379
|
+
}
|
|
380
|
+
if (action === 'delete') {
|
|
381
|
+
return true;
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
if ('name' in obj || 'title' in obj) {
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
let aiExecuted = 0;
|
|
390
|
+
let sessionPath = '';
|
|
391
|
+
// AI 生成内容是否被采纳
|
|
392
|
+
const handleAIPoint = (app, actionItem) => {
|
|
393
|
+
const { actionMsg, action } = actionItem || {};
|
|
394
|
+
if (aiExecuted > 0) {
|
|
395
|
+
app.emit('logic:accepted', { ...actionItem, sessionPath });
|
|
396
|
+
aiExecuted -= 1;
|
|
397
|
+
}
|
|
398
|
+
if (actionMsg.includes('自然语言生成代码') && !action) {
|
|
399
|
+
aiExecuted += 1;
|
|
400
|
+
// eslint-disable-next-line prefer-destructuring
|
|
401
|
+
sessionPath = actionMsg?.match(/:(.*)/)?.[1];
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
const isBreakpointEvent = (event) => {
|
|
405
|
+
const originEvent = event?.originEvent;
|
|
406
|
+
const object = originEvent?.object || {};
|
|
407
|
+
const oldObject = originEvent?.oldObject || {};
|
|
408
|
+
if (typeof object !== 'object') {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
if (typeof oldObject !== 'object') {
|
|
412
|
+
return false;
|
|
413
|
+
}
|
|
414
|
+
const source = { ...object, ...oldObject };
|
|
415
|
+
const keys = Object.keys(source);
|
|
416
|
+
if (keys.length !== 1) {
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
return keys[0] === 'breakpoint';
|
|
420
|
+
};
|
|
421
|
+
/**
|
|
422
|
+
* 执行更新
|
|
423
|
+
*/
|
|
424
|
+
async function doAction(app, actionItem) {
|
|
425
|
+
const isOperationRecord = exports.operationRecordInfoMap.get('isOperationRecord');
|
|
426
|
+
if (isOperationRecord) {
|
|
427
|
+
console.log('正在进行操作栈回放操作,如需行任何Nasl操作请刷新页面');
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
let hasFrontEnd = false;
|
|
431
|
+
let hasBackEnd = false;
|
|
432
|
+
const actionList = [];
|
|
433
|
+
const allRiskList = [];
|
|
434
|
+
const { list, actionMsg, action, extra } = actionItem || {};
|
|
435
|
+
handleAIPoint(app, actionItem);
|
|
436
|
+
const itemloop = (_i, app, diffArr) => {
|
|
437
|
+
const _l = getStatement(_i, app, diffArr);
|
|
438
|
+
if (_l.length) {
|
|
439
|
+
_l.map((_ii) => itemloop(_ii, app, diffArr));
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
const loopEle = (view, checkAuth) => {
|
|
443
|
+
if (view instanceof concepts_1.View) {
|
|
444
|
+
view?.elements?.forEach((item) => loopEle(item, checkAuth));
|
|
445
|
+
}
|
|
446
|
+
view?.children?.forEach((item) => loopEle(item, checkAuth));
|
|
447
|
+
if (view instanceof concepts_1.ViewElement) {
|
|
448
|
+
if (view.bindEvents.length) {
|
|
449
|
+
const diffArr = [];
|
|
450
|
+
view.bindEvents.forEach((bindEvent) => {
|
|
451
|
+
bindEvent.logics.forEach((logic) => {
|
|
452
|
+
logic.body.forEach((logicItem) => itemloop(logicItem, app, diffArr));
|
|
453
|
+
});
|
|
454
|
+
});
|
|
455
|
+
const result = diffArr.filter((item) => item.startsWith('app') || item.startsWith('extensions'));
|
|
456
|
+
if (result.length) {
|
|
457
|
+
hasBackEnd = true;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
if (view.tag === 'u-uploader' || view.tag === 'van-uploader') {
|
|
461
|
+
const bute = view?.bindAttrs.find((item) => item.name === 'url');
|
|
462
|
+
const needUpdateBackEnd = bute?.value?.endsWith('/import') || bute?.value?.includes('/upload/');
|
|
463
|
+
if (checkAuth) {
|
|
464
|
+
if (needUpdateBackEnd && !view.view.parentAuth) {
|
|
465
|
+
hasBackEnd = true;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
else {
|
|
469
|
+
if (needUpdateBackEnd) {
|
|
470
|
+
hasBackEnd = true;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
};
|
|
476
|
+
const loopEleAuth = (viewElement) => {
|
|
477
|
+
viewElement?.children?.forEach((item) => {
|
|
478
|
+
const bindDirective = item?.bindDirectives?.find((item) => item.name === 'auth');
|
|
479
|
+
if (bindDirective) {
|
|
480
|
+
hasBackEnd = true;
|
|
481
|
+
}
|
|
482
|
+
loopEleAuth(item);
|
|
483
|
+
});
|
|
484
|
+
};
|
|
485
|
+
try {
|
|
486
|
+
if (Array.isArray(list)) {
|
|
487
|
+
list.forEach((event) => {
|
|
488
|
+
const emitTarget = event?.originEvent?.target;
|
|
489
|
+
const _path = event.originEvent.path;
|
|
490
|
+
const _root = _path.split('.')?.[1] || '';
|
|
491
|
+
const breakabled = isBreakpointEvent(event);
|
|
492
|
+
if (['backend', 'overriddenLogics', 'dataSources', 'processes', 'roles', 'logics', 'enums', 'structures', 'interfaces', 'interfaceDependencies', 'configuration', 'dependencies', 'authLogics', 'authLogicsForCallInterface', 'triggerLaunchers', 'connections'].some((item) => _root.startsWith(item))) {
|
|
493
|
+
if (!breakabled) {
|
|
494
|
+
hasBackEnd = true;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (emitTarget) {
|
|
498
|
+
if (emitTarget.concept === 'App') {
|
|
499
|
+
if (event?.object?.preferenceMap || event?.originEvent?.object?.preferenceMap) {
|
|
500
|
+
hasBackEnd = true;
|
|
501
|
+
hasFrontEnd = true;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
if (emitTarget.concept === 'ValidationRule') {
|
|
505
|
+
if (event?.object?.enableServerValidation ||
|
|
506
|
+
event?.originEvent?.object?.enableServerValidation) {
|
|
507
|
+
hasBackEnd = true;
|
|
508
|
+
hasFrontEnd = true;
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
if (emitTarget.concept === 'Logic') {
|
|
512
|
+
const diffArr = [];
|
|
513
|
+
if (emitTarget.body.length > 2) {
|
|
514
|
+
emitTarget.body.forEach((it) => {
|
|
515
|
+
itemloop(it, app, diffArr);
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
const result = diffArr.filter((item) => item.startsWith('app') || item.startsWith('extensions'));
|
|
519
|
+
if (result.length) {
|
|
520
|
+
hasBackEnd = true;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
if ('view' in emitTarget && emitTarget.view) {
|
|
524
|
+
hasFrontEnd = true;
|
|
525
|
+
}
|
|
526
|
+
if (emitTarget.concept === 'BindDirective') {
|
|
527
|
+
const isDelete = event?.originEvent?.action === 'delete';
|
|
528
|
+
if (isDelete) {
|
|
529
|
+
const isAuto = ~event?.originEvent?.path?.indexOf('name=auth');
|
|
530
|
+
if (isAuto) {
|
|
531
|
+
hasBackEnd = true;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
if (event?.originEvent?.object?.name === 'auth') {
|
|
535
|
+
hasBackEnd = true;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
if (emitTarget.concept === 'View') {
|
|
539
|
+
if (getMiniAppChange(emitTarget, event?.originEvent?.object, event?.originEvent?.action)) {
|
|
540
|
+
hasBackEnd = true;
|
|
541
|
+
}
|
|
542
|
+
const isDelete = event?.originEvent?.action === 'delete';
|
|
543
|
+
const isAuthView = emitTarget.auth && event?.originEvent?.object?.name;
|
|
544
|
+
const isUpdateAuth = event?.originEvent?.action === 'update' && "auth" in (event?.originEvent?.object || {});
|
|
545
|
+
const isUpdateAuthDes = event?.originEvent?.action === 'update' && "authDescription" in (event?.originEvent?.object || {});
|
|
546
|
+
const isUpdateBindRoles = event?.originEvent?.action === 'update' && event?.originEvent?.object && event?.originEvent?.object?.bindRoles;
|
|
547
|
+
if (isDelete || isUpdateAuth || isUpdateBindRoles || isAuthView || isUpdateAuthDes) {
|
|
548
|
+
hasBackEnd = true;
|
|
549
|
+
// const app = emitTarget.app;
|
|
550
|
+
// const diffArr: string[] = [];
|
|
551
|
+
// emitTarget.logics.forEach((logic: Logic) => {
|
|
552
|
+
// if (logic.body.length > 2) {
|
|
553
|
+
// logic.body.forEach((it: LogicItem) => {
|
|
554
|
+
// itemloop(it, app, diffArr);
|
|
555
|
+
// });
|
|
556
|
+
// }
|
|
557
|
+
// });
|
|
558
|
+
// const result = diffArr.filter((item) => item.startsWith('app') || item.startsWith('extensions'));
|
|
559
|
+
// if (result.length) {
|
|
560
|
+
// hasBackEnd = true;
|
|
561
|
+
// }
|
|
562
|
+
// emitTarget.children.forEach((item: View | ViewElement) => loopEle(item, isDelete));
|
|
563
|
+
// emitTarget.elements.forEach((item: View | ViewElement) => loopEle(item, isDelete));
|
|
564
|
+
}
|
|
565
|
+
hasFrontEnd = true;
|
|
566
|
+
}
|
|
567
|
+
if (emitTarget.concept === 'ViewElement') {
|
|
568
|
+
if ("authDescription" in (event?.originEvent?.object || {})) {
|
|
569
|
+
hasBackEnd = true;
|
|
570
|
+
}
|
|
571
|
+
;
|
|
572
|
+
if (event?.originEvent?.object?.name) {
|
|
573
|
+
const bindDirective = emitTarget.bindDirectives.find((item) => item.name === 'auth');
|
|
574
|
+
if (bindDirective) {
|
|
575
|
+
hasBackEnd = true;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
if (event?.originEvent?.action === 'delete') {
|
|
579
|
+
const bindDirective = emitTarget?.bindDirectives?.find((item) => item.name === 'auth');
|
|
580
|
+
if (bindDirective) {
|
|
581
|
+
hasBackEnd = true;
|
|
582
|
+
}
|
|
583
|
+
loopEleAuth(emitTarget);
|
|
584
|
+
}
|
|
585
|
+
if (event?.originEvent?.action !== 'create') {
|
|
586
|
+
if (event?.originEvent?.object && event?.originEvent?.object?.bindRoles) {
|
|
587
|
+
hasBackEnd = true;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
loopEle(emitTarget, true);
|
|
591
|
+
}
|
|
592
|
+
if (emitTarget.concept === 'BindAttribute' && emitTarget.name === 'url') {
|
|
593
|
+
const needUpdateBackEnd = emitTarget?.value?.endsWith('/import') || emitTarget?.value?.includes('/upload/');
|
|
594
|
+
if (!emitTarget.view.parentAuth && needUpdateBackEnd) {
|
|
595
|
+
hasBackEnd = true;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
if (emitTarget.concept === 'CallLogic') {
|
|
599
|
+
const arrlist = [];
|
|
600
|
+
getLogic(emitTarget.calleeKey, emitTarget.app, arrlist);
|
|
601
|
+
const result = arrlist.filter((item) => item.startsWith('app') || item.startsWith('extensions'));
|
|
602
|
+
// console.log(result, 'CallLogic');
|
|
603
|
+
if (result.length) {
|
|
604
|
+
hasBackEnd = true;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
// 更新端时需要出发后端更新
|
|
608
|
+
if (emitTarget.concept === 'Frontend') {
|
|
609
|
+
hasBackEnd = true;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
event.eventList.forEach(({ action, riskList, path, object: objItem }) => {
|
|
613
|
+
if (riskList) {
|
|
614
|
+
allRiskList.push(...(riskList || []));
|
|
615
|
+
}
|
|
616
|
+
if (Array.isArray(objItem)) {
|
|
617
|
+
if (action === 'update') {
|
|
618
|
+
actionList.push({
|
|
619
|
+
action,
|
|
620
|
+
path,
|
|
621
|
+
node: objItem[0],
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
else {
|
|
625
|
+
objItem.forEach((item, index) => {
|
|
626
|
+
actionList.push({
|
|
627
|
+
action,
|
|
628
|
+
path,
|
|
629
|
+
node: item,
|
|
630
|
+
});
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
else {
|
|
635
|
+
actionList.push({
|
|
636
|
+
action,
|
|
637
|
+
path,
|
|
638
|
+
object: objItem,
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
catch (error) {
|
|
646
|
+
console.log(error);
|
|
647
|
+
exports.taskQueue.refreshNasl(app, {
|
|
648
|
+
errorInfo: {
|
|
649
|
+
message: error?.message,
|
|
650
|
+
stack: error?.stack,
|
|
651
|
+
},
|
|
652
|
+
});
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
const uuid = (0, uuid_1.v4)().replace(/-/g, '');
|
|
656
|
+
const instructList = [{
|
|
657
|
+
uuid,
|
|
658
|
+
realAction: action,
|
|
659
|
+
actions: actionList,
|
|
660
|
+
riskList: allRiskList
|
|
661
|
+
}];
|
|
662
|
+
const operation = {
|
|
663
|
+
type: 'doAction',
|
|
664
|
+
uuid,
|
|
665
|
+
actionItem: {
|
|
666
|
+
actionMsg,
|
|
667
|
+
list: list.map((item) => {
|
|
668
|
+
const { path, action, object, oldObject, parentKey, index } = item?.originEvent || {};
|
|
669
|
+
return {
|
|
670
|
+
path,
|
|
671
|
+
action,
|
|
672
|
+
parentKey,
|
|
673
|
+
index,
|
|
674
|
+
object: object?.toJSON?.() || object,
|
|
675
|
+
oldObject: oldObject?.toJSON?.() || oldObject,
|
|
676
|
+
};
|
|
677
|
+
}),
|
|
678
|
+
},
|
|
679
|
+
};
|
|
680
|
+
saveNasl({ app, hasFrontEnd, hasBackEnd, instructList, operationList: [operation] });
|
|
681
|
+
// 进行nasl操作后需要将Index重置
|
|
682
|
+
exports.operationRecordInfoMap.set('operationRecordIndex', null);
|
|
683
|
+
if (!app._historying) {
|
|
684
|
+
if (app._historyIndex !== app._historyList.length) {
|
|
685
|
+
app._historyList = app._historyList.splice(0, app._historyIndex);
|
|
686
|
+
}
|
|
687
|
+
app._historyList.push({
|
|
688
|
+
actionMsg,
|
|
689
|
+
extra: extra,
|
|
690
|
+
list: list.map((item) => item?.originEvent),
|
|
691
|
+
});
|
|
692
|
+
app._historyIndex = app._historyList.length;
|
|
693
|
+
}
|
|
694
|
+
else {
|
|
695
|
+
const actionMap = {
|
|
696
|
+
undo: '已撤销操作:',
|
|
697
|
+
redo: '已重做操作:',
|
|
698
|
+
};
|
|
699
|
+
let msg = actionMap[action];
|
|
700
|
+
msg += actionMsg;
|
|
701
|
+
if (process.env.BUILD_TARGET !== 'node') {
|
|
702
|
+
require('element-plus').ElMessage.info(msg);
|
|
703
|
+
}
|
|
704
|
+
app._historying = false;
|
|
705
|
+
}
|
|
706
|
+
stepRecorder_1.default.initialized && stepRecorder_1.default.record(actionMsg, actionItem, actionList);
|
|
707
|
+
}
|
|
708
|
+
var TaskQueueStatus;
|
|
709
|
+
(function (TaskQueueStatus) {
|
|
710
|
+
TaskQueueStatus[TaskQueueStatus["ExceedMaxTaskCount"] = 0] = "ExceedMaxTaskCount";
|
|
711
|
+
TaskQueueStatus[TaskQueueStatus["Retrying"] = 1] = "Retrying";
|
|
712
|
+
})(TaskQueueStatus || (TaskQueueStatus = {}));
|
|
713
|
+
class TaskQueue {
|
|
714
|
+
constructor() {
|
|
715
|
+
this.queue = [];
|
|
716
|
+
this.lastQueue = [];
|
|
717
|
+
this.running = false;
|
|
718
|
+
this.maxTaskCount = 10;
|
|
719
|
+
this.status = undefined;
|
|
720
|
+
}
|
|
721
|
+
addTask(task) {
|
|
722
|
+
this.queue.push(task);
|
|
723
|
+
if (this.queue.length >= this.maxTaskCount) {
|
|
724
|
+
this.status = TaskQueueStatus.ExceedMaxTaskCount;
|
|
725
|
+
task.app.emit('ExceedMaxTaskCount');
|
|
726
|
+
}
|
|
727
|
+
this.run();
|
|
728
|
+
}
|
|
729
|
+
clear() {
|
|
730
|
+
this.queue = [];
|
|
731
|
+
this.lastQueue = [];
|
|
732
|
+
this.status = undefined;
|
|
733
|
+
this.running = false;
|
|
734
|
+
}
|
|
735
|
+
async run(queue = this.queue) {
|
|
736
|
+
if (this.running)
|
|
737
|
+
return;
|
|
738
|
+
if (queue.length === 0)
|
|
739
|
+
return;
|
|
740
|
+
const app = queue[0].app;
|
|
741
|
+
let hasFrontEnd = false;
|
|
742
|
+
let hasBackEnd = false;
|
|
743
|
+
let instructList = [];
|
|
744
|
+
let operationList = [];
|
|
745
|
+
for (const task of queue) {
|
|
746
|
+
if (task.hasFrontEnd)
|
|
747
|
+
hasFrontEnd = true;
|
|
748
|
+
if (task.hasBackEnd)
|
|
749
|
+
hasBackEnd = true;
|
|
750
|
+
instructList = instructList.concat(task.instructList);
|
|
751
|
+
operationList = operationList.concat(task.operationList);
|
|
752
|
+
}
|
|
753
|
+
if (queue === this.queue) {
|
|
754
|
+
this.lastQueue = [...queue];
|
|
755
|
+
this.queue = [];
|
|
756
|
+
}
|
|
757
|
+
this.running = true;
|
|
758
|
+
const error = await _saveNasl({
|
|
759
|
+
app, hasFrontEnd, hasBackEnd, instructList, operationList
|
|
760
|
+
});
|
|
761
|
+
// code: 401650, 检测到当前应用拉取操作已被强制结束, 用户确认后再刷新
|
|
762
|
+
// code: 500502 msg: '该应用已在新tab 页打开,请刷新!' 不重试或刷新
|
|
763
|
+
// code: 500505 需要刷新浏览器
|
|
764
|
+
if (!error)
|
|
765
|
+
this.recover(app);
|
|
766
|
+
else if (![401650, 500502, 500505].includes(error.code)) {
|
|
767
|
+
// 连接失败,或超时,或后端持久化异常
|
|
768
|
+
if ((error.message === 'Network Error' || error.message?.includes('timeout') || error.code === 500500)
|
|
769
|
+
&& this.status !== TaskQueueStatus.Retrying) {
|
|
770
|
+
this.running = false;
|
|
771
|
+
this.retry();
|
|
772
|
+
}
|
|
773
|
+
else
|
|
774
|
+
this.refreshNasl(app);
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
this.running = false;
|
|
778
|
+
this.run();
|
|
779
|
+
}
|
|
780
|
+
retry() {
|
|
781
|
+
if (this.lastQueue.length === 0)
|
|
782
|
+
return;
|
|
783
|
+
const app = this.lastQueue[0].app;
|
|
784
|
+
this.status = TaskQueueStatus.Retrying;
|
|
785
|
+
app.emit('Retrying');
|
|
786
|
+
this.run(this.lastQueue);
|
|
787
|
+
}
|
|
788
|
+
async refreshNasl(app, options = { errorInfo: {} }) {
|
|
789
|
+
const failedQueue = this.lastQueue.map(({ hasFrontEnd, hasBackEnd, instructList }) => ({
|
|
790
|
+
hasFrontEnd, hasBackEnd, instructList,
|
|
791
|
+
}));
|
|
792
|
+
const queue = this.queue.map(({ hasFrontEnd, hasBackEnd, instructList }) => ({
|
|
793
|
+
hasFrontEnd, hasBackEnd, instructList,
|
|
794
|
+
}));
|
|
795
|
+
await service_1.default.saveFrontendNasl({
|
|
796
|
+
body: {
|
|
797
|
+
nasl: app?.toJSON(),
|
|
798
|
+
failedQueue,
|
|
799
|
+
queue,
|
|
800
|
+
errorInfo: options.errorInfo,
|
|
801
|
+
},
|
|
802
|
+
}).catch((err) => {
|
|
803
|
+
console.log('备份 nasl 失败:', err);
|
|
804
|
+
});
|
|
805
|
+
this.clear();
|
|
806
|
+
app.emit('refresh');
|
|
807
|
+
}
|
|
808
|
+
recover(app) {
|
|
809
|
+
switch (this.status) {
|
|
810
|
+
case TaskQueueStatus.ExceedMaxTaskCount:
|
|
811
|
+
app.emit('BelowMaxTaskCount');
|
|
812
|
+
this.status = undefined;
|
|
813
|
+
break;
|
|
814
|
+
case TaskQueueStatus.Retrying:
|
|
815
|
+
app.emit('SuccessRetry');
|
|
816
|
+
this.status = undefined;
|
|
817
|
+
break;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
exports.taskQueue = new TaskQueue();
|
|
822
|
+
async function saveNasl(options) {
|
|
823
|
+
exports.taskQueue.addTask(options);
|
|
824
|
+
}
|
|
825
|
+
class Operation {
|
|
826
|
+
}
|
|
827
|
+
// 确保操作非高危
|
|
828
|
+
function ensureSafe(instructList) {
|
|
829
|
+
const riskList = [];
|
|
830
|
+
instructList?.forEach((instruct) => {
|
|
831
|
+
if (instruct?.riskList) {
|
|
832
|
+
riskList.push(...(instruct.riskList || []));
|
|
833
|
+
}
|
|
834
|
+
instruct?.actions?.forEach((actionItem) => {
|
|
835
|
+
const { path, action, object } = actionItem || {};
|
|
836
|
+
if (path === 'app') {
|
|
837
|
+
switch (action) {
|
|
838
|
+
case 'create':
|
|
839
|
+
riskList.push('重复创建App');
|
|
840
|
+
break;
|
|
841
|
+
case 'delete':
|
|
842
|
+
riskList.push('删除App');
|
|
843
|
+
break;
|
|
844
|
+
case 'update':
|
|
845
|
+
if (object?.hasOwnProperty('id')) {
|
|
846
|
+
riskList.push('修改AppId');
|
|
847
|
+
}
|
|
848
|
+
break;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
});
|
|
853
|
+
return riskList;
|
|
854
|
+
}
|
|
855
|
+
async function _saveNasl(options) {
|
|
856
|
+
const { app, hasFrontEnd, hasBackEnd, instructList, operationList } = options;
|
|
857
|
+
app.emit('saving');
|
|
858
|
+
let ChangedNASLType = '';
|
|
859
|
+
if (hasFrontEnd && hasBackEnd) {
|
|
860
|
+
ChangedNASLType = 'both';
|
|
861
|
+
}
|
|
862
|
+
else if (hasFrontEnd) {
|
|
863
|
+
ChangedNASLType = 'web';
|
|
864
|
+
}
|
|
865
|
+
else if (hasBackEnd) {
|
|
866
|
+
ChangedNASLType = 'backend';
|
|
867
|
+
}
|
|
868
|
+
let res;
|
|
869
|
+
let err;
|
|
870
|
+
if (config_1.config.storage.protocol === 'http') {
|
|
871
|
+
try {
|
|
872
|
+
const riskList = ensureSafe(instructList);
|
|
873
|
+
if (Array.isArray(riskList) && riskList.length) {
|
|
874
|
+
throw Error(`存在以下高危操作:\n${riskList.map((risk, index) => {
|
|
875
|
+
return `${index + 1}.${risk};`;
|
|
876
|
+
}).join('\n')}\n请及时排查原因`);
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* 将指令列表拆分成每个指令最多200条指令的数组
|
|
880
|
+
* 因为服务端(孙浩然),单个actions太多,会导致服务端处理超时,事务超时
|
|
881
|
+
* 所以在这里把请求拆开,然后存储一下原来的 uuid,然后再请求的时候给一个新的uuid,表示事务不一样
|
|
882
|
+
*/
|
|
883
|
+
function transformArr(instructList) {
|
|
884
|
+
if (!Array.isArray(instructList))
|
|
885
|
+
return instructList;
|
|
886
|
+
const transformedArr = [];
|
|
887
|
+
instructList.forEach((item) => {
|
|
888
|
+
let tempActions = [...item.actions];
|
|
889
|
+
if (tempActions.length > 200) {
|
|
890
|
+
const { uuid: oldUUid, riskList } = item;
|
|
891
|
+
while (tempActions.length > 200) {
|
|
892
|
+
transformedArr.push({ oldUUid, uuid: (0, uuid_1.v4)().replace(/-/g, ''), actions: tempActions.splice(0, 200), riskList });
|
|
893
|
+
}
|
|
894
|
+
transformedArr.push({ oldUUid, uuid: (0, uuid_1.v4)().replace(/-/g, ''), actions: tempActions, riskList });
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
transformedArr.push(item);
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
return transformedArr;
|
|
901
|
+
}
|
|
902
|
+
const transformedInstructList = transformArr(instructList);
|
|
903
|
+
// 接口请求
|
|
904
|
+
res = await service_1.default.batchInstruct({
|
|
905
|
+
body: transformedInstructList,
|
|
906
|
+
headers: {
|
|
907
|
+
appId: app.id,
|
|
908
|
+
ChangedNASLType,
|
|
909
|
+
tabTimestamp,
|
|
910
|
+
// 其他封装在 storageService 里了
|
|
911
|
+
},
|
|
912
|
+
});
|
|
913
|
+
}
|
|
914
|
+
catch (error) {
|
|
915
|
+
err = error;
|
|
916
|
+
console.error(err);
|
|
917
|
+
}
|
|
918
|
+
const { code, msg, result, success } = err || {};
|
|
919
|
+
operationList.forEach((operation) => {
|
|
920
|
+
doOperationRecord({
|
|
921
|
+
...operation,
|
|
922
|
+
res,
|
|
923
|
+
err: {
|
|
924
|
+
code,
|
|
925
|
+
msg,
|
|
926
|
+
result,
|
|
927
|
+
success,
|
|
928
|
+
},
|
|
929
|
+
});
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
else if (config_1.config.storage.protocol === 'mock') {
|
|
933
|
+
// Do nothing
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
const json = await fs.readJSON(config_1.config.storage.basePath);
|
|
937
|
+
let actionList = [];
|
|
938
|
+
for (const { actions } of instructList) {
|
|
939
|
+
actionList = actionList.concat(actions);
|
|
940
|
+
}
|
|
941
|
+
jsoner.batchAction(json, actionList);
|
|
942
|
+
await fs.writeJSON(config_1.config.storage.basePath, json, {
|
|
943
|
+
spaces: 4,
|
|
944
|
+
});
|
|
945
|
+
}
|
|
946
|
+
app.emit('saved', err);
|
|
947
|
+
return err;
|
|
948
|
+
}
|
|
949
|
+
function handleApp(app) {
|
|
950
|
+
app._isCollectingCount = 0;
|
|
951
|
+
app._collectingList = [];
|
|
952
|
+
app._historyList = [];
|
|
953
|
+
app._historyIndex = 0;
|
|
954
|
+
app._historying = false;
|
|
955
|
+
app._timer = null;
|
|
956
|
+
app.on('undo', function () {
|
|
957
|
+
const proxyApp = this;
|
|
958
|
+
proxyApp._historying = true;
|
|
959
|
+
});
|
|
960
|
+
app.on('redo', function () {
|
|
961
|
+
const proxyApp = this;
|
|
962
|
+
proxyApp._historying = true;
|
|
963
|
+
});
|
|
964
|
+
/**
|
|
965
|
+
* 开启收集
|
|
966
|
+
*/
|
|
967
|
+
app.on('collect:start', function (event) {
|
|
968
|
+
const proxyApp = this;
|
|
969
|
+
if (proxyApp._timer) {
|
|
970
|
+
clearTimeout(proxyApp._timer);
|
|
971
|
+
}
|
|
972
|
+
if (!proxyApp._noTimer) {
|
|
973
|
+
proxyApp._noTimer = event.noTimer;
|
|
974
|
+
}
|
|
975
|
+
if (!proxyApp._noTimer) {
|
|
976
|
+
proxyApp._timer = setTimeout(() => {
|
|
977
|
+
console.error('收集超时,请及时排查原因', event);
|
|
978
|
+
exports.taskQueue.refreshNasl(proxyApp, {
|
|
979
|
+
errorInfo: {
|
|
980
|
+
message: '收集超时,请及时排查原因',
|
|
981
|
+
},
|
|
982
|
+
});
|
|
983
|
+
}, 2500);
|
|
984
|
+
}
|
|
985
|
+
if (event?.action === 'move')
|
|
986
|
+
proxyApp._action = event.action;
|
|
987
|
+
if (!proxyApp._isCollectingCount) {
|
|
988
|
+
proxyApp._actionMsg = event?.actionMsg;
|
|
989
|
+
proxyApp._action = event?.action;
|
|
990
|
+
proxyApp._extra = event?.extra;
|
|
991
|
+
}
|
|
992
|
+
proxyApp._isCollectingCount++;
|
|
993
|
+
});
|
|
994
|
+
/**
|
|
995
|
+
* 结束收集
|
|
996
|
+
*/
|
|
997
|
+
app.on('collect:end', async function () {
|
|
998
|
+
const proxyApp = this;
|
|
999
|
+
proxyApp._isCollectingCount--;
|
|
1000
|
+
if (proxyApp._isCollectingCount === 0) {
|
|
1001
|
+
if (proxyApp._timer) {
|
|
1002
|
+
clearTimeout(proxyApp._timer);
|
|
1003
|
+
}
|
|
1004
|
+
// 结束收集时,立即将全局收集变量状态重置,防止下次收集数据混乱
|
|
1005
|
+
const collectingList = proxyApp._collectingList;
|
|
1006
|
+
const actionMsg = proxyApp._actionMsg;
|
|
1007
|
+
const action = proxyApp._action;
|
|
1008
|
+
const extra = proxyApp._extra;
|
|
1009
|
+
proxyApp._collectingList = [];
|
|
1010
|
+
proxyApp._actionMsg = '';
|
|
1011
|
+
proxyApp._action = '';
|
|
1012
|
+
proxyApp._noTimer = undefined;
|
|
1013
|
+
if (Array.isArray(collectingList) && collectingList.length) {
|
|
1014
|
+
mountDatabaseTypes(proxyApp);
|
|
1015
|
+
proxyApp.naslServer?.embeddedTSEmitter?.emit('change', {
|
|
1016
|
+
value: collectingList,
|
|
1017
|
+
});
|
|
1018
|
+
await doAction(proxyApp, {
|
|
1019
|
+
list: collectingList,
|
|
1020
|
+
actionMsg,
|
|
1021
|
+
action,
|
|
1022
|
+
extra
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
else if (proxyApp._isCollectingCount < 0) {
|
|
1027
|
+
proxyApp._isCollectingCount = 0;
|
|
1028
|
+
throw Error('关闭收集有问题,请排查');
|
|
1029
|
+
}
|
|
1030
|
+
});
|
|
1031
|
+
/**
|
|
1032
|
+
* 有变更
|
|
1033
|
+
*/
|
|
1034
|
+
app.on('storage', function (event) {
|
|
1035
|
+
const proxyApp = this;
|
|
1036
|
+
// 是否正在收集
|
|
1037
|
+
if (proxyApp._isCollectingCount === 0) {
|
|
1038
|
+
proxyApp.naslServer?.embeddedTSEmitter?.emit('change', {
|
|
1039
|
+
value: [event],
|
|
1040
|
+
});
|
|
1041
|
+
let actionMsg = '';
|
|
1042
|
+
const { action, target } = event.originEvent || {};
|
|
1043
|
+
const { concept, name } = target || {};
|
|
1044
|
+
switch (action) {
|
|
1045
|
+
case 'create':
|
|
1046
|
+
actionMsg = '添加';
|
|
1047
|
+
break;
|
|
1048
|
+
case 'delete':
|
|
1049
|
+
actionMsg = '删除';
|
|
1050
|
+
break;
|
|
1051
|
+
case 'update':
|
|
1052
|
+
actionMsg = '修改';
|
|
1053
|
+
break;
|
|
1054
|
+
}
|
|
1055
|
+
actionMsg += (0, decorators_1.getConceptConstructor)(concept).nodeTitle;
|
|
1056
|
+
if (name) {
|
|
1057
|
+
actionMsg += `“${name}”`;
|
|
1058
|
+
}
|
|
1059
|
+
doAction(proxyApp, {
|
|
1060
|
+
list: [event],
|
|
1061
|
+
actionMsg,
|
|
1062
|
+
});
|
|
1063
|
+
}
|
|
1064
|
+
else {
|
|
1065
|
+
proxyApp._collectingList.push(event);
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
}
|
|
1069
|
+
exports.handleApp = handleApp;
|
|
1070
|
+
/**
|
|
1071
|
+
* 加载 app
|
|
1072
|
+
* @param appId 如果是从文件读,就不需要传
|
|
1073
|
+
* @returns app 对象
|
|
1074
|
+
*/
|
|
1075
|
+
async function loadApp(appId) {
|
|
1076
|
+
try {
|
|
1077
|
+
// 删除失效数据
|
|
1078
|
+
deleteExpiredRecords();
|
|
1079
|
+
}
|
|
1080
|
+
catch (err) { }
|
|
1081
|
+
let app;
|
|
1082
|
+
if (config_1.config.storage.protocol === 'http') {
|
|
1083
|
+
console.time('batchQuery');
|
|
1084
|
+
const promises = [
|
|
1085
|
+
service_1.default.batchQuery({
|
|
1086
|
+
body: [
|
|
1087
|
+
{
|
|
1088
|
+
path: 'app'
|
|
1089
|
+
// excludes: ['views'],
|
|
1090
|
+
}
|
|
1091
|
+
],
|
|
1092
|
+
headers: {
|
|
1093
|
+
appId,
|
|
1094
|
+
checkTabOpenTime: 'true'
|
|
1095
|
+
// 其他封装在 storageService 里了
|
|
1096
|
+
},
|
|
1097
|
+
config: {
|
|
1098
|
+
shortResponse: false
|
|
1099
|
+
}
|
|
1100
|
+
}),
|
|
1101
|
+
service_1.default.breakpoint({
|
|
1102
|
+
body: { appId }
|
|
1103
|
+
})
|
|
1104
|
+
];
|
|
1105
|
+
const [batchQueryRes, breakpointRes] = await Promise.all(promises);
|
|
1106
|
+
// 请求
|
|
1107
|
+
console.timeEnd('batchQuery');
|
|
1108
|
+
tabTimestamp = batchQueryRes?.headers?.tabtimestamp;
|
|
1109
|
+
const data = batchQueryRes?.data?.result;
|
|
1110
|
+
console.time('new App');
|
|
1111
|
+
app = new concepts_1.App(Object.assign(data?.[0], { id: appId }));
|
|
1112
|
+
breakpointRes?.forEach((item = {}) => {
|
|
1113
|
+
const { path, breakpointStatus } = item;
|
|
1114
|
+
if (breakpointStatus) {
|
|
1115
|
+
const node = app.findNodeByPath(path);
|
|
1116
|
+
if (node) {
|
|
1117
|
+
node.breakpoint = breakpointStatus;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
});
|
|
1121
|
+
console.timeEnd('new App');
|
|
1122
|
+
if (!app.id) {
|
|
1123
|
+
app.id = appId;
|
|
1124
|
+
}
|
|
1125
|
+
(0, breakpoint_1.addBreakpointNodesFromApp)(app);
|
|
1126
|
+
}
|
|
1127
|
+
else if (config_1.config.storage.protocol === 'mock') {
|
|
1128
|
+
app = new concepts_1.App({
|
|
1129
|
+
id: appId,
|
|
1130
|
+
concept: 'App',
|
|
1131
|
+
name: 'devapp',
|
|
1132
|
+
title: '开发应用',
|
|
1133
|
+
envs: 'dev,online',
|
|
1134
|
+
hasAuth: true,
|
|
1135
|
+
hasUserCenter: true,
|
|
1136
|
+
dataSources: [],
|
|
1137
|
+
structures: [],
|
|
1138
|
+
enums: [],
|
|
1139
|
+
logics: [],
|
|
1140
|
+
interfaces: [],
|
|
1141
|
+
processes: [],
|
|
1142
|
+
roles: [],
|
|
1143
|
+
dependencies: [],
|
|
1144
|
+
interfaceDependencies: [],
|
|
1145
|
+
frontendTypes: [],
|
|
1146
|
+
metadataTypes: []
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
1149
|
+
else {
|
|
1150
|
+
const json = await fs.readJSON(config_1.config.storage.basePath);
|
|
1151
|
+
app = new concepts_1.App(appId ? Object.assign(json, { id: appId }) : json);
|
|
1152
|
+
}
|
|
1153
|
+
// config.scope = app.scope;
|
|
1154
|
+
handleApp(app);
|
|
1155
|
+
app._isCollectingCount = 0;
|
|
1156
|
+
mountDatabaseTypes(app);
|
|
1157
|
+
return app;
|
|
1158
|
+
}
|
|
1159
|
+
exports.loadApp = loadApp;
|
|
1160
|
+
// 在app上挂载所有的数据库类型
|
|
1161
|
+
async function mountDatabaseTypes(app) {
|
|
1162
|
+
if (!app.__databaseTypeMap) {
|
|
1163
|
+
app.__databaseTypeMap = {};
|
|
1164
|
+
}
|
|
1165
|
+
const dataSources = app?.dataSources;
|
|
1166
|
+
const dbTypeSet = new Set();
|
|
1167
|
+
if (Array.isArray(dataSources)) {
|
|
1168
|
+
dataSources.forEach((dataSource) => {
|
|
1169
|
+
const dataSourceSqlType = JSON.parse(dataSource.dataSourceConfig?.devProperty?.value || '{}')?.type;
|
|
1170
|
+
if (dataSourceSqlType && !app.__databaseTypeMap[dataSourceSqlType]) {
|
|
1171
|
+
dbTypeSet.add(dataSourceSqlType);
|
|
1172
|
+
}
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
const dbTypes = [...dbTypeSet];
|
|
1176
|
+
if (Array.isArray(dbTypes) && dbTypes.length) {
|
|
1177
|
+
const res = await (0, exports.databaseTypes)({
|
|
1178
|
+
query: {
|
|
1179
|
+
dbTypes: dbTypes.join(','),
|
|
1180
|
+
},
|
|
1181
|
+
});
|
|
1182
|
+
if (Array.isArray(res)) {
|
|
1183
|
+
res.forEach((databaseType) => {
|
|
1184
|
+
const { dbType, columnTypes } = databaseType || {};
|
|
1185
|
+
const columnTypeMap = {};
|
|
1186
|
+
if (Array.isArray(columnTypes)) {
|
|
1187
|
+
columnTypes.forEach((columnType) => {
|
|
1188
|
+
const { naslType, dataBaseTypes } = columnType;
|
|
1189
|
+
const dataBaseTypeMap = {};
|
|
1190
|
+
let defaultDataBaseType;
|
|
1191
|
+
if (Array.isArray(dataBaseTypes)) {
|
|
1192
|
+
dataBaseTypes.forEach((dataBaseType) => {
|
|
1193
|
+
const { type } = dataBaseType || {};
|
|
1194
|
+
if (type) {
|
|
1195
|
+
dataBaseTypeMap[type] = dataBaseType;
|
|
1196
|
+
const { defaultType } = dataBaseType;
|
|
1197
|
+
if (defaultType) {
|
|
1198
|
+
defaultDataBaseType = dataBaseType;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
columnTypeMap[naslType] = {
|
|
1204
|
+
dataBaseTypes,
|
|
1205
|
+
dataBaseTypeMap,
|
|
1206
|
+
defaultDataBaseType,
|
|
1207
|
+
};
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
app.__databaseTypeMap[dbType] = columnTypeMap;
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
if (Array.isArray(dataSources)) {
|
|
1215
|
+
dataSources.forEach((dataSource) => {
|
|
1216
|
+
dataSource.__hasDatabaseConfig = !!(app.__databaseTypeMap?.[dataSource.dataSourceSqlType]);
|
|
1217
|
+
});
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
exports.mountDatabaseTypes = mountDatabaseTypes;
|
|
1221
|
+
/**
|
|
1222
|
+
* 加载 app
|
|
1223
|
+
* @returns app 对象
|
|
1224
|
+
*/
|
|
1225
|
+
function loadAppSync() {
|
|
1226
|
+
const json = fs.readJSONSync(config_1.config.storage.basePath);
|
|
1227
|
+
const app = new concepts_1.App(json);
|
|
1228
|
+
handleApp(app);
|
|
1229
|
+
return app;
|
|
1230
|
+
}
|
|
1231
|
+
exports.loadAppSync = loadAppSync;
|
|
1232
|
+
//# sourceMappingURL=init.js.map
|