@lcap/nasl 3.4.0-beta.5 → 3.4.0-beta.6
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/b920244d-8d01-4e76-be5a-95132217c5a1.json +1 -0
- package/.nyc_output/processinfo/b920244d-8d01-4e76-be5a-95132217c5a1.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 +631 -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 +4081 -0
- package/coverage/src/common/Command.ts.html +310 -0
- package/coverage/src/common/EventEmitter.ts.html +373 -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 +331 -0
- package/coverage/src/concepts/Anchor__.ts.html +667 -0
- package/coverage/src/concepts/AnonymousFunction__.ts.html +2092 -0
- package/coverage/src/concepts/App__.ts.html +13651 -0
- package/coverage/src/concepts/Argument__.ts.html +907 -0
- package/coverage/src/concepts/Assignee__.ts.html +2317 -0
- package/coverage/src/concepts/AssignmentLine__.ts.html +430 -0
- package/coverage/src/concepts/Assignment__.ts.html +1174 -0
- package/coverage/src/concepts/Attribute__.ts.html +919 -0
- package/coverage/src/concepts/AuthInterface__.ts.html +370 -0
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +2011 -0
- package/coverage/src/concepts/AuthLogic__.ts.html +793 -0
- package/coverage/src/concepts/BackendVariable__.ts.html +1690 -0
- package/coverage/src/concepts/Backend__.ts.html +1192 -0
- package/coverage/src/concepts/BatchAssignment__.ts.html +3376 -0
- package/coverage/src/concepts/BinaryExpression__.ts.html +1468 -0
- package/coverage/src/concepts/BindAttribute__.ts.html +3931 -0
- package/coverage/src/concepts/BindDirective__.ts.html +2002 -0
- package/coverage/src/concepts/BindEvent__.ts.html +3487 -0
- package/coverage/src/concepts/BindStyle__.ts.html +1645 -0
- package/coverage/src/concepts/BooleanLiteral__.ts.html +421 -0
- package/coverage/src/concepts/CallAuthInterface__.ts.html +1642 -0
- package/coverage/src/concepts/CallConnector__.ts.html +925 -0
- package/coverage/src/concepts/CallFunction__.ts.html +2164 -0
- package/coverage/src/concepts/CallInterface__.ts.html +2776 -0
- package/coverage/src/concepts/CallLogic__.ts.html +4693 -0
- package/coverage/src/concepts/CallQueryComponent__.ts.html +5419 -0
- package/coverage/src/concepts/Comment__.ts.html +397 -0
- package/coverage/src/concepts/CompletionProperty__.ts.html +946 -0
- package/coverage/src/concepts/ConfigGroup__.ts.html +1132 -0
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +427 -0
- package/coverage/src/concepts/ConfigProperty__.ts.html +1375 -0
- package/coverage/src/concepts/Configuration__.ts.html +1054 -0
- package/coverage/src/concepts/Connection__.ts.html +1387 -0
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +598 -0
- package/coverage/src/concepts/Connector__.ts.html +4390 -0
- package/coverage/src/concepts/Constant__.ts.html +1123 -0
- package/coverage/src/concepts/DataSource__.ts.html +1798 -0
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +334 -0
- package/coverage/src/concepts/DefaultValue__.ts.html +946 -0
- package/coverage/src/concepts/Destination__.ts.html +2761 -0
- package/coverage/src/concepts/End__.ts.html +436 -0
- package/coverage/src/concepts/EntityIndex__.ts.html +799 -0
- package/coverage/src/concepts/EntityProperty__.ts.html +2866 -0
- package/coverage/src/concepts/Entity__.ts.html +3070 -0
- package/coverage/src/concepts/EnumItem__.ts.html +553 -0
- package/coverage/src/concepts/Enum__.ts.html +1258 -0
- package/coverage/src/concepts/Event__.ts.html +1111 -0
- package/coverage/src/concepts/ExternalDestination__.ts.html +1060 -0
- package/coverage/src/concepts/ForEachStatement__.ts.html +2023 -0
- package/coverage/src/concepts/FrontendLibrary__.ts.html +1762 -0
- package/coverage/src/concepts/FrontendVariable__.ts.html +292 -0
- package/coverage/src/concepts/Frontend__.ts.html +4078 -0
- package/coverage/src/concepts/Function__.ts.html +3718 -0
- package/coverage/src/concepts/Identifier__.ts.html +1060 -0
- package/coverage/src/concepts/IfStatement__.ts.html +1636 -0
- package/coverage/src/concepts/Integration__.ts.html +1273 -0
- package/coverage/src/concepts/InterfaceParam__.ts.html +1258 -0
- package/coverage/src/concepts/Interface__.ts.html +3463 -0
- package/coverage/src/concepts/JSBlock__.ts.html +424 -0
- package/coverage/src/concepts/JavaLogic__.ts.html +463 -0
- package/coverage/src/concepts/LogicItem__.ts.html +1174 -0
- package/coverage/src/concepts/Logic__.ts.html +7732 -0
- package/coverage/src/concepts/MatchCase__.ts.html +2974 -0
- package/coverage/src/concepts/Match__.ts.html +2494 -0
- package/coverage/src/concepts/MemberExpression__.ts.html +1744 -0
- package/coverage/src/concepts/MicroApp__.ts.html +439 -0
- package/coverage/src/concepts/Module__.ts.html +9385 -0
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +1072 -0
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +1045 -0
- package/coverage/src/concepts/Namespace__.ts.html +8221 -0
- package/coverage/src/concepts/NewComposite__.ts.html +4765 -0
- package/coverage/src/concepts/NewList__.ts.html +1702 -0
- package/coverage/src/concepts/NewMap__.ts.html +2470 -0
- package/coverage/src/concepts/New__.ts.html +289 -0
- package/coverage/src/concepts/NullLiteral__.ts.html +352 -0
- package/coverage/src/concepts/NumericLiteral__.ts.html +697 -0
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +1237 -0
- package/coverage/src/concepts/OverriddenLogic__.ts.html +6970 -0
- package/coverage/src/concepts/Param__.ts.html +1798 -0
- package/coverage/src/concepts/Point__.ts.html +334 -0
- package/coverage/src/concepts/ProcessComponent__.ts.html +1717 -0
- package/coverage/src/concepts/ProcessElement__.ts.html +6187 -0
- package/coverage/src/concepts/ProcessOutcome__.ts.html +355 -0
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +355 -0
- package/coverage/src/concepts/Process__.ts.html +5071 -0
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +589 -0
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +586 -0
- package/coverage/src/concepts/QueryFromExpression__.ts.html +937 -0
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +580 -0
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +1606 -0
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +664 -0
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +706 -0
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +1741 -0
- package/coverage/src/concepts/Rect__.ts.html +376 -0
- package/coverage/src/concepts/Return__.ts.html +1471 -0
- package/coverage/src/concepts/Role__.ts.html +604 -0
- package/coverage/src/concepts/SelectMembers__.ts.html +1279 -0
- package/coverage/src/concepts/Slot__.ts.html +649 -0
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +1003 -0
- package/coverage/src/concepts/Start__.ts.html +307 -0
- package/coverage/src/concepts/StringInterpolation__.ts.html +1156 -0
- package/coverage/src/concepts/StringLiteral__.ts.html +508 -0
- package/coverage/src/concepts/StructureProperty__.ts.html +1300 -0
- package/coverage/src/concepts/Structure__.ts.html +2182 -0
- package/coverage/src/concepts/SwitchCase__.ts.html +1204 -0
- package/coverage/src/concepts/SwitchStatement__.ts.html +904 -0
- package/coverage/src/concepts/Theme__.ts.html +361 -0
- package/coverage/src/concepts/Transactional__.ts.html +631 -0
- package/coverage/src/concepts/TriggerEvent__.ts.html +1039 -0
- package/coverage/src/concepts/TriggerLauncher__.ts.html +778 -0
- package/coverage/src/concepts/TypeAnnotation__.ts.html +3832 -0
- package/coverage/src/concepts/TypeParam__.ts.html +322 -0
- package/coverage/src/concepts/UnaryExpression__.ts.html +730 -0
- package/coverage/src/concepts/Unparsed__.ts.html +397 -0
- package/coverage/src/concepts/UseComponent__.ts.html +334 -0
- package/coverage/src/concepts/ValidationRule__.ts.html +1876 -0
- package/coverage/src/concepts/Variable__.ts.html +1705 -0
- package/coverage/src/concepts/ViewBlock__.ts.html +355 -0
- package/coverage/src/concepts/ViewComponent__.ts.html +4327 -0
- package/coverage/src/concepts/ViewElement__.ts.html +8992 -0
- package/coverage/src/concepts/View__.ts.html +9019 -0
- package/coverage/src/concepts/WhileStatement__.ts.html +1105 -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 +6955 -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 +1976 -0
- package/coverage/src/concepts/index.ts.html +103 -0
- package/coverage/src/concepts/index__.ts.html +454 -0
- package/coverage/src/config.ts.html +325 -0
- package/coverage/src/decorators/index.html +131 -0
- package/coverage/src/decorators/index.ts.html +583 -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 +1084 -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 +124 -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 +2707 -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 +919 -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 +1606 -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 +14356 -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 +397 -0
- package/coverage/src/service/creator/errHandles.js.html +304 -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 +3721 -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 +1021 -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 +973 -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 +694 -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 +2 -19
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +11 -0
- package/out/common/BaseNode.js +57 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/index.d.ts +1 -0
- package/out/common/index.js +1 -0
- package/out/common/index.js.map +1 -1
- package/out/common/utils.d.ts +2 -0
- package/out/common/utils.js +18 -0
- package/out/common/utils.js.map +1 -0
- package/out/concepts/Abort__.d.ts +2 -2
- package/out/concepts/Abort__.js +6 -2
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/Anchor__.d.ts +2 -2
- package/out/concepts/Anchor__.js +5 -4
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.d.ts +3 -3
- package/out/concepts/AnonymousFunction__.js +19 -15
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/Argument__.d.ts +2 -2
- package/out/concepts/Argument__.js +12 -13
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.d.ts +2 -2
- package/out/concepts/Assignee__.js +11 -9
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +2 -2
- package/out/concepts/AssignmentLine__.js +3 -2
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.d.ts +2 -2
- package/out/concepts/Assignment__.js +13 -29
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/AuthInterface__.js +1 -1
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +2 -2
- package/out/concepts/AuthLogicForCallInterface__.js +56 -75
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/BackendVariable__.d.ts +5 -8
- package/out/concepts/BackendVariable__.js +47 -29
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.d.ts +4 -7
- package/out/concepts/Backend__.js +7 -6
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.d.ts +2 -2
- package/out/concepts/BatchAssignment__.js +19 -20
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.d.ts +2 -2
- package/out/concepts/BinaryExpression__.js +37 -38
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +4 -4
- package/out/concepts/BindAttribute__.js +39 -32
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.d.ts +2 -2
- package/out/concepts/BindDirective__.js +10 -8
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.d.ts +4 -7
- package/out/concepts/BindEvent__.js +20 -18
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +2 -2
- package/out/concepts/BindStyle__.js +9 -7
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/Block__.d.ts +6 -2
- package/out/concepts/Block__.js +36 -5
- package/out/concepts/Block__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.d.ts +2 -2
- package/out/concepts/BooleanLiteral__.js +2 -2
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +3 -2
- package/out/concepts/CallAuthInterface__.js +46 -30
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.d.ts +2 -2
- package/out/concepts/CallConnector__.js +25 -23
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.d.ts +2 -2
- package/out/concepts/CallFunction__.js +19 -16
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +3 -2
- package/out/concepts/CallInterface__.js +16 -6
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.d.ts +2 -3
- package/out/concepts/CallLogic__.js +26 -20
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.d.ts +4 -4
- package/out/concepts/CallQueryComponent__.js +38 -36
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.d.ts +2 -2
- package/out/concepts/Comment__.js +3 -2
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/ConfigProperty__.d.ts +4 -7
- package/out/concepts/ConfigProperty__.js +12 -10
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +4 -7
- package/out/concepts/Connection__.js +6 -5
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.d.ts +3 -3
- package/out/concepts/Constant__.js +38 -13
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +4 -7
- package/out/concepts/DataSource__.js +7 -6
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DefaultValue__.d.ts +6 -2
- package/out/concepts/DefaultValue__.js +11 -3
- package/out/concepts/DefaultValue__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +3 -3
- package/out/concepts/Destination__.js +29 -26
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.d.ts +2 -2
- package/out/concepts/End__.js +17 -13
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.d.ts +2 -2
- package/out/concepts/EntityIndex__.js +4 -3
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +2 -2
- package/out/concepts/EntityProperty__.js +9 -8
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +4 -7
- package/out/concepts/Entity__.js +22 -22
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.d.ts +2 -2
- package/out/concepts/EnumItem__.js +4 -3
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.d.ts +4 -7
- package/out/concepts/Enum__.js +10 -8
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/ExternalDestination__.d.ts +2 -2
- package/out/concepts/ExternalDestination__.js +7 -5
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +2 -2
- package/out/concepts/ForEachStatement__.js +14 -12
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Frontend__.d.ts +4 -7
- package/out/concepts/Frontend__.js +7 -6
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.d.ts +3 -3
- package/out/concepts/Function__.js +22 -18
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.d.ts +2 -2
- package/out/concepts/Identifier__.js +19 -23
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +2 -2
- package/out/concepts/IfStatement__.js +12 -10
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/ImportedInterface__.d.ts +20 -0
- package/out/concepts/ImportedInterface__.js +57 -0
- package/out/concepts/ImportedInterface__.js.map +1 -0
- package/out/concepts/InterfaceParam__.d.ts +2 -7
- package/out/concepts/InterfaceParam__.js +33 -14
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.d.ts +7 -15
- package/out/concepts/Interface__.js +33 -43
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.d.ts +2 -2
- package/out/concepts/JSBlock__.js +3 -58
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.d.ts +2 -2
- package/out/concepts/JavaLogic__.js +6 -2
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +2 -2
- package/out/concepts/LogicItem__.js +7 -13
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +8 -11
- package/out/concepts/Logic__.js +124 -157
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +2 -2
- package/out/concepts/MatchCase__.js +23 -22
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +2 -2
- package/out/concepts/Match__.js +24 -22
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +2 -2
- package/out/concepts/MemberExpression__.js +28 -24
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MetadataType__.d.ts +4 -7
- package/out/concepts/MetadataType__.js +11 -9
- package/out/concepts/MetadataType__.js.map +1 -1
- package/out/concepts/Module__.d.ts +8 -179
- package/out/concepts/Module__.js +124 -265
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/NewComposite__.d.ts +5 -5
- package/out/concepts/NewComposite__.js +75 -76
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.d.ts +5 -5
- package/out/concepts/NewList__.js +30 -26
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.d.ts +4 -4
- package/out/concepts/NewMap__.js +39 -35
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/New__.d.ts +2 -2
- package/out/concepts/New__.js +3 -2
- package/out/concepts/New__.js.map +1 -1
- package/out/concepts/NullLiteral__.d.ts +2 -2
- package/out/concepts/NullLiteral__.js +2 -2
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.d.ts +2 -2
- package/out/concepts/NumericLiteral__.js +6 -5
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +2 -2
- package/out/concepts/OqlQueryComponent__.js +16 -14
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.d.ts +8 -11
- package/out/concepts/OverriddenLogic__.js +99 -112
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.d.ts +3 -3
- package/out/concepts/Param__.js +24 -30
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +2 -2
- package/out/concepts/ProcessElement__.js +54 -68
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.d.ts +2 -1
- package/out/concepts/ProcessOutcome__.js +5 -4
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.d.ts +2 -1
- package/out/concepts/ProcessOutcomes__.js +6 -5
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.d.ts +4 -7
- package/out/concepts/Process__.js +35 -52
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.d.ts +2 -2
- package/out/concepts/QueryAggregateExpression__.js +2 -2
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.d.ts +2 -2
- package/out/concepts/QueryFieldExpression__.js +5 -4
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.d.ts +2 -2
- package/out/concepts/QueryFromExpression__.js +8 -6
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.d.ts +2 -1
- package/out/concepts/QueryGroupByExpression__.js +6 -5
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.d.ts +2 -2
- package/out/concepts/QueryJoinExpression__.js +12 -10
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.d.ts +2 -2
- package/out/concepts/QueryLimitExpression__.js +6 -5
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +2 -2
- package/out/concepts/QueryOrderByExpression__.js +6 -5
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/Return__.d.ts +3 -3
- package/out/concepts/Return__.js +41 -24
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.d.ts +4 -7
- package/out/concepts/Role__.js +7 -6
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +2 -2
- package/out/concepts/SelectMembers__.js +3 -2
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +2 -2
- package/out/concepts/SqlQueryComponent__.js +12 -10
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.d.ts +2 -2
- package/out/concepts/Start__.js +2 -2
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringInterpolation__.d.ts +2 -2
- package/out/concepts/StringInterpolation__.js +7 -5
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.d.ts +2 -2
- package/out/concepts/StringLiteral__.js +12 -6
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.d.ts +2 -2
- package/out/concepts/StructureProperty__.js +6 -5
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.d.ts +4 -7
- package/out/concepts/Structure__.js +15 -15
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.d.ts +2 -2
- package/out/concepts/SwitchCase__.js +12 -10
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.d.ts +2 -2
- package/out/concepts/SwitchStatement__.js +8 -6
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +4 -7
- package/out/concepts/TriggerLauncher__.js +7 -6
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -2
- package/out/concepts/TypeAnnotation__.js +51 -25
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +2 -2
- package/out/concepts/TypeParam__.js +4 -3
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.d.ts +2 -2
- package/out/concepts/UnaryExpression__.js +12 -7
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.d.ts +2 -2
- package/out/concepts/Unparsed__.js +2 -2
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/ValidationRule__.d.ts +2 -2
- package/out/concepts/ValidationRule__.js +11 -9
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.d.ts +5 -8
- package/out/concepts/Variable__.js +49 -32
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +6 -6
- package/out/concepts/ViewElement__.js +110 -137
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +6 -9
- package/out/concepts/View__.js +76 -84
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.d.ts +2 -2
- package/out/concepts/WhileStatement__.js +9 -7
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/index__.d.ts +1 -1
- package/out/concepts/index__.js +1 -1
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/types__.d.ts +1 -3
- package/out/decorators/index.js +10 -9
- package/out/decorators/index.js.map +1 -1
- package/out/generator/genMetaData.js +0 -7
- package/out/generator/genMetaData.js.map +1 -1
- package/out/manager/diagnostic.d.ts +1 -1
- package/out/manager/diagnostic.js +2 -3
- package/out/manager/diagnostic.js.map +1 -1
- package/out/server/extendBaseNode.js +7 -24
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/getConnector.js +8 -3
- package/out/server/getConnector.js.map +1 -1
- package/out/server/getLogics.js +13 -3
- package/out/server/getLogics.js.map +1 -1
- package/out/server/naslServer.d.ts +44 -46
- package/out/server/naslServer.js +333 -461
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +1 -1
- package/out/server/translator.js.map +1 -1
- package/out/templator/genCreateBlock.js +5 -9
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +12 -18
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +8 -10
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEditTableBlock.js +2 -3
- package/out/templator/genEditTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +9 -12
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.js.map +1 -1
- package/out/translator/types.d.ts +16 -3
- package/out/translator/utils.d.ts +19 -1
- package/out/translator/utils.js +90 -2
- package/out/translator/utils.js.map +1 -1
- package/out/utils/time-slicing/constant.d.ts +35 -0
- package/out/utils/time-slicing/constant.js +40 -0
- package/out/utils/time-slicing/constant.js.map +1 -0
- package/out/utils/time-slicing/controller.d.ts +53 -0
- package/out/utils/time-slicing/controller.js +280 -0
- package/out/utils/time-slicing/controller.js.map +1 -0
- package/out/utils/time-slicing/index.d.ts +5 -0
- package/out/utils/time-slicing/index.js +26 -0
- package/out/utils/time-slicing/index.js.map +1 -0
- package/out/utils/time-slicing/page-state.d.ts +2 -0
- package/out/utils/time-slicing/page-state.js +14 -0
- package/out/utils/time-slicing/page-state.js.map +1 -0
- package/out/utils/time-slicing/performance.d.ts +11 -0
- package/out/utils/time-slicing/performance.js +51 -0
- package/out/utils/time-slicing/performance.js.map +1 -0
- package/out/utils/time-slicing/runner.d.ts +12 -0
- package/out/utils/time-slicing/runner.js +53 -0
- package/out/utils/time-slicing/runner.js.map +1 -0
- package/out/utils/time-slicing/tool.d.ts +24 -0
- package/out/utils/time-slicing/tool.js +47 -0
- package/out/utils/time-slicing/tool.js.map +1 -0
- package/out/utils/time-slicing/utils.d.ts +62 -0
- package/out/utils/time-slicing/utils.js +47 -0
- package/out/utils/time-slicing/utils.js.map +1 -0
- package/out/utils/time-slicing/wrapper.d.ts +18 -0
- package/out/utils/time-slicing/wrapper.js +55 -0
- package/out/utils/time-slicing/wrapper.js.map +1 -0
- package/out/utils/types.d.ts +7 -0
- package/package.json +1 -1
- package/sandbox/stdlib/nasl.core.ts +0 -2
- package/sandbox/stdlib/nasl.util.ts +1 -1
- package/src/bak/translator.js +2 -17
- package/src/common/BaseNode.ts +73 -7
- package/src/common/index.ts +1 -0
- package/src/common/utils.ts +17 -0
- package/src/concepts/Abort__.ts +12 -3
- package/src/concepts/Anchor__.ts +15 -5
- package/src/concepts/AnonymousFunction__.ts +29 -23
- package/src/concepts/Argument__.ts +25 -14
- package/src/concepts/Assignee__.ts +21 -10
- package/src/concepts/AssignmentLine__.ts +13 -3
- package/src/concepts/Assignment__.ts +33 -42
- package/src/concepts/AuthInterface__.ts +3 -3
- package/src/concepts/AuthLogicForCallInterface__.ts +63 -84
- package/src/concepts/BackendVariable__.ts +35 -30
- package/src/concepts/Backend__.ts +24 -7
- package/src/concepts/BatchAssignment__.ts +30 -21
- package/src/concepts/BinaryExpression__.ts +47 -38
- package/src/concepts/BindAttribute__.ts +43 -39
- package/src/concepts/BindDirective__.ts +19 -9
- package/src/concepts/BindEvent__.ts +31 -26
- package/src/concepts/BindStyle__.ts +18 -8
- package/src/concepts/Block__.ts +22 -6
- package/src/concepts/BooleanLiteral__.ts +11 -3
- package/src/concepts/CallAuthInterface__.ts +58 -33
- package/src/concepts/CallConnector__.ts +34 -26
- package/src/concepts/CallFunction__.ts +22 -17
- package/src/concepts/CallInterface__.ts +30 -12
- package/src/concepts/CallLogic__.ts +46 -47
- package/src/concepts/CallQueryComponent__.ts +48 -46
- package/src/concepts/Comment__.ts +13 -3
- package/src/concepts/ConfigProperty__.ts +22 -12
- package/src/concepts/Connection__.ts +22 -6
- package/src/concepts/Connector__.ts +1 -1
- package/src/concepts/Constant__.ts +24 -14
- package/src/concepts/DataSource__.ts +16 -7
- package/src/concepts/DefaultValue__.ts +13 -4
- package/src/concepts/Destination__.ts +39 -33
- package/src/concepts/End__.ts +24 -15
- package/src/concepts/EntityIndex__.ts +13 -4
- package/src/concepts/EntityProperty__.ts +20 -10
- package/src/concepts/Entity__.ts +34 -27
- package/src/concepts/EnumItem__.ts +13 -4
- package/src/concepts/Enum__.ts +21 -10
- package/src/concepts/ExternalDestination__.ts +16 -7
- package/src/concepts/ForEachStatement__.ts +24 -14
- package/src/concepts/Frontend__.ts +18 -7
- package/src/concepts/Function__.ts +30 -21
- package/src/concepts/Identifier__.ts +32 -34
- package/src/concepts/IfStatement__.ts +22 -14
- package/src/concepts/ImportedInterface__.ts +61 -0
- package/src/concepts/InterfaceParam__.ts +19 -16
- package/src/concepts/Interface__.ts +45 -51
- package/src/concepts/JSBlock__.ts +12 -61
- package/src/concepts/JavaLogic__.ts +13 -3
- package/src/concepts/LogicItem__.ts +13 -14
- package/src/concepts/Logic__.ts +147 -172
- package/src/concepts/MatchCase__.ts +33 -27
- package/src/concepts/Match__.ts +34 -26
- package/src/concepts/MemberExpression__.ts +37 -25
- package/src/concepts/MetadataType__.ts +22 -10
- package/src/concepts/Module__.ts +177 -540
- package/src/concepts/NewComposite__.ts +86 -80
- package/src/concepts/NewList__.ts +40 -32
- package/src/concepts/NewMap__.ts +49 -42
- package/src/concepts/New__.ts +13 -3
- package/src/concepts/NullLiteral__.ts +11 -3
- package/src/concepts/NumericLiteral__.ts +15 -6
- package/src/concepts/OqlQueryComponent__.ts +26 -18
- package/src/concepts/OverriddenLogic__.ts +117 -125
- package/src/concepts/Param__.ts +42 -38
- package/src/concepts/ProcessElement__.ts +67 -79
- package/src/concepts/ProcessOutcome__.ts +14 -6
- package/src/concepts/ProcessOutcomes__.ts +15 -7
- package/src/concepts/Process__.ts +50 -61
- package/src/concepts/QueryAggregateExpression__.ts +11 -3
- package/src/concepts/QueryFieldExpression__.ts +14 -5
- package/src/concepts/QueryFromExpression__.ts +18 -7
- package/src/concepts/QueryGroupByExpression__.ts +14 -6
- package/src/concepts/QueryJoinExpression__.ts +22 -11
- package/src/concepts/QueryLimitExpression__.ts +16 -6
- package/src/concepts/QueryOrderByExpression__.ts +17 -6
- package/src/concepts/Return__.ts +27 -25
- package/src/concepts/Role__.ts +17 -8
- package/src/concepts/SelectMembers__.ts +13 -3
- package/src/concepts/SqlQueryComponent__.ts +22 -11
- package/src/concepts/Start__.ts +11 -3
- package/src/concepts/StringInterpolation__.ts +10 -5
- package/src/concepts/StringLiteral__.ts +20 -7
- package/src/concepts/StructureProperty__.ts +16 -6
- package/src/concepts/Structure__.ts +26 -18
- package/src/concepts/SwitchCase__.ts +22 -14
- package/src/concepts/SwitchStatement__.ts +17 -7
- package/src/concepts/TriggerLauncher__.ts +17 -7
- package/src/concepts/TypeAnnotation__.ts +36 -26
- package/src/concepts/TypeParam__.ts +13 -4
- package/src/concepts/UnaryExpression__.ts +22 -9
- package/src/concepts/Unparsed__.ts +11 -3
- package/src/concepts/ValidationRule__.ts +21 -17
- package/src/concepts/Variable__.ts +37 -33
- package/src/concepts/ViewElement__.ts +128 -156
- package/src/concepts/View__.ts +101 -101
- package/src/concepts/WhileStatement__.ts +19 -10
- package/src/concepts/index__.ts +1 -1
- package/src/concepts/types__.ts +1 -5
- package/src/decorators/index.ts +10 -9
- package/src/generator/genMetaData.ts +2 -12
- package/src/manager/diagnostic.ts +3 -4
- package/src/server/extendBaseNode.ts +8 -24
- package/src/server/getConnector.ts +8 -3
- package/src/server/getLogics.ts +15 -3
- package/src/server/naslServer.ts +717 -749
- package/src/server/translator.ts +1 -1
- package/src/templator/genCreateBlock.ts +5 -9
- package/src/templator/genCurdEditMultipleKeyBlock.ts +13 -19
- package/src/templator/genCurdMultipleKeyBlock.ts +11 -14
- package/src/templator/genEditTableBlock.ts +2 -4
- package/src/templator/genUpdateBlock.ts +12 -15
- package/src/templator/utils.ts +7 -8
- package/src/translator/types.ts +20 -5
- package/src/translator/utils.ts +100 -5
- package/src/utils/time-slicing/constant.ts +37 -0
- package/src/utils/time-slicing/controller.ts +342 -0
- package/src/utils/time-slicing/index.ts +6 -0
- package/src/utils/time-slicing/page-state.ts +12 -0
- package/src/utils/time-slicing/performance.ts +56 -0
- package/src/utils/time-slicing/runner.ts +54 -0
- package/src/utils/time-slicing/tool.ts +45 -0
- package/src/utils/time-slicing/utils.ts +90 -0
- package/src/utils/time-slicing/wrapper.ts +58 -0
- package/src/utils/types.ts +9 -0
- package/test/concepts/anonymous-function/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/assignment/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/batch-assignment/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/binary-expression/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
- package/test/concepts/binary-expression/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/boolean-literal/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-function/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-interface/__snapshots__/toJS.spec.ts.snap +3 -3
- package/test/concepts/call-interface/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +5 -5
- package/test/concepts/call-logic/getQuickInfoOffset.spec.ts +2 -1
- package/test/concepts/call-logic/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/data-source/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/data-source/toEmbeddedTSFile.spec.ts +2 -1
- package/test/concepts/entity/__snapshots__/toEmbeddedTS.spec.ts.snap +19 -19
- package/test/concepts/entity/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/identifier/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/match/__snapshots__/toJS.spec.ts.snap +1 -1
- package/test/concepts/match/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/member-expression/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/null-literal/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/numeric-literal/__snapshots__/toJS.spec.ts.snap +1 -1
- package/test/concepts/numeric-literal/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/string-literal/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/validation-rule/__snapshots__/toJS.spec.ts.snap +3 -3
- package/test/concepts/validation-rule/toEmbeddedTS.spec.ts +2 -1
- package/test/concepts/validation-rule/validation-rule.spec.ts +2 -1
- package/test/concepts/view-element/__snapshots__/toEmbeddedTS.spec.ts.snap +3 -3
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +0 -4
- package/test/concepts/view-element/toEmbeddedTS.spec.ts +2 -1
- package/test/time-slicing/runner.spec.ts +28 -0
- package/test/time-slicing/time-slicing-nodejs.spec.ts +27 -0
- package/test/time-slicing/utils.ts +7 -0
- package/test/time-slicing/wrapper.spec.ts +92 -0
- package/ts-worker/lib/tsserver.js +10 -1
- package/ts-worker/package.json +1 -0
- package/ts-worker/src/index.js +13 -12
- package/ts-worker/webpack.config.js +1 -1
- package/out/concepts/InterfaceFromExample__.d.ts +0 -88
- package/out/concepts/InterfaceFromExample__.js +0 -183
- package/out/concepts/InterfaceFromExample__.js.map +0 -1
- package/out/utils/time-slicing.d.ts +0 -41
- package/out/utils/time-slicing.js +0 -82
- package/out/utils/time-slicing.js.map +0 -1
- package/src/concepts/InterfaceFromExample__.ts +0 -205
- package/src/utils/time-slicing.ts +0 -111
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.returnOrigin = exports.isGenerator = exports.getFrameMark = exports.getGroupMark = exports.getAsyncMark = exports.delay = exports.getId = void 0;
|
|
4
|
+
/** 编号 */
|
|
5
|
+
let id = 0;
|
|
6
|
+
function getId() {
|
|
7
|
+
return id++;
|
|
8
|
+
}
|
|
9
|
+
exports.getId = getId;
|
|
10
|
+
/** 延迟 */
|
|
11
|
+
function delay(time = 10) {
|
|
12
|
+
return new Promise((resolve) => setTimeout(resolve, time));
|
|
13
|
+
}
|
|
14
|
+
exports.delay = delay;
|
|
15
|
+
function getAsyncMark(id) {
|
|
16
|
+
return {
|
|
17
|
+
AsyncStart: `AsyncStart-${id}`,
|
|
18
|
+
AsyncEnd: `AsyncEnd-${id}`,
|
|
19
|
+
AsyncMeasure: `AsyncMeasure-${id}`,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.getAsyncMark = getAsyncMark;
|
|
23
|
+
function getGroupMark(id) {
|
|
24
|
+
return {
|
|
25
|
+
GroupStart: `GroupStart-${id}`,
|
|
26
|
+
GroupEnd: `GroupEnd-${id}`,
|
|
27
|
+
GroupMeasure: `GroupMeasure-${id}`,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
exports.getGroupMark = getGroupMark;
|
|
31
|
+
function getFrameMark(id) {
|
|
32
|
+
return {
|
|
33
|
+
FrameStart: `FrameStart-${id}`,
|
|
34
|
+
FrameEnd: `FrameEnd-${id}`,
|
|
35
|
+
FrameMeasure: `FrameMeasure-${id}`,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.getFrameMark = getFrameMark;
|
|
39
|
+
function isGenerator(value) {
|
|
40
|
+
return value && typeof value[Symbol.iterator] === 'function';
|
|
41
|
+
}
|
|
42
|
+
exports.isGenerator = isGenerator;
|
|
43
|
+
function* returnOrigin(defaultVal) {
|
|
44
|
+
return defaultVal;
|
|
45
|
+
}
|
|
46
|
+
exports.returnOrigin = returnOrigin;
|
|
47
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/utils/time-slicing/utils.ts"],"names":[],"mappings":";;;AA0CA,SAAS;AACT,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX,SAAgB,KAAK;IACnB,OAAO,EAAE,EAAE,CAAC;AACd,CAAC;AAFD,sBAEC;AAED,SAAS;AACT,SAAgB,KAAK,CAAC,OAAe,EAAE;IACrC,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC;AAFD,sBAEC;AAED,SAAgB,YAAY,CAAC,EAAU;IACrC,OAAO;QACL,UAAU,EAAE,cAAc,EAAE,EAAE;QAC9B,QAAQ,EAAE,YAAY,EAAE,EAAE;QAC1B,YAAY,EAAE,gBAAgB,EAAE,EAAE;KACnC,CAAC;AACJ,CAAC;AAND,oCAMC;AAED,SAAgB,YAAY,CAAC,EAAU;IACrC,OAAO;QACL,UAAU,EAAE,cAAc,EAAE,EAAE;QAC9B,QAAQ,EAAE,YAAY,EAAE,EAAE;QAC1B,YAAY,EAAE,gBAAgB,EAAE,EAAE;KACnC,CAAC;AACJ,CAAC;AAND,oCAMC;AAED,SAAgB,YAAY,CAAC,EAAU;IACrC,OAAO;QACL,UAAU,EAAE,cAAc,EAAE,EAAE;QAC9B,QAAQ,EAAE,YAAY,EAAE,EAAE;QAC1B,YAAY,EAAE,gBAAgB,EAAE,EAAE;KACnC,CAAC;AACJ,CAAC;AAND,oCAMC;AAED,SAAgB,WAAW,CAAC,KAAc;IACxC,OAAO,KAAK,IAAI,OAAQ,KAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC;AACxE,CAAC;AAFD,kCAEC;AAOD,QAAe,CAAC,CAAC,YAAY,CAAI,UAAc;IAC7C,OAAO,UAAU,CAAC;AACpB,CAAC;AAFD,oCAEC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 迭代器包装为生成器
|
|
3
|
+
*
|
|
4
|
+
* @description 回调中允许使用生成器
|
|
5
|
+
*/
|
|
6
|
+
export declare function wrapIteratorToGenerator<T>(list: IterableIterator<T>, forEach: (item: T, index: number, arr: T[]) => (any | Generator<any, any, any>)): Generator<any, any, any>;
|
|
7
|
+
/**
|
|
8
|
+
* 数组 forEach 回调包装为生成器
|
|
9
|
+
*
|
|
10
|
+
* @description 回调中允许使用生成器
|
|
11
|
+
*/
|
|
12
|
+
export declare function wrapForEachToGenerator<T>(list: T[], forEach: (item: T, index: number, arr: T[]) => (any | Generator<any, any, any>)): Generator<any, any, any>;
|
|
13
|
+
/**
|
|
14
|
+
* 数组 map 回调包装为生成器
|
|
15
|
+
*
|
|
16
|
+
* @description 回调中允许使用生成器
|
|
17
|
+
*/
|
|
18
|
+
export declare function wrapMapToGenerator<T, U>(list: T[], map: (item: T, index: number, arr: T[]) => (U | Generator<any, U, any>)): Generator<any, U[], any>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapMapToGenerator = exports.wrapForEachToGenerator = exports.wrapIteratorToGenerator = void 0;
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
/**
|
|
6
|
+
* 迭代器包装为生成器
|
|
7
|
+
*
|
|
8
|
+
* @description 回调中允许使用生成器
|
|
9
|
+
*/
|
|
10
|
+
function wrapIteratorToGenerator(list, forEach) {
|
|
11
|
+
return wrapForEachToGenerator(Array.from(list), forEach);
|
|
12
|
+
}
|
|
13
|
+
exports.wrapIteratorToGenerator = wrapIteratorToGenerator;
|
|
14
|
+
/**
|
|
15
|
+
* 数组 forEach 回调包装为生成器
|
|
16
|
+
*
|
|
17
|
+
* @description 回调中允许使用生成器
|
|
18
|
+
*/
|
|
19
|
+
function wrapForEachToGenerator(list, forEach) {
|
|
20
|
+
const len = list.length;
|
|
21
|
+
return (function* transformListToGenerator() {
|
|
22
|
+
for (let i = 0; i < len; i++) {
|
|
23
|
+
const result = forEach(list[i], i, list);
|
|
24
|
+
if ((0, utils_1.isGenerator)(result)) {
|
|
25
|
+
yield* result;
|
|
26
|
+
}
|
|
27
|
+
yield;
|
|
28
|
+
}
|
|
29
|
+
})();
|
|
30
|
+
}
|
|
31
|
+
exports.wrapForEachToGenerator = wrapForEachToGenerator;
|
|
32
|
+
/**
|
|
33
|
+
* 数组 map 回调包装为生成器
|
|
34
|
+
*
|
|
35
|
+
* @description 回调中允许使用生成器
|
|
36
|
+
*/
|
|
37
|
+
function wrapMapToGenerator(list, map) {
|
|
38
|
+
const len = list.length;
|
|
39
|
+
const resultArr = Array(len);
|
|
40
|
+
return (function* transformListToGenerator() {
|
|
41
|
+
for (let i = 0; i < len; i++) {
|
|
42
|
+
const result = map(list[i], i, list);
|
|
43
|
+
if ((0, utils_1.isGenerator)(result)) {
|
|
44
|
+
resultArr[i] = yield* result;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
resultArr[i] = result;
|
|
48
|
+
}
|
|
49
|
+
yield;
|
|
50
|
+
}
|
|
51
|
+
return resultArr;
|
|
52
|
+
})();
|
|
53
|
+
}
|
|
54
|
+
exports.wrapMapToGenerator = wrapMapToGenerator;
|
|
55
|
+
//# sourceMappingURL=wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapper.js","sourceRoot":"","sources":["../../../src/utils/time-slicing/wrapper.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAEtC;;;;GAIG;AACH,SAAgB,uBAAuB,CAAI,IAAyB,EAAE,OAA+E;IACnJ,OAAO,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AAC3D,CAAC;AAFD,0DAEC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB,CAAI,IAAS,EAAE,OAA+E;IAClI,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;IAExB,OAAO,CAAC,QAAQ,CAAC,CAAC,wBAAwB;QACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC5B,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;YAEzC,IAAI,IAAA,mBAAW,EAAC,MAAM,CAAC,EAAE;gBACvB,KAAK,CAAC,CAAC,MAAM,CAAC;aACf;YAED,KAAK,CAAC;SACP;IACH,CAAC,CAAC,EAAE,CAAC;AACP,CAAC;AAdD,wDAcC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAO,IAAS,EAAE,GAAuE;IACzH,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;IACxB,MAAM,SAAS,GAAQ,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,OAAO,CAAC,QAAQ,CAAC,CAAC,wBAAwB;QACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;YAC5B,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;YAErC,IAAI,IAAA,mBAAW,EAAC,MAAM,CAAC,EAAE;gBACvB,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC;aAC9B;iBACI;gBACH,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;aACvB;YAED,KAAK,CAAC;SACP;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC,EAAE,CAAC;AACP,CAAC;AApBD,gDAoBC"}
|
package/out/utils/types.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
+
import type { SourceMap } from '../translator';
|
|
1
2
|
export declare type GetPromise<T> = T extends Promise<infer R> ? R : never;
|
|
3
|
+
export interface EmbeddedTSFileResult {
|
|
4
|
+
code: string;
|
|
5
|
+
filePath: string;
|
|
6
|
+
sourceMap: SourceMap;
|
|
7
|
+
}
|
|
8
|
+
export declare type EmbeddedTSFileGenerator = Generator<void, EmbeddedTSFileResult, string>;
|
package/package.json
CHANGED
|
@@ -85,9 +85,7 @@ declare namespace nasl.core {
|
|
|
85
85
|
export function remainder(left: Long, right: Long): Long;
|
|
86
86
|
|
|
87
87
|
export function equal<T>(left: T, right: T): Boolean;
|
|
88
|
-
export function isEqual<T>(left: T, right: T): Boolean;
|
|
89
88
|
export function notEqual<T>(left: T, right: T): Boolean;
|
|
90
|
-
export function isNotEqual<T>(left: T, right: T): Boolean;
|
|
91
89
|
|
|
92
90
|
export function greaterThan(left: Long, right: Long): Boolean;
|
|
93
91
|
export function greaterThan(left: String, right: String): Boolean;
|
|
@@ -7,7 +7,7 @@ declare namespace nasl.util {
|
|
|
7
7
|
export function Convert(value: nasl.core.Date): <T extends nasl.core.DateTime | nasl.core.String>() => T;
|
|
8
8
|
export function Convert(value: nasl.core.Time): <T extends nasl.core.String>() => T;
|
|
9
9
|
export function Convert(value: nasl.core.DateTime): <T extends nasl.core.Date | nasl.core.Time | nasl.core.String | nasl.core.Long>() => T;
|
|
10
|
-
export function Convert(value: nasl.core.Boolean): <T extends nasl.core.String | nasl.core.Long >() => T;
|
|
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
13
|
export function ToString(value: nasl.core.Any, timeZone?: nasl.core.String): nasl.core.String;
|
package/src/bak/translator.js
CHANGED
|
@@ -41,9 +41,6 @@ export default function (definition, view) {
|
|
|
41
41
|
typeNamespace = typeAn.typeNamespace;
|
|
42
42
|
typeName = typeAn.typeName;
|
|
43
43
|
sortedTypeKey = `${typeNamespace}.${typeName}`;
|
|
44
|
-
if (`${viewVariable.defaultValue}` === 'undefined' || `${viewVariable.defaultValue}` === 'null') {
|
|
45
|
-
viewVariable.defaultValue = ''
|
|
46
|
-
}
|
|
47
44
|
}
|
|
48
45
|
const needGenInitFromSchema =
|
|
49
46
|
typeAnnotation && (!['primitive', 'union'].includes(typeKind) || typeName === 'DateTime');
|
|
@@ -57,21 +54,9 @@ export default function (definition, view) {
|
|
|
57
54
|
|
|
58
55
|
const { defaultValue } = viewVariable;
|
|
59
56
|
// 设置成null,才能同步给后端清除该值,但是null对checkbox组件是一种特殊状态
|
|
60
|
-
|
|
61
|
-
const isDecimal = typeKind === 'primitive' && ['Decimal', "Double"].includes(typeName)
|
|
62
|
-
const isInteger = typeKind === 'primitive' && ['Long', "Integer"].includes(typeName)
|
|
57
|
+
const parsedValue = defaultValue?.expression?.toJS?.() ?? undefined;
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
const isNil = val => val === undefined || val === null;
|
|
66
|
-
if (isDecimal) {
|
|
67
|
-
parsedValue = isNil(parsedValue) ? parsedValue : `new NaslDecimal('${parsedValue}')`
|
|
68
|
-
code += `${parsedValue} `;
|
|
69
|
-
} else if (isInteger) {
|
|
70
|
-
parsedValue = isNil(parsedValue) ? parsedValue : `new NaslLong('${parsedValue}')`
|
|
71
|
-
code += `${parsedValue} `;
|
|
72
|
-
} else {
|
|
73
|
-
code += `${JSON.stringify(parsedValue)} `;
|
|
74
|
-
}
|
|
59
|
+
code += `${JSON.stringify(parsedValue)} `;
|
|
75
60
|
if (needGenInitFromSchema) {
|
|
76
61
|
code += `)`;
|
|
77
62
|
}
|
package/src/common/BaseNode.ts
CHANGED
|
@@ -95,7 +95,6 @@ export class BaseNode extends EventEmitter {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
|
|
99
98
|
/**
|
|
100
99
|
* toJSON 时需要去除的键,为了避免出现 CircularJSON
|
|
101
100
|
*/
|
|
@@ -531,7 +530,12 @@ export class BaseNode extends EventEmitter {
|
|
|
531
530
|
|
|
532
531
|
// 自定义连接器下的namespace删除的时候需要同时删除对应的logic
|
|
533
532
|
if (this.concept === 'Namespace' && this.parentNode.concept === 'Connector') {
|
|
534
|
-
(this as unknown as Namespace).logics.
|
|
533
|
+
while((this as unknown as Namespace).logics.length > 0) {
|
|
534
|
+
const curLogic = (this as unknown as Namespace).logics?.shift();
|
|
535
|
+
if (curLogic) {
|
|
536
|
+
curLogic?.delete();
|
|
537
|
+
}
|
|
538
|
+
}
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
const useIndex = ['BindEvent', 'Identifier'].includes(this.concept);
|
|
@@ -1295,7 +1299,7 @@ export class BaseNode extends EventEmitter {
|
|
|
1295
1299
|
* 获取添加时的默认选项
|
|
1296
1300
|
* @returns
|
|
1297
1301
|
*/
|
|
1298
|
-
|
|
1302
|
+
static getDefaultOptions(): any {
|
|
1299
1303
|
return {};
|
|
1300
1304
|
}
|
|
1301
1305
|
|
|
@@ -1319,7 +1323,58 @@ export class BaseNode extends EventEmitter {
|
|
|
1319
1323
|
}
|
|
1320
1324
|
}
|
|
1321
1325
|
|
|
1322
|
-
traverse(this
|
|
1326
|
+
traverse(this);
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* 生成器中序遍历节点
|
|
1331
|
+
*
|
|
1332
|
+
* @description 与`traverseChildren`不同,此方法会过滤掉非节点值
|
|
1333
|
+
*/
|
|
1334
|
+
*traverseChildrenGenerator(cb: (node: SyntaxNode) => (void | Generator<any, any, any>)) {
|
|
1335
|
+
const isNode = (node: unknown): node is SyntaxNode => {
|
|
1336
|
+
return Boolean(node) && typeof node === 'object' && ('concept' in node) && typeof (node as any).concept === 'string';
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
function* traverse(node: BaseNode): Generator<any, any, any> {
|
|
1340
|
+
if (isNode(node)) {
|
|
1341
|
+
const result = cb(node);
|
|
1342
|
+
|
|
1343
|
+
if (utils.isGenerator(result)) {
|
|
1344
|
+
yield* result;
|
|
1345
|
+
}
|
|
1346
|
+
else {
|
|
1347
|
+
yield;
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
const propertyMap = getConceptPropertyMap(node?.concept);
|
|
1352
|
+
|
|
1353
|
+
if (!propertyMap) {
|
|
1354
|
+
yield;
|
|
1355
|
+
return;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
for (const property of propertyMap.keys()) {
|
|
1359
|
+
const prop = node[property as keyof BaseNode];
|
|
1360
|
+
|
|
1361
|
+
if (!prop) {
|
|
1362
|
+
continue;
|
|
1363
|
+
}
|
|
1364
|
+
else if (Array.isArray(prop)) {
|
|
1365
|
+
for (const child of prop) {
|
|
1366
|
+
yield* traverse(child);
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
else {
|
|
1370
|
+
yield* traverse(prop);
|
|
1371
|
+
}
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
yield;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
yield* traverse(this);
|
|
1323
1378
|
}
|
|
1324
1379
|
|
|
1325
1380
|
/**
|
|
@@ -1342,7 +1397,7 @@ export class BaseNode extends EventEmitter {
|
|
|
1342
1397
|
/**
|
|
1343
1398
|
* 获取当前节点在nasl标注节点上的节点
|
|
1344
1399
|
*/
|
|
1345
|
-
|
|
1400
|
+
getCurrentAnnotatedJSON() {
|
|
1346
1401
|
return this.__TypeAnnotation;
|
|
1347
1402
|
}
|
|
1348
1403
|
|
|
@@ -1350,7 +1405,7 @@ export class BaseNode extends EventEmitter {
|
|
|
1350
1405
|
* 获取
|
|
1351
1406
|
* 当前this上下文 的Source 和 父级文件级别的节点
|
|
1352
1407
|
*/
|
|
1353
|
-
|
|
1408
|
+
getCurrentSource() {
|
|
1354
1409
|
const node = this as BaseNode;
|
|
1355
1410
|
let { sourceMap } = node;
|
|
1356
1411
|
let fileNode = node;
|
|
@@ -1372,7 +1427,7 @@ export class BaseNode extends EventEmitter {
|
|
|
1372
1427
|
* 获取
|
|
1373
1428
|
* 当前this上下文 的Source 和 父级文件级别的节点
|
|
1374
1429
|
*/
|
|
1375
|
-
|
|
1430
|
+
getFileConceptNode(concept: string) {
|
|
1376
1431
|
const node = this as BaseNode;
|
|
1377
1432
|
let { sourceMap } = node;
|
|
1378
1433
|
let fileNode = node;
|
|
@@ -1471,6 +1526,17 @@ export class BaseNode extends EventEmitter {
|
|
|
1471
1526
|
|
|
1472
1527
|
return nodes;
|
|
1473
1528
|
}
|
|
1529
|
+
|
|
1530
|
+
*toEmbeddedTS(): Generator<any, string, any> {
|
|
1531
|
+
return '';
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* 调试用的 ToTS 接口
|
|
1536
|
+
*/
|
|
1537
|
+
toDebugTs() {
|
|
1538
|
+
return console.log(utils.runGeneratorSync(this.toEmbeddedTS()));
|
|
1539
|
+
}
|
|
1474
1540
|
}
|
|
1475
1541
|
|
|
1476
1542
|
export default BaseNode;
|
package/src/common/index.ts
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SyntaxNode } from '../concepts';
|
|
2
|
+
|
|
3
|
+
export function waitOqlQueryComponentChildrenFinish(node: SyntaxNode) {
|
|
4
|
+
const needGetSourceMapOqlList: Promise<any>[] = [];
|
|
5
|
+
|
|
6
|
+
node.traverseStrictChildren((el) => {
|
|
7
|
+
if (el.concept === 'OqlQueryComponent') {
|
|
8
|
+
if (!el.codeSourceMap) {
|
|
9
|
+
needGetSourceMapOqlList.push(el.requestEmbeddedTS());
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
if (needGetSourceMapOqlList.length > 0) {
|
|
15
|
+
return Promise.all(needGetSourceMapOqlList);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/src/concepts/Abort__.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
withSourceMapGenerator,
|
|
5
|
+
createCompilerState,
|
|
6
|
+
withGenerator,
|
|
7
|
+
TranslatorGenerator,
|
|
8
|
+
} from '../translator';
|
|
2
9
|
//================================================================================
|
|
3
10
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
4
11
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -63,11 +70,13 @@ export class Abort extends LogicItem {
|
|
|
63
70
|
return code;
|
|
64
71
|
}
|
|
65
72
|
|
|
66
|
-
|
|
73
|
+
@withGenerator
|
|
74
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
75
|
+
const self = this;
|
|
67
76
|
let code = '';
|
|
68
77
|
// 中止放入表达式中,处理翻译就跳过
|
|
69
78
|
// 别的就增加一个 return;
|
|
70
|
-
if (
|
|
79
|
+
if (self.parentNode?.concept !== 'MatchCase') {
|
|
71
80
|
code += 'return;';
|
|
72
81
|
}
|
|
73
82
|
return code;
|
package/src/concepts/Anchor__.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
shiftState,
|
|
5
|
+
withSourceMapGenerator,
|
|
6
|
+
withSourceMap,
|
|
7
|
+
createCompilerState,
|
|
8
|
+
withGenerator,
|
|
9
|
+
TranslatorGenerator,
|
|
10
|
+
} from '../translator';
|
|
2
11
|
import { ElementToVueOptions } from './ViewElement__';
|
|
3
12
|
import StringLiteral from './StringLiteral__';
|
|
4
13
|
//================================================================================
|
|
@@ -160,14 +169,15 @@ export class Anchor extends LogicItem {
|
|
|
160
169
|
return `<span style="color: #AAAAAA">锚点 = </span><span style="color: #FFFFFF">${expr}</span>`;
|
|
161
170
|
}
|
|
162
171
|
|
|
163
|
-
@
|
|
164
|
-
toEmbeddedTS(state
|
|
172
|
+
@withSourceMapGenerator
|
|
173
|
+
*toEmbeddedTS(state = createCompilerState(), isHaveKeyWord?: boolean): TranslatorGenerator {
|
|
174
|
+
const self = this;
|
|
165
175
|
let code = '';
|
|
166
176
|
if (isHaveKeyWord) {
|
|
167
177
|
code += `_anchor: `;
|
|
168
178
|
}
|
|
169
|
-
if (
|
|
170
|
-
code += (
|
|
179
|
+
if (self.expression) {
|
|
180
|
+
code += yield* (self.expression as StringLiteral).toEmbeddedTS(shiftState(state, code), false);
|
|
171
181
|
} else {
|
|
172
182
|
code += 'undefined';
|
|
173
183
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
1
2
|
import Namespace from './Namespace__';
|
|
2
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
TranslatorState,
|
|
5
|
+
shiftState,
|
|
6
|
+
withSourceMap,
|
|
7
|
+
indent,
|
|
8
|
+
createCompilerState,
|
|
9
|
+
withSourceMapGenerator,
|
|
10
|
+
withGenerator,
|
|
11
|
+
TranslatorGenerator,
|
|
12
|
+
} from '../translator';
|
|
3
13
|
import { ElementToVueOptions } from './ViewElement__';
|
|
4
14
|
import ForEachStatement from './ForEachStatement__';
|
|
5
15
|
import NewList from './NewList__';
|
|
@@ -23,6 +33,7 @@ import LogicItem from './LogicItem__';
|
|
|
23
33
|
import TypeAnnotation from './TypeAnnotation__';
|
|
24
34
|
import Module from './Module__';
|
|
25
35
|
import App from './App__';
|
|
36
|
+
import { SyntaxNode } from './types__';
|
|
26
37
|
|
|
27
38
|
/**
|
|
28
39
|
* 匿名函数
|
|
@@ -527,10 +538,11 @@ export class AnonymousFunction extends LogicItem {
|
|
|
527
538
|
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
528
539
|
}
|
|
529
540
|
|
|
530
|
-
@
|
|
531
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
541
|
+
@withSourceMapGenerator
|
|
542
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
543
|
+
const self = this;
|
|
532
544
|
let updateNoPropertyCode = '';
|
|
533
|
-
const grandParent =
|
|
545
|
+
const grandParent = self.parentNode?.parentNode;
|
|
534
546
|
if (
|
|
535
547
|
grandParent instanceof CallLogic &&
|
|
536
548
|
/dataSources\.[^.]+\.entities\.[^.]+\.logics/.test(grandParent.calleeNamespace) &&
|
|
@@ -544,37 +556,29 @@ export class AnonymousFunction extends LogicItem {
|
|
|
544
556
|
const expression = propertyArg?.expression as unknown as AnonymousFunction;
|
|
545
557
|
const newList = expression?.body as NewList;
|
|
546
558
|
const newListItems = newList?.items;
|
|
547
|
-
|
|
548
559
|
if (primaryKeys.length === newListItems?.length)
|
|
549
560
|
updateNoPropertyCode = 'const __UpdateNoProperty__: any = null;\n';
|
|
550
561
|
}
|
|
551
562
|
}
|
|
552
|
-
|
|
553
563
|
let code = '';
|
|
554
|
-
if (
|
|
564
|
+
if (self.body) {
|
|
555
565
|
code += `(`;
|
|
556
|
-
|
|
557
|
-
code += param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
558
|
-
if (index !==
|
|
566
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
567
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
568
|
+
if (index !== self.params.length - 1) code += ', ';
|
|
559
569
|
});
|
|
560
570
|
code += `)`;
|
|
561
571
|
code += ` => {\n`;
|
|
562
|
-
|
|
563
572
|
if (updateNoPropertyCode) code += updateNoPropertyCode;
|
|
564
|
-
|
|
565
573
|
code += `return `;
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
code +=
|
|
569
|
-
this.body.toEmbeddedTS &&
|
|
570
|
-
this.body.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize ?? 0) + 1 }));
|
|
574
|
+
if (self.body?.toEmbeddedTS) {
|
|
575
|
+
code += yield* self.body.toEmbeddedTS(shiftState(state, code, { tabSize: state.tabSize + 1 }));
|
|
571
576
|
}
|
|
572
577
|
code += ';';
|
|
573
578
|
code += `${indent(state?.tabSize ?? 0)}}`;
|
|
574
579
|
} else {
|
|
575
580
|
code += '__IDENTIFIER__';
|
|
576
581
|
}
|
|
577
|
-
|
|
578
582
|
return code;
|
|
579
583
|
}
|
|
580
584
|
|
|
@@ -637,11 +641,13 @@ export class AnonymousFunction extends LogicItem {
|
|
|
637
641
|
return code;
|
|
638
642
|
}
|
|
639
643
|
|
|
640
|
-
|
|
644
|
+
@withGenerator
|
|
645
|
+
*toEmbeddedTSDefinition(state = createCompilerState()): TranslatorGenerator {
|
|
646
|
+
const self = this;
|
|
641
647
|
let code = '(';
|
|
642
|
-
|
|
643
|
-
code += param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
644
|
-
if (index !==
|
|
648
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
649
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
650
|
+
if (index !== self.params.length - 1) code += ', ';
|
|
645
651
|
});
|
|
646
652
|
code += `) => (`;
|
|
647
653
|
code += 'any';
|
|
@@ -650,7 +656,7 @@ export class AnonymousFunction extends LogicItem {
|
|
|
650
656
|
}
|
|
651
657
|
|
|
652
658
|
checkParamName() {
|
|
653
|
-
let node:
|
|
659
|
+
let node: SyntaxNode = this;
|
|
654
660
|
const names: Set<string> = new Set();
|
|
655
661
|
while (node && node.concept !== 'Logic') {
|
|
656
662
|
node = node.parentNode;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { runGeneratorSync as runSync } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
shiftState,
|
|
5
|
+
withSourceMap,
|
|
6
|
+
createCompilerState,
|
|
7
|
+
withSourceMapGenerator,
|
|
8
|
+
withGenerator,
|
|
9
|
+
TranslatorGenerator,
|
|
10
|
+
} from '../translator';
|
|
2
11
|
import { ElementToVueOptions } from './ViewElement__';
|
|
3
12
|
import StringLiteral from './StringLiteral__';
|
|
4
13
|
import TypeAnnotation from './TypeAnnotation__';
|
|
@@ -195,11 +204,8 @@ export class Argument extends LogicItem {
|
|
|
195
204
|
toJS(state?: TranslatorState): string {
|
|
196
205
|
let code = this.spread ? '...' : '';
|
|
197
206
|
if (this.expression) {
|
|
198
|
-
|
|
207
|
+
const resultCode = this.expression.toJS(shiftState(state, code));
|
|
199
208
|
const { typeName, typeNamespace } = (this.expression as any)?.__nodeType || {};
|
|
200
|
-
if (['Long', 'Decimal'].includes(typeName) && typeNamespace === 'nasl.core') {
|
|
201
|
-
resultCode = `(${resultCode} === undefined || ${resultCode} === null) ? ${resultCode} :String(${resultCode})`;
|
|
202
|
-
}
|
|
203
209
|
code += resultCode;
|
|
204
210
|
} else {
|
|
205
211
|
code += 'undefined';
|
|
@@ -228,17 +234,22 @@ export class Argument extends LogicItem {
|
|
|
228
234
|
return '';
|
|
229
235
|
}
|
|
230
236
|
|
|
231
|
-
@
|
|
232
|
-
toEmbeddedTS(
|
|
233
|
-
|
|
237
|
+
@withSourceMapGenerator
|
|
238
|
+
*toEmbeddedTS(
|
|
239
|
+
state = createCompilerState(),
|
|
240
|
+
isRequired: boolean = true,
|
|
241
|
+
isHaveKeyWord?: boolean,
|
|
242
|
+
): TranslatorGenerator {
|
|
243
|
+
const self = this;
|
|
244
|
+
let code = self.spread ? '...' : '';
|
|
234
245
|
if (isHaveKeyWord) {
|
|
235
|
-
code += `${
|
|
246
|
+
code += `${self.tsKeyword}:`;
|
|
236
247
|
}
|
|
237
|
-
if (
|
|
238
|
-
if ((
|
|
239
|
-
code += (
|
|
248
|
+
if (self.expression) {
|
|
249
|
+
if ((self.expression as StringLiteral).name === 'ListDistinctByTargetDefaultExpression') {
|
|
250
|
+
code += yield* (self.expression as NewList).toEmbeddedIgnoreTS(shiftState(state, code));
|
|
240
251
|
} else {
|
|
241
|
-
code += (
|
|
252
|
+
code += yield* (self.expression as StringLiteral).toEmbeddedTS(shiftState(state, code), isRequired);
|
|
242
253
|
}
|
|
243
254
|
} else {
|
|
244
255
|
code += isRequired ? '__IDENTIFIER__' : 'undefined';
|
|
@@ -254,7 +265,7 @@ export class Argument extends LogicItem {
|
|
|
254
265
|
}
|
|
255
266
|
if (this.expression) {
|
|
256
267
|
if ((this.expression as StringLiteral).name === 'ListDistinctByTargetDefaultExpression') {
|
|
257
|
-
code += (this.expression as NewList).toEmbeddedIgnoreTS(shiftState(state, code));
|
|
268
|
+
code += runSync((this.expression as NewList).toEmbeddedIgnoreTS(shiftState(state, code)));
|
|
258
269
|
} else {
|
|
259
270
|
code += (this.expression as StringLiteral).toNaturalTS(shiftState(state, code), isRequired);
|
|
260
271
|
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { wrapForEachToGenerator as wrapForEach } from '../utils/time-slicing';
|
|
2
|
+
import {
|
|
3
|
+
TranslatorState,
|
|
4
|
+
shiftState,
|
|
5
|
+
withSourceMap,
|
|
6
|
+
indent,
|
|
7
|
+
createCompilerState,
|
|
8
|
+
withSourceMapGenerator,
|
|
9
|
+
withGenerator,
|
|
10
|
+
TranslatorGenerator,
|
|
11
|
+
} from '../translator';
|
|
2
12
|
import { ProcessElement, Process } from '..';
|
|
3
13
|
import Namespace from './Namespace__';
|
|
4
14
|
//================================================================================
|
|
@@ -716,18 +726,19 @@ export class Assignee extends LogicItem {
|
|
|
716
726
|
throw new Error('无法获取命名空间,请设置 parentNode!');
|
|
717
727
|
}
|
|
718
728
|
|
|
719
|
-
@
|
|
720
|
-
toEmbeddedTSInProcess(state
|
|
729
|
+
@withSourceMapGenerator
|
|
730
|
+
*toEmbeddedTSInProcess(state = createCompilerState(), prevCode: string): TranslatorGenerator {
|
|
731
|
+
const self = this;
|
|
721
732
|
const tab = indent(state?.tabSize || 0);
|
|
722
733
|
|
|
723
734
|
// 任务完成人拿不到自己任务下的输出参数,所以不需要__ProcessIdentification__标注
|
|
724
735
|
prevCode = prevCode.replace('__ProcessIdentification__', '');
|
|
725
736
|
let code = prevCode;
|
|
726
|
-
if (!
|
|
737
|
+
if (!self.users.length && !self.dynamicUsers.length && !self.logicUsers.length && !self.roles.length)
|
|
727
738
|
code += `${tab}__UsersEmpty__;\n`;
|
|
728
|
-
if (Array.isArray(
|
|
729
|
-
|
|
730
|
-
code += `${logic.toEmbeddedTSInProcess(
|
|
739
|
+
if (Array.isArray(self.logicUsers)) {
|
|
740
|
+
yield* wrapForEach(self.logicUsers, function* warpForEachGenerator(logic) {
|
|
741
|
+
code += `${yield* logic.toEmbeddedTSInProcess(
|
|
731
742
|
shiftState(state, code, { tabSize: state?.tabSize || 0 }),
|
|
732
743
|
prevCode,
|
|
733
744
|
false,
|
|
@@ -736,9 +747,9 @@ export class Assignee extends LogicItem {
|
|
|
736
747
|
});
|
|
737
748
|
}
|
|
738
749
|
code += `${tab}nasl.util.concatString(`;
|
|
739
|
-
|
|
740
|
-
code += u.toEmbeddedTS(shiftState(state, code));
|
|
741
|
-
if (index + 1 <
|
|
750
|
+
yield* wrapForEach(self.dynamicUsers, function* warpForEachGenerator(u, index) {
|
|
751
|
+
code += yield* u.toEmbeddedTS(shiftState(state, code));
|
|
752
|
+
if (index + 1 < self.dynamicUsers.length) code += ', ';
|
|
742
753
|
});
|
|
743
754
|
code += ')\n';
|
|
744
755
|
// code += `${this.dynamicUsers.map(u => u.toEmbeddedTS(shiftState(state, code))).join(',\n')})\n`;
|