@lcap/nasl 3.3.0-beta.2 → 3.3.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nyc_output/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +1 -0
- package/.nyc_output/processinfo/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +461 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +196 -0
- package/coverage/src/automate/engine/index.html +116 -0
- package/coverage/src/automate/engine/utils.js.html +1414 -0
- package/coverage/src/bak/index.html +116 -0
- package/coverage/src/bak/translator.js.html +622 -0
- package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +175 -0
- package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +169 -0
- package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +1246 -0
- package/coverage/src/breakpoint/generator/CallbackNode.ts.html +145 -0
- package/coverage/src/breakpoint/generator/index.html +176 -0
- package/coverage/src/breakpoint/generator/index.ts.html +508 -0
- package/coverage/src/breakpoint/index.html +116 -0
- package/coverage/src/breakpoint/index.ts.html +94 -0
- package/coverage/src/breakpoint/shared/constants.ts.html +436 -0
- package/coverage/src/breakpoint/shared/index.html +176 -0
- package/coverage/src/breakpoint/shared/index.ts.html +94 -0
- package/coverage/src/breakpoint/shared/operations.ts.html +160 -0
- package/coverage/src/breakpoint/shared/socket.ts.html +1297 -0
- package/coverage/src/breakpoint/shared/utils.ts.html +1087 -0
- package/coverage/src/breakpoint/store/core.ts.html +1600 -0
- package/coverage/src/breakpoint/store/dock.ts.html +733 -0
- package/coverage/src/breakpoint/store/index.html +146 -0
- package/coverage/src/breakpoint/store/index.ts.html +91 -0
- package/coverage/src/common/BaseNode.ts.html +3874 -0
- package/coverage/src/common/Command.ts.html +310 -0
- package/coverage/src/common/EventEmitter.ts.html +370 -0
- package/coverage/src/common/Messager.ts.html +820 -0
- package/coverage/src/common/asyncFuncMap.ts.html +127 -0
- package/coverage/src/common/index.html +191 -0
- package/coverage/src/common/index.ts.html +94 -0
- package/coverage/src/concepts/Abort__.ts.html +328 -0
- package/coverage/src/concepts/Anchor__.ts.html +646 -0
- package/coverage/src/concepts/AnonymousFunction__.ts.html +2029 -0
- package/coverage/src/concepts/App__.ts.html +13252 -0
- package/coverage/src/concepts/Argument__.ts.html +964 -0
- package/coverage/src/concepts/Assignee__.ts.html +2236 -0
- package/coverage/src/concepts/AssignmentLine__.ts.html +409 -0
- package/coverage/src/concepts/Assignment__.ts.html +1123 -0
- package/coverage/src/concepts/Attribute__.ts.html +733 -0
- package/coverage/src/concepts/AuthInterface__.ts.html +367 -0
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +1984 -0
- package/coverage/src/concepts/AuthLogic__.ts.html +781 -0
- package/coverage/src/concepts/BackendVariable__.ts.html +1483 -0
- package/coverage/src/concepts/Backend__.ts.html +1165 -0
- package/coverage/src/concepts/BatchAssignment__.ts.html +3301 -0
- package/coverage/src/concepts/BinaryExpression__.ts.html +1441 -0
- package/coverage/src/concepts/BindAttribute__.ts.html +3835 -0
- package/coverage/src/concepts/BindDirective__.ts.html +1921 -0
- package/coverage/src/concepts/BindEvent__.ts.html +3406 -0
- package/coverage/src/concepts/BindStyle__.ts.html +1612 -0
- package/coverage/src/concepts/BooleanLiteral__.ts.html +418 -0
- package/coverage/src/concepts/CallAuthInterface__.ts.html +1615 -0
- package/coverage/src/concepts/CallConnector__.ts.html +922 -0
- package/coverage/src/concepts/CallFunction__.ts.html +2122 -0
- package/coverage/src/concepts/CallInterface__.ts.html +2719 -0
- package/coverage/src/concepts/CallLogic__.ts.html +4807 -0
- package/coverage/src/concepts/CallQueryComponent__.ts.html +5308 -0
- package/coverage/src/concepts/Comment__.ts.html +394 -0
- package/coverage/src/concepts/CompletionProperty__.ts.html +925 -0
- package/coverage/src/concepts/ConfigGroup__.ts.html +1105 -0
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +424 -0
- package/coverage/src/concepts/ConfigProperty__.ts.html +1348 -0
- package/coverage/src/concepts/Configuration__.ts.html +1027 -0
- package/coverage/src/concepts/Connection__.ts.html +1360 -0
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +595 -0
- package/coverage/src/concepts/Connector__.ts.html +4255 -0
- package/coverage/src/concepts/Constant__.ts.html +913 -0
- package/coverage/src/concepts/DataSource__.ts.html +1771 -0
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +331 -0
- package/coverage/src/concepts/Destination__.ts.html +2731 -0
- package/coverage/src/concepts/End__.ts.html +433 -0
- package/coverage/src/concepts/EntityIndex__.ts.html +787 -0
- package/coverage/src/concepts/EntityProperty__.ts.html +2668 -0
- package/coverage/src/concepts/Entity__.ts.html +2950 -0
- package/coverage/src/concepts/EnumItem__.ts.html +550 -0
- package/coverage/src/concepts/Enum__.ts.html +1231 -0
- package/coverage/src/concepts/Event__.ts.html +1084 -0
- package/coverage/src/concepts/ExternalDestination__.ts.html +1033 -0
- package/coverage/src/concepts/ForEachStatement__.ts.html +1957 -0
- package/coverage/src/concepts/FrontendLibrary__.ts.html +1711 -0
- package/coverage/src/concepts/FrontendVariable__.ts.html +292 -0
- package/coverage/src/concepts/Frontend__.ts.html +3961 -0
- package/coverage/src/concepts/Function__.ts.html +3598 -0
- package/coverage/src/concepts/Identifier__.ts.html +1057 -0
- package/coverage/src/concepts/IfStatement__.ts.html +1594 -0
- package/coverage/src/concepts/Integration__.ts.html +1228 -0
- package/coverage/src/concepts/InterfaceParam__.ts.html +1087 -0
- package/coverage/src/concepts/Interface__.ts.html +3394 -0
- package/coverage/src/concepts/JSBlock__.ts.html +421 -0
- package/coverage/src/concepts/JavaLogic__.ts.html +460 -0
- package/coverage/src/concepts/LogicItem__.ts.html +1171 -0
- package/coverage/src/concepts/Logic__.ts.html +7408 -0
- package/coverage/src/concepts/MatchCase__.ts.html +2929 -0
- package/coverage/src/concepts/Match__.ts.html +2455 -0
- package/coverage/src/concepts/MemberExpression__.ts.html +1726 -0
- package/coverage/src/concepts/MicroApp__.ts.html +436 -0
- package/coverage/src/concepts/Module__.ts.html +9220 -0
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +1045 -0
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +1018 -0
- package/coverage/src/concepts/Namespace__.ts.html +7942 -0
- package/coverage/src/concepts/NewComposite__.ts.html +4729 -0
- package/coverage/src/concepts/NewList__.ts.html +1618 -0
- package/coverage/src/concepts/NewMap__.ts.html +2326 -0
- package/coverage/src/concepts/New__.ts.html +289 -0
- package/coverage/src/concepts/NullLiteral__.ts.html +349 -0
- package/coverage/src/concepts/NumericLiteral__.ts.html +676 -0
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +1141 -0
- package/coverage/src/concepts/OverriddenLogic__.ts.html +6817 -0
- package/coverage/src/concepts/Param__.ts.html +1726 -0
- package/coverage/src/concepts/Point__.ts.html +331 -0
- package/coverage/src/concepts/ProcessComponent__.ts.html +1666 -0
- package/coverage/src/concepts/ProcessElement__.ts.html +5884 -0
- package/coverage/src/concepts/ProcessOutcome__.ts.html +352 -0
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +343 -0
- package/coverage/src/concepts/Process__.ts.html +4768 -0
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +568 -0
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +583 -0
- package/coverage/src/concepts/QueryFromExpression__.ts.html +910 -0
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +559 -0
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +1567 -0
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +637 -0
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +679 -0
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +1714 -0
- package/coverage/src/concepts/Rect__.ts.html +373 -0
- package/coverage/src/concepts/Return__.ts.html +1312 -0
- package/coverage/src/concepts/Role__.ts.html +601 -0
- package/coverage/src/concepts/SelectMembers__.ts.html +1246 -0
- package/coverage/src/concepts/Slot__.ts.html +628 -0
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +982 -0
- package/coverage/src/concepts/Start__.ts.html +304 -0
- package/coverage/src/concepts/StringInterpolation__.ts.html +1129 -0
- package/coverage/src/concepts/StringLiteral__.ts.html +505 -0
- package/coverage/src/concepts/StructureProperty__.ts.html +1132 -0
- package/coverage/src/concepts/Structure__.ts.html +2092 -0
- package/coverage/src/concepts/SwitchCase__.ts.html +1174 -0
- package/coverage/src/concepts/SwitchStatement__.ts.html +877 -0
- package/coverage/src/concepts/Theme__.ts.html +358 -0
- package/coverage/src/concepts/Transactional__.ts.html +628 -0
- package/coverage/src/concepts/TriggerEvent__.ts.html +1012 -0
- package/coverage/src/concepts/TriggerLauncher__.ts.html +775 -0
- package/coverage/src/concepts/TypeAnnotation__.ts.html +3718 -0
- package/coverage/src/concepts/TypeParam__.ts.html +319 -0
- package/coverage/src/concepts/UnaryExpression__.ts.html +697 -0
- package/coverage/src/concepts/Unparsed__.ts.html +394 -0
- package/coverage/src/concepts/UseComponent__.ts.html +331 -0
- package/coverage/src/concepts/ValidationRule__.ts.html +1840 -0
- package/coverage/src/concepts/Variable__.ts.html +1489 -0
- package/coverage/src/concepts/ViewBlock__.ts.html +352 -0
- package/coverage/src/concepts/ViewComponent__.ts.html +4180 -0
- package/coverage/src/concepts/ViewElement__.ts.html +8803 -0
- package/coverage/src/concepts/View__.ts.html +8620 -0
- package/coverage/src/concepts/WhileStatement__.ts.html +1063 -0
- package/coverage/src/concepts/basics/stdlib/index.html +356 -0
- package/coverage/src/concepts/basics/stdlib/index.ts.html +208 -0
- package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +565 -0
- package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +517 -0
- package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +226 -0
- package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +172 -0
- package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +214 -0
- package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +145 -0
- package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +589 -0
- package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +214 -0
- package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +229 -0
- package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +268 -0
- package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +1999 -0
- package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +3259 -0
- package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +6844 -0
- package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1768 -0
- package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +163 -0
- package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +664 -0
- package/coverage/src/concepts/basics/types/coreTypeList.ts.html +121 -0
- package/coverage/src/concepts/basics/types/index.html +131 -0
- package/coverage/src/concepts/basics/types/index.ts.html +160 -0
- package/coverage/src/concepts/index.html +1961 -0
- package/coverage/src/concepts/index.ts.html +103 -0
- package/coverage/src/concepts/index__.ts.html +451 -0
- package/coverage/src/config.ts.html +325 -0
- package/coverage/src/decorators/index.html +131 -0
- package/coverage/src/decorators/index.ts.html +574 -0
- package/coverage/src/decorators/promise.ts.html +169 -0
- package/coverage/src/eventBus.ts.html +100 -0
- package/coverage/src/generator/compileComponent.ts.html +142 -0
- package/coverage/src/generator/genBundleFiles.ts.html +1828 -0
- package/coverage/src/generator/genHash.ts.html +124 -0
- package/coverage/src/generator/genMetaData.ts.html +1042 -0
- package/coverage/src/generator/genReleaseBody.ts.html +1282 -0
- package/coverage/src/generator/icestark.ts.html +220 -0
- package/coverage/src/generator/index.html +266 -0
- package/coverage/src/generator/index.ts.html +106 -0
- package/coverage/src/generator/microApp.ts.html +172 -0
- package/coverage/src/generator/permission.ts.html +1036 -0
- package/coverage/src/generator/qiankun.ts.html +232 -0
- package/coverage/src/generator/styleReplacer.ts.html +199 -0
- package/coverage/src/index.html +146 -0
- package/coverage/src/index.ts.html +121 -0
- package/coverage/src/manager/diagnostic.ts.html +442 -0
- package/coverage/src/manager/index.html +131 -0
- package/coverage/src/manager/stepRecorder.ts.html +457 -0
- package/coverage/src/natural/genNaturalTS.ts.html +355 -0
- package/coverage/src/natural/index.html +161 -0
- package/coverage/src/natural/index.ts.html +91 -0
- package/coverage/src/natural/naslStdlibMap.ts.html +157 -0
- package/coverage/src/natural/transformTSCode.ts.html +2647 -0
- package/coverage/src/sentry/index.html +116 -0
- package/coverage/src/sentry/index.ts.html +676 -0
- package/coverage/src/server/createUiTs.ts.html +910 -0
- package/coverage/src/server/entity2LogicNamespace.ts.html +1294 -0
- package/coverage/src/server/event.js.html +526 -0
- package/coverage/src/server/extendBaseNode.ts.html +1762 -0
- package/coverage/src/server/formatTsUtils.ts.html +2689 -0
- package/coverage/src/server/getConnector.ts.html +316 -0
- package/coverage/src/server/getExtensionModules.ts.html +178 -0
- package/coverage/src/server/getFunctions.ts.html +133 -0
- package/coverage/src/server/getInterfaces.ts.html +229 -0
- package/coverage/src/server/getLogging.ts.html +100 -0
- package/coverage/src/server/getLogics.ts.html +1363 -0
- package/coverage/src/server/getMemberIdentifier.ts.html +1561 -0
- package/coverage/src/server/getProcessComponents.ts.html +112 -0
- package/coverage/src/server/getProcesses.ts.html +2023 -0
- package/coverage/src/server/getValidates.ts.html +115 -0
- package/coverage/src/server/index.html +401 -0
- package/coverage/src/server/index.ts.html +229 -0
- package/coverage/src/server/naslServer.ts.html +14401 -0
- package/coverage/src/server/naslStdlibMap.ts.html +241 -0
- package/coverage/src/server/process2LogicNamespace.ts.html +454 -0
- package/coverage/src/server/translator.ts.html +2566 -0
- package/coverage/src/service/creator/add.configs.js.html +379 -0
- package/coverage/src/service/creator/errHandles.js.html +322 -0
- package/coverage/src/service/creator/index.html +146 -0
- package/coverage/src/service/creator/index.js.html +352 -0
- package/coverage/src/service/datasource/api.js.html +118 -0
- package/coverage/src/service/datasource/index.html +131 -0
- package/coverage/src/service/datasource/index.js.html +103 -0
- package/coverage/src/service/logic/api.js.html +109 -0
- package/coverage/src/service/logic/index.html +131 -0
- package/coverage/src/service/logic/index.js.html +103 -0
- package/coverage/src/service/storage/api.js.html +202 -0
- package/coverage/src/service/storage/index.html +206 -0
- package/coverage/src/service/storage/index.ts.html +103 -0
- package/coverage/src/service/storage/init.ts.html +2761 -0
- package/coverage/src/service/storage/jsoner.ts.html +502 -0
- package/coverage/src/service/storage/map.ts.html +256 -0
- package/coverage/src/service/storage/service.ts.html +331 -0
- package/coverage/src/service/storage/storagePoint.ts.html +304 -0
- package/coverage/src/templator/genCallComponentLogic.ts.html +163 -0
- package/coverage/src/templator/genCreateBlock.ts.html +1093 -0
- package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +1609 -0
- package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +2254 -0
- package/coverage/src/templator/genEditTableBlock.ts.html +955 -0
- package/coverage/src/templator/genEnumSelectBlock.ts.html +178 -0
- package/coverage/src/templator/genGetBlock.ts.html +451 -0
- package/coverage/src/templator/genGridViewBlock.ts.html +1114 -0
- package/coverage/src/templator/genListViewBlock.ts.html +475 -0
- package/coverage/src/templator/genQueryComponent.ts.html +1207 -0
- package/coverage/src/templator/genSelectBlock.ts.html +1243 -0
- package/coverage/src/templator/genTableBlock.ts.html +910 -0
- package/coverage/src/templator/genUpdateBlock.ts.html +1192 -0
- package/coverage/src/templator/index.html +326 -0
- package/coverage/src/templator/index.ts.html +154 -0
- package/coverage/src/templator/utils.ts.html +1861 -0
- package/coverage/src/translator/constant.ts.html +106 -0
- package/coverage/src/translator/index.html +146 -0
- package/coverage/src/translator/index.ts.html +94 -0
- package/coverage/src/translator/utils.ts.html +436 -0
- package/coverage/src/utils/cookie.ts.html +265 -0
- package/coverage/src/utils/env.ts.html +91 -0
- package/coverage/src/utils/index.html +236 -0
- package/coverage/src/utils/index.ts.html +655 -0
- package/coverage/src/utils/logger.ts.html +145 -0
- package/coverage/src/utils/sortTsString.ts.html +187 -0
- package/coverage/src/utils/string.ts.html +400 -0
- package/coverage/src/utils/time-slicing.ts.html +418 -0
- package/coverage/src/utils/traverse.ts.html +568 -0
- package/coverage/src/utils/window.ts.html +112 -0
- package/out/bak/translator.js +16 -18
- package/out/bak/translator.js.map +1 -1
- package/out/breakpoint/generator/BreakpointNode.js +1 -0
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
- package/out/breakpoint/shared/constants.d.ts +2 -0
- package/out/breakpoint/shared/constants.js +3 -1
- package/out/breakpoint/shared/constants.js.map +1 -1
- package/out/breakpoint/shared/socket.d.ts +1 -0
- package/out/breakpoint/shared/socket.js +35 -17
- package/out/breakpoint/shared/socket.js.map +1 -1
- package/out/breakpoint/shared/utils.js +33 -1
- package/out/breakpoint/shared/utils.js.map +1 -1
- package/out/breakpoint/store/core.d.ts +2 -0
- package/out/breakpoint/store/core.js +5 -3
- package/out/breakpoint/store/core.js.map +1 -1
- package/out/breakpoint/store/dock.js +33 -0
- package/out/breakpoint/store/dock.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js +2 -1
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/BinaryExpression__.js +5 -5
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +3 -3
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +2 -0
- package/out/concepts/CallConnector__.js +17 -1
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.js +31 -24
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallLogic__.js +53 -46
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/Connection__.js +1 -1
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +1 -20
- package/out/concepts/ForEachStatement__.js +16 -14
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/IfStatement__.js +24 -25
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Logic__.js +8 -20
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.js +12 -7
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +11 -14
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +1 -1
- package/out/concepts/NewComposite__.js +11 -83
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.js +11 -9
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +1 -1
- package/out/concepts/NewMap__.js +12 -4
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.js +3 -1
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/StringInterpolation__.js +2 -2
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/SwitchCase__.js +8 -4
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +4 -2
- package/out/concepts/ViewElement__.js +7 -21
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +6 -4
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.browser.js +19 -3
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.d.ts +2 -0
- package/out/concepts/basics/stdlib/nasl.util.js +36 -11
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- 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/generator/genBundleFiles.js +12 -4
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genReleaseBody.js +1 -1
- package/out/generator/genReleaseBody.js.map +1 -1
- package/out/natural/genNaturalTS.d.ts +2 -2
- package/out/natural/genNaturalTS.js +5 -5
- package/out/natural/genNaturalTS.js.map +1 -1
- package/out/natural/transformTSCode.js +18 -3
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/createUiTs.js +3 -0
- package/out/server/createUiTs.js.map +1 -1
- package/out/server/getLogics.js +3 -1
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +15 -0
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/naslServer.js +35 -9
- package/out/server/naslServer.js.map +1 -1
- package/out/service/creator/errHandles.js +10 -19
- package/out/service/creator/errHandles.js.map +1 -1
- package/out/service/storage/init.js +7 -2
- package/out/service/storage/init.js.map +1 -1
- package/out/service/storage/jsoner.js +1 -3
- package/out/service/storage/jsoner.js.map +1 -1
- package/out/templator/genEditTableBlock.js +24 -2
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genTableBlock.js +22 -1
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/translator/types.d.ts +1 -0
- package/out/translator/utils.js +13 -0
- package/out/translator/utils.js.map +1 -1
- package/package.json +2 -2
- package/sandbox/stdlib/nasl.browser.ts +2 -0
- package/sandbox/stdlib/nasl.ui.definition.ts +2220 -2218
- package/sandbox/stdlib/nasl.util.ts +20 -10
- package/sandbox-natural/stdlib/nasl.core.ts +6 -3
- package/sandbox-natural/stdlib/nasl.oql.ts +6 -0
- package/sandbox-natural/stdlib/nasl.util.ts +1 -1
- package/src/bak/translator.js +16 -17
- package/src/breakpoint/generator/BreakpointNode.ts +1 -0
- package/src/breakpoint/shared/constants.ts +2 -0
- package/src/breakpoint/shared/socket.ts +41 -17
- package/src/breakpoint/shared/utils.ts +43 -1
- package/src/breakpoint/store/core.ts +2 -2
- package/src/breakpoint/store/dock.ts +50 -0
- package/src/breakpoint/types/index.d.ts +1 -0
- package/src/concepts/AuthLogicForCallInterface__.ts +2 -1
- package/src/concepts/BinaryExpression__.ts +6 -6
- package/src/concepts/BindAttribute__.ts +5 -4
- package/src/concepts/CallConnector__.ts +19 -1
- package/src/concepts/CallFunction__.ts +40 -22
- package/src/concepts/CallLogic__.ts +39 -32
- package/src/concepts/Connection__.ts +1 -1
- package/src/concepts/ForEachStatement__.ts +17 -15
- package/src/concepts/IfStatement__.ts +30 -30
- package/src/concepts/Logic__.ts +13 -27
- package/src/concepts/MatchCase__.ts +15 -7
- package/src/concepts/MemberExpression__.ts +11 -14
- package/src/concepts/NewComposite__.ts +15 -83
- package/src/concepts/NewList__.ts +11 -9
- package/src/concepts/NewMap__.ts +12 -4
- package/src/concepts/New__.ts +1 -0
- package/src/concepts/StringInterpolation__.ts +2 -2
- package/src/concepts/SwitchCase__.ts +9 -5
- package/src/concepts/ViewElement__.ts +8 -22
- package/src/concepts/WhileStatement__.ts +7 -5
- package/src/concepts/basics/stdlib/nasl.browser.ts +19 -3
- package/src/concepts/basics/stdlib/nasl.util.ts +38 -19
- package/src/concepts/basics/stdlib/timeZone.ts +193 -0
- package/src/generator/genBundleFiles.ts +12 -4
- package/src/generator/genReleaseBody.ts +1 -1
- package/src/natural/genNaturalTS.ts +5 -5
- package/src/natural/transformTSCode.ts +18 -4
- package/src/server/createUiTs.ts +3 -0
- package/src/server/getLogics.ts +3 -1
- package/src/server/getMemberIdentifier.ts +15 -0
- package/src/server/naslServer.ts +126 -83
- package/src/service/creator/errHandles.js +10 -16
- package/src/service/storage/init.ts +10 -3
- package/src/service/storage/jsoner.ts +2 -2
- package/src/templator/genEditTableBlock.ts +24 -2
- package/src/templator/genTableBlock.ts +22 -1
- package/src/translator/types.ts +1 -0
- package/src/translator/utils.ts +15 -0
- package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +20 -20
- package/test/concepts/match/__snapshots__/toJS.spec.ts.snap +1 -1
- package/test/concepts/member-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +1 -1
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +10 -10
|
@@ -10,7 +10,8 @@ declare namespace nasl.util {
|
|
|
10
10
|
export function Convert(value: nasl.core.Boolean): <T extends nasl.core.String | nasl.core.Long | nasl.core.Decimal>() => T;
|
|
11
11
|
export function Convert(value: nasl.core.Any): <T extends nasl.core.String>() => T;
|
|
12
12
|
|
|
13
|
-
export function ToString
|
|
13
|
+
export function ToString(value: nasl.core.Any, timeZone?: nasl.core.String): nasl.core.String;
|
|
14
|
+
|
|
14
15
|
export function FromString(value: nasl.core.String): <T extends nasl.core.Decimal | nasl.core.Date | nasl.core.Time | nasl.core.DateTime | nasl.core.Decimal | nasl.core.Long | nasl.core.Boolean>() => T;
|
|
15
16
|
export function EnumToList<T extends nasl.core.Enums>(): nasl.collection.List<{ text: nasl.core.String, value: nasl.core.String }>;
|
|
16
17
|
export function EnumValueToText<T extends nasl.core.Enums>(value: nasl.core.Enums): nasl.core.String;
|
|
@@ -18,7 +19,7 @@ declare namespace nasl.util {
|
|
|
18
19
|
|
|
19
20
|
export function Split(str: nasl.core.String, seperator: nasl.core.String): nasl.collection.List<nasl.core.String>;
|
|
20
21
|
export function Join(list: nasl.collection.List<nasl.core.Any>, seperator: nasl.core.String): nasl.core.String;
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
export function Concat(...args: nasl.core.Any): nasl.core.String;
|
|
23
24
|
export function Length(str1: nasl.core.String): nasl.core.Long;
|
|
24
25
|
export function Length<K, V>(str1: nasl.collection.Map<K, V>): nasl.core.Long;
|
|
@@ -78,22 +79,30 @@ declare namespace nasl.util {
|
|
|
78
79
|
// 将元素类型为 K0, V0 的 Map 映射为元素类型为 K, V 的 Map
|
|
79
80
|
export function MapTransform<K0, V0, K extends nasl.core.Boolean | nasl.core.Long | nasl.core.Decimal | nasl.core.String, V>(map: nasl.collection.Map<K0, V0>, byKey: (key: K0, value: V0) => K, byVal: (key: K0, value: V0) => V): nasl.collection.Map<K, V>;
|
|
80
81
|
|
|
81
|
-
export function CurrDate(): nasl.core.Date;
|
|
82
|
-
export function CurrTime(): nasl.core.Time;
|
|
83
|
-
export function CurrDateTime(): nasl.core.DateTime;
|
|
82
|
+
export function CurrDate(timeZone?: nasl.core.String): nasl.core.Date;
|
|
83
|
+
export function CurrTime(timeZone?: nasl.core.String): nasl.core.Time;
|
|
84
|
+
export function CurrDateTime(timeZone?: nasl.core.String): nasl.core.DateTime;
|
|
85
|
+
|
|
84
86
|
export function FormatDate(date: nasl.core.Date, formatter: nasl.core.String): nasl.core.String;
|
|
85
|
-
export function FormatDateTime(dateTime: nasl.core.DateTime, formatter: nasl.core.String): nasl.core.String;
|
|
87
|
+
export function FormatDateTime(dateTime: nasl.core.DateTime, formatter: nasl.core.String, timeZone?: nasl.core.String): nasl.core.String;
|
|
86
88
|
export function FormatNumber(doubleValue: nasl.core.Decimal | nasl.core.Long, digits: nasl.core.Long, showGroups: nasl.core.Boolean): nasl.core.String;
|
|
89
|
+
|
|
87
90
|
export function AddDays(dateTime: nasl.core.Date, amount: nasl.core.Long): nasl.core.Date;
|
|
88
91
|
export function AddDays(dateTime: nasl.core.DateTime, amount: nasl.core.Long): nasl.core.DateTime;
|
|
89
92
|
export function AddMonths(dateTime: nasl.core.Date, amount: nasl.core.Long): nasl.core.Date;
|
|
90
93
|
export function AddMonths(dateTime: nasl.core.DateTime, amount: nasl.core.Long): nasl.core.DateTime;
|
|
94
|
+
|
|
91
95
|
export function DateDiff<T extends nasl.core.Date | nasl.core.Time | nasl.core.DateTime>(dateTime1: T, dateTime2: T, calcType: nasl.core.String, isAbs: nasl.core.Boolean): nasl.core.Long;
|
|
92
96
|
export function ConvertTimezone<T extends nasl.core.DateTime>(dateTime: T, timeZone: nasl.core.String): T;
|
|
93
|
-
export function GetDateCount<T extends nasl.core.Date | nasl.core.DateTime>(dateTime: T, metric: nasl.core.String): nasl.core.Long;
|
|
94
97
|
export function AlterDateTime<T extends nasl.core.Date | nasl.core.DateTime>(dateTime: T, option: nasl.core.String, amount : nasl.core.Long, unit : nasl.core.String): T;
|
|
95
|
-
|
|
96
|
-
export function
|
|
98
|
+
|
|
99
|
+
export function GetDateCount<T extends nasl.core.Date | nasl.core.DateTime>
|
|
100
|
+
(dateTime: T, metric: nasl.core.String, timeZone?: nasl.core.String): nasl.core.Long;
|
|
101
|
+
|
|
102
|
+
export function GetSpecificDaysOfWeek<T extends nasl.core.Date | nasl.core.DateTime>(startDate: T, endDate: T,
|
|
103
|
+
target: nasl.collection.List<nasl.core.Long>, timeZone?: nasl.core.String): nasl.collection.List<T>;
|
|
104
|
+
|
|
105
|
+
export function Clone<T>(struct: T): T;
|
|
97
106
|
export function Clear<T>(struct: T): T;
|
|
98
107
|
export function RandomInt(start: nasl.core.Long, end: nasl.core.Long): nasl.core.Long;
|
|
99
108
|
export function New<T>(): T;
|
|
@@ -107,7 +116,8 @@ declare namespace nasl.util {
|
|
|
107
116
|
export function CreateListPage<T>(list: nasl.collection.List<T>, total: nasl.core.Long): { list: nasl.collection.List<T>, total: nasl.core.Long };
|
|
108
117
|
|
|
109
118
|
export function consoleLog(arg: nasl.core.Any): void;
|
|
110
|
-
|
|
119
|
+
|
|
120
|
+
export function jsonSerialize(arg: nasl.core.Any, timeZone?: nasl.core.String): nasl.core.String;
|
|
111
121
|
export function jsonDeserialize<T>(arg: nasl.core.String): T;
|
|
112
122
|
|
|
113
123
|
export function concatString(...args: nasl.core.String[]): any;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
type Any = any;
|
|
2
|
-
|
|
2
|
+
type Long = number;
|
|
3
3
|
type Integer = number;
|
|
4
4
|
type Decimal = number;
|
|
5
|
+
// type Boolean = boolean;
|
|
5
6
|
// type String = string;
|
|
6
7
|
// type Date = globalThis.Date;
|
|
8
|
+
|
|
7
9
|
class Time {
|
|
8
10
|
accept: 'Time';
|
|
9
11
|
}
|
|
@@ -13,13 +15,14 @@ class DateTime {
|
|
|
13
15
|
type List<T> = Array<T>;
|
|
14
16
|
|
|
15
17
|
interface Entity<T> {
|
|
18
|
+
/**
|
|
19
|
+
* 只能获取一条
|
|
20
|
+
*/
|
|
16
21
|
get(id: Long): T;
|
|
17
22
|
create(entity: T): T;
|
|
18
23
|
update(entity: T): T;
|
|
19
24
|
delete(id: Long): void;
|
|
20
25
|
createOrUpdate(body: T): T;
|
|
21
|
-
updateBy(body: T, filter: (_: T) => Boolean): Integer;
|
|
22
|
-
deleteBy(filter: (_: T) => Boolean): void;
|
|
23
26
|
batchCreate(list: List<T>): List<T>;
|
|
24
27
|
batchUpdate(list: List<T>): List<T>;
|
|
25
28
|
batchDelete(list: List<Long>): void;
|
|
@@ -3,6 +3,12 @@ declare namespace nasl.oql {
|
|
|
3
3
|
* 数据查询
|
|
4
4
|
* @param sql 数据查询需要的 SQL
|
|
5
5
|
* @returns 返回类型中的 T 为 sql 根据 SQL 中 select 的字段推导
|
|
6
|
+
*
|
|
7
|
+
* 所有变量格式为:${variable},不能用''包裹,不能用函数处理。
|
|
8
|
+
* 所有枚举类型值的格式为:${app.enums.Enum.Value},不能用''包裹,不能用函数处理。
|
|
9
|
+
* 尽可能使用 join 进行关联查询。
|
|
10
|
+
* @example `SELECT * FROM Student WHERE id = ${id}`
|
|
11
|
+
* @example `SELECT OrderProduct.*, Product.price as price FROM OrderProduct JOIN Product WHERE orderId = ${id}`
|
|
6
12
|
*/
|
|
7
13
|
export function query<T>(sql: string): List<T>;
|
|
8
14
|
}
|
|
@@ -107,7 +107,7 @@ declare namespace nasl.util {
|
|
|
107
107
|
/**
|
|
108
108
|
* @example const variable1 = nasl.util.NewAnonymityStructure({property1: '123', property2: '456'})
|
|
109
109
|
*/
|
|
110
|
-
export function NewAnonymityStructure(arg:
|
|
110
|
+
export function NewAnonymityStructure(arg: Any): Any;
|
|
111
111
|
|
|
112
112
|
export function consoleLog(arg: Any): void;
|
|
113
113
|
export function jsonSerialize(arg: Any): String;
|
package/src/bak/translator.js
CHANGED
|
@@ -94,26 +94,25 @@ export default function (definition) {
|
|
|
94
94
|
const code = `'__${element.name}_${attr.name}'(${variable.includes('(current || {}).item') ? 'current' : ''}) {
|
|
95
95
|
return ${variable?.trim()?.length > 0 ? variable : undefined}
|
|
96
96
|
}`
|
|
97
|
-
if (element.name === 'table_view1') {
|
|
98
|
-
console.log('在这里', code, variable)
|
|
99
|
-
}
|
|
100
97
|
viewMethodData.push(code)
|
|
101
98
|
}
|
|
102
99
|
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
100
|
+
viewVariablesData.push(`['__${element.name}_params']: {}`);
|
|
101
|
+
// if (['u-select', 'van-pickerson'].includes(element.tag)) {
|
|
102
|
+
// viewMethodData.push(`['__${element.name}_page-number']() {
|
|
103
|
+
// return this['__${element.name}_params']?.page ?? 1
|
|
104
|
+
// }`)
|
|
105
|
+
// viewMethodData.push(`['__${element.name}_filterText']() {
|
|
106
|
+
// return this['__${element.name}_params']?.filterText ?? ''
|
|
107
|
+
// }`)
|
|
108
|
+
// } else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(element.tag) && element.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1) {
|
|
109
|
+
// viewMethodData.push(`['__${element.name}_sorting']() {
|
|
110
|
+
// return {
|
|
111
|
+
// field: undefined,
|
|
112
|
+
// order: undefined
|
|
113
|
+
// }
|
|
114
|
+
// }`)
|
|
115
|
+
// }
|
|
117
116
|
})
|
|
118
117
|
|
|
119
118
|
let viewExpressionMethods;
|
|
@@ -143,6 +143,7 @@ const callFunctionGenerator = (instance: BreakpointNode) => (breaker: string) =>
|
|
|
143
143
|
if (length) {
|
|
144
144
|
const lastBaseArgument = baseArguments[length - 1];
|
|
145
145
|
const beforeBaseArguments = baseArguments.slice(0, -1);
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
146
147
|
const combinedLastBaseArgument = new BreakpointNode();
|
|
147
148
|
|
|
148
149
|
combinedLastBaseArgument.variable = lastBaseArgument;
|
|
@@ -107,6 +107,8 @@ export const RESPONSE_TYPE_PAGE_INFO = 'PageInfo';
|
|
|
107
107
|
export const RESPONSE_TYPE_DEBUG_INFO = 'DebugInfo';
|
|
108
108
|
export const RESPONSE_TYPE_CONNECTION_INFO = 'ConnectionInfo';
|
|
109
109
|
export const RESPONSE_TYPE_EXCEPTION_INFO = 'ExceptionInfo';
|
|
110
|
+
export const RESPONSE_TYPE_END_INFO = 'EndInfo';
|
|
111
|
+
export const RESPONSE_TYPE_RELEASE_INFO = 'ReleaseInfo';
|
|
110
112
|
|
|
111
113
|
export const CONNECTION_NAME_FRONTEND = 'Frontend';
|
|
112
114
|
export const CONNECTION_NAME_BACKEND = 'Backend';
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
RESPONSE_TYPE_OBJECT_INFO,
|
|
15
15
|
RESPONSE_TYPE_RETURN_INFO,
|
|
16
16
|
RESPONSE_TYPE_PAGE_INFO,
|
|
17
|
+
RESPONSE_TYPE_EXCEPTION_INFO,
|
|
17
18
|
} from './constants';
|
|
18
19
|
|
|
19
20
|
import { toStringVoid } from './utils';
|
|
@@ -44,6 +45,7 @@ type ResponseData = {
|
|
|
44
45
|
uniqueId?: number,
|
|
45
46
|
threadId?: number,
|
|
46
47
|
requestId?: number,
|
|
48
|
+
frontendScopeId?: number,
|
|
47
49
|
connectionName?: string,
|
|
48
50
|
connectionStatus?: string,
|
|
49
51
|
exceptionMsg?: string,
|
|
@@ -86,14 +88,21 @@ const callback = (result: ResponseData = {}) => {
|
|
|
86
88
|
listeners.forEach((listener) => listener(data));
|
|
87
89
|
};
|
|
88
90
|
|
|
89
|
-
const register = (
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
const register = (current: Socket) => {
|
|
92
|
+
current && nativeTypes.forEach((type) => {
|
|
93
|
+
current.on(type, () => callback({ type }));
|
|
92
94
|
});
|
|
93
95
|
};
|
|
94
96
|
|
|
95
97
|
export const isConnected = () => socket && socket.connected;
|
|
96
98
|
|
|
99
|
+
const rejectEvents = [
|
|
100
|
+
'error',
|
|
101
|
+
'connect_error',
|
|
102
|
+
'connect_timeout',
|
|
103
|
+
EVENT_DISCONNECT,
|
|
104
|
+
];
|
|
105
|
+
|
|
97
106
|
export const connect = (appId = '') => {
|
|
98
107
|
if (socket) {
|
|
99
108
|
return;
|
|
@@ -122,12 +131,24 @@ export const connect = (appId = '') => {
|
|
|
122
131
|
register(socket);
|
|
123
132
|
|
|
124
133
|
return new Promise((resolve, reject) => {
|
|
125
|
-
|
|
134
|
+
const onReject: typeof reject = (error) => {
|
|
135
|
+
reject(error);
|
|
136
|
+
callback({ type: RESPONSE_TYPE_EXCEPTION_INFO });
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const onResolve: typeof resolve = () => {
|
|
140
|
+
rejectEvents.forEach((item) => {
|
|
141
|
+
socket.off(item, onReject);
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
resolve(socket);
|
|
145
|
+
};
|
|
126
146
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
147
|
+
rejectEvents.forEach((item) => {
|
|
148
|
+
socket.on(item, onReject);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
socket.on('connect', onResolve);
|
|
131
152
|
});
|
|
132
153
|
};
|
|
133
154
|
|
|
@@ -186,7 +207,7 @@ const tick = (time = 5000) => (...args: Parameters<typeof on>) => new Promise((r
|
|
|
186
207
|
let timer: ReturnType<typeof setTimeout>;
|
|
187
208
|
const [type, listener] = args;
|
|
188
209
|
|
|
189
|
-
const
|
|
210
|
+
const func: typeof listener = async (...rest) => {
|
|
190
211
|
const result = listener && await listener(...rest);
|
|
191
212
|
|
|
192
213
|
if (result === undefined) {
|
|
@@ -198,7 +219,7 @@ const tick = (time = 5000) => (...args: Parameters<typeof on>) => new Promise((r
|
|
|
198
219
|
timer && clearTimeout(timer);
|
|
199
220
|
};
|
|
200
221
|
|
|
201
|
-
un = on(type,
|
|
222
|
+
un = on(type, func);
|
|
202
223
|
timer = setTimeout(un, time);
|
|
203
224
|
});
|
|
204
225
|
|
|
@@ -223,13 +244,13 @@ const tickers = [
|
|
|
223
244
|
return;
|
|
224
245
|
}
|
|
225
246
|
|
|
226
|
-
return tick()(RESPONSE_TYPE_PAGE_INFO, (
|
|
247
|
+
return tick()(RESPONSE_TYPE_PAGE_INFO, (source = {}) => {
|
|
227
248
|
const {
|
|
228
249
|
variable,
|
|
229
250
|
pageNum: responsePageNum,
|
|
230
251
|
pageSize: responsePageSize,
|
|
231
252
|
uniqueId: responseUniqueId,
|
|
232
|
-
} =
|
|
253
|
+
} = source;
|
|
233
254
|
|
|
234
255
|
if (!variable) {
|
|
235
256
|
return;
|
|
@@ -256,11 +277,11 @@ const tickers = [
|
|
|
256
277
|
return;
|
|
257
278
|
}
|
|
258
279
|
|
|
259
|
-
return tick()(RESPONSE_TYPE_OBJECT_INFO, (
|
|
280
|
+
return tick()(RESPONSE_TYPE_OBJECT_INFO, (source = {}) => {
|
|
260
281
|
const {
|
|
261
282
|
variable,
|
|
262
283
|
uniqueId: responseUniqueId,
|
|
263
|
-
} =
|
|
284
|
+
} = source;
|
|
264
285
|
|
|
265
286
|
if (!variable) {
|
|
266
287
|
return;
|
|
@@ -332,7 +353,10 @@ export const emitToBackend = (operation: RequestData['operation'] = {}) => {
|
|
|
332
353
|
|
|
333
354
|
let uId = 0;
|
|
334
355
|
|
|
335
|
-
export const getBeacon = () =>
|
|
356
|
+
export const getBeacon = () => {
|
|
357
|
+
uId += 1;
|
|
358
|
+
return uId;
|
|
359
|
+
};
|
|
336
360
|
|
|
337
361
|
const reviver = (key: string, value: any) => {
|
|
338
362
|
if (value === JSON_VOID) {
|
|
@@ -359,8 +383,8 @@ export const emitToFrontend = (operation: RequestData['operation'] = {}) => {
|
|
|
359
383
|
return;
|
|
360
384
|
}
|
|
361
385
|
|
|
362
|
-
return tick()(eventType, (
|
|
363
|
-
const { beacon: responseBeacon, result = 'null' } =
|
|
386
|
+
return tick()(eventType, (source = {}) => {
|
|
387
|
+
const { beacon: responseBeacon, result = 'null' } = source;
|
|
364
388
|
|
|
365
389
|
if (responseBeacon !== beacon) {
|
|
366
390
|
return;
|
|
@@ -116,11 +116,53 @@ const isBreakableByCurrent = (node: BaseNode): Boolean => {
|
|
|
116
116
|
return BREAKPOINT_CONCEPTS.includes(concept);
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
+
const queryComponents = [
|
|
120
|
+
'CallQueryComponent',
|
|
121
|
+
'OqlQueryComponent',
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
const conditions = [
|
|
125
|
+
(node: BaseNode) => {
|
|
126
|
+
if (!node) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const { concept } = node;
|
|
131
|
+
const included = queryComponents.includes(concept);
|
|
132
|
+
|
|
133
|
+
if (!included) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const concpet = 'Paginate' as any;
|
|
138
|
+
const ancestor = node.getAncestor(concpet);
|
|
139
|
+
|
|
140
|
+
return !ancestor;
|
|
141
|
+
},
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
const isBreakableByConditions = (node: BaseNode): Boolean => {
|
|
145
|
+
if (!node) {
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return conditions.every((condition) => {
|
|
150
|
+
const result = condition(node);
|
|
151
|
+
|
|
152
|
+
if (result === undefined) {
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return result;
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
|
|
119
160
|
export const isBreakable = (node: BaseNode): Boolean => {
|
|
120
161
|
const a = isBreakableByCurrent(node);
|
|
121
162
|
const b = isBreakableByAncestors(node);
|
|
163
|
+
const c = isBreakableByConditions(node);
|
|
122
164
|
|
|
123
|
-
return a && b;
|
|
165
|
+
return a && b && c;
|
|
124
166
|
};
|
|
125
167
|
|
|
126
168
|
export const isActive = (store: any = {}) => {
|
|
@@ -356,7 +356,7 @@ export const resolveBreakpoint = (path = store.activePath) => {
|
|
|
356
356
|
resolveByPath();
|
|
357
357
|
};
|
|
358
358
|
|
|
359
|
-
const stepOverBreakpointToBackend = () => {
|
|
359
|
+
export const stepOverBreakpointToBackend = () => {
|
|
360
360
|
const { activePath } = store;
|
|
361
361
|
|
|
362
362
|
activePath && socket.emitToBackend({
|
|
@@ -365,7 +365,7 @@ const stepOverBreakpointToBackend = () => {
|
|
|
365
365
|
});
|
|
366
366
|
};
|
|
367
367
|
|
|
368
|
-
const stepOverBreakpointToFrontend = (data: StepOverData = {}) => {
|
|
368
|
+
export const stepOverBreakpointToFrontend = (data: StepOverData = {}) => {
|
|
369
369
|
const { activePath } = store;
|
|
370
370
|
|
|
371
371
|
activePath && socket.emitToFrontend({
|
|
@@ -4,9 +4,12 @@ import {
|
|
|
4
4
|
TARGET_BACKEND,
|
|
5
5
|
TARGET_FRONTEND,
|
|
6
6
|
EVENT_TYPE_RESOLVE,
|
|
7
|
+
EVENT_TYPE_STEP_OVER,
|
|
7
8
|
EVENT_TYPE_BREAKPOINT,
|
|
8
9
|
RESPONSE_TYPE_DEBUG_INFO,
|
|
9
10
|
RESPONSE_TYPE_CONNECTION_INFO,
|
|
11
|
+
RESPONSE_TYPE_END_INFO,
|
|
12
|
+
RESPONSE_TYPE_RELEASE_INFO,
|
|
10
13
|
CONNECTION_NAME_BACKEND,
|
|
11
14
|
CONNECTION_NAME_FRONTEND,
|
|
12
15
|
CONNECTION_STATUS_CONNECTED,
|
|
@@ -104,6 +107,7 @@ const cleanStackWhenDisconnect = (target: string) => {
|
|
|
104
107
|
return;
|
|
105
108
|
}
|
|
106
109
|
|
|
110
|
+
// eslint-disable-next-line prefer-destructuring
|
|
107
111
|
store.activeStackItem = store.stack[0];
|
|
108
112
|
};
|
|
109
113
|
|
|
@@ -164,3 +168,49 @@ socket.setPolyfillGetter(() => {
|
|
|
164
168
|
|
|
165
169
|
return rest;
|
|
166
170
|
});
|
|
171
|
+
|
|
172
|
+
// 后端点击下一步执行结束
|
|
173
|
+
socket.on(RESPONSE_TYPE_END_INFO, (data = {}) => {
|
|
174
|
+
const { eventType, frontendScopeId } = data;
|
|
175
|
+
|
|
176
|
+
if (eventType !== EVENT_TYPE_STEP_OVER) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (!frontendScopeId) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
socket.emitToFrontend({
|
|
185
|
+
eventType: EVENT_TYPE_STEP_OVER,
|
|
186
|
+
scopeId: `${frontendScopeId}`,
|
|
187
|
+
formBackend: true,
|
|
188
|
+
logicPath: '',
|
|
189
|
+
path: '',
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// 后端主动结束调试请求
|
|
194
|
+
socket.on(RESPONSE_TYPE_RELEASE_INFO, (data = {}) => {
|
|
195
|
+
const { threadId } = data;
|
|
196
|
+
const { stack = [], activeStackItem } = store;
|
|
197
|
+
|
|
198
|
+
const found = stack.find(
|
|
199
|
+
(item = {}) => item?.operation?.threadId === threadId,
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
if (!found) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const nextStack = stack.filter(
|
|
207
|
+
(item) => item !== found,
|
|
208
|
+
);
|
|
209
|
+
|
|
210
|
+
if (activeStackItem === found) {
|
|
211
|
+
// eslint-disable-next-line prefer-destructuring
|
|
212
|
+
store.activeStackItem = nextStack[0];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
store.stack = nextStack;
|
|
216
|
+
});
|
|
@@ -585,7 +585,8 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
585
585
|
* @param name 一般不用传,用于 rename
|
|
586
586
|
*/
|
|
587
587
|
getEmbeddedFilePath(name = this.name) {
|
|
588
|
-
const
|
|
588
|
+
const targetAncestor = this.module || this.connector;
|
|
589
|
+
const _path = targetAncestor ? `/${targetAncestor.parentKey}/${targetAncestor.name}` : '';
|
|
589
590
|
return `/embedded/${this.app.name}${_path}/authLogicsForCallInterface/${name}.ts`;
|
|
590
591
|
}
|
|
591
592
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
1
2
|
import { TranslatorState, shiftState, withSourceMap, createCompilerState } from '../translator';
|
|
2
3
|
import { ElementToVueOptions } from './ViewElement__';
|
|
3
4
|
|
|
@@ -9,7 +10,6 @@ import { EventPayload, Params } from '../common/EventEmitter';
|
|
|
9
10
|
import { concept, excludedInJSON, property, className } from '../decorators';
|
|
10
11
|
|
|
11
12
|
import * as utils from '../utils';
|
|
12
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
13
13
|
import BaseNode from '../common/BaseNode';
|
|
14
14
|
import LogicItem from './LogicItem__';
|
|
15
15
|
|
|
@@ -71,7 +71,7 @@ export class BinaryExpression extends LogicItem {
|
|
|
71
71
|
* @param source 需要合并的部分参数
|
|
72
72
|
*/
|
|
73
73
|
constructor(source?: Partial<BinaryExpression>) {
|
|
74
|
-
source =
|
|
74
|
+
source = { ...BinaryExpression.getDefaultOptions(), ...source};
|
|
75
75
|
super(source);
|
|
76
76
|
super.subConstructor(source);
|
|
77
77
|
}
|
|
@@ -158,7 +158,7 @@ export class BinaryExpression extends LogicItem {
|
|
|
158
158
|
if (typeof options === 'string') {
|
|
159
159
|
left = this.left;
|
|
160
160
|
if (!left) {
|
|
161
|
-
throw new Error(
|
|
161
|
+
throw new Error(`找不到逻辑项 ${ options}`);
|
|
162
162
|
}
|
|
163
163
|
} else {
|
|
164
164
|
left = options;
|
|
@@ -183,7 +183,7 @@ export class BinaryExpression extends LogicItem {
|
|
|
183
183
|
if (typeof options === 'string') {
|
|
184
184
|
right = this.right;
|
|
185
185
|
if (!right) {
|
|
186
|
-
throw new Error(
|
|
186
|
+
throw new Error(`找不到逻辑项 ${ options}`);
|
|
187
187
|
}
|
|
188
188
|
} else {
|
|
189
189
|
right = options;
|
|
@@ -192,7 +192,7 @@ export class BinaryExpression extends LogicItem {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
__removeLogicItem(logicItem: LogicItem) {
|
|
195
|
-
const parentKey = logicItem
|
|
195
|
+
const {parentKey} = logicItem;
|
|
196
196
|
const params: Params = {
|
|
197
197
|
parentNode: this,
|
|
198
198
|
parentKey,
|
|
@@ -423,7 +423,7 @@ export class BinaryExpression extends LogicItem {
|
|
|
423
423
|
} else {
|
|
424
424
|
code += this.left ? this.left.toNaturalTS(shiftState(state, code, { inline: true })) : '__LEFT__';
|
|
425
425
|
}
|
|
426
|
-
code +=
|
|
426
|
+
code += ` ${this.operator} `;
|
|
427
427
|
if (this.right && this.right.concept === 'BinaryExpression') {
|
|
428
428
|
code += this.right ? `(${this.right.toNaturalTS(shiftState(state, code, { inline: true }))})` : '__RIGHT__';
|
|
429
429
|
} else {
|
|
@@ -1004,7 +1004,7 @@ export class BindAttribute extends BaseNode {
|
|
|
1004
1004
|
// 文本默认要经过toString转换
|
|
1005
1005
|
if (options?.finalCode !== false && name === 'text' && !this.sync && this.type === 'dynamic') {
|
|
1006
1006
|
const expTypeAnnotation = (this.expression as any)?.typeAnnotation || this.expression?.__TypeAnnotation;
|
|
1007
|
-
value = `$utils['ToString'](${
|
|
1007
|
+
value = `$utils['ToString']('${expTypeAnnotation?.sortedTypeKey}', ${value})`;
|
|
1008
1008
|
}
|
|
1009
1009
|
if (this.type === 'string' && name !== 'rules') {
|
|
1010
1010
|
if (options?.finalCode !== false) {
|
|
@@ -1095,14 +1095,14 @@ export class BindAttribute extends BaseNode {
|
|
|
1095
1095
|
code += `${attrConvertCamelCase(this.name)}: `;
|
|
1096
1096
|
if (this.expression) {
|
|
1097
1097
|
if (this.name === 'data-source') {
|
|
1098
|
-
code += `
|
|
1098
|
+
code += `ReturnType<typeof __elements_stashFunctionVariable.${elementName}_${attrConvertCamelCase(
|
|
1099
1099
|
this.name,
|
|
1100
|
-
)}
|
|
1100
|
+
)}>`;
|
|
1101
1101
|
} else {
|
|
1102
1102
|
code += `ReturnType<typeof __elements_stashFunctionVariable.${elementName}_${attrConvertCamelCase(this.name)}>`;
|
|
1103
1103
|
}
|
|
1104
1104
|
arrCode = `() => {
|
|
1105
|
-
return __elements_variable_function.${currentLevel}?.${attrConvertCamelCase(this.name)}
|
|
1105
|
+
return __elements_variable_function.${currentLevel}?.${attrConvertCamelCase(this.name)}?.()
|
|
1106
1106
|
}`
|
|
1107
1107
|
} else if (this.name === 'sorting') {
|
|
1108
1108
|
code += `{
|
|
@@ -1247,3 +1247,4 @@ export function attrConvertCamelCase(str: string) {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
return strList.join('');
|
|
1249
1249
|
}
|
|
1250
|
+
|
|
@@ -78,6 +78,19 @@ export class CallConnector extends CallLogic {
|
|
|
78
78
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
79
79
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
80
80
|
//================================================================================
|
|
81
|
+
get calleeTSConnectionName() {
|
|
82
|
+
if (this.calleeConnectionName) {
|
|
83
|
+
let tsName = this.calleeConnectionName;
|
|
84
|
+
// 匹配所有特殊字符都转为_
|
|
85
|
+
tsName = tsName.replace(/\W/g, '_');
|
|
86
|
+
if (/^\d/.test(tsName)) {
|
|
87
|
+
tsName = `$${tsName}`;
|
|
88
|
+
}
|
|
89
|
+
return tsName;
|
|
90
|
+
}
|
|
91
|
+
return '';
|
|
92
|
+
}
|
|
93
|
+
|
|
81
94
|
setCallCtor(connection: Connection) {
|
|
82
95
|
const calleeConnectionName = connection.name;
|
|
83
96
|
if (this.app) {
|
|
@@ -136,6 +149,11 @@ export class CallConnector extends CallLogic {
|
|
|
136
149
|
return calleeConnectionName ? `app.connections.${calleeConnectionName}` : '__IDENTIFIER__';
|
|
137
150
|
}
|
|
138
151
|
|
|
152
|
+
get calleeTSConnectionKey() {
|
|
153
|
+
const { calleeTSConnectionName } = this;
|
|
154
|
+
return calleeTSConnectionName ? `app.connections.${calleeTSConnectionName}` : '__IDENTIFIER__';
|
|
155
|
+
}
|
|
156
|
+
|
|
139
157
|
get connection() {
|
|
140
158
|
return this.app.connections.find((connection) => connection.name === this.calleeConnectionName);
|
|
141
159
|
}
|
|
@@ -206,7 +224,7 @@ export class CallConnector extends CallLogic {
|
|
|
206
224
|
if (this.handleError) {
|
|
207
225
|
code += 'nasl.util.autoHandleError(';
|
|
208
226
|
}
|
|
209
|
-
code += this.
|
|
227
|
+
code += this.calleeTSConnectionKey;
|
|
210
228
|
code += '(() => ';
|
|
211
229
|
code += this.calleeKey;
|
|
212
230
|
if (Array.isArray(this.typeArguments) && this.typeArguments.length) {
|