@lcap/nasl 3.7.0-beta.4 → 3.7.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/README.md +97 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +397 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +91 -0
- package/dist/src/automate/engine/index.d.ts +4 -0
- package/dist/src/automate/engine/operators.d.ts +26 -0
- package/dist/src/automate/engine/uniqueName.d.ts +12 -0
- package/dist/src/automate/engine/utils.d.ts +25 -0
- package/dist/src/automate/engine/viewCache.d.ts +19 -0
- package/dist/src/automate/template/myProcess.d.ts +10 -0
- package/dist/src/automate/upgrader/2.12.d.ts +7 -0
- package/dist/src/automate/upgrader/2.14-components.d.ts +1115 -0
- package/dist/src/automate/upgrader/2.14.d.ts +10 -0
- package/dist/src/automate/upgrader/2.14.old.d.ts +1 -0
- package/dist/src/automate/upgrader/2.16.d.ts +10 -0
- package/dist/src/automate/upgrader/2.17.d.ts +21 -0
- package/dist/src/automate/upgrader/2.18.d.ts +10 -0
- package/dist/src/automate/upgrader/2.20.d.ts +17 -0
- package/dist/src/bak/translator.d.ts +1 -0
- package/dist/src/breakpoint/generator/AfterStartNode.d.ts +7 -0
- package/dist/src/breakpoint/generator/BeforeEndNode.d.ts +7 -0
- package/dist/src/breakpoint/generator/BreakpointNode.d.ts +20 -0
- package/dist/src/breakpoint/generator/CallbackNode.d.ts +4 -0
- package/dist/src/breakpoint/generator/FragmentNode.d.ts +4 -0
- package/dist/src/breakpoint/generator/index.d.ts +4 -0
- package/dist/src/breakpoint/index.d.ts +3 -0
- package/dist/src/breakpoint/shared/constants.d.ts +37 -0
- package/dist/src/breakpoint/shared/index.d.ts +3 -0
- package/dist/src/breakpoint/shared/operations.d.ts +10 -0
- package/dist/src/breakpoint/shared/socket.d.ts +48 -0
- package/dist/src/breakpoint/shared/utils.d.ts +27 -0
- package/dist/src/breakpoint/store/core.d.ts +80 -0
- package/dist/src/breakpoint/store/dock.d.ts +1 -0
- package/dist/src/breakpoint/store/index.d.ts +2 -0
- package/dist/src/common/BaseNode.d.ts +384 -0
- package/dist/src/common/Command.d.ts +21 -0
- package/dist/src/common/ComponentAPI.d.ts +112 -0
- package/dist/src/common/EventEmitter.d.ts +61 -0
- package/dist/src/common/Messager.d.ts +91 -0
- package/dist/src/common/asyncFuncMap.d.ts +2 -0
- package/dist/src/common/index.d.ts +4 -0
- package/dist/src/common/utils.d.ts +2 -0
- package/dist/src/concepts/Abort__.d.ts +31 -0
- package/dist/src/concepts/AbstractInterface__.d.ts +25 -0
- package/dist/src/concepts/Anchor__.d.ts +42 -0
- package/dist/src/concepts/AnonymousFunction__.d.ts +144 -0
- package/dist/src/concepts/App__.d.ts +1711 -0
- package/dist/src/concepts/Argument__.d.ts +64 -0
- package/dist/src/concepts/Assignee__.d.ts +294 -0
- package/dist/src/concepts/AssignmentLine__.d.ts +43 -0
- package/dist/src/concepts/Assignment__.d.ts +57 -0
- package/dist/src/concepts/Attribute__.d.ts +75 -0
- package/dist/src/concepts/AuthInterface__.d.ts +38 -0
- package/dist/src/concepts/AuthLogicForCallInterface__.d.ts +145 -0
- package/dist/src/concepts/AuthLogic__.d.ts +69 -0
- package/dist/src/concepts/BackendVariable__.d.ts +118 -0
- package/dist/src/concepts/Backend__.d.ts +127 -0
- package/dist/src/concepts/BaseSetter__.d.ts +25 -0
- package/dist/src/concepts/BatchAssignment__.d.ts +244 -0
- package/dist/src/concepts/BinaryExpression__.d.ts +61 -0
- package/dist/src/concepts/BindAttribute__.d.ts +284 -0
- package/dist/src/concepts/BindDirective__.d.ts +156 -0
- package/dist/src/concepts/BindEvent__.d.ts +246 -0
- package/dist/src/concepts/BindStyle__.d.ts +127 -0
- package/dist/src/concepts/Block__.d.ts +88 -0
- package/dist/src/concepts/BooleanLiteral__.d.ts +44 -0
- package/dist/src/concepts/BusinessComponent__.d.ts +640 -0
- package/dist/src/concepts/BusinessLogic__.d.ts +44 -0
- package/dist/src/concepts/CallAuthInterface__.d.ts +132 -0
- package/dist/src/concepts/CallConnector__.d.ts +55 -0
- package/dist/src/concepts/CallEvent__.d.ts +100 -0
- package/dist/src/concepts/CallFunction__.d.ts +171 -0
- package/dist/src/concepts/CallInterface__.d.ts +143 -0
- package/dist/src/concepts/CallLogic__.d.ts +224 -0
- package/dist/src/concepts/CallQueryComponent__.d.ts +383 -0
- package/dist/src/concepts/CapsulesSetter__.d.ts +109 -0
- package/dist/src/concepts/Comment__.d.ts +41 -0
- package/dist/src/concepts/CompletionProperty__.d.ts +87 -0
- package/dist/src/concepts/ConfigGroup__.d.ts +121 -0
- package/dist/src/concepts/ConfigPropertyValue__.d.ts +42 -0
- package/dist/src/concepts/ConfigProperty__.d.ts +147 -0
- package/dist/src/concepts/Configuration__.d.ts +120 -0
- package/dist/src/concepts/Connection__.d.ts +159 -0
- package/dist/src/concepts/ConnectorLogic__.d.ts +33 -0
- package/dist/src/concepts/ConnectorTriggerLauncher__.d.ts +44 -0
- package/dist/src/concepts/ConnectorTrigger__.d.ts +76 -0
- package/dist/src/concepts/Connector__.d.ts +532 -0
- package/dist/src/concepts/Constant__.d.ts +94 -0
- package/dist/src/concepts/CountersignPolicy__.d.ts +29 -0
- package/dist/src/concepts/DataSource__.d.ts +163 -0
- package/dist/src/concepts/DatabaseTypeAnnotation__.d.ts +35 -0
- package/dist/src/concepts/DefaultValue__.d.ts +94 -0
- package/dist/src/concepts/Destination__.d.ts +150 -0
- package/dist/src/concepts/End__.d.ts +30 -0
- package/dist/src/concepts/EntityIndex__.d.ts +93 -0
- package/dist/src/concepts/EntityProperty__.d.ts +255 -0
- package/dist/src/concepts/Entity__.d.ts +332 -0
- package/dist/src/concepts/EnumItem__.d.ts +83 -0
- package/dist/src/concepts/EnumSelectSetter__.d.ts +109 -0
- package/dist/src/concepts/Enum__.d.ts +133 -0
- package/dist/src/concepts/EventDeclaration__.d.ts +41 -0
- package/dist/src/concepts/Event__.d.ts +149 -0
- package/dist/src/concepts/ExternalDestination__.d.ts +63 -0
- package/dist/src/concepts/ForEachStatement__.d.ts +126 -0
- package/dist/src/concepts/FrontendLibrary__.d.ts +208 -0
- package/dist/src/concepts/FrontendType__.d.ts +304 -0
- package/dist/src/concepts/FrontendVariable__.d.ts +41 -0
- package/dist/src/concepts/Frontend__.d.ts +389 -0
- package/dist/src/concepts/Function__.d.ts +399 -0
- package/dist/src/concepts/I18nInfo__.d.ts +47 -0
- package/dist/src/concepts/IconSetter__.d.ts +29 -0
- package/dist/src/concepts/Identifier__.d.ts +66 -0
- package/dist/src/concepts/IfStatement__.d.ts +155 -0
- package/dist/src/concepts/ImageSetter__.d.ts +25 -0
- package/dist/src/concepts/ImportedInterface__.d.ts +29 -0
- package/dist/src/concepts/InputSetter__.d.ts +29 -0
- package/dist/src/concepts/Integration__.d.ts +127 -0
- package/dist/src/concepts/InterfaceParam__.d.ts +119 -0
- package/dist/src/concepts/InterfaceTriggerEvent__.d.ts +34 -0
- package/dist/src/concepts/Interface__.d.ts +323 -0
- package/dist/src/concepts/JSBlock__.d.ts +38 -0
- package/dist/src/concepts/JavaLogic__.d.ts +50 -0
- package/dist/src/concepts/LogicDeclaration__.d.ts +289 -0
- package/dist/src/concepts/LogicItem__.d.ts +171 -0
- package/dist/src/concepts/Logic__.d.ts +632 -0
- package/dist/src/concepts/MatchCase__.d.ts +264 -0
- package/dist/src/concepts/Match__.d.ts +122 -0
- package/dist/src/concepts/MemberExpression__.d.ts +64 -0
- package/dist/src/concepts/MetadataType__.d.ts +220 -0
- package/dist/src/concepts/MicroApp__.d.ts +53 -0
- package/dist/src/concepts/Module__.d.ts +1142 -0
- package/dist/src/concepts/MsgTriggerEvent__.d.ts +138 -0
- package/dist/src/concepts/MsgTriggerLauncher__.d.ts +119 -0
- package/dist/src/concepts/MultiApprovalPolicy__.d.ts +25 -0
- package/dist/src/concepts/Namespace__.d.ts +1060 -0
- package/dist/src/concepts/NewComposite__.d.ts +346 -0
- package/dist/src/concepts/NewList__.d.ts +135 -0
- package/dist/src/concepts/NewMap__.d.ts +226 -0
- package/dist/src/concepts/New__.d.ts +30 -0
- package/dist/src/concepts/NullLiteral__.d.ts +36 -0
- package/dist/src/concepts/NumberInputSetter__.d.ts +45 -0
- package/dist/src/concepts/NumericLiteral__.d.ts +53 -0
- package/dist/src/concepts/OqlQueryComponent__.d.ts +67 -0
- package/dist/src/concepts/OverriddenLogic__.d.ts +615 -0
- package/dist/src/concepts/Paginate__.d.ts +59 -0
- package/dist/src/concepts/ParamWithGroup__.d.ts +44 -0
- package/dist/src/concepts/Param__.d.ts +140 -0
- package/dist/src/concepts/Point__.d.ts +33 -0
- package/dist/src/concepts/ProcessComponent__.d.ts +214 -0
- package/dist/src/concepts/ProcessElement__.d.ts +620 -0
- package/dist/src/concepts/ProcessOutcome__.d.ts +35 -0
- package/dist/src/concepts/ProcessOutcomes__.d.ts +35 -0
- package/dist/src/concepts/Process__.d.ts +605 -0
- package/dist/src/concepts/PropDeclaration__.d.ts +99 -0
- package/dist/src/concepts/PropertySelectSetter__.d.ts +25 -0
- package/dist/src/concepts/QueryAggregateExpression__.d.ts +50 -0
- package/dist/src/concepts/QueryFieldExpression__.d.ts +66 -0
- package/dist/src/concepts/QueryFromExpression__.d.ts +107 -0
- package/dist/src/concepts/QueryGroupByExpression__.d.ts +46 -0
- package/dist/src/concepts/QueryJoinExpression__.d.ts +194 -0
- package/dist/src/concepts/QueryLimitExpression__.d.ts +46 -0
- package/dist/src/concepts/QueryOrderByExpression__.d.ts +57 -0
- package/dist/src/concepts/QuerySelectExpression__.d.ts +213 -0
- package/dist/src/concepts/Rect__.d.ts +41 -0
- package/dist/src/concepts/Return__.d.ts +120 -0
- package/dist/src/concepts/Role__.d.ts +58 -0
- package/dist/src/concepts/SelectMembers__.d.ts +134 -0
- package/dist/src/concepts/SequentialPolicy__.d.ts +25 -0
- package/dist/src/concepts/SetterOption__.d.ts +49 -0
- package/dist/src/concepts/SlotDeclaration__.d.ts +213 -0
- package/dist/src/concepts/Slot__.d.ts +53 -0
- package/dist/src/concepts/SqlQueryComponent__.d.ts +63 -0
- package/dist/src/concepts/Start__.d.ts +30 -0
- package/dist/src/concepts/StaticString__.d.ts +49 -0
- package/dist/src/concepts/StringInterpolation__.d.ts +122 -0
- package/dist/src/concepts/StringLiteral__.d.ts +51 -0
- package/dist/src/concepts/StructureProperty__.d.ts +119 -0
- package/dist/src/concepts/Structure__.d.ts +243 -0
- package/dist/src/concepts/SwitchCase__.d.ts +91 -0
- package/dist/src/concepts/SwitchSetter__.d.ts +25 -0
- package/dist/src/concepts/SwitchStatement__.d.ts +90 -0
- package/dist/src/concepts/ThemeVariable__.d.ts +29 -0
- package/dist/src/concepts/Theme__.d.ts +39 -0
- package/dist/src/concepts/Transactional__.d.ts +85 -0
- package/dist/src/concepts/TriggerEvent__.d.ts +42 -0
- package/dist/src/concepts/TriggerLauncher__.d.ts +76 -0
- package/dist/src/concepts/TypeAnnotation__.d.ts +303 -0
- package/dist/src/concepts/TypeParam__.d.ts +34 -0
- package/dist/src/concepts/UnaryExpression__.d.ts +45 -0
- package/dist/src/concepts/Unparsed__.d.ts +41 -0
- package/dist/src/concepts/UseComponent__.d.ts +33 -0
- package/dist/src/concepts/ValidationRule__.d.ts +133 -0
- package/dist/src/concepts/Variable__.d.ts +137 -0
- package/dist/src/concepts/ViewBlockWithImage__.d.ts +33 -0
- package/dist/src/concepts/ViewBlock__.d.ts +37 -0
- package/dist/src/concepts/ViewComponentDeclaration__.d.ts +721 -0
- package/dist/src/concepts/ViewElement__.d.ts +652 -0
- package/dist/src/concepts/View__.d.ts +728 -0
- package/dist/src/concepts/WhileStatement__.d.ts +94 -0
- package/dist/src/concepts/basics/constants.d.ts +1 -0
- package/dist/src/concepts/basics/stdlib/index.d.ts +16 -0
- package/dist/src/concepts/basics/stdlib/nasl.auth.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.browser.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.collection.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.configuration.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.core.d.ts +7 -0
- package/dist/src/concepts/basics/stdlib/nasl.event.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.http.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.interface.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.io.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.logging.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.process.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.ui.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.util.d.ts +6 -0
- package/dist/src/concepts/basics/stdlib/nasl.validation.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +4 -0
- package/dist/src/concepts/basics/stdlib/timeZone.d.ts +5 -0
- package/dist/src/concepts/basics/types/coreTypeList.d.ts +2 -0
- package/dist/src/concepts/basics/types/index.d.ts +17 -0
- package/dist/src/concepts/index.d.ts +7 -0
- package/dist/src/concepts/index__.d.ts +156 -0
- package/dist/src/concepts/utils/asserts.d.ts +7825 -0
- package/dist/src/concepts/utils/quick-info.d.ts +13 -0
- package/dist/src/concepts/utils/types.d.ts +510 -0
- package/dist/src/config.d.ts +52 -0
- package/dist/src/decorators/index.d.ts +67 -0
- package/dist/src/decorators/promise.d.ts +7 -0
- package/dist/src/enums/KEYWORDS.d.ts +6 -0
- package/dist/src/enums/LEVEL_NAME_MAP.d.ts +26 -0
- package/dist/src/eventBus.d.ts +3 -0
- package/dist/src/generator/compileComponent.d.ts +11 -0
- package/dist/src/generator/genBundleFiles.d.ts +37 -0
- package/dist/src/generator/genHash.d.ts +7 -0
- package/dist/src/generator/genMetaData.d.ts +31 -0
- package/dist/src/generator/icestark.d.ts +2 -0
- package/dist/src/generator/index.d.ts +7 -0
- package/dist/src/generator/microApp.d.ts +2 -0
- package/dist/src/generator/permission.d.ts +14 -0
- package/dist/src/generator/qiankun.d.ts +2 -0
- package/dist/src/generator/release-body/body.d.ts +42 -0
- package/dist/src/generator/release-body/data.d.ts +45 -0
- package/dist/src/generator/release-body/index.d.ts +2 -0
- package/dist/src/generator/release-body/internal.d.ts +622 -0
- package/dist/src/generator/release-body/types.d.ts +57 -0
- package/dist/src/generator/release-body/utils.d.ts +418 -0
- package/dist/src/generator/release-body/validation.d.ts +3 -0
- package/dist/src/generator/styleReplacer.d.ts +3 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/manager/diagnostic.d.ts +39 -0
- package/dist/src/manager/stepRecorder.d.ts +20 -0
- package/dist/src/natural/componentData.d.ts +31 -0
- package/dist/src/natural/genNaturalTS.d.ts +241 -0
- package/dist/src/natural/index.d.ts +6 -0
- package/dist/src/natural/naslStdlibMap.d.ts +1 -0
- package/dist/src/natural/prompt/analyzeClaims.d.ts +1 -0
- package/dist/src/natural/prompt/analyzeFormatOutput.d.ts +1 -0
- package/dist/src/natural/prompt/analyzeTasks.d.ts +1 -0
- package/dist/src/natural/prompt/executeClaims.d.ts +1 -0
- package/dist/src/natural/transformTSCode.d.ts +7 -0
- package/dist/src/sentry/index.d.ts +34 -0
- package/dist/src/server/createUiTs.d.ts +17 -0
- package/dist/src/server/entity2LogicNamespace.d.ts +10 -0
- package/dist/src/server/event.d.ts +30 -0
- package/dist/src/server/extendBaseNode.d.ts +1 -0
- package/dist/src/server/formatTsUtils.d.ts +36 -0
- package/dist/src/server/getConnector.d.ts +15 -0
- package/dist/src/server/getExtensionModules.d.ts +3 -0
- package/dist/src/server/getFunctions.d.ts +3 -0
- package/dist/src/server/getInterfaces.d.ts +2 -0
- package/dist/src/server/getLogging.d.ts +1 -0
- package/dist/src/server/getLogics.d.ts +5 -0
- package/dist/src/server/getMemberIdentifier.d.ts +17 -0
- package/dist/src/server/getProcessComponents.d.ts +2 -0
- package/dist/src/server/getProcesses.d.ts +33 -0
- package/dist/src/server/getScope.d.ts +13 -0
- package/dist/src/server/getValidates.d.ts +3 -0
- package/dist/src/server/index.d.ts +5 -0
- package/dist/src/server/naslServer.d.ts +391 -0
- package/dist/src/server/naslStdlibMap.d.ts +2 -0
- package/dist/src/server/process2LogicNamespace.d.ts +26 -0
- package/dist/src/server/translator.d.ts +26 -0
- package/dist/src/service/creator/add.configs.d.ts +1 -0
- package/dist/src/service/creator/errHandles.d.ts +18 -0
- package/dist/src/service/creator/index.d.ts +1 -0
- package/dist/src/service/datasource/api.d.ts +12 -0
- package/dist/src/service/datasource/index.d.ts +2 -0
- package/dist/src/service/logic/api.d.ts +9 -0
- package/dist/src/service/logic/checktypeSocket.d.ts +5 -0
- package/dist/src/service/logic/index.d.ts +2 -0
- package/dist/src/service/storage/api.d.ts +54 -0
- package/dist/src/service/storage/index.d.ts +2 -0
- package/dist/src/service/storage/init.d.ts +105 -0
- package/dist/src/service/storage/jsoner.d.ts +36 -0
- package/dist/src/service/storage/map.d.ts +4 -0
- package/dist/src/service/storage/service.d.ts +25 -0
- package/dist/src/service/storage/storagePoint.d.ts +17 -0
- package/dist/src/service/video/BaseService.d.ts +7 -0
- package/dist/src/service/video/MainCallbackService.d.ts +12 -0
- package/dist/src/service/video/VideoTranscribe.d.ts +15 -0
- package/dist/src/service/video/publishService.d.ts +1 -0
- package/dist/src/templator/genCallComponentLogic.d.ts +17 -0
- package/dist/src/templator/genCreateBlock.d.ts +10 -0
- package/dist/src/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
- package/dist/src/templator/genCurdMultipleKeyBlock.d.ts +61 -0
- package/dist/src/templator/genEditTableBlock.d.ts +51 -0
- package/dist/src/templator/genEnumSelectBlock.d.ts +10 -0
- package/dist/src/templator/genGetBlock.d.ts +6 -0
- package/dist/src/templator/genGridViewBlock.d.ts +55 -0
- package/dist/src/templator/genListViewBlock.d.ts +19 -0
- package/dist/src/templator/genQueryComponent.d.ts +34 -0
- package/dist/src/templator/genSelectBlock.d.ts +45 -0
- package/dist/src/templator/genTableBlock.d.ts +55 -0
- package/dist/src/templator/genUpdateBlock.d.ts +6 -0
- package/dist/src/templator/index.d.ts +19 -0
- package/dist/src/templator/utils.d.ts +683 -0
- package/dist/src/translator/constant.d.ts +6 -0
- package/dist/src/translator/index.d.ts +3 -0
- package/dist/src/translator/types.d.ts +85 -0
- package/dist/src/translator/utils.d.ts +47 -0
- package/dist/src/utils/cookie.d.ts +9 -0
- package/dist/src/utils/create.d.ts +2 -0
- package/dist/src/utils/env.d.ts +2 -0
- package/dist/src/utils/file.d.ts +33 -0
- package/dist/src/utils/i18nInfo.d.ts +5 -0
- package/dist/src/utils/index.d.ts +72 -0
- package/dist/src/utils/logger.d.ts +8 -0
- package/dist/src/utils/sortTsString.d.ts +1 -0
- package/dist/src/utils/string.d.ts +64 -0
- package/dist/src/utils/time-slicing/constant.d.ts +35 -0
- package/dist/src/utils/time-slicing/controller.d.ts +53 -0
- package/dist/src/utils/time-slicing/index.d.ts +5 -0
- package/dist/src/utils/time-slicing/page-state.d.ts +2 -0
- package/dist/src/utils/time-slicing/performance.d.ts +11 -0
- package/dist/src/utils/time-slicing/runner.d.ts +12 -0
- package/dist/src/utils/time-slicing/tool.d.ts +24 -0
- package/dist/src/utils/time-slicing/utils.d.ts +62 -0
- package/dist/src/utils/time-slicing/wrapper.d.ts +18 -0
- package/dist/src/utils/traverse.d.ts +36 -0
- package/dist/src/utils/types.d.ts +13 -0
- package/dist/src/utils/window.d.ts +7 -0
- package/dist/test/concepts/anonymous-function/constant.d.ts +2 -0
- package/dist/test/concepts/anonymous-function/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/anonymous-function/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/anonymous-function/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/assignment/constant.d.ts +2 -0
- package/dist/test/concepts/assignment/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/assignment/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/assignment/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/batch-assignment/constant.d.ts +2 -0
- package/dist/test/concepts/batch-assignment/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/batch-assignment/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/batch-assignment/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/constant.d.ts +2 -0
- package/dist/test/concepts/binary-expression/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/boolean-literal/constant.d.ts +2 -0
- package/dist/test/concepts/boolean-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/boolean-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/boolean-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/call-function/constant.d.ts +2 -0
- package/dist/test/concepts/call-function/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/call-function/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/call-function/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/call-interface/constant.d.ts +2 -0
- package/dist/test/concepts/call-interface/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/call-interface/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/call-interface/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/constant.d.ts +2 -0
- package/dist/test/concepts/call-logic/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toUI.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toVueDesigner.spec.d.ts +1 -0
- package/dist/test/concepts/data-source/constant.d.ts +2 -0
- package/dist/test/concepts/data-source/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/data-source/toEmbeddedTSFile.spec.d.ts +1 -0
- package/dist/test/concepts/entity/constant.d.ts +2 -0
- package/dist/test/concepts/entity/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/entity/toEmbeddedTSFile.spec.d.ts +1 -0
- package/dist/test/concepts/identifier/constant.d.ts +2 -0
- package/dist/test/concepts/identifier/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/identifier/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/identifier/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/match/constant.d.ts +2 -0
- package/dist/test/concepts/match/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/match/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/member-expression/constant.d.ts +2 -0
- package/dist/test/concepts/member-expression/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/member-expression/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/member-expression/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/new-composite/constant.d.ts +2 -0
- package/dist/test/concepts/new-composite/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/new-composite/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/new-composite/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/new-list/constant.d.ts +2 -0
- package/dist/test/concepts/new-list/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/new-list/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/new-list/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/new-map/constant.d.ts +2 -0
- package/dist/test/concepts/new-map/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/new-map/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/new-map/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/null-literal/constant.d.ts +2 -0
- package/dist/test/concepts/null-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/null-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/null-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/numeric-literal/constant.d.ts +2 -0
- package/dist/test/concepts/numeric-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/numeric-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/numeric-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/string-literal/constant.d.ts +2 -0
- package/dist/test/concepts/string-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/string-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/string-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/utils.d.ts +13 -0
- package/dist/test/concepts/validation-rule/constant.d.ts +2 -0
- package/dist/test/concepts/validation-rule/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/validation-rule/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/validation-rule/validation-rule.spec.d.ts +1 -0
- package/dist/test/concepts/view-element/constant.d.ts +2 -0
- package/dist/test/concepts/view-element/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/view-element/toVue.spec.d.ts +1 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/time-slicing/runner.spec.d.ts +1 -0
- package/dist/test/time-slicing/time-slicing-nodejs.spec.d.ts +1 -0
- package/dist/test/time-slicing/utils.d.ts +1 -0
- package/dist/test/time-slicing/wrapper.spec.d.ts +1 -0
- package/out/automate/engine/utils.js +1 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/bak/translator.js +12 -12
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.js +3 -3
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.d.ts +6 -2
- package/out/concepts/App__.js +32 -16
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.js +5 -0
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +1 -0
- package/out/concepts/AuthLogicForCallInterface__.js +15 -4
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +1 -0
- package/out/concepts/CallAuthInterface__.js +14 -1
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +9 -1
- package/out/concepts/CallInterface__.js +105 -16
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +12 -6
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +2 -1
- package/out/concepts/ConnectorLogic__.d.ts +33 -0
- package/out/concepts/ConnectorLogic__.js +69 -0
- package/out/concepts/ConnectorLogic__.js.map +1 -0
- package/out/concepts/ConnectorTriggerLauncher__.d.ts +44 -0
- package/out/concepts/ConnectorTriggerLauncher__.js +99 -0
- package/out/concepts/ConnectorTriggerLauncher__.js.map +1 -0
- package/out/concepts/ConnectorTrigger__.d.ts +5 -4
- package/out/concepts/ConnectorTrigger__.js +39 -4
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.d.ts +1 -0
- package/out/concepts/Connector__.js +5 -0
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/End__.js +1 -0
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/Frontend__.js +1 -0
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Integration__.d.ts +1 -0
- package/out/concepts/Integration__.js +4 -0
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceTriggerEvent__.d.ts +34 -0
- package/out/concepts/InterfaceTriggerEvent__.js +72 -0
- package/out/concepts/InterfaceTriggerEvent__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +3 -3
- package/out/concepts/Interface__.js +7 -6
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +5 -0
- package/out/concepts/LogicItem__.js +7 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +1 -1
- package/out/concepts/Logic__.js +4 -4
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Module__.js +1 -0
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.d.ts +3 -10
- package/out/concepts/MsgTriggerLauncher__.js +6 -19
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.js +2 -1
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/Param__.js +3 -1
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Structure__.js +4 -4
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/TriggerEvent__.d.ts +2 -2
- package/out/concepts/TriggerEvent__.js +1 -1
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +1 -1
- package/out/concepts/TriggerLauncher__.js +18 -1
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +1 -0
- package/out/concepts/ViewElement__.js +7 -0
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +3 -2
- package/out/concepts/View__.js +11 -18
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.browser.js +42 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.configuration.js +8 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -1
- package/out/concepts/index__.d.ts +3 -0
- package/out/concepts/index__.js +3 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/utils/asserts.d.ts +145 -17
- package/out/concepts/utils/asserts.js +212 -39
- package/out/concepts/utils/asserts.js.map +1 -1
- package/out/concepts/utils/types.d.ts +15 -4
- package/out/generator/genBundleFiles.js +15 -2
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.js +1 -0
- package/out/generator/genMetaData.js.map +1 -1
- package/out/generator/permission.js +1 -0
- package/out/generator/permission.js.map +1 -1
- package/out/generator/release-body/body.d.ts +1 -0
- package/out/generator/release-body/body.js +8 -6
- package/out/generator/release-body/body.js.map +1 -1
- package/out/generator/release-body/data.d.ts +1 -0
- package/out/generator/release-body/data.js +11 -8
- package/out/generator/release-body/data.js.map +1 -1
- package/out/generator/release-body/internal.d.ts +1 -0
- package/out/generator/release-body/internal.js.map +1 -1
- package/out/generator/release-body/types.d.ts +3 -1
- package/out/manager/diagnostic.d.ts +6 -2
- package/out/manager/diagnostic.js +28 -23
- package/out/manager/diagnostic.js.map +1 -1
- package/out/natural/genNaturalTS.d.ts +8 -8
- package/out/natural/genNaturalTS.js +41 -41
- package/out/natural/prompt/analyzeClaims.js +4 -3
- package/out/natural/prompt/analyzeClaims.js.map +1 -1
- package/out/natural/prompt/analyzeFormatOutput.js +1 -1
- package/out/natural/prompt/analyzeTasks.js +2 -2
- package/out/natural/transformTSCode.js +31 -3
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/extendBaseNode.js +36 -3
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.d.ts +1 -1
- package/out/server/formatTsUtils.js +7 -3
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getConnector.d.ts +4 -4
- package/out/server/getConnector.js +3 -3
- package/out/server/getConnector.js.map +1 -1
- package/out/server/getExtensionModules.d.ts +1 -1
- package/out/server/getLogics.js +20 -6
- package/out/server/getLogics.js.map +1 -1
- package/out/server/naslServer.d.ts +5 -4
- package/out/server/naslServer.js +94 -61
- package/out/server/naslServer.js.map +1 -1
- package/out/service/storage/init.js +1 -1
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +2 -2
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +2 -3
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +5 -4
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/utils/delay/index.d.ts +0 -0
- package/out/utils/delay/index.js +1 -0
- package/out/utils/delay/index.js.map +1 -0
- package/out/utils/delay.d.ts +9 -0
- package/out/utils/delay.js +41 -0
- package/out/utils/delay.js.map +1 -0
- package/out/utils/env.d.ts +4 -0
- package/out/utils/env.js +6 -1
- package/out/utils/env.js.map +1 -1
- package/out/utils/index.d.ts +5 -0
- package/out/utils/index.js +36 -1
- package/out/utils/index.js.map +1 -1
- package/out/utils/time-slicing/controller.js +4 -2
- package/out/utils/time-slicing/controller.js.map +1 -1
- package/out/utils/time-slicing/page-state.d.ts +1 -1
- package/out/utils/time-slicing/page-state.js +3 -9
- package/out/utils/time-slicing/page-state.js.map +1 -1
- package/package.json +1 -1
- package/sandbox/stdlib/nasl.browser.ts +5 -0
- package/sandbox-natural/stdlib/nasl.core.ts +0 -2
- package/src/automate/engine/utils.js +1 -1
- package/src/bak/translator.js +13 -13
- package/src/common/BaseNode.ts +3 -3
- package/src/concepts/App__.ts +34 -18
- package/src/concepts/Argument__.ts +6 -0
- package/src/concepts/AuthLogicForCallInterface__.ts +15 -4
- package/src/concepts/CallAuthInterface__.ts +18 -1
- package/src/concepts/CallInterface__.ts +121 -16
- package/src/concepts/CallLogic__.ts +14 -7
- package/src/concepts/Connection__.ts +1 -1
- package/src/concepts/ConnectorLogic__.ts +84 -0
- package/src/concepts/ConnectorTriggerLauncher__.ts +117 -0
- package/src/concepts/ConnectorTrigger__.ts +38 -5
- package/src/concepts/Connector__.ts +6 -0
- package/src/concepts/End__.ts +1 -0
- package/src/concepts/Frontend__.ts +1 -0
- package/src/concepts/Integration__.ts +6 -0
- package/src/concepts/InterfaceTriggerEvent__.ts +88 -0
- package/src/concepts/Interface__.ts +9 -8
- package/src/concepts/LogicItem__.ts +8 -1
- package/src/concepts/Logic__.ts +6 -5
- package/src/concepts/MatchCase__.ts +1 -0
- package/src/concepts/Module__.ts +2 -1
- package/src/concepts/MsgTriggerLauncher__.ts +7 -23
- package/src/concepts/OqlQueryComponent__.ts +18 -17
- package/src/concepts/Param__.ts +3 -1
- package/src/concepts/Structure__.ts +4 -4
- package/src/concepts/TriggerEvent__.ts +3 -3
- package/src/concepts/TriggerLauncher__.ts +19 -2
- package/src/concepts/ViewElement__.ts +11 -1
- package/src/concepts/View__.ts +12 -20
- package/src/concepts/basics/stdlib/nasl.browser.ts +42 -0
- package/src/concepts/basics/stdlib/nasl.configuration.ts +8 -0
- package/src/concepts/index__.ts +3 -0
- package/src/concepts/utils/asserts.ts +212 -24
- package/src/concepts/utils/types.ts +25 -6
- package/src/generator/genBundleFiles.ts +14 -4
- package/src/generator/genMetaData.ts +1 -0
- package/src/generator/permission.ts +1 -0
- package/src/generator/release-body/body.ts +10 -7
- package/src/generator/release-body/data.ts +11 -8
- package/src/generator/release-body/internal.ts +1 -0
- package/src/generator/release-body/types.ts +3 -1
- package/src/manager/diagnostic.ts +35 -31
- package/src/natural/genNaturalTS.ts +41 -41
- package/src/natural/prompt/analyzeClaims.ts +4 -3
- package/src/natural/prompt/analyzeFormatOutput.ts +1 -1
- package/src/natural/prompt/analyzeTasks.ts +2 -2
- package/src/natural/transformTSCode.ts +32 -4
- package/src/server/extendBaseNode.ts +35 -4
- package/src/server/formatTsUtils.ts +6 -3
- package/src/server/getConnector.ts +7 -7
- package/src/server/getLogics.ts +21 -6
- package/src/server/naslServer.ts +107 -64
- package/src/service/storage/init.ts +1 -1
- package/src/templator/genCreateBlock.ts +2 -2
- package/src/templator/genCurdEditMultipleKeyBlock.ts +1 -1
- package/src/templator/genCurdMultipleKeyBlock.ts +2 -3
- package/src/templator/genUpdateBlock.ts +5 -4
- package/src/utils/delay/index.ts +0 -0
- package/src/utils/delay.ts +41 -0
- package/src/utils/env.ts +7 -0
- package/src/utils/index.ts +36 -1
- package/src/utils/time-slicing/controller.ts +5 -3
- package/src/utils/time-slicing/page-state.ts +1 -9
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +2 -2
- package/ts-worker/src/index.js +4 -3
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import App from './App__';
|
|
2
|
+
//================================================================================
|
|
3
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
4
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
5
|
+
//================================================================================
|
|
6
|
+
import { EventPayload, Params } from '../common/EventEmitter';
|
|
7
|
+
import { concept, excludedInJSON, property, getConceptConstructor } from '../decorators';
|
|
8
|
+
|
|
9
|
+
import * as utils from '../utils';
|
|
10
|
+
import * as types from './utils/types';
|
|
11
|
+
import * as asserts from './utils/asserts';
|
|
12
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
13
|
+
|
|
14
|
+
import TriggerLauncher from './TriggerLauncher__';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 连接器触发器启动器
|
|
18
|
+
*/
|
|
19
|
+
@concept('连接器触发器启动器')
|
|
20
|
+
export class ConnectorTriggerLauncher extends TriggerLauncher {
|
|
21
|
+
/** 类名 */
|
|
22
|
+
static readonly ConceptName: string = 'ConnectorTriggerLauncher';
|
|
23
|
+
/**
|
|
24
|
+
* 是否为抽象类
|
|
25
|
+
* 抽象类不能产生 concept: string
|
|
26
|
+
*/
|
|
27
|
+
static isAbstract: boolean = false;
|
|
28
|
+
/** 继承链 */
|
|
29
|
+
static readonly inheritanceChain: string[] = ['TriggerLauncher', 'BaseNode'];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 产品概念
|
|
33
|
+
*/
|
|
34
|
+
@property('concept')
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
readonly concept!: 'ConnectorTriggerLauncher' | 'MsgTriggerLauncher';
|
|
37
|
+
/**
|
|
38
|
+
* calleeConnectionName
|
|
39
|
+
*/
|
|
40
|
+
@property({
|
|
41
|
+
objectRef: '',
|
|
42
|
+
})
|
|
43
|
+
calleeConnectionName: string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* 连接器触发器启动器标题
|
|
47
|
+
*/
|
|
48
|
+
@property({
|
|
49
|
+
objectRef: '',
|
|
50
|
+
})
|
|
51
|
+
title: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @param source 需要合并的部分参数
|
|
55
|
+
*/
|
|
56
|
+
constructor(source?: Partial<ConnectorTriggerLauncher>) {
|
|
57
|
+
source = Object.assign({}, ConnectorTriggerLauncher.getDefaultOptions(), source);
|
|
58
|
+
super(source);
|
|
59
|
+
super.subConstructor(source);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static from(source: any, parentNode?: any, parentKey?: string): ConnectorTriggerLauncher {
|
|
63
|
+
return super.from(source, parentNode, parentKey) as ConnectorTriggerLauncher;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 设置calleeConnectionName
|
|
68
|
+
*/
|
|
69
|
+
setCalleeConnectionName(calleeConnectionName: string) {
|
|
70
|
+
const object = {
|
|
71
|
+
calleeConnectionName,
|
|
72
|
+
};
|
|
73
|
+
this.update({
|
|
74
|
+
...object,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* 设置连接器触发器启动器标题
|
|
80
|
+
*/
|
|
81
|
+
setTitle(title: string) {
|
|
82
|
+
const object = {
|
|
83
|
+
title,
|
|
84
|
+
};
|
|
85
|
+
this.update({
|
|
86
|
+
...object,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//================================================================================
|
|
91
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
92
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
93
|
+
//================================================================================
|
|
94
|
+
|
|
95
|
+
get connector() {
|
|
96
|
+
const connectorName = this.calleeNamespace.split('.')?.[1]
|
|
97
|
+
return (this.getAncestor('App') as App)?.connectorDependencies?.find(connector => connector.name === connectorName);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
get connection() {
|
|
101
|
+
return (this.getAncestor('App') as App)?.connections?.find(connection => connection.namespace === this.calleeNamespace && connection.name === (this as ConnectorTriggerLauncher).calleeConnectionName)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
get connectorTrigger() {
|
|
105
|
+
return this.connector?.triggers?.find(trigger => trigger.name === this.calleeName)
|
|
106
|
+
}
|
|
107
|
+
//================================================================================
|
|
108
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
109
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
110
|
+
//================================================================================
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default ConnectorTriggerLauncher;
|
|
114
|
+
//================================================================================
|
|
115
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
116
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
117
|
+
//================================================================================
|
|
@@ -3,6 +3,8 @@ import View from './View__';
|
|
|
3
3
|
import Frontend from './Frontend__';
|
|
4
4
|
import ProcessElement from './ProcessElement__';
|
|
5
5
|
import Process from './Process__';
|
|
6
|
+
import Interface from './Interface__';
|
|
7
|
+
import type InterfaceTriggerEvent from './InterfaceTriggerEvent__';
|
|
6
8
|
//================================================================================
|
|
7
9
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
8
10
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -47,12 +49,12 @@ export class ConnectorTrigger extends BaseNode {
|
|
|
47
49
|
name: string = '';
|
|
48
50
|
|
|
49
51
|
/**
|
|
50
|
-
*
|
|
52
|
+
* 连接器触发器标题
|
|
51
53
|
*/
|
|
52
54
|
@property({
|
|
53
55
|
objectRef: '',
|
|
54
56
|
})
|
|
55
|
-
|
|
57
|
+
title: string = '';
|
|
56
58
|
|
|
57
59
|
/**
|
|
58
60
|
* triggerEvent
|
|
@@ -89,11 +91,11 @@ export class ConnectorTrigger extends BaseNode {
|
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
/**
|
|
92
|
-
*
|
|
94
|
+
* 设置连接器触发器标题
|
|
93
95
|
*/
|
|
94
|
-
|
|
96
|
+
setTitle(title: string) {
|
|
95
97
|
const object = {
|
|
96
|
-
|
|
98
|
+
title,
|
|
97
99
|
};
|
|
98
100
|
this.update({
|
|
99
101
|
...object,
|
|
@@ -150,6 +152,37 @@ export class ConnectorTrigger extends BaseNode {
|
|
|
150
152
|
return this.getAncestor('Process') as Process;
|
|
151
153
|
}
|
|
152
154
|
|
|
155
|
+
delete() {
|
|
156
|
+
let actionMsg = '删除触发器';
|
|
157
|
+
if (this.name) actionMsg += `“${this.name}”`;
|
|
158
|
+
this.app?.emit('collect:start', {
|
|
159
|
+
actionMsg,
|
|
160
|
+
});
|
|
161
|
+
super.delete();
|
|
162
|
+
const { inter } = this.triggerEvent as InterfaceTriggerEvent;
|
|
163
|
+
if (inter) {
|
|
164
|
+
(inter as Interface).deleteInterface();
|
|
165
|
+
}
|
|
166
|
+
// (this.triggerEvent as InterfaceTriggerEvent).inter.deleteInterface()
|
|
167
|
+
// this.traverseChildren(async (el) => {
|
|
168
|
+
// if (el?.concept === 'CallQueryComponent') (el as CallQueryComponent).removeStructure();
|
|
169
|
+
// // 仅仅针对 自定义连接器下的 Loigc,其他需要界定边界
|
|
170
|
+
// const connector: Connector | null = el?.getAncestor?.('Connector') as Connector;
|
|
171
|
+
// if (['CallAuthInterface', 'CallInterface'].includes(el?.concept) && connector) {
|
|
172
|
+
// const { calleeName } = el as CallInterface;
|
|
173
|
+
// const targetInterface = connector.interfaces.find((i) => i.name === calleeName) as Interface;
|
|
174
|
+
// if (targetInterface) {
|
|
175
|
+
// const refs = await (this.app as any)?.naslServer?._isHaveRef(targetInterface);
|
|
176
|
+
// // 如果只有两个引用,则必然为自身以及当前logic引用,需要删除此接口
|
|
177
|
+
// if (refs?.length <= 2) {
|
|
178
|
+
// targetInterface.deleteInterface();
|
|
179
|
+
// }
|
|
180
|
+
// }
|
|
181
|
+
// }
|
|
182
|
+
// });
|
|
183
|
+
this.app?.emit('collect:end');
|
|
184
|
+
}
|
|
185
|
+
|
|
153
186
|
//================================================================================
|
|
154
187
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
155
188
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -1231,6 +1231,12 @@ export class Connector extends Module {
|
|
|
1231
1231
|
return utils.unique(name, this.getNamespaceExistingTitles(), undefined, false);
|
|
1232
1232
|
}
|
|
1233
1233
|
|
|
1234
|
+
// ================ 为解决循环引用而将之前的自动生成代码移动到这里 END =================
|
|
1235
|
+
|
|
1236
|
+
// 获取连接器的命名空间前缀
|
|
1237
|
+
get getNamespacePrefix() {
|
|
1238
|
+
return `connector.${this.name}.`;
|
|
1239
|
+
}
|
|
1234
1240
|
//================================================================================
|
|
1235
1241
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
1236
1242
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
package/src/concepts/End__.ts
CHANGED
|
@@ -289,6 +289,12 @@ export class Integration extends BaseNode {
|
|
|
289
289
|
};
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
+
getConnectorExistingTitles(excludedList: Array<Connector> = []) {
|
|
293
|
+
const excludedSet = new Set(excludedList);
|
|
294
|
+
return ((this.connectors as Connector[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.title);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
|
|
292
298
|
//================================================================================
|
|
293
299
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
294
300
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//================================================================================
|
|
2
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
3
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
4
|
+
//================================================================================
|
|
5
|
+
import { EventPayload, Params } from '../common/EventEmitter';
|
|
6
|
+
import { concept, excludedInJSON, property, getConceptConstructor } from '../decorators';
|
|
7
|
+
|
|
8
|
+
import * as utils from '../utils';
|
|
9
|
+
import * as types from './utils/types';
|
|
10
|
+
import * as asserts from './utils/asserts';
|
|
11
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
12
|
+
|
|
13
|
+
import AbstractInterface from './AbstractInterface__';
|
|
14
|
+
import TriggerEvent from './TriggerEvent__';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* 触发器api回调事件
|
|
18
|
+
*/
|
|
19
|
+
@concept('触发器api回调事件')
|
|
20
|
+
export class InterfaceTriggerEvent extends TriggerEvent {
|
|
21
|
+
/** 类名 */
|
|
22
|
+
static readonly ConceptName: string = 'InterfaceTriggerEvent';
|
|
23
|
+
/**
|
|
24
|
+
* 是否为抽象类
|
|
25
|
+
* 抽象类不能产生 concept: string
|
|
26
|
+
*/
|
|
27
|
+
static isAbstract: boolean = false;
|
|
28
|
+
/** 继承链 */
|
|
29
|
+
static readonly inheritanceChain: string[] = ['TriggerEvent', 'BaseNode'];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 产品概念
|
|
33
|
+
*/
|
|
34
|
+
@property('concept')
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
readonly concept!: 'InterfaceTriggerEvent';
|
|
37
|
+
/**
|
|
38
|
+
* 开放的接口信息
|
|
39
|
+
*/
|
|
40
|
+
@property({
|
|
41
|
+
objectRef: 'AbstractInterface',
|
|
42
|
+
})
|
|
43
|
+
inter: AbstractInterface;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param source 需要合并的部分参数
|
|
47
|
+
*/
|
|
48
|
+
constructor(source?: Partial<InterfaceTriggerEvent>) {
|
|
49
|
+
source = Object.assign({}, InterfaceTriggerEvent.getDefaultOptions(), source);
|
|
50
|
+
super(source);
|
|
51
|
+
super.subConstructor(source);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static from(source: any, parentNode?: any, parentKey?: string): InterfaceTriggerEvent {
|
|
55
|
+
return super.from(source, parentNode, parentKey) as InterfaceTriggerEvent;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 设置开放的接口信息
|
|
60
|
+
*/
|
|
61
|
+
setInter(inter: AbstractInterface) {
|
|
62
|
+
inter._delete();
|
|
63
|
+
const relationOptions = { parentNode: this, parentKey: 'inter' };
|
|
64
|
+
Object.assign(inter, relationOptions);
|
|
65
|
+
const object = {
|
|
66
|
+
inter,
|
|
67
|
+
};
|
|
68
|
+
this.update({
|
|
69
|
+
...object,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//================================================================================
|
|
74
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
75
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
76
|
+
//================================================================================
|
|
77
|
+
|
|
78
|
+
//================================================================================
|
|
79
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
80
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
81
|
+
//================================================================================
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export default InterfaceTriggerEvent;
|
|
85
|
+
//================================================================================
|
|
86
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
87
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
88
|
+
//================================================================================
|
|
@@ -88,7 +88,7 @@ export class Interface extends ImportedInterface {
|
|
|
88
88
|
@property({
|
|
89
89
|
objectRef: '',
|
|
90
90
|
})
|
|
91
|
-
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
91
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* 接口描述
|
|
@@ -167,7 +167,7 @@ export class Interface extends ImportedInterface {
|
|
|
167
167
|
/**
|
|
168
168
|
* 设置接口方法
|
|
169
169
|
*/
|
|
170
|
-
setMethod(method: 'GET' | 'POST' | 'PUT' | 'DELETE') {
|
|
170
|
+
setMethod(method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH') {
|
|
171
171
|
const object = {
|
|
172
172
|
method,
|
|
173
173
|
};
|
|
@@ -988,8 +988,8 @@ export class Interface extends ImportedInterface {
|
|
|
988
988
|
// 本来 Connector 对应的 Namespace 是 connector,走默认逻辑就成
|
|
989
989
|
// 但是后端在翻译 Connector 下的 Interface 时选择的前缀为 extensions 故这里
|
|
990
990
|
if (this.parentNode?.concept === 'Connector') {
|
|
991
|
-
|
|
992
|
-
return `extensions.${this.parentNode.name}.interfaces`;
|
|
991
|
+
return `connector.${this.parentNode.name}.interfaces`;
|
|
992
|
+
// return `extensions.${this.parentNode.name}.interfaces`;
|
|
993
993
|
}
|
|
994
994
|
if (this.parentNode && (this.parentNode as Namespace).getNamespace) {
|
|
995
995
|
const parentNamespace = (this.parentNode as Namespace).getNamespace();
|
|
@@ -1008,8 +1008,8 @@ export class Interface extends ImportedInterface {
|
|
|
1008
1008
|
// 本来 Connector 对应的 Namespace 是 connector,走默认逻辑就成
|
|
1009
1009
|
// 但是后端在翻译 Connector 下的 Interface 时选择的前缀为 extensions 故这里需要强行改成 extensions
|
|
1010
1010
|
if (this.parentNode?.concept === 'Connector') {
|
|
1011
|
-
|
|
1012
|
-
return `extensions.${this.parentNode.tsName}.interfaces`;
|
|
1011
|
+
return `connector.${this.parentNode.tsName}.interfaces`;
|
|
1012
|
+
// return `extensions.${this.parentNode.tsName}.interfaces`;
|
|
1013
1013
|
}
|
|
1014
1014
|
if (this.parentNode && (this.parentNode as Namespace).getTsNamespace) {
|
|
1015
1015
|
const parentNamespace = (this.parentNode as Namespace).getTsNamespace();
|
|
@@ -1062,8 +1062,9 @@ export class Interface extends ImportedInterface {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
|
|
1064
1064
|
deleteRefStructures(includeNameList?: string[]) {
|
|
1065
|
-
|
|
1066
|
-
|
|
1065
|
+
const connector = this.getAncestor('Connector') as Connector;
|
|
1066
|
+
if (connector) {
|
|
1067
|
+
const module = connector;
|
|
1067
1068
|
const oldStructuresSet = this.getRefStructures(module.structures, includeNameList);
|
|
1068
1069
|
oldStructuresSet.forEach((s: Structure) => s.delete());
|
|
1069
1070
|
}
|
|
@@ -21,6 +21,7 @@ import Logic from './Logic__';
|
|
|
21
21
|
import Connector from './Connector__';
|
|
22
22
|
import AuthLogic from './AuthLogic__';
|
|
23
23
|
import AuthLogicForCallInterface from './AuthLogicForCallInterface__';
|
|
24
|
+
import type ConnectorLogic from './ConnectorLogic__';
|
|
24
25
|
//================================================================================
|
|
25
26
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
26
27
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -272,6 +273,12 @@ export abstract class LogicItem extends BaseNode {
|
|
|
272
273
|
get AuthLogicForCallInterface() {
|
|
273
274
|
return this.getAncestor('AuthLogicForCallInterface') as AuthLogicForCallInterface;
|
|
274
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* 祖先 ConnectorLogic
|
|
278
|
+
*/
|
|
279
|
+
get ConnectorLogic() {
|
|
280
|
+
return this.getAncestor('ConnectorLogic') as ConnectorLogic;
|
|
281
|
+
}
|
|
275
282
|
|
|
276
283
|
get completeName() {
|
|
277
284
|
return this.name;
|
|
@@ -373,7 +380,7 @@ export abstract class LogicItem extends BaseNode {
|
|
|
373
380
|
delete() {
|
|
374
381
|
let actionMsg = '删除逻辑项';
|
|
375
382
|
if (this.name) actionMsg += `“${this.name}”`;
|
|
376
|
-
this.app?.emit('collect:start', {
|
|
383
|
+
this.app?.emit?.('collect:start', {
|
|
377
384
|
actionMsg,
|
|
378
385
|
});
|
|
379
386
|
super.delete();
|
package/src/concepts/Logic__.ts
CHANGED
|
@@ -83,7 +83,7 @@ export class Logic extends BaseNode {
|
|
|
83
83
|
*/
|
|
84
84
|
@property('concept')
|
|
85
85
|
// @ts-ignore
|
|
86
|
-
readonly concept!: 'Logic' | 'AuthLogic' | 'AuthLogicForCallInterface' | 'BusinessLogic';
|
|
86
|
+
readonly concept!: 'Logic' | 'AuthLogic' | 'AuthLogicForCallInterface' | 'BusinessLogic' | 'ConnectorLogic';
|
|
87
87
|
/**
|
|
88
88
|
* 逻辑名称
|
|
89
89
|
*/
|
|
@@ -1690,6 +1690,7 @@ export class Logic extends BaseNode {
|
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
1692
|
});
|
|
1693
|
+
|
|
1693
1694
|
// 兼容 return 没有类型情况
|
|
1694
1695
|
if (self.returns.length && self.returns[0].typeAnnotation) {
|
|
1695
1696
|
code += ': ';
|
|
@@ -1697,10 +1698,10 @@ export class Logic extends BaseNode {
|
|
|
1697
1698
|
returnOrigin('');
|
|
1698
1699
|
}
|
|
1699
1700
|
code += '{\n';
|
|
1700
|
-
if (self.exportInterface) {
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
}
|
|
1701
|
+
// if (self.exportInterface) {
|
|
1702
|
+
// code += indent((state?.tabSize || 0) + 1);
|
|
1703
|
+
// code += `let exportInterface = app.interfaces.${self.exportInterface.name};\n`
|
|
1704
|
+
// }
|
|
1704
1705
|
// 用于虚拟节点的查找引用
|
|
1705
1706
|
if (Array.isArray(self.virtualParams)) {
|
|
1706
1707
|
for (const param of self.virtualParams) {
|
package/src/concepts/Module__.ts
CHANGED
|
@@ -3,8 +3,9 @@ const moduleNameSpace = {
|
|
|
3
3
|
dependencies: 'extensions',
|
|
4
4
|
interfaceDependencies: 'apis',
|
|
5
5
|
componentDependencies: 'components',
|
|
6
|
+
connectorDependencies: 'connector',
|
|
6
7
|
};
|
|
7
|
-
type ModuleKeyType = 'dependencies' | 'interfaceDependencies' | 'componentDependencies';
|
|
8
|
+
type ModuleKeyType = 'dependencies' | 'interfaceDependencies' | 'componentDependencies' | 'connectorDependencies';
|
|
8
9
|
import type { AuthInterface } from './AuthInterface__';
|
|
9
10
|
import type ConfigProperty from './ConfigProperty__';
|
|
10
11
|
import type Interface from './Interface__';
|
|
@@ -12,13 +12,13 @@ import * as types from './utils/types';
|
|
|
12
12
|
import * as asserts from './utils/asserts';
|
|
13
13
|
|
|
14
14
|
import Argument from './Argument__';
|
|
15
|
-
import
|
|
15
|
+
import ConnectorTriggerLauncher from './ConnectorTriggerLauncher__';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* 触发器启动器消息
|
|
19
19
|
*/
|
|
20
20
|
@concept('触发器启动器消息')
|
|
21
|
-
export class MsgTriggerLauncher extends
|
|
21
|
+
export class MsgTriggerLauncher extends ConnectorTriggerLauncher {
|
|
22
22
|
/** 类名 */
|
|
23
23
|
static readonly ConceptName: string = 'MsgTriggerLauncher';
|
|
24
24
|
/**
|
|
@@ -27,7 +27,7 @@ export class MsgTriggerLauncher extends TriggerLauncher {
|
|
|
27
27
|
*/
|
|
28
28
|
static isAbstract: boolean = false;
|
|
29
29
|
/** 继承链 */
|
|
30
|
-
static readonly inheritanceChain: string[] = ['TriggerLauncher', 'BaseNode'];
|
|
30
|
+
static readonly inheritanceChain: string[] = ['ConnectorTriggerLauncher', 'TriggerLauncher', 'BaseNode'];
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* 产品概念
|
|
@@ -45,14 +45,6 @@ export class MsgTriggerLauncher extends TriggerLauncher {
|
|
|
45
45
|
})
|
|
46
46
|
properties: Array<Argument> = [];
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* calleeConnectionName
|
|
50
|
-
*/
|
|
51
|
-
@property({
|
|
52
|
-
objectRef: '',
|
|
53
|
-
})
|
|
54
|
-
calleeConnectionName: string;
|
|
55
|
-
|
|
56
48
|
/**
|
|
57
49
|
* @param source 需要合并的部分参数
|
|
58
50
|
*/
|
|
@@ -78,18 +70,6 @@ export class MsgTriggerLauncher extends TriggerLauncher {
|
|
|
78
70
|
});
|
|
79
71
|
}
|
|
80
72
|
|
|
81
|
-
/**
|
|
82
|
-
* 设置calleeConnectionName
|
|
83
|
-
*/
|
|
84
|
-
setCalleeConnectionName(calleeConnectionName: string) {
|
|
85
|
-
const object = {
|
|
86
|
-
calleeConnectionName,
|
|
87
|
-
};
|
|
88
|
-
this.update({
|
|
89
|
-
...object,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
73
|
getArgumentExistingNames(excludedList: Array<Argument> = []) {
|
|
94
74
|
const excludedSet = new Set(excludedList);
|
|
95
75
|
return ((this.properties as Argument[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
@@ -280,6 +260,10 @@ export class MsgTriggerLauncher extends TriggerLauncher {
|
|
|
280
260
|
return this.getAncestor('Module') as Module;
|
|
281
261
|
}
|
|
282
262
|
|
|
263
|
+
get connection() {
|
|
264
|
+
return this.rootNode?.connections?.find((item) => item.name === this.calleeConnectionName);
|
|
265
|
+
}
|
|
266
|
+
|
|
283
267
|
//================================================================================
|
|
284
268
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
285
269
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -316,23 +316,24 @@ export class OqlQueryComponent extends LogicItem {
|
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
return http
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
319
|
+
return http
|
|
320
|
+
.post('/api/v1/querydebug/generate/typescript', {
|
|
321
|
+
appId: 'myAppId',
|
|
322
|
+
oqlIdentifier: 'myoqlIdentifier',
|
|
323
|
+
dataSourceName: this.dataSource,
|
|
324
|
+
oql: this.code,
|
|
325
|
+
ideVersion: this.app.ideVersion,
|
|
326
|
+
dataSourceNasl,
|
|
327
|
+
typeScriptStartLine: 1,
|
|
328
|
+
typeScriptStartLineColumn: 1,
|
|
329
|
+
})
|
|
330
|
+
.then(({ data }: any) => {
|
|
331
|
+
this.codeSourceMap = data.result ?? { typescript: '', lexicalErrorCode: 1001 };
|
|
332
|
+
})
|
|
333
|
+
.catch((err) => {
|
|
334
|
+
logger.error('Oql 请求失败', err.toString());
|
|
335
|
+
this.codeSourceMap = { typescript: '', lexicalErrorCode: 1001 };
|
|
336
|
+
});
|
|
336
337
|
}
|
|
337
338
|
this.codeSourceMap = { typescript: '', lexicalErrorCode: 1001 };
|
|
338
339
|
}
|
package/src/concepts/Param__.ts
CHANGED
|
@@ -451,7 +451,9 @@ export class Param extends BaseNode {
|
|
|
451
451
|
* 是否可编辑
|
|
452
452
|
* */
|
|
453
453
|
get readonly() {
|
|
454
|
-
|
|
454
|
+
// 由于 getAncestor 方法的更新,导致conenctor 节点也会 在this.module 里面,
|
|
455
|
+
// 所以需要加上connector的判断
|
|
456
|
+
return (!!this.module && !this.connector) || this._readonly;
|
|
455
457
|
}
|
|
456
458
|
|
|
457
459
|
set readonly(val) {
|
|
@@ -609,8 +609,8 @@ export class Structure extends BaseNode {
|
|
|
609
609
|
// 本来 Connector 对应的 Namespace 是 connector,走默认逻辑就成
|
|
610
610
|
// 但是后端在翻译 Connector 下的 Interface 时选择的前缀为 extensions 故这里需要强行改成 extensions
|
|
611
611
|
if (this.parentNode?.concept === 'Connector') {
|
|
612
|
-
|
|
613
|
-
return `extensions.${this.parentNode.name}.structures`;
|
|
612
|
+
return `connector.${this.parentNode.name}.structures`;
|
|
613
|
+
// return `extensions.${this.parentNode.name}.structures`;
|
|
614
614
|
}
|
|
615
615
|
if (this.parentNode && (this.parentNode as Namespace).getNamespace) {
|
|
616
616
|
const parentNamespace = (this.parentNode as Namespace).getNamespace();
|
|
@@ -629,8 +629,8 @@ export class Structure extends BaseNode {
|
|
|
629
629
|
// 本来 Connector 对应的 Namespace 是 connector,走默认逻辑就成
|
|
630
630
|
// 但是后端在翻译 Connector 下的 Interface 时选择的前缀为 extensions 故这里需要强行改成 extensions
|
|
631
631
|
if (this.parentNode?.concept === 'Connector') {
|
|
632
|
-
|
|
633
|
-
return `extensions.${this.parentNode.tsName}.structures`;
|
|
632
|
+
return `connector.${this.parentNode.tsName}.structures`;
|
|
633
|
+
// return `extensions.${this.parentNode.tsName}.structures`;
|
|
634
634
|
}
|
|
635
635
|
if (this.parentNode && (this.parentNode as Namespace).getTsNamespace) {
|
|
636
636
|
const parentNamespace = (this.parentNode as Namespace).getTsNamespace();
|
|
@@ -16,14 +16,14 @@ import TypeAnnotation from './TypeAnnotation__';
|
|
|
16
16
|
* 触发器事件
|
|
17
17
|
*/
|
|
18
18
|
@concept('触发器事件')
|
|
19
|
-
export class TriggerEvent extends BaseNode {
|
|
19
|
+
export abstract class TriggerEvent extends BaseNode {
|
|
20
20
|
/** 类名 */
|
|
21
21
|
static readonly ConceptName: string = 'TriggerEvent';
|
|
22
22
|
/**
|
|
23
23
|
* 是否为抽象类
|
|
24
24
|
* 抽象类不能产生 concept: string
|
|
25
25
|
*/
|
|
26
|
-
static isAbstract: boolean =
|
|
26
|
+
static isAbstract: boolean = true;
|
|
27
27
|
/** 继承链 */
|
|
28
28
|
static readonly inheritanceChain: string[] = ['BaseNode'];
|
|
29
29
|
|
|
@@ -32,7 +32,7 @@ export class TriggerEvent extends BaseNode {
|
|
|
32
32
|
*/
|
|
33
33
|
@property('concept')
|
|
34
34
|
// @ts-ignore
|
|
35
|
-
readonly concept!: '
|
|
35
|
+
readonly concept!: 'MsgTriggerEvent' | 'InterfaceTriggerEvent';
|
|
36
36
|
/**
|
|
37
37
|
* 触发器事件名称
|
|
38
38
|
*/
|