@lcap/nasl 3.3.3-beta.8 → 3.3.3-beta.9
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/{78804420-ead6-486f-b682-ab54ccd95dc9.json → 559608df-ab15-4969-acf0-5239dacd6111.json} +1 -1
- package/.nyc_output/processinfo/559608df-ab15-4969-acf0-5239dacd6111.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/coverage/index.html +66 -66
- package/coverage/src/automate/engine/index.html +1 -1
- package/coverage/src/automate/engine/utils.js.html +44 -44
- package/coverage/src/bak/index.html +15 -15
- package/coverage/src/bak/translator.js.html +29 -269
- package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +1 -1
- package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +1 -1
- package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +43 -7
- package/coverage/src/breakpoint/generator/CallbackNode.ts.html +59 -8
- package/coverage/src/breakpoint/generator/index.html +21 -21
- package/coverage/src/breakpoint/generator/index.ts.html +1 -1
- package/coverage/src/breakpoint/index.html +1 -1
- package/coverage/src/breakpoint/index.ts.html +1 -1
- package/coverage/src/breakpoint/shared/constants.ts.html +1 -1
- package/coverage/src/breakpoint/shared/index.html +1 -1
- package/coverage/src/breakpoint/shared/index.ts.html +1 -1
- package/coverage/src/breakpoint/shared/operations.ts.html +2 -2
- package/coverage/src/breakpoint/shared/socket.ts.html +1 -1
- package/coverage/src/breakpoint/shared/utils.ts.html +1 -1
- package/coverage/src/breakpoint/store/core.ts.html +3 -3
- package/coverage/src/breakpoint/store/dock.ts.html +1 -1
- package/coverage/src/breakpoint/store/index.html +1 -1
- package/coverage/src/breakpoint/store/index.ts.html +1 -1
- package/coverage/src/common/BaseNode.ts.html +113 -113
- package/coverage/src/common/Command.ts.html +2 -2
- package/coverage/src/common/EventEmitter.ts.html +31 -31
- package/coverage/src/common/Messager.ts.html +1 -1
- package/coverage/src/common/asyncFuncMap.ts.html +1 -1
- package/coverage/src/common/index.html +5 -5
- package/coverage/src/common/index.ts.html +1 -1
- package/coverage/src/common/utils.ts.html +1 -1
- package/coverage/src/concepts/Abort__.ts.html +1 -1
- package/coverage/src/concepts/AbstractInterface__.ts.html +280 -0
- package/coverage/src/concepts/Anchor__.ts.html +1 -1
- package/coverage/src/concepts/AnonymousFunction__.ts.html +5 -5
- package/coverage/src/concepts/App__.ts.html +36 -36
- package/coverage/src/concepts/Argument__.ts.html +43 -58
- package/coverage/src/concepts/Assignee__.ts.html +1 -1
- package/coverage/src/concepts/AssignmentLine__.ts.html +7 -7
- package/coverage/src/concepts/Assignment__.ts.html +21 -75
- package/coverage/src/concepts/Attribute__.ts.html +1 -1
- package/coverage/src/concepts/AuthInterface__.ts.html +1 -1
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +1 -1
- package/coverage/src/concepts/AuthLogic__.ts.html +1 -1
- package/coverage/src/concepts/BackendVariable__.ts.html +29 -65
- package/coverage/src/concepts/Backend__.ts.html +6 -6
- package/coverage/src/concepts/BatchAssignment__.ts.html +1 -1
- package/coverage/src/concepts/BinaryExpression__.ts.html +50 -128
- package/coverage/src/concepts/BindAttribute__.ts.html +54 -345
- package/coverage/src/concepts/BindDirective__.ts.html +1 -1
- package/coverage/src/concepts/BindEvent__.ts.html +8 -8
- package/coverage/src/concepts/BindStyle__.ts.html +1 -1
- package/coverage/src/concepts/Block__.ts.html +910 -0
- package/coverage/src/concepts/BooleanLiteral__.ts.html +1 -1
- package/coverage/src/concepts/CallAuthInterface__.ts.html +1 -1
- package/coverage/src/concepts/CallConnector__.ts.html +1 -1
- package/coverage/src/concepts/CallFunction__.ts.html +76 -52
- package/coverage/src/concepts/CallInterface__.ts.html +1 -1
- package/coverage/src/concepts/CallLogic__.ts.html +387 -219
- package/coverage/src/concepts/CallQueryComponent__.ts.html +1 -1
- package/coverage/src/concepts/Comment__.ts.html +1 -1
- package/coverage/src/concepts/CompletionProperty__.ts.html +1 -1
- package/coverage/src/concepts/ConfigGroup__.ts.html +6 -6
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +1 -1
- package/coverage/src/concepts/ConfigProperty__.ts.html +1 -1
- package/coverage/src/concepts/Configuration__.ts.html +7 -7
- package/coverage/src/concepts/Connection__.ts.html +1 -1
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +1 -1
- package/coverage/src/concepts/Connector__.ts.html +1 -1
- package/coverage/src/concepts/Constant__.ts.html +1 -1
- package/coverage/src/concepts/CountersignPolicy__.ts.html +316 -0
- package/coverage/src/concepts/DataSource__.ts.html +13 -13
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +1 -1
- package/coverage/src/{automate/engine/operators.js.html → concepts/DefaultValue__.ts.html} +485 -347
- package/coverage/src/concepts/Destination__.ts.html +1 -1
- package/coverage/src/concepts/End__.ts.html +6 -6
- package/coverage/src/concepts/EntityIndex__.ts.html +1 -1
- package/coverage/src/concepts/EntityProperty__.ts.html +12 -12
- package/coverage/src/concepts/Entity__.ts.html +17 -17
- package/coverage/src/concepts/EnumItem__.ts.html +1 -1
- package/coverage/src/concepts/Enum__.ts.html +1 -1
- package/coverage/src/concepts/Event__.ts.html +1 -1
- package/coverage/src/concepts/ExternalDestination__.ts.html +1 -1
- package/coverage/src/concepts/ForEachStatement__.ts.html +28 -55
- package/coverage/src/concepts/FrontendLibrary__.ts.html +1 -1
- package/coverage/src/concepts/FrontendVariable__.ts.html +1 -1
- package/coverage/src/concepts/Frontend__.ts.html +12 -12
- package/coverage/src/concepts/Function__.ts.html +8 -8
- package/coverage/src/concepts/I18nInfo__.ts.html +436 -0
- package/coverage/src/concepts/Identifier__.ts.html +42 -51
- package/coverage/src/concepts/IfStatement__.ts.html +1 -1
- package/coverage/src/concepts/ImportedInterface__.ts.html +268 -0
- package/coverage/src/concepts/Integration__.ts.html +1 -1
- package/coverage/src/concepts/InterfaceParam__.ts.html +1 -1
- package/coverage/src/concepts/Interface__.ts.html +1 -1
- package/coverage/src/concepts/JSBlock__.ts.html +8 -182
- package/coverage/src/concepts/JavaLogic__.ts.html +1 -1
- package/coverage/src/concepts/LogicItem__.ts.html +20 -20
- package/coverage/src/concepts/Logic__.ts.html +25 -22
- package/coverage/src/concepts/MatchCase__.ts.html +1 -1
- package/coverage/src/concepts/Match__.ts.html +25 -10
- package/coverage/src/concepts/MemberExpression__.ts.html +10 -7
- package/coverage/src/concepts/MetadataType__.ts.html +1 -1
- package/coverage/src/concepts/MicroApp__.ts.html +1 -1
- package/coverage/src/concepts/Module__.ts.html +20 -20
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +1 -1
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +1 -1
- package/coverage/src/concepts/MultiApprovalPolicy__.ts.html +292 -0
- package/coverage/src/concepts/Namespace__.ts.html +18 -18
- package/coverage/src/concepts/NewComposite__.ts.html +59 -32
- package/coverage/src/concepts/NewList__.ts.html +5 -5
- package/coverage/src/concepts/NewMap__.ts.html +1 -1
- package/coverage/src/concepts/New__.ts.html +1 -1
- package/coverage/src/concepts/NullLiteral__.ts.html +1 -1
- package/coverage/src/concepts/NumericLiteral__.ts.html +10 -13
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +1 -1
- package/coverage/src/concepts/OverriddenLogic__.ts.html +1 -1
- package/coverage/src/concepts/Param__.ts.html +40 -79
- package/coverage/src/concepts/Point__.ts.html +1 -1
- package/coverage/src/concepts/ProcessComponent__.ts.html +1 -1
- package/coverage/src/concepts/ProcessElement__.ts.html +216 -9
- package/coverage/src/concepts/ProcessOutcome__.ts.html +1 -1
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +1 -1
- package/coverage/src/concepts/Process__.ts.html +8 -2
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +1 -1
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +1 -1
- package/coverage/src/concepts/QueryFromExpression__.ts.html +1 -1
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +1 -1
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +1 -1
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +1 -1
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +1 -1
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +1 -1
- package/coverage/src/concepts/Rect__.ts.html +1 -1
- package/coverage/src/concepts/Return__.ts.html +36 -75
- package/coverage/src/concepts/Role__.ts.html +1 -1
- package/coverage/src/concepts/SelectMembers__.ts.html +7 -7
- package/coverage/src/concepts/SequentialPolicy__.ts.html +259 -0
- package/coverage/src/concepts/Slot__.ts.html +1 -1
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +1 -1
- package/coverage/src/concepts/Start__.ts.html +6 -6
- package/coverage/src/concepts/StaticString__.ts.html +403 -0
- package/coverage/src/concepts/StringInterpolation__.ts.html +38 -32
- package/coverage/src/concepts/StringLiteral__.ts.html +13 -13
- package/coverage/src/concepts/StructureProperty__.ts.html +7 -7
- package/coverage/src/concepts/Structure__.ts.html +7 -7
- package/coverage/src/concepts/SwitchCase__.ts.html +1 -1
- package/coverage/src/concepts/SwitchStatement__.ts.html +1 -1
- package/coverage/src/concepts/Theme__.ts.html +7 -7
- package/coverage/src/concepts/Transactional__.ts.html +1 -1
- package/coverage/src/concepts/TriggerEvent__.ts.html +1 -1
- package/coverage/src/concepts/TriggerLauncher__.ts.html +1 -1
- package/coverage/src/concepts/TypeAnnotation__.ts.html +23 -23
- package/coverage/src/concepts/TypeParam__.ts.html +1 -1
- package/coverage/src/concepts/UnaryExpression__.ts.html +1 -1
- package/coverage/src/concepts/Unparsed__.ts.html +1 -1
- package/coverage/src/concepts/UseComponent__.ts.html +1 -1
- package/coverage/src/concepts/ValidationRule__.ts.html +9 -9
- package/coverage/src/concepts/Variable__.ts.html +35 -74
- package/coverage/src/concepts/ViewBlock__.ts.html +1 -1
- package/coverage/src/concepts/ViewComponent__.ts.html +1 -1
- package/coverage/src/concepts/ViewElement__.ts.html +50 -254
- package/coverage/src/concepts/View__.ts.html +42 -84
- package/coverage/src/concepts/WhileStatement__.ts.html +1 -1
- package/coverage/src/concepts/basics/constants.ts.html +88 -0
- package/coverage/src/concepts/basics/index.html +116 -0
- package/coverage/src/concepts/basics/stdlib/index.html +1 -1
- package/coverage/src/concepts/basics/stdlib/index.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +2 -2
- package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +1 -1
- package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +1 -1
- package/coverage/src/concepts/basics/types/coreTypeList.ts.html +1 -1
- package/coverage/src/concepts/basics/types/index.html +1 -1
- package/coverage/src/concepts/basics/types/index.ts.html +1 -1
- package/coverage/src/concepts/index.html +238 -193
- package/coverage/src/concepts/index.ts.html +1 -1
- package/coverage/src/concepts/index__.ts.html +13 -4
- package/coverage/src/concepts/utils/asserts.ts.html +27967 -0
- package/coverage/src/{automate/template → concepts/utils}/index.html +22 -22
- package/coverage/src/config.ts.html +1 -1
- package/coverage/src/decorators/index.html +1 -1
- package/coverage/src/decorators/index.ts.html +24 -24
- package/coverage/src/decorators/promise.ts.html +1 -1
- package/coverage/src/eventBus.ts.html +1 -1
- package/coverage/src/generator/compileComponent.ts.html +4 -4
- package/coverage/src/generator/genBundleFiles.ts.html +1 -1
- package/coverage/src/generator/genHash.ts.html +3 -3
- package/coverage/src/generator/genMetaData.ts.html +1 -1
- package/coverage/src/generator/genReleaseBody.ts.html +41 -41
- package/coverage/src/generator/icestark.ts.html +1 -1
- package/coverage/src/generator/index.html +1 -1
- package/coverage/src/generator/index.ts.html +1 -1
- package/coverage/src/generator/microApp.ts.html +1 -1
- package/coverage/src/generator/permission.ts.html +1 -1
- package/coverage/src/generator/qiankun.ts.html +1 -1
- package/coverage/src/generator/styleReplacer.ts.html +1 -1
- package/coverage/src/index.html +1 -1
- package/coverage/src/index.ts.html +1 -1
- package/coverage/src/manager/diagnostic.ts.html +1 -1
- package/coverage/src/manager/index.html +1 -1
- package/coverage/src/manager/stepRecorder.ts.html +1 -1
- package/coverage/src/natural/genNaturalTS.ts.html +1 -1
- package/coverage/src/natural/index.html +1 -1
- package/coverage/src/natural/index.ts.html +1 -1
- package/coverage/src/natural/naslStdlibMap.ts.html +1 -1
- package/coverage/src/natural/transformTSCode.ts.html +1 -1
- package/coverage/src/sentry/index.html +1 -1
- package/coverage/src/sentry/index.ts.html +15 -15
- package/coverage/src/server/createUiTs.ts.html +1 -1
- package/coverage/src/server/entity2LogicNamespace.ts.html +9 -9
- package/coverage/src/server/event.js.html +1 -1
- package/coverage/src/server/extendBaseNode.ts.html +69 -42
- package/coverage/src/server/formatTsUtils.ts.html +23 -20
- package/coverage/src/server/getConnector.ts.html +1 -1
- package/coverage/src/server/getExtensionModules.ts.html +1 -1
- package/coverage/src/server/getFunctions.ts.html +4 -4
- package/coverage/src/server/getInterfaces.ts.html +1 -1
- package/coverage/src/server/getLogging.ts.html +2 -2
- package/coverage/src/server/getLogics.ts.html +20 -8
- package/coverage/src/server/getMemberIdentifier.ts.html +71 -8
- package/coverage/src/server/getProcessComponents.ts.html +3 -3
- package/coverage/src/server/getProcesses.ts.html +163 -13
- package/coverage/src/server/getValidates.ts.html +4 -4
- package/coverage/src/server/index.html +54 -54
- package/coverage/src/server/index.ts.html +6 -3
- package/coverage/src/server/naslServer.ts.html +49 -43
- package/coverage/src/server/naslStdlibMap.ts.html +1 -1
- package/coverage/src/server/process2LogicNamespace.ts.html +52 -52
- package/coverage/src/server/translator.ts.html +16 -7
- package/coverage/src/service/creator/add.configs.js.html +1 -1
- package/coverage/src/service/creator/errHandles.js.html +16 -7
- package/coverage/src/service/creator/index.html +4 -4
- package/coverage/src/service/creator/index.js.html +1 -1
- package/coverage/src/service/datasource/api.js.html +1 -1
- package/coverage/src/service/datasource/index.html +1 -1
- package/coverage/src/service/datasource/index.js.html +1 -1
- package/coverage/src/service/logic/api.js.html +1 -1
- package/coverage/src/service/logic/index.html +1 -1
- package/coverage/src/service/logic/index.js.html +1 -1
- package/coverage/src/service/storage/api.js.html +1 -1
- package/coverage/src/service/storage/index.html +10 -10
- package/coverage/src/service/storage/index.ts.html +1 -1
- package/coverage/src/service/storage/init.ts.html +8 -8
- package/coverage/src/service/storage/jsoner.ts.html +1 -1
- package/coverage/src/service/storage/map.ts.html +3 -3
- package/coverage/src/service/storage/service.ts.html +1 -1
- package/coverage/src/service/storage/storagePoint.ts.html +1 -1
- package/coverage/src/templator/genCallComponentLogic.ts.html +1 -1
- package/coverage/src/templator/genCreateBlock.ts.html +11 -23
- package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +19 -37
- package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +18 -27
- package/coverage/src/templator/genEditTableBlock.ts.html +8 -14
- package/coverage/src/templator/genEnumSelectBlock.ts.html +1 -1
- package/coverage/src/templator/genGetBlock.ts.html +1 -1
- package/coverage/src/templator/genGridViewBlock.ts.html +1 -1
- package/coverage/src/templator/genListViewBlock.ts.html +1 -1
- package/coverage/src/templator/genQueryComponent.ts.html +1 -1
- package/coverage/src/templator/genSelectBlock.ts.html +1 -1
- package/coverage/src/templator/genTableBlock.ts.html +1 -1
- package/coverage/src/templator/genUpdateBlock.ts.html +19 -28
- package/coverage/src/templator/index.html +31 -31
- package/coverage/src/templator/index.ts.html +1 -1
- package/coverage/src/templator/utils.ts.html +21 -24
- package/coverage/src/translator/constant.ts.html +1 -1
- package/coverage/src/translator/index.html +1 -1
- package/coverage/src/translator/index.ts.html +1 -1
- package/coverage/src/translator/utils.ts.html +38 -38
- package/coverage/src/utils/cookie.ts.html +1 -1
- package/coverage/src/utils/env.ts.html +1 -1
- package/coverage/src/{automate/engine/viewCache.js.html → utils/i18nInfo.ts.html} +45 -93
- package/coverage/src/utils/index.html +5 -5
- package/coverage/src/utils/index.ts.html +13 -13
- package/coverage/src/utils/logger.ts.html +13 -13
- package/coverage/src/utils/sortTsString.ts.html +1 -1
- package/coverage/src/utils/string.ts.html +1 -1
- package/coverage/src/utils/time-slicing/constant.ts.html +1 -1
- package/coverage/src/utils/time-slicing/controller.ts.html +70 -37
- package/coverage/src/utils/time-slicing/index.html +24 -24
- package/coverage/src/utils/time-slicing/index.ts.html +1 -1
- package/coverage/src/utils/time-slicing/page-state.ts.html +1 -1
- package/coverage/src/utils/time-slicing/performance.ts.html +1 -1
- package/coverage/src/utils/time-slicing/runner.ts.html +33 -39
- package/coverage/src/utils/time-slicing/tool.ts.html +2 -2
- package/coverage/src/utils/time-slicing/utils.ts.html +2 -2
- package/coverage/src/utils/time-slicing/wrapper.ts.html +8 -8
- package/coverage/src/utils/time-slicing.ts.html +1 -1
- package/coverage/src/utils/traverse.ts.html +1 -1
- package/coverage/src/utils/window.ts.html +1 -1
- package/out/bak/translator.js.map +1 -1
- package/out/breakpoint/generator/BreakpointNode.d.ts +3 -0
- package/out/breakpoint/generator/BreakpointNode.js +9 -0
- package/out/breakpoint/generator/BreakpointNode.js.map +1 -1
- package/out/breakpoint/generator/CallbackNode.js +15 -0
- package/out/breakpoint/generator/CallbackNode.js.map +1 -1
- package/out/common/BaseNode.d.ts +1 -1
- package/out/common/BaseNode.js +1 -1
- package/out/common/BaseNode.js.map +1 -1
- package/out/common/Command.js +1 -1
- package/out/common/Command.js.map +1 -1
- package/out/concepts/BackendVariable__.js +10 -3
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/CallFunction__.js +10 -2
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallLogic__.js +71 -40
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CountersignPolicy__.d.ts +26 -0
- package/out/concepts/CountersignPolicy__.js +73 -0
- package/out/concepts/CountersignPolicy__.js.map +1 -0
- package/out/concepts/ForEachStatement__.js +12 -26
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/LogicItem__.js +2 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +2 -0
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/Match__.js +9 -4
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +1 -0
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MultiApprovalPolicy__.d.ts +24 -0
- package/out/concepts/MultiApprovalPolicy__.js +65 -0
- package/out/concepts/MultiApprovalPolicy__.js.map +1 -0
- package/out/concepts/NewComposite__.js +18 -10
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/Param__.js +10 -3
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessElement__.d.ts +16 -0
- package/out/concepts/ProcessElement__.js +56 -1
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/Process__.d.ts +2 -0
- package/out/concepts/Process__.js +2 -0
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/Return__.js +10 -3
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/SequentialPolicy__.d.ts +18 -0
- package/out/concepts/SequentialPolicy__.js +54 -0
- package/out/concepts/SequentialPolicy__.js.map +1 -0
- package/out/concepts/StringInterpolation__.js +2 -0
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/Variable__.js +10 -3
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewElement__.js +8 -0
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.js +2 -2
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.process.js +1 -1
- package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
- package/out/concepts/index__.d.ts +3 -0
- package/out/concepts/index__.js +3 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/types__.d.ts +4 -1
- package/out/generator/genReleaseBody.js +2 -2
- package/out/generator/genReleaseBody.js.map +1 -1
- package/out/server/extendBaseNode.js +33 -23
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.d.ts +1 -2
- package/out/server/formatTsUtils.js +13 -12
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getLogics.d.ts +1 -0
- package/out/server/getLogics.js +6 -2
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +21 -0
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.js +56 -6
- package/out/server/getProcesses.js.map +1 -1
- package/out/server/index.js +1 -0
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +2 -2
- package/out/server/naslServer.js +29 -32
- package/out/server/naslServer.js.map +1 -1
- package/out/server/translator.js +3 -0
- package/out/server/translator.js.map +1 -1
- package/out/service/creator/errHandles.js +6 -3
- package/out/service/creator/errHandles.js.map +1 -1
- package/out/service/storage/init.js +2 -2
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +3 -3
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +3 -3
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/utils/time-slicing/controller.d.ts +1 -1
- package/out/utils/time-slicing/controller.js +31 -19
- package/out/utils/time-slicing/controller.js.map +1 -1
- package/out/utils/time-slicing/runner.d.ts +1 -1
- package/out/utils/time-slicing/runner.js +4 -5
- package/out/utils/time-slicing/runner.js.map +1 -1
- package/out/utils/time-slicing/tool.d.ts +1 -1
- package/package.json +2 -2
- package/sandbox/stdlib/nasl.util.ts +2 -2
- package/src/bak/translator.js +0 -1
- package/src/breakpoint/generator/BreakpointNode.ts +12 -0
- package/src/breakpoint/generator/CallbackNode.ts +17 -0
- package/src/common/BaseNode.ts +1 -1
- package/src/common/Command.ts +1 -1
- package/src/concepts/BackendVariable__.ts +10 -3
- package/src/concepts/CallFunction__.ts +10 -2
- package/src/concepts/CallLogic__.ts +90 -46
- package/src/concepts/CountersignPolicy__.ts +77 -0
- package/src/concepts/ForEachStatement__.ts +17 -26
- package/src/concepts/LogicItem__.ts +2 -2
- package/src/concepts/Logic__.ts +1 -0
- package/src/concepts/Match__.ts +9 -4
- package/src/concepts/MemberExpression__.ts +1 -0
- package/src/concepts/MultiApprovalPolicy__.ts +69 -0
- package/src/concepts/NewComposite__.ts +18 -9
- package/src/concepts/Param__.ts +12 -3
- package/src/concepts/ProcessElement__.ts +70 -1
- package/src/concepts/Process__.ts +2 -0
- package/src/concepts/Return__.ts +10 -3
- package/src/concepts/SequentialPolicy__.ts +58 -0
- package/src/concepts/StringInterpolation__.ts +2 -0
- package/src/concepts/Variable__.ts +10 -3
- package/src/concepts/ViewElement__.ts +7 -0
- package/src/concepts/View__.ts +5 -5
- package/src/concepts/basics/stdlib/nasl.process.ts +1 -1
- package/src/concepts/index__.ts +3 -0
- package/src/concepts/types__.ts +6 -0
- package/src/generator/genReleaseBody.ts +40 -40
- package/src/server/extendBaseNode.ts +32 -23
- package/src/server/formatTsUtils.ts +13 -12
- package/src/server/getLogics.ts +4 -0
- package/src/server/getMemberIdentifier.ts +21 -0
- package/src/server/getProcesses.ts +56 -6
- package/src/server/index.ts +2 -1
- package/src/server/naslServer.ts +35 -33
- package/src/server/translator.ts +3 -0
- package/src/service/creator/errHandles.js +7 -4
- package/src/service/storage/init.ts +2 -2
- package/src/templator/genCurdEditMultipleKeyBlock.ts +3 -3
- package/src/templator/genCurdMultipleKeyBlock.ts +3 -3
- package/src/utils/time-slicing/controller.ts +34 -23
- package/src/utils/time-slicing/runner.ts +7 -9
- package/src/utils/time-slicing/tool.ts +1 -1
- package/test/concepts/call-logic/__snapshots__/getQuickInfoOffset.spec.ts.snap +24 -0
- package/test/concepts/call-logic/__snapshots__/toEmbeddedTS.spec.ts.snap +15 -0
- package/test/concepts/call-logic/__snapshots__/toJS.spec.ts.snap +15 -0
- package/test/concepts/call-logic/__snapshots__/toUI.spec.ts.snap +7 -0
- package/test/concepts/call-logic/__snapshots__/toVue.spec.ts.snap +101 -0
- package/test/concepts/call-logic/__snapshots__/toVueDesigner.spec.ts.snap +7 -0
- package/test/concepts/call-logic/fixtures/json-deserialize.json +173 -0
- package/test/concepts/call-logic/fixtures/json-serialize-with-string.json +177 -0
- package/test/concepts/call-logic/fixtures/json-serialize.json +178 -0
- package/test/concepts/call-logic/toUI.spec.ts +16 -0
- package/test/concepts/call-logic/toVue.spec.ts +14 -0
- package/test/concepts/call-logic/toVueDesigner.spec.ts +16 -0
- package/test/time-slicing/runner.spec.ts +4 -0
- package/.nyc_output/processinfo/78804420-ead6-486f-b682-ab54ccd95dc9.json +0 -1
- package/coverage/cobertura-coverage.xml +0 -71878
- package/coverage/src/automate/engine/index.js.html +0 -1471
- package/coverage/src/automate/engine/uniqueName.js.html +0 -412
- package/coverage/src/automate/template/myProcess.js.html +0 -34645
- package/coverage/src/concepts/DataElement__.ts.html +0 -118
- package/coverage/src/utils/time.ts.html +0 -118
|
@@ -593,43 +593,34 @@ export class ForEachStatement extends LogicItem {
|
|
|
593
593
|
|
|
594
594
|
@withSourceMap()
|
|
595
595
|
toNaturalTS(state = createCompilerState()): string {
|
|
596
|
-
let code = '';
|
|
596
|
+
let code = 'ForEach(';
|
|
597
597
|
code += this.each
|
|
598
|
-
? this.each
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
598
|
+
? this.each?.toNaturalTS(
|
|
599
|
+
shiftState(state, code, {
|
|
600
|
+
tabSize: 0,
|
|
601
|
+
}),
|
|
602
|
+
)
|
|
603
603
|
: '__IDENTIFIER__';
|
|
604
|
-
if (['NewList', 'NewMap'].includes(this.each?.concept)) code += '\n';
|
|
605
|
-
code += '.__slice(';
|
|
606
|
-
code += this.start ? this.start.toNaturalTS(shiftState(state, code)) : '__IDENTIFIER__';
|
|
607
604
|
code += ', ';
|
|
608
|
-
|
|
609
|
-
if (!virtualEnd && this.each) {
|
|
610
|
-
// if (['List', 'String', 'Email', 'Text', 'Map'].includes(this.each.__TypeAnnotation?.typeName)) {
|
|
611
|
-
virtualEnd = new MemberExpression({
|
|
612
|
-
object: BaseNode.from({ ...this.each.toJSON(), name: this.each.name }) as LogicItem,
|
|
613
|
-
property: new Identifier({ name: 'length' }),
|
|
614
|
-
});
|
|
615
|
-
// }
|
|
616
|
-
}
|
|
617
|
-
code += virtualEnd ? virtualEnd.toNaturalTS(shiftState(state, code)) : '__IDENTIFIER__';
|
|
618
|
-
code += ').__forEach((';
|
|
619
|
-
code += this.item ? this.item.toNaturalTS(shiftState(state, code), true) : '__IDENTIFIER__';
|
|
605
|
+
code += this.start ? this.start?.toNaturalTS(shiftState(state, code, { tabSize: 0 })) : '__IDENTIFIER__';
|
|
620
606
|
code += ', ';
|
|
621
|
-
code += this.
|
|
622
|
-
code += '
|
|
607
|
+
code += this.end ? this.end?.toNaturalTS(shiftState(state, code, { tabSize: 0 })) : '__IDENTIFIER__';
|
|
608
|
+
code += ', (';
|
|
609
|
+
code += this.item ? this.item?.toNaturalTS(shiftState(state, code, { tabSize: 0 }), true) : '__IDENTIFIER__';
|
|
610
|
+
code += ', ';
|
|
611
|
+
code += this.index ? this.index?.toNaturalTS(shiftState(state, code, { tabSize: 0 }), true) : '__IDENTIFIER__';
|
|
612
|
+
code += ') => {\n ';
|
|
613
|
+
|
|
623
614
|
if (Array.isArray(this.body)) {
|
|
624
615
|
this.body.forEach((logicItem) => {
|
|
625
|
-
code += `${logicItem
|
|
616
|
+
code += `${logicItem?.toNaturalTS(
|
|
626
617
|
shiftState(state, code, {
|
|
627
618
|
tabSize: (state?.tabSize || 0) + 1,
|
|
628
619
|
}),
|
|
629
620
|
)};\n`;
|
|
630
621
|
});
|
|
631
|
-
if (state
|
|
632
|
-
code += `${indent(state
|
|
622
|
+
if (state?.focusedNodePath === `${this?.nodePath}.body[${this.body?.length}]`)
|
|
623
|
+
code += `${indent(state?.tabSize + 1)}// 当前位置\n`;
|
|
633
624
|
}
|
|
634
625
|
code += `${indent(state?.tabSize || 0)}})\n`;
|
|
635
626
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { runGeneratorSync as runSync } from '../utils/time-slicing';
|
|
2
2
|
import {
|
|
3
3
|
TranslatorState,
|
|
4
4
|
createCompilerState,
|
|
@@ -342,7 +342,7 @@ export class LogicItem extends BaseNode {
|
|
|
342
342
|
* @returns 生成的代码
|
|
343
343
|
*/
|
|
344
344
|
toNaturalTS(state = createCompilerState()): string {
|
|
345
|
-
return this.
|
|
345
|
+
return runSync(this.toEmbeddedTS(state));
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
delete() {
|
package/src/concepts/Logic__.ts
CHANGED
|
@@ -2108,6 +2108,7 @@ ${indent(state.tabSize)} */\n`;
|
|
|
2108
2108
|
if ($1.includes(`,${variable},`)) fnCode = $1.replaceAll(`,${variable},`, `,${replaceCode},`);
|
|
2109
2109
|
if ($1.includes(`,${variable}.`)) fnCode = $1.replaceAll(`,${variable}.`, `,${replaceCode}.`);
|
|
2110
2110
|
if ($1.includes(`,${variable})`)) fnCode = $1.replaceAll(`,${variable})`, `,${replaceCode})`);
|
|
2111
|
+
if ($1.includes(`...[${variable}.`)) fnCode = $1.replaceAll(`...[${variable}.`, `...[${replaceCode}.`);
|
|
2111
2112
|
return fnCode;
|
|
2112
2113
|
});
|
|
2113
2114
|
}
|
package/src/concepts/Match__.ts
CHANGED
|
@@ -15,6 +15,7 @@ import MemberExpression from './MemberExpression__';
|
|
|
15
15
|
import { formatEnums } from '../server/getMemberIdentifier';
|
|
16
16
|
import Identifier from './Identifier__';
|
|
17
17
|
import ViewElement from './ViewElement__';
|
|
18
|
+
import { invokeCommand } from '../common';
|
|
18
19
|
|
|
19
20
|
//================================================================================
|
|
20
21
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -362,12 +363,16 @@ export class Match extends LogicItem {
|
|
|
362
363
|
// 设置 expression ,如果 expression 是可枚举类型,加上默认匹配条件
|
|
363
364
|
async setExpressionWitchCase(expression: LogicItem) {
|
|
364
365
|
const oldExpression = this.expression;
|
|
365
|
-
|
|
366
|
+
const event = {
|
|
366
367
|
actionMsg: `修改${this?.name || this?.label || (this?.constructor as any)?.nodeTitle}`,
|
|
367
|
-
|
|
368
|
+
noTimer: true,
|
|
369
|
+
};
|
|
370
|
+
this.app.emit('collect:start', event);
|
|
368
371
|
this.setExpression(expression);
|
|
369
372
|
// expression切换并且自动生成分支
|
|
373
|
+
invokeCommand('openLoading', '正在为您生成匹配分支,请耐心等待');
|
|
370
374
|
await this.autoGenCases(oldExpression);
|
|
375
|
+
invokeCommand('closeLoading');
|
|
371
376
|
this.app.emit('collect:end');
|
|
372
377
|
}
|
|
373
378
|
|
|
@@ -390,7 +395,7 @@ export class Match extends LogicItem {
|
|
|
390
395
|
return;
|
|
391
396
|
}
|
|
392
397
|
const oldTypeAnnotation = oldExpression?.__TypeAnnotation;
|
|
393
|
-
const currTypeAnnotation = await expression?.getCurrentTypeAnnotation();
|
|
398
|
+
const currTypeAnnotation = await expression?.getCurrentTypeAnnotation(30000);
|
|
394
399
|
|
|
395
400
|
// 如果nasl变了,但是新旧类型都是union就return
|
|
396
401
|
if (currTypeAnnotation?.typeKind === 'union' && oldTypeAnnotation?.typeKind === 'union') {
|
|
@@ -775,7 +780,7 @@ export class Match extends LogicItem {
|
|
|
775
780
|
code += item.toNaturalTS(shiftState(state, code, { tabSize: state.tabSize + 1 }), index, parentCode);
|
|
776
781
|
});
|
|
777
782
|
code += indent(state.tabSize);
|
|
778
|
-
code += `})(${this.expression
|
|
783
|
+
code += `})(${this.expression?.toNaturalTS(shiftState(state, code, { inline: true }))})`;
|
|
779
784
|
|
|
780
785
|
if (
|
|
781
786
|
this.parentNode?.concept !== 'Argument' &&
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//================================================================================
|
|
2
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
3
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
4
|
+
//================================================================================
|
|
5
|
+
import { EventPayload, Params } from '../common/EventEmitter';
|
|
6
|
+
import { concept, excludedInJSON, property, className } from '../decorators';
|
|
7
|
+
|
|
8
|
+
import * as utils from '../utils';
|
|
9
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
10
|
+
import BaseNode from '../common/BaseNode';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 多人审批任务
|
|
14
|
+
*/
|
|
15
|
+
@className
|
|
16
|
+
@concept('多人审批任务')
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
export class MultiApprovalPolicy extends BaseNode {
|
|
19
|
+
/** 类名 */
|
|
20
|
+
static readonly ConceptName = 'MultiApprovalPolicy';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 产品概念
|
|
24
|
+
*/
|
|
25
|
+
@property('concept')
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
readonly concept!: 'MultiApprovalPolicy' | 'SequentialPolicy' | 'CountersignPolicy';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @param source 需要合并的部分参数
|
|
31
|
+
*/
|
|
32
|
+
constructor(source?: Partial<MultiApprovalPolicy>) {
|
|
33
|
+
source = Object.assign({}, MultiApprovalPolicy.getDefaultOptions(), source);
|
|
34
|
+
super(source);
|
|
35
|
+
super.subConstructor(source);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static from(source: any, parentNode?: any, parentKey?: string): MultiApprovalPolicy {
|
|
39
|
+
return super.from(source, parentNode, parentKey) as MultiApprovalPolicy;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 从父级删除该节点
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
_delete() {
|
|
47
|
+
let params: Params = null;
|
|
48
|
+
if (this.parentNode) {
|
|
49
|
+
params = (this.parentNode as any)?.__removeMultiApprovalPolicy?.(this);
|
|
50
|
+
}
|
|
51
|
+
return params;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
//================================================================================
|
|
55
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
56
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
57
|
+
//================================================================================
|
|
58
|
+
|
|
59
|
+
//================================================================================
|
|
60
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
61
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
62
|
+
//================================================================================
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default MultiApprovalPolicy;
|
|
66
|
+
//================================================================================
|
|
67
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
68
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
69
|
+
//================================================================================
|
|
@@ -1361,21 +1361,30 @@ export class NewComposite extends LogicItem {
|
|
|
1361
1361
|
});
|
|
1362
1362
|
code += right.members.length ? '\n' : '';
|
|
1363
1363
|
});
|
|
1364
|
-
//
|
|
1365
|
-
code += `${indent1}function __newComposite() {\n`;
|
|
1364
|
+
// 先把连线的变量定义出来,否则匿名数据结构属性名称与变量名称相同时会报错,
|
|
1366
1365
|
yield* wrapForEach(self.properties, function* warpForEachGenerator(property, index) {
|
|
1367
|
-
const temp = `temp${index}`;
|
|
1368
|
-
const propertyType = self.typeAnnotation.properties[index]?.typeAnnotation;
|
|
1366
|
+
const temp = `temp${index}__`;
|
|
1369
1367
|
const { name } = property;
|
|
1370
1368
|
const rightItem = nameMap.get(name);
|
|
1371
1369
|
const ts = rightMap.get(rightItem);
|
|
1372
1370
|
if (ts !== undefined) {
|
|
1373
1371
|
if (['__IDENTIFIER__', '__IDENTIFIER__()'].includes(ts)) {
|
|
1374
|
-
code += `${
|
|
1372
|
+
code += `${indent1}let ${temp}: void = null; \n`;
|
|
1375
1373
|
} else {
|
|
1376
|
-
code += `${
|
|
1374
|
+
code += `${indent1}let ${temp}${ts === 'null' ? ':void' : ''} = ${ts}; \n`;
|
|
1377
1375
|
}
|
|
1378
|
-
|
|
1376
|
+
}
|
|
1377
|
+
});
|
|
1378
|
+
// 方便ts报错检查
|
|
1379
|
+
code += `${indent1}function __newComposite() {\n`;
|
|
1380
|
+
yield* wrapForEach(self.properties, function* warpForEachGenerator(property, index) {
|
|
1381
|
+
const temp = `temp${index}__`;
|
|
1382
|
+
const propertyType = self.typeAnnotation.properties[index]?.typeAnnotation;
|
|
1383
|
+
const { name } = property;
|
|
1384
|
+
const rightItem = nameMap.get(name);
|
|
1385
|
+
const ts = rightMap.get(rightItem);
|
|
1386
|
+
if (ts !== undefined) {
|
|
1387
|
+
code += `${indent2}let `;
|
|
1379
1388
|
code += `${yield* property.toEmbeddedTS(shiftState(state, code, { inline: true }))}: `;
|
|
1380
1389
|
if (propertyType) {
|
|
1381
1390
|
const typeTs = yield* propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
@@ -1403,7 +1412,7 @@ export class NewComposite extends LogicItem {
|
|
|
1403
1412
|
yield* wrapForEach(self.properties, function* warpForEachGenerator(property) {
|
|
1404
1413
|
code += `${indent3}${property.name},\n`;
|
|
1405
1414
|
});
|
|
1406
|
-
code += `${indent3}__name: "
|
|
1415
|
+
code += `${indent3}__name: "AStructure_AAAAAAAA" as const,\n`;
|
|
1407
1416
|
code += `${indent2}}\n`;
|
|
1408
1417
|
code += `${indent1}};\n`;
|
|
1409
1418
|
code += `${indent1}return __newComposite();\n`;
|
|
@@ -1482,7 +1491,7 @@ export class NewComposite extends LogicItem {
|
|
|
1482
1491
|
this.properties.forEach((property) => {
|
|
1483
1492
|
code += `${indent4}${property.name},\n`;
|
|
1484
1493
|
});
|
|
1485
|
-
code += `${indent4}__name: "
|
|
1494
|
+
code += `${indent4}__name: "AStructure_AAAAAAAA" as const,\n`;
|
|
1486
1495
|
code += `${indent3}}\n`;
|
|
1487
1496
|
|
|
1488
1497
|
code += `${indent2}};\n`;
|
package/src/concepts/Param__.ts
CHANGED
|
@@ -315,16 +315,23 @@ export class Param extends BaseNode {
|
|
|
315
315
|
toJS(state?: TranslatorState): string {
|
|
316
316
|
if (this.view) {
|
|
317
317
|
const typeAnnotation = this.typeAnnotation || this.__TypeAnnotation;
|
|
318
|
+
let { sortedTypeKey, typeKind, typeName, typeNamespace } = typeAnnotation || {};
|
|
319
|
+
if (typeNamespace?.endsWith('.metadataTypes')) {
|
|
320
|
+
const referenceNode = this.app.findNodeByCompleteName(typeNamespace + '.' + typeName) || {};
|
|
321
|
+
const typeAn = referenceNode.typeAnnotation || {};
|
|
322
|
+
sortedTypeKey = `${typeAn.typeNamespace}.${typeAn.typeName}`;
|
|
323
|
+
typeKind = typeAn.typeKind;
|
|
324
|
+
typeName = typeAn.typeName;
|
|
325
|
+
}
|
|
318
326
|
const needGenInitFromSchema =
|
|
319
327
|
typeAnnotation &&
|
|
320
|
-
(!['primitive', 'union'].includes(
|
|
328
|
+
(!['primitive', 'union'].includes(typeKind) || typeName === 'DateTime');
|
|
321
329
|
let code = `${this.name} = `;
|
|
322
330
|
if (needGenInitFromSchema) {
|
|
323
|
-
code += `this.$genInitFromSchema('${
|
|
331
|
+
code += `this.$genInitFromSchema('${sortedTypeKey}',`;
|
|
324
332
|
}
|
|
325
333
|
const { defaultValue } = this;
|
|
326
334
|
const defaultValueType = Object.prototype.toString.call(defaultValue);
|
|
327
|
-
const { typeKind, typeNamespace, typeName } = typeAnnotation || {};
|
|
328
335
|
// 设置成null,才能同步给后端清除该值,但是null对checkbox组件是一种特殊状态
|
|
329
336
|
let parsedValue = defaultValue ?? undefined;
|
|
330
337
|
if (
|
|
@@ -561,3 +568,5 @@ export default Param;
|
|
|
561
568
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
562
569
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
563
570
|
//================================================================================
|
|
571
|
+
|
|
572
|
+
|
|
@@ -37,6 +37,7 @@ import Variable from './Variable__';
|
|
|
37
37
|
import Return from './Return__';
|
|
38
38
|
import Constant from './Constant__';
|
|
39
39
|
import BindAttribute from './BindAttribute__';
|
|
40
|
+
import MultiApprovalPolicy from './MultiApprovalPolicy__';
|
|
40
41
|
import Process from './Process__';
|
|
41
42
|
import Module from './Module__';
|
|
42
43
|
import App from './App__';
|
|
@@ -157,6 +158,13 @@ export class ProcessElement extends BaseNode {
|
|
|
157
158
|
@property('BindAttribute')
|
|
158
159
|
bindAttrs: Array<BindAttribute> = [];
|
|
159
160
|
|
|
161
|
+
/**
|
|
162
|
+
* 多人审批任务
|
|
163
|
+
*/
|
|
164
|
+
@property('MultiApprovalPolicy')
|
|
165
|
+
// @ts-ignore
|
|
166
|
+
multiApprovalPolicy!: MultiApprovalPolicy;
|
|
167
|
+
|
|
160
168
|
/**
|
|
161
169
|
* 祖先 Process
|
|
162
170
|
*/
|
|
@@ -1656,6 +1664,62 @@ export class ProcessElement extends BaseNode {
|
|
|
1656
1664
|
return params;
|
|
1657
1665
|
}
|
|
1658
1666
|
|
|
1667
|
+
/**
|
|
1668
|
+
* 删除多人审批任务
|
|
1669
|
+
* @param name 多人审批任务名称
|
|
1670
|
+
*/
|
|
1671
|
+
removeMultiApprovalPolicy(name: string): void;
|
|
1672
|
+
|
|
1673
|
+
/**
|
|
1674
|
+
* 删除多人审批任务
|
|
1675
|
+
* @param multiApprovalPolicy 已有的多人审批任务实例
|
|
1676
|
+
*/
|
|
1677
|
+
removeMultiApprovalPolicy(multiApprovalPolicy: MultiApprovalPolicy): void;
|
|
1678
|
+
|
|
1679
|
+
removeMultiApprovalPolicy(options: string | MultiApprovalPolicy) {
|
|
1680
|
+
let multiApprovalPolicy: MultiApprovalPolicy;
|
|
1681
|
+
if (typeof options === 'string') {
|
|
1682
|
+
multiApprovalPolicy = this.multiApprovalPolicy;
|
|
1683
|
+
if (!multiApprovalPolicy) {
|
|
1684
|
+
throw new Error('找不到多人审批任务 ' + options);
|
|
1685
|
+
}
|
|
1686
|
+
} else {
|
|
1687
|
+
multiApprovalPolicy = options;
|
|
1688
|
+
}
|
|
1689
|
+
return multiApprovalPolicy.delete();
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
__removeMultiApprovalPolicy(multiApprovalPolicy: MultiApprovalPolicy) {
|
|
1693
|
+
const parentKey = multiApprovalPolicy.parentKey;
|
|
1694
|
+
const params: Params = {
|
|
1695
|
+
parentNode: this,
|
|
1696
|
+
parentKey,
|
|
1697
|
+
index: -1,
|
|
1698
|
+
object: null,
|
|
1699
|
+
oldObject: multiApprovalPolicy,
|
|
1700
|
+
};
|
|
1701
|
+
if (parentKey) {
|
|
1702
|
+
params.parentKey = parentKey;
|
|
1703
|
+
// @ts-ignore
|
|
1704
|
+
const t = this.__v_raw || this;
|
|
1705
|
+
// @ts-ignore
|
|
1706
|
+
const n = multiApprovalPolicy.__v_raw || multiApprovalPolicy;
|
|
1707
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1708
|
+
// @ts-ignore
|
|
1709
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1710
|
+
~index && (this as any)[parentKey].splice(index, 1);
|
|
1711
|
+
params.index = index;
|
|
1712
|
+
} else {
|
|
1713
|
+
const q = (t as any)[parentKey];
|
|
1714
|
+
if ((q.__v_raw || q) === n) {
|
|
1715
|
+
params.index = 0;
|
|
1716
|
+
(this as any)[parentKey] = undefined;
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
return params;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1659
1723
|
//================================================================================
|
|
1660
1724
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
1661
1725
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
@@ -1668,7 +1732,12 @@ export class ProcessElement extends BaseNode {
|
|
|
1668
1732
|
}
|
|
1669
1733
|
|
|
1670
1734
|
get isUserTask() {
|
|
1671
|
-
return
|
|
1735
|
+
return (
|
|
1736
|
+
this.type === 'UserTask' ||
|
|
1737
|
+
this.type === 'ApprovalTask' ||
|
|
1738
|
+
this.type === 'MultiApprovalTask' ||
|
|
1739
|
+
this.type === 'InitiateTask'
|
|
1740
|
+
);
|
|
1672
1741
|
}
|
|
1673
1742
|
|
|
1674
1743
|
get logics() {
|
|
@@ -1476,6 +1476,7 @@ export class Process extends BaseNode {
|
|
|
1476
1476
|
concept: 'ProcessElement',
|
|
1477
1477
|
name: 'Start',
|
|
1478
1478
|
type: 'StartNoneEvent',
|
|
1479
|
+
title: '开始',
|
|
1479
1480
|
bounds: {
|
|
1480
1481
|
concept: 'Rect',
|
|
1481
1482
|
x: 0,
|
|
@@ -1534,6 +1535,7 @@ export class Process extends BaseNode {
|
|
|
1534
1535
|
concept: 'ProcessElement',
|
|
1535
1536
|
name: 'End',
|
|
1536
1537
|
type: 'EndNoneEvent',
|
|
1538
|
+
title: '结束',
|
|
1537
1539
|
bounds: {
|
|
1538
1540
|
concept: 'Rect',
|
|
1539
1541
|
x: 0,
|
package/src/concepts/Return__.ts
CHANGED
|
@@ -272,16 +272,23 @@ export class Return extends BaseNode {
|
|
|
272
272
|
toJS(state?: TranslatorState): string {
|
|
273
273
|
const context = this.view ? 'this' : 'Vue.prototype';
|
|
274
274
|
const typeAnnotation = this.typeAnnotation || this.__TypeAnnotation;
|
|
275
|
+
let { sortedTypeKey, typeKind, typeName, typeNamespace } = typeAnnotation || {};
|
|
276
|
+
if (typeNamespace?.endsWith('.metadataTypes')) {
|
|
277
|
+
const referenceNode = this.app.findNodeByCompleteName(typeNamespace + '.' + typeName) || {};
|
|
278
|
+
const typeAn = referenceNode.typeAnnotation || {};
|
|
279
|
+
sortedTypeKey = `${typeAn.typeNamespace}.${typeAn.typeName}`;
|
|
280
|
+
typeKind = typeAn.typeKind;
|
|
281
|
+
typeName = typeAn.typeName;
|
|
282
|
+
}
|
|
275
283
|
const needGenInitFromSchema =
|
|
276
284
|
typeAnnotation &&
|
|
277
|
-
(!['primitive', 'union'].includes(
|
|
285
|
+
(!['primitive', 'union'].includes(typeKind) || typeName === 'DateTime');
|
|
278
286
|
let code = `${this.name} =`;
|
|
279
287
|
if (needGenInitFromSchema) {
|
|
280
|
-
code += `${context}.$genInitFromSchema('${
|
|
288
|
+
code += `${context}.$genInitFromSchema('${sortedTypeKey}',`;
|
|
281
289
|
}
|
|
282
290
|
const { defaultValue } = this;
|
|
283
291
|
const defaultValueType = Object.prototype.toString.call(defaultValue);
|
|
284
|
-
const { typeKind, typeNamespace, typeName } = typeAnnotation || {};
|
|
285
292
|
// 设置成null,才能同步给后端清除该值,但是null对checkbox组件是一种特殊状态
|
|
286
293
|
let parsedValue = defaultValue ?? undefined;
|
|
287
294
|
if (
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//================================================================================
|
|
2
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
3
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
4
|
+
//================================================================================
|
|
5
|
+
import { EventPayload, Params } from '../common/EventEmitter';
|
|
6
|
+
import { concept, excludedInJSON, property, className } from '../decorators';
|
|
7
|
+
|
|
8
|
+
import * as utils from '../utils';
|
|
9
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
10
|
+
import BaseNode from '../common/BaseNode';
|
|
11
|
+
import MultiApprovalPolicy from './MultiApprovalPolicy__';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 依次审批
|
|
15
|
+
*/
|
|
16
|
+
@className
|
|
17
|
+
@concept('依次审批')
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
export class SequentialPolicy extends MultiApprovalPolicy {
|
|
20
|
+
/** 类名 */
|
|
21
|
+
static readonly ConceptName = 'SequentialPolicy';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 产品概念
|
|
25
|
+
*/
|
|
26
|
+
@property('concept')
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
readonly concept!: 'SequentialPolicy';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param source 需要合并的部分参数
|
|
32
|
+
*/
|
|
33
|
+
constructor(source?: Partial<SequentialPolicy>) {
|
|
34
|
+
source = Object.assign({}, SequentialPolicy.getDefaultOptions(), source);
|
|
35
|
+
super(source);
|
|
36
|
+
super.subConstructor(source);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static from(source: any, parentNode?: any, parentKey?: string): SequentialPolicy {
|
|
40
|
+
return super.from(source, parentNode, parentKey) as SequentialPolicy;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//================================================================================
|
|
44
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
45
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
46
|
+
//================================================================================
|
|
47
|
+
|
|
48
|
+
//================================================================================
|
|
49
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
50
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
51
|
+
//================================================================================
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default SequentialPolicy;
|
|
55
|
+
//================================================================================
|
|
56
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
57
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
58
|
+
//================================================================================
|
|
@@ -291,16 +291,23 @@ export class Variable extends BaseNode {
|
|
|
291
291
|
toJS(state?: TranslatorState): string {
|
|
292
292
|
const context = this.view ? 'this' : 'Vue.prototype';
|
|
293
293
|
const typeAnnotation = this.typeAnnotation || this.__TypeAnnotation;
|
|
294
|
+
let { sortedTypeKey, typeKind, typeName, typeNamespace } = typeAnnotation || {};
|
|
295
|
+
if (typeNamespace?.endsWith('.metadataTypes')) {
|
|
296
|
+
const referenceNode = this.app.findNodeByCompleteName(typeNamespace + '.' + typeName) || {};
|
|
297
|
+
const typeAn = referenceNode.typeAnnotation || {};
|
|
298
|
+
sortedTypeKey = `${typeAn.typeNamespace}.${typeAn.typeName}`;
|
|
299
|
+
typeKind = typeAn.typeKind;
|
|
300
|
+
typeName = typeAn.typeName;
|
|
301
|
+
}
|
|
294
302
|
const needGenInitFromSchema =
|
|
295
303
|
typeAnnotation &&
|
|
296
|
-
(!['primitive', 'union'].includes(
|
|
304
|
+
(!['primitive', 'union'].includes(typeKind) || typeName === 'DateTime');
|
|
297
305
|
let code = `${this.name} = `;
|
|
298
306
|
if (needGenInitFromSchema) {
|
|
299
|
-
code += `${context}.$genInitFromSchema('${
|
|
307
|
+
code += `${context}.$genInitFromSchema('${sortedTypeKey}',`;
|
|
300
308
|
}
|
|
301
309
|
const { defaultValue } = this;
|
|
302
310
|
const defaultValueType = Object.prototype.toString.call(defaultValue);
|
|
303
|
-
const { typeKind, typeNamespace, typeName } = typeAnnotation || {};
|
|
304
311
|
// 设置成null,才能同步给后端清除该值,但是null对checkbox组件是一种特殊状态
|
|
305
312
|
let parsedValue = defaultValue ?? undefined;
|
|
306
313
|
if (
|
|
@@ -1629,11 +1629,18 @@ export class ViewElement extends BaseNode {
|
|
|
1629
1629
|
['u-list-view', 'u-grid-view', 'u-table-view', 'van-list-view', 'van-grid-view'].includes(self.tag) &&
|
|
1630
1630
|
self.bindAttrs?.findIndex((attr) => attr.name === 'sorting') === -1
|
|
1631
1631
|
) {
|
|
1632
|
+
if (['u-list-view', 'van-grid-view', 'van-list-view'].includes(self.tag)) {
|
|
1633
|
+
code += indent((state?.tabSize || 0) + 3);
|
|
1634
|
+
code += `filterText: nasl.core.String\n`;
|
|
1635
|
+
}
|
|
1632
1636
|
code += indent((state?.tabSize || 0) + 3);
|
|
1633
1637
|
code += `sorting: {
|
|
1634
1638
|
field: nasl.core.String
|
|
1635
1639
|
order: nasl.core.String
|
|
1636
1640
|
}\n`;
|
|
1641
|
+
} else if (['u-cascader', 'van-cascader'].includes(self.tag)) {
|
|
1642
|
+
code += indent((state?.tabSize || 0) + 3);
|
|
1643
|
+
code += `filterText: nasl.core.String\n`;
|
|
1637
1644
|
}
|
|
1638
1645
|
}
|
|
1639
1646
|
code += indent((state?.tabSize || 0) + 2);
|
package/src/concepts/View__.ts
CHANGED
|
@@ -26,6 +26,11 @@ import BatchAssignment from './BatchAssignment__';
|
|
|
26
26
|
import CallInterface from './CallInterface__';
|
|
27
27
|
import CallLogic from './CallLogic__';
|
|
28
28
|
|
|
29
|
+
const getBranchCopyUniCode = () => (window as any)?.BranchCopyUniCode
|
|
30
|
+
const removedViewElementCache : {
|
|
31
|
+
[key: string]: number | bigint;
|
|
32
|
+
}= {} // 临时记录删除的页面元素计数的最大值
|
|
33
|
+
|
|
29
34
|
//================================================================================
|
|
30
35
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
31
36
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -44,11 +49,6 @@ import BindEvent from './BindEvent__';
|
|
|
44
49
|
import Module from './Module__';
|
|
45
50
|
import Frontend from './Frontend__';
|
|
46
51
|
import App from './App__';
|
|
47
|
-
|
|
48
|
-
const getBranchCopyUniCode = () => (window as any)?.BranchCopyUniCode
|
|
49
|
-
const removedViewElementCache : {
|
|
50
|
-
[key: string]: number | bigint;
|
|
51
|
-
}= {} // 临时记录删除的页面元素计数的最大值
|
|
52
52
|
/**
|
|
53
53
|
* 页面
|
|
54
54
|
*/
|
package/src/concepts/index__.ts
CHANGED
|
@@ -98,6 +98,9 @@ export * from './ProcessComponent__';
|
|
|
98
98
|
export * from './ProcessOutcome__';
|
|
99
99
|
export * from './Assignee__';
|
|
100
100
|
export * from './ProcessOutcomes__';
|
|
101
|
+
export * from './MultiApprovalPolicy__';
|
|
102
|
+
export * from './SequentialPolicy__';
|
|
103
|
+
export * from './CountersignPolicy__';
|
|
101
104
|
export * from './Role__';
|
|
102
105
|
export * from './Configuration__';
|
|
103
106
|
export * from './ConfigGroup__';
|
package/src/concepts/types__.ts
CHANGED
|
@@ -97,6 +97,9 @@ import type { ProcessComponent } from './ProcessComponent__';
|
|
|
97
97
|
import type { ProcessOutcome } from './ProcessOutcome__';
|
|
98
98
|
import type { Assignee } from './Assignee__';
|
|
99
99
|
import type { ProcessOutcomes } from './ProcessOutcomes__';
|
|
100
|
+
import type { MultiApprovalPolicy } from './MultiApprovalPolicy__';
|
|
101
|
+
import type { SequentialPolicy } from './SequentialPolicy__';
|
|
102
|
+
import type { CountersignPolicy } from './CountersignPolicy__';
|
|
100
103
|
import type { Role } from './Role__';
|
|
101
104
|
import type { Configuration } from './Configuration__';
|
|
102
105
|
import type { ConfigGroup } from './ConfigGroup__';
|
|
@@ -221,6 +224,9 @@ export type SyntaxNode =
|
|
|
221
224
|
| ProcessOutcome
|
|
222
225
|
| Assignee
|
|
223
226
|
| ProcessOutcomes
|
|
227
|
+
| MultiApprovalPolicy
|
|
228
|
+
| SequentialPolicy
|
|
229
|
+
| CountersignPolicy
|
|
224
230
|
| Role
|
|
225
231
|
| Configuration
|
|
226
232
|
| ConfigGroup
|