@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
|
@@ -35,6 +35,7 @@ export class NewComposite extends LogicItem {
|
|
|
35
35
|
/**
|
|
36
36
|
* 产品概念
|
|
37
37
|
*/
|
|
38
|
+
@property('concept')
|
|
38
39
|
// @ts-ignore
|
|
39
40
|
readonly concept!: 'NewComposite';
|
|
40
41
|
|
|
@@ -183,7 +184,7 @@ export class NewComposite extends LogicItem {
|
|
|
183
184
|
|
|
184
185
|
getIdentifierExistingNames(excludedList: Array<Identifier> = []) {
|
|
185
186
|
const excludedSet = new Set(excludedList);
|
|
186
|
-
return ((this.properties as Identifier[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
187
|
+
return ((this.properties as Identifier[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
187
188
|
}
|
|
188
189
|
getIdentifierUniqueName(name = 'identifier1') {
|
|
189
190
|
return utils.unique(name, this.getIdentifierExistingNames(), undefined, false);
|
|
@@ -336,7 +337,7 @@ export class NewComposite extends LogicItem {
|
|
|
336
337
|
|
|
337
338
|
getSelectMembersExistingNames(excludedList: Array<SelectMembers> = []) {
|
|
338
339
|
const excludedSet = new Set(excludedList);
|
|
339
|
-
return ((this.rights as SelectMembers[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
340
|
+
return ((this.rights as SelectMembers[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
340
341
|
}
|
|
341
342
|
getSelectMembersUniqueName(name = 'selectMembers1') {
|
|
342
343
|
return utils.unique(name, this.getSelectMembersExistingNames(), undefined, false);
|
|
@@ -491,7 +492,7 @@ export class NewComposite extends LogicItem {
|
|
|
491
492
|
const excludedSet = new Set(excludedList);
|
|
492
493
|
return ((this.assignmentLines as AssignmentLine[]) || [])
|
|
493
494
|
.filter((item) => !excludedSet.has(item))
|
|
494
|
-
.map((item) => item
|
|
495
|
+
.map((item) => item?.name);
|
|
495
496
|
}
|
|
496
497
|
getAssignmentLineUniqueName(name = 'assignmentLine1') {
|
|
497
498
|
return utils.unique(name, this.getAssignmentLineExistingNames(), undefined, false);
|
|
@@ -678,11 +679,16 @@ export class NewComposite extends LogicItem {
|
|
|
678
679
|
};
|
|
679
680
|
if (parentKey) {
|
|
680
681
|
params.parentKey = parentKey;
|
|
681
|
-
|
|
682
|
-
|
|
682
|
+
// @ts-ignore
|
|
683
|
+
const t = this.__v_raw || this;
|
|
684
|
+
// @ts-ignore
|
|
685
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
686
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
687
|
+
// @ts-ignore
|
|
688
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
683
689
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
684
690
|
params.index = index;
|
|
685
|
-
} else if ((
|
|
691
|
+
} else if ((t as any)[parentKey] === n) {
|
|
686
692
|
params.index = 0;
|
|
687
693
|
(this as any)[parentKey] = undefined;
|
|
688
694
|
}
|
|
@@ -726,11 +732,16 @@ export class NewComposite extends LogicItem {
|
|
|
726
732
|
};
|
|
727
733
|
if (parentKey) {
|
|
728
734
|
params.parentKey = parentKey;
|
|
729
|
-
|
|
730
|
-
|
|
735
|
+
// @ts-ignore
|
|
736
|
+
const t = this.__v_raw || this;
|
|
737
|
+
// @ts-ignore
|
|
738
|
+
const n = logicItem.__v_raw || logicItem;
|
|
739
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
740
|
+
// @ts-ignore
|
|
741
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
731
742
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
732
743
|
params.index = index;
|
|
733
|
-
} else if ((
|
|
744
|
+
} else if ((t as any)[parentKey] === n) {
|
|
734
745
|
params.index = 0;
|
|
735
746
|
(this as any)[parentKey] = undefined;
|
|
736
747
|
}
|
|
@@ -774,11 +785,16 @@ export class NewComposite extends LogicItem {
|
|
|
774
785
|
};
|
|
775
786
|
if (parentKey) {
|
|
776
787
|
params.parentKey = parentKey;
|
|
777
|
-
|
|
778
|
-
|
|
788
|
+
// @ts-ignore
|
|
789
|
+
const t = this.__v_raw || this;
|
|
790
|
+
// @ts-ignore
|
|
791
|
+
const n = selectMembers.__v_raw || selectMembers;
|
|
792
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
793
|
+
// @ts-ignore
|
|
794
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
779
795
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
780
796
|
params.index = index;
|
|
781
|
-
} else if ((
|
|
797
|
+
} else if ((t as any)[parentKey] === n) {
|
|
782
798
|
params.index = 0;
|
|
783
799
|
(this as any)[parentKey] = undefined;
|
|
784
800
|
}
|
|
@@ -822,11 +838,16 @@ export class NewComposite extends LogicItem {
|
|
|
822
838
|
};
|
|
823
839
|
if (parentKey) {
|
|
824
840
|
params.parentKey = parentKey;
|
|
825
|
-
|
|
826
|
-
|
|
841
|
+
// @ts-ignore
|
|
842
|
+
const t = this.__v_raw || this;
|
|
843
|
+
// @ts-ignore
|
|
844
|
+
const n = assignmentLine.__v_raw || assignmentLine;
|
|
845
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
846
|
+
// @ts-ignore
|
|
847
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
827
848
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
828
849
|
params.index = index;
|
|
829
|
-
} else if ((
|
|
850
|
+
} else if ((t as any)[parentKey] === n) {
|
|
830
851
|
params.index = 0;
|
|
831
852
|
(this as any)[parentKey] = undefined;
|
|
832
853
|
}
|
|
@@ -892,7 +913,7 @@ export class NewComposite extends LogicItem {
|
|
|
892
913
|
}
|
|
893
914
|
members.forEach((rightMember: any, rightSecondIndex: number) => {
|
|
894
915
|
const rightName = rightMember.property.name;
|
|
895
|
-
if (rightLineSet.has(rightSecondIndex)) return;
|
|
916
|
+
if (rightLineSet.has(rightSecondIndex) || leftLineSet.has(leftSecondIndex)) return;
|
|
896
917
|
|
|
897
918
|
if (leftName === rightName) {
|
|
898
919
|
const rightTypeAnnotation = rightMember.__TypeAnnotation;
|
|
@@ -1010,7 +1031,7 @@ export class NewComposite extends LogicItem {
|
|
|
1010
1031
|
});
|
|
1011
1032
|
const selectMember = oldNode.parentNode;
|
|
1012
1033
|
const autoConnectionIndex = this.rights.findIndex((right) => right === selectMember);
|
|
1013
|
-
const newSelectMember = { ...selectMember?.toJSON?.() ?? selectMember, expression, members };
|
|
1034
|
+
const newSelectMember = { ...(selectMember?.toJSON?.() ?? selectMember), expression, members };
|
|
1014
1035
|
const splitIndex = this.rights.findIndex((right) => selectMember === right);
|
|
1015
1036
|
const newLines: AssignmentLine[] = this.assignmentLines.filter(({ rightIndex }) => rightIndex[0] !== splitIndex);
|
|
1016
1037
|
let oldLines: AssignmentLine[] = this.assignmentLines.filter(({ rightIndex }) => rightIndex[0] === splitIndex);
|
|
@@ -1019,7 +1040,7 @@ export class NewComposite extends LogicItem {
|
|
|
1019
1040
|
if (keepMembers?.has(item.completeName)) {
|
|
1020
1041
|
const lines = this.findlines(item, selectMember);
|
|
1021
1042
|
lines.forEach((line) => {
|
|
1022
|
-
const newLine = { ...line?.toJSON()?.toJSON?.() ?? line, rightIndex: [line.rightIndex[0], index] };
|
|
1043
|
+
const newLine = { ...(line?.toJSON()?.toJSON?.() ?? line), rightIndex: [line.rightIndex[0], index] };
|
|
1023
1044
|
newLines.push(newLine as AssignmentLine);
|
|
1024
1045
|
oldLines = oldLines.filter(({ leftIndex }) => leftIndex[1] !== line.leftIndex[1]);
|
|
1025
1046
|
});
|
|
@@ -1090,8 +1111,9 @@ export class NewComposite extends LogicItem {
|
|
|
1090
1111
|
: this.rights[rightIndex[0]].expression;
|
|
1091
1112
|
code += `return ${obj};\n`;
|
|
1092
1113
|
} else if (typeAnnotation.typeKind !== 'anonymousStructure') {
|
|
1093
|
-
code += `const obj = this.$genInitFromSchema('${
|
|
1094
|
-
|
|
1114
|
+
code += `const obj = this.$genInitFromSchema('${
|
|
1115
|
+
typeAnnotation.sortedTypeKey
|
|
1116
|
+
}', this.$utils['New'](${typeAnnotation.toUI(shiftState(state, code, { inline: true }))}));\n`;
|
|
1095
1117
|
this.assignmentLines.forEach(({ leftIndex, rightIndex }, index) => {
|
|
1096
1118
|
const leftSecondIndex = leftIndex[1];
|
|
1097
1119
|
const [rightFirst, rightSecond] = [rightIndex[0], rightIndex[1]];
|
|
@@ -1137,8 +1159,9 @@ export class NewComposite extends LogicItem {
|
|
|
1137
1159
|
: this.rights[rightIndex[0]].expression;
|
|
1138
1160
|
code += `return ${obj.toJS(shiftState(state, code, { inline: true }))};\n`;
|
|
1139
1161
|
} else if (typeAnnotation.typeKind !== 'anonymousStructure') {
|
|
1140
|
-
code += `const obj = this.$genInitFromSchema('${
|
|
1141
|
-
|
|
1162
|
+
code += `const obj = this.$genInitFromSchema('${
|
|
1163
|
+
typeAnnotation.sortedTypeKey
|
|
1164
|
+
}', this.$utils['New'](${typeAnnotation.toJS(shiftState(state, code, { inline: true }))}));\n`;
|
|
1142
1165
|
const rightMap = new Map();
|
|
1143
1166
|
this.assignmentLines.forEach(({ leftIndex, rightIndex }) => {
|
|
1144
1167
|
const rightIndexJson = JSON.stringify(rightIndex);
|
|
@@ -1330,12 +1353,18 @@ export class NewComposite extends LogicItem {
|
|
|
1330
1353
|
} else {
|
|
1331
1354
|
code += `${indent2}let ${temp}${ts === 'null' ? ':void' : ''} = ${ts}; `;
|
|
1332
1355
|
}
|
|
1333
|
-
code += `
|
|
1356
|
+
code += `let `;
|
|
1334
1357
|
code += `${property.toEmbeddedTS(shiftState(state, code, { inline: true }))}: `;
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1358
|
+
if (propertyType) {
|
|
1359
|
+
const typeTs = propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }));
|
|
1360
|
+
code += typeTs;
|
|
1361
|
+
code += ` = ${temp};\n`;
|
|
1362
|
+
// 如果是字段是union类型,且赋值的是当前union允许的类型,会导致property.name类型推断成temp的类型
|
|
1363
|
+
code += `${indent2}${property.name} = ${property.name} as ${typeTs};\n`;
|
|
1364
|
+
} else {
|
|
1365
|
+
code += `nasl.core.Incompatible<typeof ${temp}, void>`;
|
|
1366
|
+
code += ` = ${temp};\n`;
|
|
1367
|
+
}
|
|
1339
1368
|
} else if (propertyType) {
|
|
1340
1369
|
code += `${indent2}let ${property.name}: `;
|
|
1341
1370
|
code += `${propertyType.toEmbeddedTS(shiftState(state, code, { inline: true }))}; `;
|
|
@@ -1366,7 +1395,10 @@ export class NewComposite extends LogicItem {
|
|
|
1366
1395
|
@withSourceMap()
|
|
1367
1396
|
toNaturalTS(): string {
|
|
1368
1397
|
let code = 'nasl.util.';
|
|
1369
|
-
code +=
|
|
1398
|
+
code +=
|
|
1399
|
+
this?.typeAnnotation?.typeKind === 'anonymousStructure'
|
|
1400
|
+
? 'NewAnonymityStructure'
|
|
1401
|
+
: `NewEntity<${this?.typeAnnotation?.typeName || '__IDENTIFIER__'}>`;
|
|
1370
1402
|
let params = '';
|
|
1371
1403
|
this?.properties?.forEach((item, index) => {
|
|
1372
1404
|
if (item) {
|
|
@@ -27,6 +27,7 @@ export class NewList extends LogicItem {
|
|
|
27
27
|
/**
|
|
28
28
|
* 产品概念
|
|
29
29
|
*/
|
|
30
|
+
@property('concept')
|
|
30
31
|
// @ts-ignore
|
|
31
32
|
readonly concept!: 'NewList';
|
|
32
33
|
|
|
@@ -85,7 +86,7 @@ export class NewList extends LogicItem {
|
|
|
85
86
|
|
|
86
87
|
getItemExistingNames(excludedList: Array<LogicItem> = []) {
|
|
87
88
|
const excludedSet = new Set(excludedList);
|
|
88
|
-
return ((this.items as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
89
|
+
return ((this.items as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
89
90
|
}
|
|
90
91
|
getItemUniqueName(name = 'logicItem1') {
|
|
91
92
|
return utils.unique(name, this.getItemExistingNames(), undefined, false);
|
|
@@ -272,11 +273,16 @@ export class NewList extends LogicItem {
|
|
|
272
273
|
};
|
|
273
274
|
if (parentKey) {
|
|
274
275
|
params.parentKey = parentKey;
|
|
275
|
-
|
|
276
|
-
|
|
276
|
+
// @ts-ignore
|
|
277
|
+
const t = this.__v_raw || this;
|
|
278
|
+
// @ts-ignore
|
|
279
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
280
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
281
|
+
// @ts-ignore
|
|
282
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
277
283
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
278
284
|
params.index = index;
|
|
279
|
-
} else if ((
|
|
285
|
+
} else if ((t as any)[parentKey] === n) {
|
|
280
286
|
params.index = 0;
|
|
281
287
|
(this as any)[parentKey] = undefined;
|
|
282
288
|
}
|
|
@@ -320,11 +326,16 @@ export class NewList extends LogicItem {
|
|
|
320
326
|
};
|
|
321
327
|
if (parentKey) {
|
|
322
328
|
params.parentKey = parentKey;
|
|
323
|
-
|
|
324
|
-
|
|
329
|
+
// @ts-ignore
|
|
330
|
+
const t = this.__v_raw || this;
|
|
331
|
+
// @ts-ignore
|
|
332
|
+
const n = logicItem.__v_raw || logicItem;
|
|
333
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
334
|
+
// @ts-ignore
|
|
335
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
325
336
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
326
337
|
params.index = index;
|
|
327
|
-
} else if ((
|
|
338
|
+
} else if ((t as any)[parentKey] === n) {
|
|
328
339
|
params.index = 0;
|
|
329
340
|
(this as any)[parentKey] = undefined;
|
|
330
341
|
}
|
|
@@ -448,7 +459,8 @@ export class NewList extends LogicItem {
|
|
|
448
459
|
@withSourceMap()
|
|
449
460
|
toNaturalTS(state = createCompilerState()): string {
|
|
450
461
|
let code = '';
|
|
451
|
-
const typeAnnotation =
|
|
462
|
+
const typeAnnotation =
|
|
463
|
+
this?.typeAnnotation?.typeArguments?.map((item) => item?.toNaturalTS())?.join(', ') || '__IDENTIFIER__';
|
|
452
464
|
let params = '';
|
|
453
465
|
this?.items?.forEach((item, index) => {
|
|
454
466
|
if (item) {
|
package/src/concepts/NewMap__.ts
CHANGED
|
@@ -28,6 +28,7 @@ export class NewMap extends LogicItem {
|
|
|
28
28
|
/**
|
|
29
29
|
* 产品概念
|
|
30
30
|
*/
|
|
31
|
+
@property('concept')
|
|
31
32
|
// @ts-ignore
|
|
32
33
|
readonly concept!: 'NewMap';
|
|
33
34
|
|
|
@@ -104,7 +105,7 @@ export class NewMap extends LogicItem {
|
|
|
104
105
|
|
|
105
106
|
getItemExistingNames(excludedList: Array<LogicItem> = []) {
|
|
106
107
|
const excludedSet = new Set(excludedList);
|
|
107
|
-
return ((this.keys as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
108
|
+
return ((this.keys as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
108
109
|
}
|
|
109
110
|
getItemUniqueName(name = 'logicItem1') {
|
|
110
111
|
return utils.unique(name, this.getItemExistingNames(), undefined, false);
|
|
@@ -436,11 +437,16 @@ export class NewMap extends LogicItem {
|
|
|
436
437
|
};
|
|
437
438
|
if (parentKey) {
|
|
438
439
|
params.parentKey = parentKey;
|
|
439
|
-
|
|
440
|
-
|
|
440
|
+
// @ts-ignore
|
|
441
|
+
const t = this.__v_raw || this;
|
|
442
|
+
// @ts-ignore
|
|
443
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
444
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
445
|
+
// @ts-ignore
|
|
446
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
441
447
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
442
448
|
params.index = index;
|
|
443
|
-
} else if ((
|
|
449
|
+
} else if ((t as any)[parentKey] === n) {
|
|
444
450
|
params.index = 0;
|
|
445
451
|
(this as any)[parentKey] = undefined;
|
|
446
452
|
}
|
|
@@ -509,11 +515,16 @@ export class NewMap extends LogicItem {
|
|
|
509
515
|
};
|
|
510
516
|
if (parentKey) {
|
|
511
517
|
params.parentKey = parentKey;
|
|
512
|
-
|
|
513
|
-
|
|
518
|
+
// @ts-ignore
|
|
519
|
+
const t = this.__v_raw || this;
|
|
520
|
+
// @ts-ignore
|
|
521
|
+
const n = logicItem.__v_raw || logicItem;
|
|
522
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
523
|
+
// @ts-ignore
|
|
524
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
514
525
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
515
526
|
params.index = index;
|
|
516
|
-
} else if ((
|
|
527
|
+
} else if ((t as any)[parentKey] === n) {
|
|
517
528
|
params.index = 0;
|
|
518
529
|
(this as any)[parentKey] = undefined;
|
|
519
530
|
}
|
|
@@ -681,7 +692,8 @@ export class NewMap extends LogicItem {
|
|
|
681
692
|
@withSourceMap()
|
|
682
693
|
toNaturalTS(): string {
|
|
683
694
|
let code = '';
|
|
684
|
-
const typeAnnotation =
|
|
695
|
+
const typeAnnotation =
|
|
696
|
+
this?.typeAnnotation?.typeArguments?.map((item) => item?.toNaturalTS())?.join(', ') || '__IDENTIFIER__';
|
|
685
697
|
let params = '';
|
|
686
698
|
this?.keys?.forEach((item, index) => {
|
|
687
699
|
if (item) {
|
|
@@ -27,6 +27,7 @@ export class NumericLiteral extends LogicItem {
|
|
|
27
27
|
/**
|
|
28
28
|
* 产品概念
|
|
29
29
|
*/
|
|
30
|
+
@property('concept')
|
|
30
31
|
// @ts-ignore
|
|
31
32
|
readonly concept!: 'NumericLiteral';
|
|
32
33
|
|
|
@@ -93,11 +94,16 @@ export class NumericLiteral extends LogicItem {
|
|
|
93
94
|
};
|
|
94
95
|
if (parentKey) {
|
|
95
96
|
params.parentKey = parentKey;
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
const t = this.__v_raw || this;
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
101
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
102
|
+
// @ts-ignore
|
|
103
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
98
104
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
99
105
|
params.index = index;
|
|
100
|
-
} else if ((
|
|
106
|
+
} else if ((t as any)[parentKey] === n) {
|
|
101
107
|
params.index = 0;
|
|
102
108
|
(this as any)[parentKey] = undefined;
|
|
103
109
|
}
|
|
@@ -4,6 +4,8 @@ import StructureProperty from './StructureProperty__';
|
|
|
4
4
|
import Structure from './Structure__';
|
|
5
5
|
import Identifier from './Identifier__';
|
|
6
6
|
import MemberExpression from './MemberExpression__';
|
|
7
|
+
import type { Entity } from './Entity__';
|
|
8
|
+
import type { EntityProperty } from './EntityProperty__';
|
|
7
9
|
import logicService from '../service/logic';
|
|
8
10
|
//================================================================================
|
|
9
11
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -31,6 +33,7 @@ export class OqlQueryComponent extends LogicItem {
|
|
|
31
33
|
/**
|
|
32
34
|
* 产品概念
|
|
33
35
|
*/
|
|
36
|
+
@property('concept')
|
|
34
37
|
// @ts-ignore
|
|
35
38
|
readonly concept!: 'OqlQueryComponent';
|
|
36
39
|
|
|
@@ -122,11 +125,16 @@ export class OqlQueryComponent extends LogicItem {
|
|
|
122
125
|
};
|
|
123
126
|
if (parentKey) {
|
|
124
127
|
params.parentKey = parentKey;
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
// @ts-ignore
|
|
129
|
+
const t = this.__v_raw || this;
|
|
130
|
+
// @ts-ignore
|
|
131
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
132
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
133
|
+
// @ts-ignore
|
|
134
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
127
135
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
128
136
|
params.index = index;
|
|
129
|
-
} else if ((
|
|
137
|
+
} else if ((t as any)[parentKey] === n) {
|
|
130
138
|
params.index = 0;
|
|
131
139
|
(this as any)[parentKey] = undefined;
|
|
132
140
|
}
|
|
@@ -304,6 +312,26 @@ export class OqlQueryComponent extends LogicItem {
|
|
|
304
312
|
// 从服务端获取 SQL -> TS 的翻译和 sourceMap
|
|
305
313
|
async requestEmbeddedTS(): Promise<any> {
|
|
306
314
|
if (this.code) {
|
|
315
|
+
let dataSourceNasl = this.app.findNodeByCompleteName(this.dataSource)?.toJSON();
|
|
316
|
+
if (dataSourceNasl) {
|
|
317
|
+
dataSourceNasl = {
|
|
318
|
+
concept: 'DataSource',
|
|
319
|
+
entities: (dataSourceNasl.entities = dataSourceNasl.entities?.map((entity: Entity) => {
|
|
320
|
+
return {
|
|
321
|
+
name: entity.name,
|
|
322
|
+
concept: entity.concept,
|
|
323
|
+
tableName: entity.tableName,
|
|
324
|
+
properties: entity.properties?.map((prop: EntityProperty) => {
|
|
325
|
+
return {
|
|
326
|
+
name: prop.name,
|
|
327
|
+
concept: prop.concept,
|
|
328
|
+
columnName: prop.columnName,
|
|
329
|
+
};
|
|
330
|
+
}),
|
|
331
|
+
};
|
|
332
|
+
})),
|
|
333
|
+
};
|
|
334
|
+
}
|
|
307
335
|
return logicService
|
|
308
336
|
.queryDebugTypescript({
|
|
309
337
|
body: {
|
|
@@ -312,7 +340,7 @@ export class OqlQueryComponent extends LogicItem {
|
|
|
312
340
|
dataSourceName: this.dataSource,
|
|
313
341
|
oql: this.code,
|
|
314
342
|
ideVersion: this.app.ideVersion,
|
|
315
|
-
dataSourceNasl
|
|
343
|
+
dataSourceNasl,
|
|
316
344
|
typeScriptStartLine: 1,
|
|
317
345
|
typeScriptStartLineColumn: 1,
|
|
318
346
|
},
|
|
@@ -58,6 +58,7 @@ export class OverriddenLogic extends BaseNode {
|
|
|
58
58
|
/**
|
|
59
59
|
* 产品概念
|
|
60
60
|
*/
|
|
61
|
+
@property('concept')
|
|
61
62
|
// @ts-ignore
|
|
62
63
|
readonly concept!: 'OverriddenLogic';
|
|
63
64
|
|
|
@@ -278,7 +279,7 @@ export class OverriddenLogic extends BaseNode {
|
|
|
278
279
|
|
|
279
280
|
getTypeParamExistingNames(excludedList: Array<TypeParam> = []) {
|
|
280
281
|
const excludedSet = new Set(excludedList);
|
|
281
|
-
return ((this.typeParams as TypeParam[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item
|
|
282
|
+
return ((this.typeParams as TypeParam[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
|
|
282
283
|
}
|
|
283
284
|
getTypeParamUniqueName(name = 'typeParam1') {
|
|
284
285
|
return utils.unique(name, this.getTypeParamExistingNames(), undefined, false);
|
|
@@ -1112,11 +1113,16 @@ export class OverriddenLogic extends BaseNode {
|
|
|
1112
1113
|
};
|
|
1113
1114
|
if (parentKey) {
|
|
1114
1115
|
params.parentKey = parentKey;
|
|
1115
|
-
|
|
1116
|
-
|
|
1116
|
+
// @ts-ignore
|
|
1117
|
+
const t = this.__v_raw || this;
|
|
1118
|
+
// @ts-ignore
|
|
1119
|
+
const n = transactional.__v_raw || transactional;
|
|
1120
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1121
|
+
// @ts-ignore
|
|
1122
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1117
1123
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1118
1124
|
params.index = index;
|
|
1119
|
-
} else if ((
|
|
1125
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1120
1126
|
params.index = 0;
|
|
1121
1127
|
(this as any)[parentKey] = undefined;
|
|
1122
1128
|
}
|
|
@@ -1160,11 +1166,16 @@ export class OverriddenLogic extends BaseNode {
|
|
|
1160
1166
|
};
|
|
1161
1167
|
if (parentKey) {
|
|
1162
1168
|
params.parentKey = parentKey;
|
|
1163
|
-
|
|
1164
|
-
|
|
1169
|
+
// @ts-ignore
|
|
1170
|
+
const t = this.__v_raw || this;
|
|
1171
|
+
// @ts-ignore
|
|
1172
|
+
const n = typeParam.__v_raw || typeParam;
|
|
1173
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1174
|
+
// @ts-ignore
|
|
1175
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1165
1176
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1166
1177
|
params.index = index;
|
|
1167
|
-
} else if ((
|
|
1178
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1168
1179
|
params.index = 0;
|
|
1169
1180
|
(this as any)[parentKey] = undefined;
|
|
1170
1181
|
}
|
|
@@ -1208,11 +1219,16 @@ export class OverriddenLogic extends BaseNode {
|
|
|
1208
1219
|
};
|
|
1209
1220
|
if (parentKey) {
|
|
1210
1221
|
params.parentKey = parentKey;
|
|
1211
|
-
|
|
1212
|
-
|
|
1222
|
+
// @ts-ignore
|
|
1223
|
+
const t = this.__v_raw || this;
|
|
1224
|
+
// @ts-ignore
|
|
1225
|
+
const n = param.__v_raw || param;
|
|
1226
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1227
|
+
// @ts-ignore
|
|
1228
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1213
1229
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1214
1230
|
params.index = index;
|
|
1215
|
-
} else if ((
|
|
1231
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1216
1232
|
params.index = 0;
|
|
1217
1233
|
(this as any)[parentKey] = undefined;
|
|
1218
1234
|
}
|
|
@@ -1256,11 +1272,16 @@ export class OverriddenLogic extends BaseNode {
|
|
|
1256
1272
|
};
|
|
1257
1273
|
if (parentKey) {
|
|
1258
1274
|
params.parentKey = parentKey;
|
|
1259
|
-
|
|
1260
|
-
|
|
1275
|
+
// @ts-ignore
|
|
1276
|
+
const t = this.__v_raw || this;
|
|
1277
|
+
// @ts-ignore
|
|
1278
|
+
const n = ret.__v_raw || ret;
|
|
1279
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1280
|
+
// @ts-ignore
|
|
1281
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1261
1282
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1262
1283
|
params.index = index;
|
|
1263
|
-
} else if ((
|
|
1284
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1264
1285
|
params.index = 0;
|
|
1265
1286
|
(this as any)[parentKey] = undefined;
|
|
1266
1287
|
}
|
|
@@ -1304,11 +1325,16 @@ export class OverriddenLogic extends BaseNode {
|
|
|
1304
1325
|
};
|
|
1305
1326
|
if (parentKey) {
|
|
1306
1327
|
params.parentKey = parentKey;
|
|
1307
|
-
|
|
1308
|
-
|
|
1328
|
+
// @ts-ignore
|
|
1329
|
+
const t = this.__v_raw || this;
|
|
1330
|
+
// @ts-ignore
|
|
1331
|
+
const n = variable.__v_raw || variable;
|
|
1332
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1333
|
+
// @ts-ignore
|
|
1334
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1309
1335
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1310
1336
|
params.index = index;
|
|
1311
|
-
} else if ((
|
|
1337
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1312
1338
|
params.index = 0;
|
|
1313
1339
|
(this as any)[parentKey] = undefined;
|
|
1314
1340
|
}
|
|
@@ -1349,11 +1375,16 @@ export class OverriddenLogic extends BaseNode {
|
|
|
1349
1375
|
};
|
|
1350
1376
|
if (parentKey) {
|
|
1351
1377
|
params.parentKey = parentKey;
|
|
1352
|
-
|
|
1353
|
-
|
|
1378
|
+
// @ts-ignore
|
|
1379
|
+
const t = this.__v_raw || this;
|
|
1380
|
+
// @ts-ignore
|
|
1381
|
+
const n = logicItem.__v_raw || logicItem;
|
|
1382
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
1383
|
+
// @ts-ignore
|
|
1384
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
1354
1385
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
1355
1386
|
params.index = index;
|
|
1356
|
-
} else if ((
|
|
1387
|
+
} else if ((t as any)[parentKey] === n) {
|
|
1357
1388
|
params.index = 0;
|
|
1358
1389
|
(this as any)[parentKey] = undefined;
|
|
1359
1390
|
}
|
|
@@ -1948,7 +1979,7 @@ export class OverriddenLogic extends BaseNode {
|
|
|
1948
1979
|
handleForEachCode(code: string, forEachStatement: ForEachStatement): string {
|
|
1949
1980
|
const { item, index, each } = forEachStatement;
|
|
1950
1981
|
if (code.includes(item.name)) {
|
|
1951
|
-
const eachTSCode = each ? each.toEmbeddedTS() : '__IDENTIFIER__'
|
|
1982
|
+
const eachTSCode = each ? each.toEmbeddedTS() : '__IDENTIFIER__';
|
|
1952
1983
|
code = this.handleReplaceCode(
|
|
1953
1984
|
code,
|
|
1954
1985
|
item.name,
|
package/src/concepts/Param__.ts
CHANGED
|
@@ -50,6 +50,7 @@ export class Param extends BaseNode {
|
|
|
50
50
|
/**
|
|
51
51
|
* 产品概念
|
|
52
52
|
*/
|
|
53
|
+
@property('concept')
|
|
53
54
|
// @ts-ignore
|
|
54
55
|
readonly concept!: 'Param';
|
|
55
56
|
|
|
@@ -246,11 +247,16 @@ export class Param extends BaseNode {
|
|
|
246
247
|
};
|
|
247
248
|
if (parentKey) {
|
|
248
249
|
params.parentKey = parentKey;
|
|
249
|
-
|
|
250
|
-
|
|
250
|
+
// @ts-ignore
|
|
251
|
+
const t = this.__v_raw || this;
|
|
252
|
+
// @ts-ignore
|
|
253
|
+
const n = typeAnnotation.__v_raw || typeAnnotation;
|
|
254
|
+
if (Array.isArray((t as any)[parentKey])) {
|
|
255
|
+
// @ts-ignore
|
|
256
|
+
const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
|
|
251
257
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
252
258
|
params.index = index;
|
|
253
|
-
} else if ((
|
|
259
|
+
} else if ((t as any)[parentKey] === n) {
|
|
254
260
|
params.index = 0;
|
|
255
261
|
(this as any)[parentKey] = undefined;
|
|
256
262
|
}
|
|
@@ -327,9 +333,7 @@ export class Param extends BaseNode {
|
|
|
327
333
|
parsedValue = tryJSONParse(defaultValue) ?? defaultValue;
|
|
328
334
|
}
|
|
329
335
|
}
|
|
330
|
-
code += `${this.name}
|
|
331
|
-
typeAnnotation?.sortedTypeKey
|
|
332
|
-
}', this.$route.query.${this.name}) : ${JSON.stringify(this.defaultValue)})`;
|
|
336
|
+
code += `${this.name} !== undefined ? ${this.name} : ${JSON.stringify(parsedValue)}`;
|
|
333
337
|
|
|
334
338
|
if (needGenInitFromSchema) {
|
|
335
339
|
code += `)`;
|