@lcap/nasl 3.3.2-beta.4 → 3.3.2-beta.5
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/coverage/index.html +108 -108
- package/coverage/src/automate/engine/index.html +1 -1
- package/coverage/src/automate/engine/utils.js.html +36 -36
- package/coverage/src/bak/index.html +15 -15
- package/coverage/src/bak/translator.js.html +183 -60
- 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 +1 -1
- package/coverage/src/breakpoint/generator/CallbackNode.ts.html +1 -1
- package/coverage/src/breakpoint/generator/index.html +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +92 -62
- package/coverage/src/common/Command.ts.html +1 -1
- package/coverage/src/common/EventEmitter.ts.html +1 -1
- package/coverage/src/common/Messager.ts.html +1 -1
- package/coverage/src/common/asyncFuncMap.ts.html +1 -1
- package/coverage/src/common/index.html +14 -14
- package/coverage/src/common/index.ts.html +1 -1
- package/coverage/src/concepts/Abort__.ts.html +9 -6
- package/coverage/src/concepts/Anchor__.ts.html +36 -21
- package/coverage/src/concepts/AnonymousFunction__.ts.html +62 -20
- package/coverage/src/concepts/App__.ts.html +917 -74
- package/coverage/src/concepts/Argument__.ts.html +41 -26
- package/coverage/src/concepts/Assignee__.ts.html +40 -13
- package/coverage/src/concepts/AssignmentLine__.ts.html +9 -6
- package/coverage/src/concepts/Assignment__.ts.html +61 -22
- package/coverage/src/concepts/Attribute__.ts.html +25 -10
- package/coverage/src/concepts/AuthInterface__.ts.html +9 -6
- package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +25 -10
- package/coverage/src/concepts/AuthLogic__.ts.html +18 -6
- package/coverage/src/concepts/BackendVariable__.ts.html +25 -10
- package/coverage/src/concepts/Backend__.ts.html +25 -10
- package/coverage/src/concepts/BatchAssignment__.ts.html +61 -16
- package/coverage/src/concepts/BinaryExpression__.ts.html +141 -39
- package/coverage/src/concepts/BindAttribute__.ts.html +134 -41
- package/coverage/src/concepts/BindDirective__.ts.html +79 -16
- package/coverage/src/concepts/BindEvent__.ts.html +80 -23
- package/coverage/src/concepts/BindStyle__.ts.html +25 -10
- package/coverage/src/concepts/BooleanLiteral__.ts.html +9 -6
- package/coverage/src/concepts/CallAuthInterface__.ts.html +25 -10
- package/coverage/src/concepts/CallConnector__.ts.html +9 -6
- package/coverage/src/concepts/CallFunction__.ts.html +56 -38
- package/coverage/src/concepts/CallInterface__.ts.html +81 -36
- package/coverage/src/concepts/CallLogic__.ts.html +195 -264
- package/coverage/src/concepts/CallQueryComponent__.ts.html +40 -13
- package/coverage/src/concepts/Comment__.ts.html +11 -8
- package/coverage/src/concepts/CompletionProperty__.ts.html +25 -10
- package/coverage/src/concepts/ConfigGroup__.ts.html +25 -10
- package/coverage/src/concepts/ConfigPropertyValue__.ts.html +9 -6
- package/coverage/src/concepts/ConfigProperty__.ts.html +25 -10
- package/coverage/src/concepts/Configuration__.ts.html +25 -10
- package/coverage/src/concepts/Connection__.ts.html +26 -11
- package/coverage/src/concepts/ConnectorTrigger__.ts.html +9 -6
- package/coverage/src/concepts/Connector__.ts.html +85 -22
- package/coverage/src/concepts/Constant__.ts.html +25 -10
- package/coverage/src/concepts/DataSource__.ts.html +26 -11
- package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +9 -6
- package/coverage/src/concepts/Destination__.ts.html +24 -12
- package/coverage/src/concepts/End__.ts.html +9 -6
- package/coverage/src/concepts/EntityIndex__.ts.html +9 -6
- package/coverage/src/concepts/EntityProperty__.ts.html +62 -14
- package/coverage/src/concepts/Entity__.ts.html +41 -14
- package/coverage/src/concepts/EnumItem__.ts.html +9 -6
- package/coverage/src/concepts/Enum__.ts.html +25 -10
- package/coverage/src/concepts/Event__.ts.html +25 -10
- package/coverage/src/concepts/ExternalDestination__.ts.html +25 -10
- package/coverage/src/concepts/ForEachStatement__.ts.html +68 -47
- package/coverage/src/concepts/FrontendLibrary__.ts.html +40 -13
- package/coverage/src/concepts/FrontendVariable__.ts.html +1 -1
- package/coverage/src/concepts/Frontend__.ts.html +86 -23
- package/coverage/src/concepts/Function__.ts.html +92 -26
- package/coverage/src/concepts/Identifier__.ts.html +28 -25
- package/coverage/src/concepts/IfStatement__.ts.html +83 -56
- package/coverage/src/concepts/Integration__.ts.html +40 -13
- package/coverage/src/concepts/InterfaceParam__.ts.html +25 -10
- package/coverage/src/concepts/Interface__.ts.html +61 -22
- package/coverage/src/concepts/JSBlock__.ts.html +188 -8
- package/coverage/src/concepts/JavaLogic__.ts.html +9 -6
- package/coverage/src/concepts/LogicItem__.ts.html +15 -12
- package/coverage/src/concepts/Logic__.ts.html +117 -81
- package/coverage/src/concepts/MatchCase__.ts.html +100 -61
- package/coverage/src/concepts/Match__.ts.html +48 -27
- package/coverage/src/concepts/MemberExpression__.ts.html +72 -66
- package/coverage/src/concepts/MetadataType__.ts.html +1996 -0
- package/coverage/src/concepts/MicroApp__.ts.html +9 -6
- package/coverage/src/concepts/Module__.ts.html +672 -18
- package/coverage/src/concepts/MsgTriggerEvent__.ts.html +25 -10
- package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +25 -10
- package/coverage/src/concepts/Namespace__.ts.html +175 -40
- package/coverage/src/concepts/NewComposite__.ts.html +93 -27
- package/coverage/src/concepts/NewList__.ts.html +44 -14
- package/coverage/src/concepts/NewMap__.ts.html +44 -14
- package/coverage/src/concepts/New__.ts.html +1 -1
- package/coverage/src/concepts/NullLiteral__.ts.html +9 -6
- package/coverage/src/concepts/NumericLiteral__.ts.html +27 -12
- package/coverage/src/concepts/OqlQueryComponent__.ts.html +103 -13
- package/coverage/src/concepts/OverriddenLogic__.ts.html +100 -25
- package/coverage/src/concepts/Param__.ts.html +24 -15
- package/coverage/src/concepts/Point__.ts.html +9 -6
- package/coverage/src/concepts/ProcessComponent__.ts.html +40 -13
- package/coverage/src/concepts/ProcessElement__.ts.html +128 -29
- package/coverage/src/concepts/ProcessOutcome__.ts.html +9 -6
- package/coverage/src/concepts/ProcessOutcomes__.ts.html +9 -6
- package/coverage/src/concepts/Process__.ts.html +85 -22
- package/coverage/src/concepts/QueryAggregateExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryFieldExpression__.ts.html +9 -6
- package/coverage/src/concepts/QueryFromExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryGroupByExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryJoinExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryLimitExpression__.ts.html +25 -10
- package/coverage/src/concepts/QueryOrderByExpression__.ts.html +25 -10
- package/coverage/src/concepts/QuerySelectExpression__.ts.html +25 -10
- package/coverage/src/concepts/Rect__.ts.html +9 -6
- package/coverage/src/concepts/Return__.ts.html +25 -10
- package/coverage/src/concepts/Role__.ts.html +9 -6
- package/coverage/src/concepts/SelectMembers__.ts.html +25 -10
- package/coverage/src/concepts/Slot__.ts.html +25 -10
- package/coverage/src/concepts/SqlQueryComponent__.ts.html +25 -10
- package/coverage/src/concepts/Start__.ts.html +9 -6
- package/coverage/src/concepts/StringInterpolation__.ts.html +40 -19
- package/coverage/src/concepts/StringLiteral__.ts.html +9 -6
- package/coverage/src/concepts/StructureProperty__.ts.html +25 -10
- package/coverage/src/concepts/Structure__.ts.html +40 -13
- package/coverage/src/concepts/SwitchCase__.ts.html +33 -18
- package/coverage/src/concepts/SwitchStatement__.ts.html +38 -23
- package/coverage/src/concepts/Theme__.ts.html +9 -6
- package/coverage/src/concepts/Transactional__.ts.html +9 -6
- package/coverage/src/concepts/TriggerEvent__.ts.html +25 -10
- package/coverage/src/concepts/TriggerLauncher__.ts.html +9 -6
- package/coverage/src/concepts/TypeAnnotation__.ts.html +223 -61
- package/coverage/src/concepts/TypeParam__.ts.html +10 -7
- package/coverage/src/concepts/UnaryExpression__.ts.html +40 -13
- package/coverage/src/concepts/Unparsed__.ts.html +11 -8
- package/coverage/src/concepts/UseComponent__.ts.html +9 -6
- package/coverage/src/concepts/ValidationRule__.ts.html +30 -15
- package/coverage/src/concepts/Variable__.ts.html +61 -16
- package/coverage/src/concepts/ViewBlock__.ts.html +9 -6
- package/coverage/src/concepts/ViewComponent__.ts.html +99 -24
- package/coverage/src/concepts/ViewElement__.ts.html +334 -181
- package/coverage/src/concepts/View__.ts.html +326 -71
- package/coverage/src/concepts/WhileStatement__.ts.html +78 -45
- 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 +1 -1
- 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 +823 -808
- package/coverage/src/concepts/index.ts.html +1 -1
- package/coverage/src/concepts/index__.ts.html +7 -4
- 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 +1 -1
- package/coverage/src/generator/genBundleFiles.ts.html +13 -19
- package/coverage/src/generator/genHash.ts.html +1 -1
- package/coverage/src/generator/genMetaData.ts.html +103 -16
- package/coverage/src/generator/genReleaseBody.ts.html +1 -1
- package/coverage/src/generator/icestark.ts.html +1 -1
- package/coverage/src/generator/index.html +15 -15
- 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 +7 -7
- package/coverage/src/index.ts.html +4 -4
- 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 +15 -15
- 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 +78 -18
- package/coverage/src/sentry/index.html +1 -1
- package/coverage/src/sentry/index.ts.html +21 -21
- package/coverage/src/server/createUiTs.ts.html +15 -6
- package/coverage/src/server/entity2LogicNamespace.ts.html +1 -1
- package/coverage/src/server/event.js.html +1 -1
- package/coverage/src/server/extendBaseNode.ts.html +7 -4
- package/coverage/src/server/formatTsUtils.ts.html +1 -1
- 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 +1 -1
- package/coverage/src/server/getInterfaces.ts.html +1 -1
- package/coverage/src/server/getLogging.ts.html +1 -1
- package/coverage/src/server/getLogics.ts.html +1 -1
- package/coverage/src/server/getMemberIdentifier.ts.html +161 -113
- package/coverage/src/server/getProcessComponents.ts.html +1 -1
- package/coverage/src/server/getProcesses.ts.html +1 -1
- package/coverage/src/server/getValidates.ts.html +1 -1
- package/coverage/src/server/index.html +25 -25
- package/coverage/src/server/index.ts.html +1 -1
- package/coverage/src/server/naslServer.ts.html +470 -59
- package/coverage/src/server/naslStdlibMap.ts.html +1 -1
- package/coverage/src/server/process2LogicNamespace.ts.html +1 -1
- package/coverage/src/server/translator.ts.html +3 -3
- package/coverage/src/service/creator/add.configs.js.html +26 -8
- package/coverage/src/service/creator/errHandles.js.html +19 -37
- package/coverage/src/service/creator/index.html +22 -22
- 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 +19 -19
- package/coverage/src/service/storage/index.ts.html +1 -1
- package/coverage/src/service/storage/init.ts.html +1498 -598
- package/coverage/src/service/storage/jsoner.ts.html +3 -3
- package/coverage/src/service/storage/map.ts.html +1 -1
- 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 +47 -56
- package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +49 -31
- package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +81 -93
- package/coverage/src/templator/genEditTableBlock.ts.html +80 -11
- 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 +66 -3
- package/coverage/src/templator/genUpdateBlock.ts.html +48 -36
- package/coverage/src/templator/index.html +39 -39
- package/coverage/src/templator/index.ts.html +1 -1
- package/coverage/src/templator/utils.ts.html +77 -11
- package/coverage/src/translator/constant.ts.html +1 -1
- package/coverage/src/translator/index.html +20 -20
- package/coverage/src/translator/index.ts.html +1 -1
- package/coverage/src/translator/utils.ts.html +87 -30
- package/coverage/src/utils/cookie.ts.html +1 -1
- package/coverage/src/utils/env.ts.html +1 -1
- package/coverage/src/utils/index.html +27 -27
- package/coverage/src/utils/index.ts.html +115 -22
- package/coverage/src/utils/logger.ts.html +1 -1
- package/coverage/src/utils/sortTsString.ts.html +1 -1
- package/coverage/src/utils/string.ts.html +110 -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/common/BaseNode.d.ts +1 -1
- package/out/common/BaseNode.js +6 -2
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/Abort__.js +3 -1
- package/out/concepts/Abort__.js.map +1 -1
- package/out/concepts/Anchor__.js +11 -4
- package/out/concepts/Anchor__.js.map +1 -1
- package/out/concepts/AnonymousFunction__.js +30 -11
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.js +147 -63
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.js +11 -4
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/Assignee__.js +23 -9
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.js +3 -1
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.js +19 -6
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/Attribute__.js +11 -4
- package/out/concepts/Attribute__.js.map +1 -1
- package/out/concepts/AuthInterface__.js +3 -1
- package/out/concepts/AuthInterface__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.js +12 -5
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/AuthLogic__.js +3 -1
- package/out/concepts/AuthLogic__.js.map +1 -1
- package/out/concepts/BackendVariable__.js +11 -4
- package/out/concepts/BackendVariable__.js.map +1 -1
- package/out/concepts/Backend__.js +12 -5
- package/out/concepts/Backend__.js.map +1 -1
- package/out/concepts/BatchAssignment__.js +32 -16
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BinaryExpression__.js +15 -8
- package/out/concepts/BinaryExpression__.js.map +1 -1
- package/out/concepts/BindAttribute__.js +21 -6
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindDirective__.js +28 -5
- package/out/concepts/BindDirective__.js.map +1 -1
- package/out/concepts/BindEvent__.js +20 -8
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.js +11 -4
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.js +3 -1
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.js +14 -5
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallConnector__.js +3 -1
- package/out/concepts/CallConnector__.js.map +1 -1
- package/out/concepts/CallFunction__.js +23 -12
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.js +15 -8
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +45 -26
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.js +19 -7
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/Comment__.js +3 -1
- package/out/concepts/Comment__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +11 -4
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js +12 -5
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigPropertyValue__.js +3 -1
- package/out/concepts/ConfigPropertyValue__.js.map +1 -1
- package/out/concepts/ConfigProperty__.js +12 -5
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js +12 -5
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/Connection__.js +12 -5
- package/out/concepts/Connection__.js.map +1 -1
- package/out/concepts/ConnectorTrigger__.js +3 -1
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.js +48 -21
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/Constant__.js +11 -4
- package/out/concepts/Constant__.js.map +1 -1
- package/out/concepts/DataSource__.js +12 -5
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/DatabaseTypeAnnotation__.js +3 -1
- package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
- package/out/concepts/Destination__.js +11 -4
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/End__.js +3 -1
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/EntityIndex__.js +3 -1
- package/out/concepts/EntityIndex__.js.map +1 -1
- package/out/concepts/EntityProperty__.js +19 -7
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.js +21 -9
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/EnumItem__.js +3 -1
- package/out/concepts/EnumItem__.js.map +1 -1
- package/out/concepts/Enum__.js +11 -4
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js +12 -5
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ExternalDestination__.js +11 -4
- package/out/concepts/ExternalDestination__.js.map +1 -1
- package/out/concepts/ForEachStatement__.js +34 -24
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/FrontendLibrary__.js +21 -9
- package/out/concepts/FrontendLibrary__.js.map +1 -1
- package/out/concepts/Frontend__.js +47 -20
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Function__.js +47 -18
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +3 -1
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.js +26 -17
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/Integration__.js +20 -8
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js +11 -4
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.js +27 -10
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/JSBlock__.js +3 -1
- package/out/concepts/JSBlock__.js.map +1 -1
- package/out/concepts/JavaLogic__.js +3 -1
- package/out/concepts/JavaLogic__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +4 -4
- package/out/concepts/LogicItem__.js +7 -5
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.js +68 -36
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.js +36 -24
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.js +23 -16
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.js +27 -20
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/MicroApp__.js +3 -1
- package/out/concepts/MicroApp__.js.map +1 -1
- package/out/concepts/Module__.js +5 -3
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/MsgTriggerEvent__.js +12 -5
- package/out/concepts/MsgTriggerEvent__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.js +12 -5
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/Namespace__.js +102 -45
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NewComposite__.js +57 -25
- package/out/concepts/NewComposite__.js.map +1 -1
- package/out/concepts/NewList__.js +20 -8
- package/out/concepts/NewList__.js.map +1 -1
- package/out/concepts/NewMap__.js +20 -8
- package/out/concepts/NewMap__.js.map +1 -1
- package/out/concepts/NullLiteral__.js +3 -1
- package/out/concepts/NullLiteral__.js.map +1 -1
- package/out/concepts/NumericLiteral__.js +11 -4
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.js +32 -5
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/OverriddenLogic__.js +52 -20
- package/out/concepts/OverriddenLogic__.js.map +1 -1
- package/out/concepts/Param__.js +12 -5
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Point__.js +3 -1
- package/out/concepts/Point__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js +21 -9
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.js +73 -31
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/ProcessOutcome__.js +3 -1
- package/out/concepts/ProcessOutcome__.js.map +1 -1
- package/out/concepts/ProcessOutcomes__.js +3 -1
- package/out/concepts/ProcessOutcomes__.js.map +1 -1
- package/out/concepts/Process__.js +48 -21
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryAggregateExpression__.js +11 -4
- package/out/concepts/QueryAggregateExpression__.js.map +1 -1
- package/out/concepts/QueryFieldExpression__.js +3 -1
- package/out/concepts/QueryFieldExpression__.js.map +1 -1
- package/out/concepts/QueryFromExpression__.js +11 -4
- package/out/concepts/QueryFromExpression__.js.map +1 -1
- package/out/concepts/QueryGroupByExpression__.js +11 -4
- package/out/concepts/QueryGroupByExpression__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js +12 -5
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryLimitExpression__.js +11 -4
- package/out/concepts/QueryLimitExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.js +11 -4
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js +12 -5
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Rect__.js +3 -1
- package/out/concepts/Rect__.js.map +1 -1
- package/out/concepts/Return__.js +11 -4
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/Role__.js +3 -1
- package/out/concepts/Role__.js.map +1 -1
- package/out/concepts/SelectMembers__.js +12 -5
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/Slot__.js +11 -4
- package/out/concepts/Slot__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.js +11 -4
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/Start__.js +3 -1
- package/out/concepts/Start__.js.map +1 -1
- package/out/concepts/StringInterpolation__.js +12 -5
- package/out/concepts/StringInterpolation__.js.map +1 -1
- package/out/concepts/StringLiteral__.js +3 -1
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js +11 -4
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js +21 -9
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/SwitchCase__.js +15 -8
- package/out/concepts/SwitchCase__.js.map +1 -1
- package/out/concepts/SwitchStatement__.js +11 -4
- package/out/concepts/SwitchStatement__.js.map +1 -1
- package/out/concepts/Theme__.js +3 -1
- package/out/concepts/Theme__.js.map +1 -1
- package/out/concepts/Transactional__.js +3 -1
- package/out/concepts/Transactional__.js.map +1 -1
- package/out/concepts/TriggerEvent__.js +12 -5
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.js +3 -1
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +2 -1
- package/out/concepts/TypeAnnotation__.js +48 -15
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.js +3 -1
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +17 -6
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/Unparsed__.js +3 -1
- package/out/concepts/Unparsed__.js.map +1 -1
- package/out/concepts/UseComponent__.js +3 -1
- package/out/concepts/UseComponent__.js.map +1 -1
- package/out/concepts/ValidationRule__.js +11 -4
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.js +11 -4
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewBlock__.js +3 -1
- package/out/concepts/ViewBlock__.js.map +1 -1
- package/out/concepts/ViewComponent__.js +59 -25
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.js +51 -24
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.js +54 -22
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +20 -11
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +2 -2
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/generator/permission.js +32 -6
- package/out/generator/permission.js.map +1 -1
- package/out/sentry/index.js +2 -1
- package/out/sentry/index.js.map +1 -1
- package/out/server/translator.js +5 -2
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.d.ts +1 -1
- package/out/service/storage/init.js +17 -5
- package/out/service/storage/init.js.map +1 -1
- package/out/utils/sortTsString.js +10 -4
- package/out/utils/sortTsString.js.map +1 -1
- package/package.json +1 -1
- package/src/common/BaseNode.ts +9 -4
- package/src/concepts/Abort__.ts +1 -0
- package/src/concepts/Anchor__.ts +20 -14
- package/src/concepts/AnonymousFunction__.ts +29 -12
- package/src/concepts/App__.ts +161 -76
- package/src/concepts/Argument__.ts +9 -3
- package/src/concepts/Assignee__.ts +21 -8
- package/src/concepts/AssignmentLine__.ts +1 -0
- package/src/concepts/Assignment__.ts +28 -14
- package/src/concepts/Attribute__.ts +9 -3
- package/src/concepts/AuthInterface__.ts +1 -0
- package/src/concepts/AuthLogicForCallInterface__.ts +10 -4
- package/src/concepts/AuthLogic__.ts +4 -0
- package/src/concepts/BackendVariable__.ts +9 -3
- package/src/concepts/Backend__.ts +10 -4
- package/src/concepts/BatchAssignment__.ts +33 -16
- package/src/concepts/BinaryExpression__.ts +15 -9
- package/src/concepts/BindAttribute__.ts +35 -18
- package/src/concepts/BindDirective__.ts +26 -4
- package/src/concepts/BindEvent__.ts +37 -16
- package/src/concepts/BindStyle__.ts +9 -3
- package/src/concepts/BooleanLiteral__.ts +1 -0
- package/src/concepts/CallAuthInterface__.ts +12 -4
- package/src/concepts/CallConnector__.ts +1 -0
- package/src/concepts/CallFunction__.ts +25 -20
- package/src/concepts/CallInterface__.ts +44 -28
- package/src/concepts/CallLogic__.ts +80 -59
- package/src/concepts/CallQueryComponent__.ts +17 -6
- package/src/concepts/Comment__.ts +2 -1
- package/src/concepts/CompletionProperty__.ts +9 -3
- package/src/concepts/ConfigGroup__.ts +10 -4
- package/src/concepts/ConfigPropertyValue__.ts +1 -0
- package/src/concepts/ConfigProperty__.ts +10 -4
- package/src/concepts/Configuration__.ts +10 -4
- package/src/concepts/Connection__.ts +11 -5
- package/src/concepts/ConnectorTrigger__.ts +1 -0
- package/src/concepts/Connector__.ts +46 -20
- package/src/concepts/Constant__.ts +9 -3
- package/src/concepts/DataSource__.ts +10 -4
- package/src/concepts/DatabaseTypeAnnotation__.ts +1 -0
- package/src/concepts/Destination__.ts +9 -4
- package/src/concepts/End__.ts +1 -0
- package/src/concepts/EntityIndex__.ts +1 -0
- package/src/concepts/EntityProperty__.ts +17 -6
- package/src/concepts/Entity__.ts +19 -8
- package/src/concepts/EnumItem__.ts +1 -0
- package/src/concepts/Enum__.ts +9 -3
- package/src/concepts/Event__.ts +10 -4
- package/src/concepts/ExternalDestination__.ts +9 -3
- package/src/concepts/ForEachStatement__.ts +45 -36
- package/src/concepts/FrontendLibrary__.ts +19 -8
- package/src/concepts/Frontend__.ts +45 -19
- package/src/concepts/Function__.ts +46 -19
- package/src/concepts/Identifier__.ts +1 -0
- package/src/concepts/IfStatement__.ts +30 -20
- package/src/concepts/Integration__.ts +18 -7
- package/src/concepts/InterfaceParam__.ts +9 -3
- package/src/concepts/Interface__.ts +31 -15
- package/src/concepts/JSBlock__.ts +1 -0
- package/src/concepts/JavaLogic__.ts +1 -0
- package/src/concepts/LogicItem__.ts +5 -4
- package/src/concepts/Logic__.ts +77 -59
- package/src/concepts/MatchCase__.ts +46 -31
- package/src/concepts/Match__.ts +24 -16
- package/src/concepts/MemberExpression__.ts +25 -19
- package/src/concepts/MicroApp__.ts +1 -0
- package/src/concepts/Module__.ts +10 -9
- package/src/concepts/MsgTriggerEvent__.ts +10 -4
- package/src/concepts/MsgTriggerLauncher__.ts +10 -4
- package/src/concepts/Namespace__.ts +100 -44
- package/src/concepts/NewComposite__.ts +60 -28
- package/src/concepts/NewList__.ts +20 -8
- package/src/concepts/NewMap__.ts +20 -8
- package/src/concepts/NullLiteral__.ts +1 -0
- package/src/concepts/NumericLiteral__.ts +9 -3
- package/src/concepts/OqlQueryComponent__.ts +32 -4
- package/src/concepts/OverriddenLogic__.ts +51 -20
- package/src/concepts/Param__.ts +10 -6
- package/src/concepts/Point__.ts +1 -0
- package/src/concepts/ProcessComponent__.ts +19 -8
- package/src/concepts/ProcessElement__.ts +71 -30
- package/src/concepts/ProcessOutcome__.ts +1 -0
- package/src/concepts/ProcessOutcomes__.ts +1 -0
- package/src/concepts/Process__.ts +46 -20
- package/src/concepts/QueryAggregateExpression__.ts +9 -3
- package/src/concepts/QueryFieldExpression__.ts +1 -0
- package/src/concepts/QueryFromExpression__.ts +9 -3
- package/src/concepts/QueryGroupByExpression__.ts +9 -3
- package/src/concepts/QueryJoinExpression__.ts +10 -4
- package/src/concepts/QueryLimitExpression__.ts +9 -3
- package/src/concepts/QueryOrderByExpression__.ts +9 -3
- package/src/concepts/QuerySelectExpression__.ts +10 -4
- package/src/concepts/Rect__.ts +1 -0
- package/src/concepts/Return__.ts +9 -3
- package/src/concepts/Role__.ts +1 -0
- package/src/concepts/SelectMembers__.ts +10 -4
- package/src/concepts/Slot__.ts +9 -3
- package/src/concepts/SqlQueryComponent__.ts +9 -3
- package/src/concepts/Start__.ts +1 -0
- package/src/concepts/StringInterpolation__.ts +11 -5
- package/src/concepts/StringLiteral__.ts +1 -0
- package/src/concepts/StructureProperty__.ts +9 -3
- package/src/concepts/Structure__.ts +19 -8
- package/src/concepts/SwitchCase__.ts +15 -9
- package/src/concepts/SwitchStatement__.ts +22 -16
- package/src/concepts/Theme__.ts +1 -0
- package/src/concepts/Transactional__.ts +1 -0
- package/src/concepts/TriggerEvent__.ts +10 -4
- package/src/concepts/TriggerLauncher__.ts +1 -0
- package/src/concepts/TypeAnnotation__.ts +55 -21
- package/src/concepts/TypeParam__.ts +2 -1
- package/src/concepts/UnaryExpression__.ts +16 -6
- package/src/concepts/Unparsed__.ts +2 -1
- package/src/concepts/UseComponent__.ts +1 -0
- package/src/concepts/ValidationRule__.ts +10 -4
- package/src/concepts/Variable__.ts +9 -3
- package/src/concepts/ViewBlock__.ts +1 -0
- package/src/concepts/ViewComponent__.ts +57 -24
- package/src/concepts/ViewElement__.ts +148 -110
- package/src/concepts/View__.ts +100 -56
- package/src/concepts/WhileStatement__.ts +27 -15
- package/src/concepts/basics/stdlib/nasl.util.ts +2 -2
- package/src/generator/permission.ts +33 -9
- package/src/sentry/index.ts +3 -1
- package/src/server/translator.ts +5 -2
- package/src/service/storage/init.ts +17 -5
- package/src/utils/sortTsString.ts +9 -4
- package/test/concepts/call-function/__snapshots__/toEmbeddedTS.spec.ts.snap +26 -0
- package/test/concepts/call-function/__snapshots__/toJS.spec.ts.snap +26 -0
- package/test/concepts/call-function/constant.ts +5 -0
- package/test/concepts/call-function/fixtures/from-string.json +100 -0
- package/test/concepts/call-function/fixtures/to-string-global-tz.json +99 -0
- package/test/concepts/call-function/fixtures/to-string-no-tz.json +89 -0
- package/test/concepts/call-function/fixtures/to-string-user-tz.json +101 -0
- package/test/concepts/call-function/fixtures/to-string-utc-tz.json +101 -0
- package/test/concepts/call-function/toEmbeddedTS.spec.ts +14 -0
- package/test/concepts/call-function/toJS.spec.ts +14 -0
- package/.nyc_output/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
- package/.nyc_output/processinfo/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
|
@@ -38,6 +38,7 @@ export class CallQueryComponent extends LogicItem {
|
|
|
38
38
|
/**
|
|
39
39
|
* 产品概念
|
|
40
40
|
*/
|
|
41
|
+
@property('concept')
|
|
41
42
|
// @ts-ignore
|
|
42
43
|
readonly concept!: 'CallQueryComponent';
|
|
43
44
|
|
|
@@ -706,11 +707,16 @@ export class CallQueryComponent extends LogicItem {
|
|
|
706
707
|
};
|
|
707
708
|
if (parentKey) {
|
|
708
709
|
params.parentKey = parentKey;
|
|
709
|
-
|
|
710
|
-
|
|
710
|
+
// @ts-ignore
|
|
711
|
+
const t = this.__v_raw || this;
|
|
712
|
+
// @ts-ignore
|
|
713
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
714
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
715
|
+
// @ts-ignore
|
|
716
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
711
717
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
712
718
|
params.index = index;
|
|
713
|
-
} else if ((
|
|
719
|
+
} else if ((t as any)[parentKey] === n) {
|
|
714
720
|
params.index = 0;
|
|
715
721
|
(this as any)[parentKey] = undefined;
|
|
716
722
|
}
|
|
@@ -898,11 +904,16 @@ export class CallQueryComponent extends LogicItem {
|
|
|
898
904
|
};
|
|
899
905
|
if (parentKey) {
|
|
900
906
|
params.parentKey = parentKey;
|
|
901
|
-
|
|
902
|
-
|
|
907
|
+
// @ts-ignore
|
|
908
|
+
const t = this.__v_raw || this;
|
|
909
|
+
// @ts-ignore
|
|
910
|
+
const n = logicItem.__v_raw || logicItem;
|
|
911
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
912
|
+
// @ts-ignore
|
|
913
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
903
914
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
904
915
|
params.index = index;
|
|
905
|
-
} else if ((
|
|
916
|
+
} else if ((t as any)[parentKey] === n) {
|
|
906
917
|
params.index = 0;
|
|
907
918
|
(this as any)[parentKey] = undefined;
|
|
908
919
|
}
|
|
@@ -24,6 +24,7 @@ export class Comment extends LogicItem {
|
|
|
24
24
|
/**
|
|
25
25
|
* 产品概念
|
|
26
26
|
*/
|
|
27
|
+
@property('concept')
|
|
27
28
|
// @ts-ignore
|
|
28
29
|
readonly concept!: 'Comment';
|
|
29
30
|
|
|
@@ -90,7 +91,7 @@ export class Comment extends LogicItem {
|
|
|
90
91
|
return `/* ${this.value} */`;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
|
|
94
|
+
//================================================================================
|
|
94
95
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
95
96
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
96
97
|
//================================================================================
|
|
@@ -24,6 +24,7 @@ export class CompletionProperty extends BaseNode {
|
|
|
24
24
|
/**
|
|
25
25
|
* 产品概念
|
|
26
26
|
*/
|
|
27
|
+
@property('concept')
|
|
27
28
|
// @ts-ignore
|
|
28
29
|
readonly concept!: 'CompletionProperty';
|
|
29
30
|
|
|
@@ -209,11 +210,16 @@ export class CompletionProperty extends BaseNode {
|
|
|
209
210
|
};
|
|
210
211
|
if (parentKey) {
|
|
211
212
|
params.parentKey = parentKey;
|
|
212
|
-
|
|
213
|
-
|
|
213
|
+
// @ts-ignore
|
|
214
|
+
const t = this.__v_raw || this;
|
|
215
|
+
// @ts-ignore
|
|
216
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
217
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
218
|
+
// @ts-ignore
|
|
219
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
214
220
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
215
221
|
params.index = index;
|
|
216
|
-
} else if ((
|
|
222
|
+
} else if ((t as any)[parentKey] === n) {
|
|
217
223
|
params.index = 0;
|
|
218
224
|
(this as any)[parentKey] = undefined;
|
|
219
225
|
}
|
|
@@ -26,6 +26,7 @@ export class ConfigGroup extends BaseNode {
|
|
|
26
26
|
/**
|
|
27
27
|
* 产品概念
|
|
28
28
|
*/
|
|
29
|
+
@property('concept')
|
|
29
30
|
// @ts-ignore
|
|
30
31
|
readonly concept!: 'ConfigGroup';
|
|
31
32
|
|
|
@@ -90,7 +91,7 @@ export class ConfigGroup extends BaseNode {
|
|
|
90
91
|
const excludedSet = new Set(excludedList);
|
|
91
92
|
return ((this.properties as ConfigProperty[]) || [])
|
|
92
93
|
.filter((item) => !excludedSet.has(item))
|
|
93
|
-
.map((item) => item
|
|
94
|
+
.map((item) => item?.name);
|
|
94
95
|
}
|
|
95
96
|
getConfigPropertyUniqueName(name = 'configProperty1') {
|
|
96
97
|
return utils.unique(name, this.getConfigPropertyExistingNames(), undefined, false);
|
|
@@ -277,11 +278,16 @@ export class ConfigGroup extends BaseNode {
|
|
|
277
278
|
};
|
|
278
279
|
if (parentKey) {
|
|
279
280
|
params.parentKey = parentKey;
|
|
280
|
-
|
|
281
|
-
|
|
281
|
+
// @ts-ignore
|
|
282
|
+
const t = this.__v_raw || this;
|
|
283
|
+
// @ts-ignore
|
|
284
|
+
const n = configProperty.__v_raw || configProperty;
|
|
285
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
286
|
+
// @ts-ignore
|
|
287
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
282
288
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
283
289
|
params.index = index;
|
|
284
|
-
} else if ((
|
|
290
|
+
} else if ((t as any)[parentKey] === n) {
|
|
285
291
|
params.index = 0;
|
|
286
292
|
(this as any)[parentKey] = undefined;
|
|
287
293
|
}
|
|
@@ -30,6 +30,7 @@ export class ConfigProperty extends BaseNode {
|
|
|
30
30
|
/**
|
|
31
31
|
* 产品概念
|
|
32
32
|
*/
|
|
33
|
+
@property('concept')
|
|
33
34
|
// @ts-ignore
|
|
34
35
|
readonly concept!: 'ConfigProperty';
|
|
35
36
|
|
|
@@ -114,7 +115,7 @@ export class ConfigProperty extends BaseNode {
|
|
|
114
115
|
const excludedSet = new Set(excludedList);
|
|
115
116
|
return ((this.values as ConfigPropertyValue[]) || [])
|
|
116
117
|
.filter((item) => !excludedSet.has(item))
|
|
117
|
-
.map((item) => item
|
|
118
|
+
.map((item) => item?.name);
|
|
118
119
|
}
|
|
119
120
|
getConfigPropertyValueUniqueName(name = 'configPropertyValue1') {
|
|
120
121
|
return utils.unique(name, this.getConfigPropertyValueExistingNames(), undefined, false);
|
|
@@ -307,11 +308,16 @@ export class ConfigProperty extends BaseNode {
|
|
|
307
308
|
};
|
|
308
309
|
if (parentKey) {
|
|
309
310
|
params.parentKey = parentKey;
|
|
310
|
-
|
|
311
|
-
|
|
311
|
+
// @ts-ignore
|
|
312
|
+
const t = this.__v_raw || this;
|
|
313
|
+
// @ts-ignore
|
|
314
|
+
const n = configPropertyValue.__v_raw || configPropertyValue;
|
|
315
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
316
|
+
// @ts-ignore
|
|
317
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
312
318
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
313
319
|
params.index = index;
|
|
314
|
-
} else if ((
|
|
320
|
+
} else if ((t as any)[parentKey] === n) {
|
|
315
321
|
params.index = 0;
|
|
316
322
|
(this as any)[parentKey] = undefined;
|
|
317
323
|
}
|
|
@@ -25,6 +25,7 @@ export class Configuration extends BaseNode {
|
|
|
25
25
|
/**
|
|
26
26
|
* 产品概念
|
|
27
27
|
*/
|
|
28
|
+
@property('concept')
|
|
28
29
|
// @ts-ignore
|
|
29
30
|
readonly concept!: 'Configuration';
|
|
30
31
|
|
|
@@ -68,7 +69,7 @@ export class Configuration extends BaseNode {
|
|
|
68
69
|
|
|
69
70
|
getConfigGroupExistingNames(excludedList: Array<ConfigGroup> = []) {
|
|
70
71
|
const excludedSet = new Set(excludedList);
|
|
71
|
-
return ((this.groups as ConfigGroup[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
72
|
+
return ((this.groups as ConfigGroup[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
72
73
|
}
|
|
73
74
|
getConfigGroupUniqueName(name = 'configGroup1') {
|
|
74
75
|
return utils.unique(name, this.getConfigGroupExistingNames(), undefined, false);
|
|
@@ -255,11 +256,16 @@ export class Configuration extends BaseNode {
|
|
|
255
256
|
};
|
|
256
257
|
if (parentKey) {
|
|
257
258
|
params.parentKey = parentKey;
|
|
258
|
-
|
|
259
|
-
|
|
259
|
+
// @ts-ignore
|
|
260
|
+
const t = this.__v_raw || this;
|
|
261
|
+
// @ts-ignore
|
|
262
|
+
const n = configGroup.__v_raw || configGroup;
|
|
263
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
264
|
+
// @ts-ignore
|
|
265
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
260
266
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
261
267
|
params.index = index;
|
|
262
|
-
} else if ((
|
|
268
|
+
} else if ((t as any)[parentKey] === n) {
|
|
263
269
|
params.index = 0;
|
|
264
270
|
(this as any)[parentKey] = undefined;
|
|
265
271
|
}
|
|
@@ -29,6 +29,7 @@ export class Connection extends BaseNode {
|
|
|
29
29
|
/**
|
|
30
30
|
* 产品概念
|
|
31
31
|
*/
|
|
32
|
+
@property('concept')
|
|
32
33
|
// @ts-ignore
|
|
33
34
|
readonly concept!: 'Connection';
|
|
34
35
|
|
|
@@ -149,7 +150,7 @@ export class Connection extends BaseNode {
|
|
|
149
150
|
const excludedSet = new Set(excludedList);
|
|
150
151
|
return ((this.properties as ConfigProperty[]) || [])
|
|
151
152
|
.filter((item) => !excludedSet.has(item))
|
|
152
|
-
.map((item) => item
|
|
153
|
+
.map((item) => item?.name);
|
|
153
154
|
}
|
|
154
155
|
getConfigPropertyUniqueName(name = 'configProperty1') {
|
|
155
156
|
return utils.unique(name, this.getConfigPropertyExistingNames(), undefined, false);
|
|
@@ -336,11 +337,16 @@ export class Connection extends BaseNode {
|
|
|
336
337
|
};
|
|
337
338
|
if (parentKey) {
|
|
338
339
|
params.parentKey = parentKey;
|
|
339
|
-
|
|
340
|
-
|
|
340
|
+
// @ts-ignore
|
|
341
|
+
const t = this.__v_raw || this;
|
|
342
|
+
// @ts-ignore
|
|
343
|
+
const n = configProperty.__v_raw || configProperty;
|
|
344
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
345
|
+
// @ts-ignore
|
|
346
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
341
347
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
342
348
|
params.index = index;
|
|
343
|
-
} else if ((
|
|
349
|
+
} else if ((t as any)[parentKey] === n) {
|
|
344
350
|
params.index = 0;
|
|
345
351
|
(this as any)[parentKey] = undefined;
|
|
346
352
|
}
|
|
@@ -357,7 +363,7 @@ export class Connection extends BaseNode {
|
|
|
357
363
|
* 获取connector 类型
|
|
358
364
|
*/
|
|
359
365
|
get connector() {
|
|
360
|
-
return getNodeByNodeCallee(this.rootNode, this.namespace) || {} as Connector;
|
|
366
|
+
return getNodeByNodeCallee(this.rootNode, this.namespace) || ({} as Connector);
|
|
361
367
|
}
|
|
362
368
|
getConnectorType(): String {
|
|
363
369
|
return this.connector?.connectorKind;
|
|
@@ -33,6 +33,7 @@ export class Connector extends Module {
|
|
|
33
33
|
/**
|
|
34
34
|
* 产品概念
|
|
35
35
|
*/
|
|
36
|
+
@property('concept')
|
|
36
37
|
// @ts-ignore
|
|
37
38
|
readonly concept!: 'Connector';
|
|
38
39
|
|
|
@@ -293,7 +294,7 @@ export class Connector extends Module {
|
|
|
293
294
|
|
|
294
295
|
getParamExistingNames(excludedList: Array<Param> = []) {
|
|
295
296
|
const excludedSet = new Set(excludedList);
|
|
296
|
-
return ((this.properties as Param[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
297
|
+
return ((this.properties as Param[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
297
298
|
}
|
|
298
299
|
getParamUniqueName(name = 'param1') {
|
|
299
300
|
return utils.unique(name, this.getParamExistingNames(), undefined, false);
|
|
@@ -446,7 +447,7 @@ export class Connector extends Module {
|
|
|
446
447
|
|
|
447
448
|
getLogicExistingNames(excludedList: Array<Logic> = []) {
|
|
448
449
|
const excludedSet = new Set(excludedList);
|
|
449
|
-
return ((this.logics as Logic[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
450
|
+
return ((this.logics as Logic[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
450
451
|
}
|
|
451
452
|
getLogicUniqueName(name = 'logic1') {
|
|
452
453
|
return utils.unique(name, this.getLogicExistingNames(), undefined, false);
|
|
@@ -601,7 +602,7 @@ export class Connector extends Module {
|
|
|
601
602
|
const excludedSet = new Set(excludedList);
|
|
602
603
|
return ((this.triggers as ConnectorTrigger[]) || [])
|
|
603
604
|
.filter((item) => !excludedSet.has(item))
|
|
604
|
-
.map((item) => item
|
|
605
|
+
.map((item) => item?.name);
|
|
605
606
|
}
|
|
606
607
|
getConnectorTriggerUniqueName(name = 'connectorTrigger1') {
|
|
607
608
|
return utils.unique(name, this.getConnectorTriggerExistingNames(), undefined, false);
|
|
@@ -754,7 +755,7 @@ export class Connector extends Module {
|
|
|
754
755
|
|
|
755
756
|
getStructureExistingNames(excludedList: Array<Structure> = []) {
|
|
756
757
|
const excludedSet = new Set(excludedList);
|
|
757
|
-
return ((this.structures as Structure[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
758
|
+
return ((this.structures as Structure[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
758
759
|
}
|
|
759
760
|
getStructureUniqueName(name = 'structure1') {
|
|
760
761
|
return utils.unique(name, this.getStructureExistingNames(), undefined, false);
|
|
@@ -907,7 +908,7 @@ export class Connector extends Module {
|
|
|
907
908
|
|
|
908
909
|
getNamespaceExistingNames(excludedList: Array<Namespace> = []) {
|
|
909
910
|
const excludedSet = new Set(excludedList);
|
|
910
|
-
return ((this.namespaces as Namespace[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
911
|
+
return ((this.namespaces as Namespace[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
911
912
|
}
|
|
912
913
|
getNamespaceUniqueName(name = 'namespace1') {
|
|
913
914
|
return utils.unique(name, this.getNamespaceExistingNames(), undefined, false);
|
|
@@ -1094,11 +1095,16 @@ export class Connector extends Module {
|
|
|
1094
1095
|
};
|
|
1095
1096
|
if (parentKey) {
|
|
1096
1097
|
params.parentKey = parentKey;
|
|
1097
|
-
|
|
1098
|
-
|
|
1098
|
+
// @ts-ignore
|
|
1099
|
+
const t = this.__v_raw || this;
|
|
1100
|
+
// @ts-ignore
|
|
1101
|
+
const n = param.__v_raw || param;
|
|
1102
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1103
|
+
// @ts-ignore
|
|
1104
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1099
1105
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1100
1106
|
params.index = index;
|
|
1101
|
-
} else if ((
|
|
1107
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1102
1108
|
params.index = 0;
|
|
1103
1109
|
(this as any)[parentKey] = undefined;
|
|
1104
1110
|
}
|
|
@@ -1192,11 +1198,16 @@ export class Connector extends Module {
|
|
|
1192
1198
|
};
|
|
1193
1199
|
if (parentKey) {
|
|
1194
1200
|
params.parentKey = parentKey;
|
|
1195
|
-
|
|
1196
|
-
|
|
1201
|
+
// @ts-ignore
|
|
1202
|
+
const t = this.__v_raw || this;
|
|
1203
|
+
// @ts-ignore
|
|
1204
|
+
const n = logic.__v_raw || logic;
|
|
1205
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1206
|
+
// @ts-ignore
|
|
1207
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1197
1208
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1198
1209
|
params.index = index;
|
|
1199
|
-
} else if ((
|
|
1210
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1200
1211
|
params.index = 0;
|
|
1201
1212
|
(this as any)[parentKey] = undefined;
|
|
1202
1213
|
}
|
|
@@ -1240,11 +1251,16 @@ export class Connector extends Module {
|
|
|
1240
1251
|
};
|
|
1241
1252
|
if (parentKey) {
|
|
1242
1253
|
params.parentKey = parentKey;
|
|
1243
|
-
|
|
1244
|
-
|
|
1254
|
+
// @ts-ignore
|
|
1255
|
+
const t = this.__v_raw || this;
|
|
1256
|
+
// @ts-ignore
|
|
1257
|
+
const n = connectorTrigger.__v_raw || connectorTrigger;
|
|
1258
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1259
|
+
// @ts-ignore
|
|
1260
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1245
1261
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1246
1262
|
params.index = index;
|
|
1247
|
-
} else if ((
|
|
1263
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1248
1264
|
params.index = 0;
|
|
1249
1265
|
(this as any)[parentKey] = undefined;
|
|
1250
1266
|
}
|
|
@@ -1288,11 +1304,16 @@ export class Connector extends Module {
|
|
|
1288
1304
|
};
|
|
1289
1305
|
if (parentKey) {
|
|
1290
1306
|
params.parentKey = parentKey;
|
|
1291
|
-
|
|
1292
|
-
|
|
1307
|
+
// @ts-ignore
|
|
1308
|
+
const t = this.__v_raw || this;
|
|
1309
|
+
// @ts-ignore
|
|
1310
|
+
const n = structure.__v_raw || structure;
|
|
1311
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1312
|
+
// @ts-ignore
|
|
1313
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1293
1314
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1294
1315
|
params.index = index;
|
|
1295
|
-
} else if ((
|
|
1316
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1296
1317
|
params.index = 0;
|
|
1297
1318
|
(this as any)[parentKey] = undefined;
|
|
1298
1319
|
}
|
|
@@ -1336,11 +1357,16 @@ export class Connector extends Module {
|
|
|
1336
1357
|
};
|
|
1337
1358
|
if (parentKey) {
|
|
1338
1359
|
params.parentKey = parentKey;
|
|
1339
|
-
|
|
1340
|
-
|
|
1360
|
+
// @ts-ignore
|
|
1361
|
+
const t = this.__v_raw || this;
|
|
1362
|
+
// @ts-ignore
|
|
1363
|
+
const n = namespace.__v_raw || namespace;
|
|
1364
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1365
|
+
// @ts-ignore
|
|
1366
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1341
1367
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1342
1368
|
params.index = index;
|
|
1343
|
-
} else if ((
|
|
1369
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1344
1370
|
params.index = 0;
|
|
1345
1371
|
(this as any)[parentKey] = undefined;
|
|
1346
1372
|
}
|
|
@@ -33,6 +33,7 @@ export class Constant extends BaseNode {
|
|
|
33
33
|
/**
|
|
34
34
|
* 产品概念
|
|
35
35
|
*/
|
|
36
|
+
@property('concept')
|
|
36
37
|
// @ts-ignore
|
|
37
38
|
readonly concept!: 'Constant';
|
|
38
39
|
|
|
@@ -210,11 +211,16 @@ export class Constant extends BaseNode {
|
|
|
210
211
|
};
|
|
211
212
|
if (parentKey) {
|
|
212
213
|
params.parentKey = parentKey;
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
// @ts-ignore
|
|
215
|
+
const t = this.__v_raw || this;
|
|
216
|
+
// @ts-ignore
|
|
217
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
218
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
219
|
+
// @ts-ignore
|
|
220
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
215
221
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
216
222
|
params.index = index;
|
|
217
|
-
} else if ((
|
|
223
|
+
} else if ((t as any)[parentKey] === n) {
|
|
218
224
|
params.index = 0;
|
|
219
225
|
(this as any)[parentKey] = undefined;
|
|
220
226
|
}
|
|
@@ -28,6 +28,7 @@ export class DataSource extends BaseNode {
|
|
|
28
28
|
/**
|
|
29
29
|
* 产品概念
|
|
30
30
|
*/
|
|
31
|
+
@property('concept')
|
|
31
32
|
// @ts-ignore
|
|
32
33
|
readonly concept!: 'DataSource';
|
|
33
34
|
|
|
@@ -109,7 +110,7 @@ export class DataSource extends BaseNode {
|
|
|
109
110
|
|
|
110
111
|
getEntityExistingNames(excludedList: Array<Entity> = []) {
|
|
111
112
|
const excludedSet = new Set(excludedList);
|
|
112
|
-
return ((this.entities as Entity[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
113
|
+
return ((this.entities as Entity[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
113
114
|
}
|
|
114
115
|
getEntityUniqueName(name = 'Entity1') {
|
|
115
116
|
return utils.unique(name, this.getEntityExistingNames(), undefined, true);
|
|
@@ -296,11 +297,16 @@ export class DataSource extends BaseNode {
|
|
|
296
297
|
};
|
|
297
298
|
if (parentKey) {
|
|
298
299
|
params.parentKey = parentKey;
|
|
299
|
-
|
|
300
|
-
|
|
300
|
+
// @ts-ignore
|
|
301
|
+
const t = this.__v_raw || this;
|
|
302
|
+
// @ts-ignore
|
|
303
|
+
const n = entity.__v_raw || entity;
|
|
304
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
305
|
+
// @ts-ignore
|
|
306
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
301
307
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
302
308
|
params.index = index;
|
|
303
|
-
} else if ((
|
|
309
|
+
} else if ((t as any)[parentKey] === n) {
|
|
304
310
|
params.index = 0;
|
|
305
311
|
(this as any)[parentKey] = undefined;
|
|
306
312
|
}
|
|
@@ -31,6 +31,7 @@ export class Destination extends LogicItem {
|
|
|
31
31
|
/**
|
|
32
32
|
* 产品概念
|
|
33
33
|
*/
|
|
34
|
+
@property('concept')
|
|
34
35
|
// @ts-ignore
|
|
35
36
|
readonly concept!: 'Destination';
|
|
36
37
|
|
|
@@ -284,11 +285,16 @@ export class Destination extends LogicItem {
|
|
|
284
285
|
};
|
|
285
286
|
if (parentKey) {
|
|
286
287
|
params.parentKey = parentKey;
|
|
287
|
-
|
|
288
|
-
|
|
288
|
+
// @ts-ignore
|
|
289
|
+
const t = this.__v_raw || this;
|
|
290
|
+
// @ts-ignore
|
|
291
|
+
const n = logicItem.__v_raw || logicItem;
|
|
292
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
293
|
+
// @ts-ignore
|
|
294
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
289
295
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
290
296
|
params.index = index;
|
|
291
|
-
} else if ((
|
|
297
|
+
} else if ((t as any)[parentKey] === n) {
|
|
292
298
|
params.index = 0;
|
|
293
299
|
(this as any)[parentKey] = undefined;
|
|
294
300
|
}
|
|
@@ -747,7 +753,6 @@ export class Destination extends LogicItem {
|
|
|
747
753
|
return code;
|
|
748
754
|
}
|
|
749
755
|
|
|
750
|
-
|
|
751
756
|
@withSourceMap()
|
|
752
757
|
toNaturalTS(state = createCompilerState()): string {
|
|
753
758
|
let code = '';
|
package/src/concepts/End__.ts
CHANGED
|
@@ -34,6 +34,7 @@ export class EntityProperty extends BaseNode {
|
|
|
34
34
|
/**
|
|
35
35
|
* 产品概念
|
|
36
36
|
*/
|
|
37
|
+
@property('concept')
|
|
37
38
|
// @ts-ignore
|
|
38
39
|
readonly concept!: 'EntityProperty';
|
|
39
40
|
|
|
@@ -336,11 +337,16 @@ export class EntityProperty extends BaseNode {
|
|
|
336
337
|
};
|
|
337
338
|
if (parentKey) {
|
|
338
339
|
params.parentKey = parentKey;
|
|
339
|
-
|
|
340
|
-
|
|
340
|
+
// @ts-ignore
|
|
341
|
+
const t = this.__v_raw || this;
|
|
342
|
+
// @ts-ignore
|
|
343
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
344
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
345
|
+
// @ts-ignore
|
|
346
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
341
347
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
342
348
|
params.index = index;
|
|
343
|
-
} else if ((
|
|
349
|
+
} else if ((t as any)[parentKey] === n) {
|
|
344
350
|
params.index = 0;
|
|
345
351
|
(this as any)[parentKey] = undefined;
|
|
346
352
|
}
|
|
@@ -384,11 +390,16 @@ export class EntityProperty extends BaseNode {
|
|
|
384
390
|
};
|
|
385
391
|
if (parentKey) {
|
|
386
392
|
params.parentKey = parentKey;
|
|
387
|
-
|
|
388
|
-
|
|
393
|
+
// @ts-ignore
|
|
394
|
+
const t = this.__v_raw || this;
|
|
395
|
+
// @ts-ignore
|
|
396
|
+
const n = databaseTypeAnnotation.__v_raw || databaseTypeAnnotation;
|
|
397
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
398
|
+
// @ts-ignore
|
|
399
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
389
400
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
390
401
|
params.index = index;
|
|
391
|
-
} else if ((
|
|
402
|
+
} else if ((t as any)[parentKey] === n) {
|
|
392
403
|
params.index = 0;
|
|
393
404
|
(this as any)[parentKey] = undefined;
|
|
394
405
|
}
|
package/src/concepts/Entity__.ts
CHANGED
|
@@ -31,6 +31,7 @@ export class Entity extends BaseNode {
|
|
|
31
31
|
/**
|
|
32
32
|
* 产品概念
|
|
33
33
|
*/
|
|
34
|
+
@property('concept')
|
|
34
35
|
// @ts-ignore
|
|
35
36
|
readonly concept!: 'Entity';
|
|
36
37
|
|
|
@@ -138,7 +139,7 @@ export class Entity extends BaseNode {
|
|
|
138
139
|
const excludedSet = new Set(excludedList);
|
|
139
140
|
return ((this.properties as EntityProperty[]) || [])
|
|
140
141
|
.filter((item) => !excludedSet.has(item))
|
|
141
|
-
.map((item) => item
|
|
142
|
+
.map((item) => item?.name);
|
|
142
143
|
}
|
|
143
144
|
getPropertyUniqueName(name = 'property1') {
|
|
144
145
|
return utils.unique(name, this.getPropertyExistingNames(), undefined, false);
|
|
@@ -291,7 +292,7 @@ export class Entity extends BaseNode {
|
|
|
291
292
|
|
|
292
293
|
getEntityIndexExistingNames(excludedList: Array<EntityIndex> = []) {
|
|
293
294
|
const excludedSet = new Set(excludedList);
|
|
294
|
-
return ((this.indexes as EntityIndex[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
295
|
+
return ((this.indexes as EntityIndex[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
295
296
|
}
|
|
296
297
|
getEntityIndexUniqueName(name = 'entityIndex1') {
|
|
297
298
|
return utils.unique(name, this.getEntityIndexExistingNames(), undefined, false);
|
|
@@ -478,11 +479,16 @@ export class Entity extends BaseNode {
|
|
|
478
479
|
};
|
|
479
480
|
if (parentKey) {
|
|
480
481
|
params.parentKey = parentKey;
|
|
481
|
-
|
|
482
|
-
|
|
482
|
+
// @ts-ignore
|
|
483
|
+
const t = this.__v_raw || this;
|
|
484
|
+
// @ts-ignore
|
|
485
|
+
const n = property.__v_raw || property;
|
|
486
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
487
|
+
// @ts-ignore
|
|
488
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
483
489
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
484
490
|
params.index = index;
|
|
485
|
-
} else if ((
|
|
491
|
+
} else if ((t as any)[parentKey] === n) {
|
|
486
492
|
params.index = 0;
|
|
487
493
|
(this as any)[parentKey] = undefined;
|
|
488
494
|
}
|
|
@@ -526,11 +532,16 @@ export class Entity extends BaseNode {
|
|
|
526
532
|
};
|
|
527
533
|
if (parentKey) {
|
|
528
534
|
params.parentKey = parentKey;
|
|
529
|
-
|
|
530
|
-
|
|
535
|
+
// @ts-ignore
|
|
536
|
+
const t = this.__v_raw || this;
|
|
537
|
+
// @ts-ignore
|
|
538
|
+
const n = entityIndex.__v_raw || entityIndex;
|
|
539
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
540
|
+
// @ts-ignore
|
|
541
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
531
542
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
532
543
|
params.index = index;
|
|
533
|
-
} else if ((
|
|
544
|
+
} else if ((t as any)[parentKey] === n) {
|
|
534
545
|
params.index = 0;
|
|
535
546
|
(this as any)[parentKey] = undefined;
|
|
536
547
|
}
|