@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
package/src/concepts/View__.ts
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
wrapForEachToGenerator as wrapForEach,
|
|
3
|
+
wrapIteratorToGenerator as wrapIterator,
|
|
4
|
+
returnOrigin,
|
|
5
|
+
} from '../utils/time-slicing';
|
|
6
|
+
import type { EmbeddedTSFileGenerator } from '../utils';
|
|
1
7
|
import Namespace from './Namespace__';
|
|
2
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
TranslatorState,
|
|
10
|
+
shiftState,
|
|
11
|
+
withSourceMap,
|
|
12
|
+
indent,
|
|
13
|
+
createCompilerState,
|
|
14
|
+
withSourceMapGenerator,
|
|
15
|
+
withGenerator,
|
|
16
|
+
TranslatorGenerator,
|
|
17
|
+
} from '../translator';
|
|
3
18
|
import translator from '../bak/translator';
|
|
4
19
|
import { ElementToVueOptions } from './ViewElement__';
|
|
5
20
|
import { Structure } from './Structure__';
|
|
@@ -13,6 +28,11 @@ import CallLogic from './CallLogic__';
|
|
|
13
28
|
import DefaultValue from './DefaultValue__';
|
|
14
29
|
import type Interface from './Interface__';
|
|
15
30
|
|
|
31
|
+
const getBranchCopyUniCode = () => (window as any)?.BranchCopyUniCode
|
|
32
|
+
const removedViewElementCache : {
|
|
33
|
+
[key: string]: number | bigint;
|
|
34
|
+
}= {} // 临时记录删除的页面元素计数的最大值
|
|
35
|
+
|
|
16
36
|
//================================================================================
|
|
17
37
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
18
38
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -31,11 +51,8 @@ import BindEvent from './BindEvent__';
|
|
|
31
51
|
import Module from './Module__';
|
|
32
52
|
import Frontend from './Frontend__';
|
|
33
53
|
import App from './App__';
|
|
54
|
+
import { SyntaxNode } from './types__';
|
|
34
55
|
|
|
35
|
-
const getBranchCopyUniCode = () => (window as any)?.BranchCopyUniCode
|
|
36
|
-
const removedViewElementCache : {
|
|
37
|
-
[key: string]: number | bigint;
|
|
38
|
-
}= {} // 临时记录删除的页面元素计数的最大值
|
|
39
56
|
/**
|
|
40
57
|
* 页面
|
|
41
58
|
*/
|
|
@@ -2037,8 +2054,9 @@ export class View extends BaseNode {
|
|
|
2037
2054
|
}
|
|
2038
2055
|
}
|
|
2039
2056
|
|
|
2040
|
-
@
|
|
2041
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
2057
|
+
@withSourceMapGenerator
|
|
2058
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
2059
|
+
const self = this;
|
|
2042
2060
|
function chineseTsName(name: string) {
|
|
2043
2061
|
let tsName = name;
|
|
2044
2062
|
// 匹配所有特殊字符都转为_
|
|
@@ -2047,16 +2065,15 @@ export class View extends BaseNode {
|
|
|
2047
2065
|
}
|
|
2048
2066
|
// 获取虚拟logic的参数和内容
|
|
2049
2067
|
// 用作展示和tots查找引用
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
let code = `export namespace ${this.tsName} {\n`;
|
|
2068
|
+
self.getElementLogicRoot();
|
|
2069
|
+
let code = `export namespace ${self.tsName} {\n`;
|
|
2053
2070
|
// 角色
|
|
2054
|
-
if (Array.isArray(
|
|
2071
|
+
if (Array.isArray(self.bindRoles) && self.bindRoles.length) {
|
|
2055
2072
|
code += indent((state?.tabSize || 0) + 1);
|
|
2056
2073
|
code += 'export let __bindRoles = [\n';
|
|
2057
|
-
|
|
2074
|
+
yield* wrapForEach(self.bindRoles, function* warpForEachGenerator(role) {
|
|
2058
2075
|
code += indent((state?.tabSize || 0) + 1);
|
|
2059
|
-
code += `${
|
|
2076
|
+
code += `${self.app.getNamespace()}.roles.${chineseTsName(role)}.${chineseTsName(role)},`;
|
|
2060
2077
|
code += '\n';
|
|
2061
2078
|
});
|
|
2062
2079
|
code += '\n';
|
|
@@ -2065,24 +2082,24 @@ export class View extends BaseNode {
|
|
|
2065
2082
|
}
|
|
2066
2083
|
// 需要类型推导的局部变量/返回值需要调整申明顺序
|
|
2067
2084
|
const advanceMap: Map<Variable, Assignment | BatchAssignment> = new Map();
|
|
2068
|
-
|
|
2085
|
+
yield* self.traverseChildrenGenerator(function* traverseChildrenGenerator(el) {
|
|
2069
2086
|
if (el && (el instanceof BatchAssignment || (el instanceof Assignment && el.left?.name))) {
|
|
2070
2087
|
// 子页面内部逻辑过滤
|
|
2071
|
-
if (el.view !==
|
|
2088
|
+
if (el.view !== self) return;
|
|
2072
2089
|
if (el instanceof Assignment) {
|
|
2073
|
-
const advanceVar =
|
|
2090
|
+
const advanceVar = self.variables?.find(
|
|
2074
2091
|
(variable) => !variable.typeAnnotation && el.left?.name === variable.name,
|
|
2075
2092
|
);
|
|
2076
2093
|
if (advanceVar && !advanceMap.get(advanceVar)) {
|
|
2077
2094
|
advanceMap.set(advanceVar, el);
|
|
2078
2095
|
}
|
|
2079
2096
|
} else if (el instanceof BatchAssignment) {
|
|
2080
|
-
el.assignmentLines
|
|
2097
|
+
yield* wrapForEach(el.assignmentLines, function* warpForEachGenerator({ leftIndex }) {
|
|
2081
2098
|
const leftCode =
|
|
2082
2099
|
leftIndex.length === 1
|
|
2083
|
-
? el.left?.expression?.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2084
|
-
: el.left?.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2085
|
-
const advanceVar =
|
|
2100
|
+
? yield* el.left?.expression?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('')
|
|
2101
|
+
: yield* el.left?.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
2102
|
+
const advanceVar = self.variables?.find(
|
|
2086
2103
|
(variable) => !variable.typeAnnotation && leftCode === variable.name,
|
|
2087
2104
|
);
|
|
2088
2105
|
if (advanceVar && !advanceMap.get(advanceVar)) {
|
|
@@ -2094,51 +2111,51 @@ export class View extends BaseNode {
|
|
|
2094
2111
|
});
|
|
2095
2112
|
|
|
2096
2113
|
// 用来储存默认值翻译结构是__IDENTIFIER__或者__IDENTIFIER__()的节点
|
|
2097
|
-
const IDENTIFIERMAP = new Set();
|
|
2098
|
-
if (Array.isArray(
|
|
2099
|
-
|
|
2114
|
+
const IDENTIFIERMAP = new Set<Variable>();
|
|
2115
|
+
if (Array.isArray(self.params)) {
|
|
2116
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param) {
|
|
2100
2117
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
2101
|
-
code += param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2118
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2102
2119
|
code += ';\n';
|
|
2103
2120
|
});
|
|
2104
2121
|
}
|
|
2105
|
-
if (Array.isArray(
|
|
2106
|
-
|
|
2107
|
-
const ts = variable.defaultValue?.toEmbeddedTS();
|
|
2122
|
+
if (Array.isArray(self.variables)) {
|
|
2123
|
+
yield* wrapForEach(self.variables, function* warpForEachGenerator(variable) {
|
|
2124
|
+
const ts = yield* variable.defaultValue?.toEmbeddedTS?.() ?? returnOrigin('');
|
|
2108
2125
|
if (['__IDENTIFIER__', '__IDENTIFIER__()'].includes(ts)) {
|
|
2109
2126
|
IDENTIFIERMAP.add(variable);
|
|
2110
2127
|
}
|
|
2111
2128
|
if (!advanceMap.get(variable)) {
|
|
2112
2129
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
2113
|
-
code += variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2130
|
+
code += yield* variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2114
2131
|
code += ';\n';
|
|
2115
2132
|
}
|
|
2116
2133
|
});
|
|
2117
2134
|
}
|
|
2118
|
-
advanceMap.
|
|
2135
|
+
yield* wrapIterator(advanceMap.entries(), function* warpForEachGenerator([variable, assignment]) {
|
|
2119
2136
|
// 有默认值的用默认值来推导类型, 但是如果是__IDENTIFIER__或者__IDENTIFIER__(),就不需要默认值来推导了
|
|
2120
2137
|
if (variable.defaultValue?.expression && !IDENTIFIERMAP.has(variable)) {
|
|
2121
2138
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
2122
|
-
code += variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2139
|
+
code += yield* variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2123
2140
|
return;
|
|
2124
2141
|
}
|
|
2125
2142
|
code += `${indent((state?.tabSize || 0) + 1)}// @ts-ignore\n`;
|
|
2126
2143
|
code += `${indent((state?.tabSize || 0) + 1)}let `;
|
|
2127
|
-
code += variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2144
|
+
code += yield* variable.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2128
2145
|
code += ' = ';
|
|
2129
2146
|
if (assignment instanceof BatchAssignment) {
|
|
2130
|
-
assignment.assignmentLines
|
|
2147
|
+
yield* wrapForEach(assignment.assignmentLines, function* warpForEachGenerator({ leftIndex, rightIndex }) {
|
|
2131
2148
|
const leftCode =
|
|
2132
2149
|
leftIndex.length === 1
|
|
2133
|
-
? assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2134
|
-
: assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2150
|
+
? yield* assignment.left.expression.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2151
|
+
: yield* assignment.left.members[leftIndex[1]]?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
2135
2152
|
if (leftCode === variable.name) {
|
|
2136
2153
|
const rightNode =
|
|
2137
2154
|
rightIndex.length === 1
|
|
2138
2155
|
? assignment.rights[rightIndex[0]]?.expression
|
|
2139
2156
|
: assignment.rights[rightIndex[0]]?.members[rightIndex[1]];
|
|
2140
|
-
const rightCode = rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2141
|
-
code +=
|
|
2157
|
+
const rightCode = yield* rightNode?.toEmbeddedTS(shiftState(state, code, { inline: true })) ?? returnOrigin('');
|
|
2158
|
+
code += yield* self.getRightCode(rightCode, assignment, rightNode);
|
|
2142
2159
|
}
|
|
2143
2160
|
});
|
|
2144
2161
|
} else {
|
|
@@ -2154,18 +2171,17 @@ export class View extends BaseNode {
|
|
|
2154
2171
|
}
|
|
2155
2172
|
rightCode +=
|
|
2156
2173
|
assignment.right && assignment.right.toEmbeddedTS
|
|
2157
|
-
? assignment.right.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2174
|
+
? yield* assignment.right.toEmbeddedTS(shiftState(state, code, { inline: true }))
|
|
2158
2175
|
: '__RIGHT__';
|
|
2159
|
-
code +=
|
|
2176
|
+
code += yield* self.getRightCode(rightCode, assignment, assignment.right);
|
|
2160
2177
|
}
|
|
2161
2178
|
code += ';\n';
|
|
2162
2179
|
});
|
|
2163
|
-
|
|
2164
2180
|
// elements类型声明定义
|
|
2165
2181
|
code += `interface __elements {\n`;
|
|
2166
2182
|
// 生成所有的name和类型定义
|
|
2167
|
-
|
|
2168
|
-
code += element.toEmbeddedTSDefinition(
|
|
2183
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(element) {
|
|
2184
|
+
code += yield* element.toEmbeddedTSDefinition(
|
|
2169
2185
|
shiftState(state, code, {
|
|
2170
2186
|
tabSize: (state?.tabSize || 0) + 1,
|
|
2171
2187
|
}),
|
|
@@ -2173,40 +2189,37 @@ export class View extends BaseNode {
|
|
|
2173
2189
|
});
|
|
2174
2190
|
code += `${indent((state?.tabSize || 0) + 1)}}\n`;
|
|
2175
2191
|
code += `let __elements: __elements;\n`;
|
|
2176
|
-
|
|
2177
|
-
if (Array.isArray(this.elements)) {
|
|
2192
|
+
if (Array.isArray(self.elements)) {
|
|
2178
2193
|
code += `${indent((state?.tabSize || 0) + 1)}interface `;
|
|
2179
2194
|
code += `__elements_completionProperty {\n`;
|
|
2180
2195
|
const componentList: Array<ViewElement> = [];
|
|
2181
|
-
|
|
2196
|
+
self.elementsAttrs(self.elements, componentList);
|
|
2182
2197
|
const variableList: string[] = [];
|
|
2183
|
-
|
|
2184
|
-
code += item.toEmbeddedTSVariableDefinition(shiftState(state, code, { inline: true }), variableList);
|
|
2198
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(item) {
|
|
2199
|
+
code += yield* item.toEmbeddedTSVariableDefinition(shiftState(state, code, { inline: true }), variableList);
|
|
2185
2200
|
});
|
|
2186
2201
|
code += indent((state?.tabSize || 0) + 1) + `}\n`;
|
|
2187
2202
|
code += indent((state?.tabSize || 0) + 1);
|
|
2188
2203
|
code += `let __elements_completionProperty: __elements_completionProperty;\n`;
|
|
2189
|
-
|
|
2190
2204
|
code += indent((state?.tabSize || 0) + 1);
|
|
2191
2205
|
code += `let __elements_variable_function = {\n`;
|
|
2192
|
-
|
|
2193
|
-
code += item.toEmbeddedTSVariableFunctionDefinition(shiftState(state, code, { inline: true }));
|
|
2206
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(item) {
|
|
2207
|
+
code += yield* item.toEmbeddedTSVariableFunctionDefinition(shiftState(state, code, { inline: true }));
|
|
2194
2208
|
});
|
|
2195
2209
|
code += indent((state?.tabSize || 0) + 1) + `}\n`;
|
|
2196
|
-
|
|
2197
2210
|
code += indent((state?.tabSize || 0) + 1);
|
|
2198
2211
|
code += `let __elements_stashFunctionVariable = {\n`;
|
|
2199
|
-
variableList
|
|
2212
|
+
yield* wrapForEach(variableList, function* warpForEachGenerator(item) {
|
|
2200
2213
|
code += indent((state?.tabSize || 0) + 2);
|
|
2201
2214
|
code += `${item}`;
|
|
2202
2215
|
});
|
|
2203
2216
|
code += indent((state?.tabSize || 0) + 1) + `}\n`;
|
|
2204
2217
|
}
|
|
2205
2218
|
// 逻辑
|
|
2206
|
-
if (Array.isArray(
|
|
2219
|
+
if (Array.isArray(self.logics) && self.logics.length) {
|
|
2207
2220
|
code += indent((state?.tabSize || 0) + 1);
|
|
2208
|
-
|
|
2209
|
-
code += logic.toEmbeddedTS(
|
|
2221
|
+
yield* wrapForEach(self.logics, function* warpForEachGenerator(logic) {
|
|
2222
|
+
code += yield* logic.toEmbeddedTS(
|
|
2210
2223
|
shiftState(state, code, {
|
|
2211
2224
|
tabSize: (state?.tabSize || 0) + 2,
|
|
2212
2225
|
}),
|
|
@@ -2217,9 +2230,9 @@ export class View extends BaseNode {
|
|
|
2217
2230
|
code += indent((state?.tabSize || 0) + 1);
|
|
2218
2231
|
}
|
|
2219
2232
|
// 事件
|
|
2220
|
-
if (Array.isArray(
|
|
2221
|
-
|
|
2222
|
-
code += event.toEmbeddedTS(
|
|
2233
|
+
if (Array.isArray(self.bindEvents)) {
|
|
2234
|
+
yield* wrapForEach(self.bindEvents, function* warpForEachGenerator(event) {
|
|
2235
|
+
code += yield* event.toEmbeddedTS(
|
|
2223
2236
|
shiftState(state, code, {
|
|
2224
2237
|
tabSize: state?.tabSize || 0,
|
|
2225
2238
|
}),
|
|
@@ -2228,18 +2241,16 @@ export class View extends BaseNode {
|
|
|
2228
2241
|
code += '\n';
|
|
2229
2242
|
});
|
|
2230
2243
|
}
|
|
2231
|
-
|
|
2232
2244
|
// render函数
|
|
2233
2245
|
code += `\n${indent((state?.tabSize || 0) + 1)}`;
|
|
2234
2246
|
code += `export function __render(`;
|
|
2235
2247
|
code += `){\n`;
|
|
2236
2248
|
code += indent(state?.tabSize || 0);
|
|
2237
|
-
|
|
2238
2249
|
// elements 元素
|
|
2239
|
-
if (Array.isArray(
|
|
2250
|
+
if (Array.isArray(self.elements)) {
|
|
2240
2251
|
// 生成嵌套式的内容
|
|
2241
|
-
|
|
2242
|
-
code += element.toEmbeddedTS(
|
|
2252
|
+
yield* wrapForEach(self.elements, function* warpForEachGenerator(element) {
|
|
2253
|
+
code += yield* element.toEmbeddedTS(
|
|
2243
2254
|
shiftState(state, code, {
|
|
2244
2255
|
tabSize: (state?.tabSize || 0) + 3,
|
|
2245
2256
|
}),
|
|
@@ -2247,20 +2258,16 @@ export class View extends BaseNode {
|
|
|
2247
2258
|
code += '\n';
|
|
2248
2259
|
});
|
|
2249
2260
|
}
|
|
2250
|
-
|
|
2251
2261
|
code += `\n${indent((state?.tabSize || 0) + 1)}}\n`;
|
|
2252
|
-
|
|
2253
|
-
if (Array.isArray(this.params)) {
|
|
2262
|
+
if (Array.isArray(self.params)) {
|
|
2254
2263
|
code += `${indent((state?.tabSize || 0) + 1)}export function $destination(options: {`;
|
|
2255
|
-
|
|
2264
|
+
yield* wrapForEach(self.params, function* warpForEachGenerator(param, index) {
|
|
2256
2265
|
code += `${param.name}?: `;
|
|
2257
|
-
code += param.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
2266
|
+
code += yield* param.typeAnnotation.toEmbeddedTS(shiftState(state, code));
|
|
2258
2267
|
code += ', ';
|
|
2259
2268
|
});
|
|
2260
|
-
|
|
2261
2269
|
// 锚点
|
|
2262
2270
|
code += `_anchor?: nasl.core.String`;
|
|
2263
|
-
|
|
2264
2271
|
code += '}){}\n';
|
|
2265
2272
|
}
|
|
2266
2273
|
|
|
@@ -2268,39 +2275,32 @@ export class View extends BaseNode {
|
|
|
2268
2275
|
code += `${indent((state?.tabSize || 0) + 1)}export function __playground(){\n`;
|
|
2269
2276
|
|
|
2270
2277
|
/* 参数的默认值是__IDENTIFIER__或者__IDENTIFIER__()时不赋默认值,但是需要ts翻译出来进行报错校验 */
|
|
2271
|
-
IDENTIFIERMAP.
|
|
2278
|
+
for (const node of IDENTIFIERMAP.values()) {
|
|
2272
2279
|
code += `${indent((state?.tabSize || 0) + 2)}`;
|
|
2273
|
-
code += node.defaultValue.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2280
|
+
code += yield* node.defaultValue.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
2274
2281
|
code += '; ';
|
|
2275
|
-
}
|
|
2276
|
-
code += '\n';
|
|
2282
|
+
}
|
|
2277
2283
|
|
|
2284
|
+
code += '\n';
|
|
2278
2285
|
code += `${indent((state?.tabSize || 0) + 2)}return\n`;
|
|
2279
2286
|
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
this.variables.forEach((variable) => {
|
|
2284
|
-
if (variable.defaultValue) {
|
|
2285
|
-
variable.defaultValue.playground?.forEach((item) => {
|
|
2286
|
-
code += item.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 2 }));
|
|
2287
|
-
code += ';\n';
|
|
2288
|
-
});
|
|
2287
|
+
function* setPlaygroundCode(arr: Variable[] | Param[], name: string) {
|
|
2288
|
+
if (arr.length) {
|
|
2289
|
+
code += `${indent((state?.tabSize || 0) + 1)}/* -----以下是 ${name} 的默认值草稿------ */\n`;
|
|
2289
2290
|
}
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
this.params.forEach((param) => {
|
|
2295
|
-
if (param.defaultValue && param.defaultValue instanceof DefaultValue) {
|
|
2296
|
-
param.defaultValue.playground?.forEach((item) => {
|
|
2297
|
-
code += item.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 2 }));
|
|
2291
|
+
|
|
2292
|
+
for (const item1 of arr) {
|
|
2293
|
+
for (const item of item1.defaultValue?.playground ?? []) {
|
|
2294
|
+
code += yield* item.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
|
|
2298
2295
|
code += ';\n';
|
|
2299
|
-
}
|
|
2296
|
+
}
|
|
2300
2297
|
}
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
yield* setPlaygroundCode(self.variables, 'variables');
|
|
2301
|
+
yield* setPlaygroundCode(self.params, 'params');
|
|
2303
2302
|
|
|
2303
|
+
code += `${indent((state?.tabSize || 0) + 1)}}\n`;
|
|
2304
2304
|
code += `${indent(state?.tabSize || 0)}}\n`;
|
|
2305
2305
|
return code;
|
|
2306
2306
|
}
|
|
@@ -2416,14 +2416,14 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2416
2416
|
return code;
|
|
2417
2417
|
}
|
|
2418
2418
|
|
|
2419
|
-
toEmbeddedTSFile() {
|
|
2419
|
+
*toEmbeddedTSFile(): EmbeddedTSFileGenerator {
|
|
2420
2420
|
let code = `namespace ${this.getTsNamespace()} {\n`;
|
|
2421
2421
|
const state = createCompilerState(code, {
|
|
2422
2422
|
tabSize: 1,
|
|
2423
2423
|
});
|
|
2424
2424
|
|
|
2425
2425
|
try {
|
|
2426
|
-
code += this.toEmbeddedTS(state);
|
|
2426
|
+
code += yield* this.toEmbeddedTS(state);
|
|
2427
2427
|
} catch (err) {
|
|
2428
2428
|
code += '';
|
|
2429
2429
|
console.log(err);
|
|
@@ -2693,7 +2693,7 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2693
2693
|
}
|
|
2694
2694
|
}
|
|
2695
2695
|
|
|
2696
|
-
getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any)
|
|
2696
|
+
*getRightCode(code: string, assignment: Assignment | BatchAssignment, rightNode: any) {
|
|
2697
2697
|
code = code.replaceAll('\n', ' ');
|
|
2698
2698
|
const logic = assignment.logic;
|
|
2699
2699
|
const logicRtn = logic?.returns[0];
|
|
@@ -2728,7 +2728,7 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2728
2728
|
|
|
2729
2729
|
// 处理 current.item、current1.item 等数据
|
|
2730
2730
|
if (/current(\d)*\.item/.test(code)) {
|
|
2731
|
-
code = this.handleCurrentItemCode(code, logic);
|
|
2731
|
+
code = yield* this.handleCurrentItemCode(code, logic);
|
|
2732
2732
|
return code;
|
|
2733
2733
|
}
|
|
2734
2734
|
|
|
@@ -2758,7 +2758,7 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2758
2758
|
}
|
|
2759
2759
|
|
|
2760
2760
|
getAncestorViewElementsWithDataSource(logic: Logic): ViewElement[] {
|
|
2761
|
-
let element:
|
|
2761
|
+
let element: SyntaxNode = logic;
|
|
2762
2762
|
const viewElements: ViewElement[] = [];
|
|
2763
2763
|
while (element) {
|
|
2764
2764
|
if (
|
|
@@ -2773,16 +2773,16 @@ ${indent(state.tabSize)}export function ${this.tsName}_view`;
|
|
|
2773
2773
|
return viewElements;
|
|
2774
2774
|
}
|
|
2775
2775
|
|
|
2776
|
-
handleCurrentItemCode(code: string, logic: Logic)
|
|
2776
|
+
*handleCurrentItemCode(code: string, logic: Logic) {
|
|
2777
2777
|
const viewElementsWithDataSource: ViewElement[] = this.getAncestorViewElementsWithDataSource(logic);
|
|
2778
|
-
viewElementsWithDataSource
|
|
2778
|
+
yield* wrapForEach(viewElementsWithDataSource, function* wrapForEach(viewElement, index) {
|
|
2779
2779
|
const currentIndex = viewElementsWithDataSource.length - 1 - index;
|
|
2780
2780
|
const currentItemCode = `current${currentIndex === 0 ? '' : currentIndex}.item`;
|
|
2781
2781
|
if (code.includes(currentItemCode)) {
|
|
2782
2782
|
const dataSource = viewElement.bindAttrs.find((bAttr) => bAttr.name === 'data-source');
|
|
2783
2783
|
if (dataSource) {
|
|
2784
2784
|
const view = viewElement.getAncestor('View') as View;
|
|
2785
|
-
const dataSourceTS = dataSource.expression.toEmbeddedTS();
|
|
2785
|
+
const dataSourceTS = yield* dataSource.expression.toEmbeddedTS();
|
|
2786
2786
|
const logic = view.logics.find((logic) => logic.name === dataSourceTS);
|
|
2787
2787
|
if (logic) {
|
|
2788
2788
|
code = code.replaceAll(
|
|
@@ -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
|
//================================================================================
|
|
3
13
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
4
14
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -281,29 +291,28 @@ export class WhileStatement extends LogicItem {
|
|
|
281
291
|
return code;
|
|
282
292
|
}
|
|
283
293
|
|
|
284
|
-
@
|
|
285
|
-
toEmbeddedTS(state = createCompilerState()):
|
|
294
|
+
@withSourceMapGenerator
|
|
295
|
+
*toEmbeddedTS(state = createCompilerState()): TranslatorGenerator {
|
|
296
|
+
const self = this;
|
|
286
297
|
let code = '';
|
|
287
298
|
code += 'while (nasl.core.ensureBoolean(';
|
|
288
|
-
code +=
|
|
289
|
-
?
|
|
299
|
+
code += self.test
|
|
300
|
+
? yield* self.test.toEmbeddedTS(
|
|
290
301
|
shiftState(state, code, {
|
|
291
302
|
tabSize: 0,
|
|
292
303
|
}),
|
|
293
304
|
)
|
|
294
305
|
: '__IDENTIFIER__';
|
|
295
306
|
code += ')) {\n';
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
code += `${logicItem.toEmbeddedTS(
|
|
307
|
+
if (Array.isArray(self.body)) {
|
|
308
|
+
yield* wrapForEach(self.body, function* warpForEachGenerator(logicItem) {
|
|
309
|
+
code += `${yield* logicItem.toEmbeddedTS(
|
|
300
310
|
shiftState(state, code, {
|
|
301
311
|
tabSize: (state?.tabSize || 0) + 1,
|
|
302
312
|
}),
|
|
303
313
|
)};\n`;
|
|
304
314
|
});
|
|
305
315
|
}
|
|
306
|
-
|
|
307
316
|
code += `${indent(state?.tabSize || 0)}}\n`;
|
|
308
317
|
return code;
|
|
309
318
|
}
|
package/src/concepts/index__.ts
CHANGED
|
@@ -43,7 +43,7 @@ export * from './LogicItem__';
|
|
|
43
43
|
export * from './Function__';
|
|
44
44
|
export * from './AnonymousFunction__';
|
|
45
45
|
export * from './Interface__';
|
|
46
|
-
export * from './
|
|
46
|
+
export * from './ImportedInterface__';
|
|
47
47
|
export * from './InterfaceParam__';
|
|
48
48
|
export * from './Transactional__';
|
|
49
49
|
export * from './DefaultValue__';
|
package/src/concepts/types__.ts
CHANGED
|
@@ -32,7 +32,6 @@ import type { Logic } from './Logic__';
|
|
|
32
32
|
import type { AuthLogic } from './AuthLogic__';
|
|
33
33
|
import type { AuthLogicForCallInterface } from './AuthLogicForCallInterface__';
|
|
34
34
|
import type { OverriddenLogic } from './OverriddenLogic__';
|
|
35
|
-
import type { AbstractInterface } from './AbstractInterface__';
|
|
36
35
|
import type { Param } from './Param__';
|
|
37
36
|
import type { Return } from './Return__';
|
|
38
37
|
import type { Variable } from './Variable__';
|
|
@@ -42,7 +41,6 @@ import type { Constant } from './Constant__';
|
|
|
42
41
|
import type { Function } from './Function__';
|
|
43
42
|
import type { AnonymousFunction } from './AnonymousFunction__';
|
|
44
43
|
import type { Interface } from './Interface__';
|
|
45
|
-
import type { InterfaceFromExample } from './InterfaceFromExample__';
|
|
46
44
|
import type { InterfaceParam } from './InterfaceParam__';
|
|
47
45
|
import type { Transactional } from './Transactional__';
|
|
48
46
|
import type { DefaultValue } from './DefaultValue__';
|
|
@@ -161,7 +159,6 @@ export type SyntaxNode =
|
|
|
161
159
|
| AuthLogic
|
|
162
160
|
| AuthLogicForCallInterface
|
|
163
161
|
| OverriddenLogic
|
|
164
|
-
| AbstractInterface
|
|
165
162
|
| Param
|
|
166
163
|
| Return
|
|
167
164
|
| Variable
|
|
@@ -171,7 +168,6 @@ export type SyntaxNode =
|
|
|
171
168
|
| Function
|
|
172
169
|
| AnonymousFunction
|
|
173
170
|
| Interface
|
|
174
|
-
| InterfaceFromExample
|
|
175
171
|
| InterfaceParam
|
|
176
172
|
| Transactional
|
|
177
173
|
| DefaultValue
|
|
@@ -255,4 +251,4 @@ export type SyntaxNode =
|
|
|
255
251
|
| CallConnector
|
|
256
252
|
| Connection;
|
|
257
253
|
|
|
258
|
-
export type SyntaxNodeConcept = SyntaxNode['concept'];
|
|
254
|
+
export type SyntaxNodeConcept = SyntaxNode['concept'];
|
package/src/decorators/index.ts
CHANGED
|
@@ -82,7 +82,16 @@ export function getConceptPropertyMap(concept: string) {
|
|
|
82
82
|
export function concept(nodeTitle: string) {
|
|
83
83
|
return (target: any) => {
|
|
84
84
|
target.nodeTitle = nodeTitle;
|
|
85
|
-
const
|
|
85
|
+
const concept = target.ConceptName ?? target.name;
|
|
86
|
+
const metaMap = getConceptMeta(concept);
|
|
87
|
+
const prototypeTarget = Object.getPrototypeOf(target);
|
|
88
|
+
if (prototypeTarget) {
|
|
89
|
+
const propertyMap = getConceptPropertyMap(concept);
|
|
90
|
+
const prototypeMetaMap = getConceptPropertyMap(prototypeTarget.ConceptName ?? prototypeTarget.name);
|
|
91
|
+
prototypeMetaMap.forEach((prototypeMeta, key: string) => {
|
|
92
|
+
propertyMap.set(key, prototypeMeta);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
86
95
|
metaMap.constructor = target;
|
|
87
96
|
};
|
|
88
97
|
}
|
|
@@ -131,14 +140,6 @@ export function property(params?: any) {
|
|
|
131
140
|
const { objectRef, isArray, defaultValue } = params || {};
|
|
132
141
|
return function handle(target: SyntaxNode | BaseNode, key: string) {
|
|
133
142
|
const metaMap = getConceptPropertyMap(target.concept ?? target.constructor.name);
|
|
134
|
-
const prototypeTarget = Object.getPrototypeOf(target);
|
|
135
|
-
const prototypeConstructor = prototypeTarget.constructor;
|
|
136
|
-
if (prototypeTarget && prototypeConstructor) {
|
|
137
|
-
const prototypeMetaMap = getConceptPropertyMap(prototypeTarget.concept ?? prototypeConstructor.name);
|
|
138
|
-
prototypeMetaMap.forEach((prototypeMeta, key: string) => {
|
|
139
|
-
metaMap.set(key, prototypeMeta);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
143
|
metaMap.set(key, {
|
|
143
144
|
key,
|
|
144
145
|
objectRef,
|
|
@@ -18,8 +18,7 @@ import {
|
|
|
18
18
|
authStructures,
|
|
19
19
|
httpStructures,
|
|
20
20
|
MetadataType,
|
|
21
|
-
TypeAnnotation
|
|
22
|
-
InterfaceFromExample,
|
|
21
|
+
TypeAnnotation
|
|
23
22
|
} from '../concepts';
|
|
24
23
|
import * as utils from '../utils';
|
|
25
24
|
|
|
@@ -71,10 +70,6 @@ function isInterface (node: BaseNode): node is Interface {
|
|
|
71
70
|
return node instanceof Interface;
|
|
72
71
|
}
|
|
73
72
|
|
|
74
|
-
function isInterfaceFromExample(node: BaseNode): node is InterfaceFromExample {
|
|
75
|
-
return node instanceof InterfaceFromExample;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
73
|
export function genMetaData(app: App, frontend: Frontend) {
|
|
79
74
|
const modules: (Module | Connector)[] = [];
|
|
80
75
|
const views: View[] = [];
|
|
@@ -285,12 +280,7 @@ export function genMetaData(app: App, frontend: Frontend) {
|
|
|
285
280
|
}
|
|
286
281
|
});
|
|
287
282
|
|
|
288
|
-
interfaces.forEach((interfaceItem: Interface
|
|
289
|
-
|
|
290
|
-
// 兼容 InterfaceFromExample
|
|
291
|
-
if (isInterfaceFromExample(interfaceItem)) {
|
|
292
|
-
interfaceItem = interfaceItem.inter as Interface;
|
|
293
|
-
}
|
|
283
|
+
interfaces.forEach((interfaceItem: Interface) => {
|
|
294
284
|
_custom[`${interfaceItem.getNamespace()}.${interfaceItem.name}`] = interfaceItem.toService();
|
|
295
285
|
});
|
|
296
286
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as tsProtocol from 'typescript/lib/protocol';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseNode } from '../concepts';
|
|
3
|
+
import { timeSlicingWithList } from '../utils';
|
|
3
4
|
|
|
4
5
|
// export interface TypeCheckNote {
|
|
5
6
|
// status: string,
|
|
@@ -99,9 +100,7 @@ export class DiagnosticManager {
|
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
pushAll(records: DiagnosticRecord[]) {
|
|
102
|
-
|
|
103
|
-
this.push(record);
|
|
104
|
-
}
|
|
103
|
+
return timeSlicingWithList(records, (record) => this.push(record));
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
filterDiagnostics(showTSError?: boolean) {
|