@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
|
@@ -34,6 +34,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
34
34
|
var ViewElement_1;
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.ViewElement = void 0;
|
|
37
|
+
const time_slicing_1 = require("../utils/time-slicing");
|
|
37
38
|
const translator_1 = require("../translator");
|
|
38
39
|
const concepts_1 = require("../concepts");
|
|
39
40
|
const babelParser = __importStar(require("@babel/parser"));
|
|
@@ -1001,55 +1002,55 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1001
1002
|
haveScope() {
|
|
1002
1003
|
return Boolean(this.slotScope);
|
|
1003
1004
|
}
|
|
1004
|
-
toEmbeddedTSDefinition(state) {
|
|
1005
|
+
*toEmbeddedTSDefinition(state = (0, translator_1.createCompilerState)()) {
|
|
1006
|
+
const self = this;
|
|
1005
1007
|
let code = '';
|
|
1006
1008
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
|
|
1007
1009
|
// 登录组件不翻译
|
|
1008
|
-
if (
|
|
1009
|
-
code += `${
|
|
1010
|
+
if (self.toHump(self.tag) === 'lcapLogin' || self.staticClass === 'login-form') {
|
|
1011
|
+
code += `${self.name}: nasl.ui.div<any>;\n`;
|
|
1010
1012
|
}
|
|
1011
|
-
else if (
|
|
1012
|
-
code += `${
|
|
1013
|
+
else if (self.tag === 'u-table-view-column-dynamic') {
|
|
1014
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any, any>;\n`;
|
|
1013
1015
|
}
|
|
1014
|
-
else if (Object.keys(View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP).includes(
|
|
1015
|
-
if (
|
|
1016
|
-
code += `${
|
|
1016
|
+
else if (Object.keys(View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP).includes(self.tag)) {
|
|
1017
|
+
if (self.bindAttrs?.findIndex((attr) => attr.name === 'data-source') > -1) {
|
|
1018
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<__elements_completionProperty['${self.name}']['dataSource']>;\n`;
|
|
1017
1019
|
}
|
|
1018
1020
|
else {
|
|
1019
|
-
code += `${
|
|
1021
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any>;\n`;
|
|
1020
1022
|
}
|
|
1021
1023
|
}
|
|
1022
1024
|
else {
|
|
1023
|
-
code += `${
|
|
1025
|
+
code += `${self.name}: nasl.ui.${self.toHump(self.tag)}<any>;\n`;
|
|
1024
1026
|
}
|
|
1025
|
-
if (Array.isArray(
|
|
1026
|
-
|
|
1027
|
-
code += element.toEmbeddedTSDefinition((0, translator_1.shiftState)(state, code));
|
|
1027
|
+
if (Array.isArray(self.children)) {
|
|
1028
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
|
|
1029
|
+
code += yield* element.toEmbeddedTSDefinition((0, translator_1.shiftState)(state, code));
|
|
1028
1030
|
});
|
|
1029
1031
|
}
|
|
1030
1032
|
return code;
|
|
1031
1033
|
}
|
|
1032
|
-
toEmbeddedTSVariableDefinition(state, variableList, nameLevel) {
|
|
1034
|
+
*toEmbeddedTSVariableDefinition(state = (0, translator_1.createCompilerState)(), variableList, nameLevel) {
|
|
1035
|
+
const self = this;
|
|
1033
1036
|
let code = '';
|
|
1034
1037
|
let currentLevel = nameLevel ? `${nameLevel}?.` : '';
|
|
1035
|
-
currentLevel += `${
|
|
1036
|
-
if (View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP?.[
|
|
1038
|
+
currentLevel += `${self.name}?.()`;
|
|
1039
|
+
if (View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP?.[self.tag]) {
|
|
1037
1040
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1038
|
-
code += `${
|
|
1039
|
-
if (Array.isArray(
|
|
1040
|
-
|
|
1041
|
-
.
|
|
1042
|
-
.forEach((attr) => {
|
|
1043
|
-
code += attr.toEmbeddedTSVariableDefinition((0, translator_1.shiftState)(state, code, { inline: true }), variableList, this.name, currentLevel);
|
|
1041
|
+
code += `${self.name}: {\n`;
|
|
1042
|
+
if (Array.isArray(self.bindAttrs)) {
|
|
1043
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindAttrs.filter((attr) => View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP[self.tag]?.[attr.name]), function* warpForEachGenerator(attr) {
|
|
1044
|
+
code += yield* attr.toEmbeddedTSVariableDefinition((0, translator_1.shiftState)(state, code, { inline: true }), variableList, self.name, currentLevel);
|
|
1044
1045
|
});
|
|
1045
|
-
if (['u-select', 'van-pickerson'].includes(
|
|
1046
|
+
if (['u-select', 'van-pickerson'].includes(self.tag)) {
|
|
1046
1047
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1047
1048
|
code += `pageNumber: nasl.core.Long\n`;
|
|
1048
1049
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1049
1050
|
code += `filterText: nasl.core.String\n`;
|
|
1050
1051
|
}
|
|
1051
|
-
else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(
|
|
1052
|
-
|
|
1052
|
+
else if (['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(self.tag) &&
|
|
1053
|
+
self.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1) {
|
|
1053
1054
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1054
1055
|
code += `sorting: {
|
|
1055
1056
|
field: nasl.core.String
|
|
@@ -1060,21 +1061,22 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1060
1061
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1061
1062
|
code += `};\n`;
|
|
1062
1063
|
}
|
|
1063
|
-
if (Array.isArray(
|
|
1064
|
-
|
|
1065
|
-
code += element.toEmbeddedTSVariableDefinition((0, translator_1.shiftState)(state, code), variableList, currentLevel);
|
|
1064
|
+
if (Array.isArray(self.children)) {
|
|
1065
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
|
|
1066
|
+
code += yield* element.toEmbeddedTSVariableDefinition((0, translator_1.shiftState)(state, code), variableList, currentLevel);
|
|
1066
1067
|
});
|
|
1067
1068
|
}
|
|
1068
1069
|
return code;
|
|
1069
1070
|
}
|
|
1070
|
-
toEmbeddedTSVariableFunctionDefinition(state, parentLevel) {
|
|
1071
|
+
*toEmbeddedTSVariableFunctionDefinition(state = (0, translator_1.createCompilerState)(), parentLevel) {
|
|
1072
|
+
const self = this;
|
|
1071
1073
|
let code = '';
|
|
1072
1074
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1073
1075
|
let levelIndex = parentLevel || 0;
|
|
1074
|
-
code += `${
|
|
1075
|
-
if (
|
|
1076
|
-
const currentType =
|
|
1077
|
-
const _this =
|
|
1076
|
+
code += `${self.name}: () => {\n`;
|
|
1077
|
+
if (self.tag === 'template' && self.haveScope() && self.parentNode instanceof ViewElement_1) {
|
|
1078
|
+
const currentType = self.parentNode.tag === 'u-table-view-column-dynamic' ? 'CurrentDynamic' : 'Current';
|
|
1079
|
+
const _this = self.parentNode;
|
|
1078
1080
|
let genericity = '';
|
|
1079
1081
|
if (_this.tag === 'u-table-view-column-dynamic') {
|
|
1080
1082
|
genericity += `<${_this.parentNode.__tsVariableDataSourceTypeName}, ${_this.__tsVariableDataSourceTypeName}>`;
|
|
@@ -1090,10 +1092,10 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1090
1092
|
code += `let current${levelIndex === 0 ? '' : levelIndex}: nasl.ui.${currentType}${genericity}\n`;
|
|
1091
1093
|
levelIndex++;
|
|
1092
1094
|
}
|
|
1093
|
-
const attr =
|
|
1095
|
+
const attr = self.bindAttrs?.find((item) => item.name === 'data-source');
|
|
1094
1096
|
if (attr && attr.expression) {
|
|
1095
|
-
const datasourceName = `datasourceName${
|
|
1096
|
-
|
|
1097
|
+
const datasourceName = `datasourceName${self.name}`;
|
|
1098
|
+
self.__tsVariableDataSourceTypeName = datasourceName;
|
|
1097
1099
|
if (attr.expression instanceof MemberExpression__1.default ||
|
|
1098
1100
|
attr.expression instanceof Identifier__1.default ||
|
|
1099
1101
|
attr.expression instanceof concepts_1.CallLogic) {
|
|
@@ -1102,7 +1104,7 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1102
1104
|
inline: true,
|
|
1103
1105
|
noNeedParams: true,
|
|
1104
1106
|
};
|
|
1105
|
-
let value = attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}));
|
|
1107
|
+
let value = yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}));
|
|
1106
1108
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1107
1109
|
code += `type ${datasourceName} = nasl.ui.GetItemTypeFromDataSource<typeof ${value}>;\n`;
|
|
1108
1110
|
// code += `let current${levelIndex === 0 ? '' : levelIndex}: nasl.ui.${currentType}<nasl.ui.GetItemTypeFromDataSource<typeof ${value}>>;\n`;
|
|
@@ -1110,25 +1112,26 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1110
1112
|
else {
|
|
1111
1113
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1112
1114
|
code += `const __funcName = () => { return `;
|
|
1113
|
-
code += attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code));
|
|
1115
|
+
code += yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code));
|
|
1114
1116
|
code += '};\n';
|
|
1115
1117
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1116
1118
|
code += `type ${datasourceName} = nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName>>;\n`;
|
|
1117
1119
|
// code += `let current${levelIndex === 0 ? '' : levelIndex}: nasl.ui.${currentType}<nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName>>>;\n`;
|
|
1118
1120
|
}
|
|
1119
1121
|
}
|
|
1122
|
+
else {
|
|
1123
|
+
self.__tsVariableDataSourceTypeName = 'any';
|
|
1124
|
+
}
|
|
1120
1125
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1121
1126
|
code += `return {\n`;
|
|
1122
|
-
if (Array.isArray(
|
|
1123
|
-
|
|
1124
|
-
.
|
|
1125
|
-
.forEach((attr) => {
|
|
1126
|
-
code += attr.toEmbeddedTSVariableFunctionDefinition((0, translator_1.shiftState)(state, code, { inline: true }));
|
|
1127
|
+
if (Array.isArray(self.bindAttrs)) {
|
|
1128
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindAttrs.filter((attr) => View__1.PAGE_COMPONENT_INCLUDE_TAG_MAP[self.tag]?.[attr.name]), function* warpForEachGenerator(attr) {
|
|
1129
|
+
code += yield* attr.toEmbeddedTSVariableFunctionDefinition((0, translator_1.shiftState)(state, code, { inline: true }));
|
|
1127
1130
|
});
|
|
1128
1131
|
}
|
|
1129
|
-
if (Array.isArray(
|
|
1130
|
-
|
|
1131
|
-
code += element.toEmbeddedTSVariableFunctionDefinition((0, translator_1.shiftState)({ ...state, tabSize: state.tabSize + 2 }, code), levelIndex);
|
|
1132
|
+
if (Array.isArray(self.children)) {
|
|
1133
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
|
|
1134
|
+
code += yield* element.toEmbeddedTSVariableFunctionDefinition((0, translator_1.shiftState)({ ...state, tabSize: state.tabSize + 2 }, code), levelIndex);
|
|
1132
1135
|
});
|
|
1133
1136
|
}
|
|
1134
1137
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
@@ -1176,9 +1179,9 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1176
1179
|
}
|
|
1177
1180
|
return code;
|
|
1178
1181
|
}
|
|
1179
|
-
getDatasourceTypeCodeStr(state, eleArr) {
|
|
1182
|
+
*getDatasourceTypeCodeStr(state, eleArr) {
|
|
1180
1183
|
let code = '';
|
|
1181
|
-
(eleArr
|
|
1184
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(eleArr ?? [], function* wrapForEach(element, index) {
|
|
1182
1185
|
const bindAttrs = element.bindAttrs;
|
|
1183
1186
|
if (bindAttrs && bindAttrs.length) {
|
|
1184
1187
|
const attr = bindAttrs.find((item) => item.name === 'data-source');
|
|
@@ -1193,13 +1196,13 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1193
1196
|
inline: true,
|
|
1194
1197
|
noNeedParams: true,
|
|
1195
1198
|
};
|
|
1196
|
-
let value = attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}));
|
|
1199
|
+
let value = yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code, attr.expression.concept === 'CallLogic' ? extraParams : {}));
|
|
1197
1200
|
code += `type ${datasourceName} = `;
|
|
1198
1201
|
code += `nasl.ui.GetItemTypeFromDataSource<typeof ${value}>;\n`;
|
|
1199
1202
|
}
|
|
1200
1203
|
else {
|
|
1201
1204
|
code += `const __funcName${index} = () => { return`;
|
|
1202
|
-
code += attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code));
|
|
1205
|
+
code += yield* attr.expression.toEmbeddedTS((0, translator_1.shiftState)(state, code));
|
|
1203
1206
|
code += '};\n';
|
|
1204
1207
|
code += `type ${datasourceName} = `;
|
|
1205
1208
|
code += `nasl.ui.GetItemTypeFromDataSource<ReturnType<typeof __funcName${index}>>;\n`;
|
|
@@ -1211,8 +1214,9 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1211
1214
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1212
1215
|
return code;
|
|
1213
1216
|
}
|
|
1214
|
-
toEmbeddedTS(state, parentLevel) {
|
|
1215
|
-
const
|
|
1217
|
+
*toEmbeddedTS(state = (0, translator_1.createCompilerState)(), parentLevel) {
|
|
1218
|
+
const self = this;
|
|
1219
|
+
const { parentNode, app, tag, staticClass, name, bindDirectives, bindRoles, bindEvents, children } = self;
|
|
1216
1220
|
const chineseTsName = (name) => {
|
|
1217
1221
|
let tsName = name;
|
|
1218
1222
|
// 匹配所有特殊字符都转为_
|
|
@@ -1230,12 +1234,12 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1230
1234
|
return '';
|
|
1231
1235
|
}
|
|
1232
1236
|
// pc事件翻译
|
|
1233
|
-
if (
|
|
1234
|
-
let code = `new nasl.ui.div({name: __elements.${
|
|
1237
|
+
if (self.toHump(tag) === 'lcapLogin') {
|
|
1238
|
+
let code = `new nasl.ui.div({name: __elements.${self.name},\n`;
|
|
1235
1239
|
// 事件
|
|
1236
|
-
if (Array.isArray(
|
|
1237
|
-
|
|
1238
|
-
code += event.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1240
|
+
if (Array.isArray(self.bindEvents)) {
|
|
1241
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindEvents, function* warpForEachGenerator(event) {
|
|
1242
|
+
code += yield* event.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1239
1243
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1240
1244
|
}));
|
|
1241
1245
|
code += '\n';
|
|
@@ -1245,15 +1249,15 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1245
1249
|
return code;
|
|
1246
1250
|
}
|
|
1247
1251
|
let levelIndex = parentLevel || 0;
|
|
1248
|
-
if (tag === 'template' &&
|
|
1249
|
-
const slotTarget = !
|
|
1252
|
+
if (tag === 'template' && self.haveScope()) {
|
|
1253
|
+
const slotTarget = !self.slotTarget ? 'slotDefault' : 'slot' + self.toFirstUpper(self.toHump(self.slotTarget));
|
|
1250
1254
|
let code = '';
|
|
1251
1255
|
code += `${slotTarget}: (current${levelIndex === 0 ? '' : levelIndex})=> {\n`;
|
|
1252
|
-
code +=
|
|
1256
|
+
code += yield* self.getDatasourceTypeCodeStr(state, self.children);
|
|
1253
1257
|
levelIndex++;
|
|
1254
1258
|
code += 'return [';
|
|
1255
|
-
|
|
1256
|
-
code += element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1259
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
|
|
1260
|
+
code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1257
1261
|
tabSize: state?.tabSize || 0,
|
|
1258
1262
|
}), levelIndex);
|
|
1259
1263
|
});
|
|
@@ -1263,13 +1267,13 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1263
1267
|
return code;
|
|
1264
1268
|
}
|
|
1265
1269
|
else if (tag === 'template') {
|
|
1266
|
-
const slotTarget = !
|
|
1270
|
+
const slotTarget = !self.slotTarget ? 'slotDefault' : 'slot' + self.toFirstUpper(self.toHump(self.slotTarget));
|
|
1267
1271
|
let code = '';
|
|
1268
1272
|
code += `${slotTarget}: ()=> {\n`;
|
|
1269
|
-
code +=
|
|
1273
|
+
code += yield* self.getDatasourceTypeCodeStr(state, self.children);
|
|
1270
1274
|
code += 'return [';
|
|
1271
|
-
|
|
1272
|
-
code += element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1275
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.children, function* warpForEachGenerator(element) {
|
|
1276
|
+
code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1273
1277
|
tabSize: state?.tabSize || 0,
|
|
1274
1278
|
}), levelIndex);
|
|
1275
1279
|
});
|
|
@@ -1280,7 +1284,7 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1280
1284
|
return code;
|
|
1281
1285
|
}
|
|
1282
1286
|
// 后面那个name是为了查找引用的时候用的
|
|
1283
|
-
let code = `new nasl.ui.${
|
|
1287
|
+
let code = `new nasl.ui.${self.toHump(tag)}${self.getTypeArgmentsStr(state)}({name: __elements.${name},\n`;
|
|
1284
1288
|
// 是否开启权限
|
|
1285
1289
|
// const hasAuth = Array.isArray(bindDirectives)
|
|
1286
1290
|
// ? !!bindDirectives.filter((directive) => directive.name === 'auth').length
|
|
@@ -1289,7 +1293,7 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1289
1293
|
if (Array.isArray(bindRoles) && bindRoles.length) {
|
|
1290
1294
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1291
1295
|
code += 'roles: [\n';
|
|
1292
|
-
|
|
1296
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(bindRoles, function* warpForEachGenerator(role) {
|
|
1293
1297
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 3);
|
|
1294
1298
|
code += `${app.getNamespace()}.roles.${chineseTsName(role)}.${chineseTsName(role)},`;
|
|
1295
1299
|
code += '\n';
|
|
@@ -1299,8 +1303,8 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1299
1303
|
}
|
|
1300
1304
|
// 事件
|
|
1301
1305
|
if (Array.isArray(bindEvents)) {
|
|
1302
|
-
|
|
1303
|
-
code += event.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1306
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(bindEvents, function* warpForEachGenerator(event) {
|
|
1307
|
+
code += yield* event.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1304
1308
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1305
1309
|
}));
|
|
1306
1310
|
code += '\n';
|
|
@@ -1309,11 +1313,17 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1309
1313
|
// 子元素
|
|
1310
1314
|
if (Array.isArray(children)) {
|
|
1311
1315
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 1);
|
|
1312
|
-
if (Array.isArray(
|
|
1316
|
+
if (Array.isArray(self.bindAttrs)) {
|
|
1313
1317
|
code += `bindAttr: () => [\n`;
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1318
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindAttrs, function* warpForEachGenerator(attr) {
|
|
1319
|
+
code += (yield* attr.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: 1 }))) + ',\n';
|
|
1320
|
+
});
|
|
1321
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindDirectives, function* warpForEachGenerator(directive) {
|
|
1322
|
+
code += (yield* directive.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: 1 }))) + ',\n';
|
|
1323
|
+
});
|
|
1324
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(self.bindStyles, function* warpForEachGenerator(bindStyle) {
|
|
1325
|
+
code += (yield* bindStyle.toEmbeddedTS((0, translator_1.shiftState)(state, code, { tabSize: 1 }))) + ',\n';
|
|
1326
|
+
});
|
|
1317
1327
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2) + '],\n';
|
|
1318
1328
|
}
|
|
1319
1329
|
// 如果子集中有插槽的就
|
|
@@ -1321,9 +1331,9 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1321
1331
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1322
1332
|
const defaultArr = [];
|
|
1323
1333
|
// 先把插槽翻译了
|
|
1324
|
-
|
|
1334
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(children, function* warpForEachGenerator(element) {
|
|
1325
1335
|
if (element.tag === 'template') {
|
|
1326
|
-
code += element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1336
|
+
code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1327
1337
|
tabSize: state?.tabSize || 0,
|
|
1328
1338
|
}), levelIndex);
|
|
1329
1339
|
}
|
|
@@ -1335,10 +1345,10 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1335
1345
|
if (defaultArr.length) {
|
|
1336
1346
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1337
1347
|
code += `slotDefault: ()=> {\n`;
|
|
1338
|
-
code +=
|
|
1348
|
+
code += yield* self.getDatasourceTypeCodeStr(state, defaultArr);
|
|
1339
1349
|
code += 'return [';
|
|
1340
|
-
|
|
1341
|
-
code += element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1350
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(defaultArr, function* warpForEachGenerator(element) {
|
|
1351
|
+
code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1342
1352
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1343
1353
|
}), levelIndex);
|
|
1344
1354
|
code += '\n';
|
|
@@ -1352,10 +1362,10 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1352
1362
|
else {
|
|
1353
1363
|
code += (0, translator_1.indent)((state?.tabSize || 0) + 2);
|
|
1354
1364
|
code += `slotDefault: ()=> {\n`;
|
|
1355
|
-
code +=
|
|
1365
|
+
code += yield* self.getDatasourceTypeCodeStr(state, children);
|
|
1356
1366
|
code += 'return [';
|
|
1357
|
-
|
|
1358
|
-
code += element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1367
|
+
yield* (0, time_slicing_1.wrapForEachToGenerator)(children, function* warpForEachGenerator(element) {
|
|
1368
|
+
code += yield* element.toEmbeddedTS((0, translator_1.shiftState)(state, code, {
|
|
1359
1369
|
tabSize: (state?.tabSize || 0) + 2,
|
|
1360
1370
|
}), levelIndex);
|
|
1361
1371
|
code += '\n';
|
|
@@ -1900,6 +1910,11 @@ class ViewElement extends BaseNode_1.default {
|
|
|
1900
1910
|
parts.push(':designer="false"');
|
|
1901
1911
|
}
|
|
1902
1912
|
}
|
|
1913
|
+
// key变化,让tableView重新渲染
|
|
1914
|
+
if (['u-table-view'].includes(el.tag)) {
|
|
1915
|
+
const time = new Date().getTime();
|
|
1916
|
+
parts.push(`key="${el.name}_${time}"`);
|
|
1917
|
+
}
|
|
1903
1918
|
return parts;
|
|
1904
1919
|
},
|
|
1905
1920
|
});
|
|
@@ -2022,7 +2037,7 @@ class ViewElement extends BaseNode_1.default {
|
|
|
2022
2037
|
vIfs.push(attr.name === 'if' ? expr : `$auth.has(${expr})`);
|
|
2023
2038
|
return;
|
|
2024
2039
|
}
|
|
2025
|
-
result &&
|
|
2040
|
+
result && parts.push(result);
|
|
2026
2041
|
});
|
|
2027
2042
|
if (vIfs.length === 2)
|
|
2028
2043
|
parts.push(`v-if="(${vIfs[0]}) && (${vIfs[1]})"`);
|
|
@@ -2032,58 +2047,6 @@ class ViewElement extends BaseNode_1.default {
|
|
|
2032
2047
|
if (bindStyles)
|
|
2033
2048
|
parts.push(bindStyles);
|
|
2034
2049
|
newOptions.getExtraParts(this).forEach((part) => parts.push(part));
|
|
2035
|
-
if (["u-number-input", 'van-stepper-new'].includes(this.tag)) {
|
|
2036
|
-
// cloudUI
|
|
2037
|
-
// :step="${step}" :decimalLength="${decimalLength}"
|
|
2038
|
-
// :decimal-places="{ places:${decimalLength}, omit:false }" //这个属性单独存在 需要测试
|
|
2039
|
-
// vant
|
|
2040
|
-
// step="${step}" :decimal-length="${decimalLength}"
|
|
2041
|
-
const checkAttr = (attrName) => {
|
|
2042
|
-
let value = this.bindAttrs?.find(attr => attr?.name === attrName)?.value;
|
|
2043
|
-
return value && (value !== 'undefined');
|
|
2044
|
-
};
|
|
2045
|
-
let hasdecimalLength = (checkAttr("decimal-length") || checkAttr("decimalLength"));
|
|
2046
|
-
let valueAttr = this.bindAttrs?.find(attr => attr?.name === "value");
|
|
2047
|
-
const getNumberType = (attr) => {
|
|
2048
|
-
let { typeName, typeNamespace } = attr?.expression?.__nodeType || {};
|
|
2049
|
-
return typeName;
|
|
2050
|
-
};
|
|
2051
|
-
let numberType = getNumberType(valueAttr);
|
|
2052
|
-
const pushDecimalLeng = (len, variableName) => {
|
|
2053
|
-
if (!(checkAttr("decimal-length") || checkAttr("decimalLength"))) {
|
|
2054
|
-
// 值分 动态 非动态
|
|
2055
|
-
// 1 有默认值 没有设置组件精度 : 取默认值的length
|
|
2056
|
-
// 2 无默认值无精度 取2
|
|
2057
|
-
// 3 无默认值 有精度 取精度
|
|
2058
|
-
if (variableName && variableName.length > 0) {
|
|
2059
|
-
parts.push(`:decimal-length="${len}"`);
|
|
2060
|
-
// parts.push(`:decimal-length="${variableName}.length"`)
|
|
2061
|
-
}
|
|
2062
|
-
else {
|
|
2063
|
-
parts.push(`:decimal-length="${len}"`);
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
};
|
|
2067
|
-
if (!hasdecimalLength) {
|
|
2068
|
-
if (valueAttr?.type === "dynamic" && numberType) {
|
|
2069
|
-
if (numberType == 'Decimal') {
|
|
2070
|
-
let variableName = '';
|
|
2071
|
-
if (valueAttr?.expression) {
|
|
2072
|
-
variableName = valueAttr?.expression?.name;
|
|
2073
|
-
}
|
|
2074
|
-
pushDecimalLeng(2, variableName);
|
|
2075
|
-
!checkAttr("step") && parts.push(`:step="0.01"`);
|
|
2076
|
-
}
|
|
2077
|
-
else {
|
|
2078
|
-
pushDecimalLeng(0);
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
else {
|
|
2082
|
-
pushDecimalLeng(0);
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
!checkAttr("highPrecision") && parts.push(`:highPrecision="true"`);
|
|
2086
|
-
}
|
|
2087
2050
|
if (['u-modal', 'u-drawer'].includes(this.tag)) {
|
|
2088
2051
|
this.children.forEach((citem) => {
|
|
2089
2052
|
if (citem.tag === 'template' && !citem.children.length) {
|
|
@@ -2094,7 +2057,8 @@ class ViewElement extends BaseNode_1.default {
|
|
|
2094
2057
|
// 部分组件增加 key 唯一标识,防止 vue 判断重复节点,导致渲染异常
|
|
2095
2058
|
if (this.name &&
|
|
2096
2059
|
['u-table-view', 'u-list-view', 'u-grid-view', 'u-list-components', 'u-form', 'u-select'].includes(this.tag)) {
|
|
2097
|
-
|
|
2060
|
+
const hasKey = parts.find((part) => part && part.startsWith('key='));
|
|
2061
|
+
!hasKey && this.name && parts.push(`key="${this.name}"`);
|
|
2098
2062
|
}
|
|
2099
2063
|
let partsLength = 0;
|
|
2100
2064
|
let partsString = '';
|
|
@@ -2363,7 +2327,16 @@ __decorate([
|
|
|
2363
2327
|
})
|
|
2364
2328
|
], ViewElement.prototype, "children", void 0);
|
|
2365
2329
|
__decorate([
|
|
2366
|
-
|
|
2330
|
+
translator_1.withGenerator
|
|
2331
|
+
], ViewElement.prototype, "toEmbeddedTSDefinition", null);
|
|
2332
|
+
__decorate([
|
|
2333
|
+
translator_1.withGenerator
|
|
2334
|
+
], ViewElement.prototype, "toEmbeddedTSVariableDefinition", null);
|
|
2335
|
+
__decorate([
|
|
2336
|
+
translator_1.withGenerator
|
|
2337
|
+
], ViewElement.prototype, "toEmbeddedTSVariableFunctionDefinition", null);
|
|
2338
|
+
__decorate([
|
|
2339
|
+
translator_1.withSourceMapGenerator
|
|
2367
2340
|
], ViewElement.prototype, "toEmbeddedTS", null);
|
|
2368
2341
|
__decorate([
|
|
2369
2342
|
(0, translator_1.withSourceMap)()
|