@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
package/src/concepts/App__.ts
CHANGED
|
@@ -9,6 +9,8 @@ import type Frontend from './Frontend__';
|
|
|
9
9
|
import type { NaslServer } from '../server/naslServer';
|
|
10
10
|
import { CUSTOM_CONNECTOR_EDITABLE_SUFFIX } from './basics/constants';
|
|
11
11
|
|
|
12
|
+
// import CallLogic from './CallLogic__';
|
|
13
|
+
|
|
12
14
|
export interface AssetsInfo {
|
|
13
15
|
js: Array<string>;
|
|
14
16
|
css: Array<string>;
|
|
@@ -285,11 +287,21 @@ export class App extends BaseNode {
|
|
|
285
287
|
* 扩展模块列表
|
|
286
288
|
*/
|
|
287
289
|
@property({
|
|
288
|
-
objectRef: 'Module
|
|
290
|
+
objectRef: 'Module',
|
|
291
|
+
isArray: true,
|
|
292
|
+
defaultValue: [],
|
|
293
|
+
})
|
|
294
|
+
dependencies: Array<Module> = [];
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* 连接器列表
|
|
298
|
+
*/
|
|
299
|
+
@property({
|
|
300
|
+
objectRef: 'Connector',
|
|
289
301
|
isArray: true,
|
|
290
302
|
defaultValue: [],
|
|
291
303
|
})
|
|
292
|
-
|
|
304
|
+
connectorDependencies: Array<Connector> = [];
|
|
293
305
|
|
|
294
306
|
/**
|
|
295
307
|
* 集成
|
|
@@ -2069,7 +2081,9 @@ export class App extends BaseNode {
|
|
|
2069
2081
|
|
|
2070
2082
|
getConnectorExistingNames(excludedList: Array<Connector> = []) {
|
|
2071
2083
|
const excludedSet = new Set(excludedList);
|
|
2072
|
-
return ((this.
|
|
2084
|
+
return ((this.connectorDependencies as Connector[]) || [])
|
|
2085
|
+
.filter((item) => !excludedSet.has(item))
|
|
2086
|
+
.map((item) => item.name);
|
|
2073
2087
|
}
|
|
2074
2088
|
getConnectorUniqueName(name = 'connector1') {
|
|
2075
2089
|
return utils.unique(name, this.getConnectorExistingNames(), undefined, false);
|
|
@@ -2098,7 +2112,7 @@ export class App extends BaseNode {
|
|
|
2098
2112
|
|
|
2099
2113
|
_insertConnectorAt(options: string | Partial<Connector> | Connector, index: number) {
|
|
2100
2114
|
const connectorOptions: any = {};
|
|
2101
|
-
const relationOptions = { parentNode: this, parentKey: '
|
|
2115
|
+
const relationOptions = { parentNode: this, parentKey: 'connectorDependencies' };
|
|
2102
2116
|
const Connector = getConceptConstructor('Connector');
|
|
2103
2117
|
let connector: Connector;
|
|
2104
2118
|
if (!options) {
|
|
@@ -2108,7 +2122,7 @@ export class App extends BaseNode {
|
|
|
2108
2122
|
name: this.getConnectorUniqueName(),
|
|
2109
2123
|
},
|
|
2110
2124
|
this,
|
|
2111
|
-
'
|
|
2125
|
+
'connectorDependencies',
|
|
2112
2126
|
);
|
|
2113
2127
|
} else if (typeof options === 'string') {
|
|
2114
2128
|
connector = Connector.from(
|
|
@@ -2117,7 +2131,7 @@ export class App extends BaseNode {
|
|
|
2117
2131
|
name: options,
|
|
2118
2132
|
},
|
|
2119
2133
|
this,
|
|
2120
|
-
'
|
|
2134
|
+
'connectorDependencies',
|
|
2121
2135
|
);
|
|
2122
2136
|
} else if (asserts.isConnector(options)) {
|
|
2123
2137
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
@@ -2130,10 +2144,10 @@ export class App extends BaseNode {
|
|
|
2130
2144
|
...options,
|
|
2131
2145
|
},
|
|
2132
2146
|
this,
|
|
2133
|
-
'
|
|
2147
|
+
'connectorDependencies',
|
|
2134
2148
|
);
|
|
2135
2149
|
}
|
|
2136
|
-
this.
|
|
2150
|
+
this.connectorDependencies.splice(index, 0, connector);
|
|
2137
2151
|
return connector;
|
|
2138
2152
|
}
|
|
2139
2153
|
|
|
@@ -2160,7 +2174,7 @@ export class App extends BaseNode {
|
|
|
2160
2174
|
node.create({
|
|
2161
2175
|
index,
|
|
2162
2176
|
parentNode: this,
|
|
2163
|
-
parentKey: '
|
|
2177
|
+
parentKey: 'connectorDependencies',
|
|
2164
2178
|
});
|
|
2165
2179
|
return node;
|
|
2166
2180
|
}
|
|
@@ -2187,7 +2201,7 @@ export class App extends BaseNode {
|
|
|
2187
2201
|
_addConnector(connector: Connector): Connector;
|
|
2188
2202
|
|
|
2189
2203
|
_addConnector(options?: string | Partial<Connector> | Connector) {
|
|
2190
|
-
const index = this.
|
|
2204
|
+
const index = this.connectorDependencies.length;
|
|
2191
2205
|
return this._insertConnectorAt(options as any, index);
|
|
2192
2206
|
}
|
|
2193
2207
|
|
|
@@ -2212,11 +2226,11 @@ export class App extends BaseNode {
|
|
|
2212
2226
|
|
|
2213
2227
|
addConnector(options?: string | Partial<Connector> | Connector) {
|
|
2214
2228
|
const node = this._addConnector(options as any);
|
|
2215
|
-
const index = this.
|
|
2229
|
+
const index = this.connectorDependencies.indexOf(node);
|
|
2216
2230
|
node.create({
|
|
2217
2231
|
index,
|
|
2218
2232
|
parentNode: this,
|
|
2219
|
-
parentKey: '
|
|
2233
|
+
parentKey: 'connectorDependencies',
|
|
2220
2234
|
});
|
|
2221
2235
|
return node;
|
|
2222
2236
|
}
|
|
@@ -3309,7 +3323,7 @@ export class App extends BaseNode {
|
|
|
3309
3323
|
removeConnector(options: string | Connector) {
|
|
3310
3324
|
let connector: Connector;
|
|
3311
3325
|
if (typeof options === 'string') {
|
|
3312
|
-
connector = (this.
|
|
3326
|
+
connector = (this.connectorDependencies as Connector[]).find((item) => item.name === options);
|
|
3313
3327
|
if (!connector) {
|
|
3314
3328
|
throw new Error('找不到连接器 ' + options);
|
|
3315
3329
|
}
|
|
@@ -3558,7 +3572,6 @@ export class App extends BaseNode {
|
|
|
3558
3572
|
|
|
3559
3573
|
return isEmpty(this.composeCache);
|
|
3560
3574
|
}
|
|
3561
|
-
|
|
3562
3575
|
/**
|
|
3563
3576
|
* 获取组合节点
|
|
3564
3577
|
*/
|
|
@@ -3761,9 +3774,9 @@ export class App extends BaseNode {
|
|
|
3761
3774
|
let completeName = originCompleteName;
|
|
3762
3775
|
// 是否是来自编辑态的自定义连接器
|
|
3763
3776
|
const isFromEditableConnector = completeName?.endsWith(CUSTOM_CONNECTOR_EDITABLE_SUFFIX);
|
|
3777
|
+
// 如果是自定义连接器,需要去掉后缀才能查找到符合预期的节点
|
|
3764
3778
|
if (isFromEditableConnector) {
|
|
3765
|
-
|
|
3766
|
-
completeName = completeName.replace(CUSTOM_CONNECTOR_EDITABLE_SUFFIX, '');
|
|
3779
|
+
completeName = originCompleteName.replace(CUSTOM_CONNECTOR_EDITABLE_SUFFIX, '');
|
|
3767
3780
|
}
|
|
3768
3781
|
const nameArr = completeName?.split('.') || [];
|
|
3769
3782
|
let node: any = this;
|
|
@@ -3779,6 +3792,9 @@ export class App extends BaseNode {
|
|
|
3779
3792
|
extensions: [...(node?.dependencies || []), ...(node?.integration?.connectors || [])],
|
|
3780
3793
|
apis: node.interfaceDependencies,
|
|
3781
3794
|
components: node.componentDependencies,
|
|
3795
|
+
// v3.6 版本引入自定义连接器,前缀统一更新为 conenctor
|
|
3796
|
+
// 在配置自定义连接器时需要同步支持内部数据结构使用,所以这里做扩展
|
|
3797
|
+
connector: [...node.connectorDependencies, ...(node?.integration?.connectors || [])],
|
|
3782
3798
|
};
|
|
3783
3799
|
const modules = modulesMap[start];
|
|
3784
3800
|
if (Array.isArray(modules)) {
|
|
@@ -4261,9 +4277,9 @@ export class App extends BaseNode {
|
|
|
4261
4277
|
}
|
|
4262
4278
|
|
|
4263
4279
|
/** 获取已经存在的Module title */
|
|
4264
|
-
|
|
4280
|
+
getConnectorExistingTitles(excludedList: Array<Module> = []) {
|
|
4265
4281
|
const excludedSet = new Set(excludedList);
|
|
4266
|
-
return ((this.
|
|
4282
|
+
return ((this.connectorDependencies as Module[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.title);
|
|
4267
4283
|
}
|
|
4268
4284
|
|
|
4269
4285
|
/** hank */
|
|
@@ -193,6 +193,12 @@ export class Argument extends LogicItem {
|
|
|
193
193
|
if (isHaveKeyWord) {
|
|
194
194
|
code += `${self.tsKeyword}:`;
|
|
195
195
|
}
|
|
196
|
+
// 连接器下的鉴权鉴权参数不需要翻译对应的鉴权参数
|
|
197
|
+
if (self.connector && self.parentKey === 'authArguments') {
|
|
198
|
+
code += 'null';
|
|
199
|
+
return code;
|
|
200
|
+
}
|
|
201
|
+
|
|
196
202
|
if (self.expression) {
|
|
197
203
|
if ((self.expression as StringLiteral).name === 'ListDistinctByTargetDefaultExpression') {
|
|
198
204
|
code += yield* (self.expression as NewList).toEmbeddedIgnoreTS(shiftState(state, code));
|
|
@@ -25,6 +25,7 @@ import type Return from './Return__';
|
|
|
25
25
|
import type Variable from './Variable__';
|
|
26
26
|
import type TypeParam from './TypeParam__';
|
|
27
27
|
import type TypeAnnotation from './TypeAnnotation__';
|
|
28
|
+
import { CUSTOM_CONNECTOR_EDITABLE_SUFFIX } from './basics/constants';
|
|
28
29
|
|
|
29
30
|
//================================================================================
|
|
30
31
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -268,6 +269,14 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
268
269
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
269
270
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
270
271
|
//================================================================================
|
|
272
|
+
get tsName() {
|
|
273
|
+
// 来自集成中心,且是连接内部的逻辑,则认为是编辑态的,需要加上后缀
|
|
274
|
+
if (this.connector && this.integration) {
|
|
275
|
+
return `${this.name}${CUSTOM_CONNECTOR_EDITABLE_SUFFIX}`;
|
|
276
|
+
}
|
|
277
|
+
// 由于Logic name 已经是符合函数预期的,因此不再需要做格式化
|
|
278
|
+
return this.name;
|
|
279
|
+
}
|
|
271
280
|
|
|
272
281
|
@withSourceMapGenerator
|
|
273
282
|
*toEmbeddedTS(state = createCompilerState(), prefix?: string): TranslatorGenerator {
|
|
@@ -281,11 +290,11 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
281
290
|
let code = '';
|
|
282
291
|
if (!prefix) {
|
|
283
292
|
// T、U分别用来定义 api 入参和返回值
|
|
284
|
-
code += `export function ${self.
|
|
293
|
+
code += `export function ${self.tsName}`;
|
|
285
294
|
} else if (prefix === 'noExport') {
|
|
286
|
-
code += `function ${self.
|
|
295
|
+
code += `function ${self.tsName}`;
|
|
287
296
|
} else if (prefix === 'inObject') {
|
|
288
|
-
code += `${self.
|
|
297
|
+
code += `${self.tsName}`;
|
|
289
298
|
}
|
|
290
299
|
const typeParams = [
|
|
291
300
|
...(self.typeParams || []),
|
|
@@ -307,6 +316,8 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
307
316
|
code += '>';
|
|
308
317
|
}
|
|
309
318
|
// 有参数长度 && 鉴权参数
|
|
319
|
+
// 连接器下的鉴权参数不展示,因此如果在连接器下时,不需要翻译鉴权参数
|
|
320
|
+
// if (self.authParams.length && !self.connector) {
|
|
310
321
|
if (self.authParams.length) {
|
|
311
322
|
// const params = [...this.authParams, ...this.params];
|
|
312
323
|
const params = [...self.authParams];
|
|
@@ -325,7 +336,7 @@ export class AuthLogicForCallInterface extends AuthLogic {
|
|
|
325
336
|
if (index === 0) {
|
|
326
337
|
code += '{';
|
|
327
338
|
}
|
|
328
|
-
code += yield* param.toEmbeddedTS(shiftState(state, code), !param.required);
|
|
339
|
+
code += yield* param.toEmbeddedTS(shiftState(state, code), false, !param.required);
|
|
329
340
|
if (index !== params.length - 1) {
|
|
330
341
|
code += ', ';
|
|
331
342
|
} else {
|
|
@@ -13,6 +13,8 @@ import { getNodeByNodeCallee } from '../automate/engine/utils.js';
|
|
|
13
13
|
import type AuthLogicForCallInterface from './AuthLogicForCallInterface__';
|
|
14
14
|
import type AuthInterface from './AuthInterface__';
|
|
15
15
|
import { CUSTOM_CONNECTOR_EDITABLE_SUFFIX } from './basics/constants';
|
|
16
|
+
import type App from './App__';
|
|
17
|
+
import type Connector from './Connector__';
|
|
16
18
|
|
|
17
19
|
//================================================================================
|
|
18
20
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
@@ -257,6 +259,16 @@ export class CallAuthInterface extends CallInterface {
|
|
|
257
259
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
258
260
|
//================================================================================
|
|
259
261
|
|
|
262
|
+
toBrief(): string {
|
|
263
|
+
if (this.integration && this.connector) {
|
|
264
|
+
// 编辑态的连接器调用接口还需要展示具体的鉴权方式
|
|
265
|
+
const node = this.getCallNode(); // AuthInterface
|
|
266
|
+
const authLogic = node?.authLogic;
|
|
267
|
+
return `${super.toBrief()}<br /> <span style="color: #AAAAAA">鉴权方式 = </span><span style="color: #FFFFFF">${authLogic}</span>`;
|
|
268
|
+
}
|
|
269
|
+
return super.toBrief();
|
|
270
|
+
}
|
|
271
|
+
|
|
260
272
|
/**
|
|
261
273
|
*删除所有的 Argument
|
|
262
274
|
*/
|
|
@@ -421,7 +433,12 @@ export class CallAuthInterface extends CallInterface {
|
|
|
421
433
|
if (!authLogic) {
|
|
422
434
|
return [];
|
|
423
435
|
}
|
|
424
|
-
|
|
436
|
+
let source: App | Connector = this.app;
|
|
437
|
+
if (this.connector) {
|
|
438
|
+
source = this.connector;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
const targetAuthLogic = source.authLogicsForCallInterface.find((logic) => logic.name === authLogic);
|
|
425
442
|
const logicParam: Param[] = targetAuthLogic?.authParams || [];
|
|
426
443
|
const Arguments: Argument[] = [];
|
|
427
444
|
|
|
@@ -15,7 +15,9 @@ import type InterfaceParam from './InterfaceParam__';
|
|
|
15
15
|
import type Structure from './Structure__';
|
|
16
16
|
import type Module from './Module__';
|
|
17
17
|
import type AuthInterface from './AuthInterface__';
|
|
18
|
+
import type ConnectorLogic from './ConnectorLogic__';
|
|
18
19
|
import type { MemberExpression } from './MemberExpression__';
|
|
20
|
+
import type AbstractInterface from './AbstractInterface__';
|
|
19
21
|
import type Frontend from './Frontend__';
|
|
20
22
|
import type Connector from './Connector__';
|
|
21
23
|
import { CUSTOM_CONNECTOR_EDITABLE_SUFFIX } from './basics/constants';
|
|
@@ -230,6 +232,8 @@ export class CallInterface extends LogicItem {
|
|
|
230
232
|
|
|
231
233
|
// 删除调用接口时且接口无引用,删除接口和数据结构
|
|
232
234
|
async deleteCallNode() {
|
|
235
|
+
// 如果是连接器下面,则不需要自动删除,得用户手动删除
|
|
236
|
+
if (this.connector) return;
|
|
233
237
|
if (this.calleeKey !== '__IDENTIFIER__' && !this.__authDelete) {
|
|
234
238
|
(this as any).__deleteCallNodeTimer = setTimeout(async () => {
|
|
235
239
|
clearTimeout((this as any).__deleteCallNodeTimer);
|
|
@@ -343,13 +347,13 @@ export class CallInterface extends LogicItem {
|
|
|
343
347
|
const [, _name, , _interfaceName] = calleewholeKey.split('.');
|
|
344
348
|
let _module: Module | Connector;
|
|
345
349
|
// 由于自定义连接器的引入,目前在 集成中心下也存在着一部分接口
|
|
346
|
-
// 因此,需要额外判断,如果是自定义连接器需要拿 app.
|
|
350
|
+
// 因此,需要额外判断,如果是自定义连接器需要拿 app.connectorDependencies 中的接口或者 app.integration 中connector下面的接口
|
|
347
351
|
const isCustomConnector = this.getAncestor('Connector');
|
|
348
352
|
const isInIntegration = this.getAncestor('Integration');
|
|
349
353
|
if (isCustomConnector && isInIntegration) {
|
|
350
354
|
_module = app?.integration?.connectors?.find?.((item) => item.name === _name);
|
|
351
355
|
} else if (isCustomConnector && !isInIntegration) {
|
|
352
|
-
_module = app?.
|
|
356
|
+
_module = app?.connectorDependencies?.find?.((item) => item.name === _name);
|
|
353
357
|
} else {
|
|
354
358
|
// default
|
|
355
359
|
_module = app?.interfaceDependencies?.find?.((item) => item.name === _name);
|
|
@@ -653,20 +657,27 @@ export class CallInterface extends LogicItem {
|
|
|
653
657
|
let node;
|
|
654
658
|
// 如果是其余app下自定义逻辑
|
|
655
659
|
try {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
660
|
+
// connector 下的需要从当前connector 下获取
|
|
661
|
+
if (this.connector) {
|
|
662
|
+
node = this.connector.interfaces?.find((item) => {
|
|
663
|
+
return this.calleewholeKey.endsWith(item.name);
|
|
664
|
+
});
|
|
665
|
+
} else {
|
|
666
|
+
node = getNodeByNodeCallee(this.app, this.calleewholeKey, (key: any, tempPoint: any) => {
|
|
667
|
+
// 处理 NASL 中未定义的假的节点
|
|
668
|
+
if (key === tempPoint.name) {
|
|
669
|
+
return {
|
|
670
|
+
tempPoint,
|
|
671
|
+
state: 1,
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
const t = tempPoint[key];
|
|
659
675
|
return {
|
|
660
|
-
tempPoint,
|
|
661
|
-
state: 1,
|
|
676
|
+
tempPoint: t,
|
|
677
|
+
state: Array.isArray(t) ? 2 : 1,
|
|
662
678
|
};
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
return {
|
|
666
|
-
tempPoint: t,
|
|
667
|
-
state: Array.isArray(t) ? 2 : 1,
|
|
668
|
-
};
|
|
669
|
-
});
|
|
679
|
+
});
|
|
680
|
+
}
|
|
670
681
|
} catch (err) {}
|
|
671
682
|
return node;
|
|
672
683
|
}
|
|
@@ -715,13 +726,13 @@ export class CallInterface extends LogicItem {
|
|
|
715
726
|
const _interfaceName = _arr[3];
|
|
716
727
|
let _module: Module | Connector;
|
|
717
728
|
// 由于自定义连接器的引入,目前在 集成中心下也存在着一部分接口
|
|
718
|
-
// 因此,需要额外判断,如果是自定义连接器需要拿 app.
|
|
729
|
+
// 因此,需要额外判断,如果是自定义连接器需要拿 app.connectorDependencies 中的接口或者 app.integration 中connector下面的接口
|
|
719
730
|
const isCustomConnector = this.getAncestor('Connector');
|
|
720
731
|
const isInIntegration = this.getAncestor('Integration');
|
|
721
732
|
if (isCustomConnector && isInIntegration) {
|
|
722
733
|
_module = this.app?.integration?.connectors?.find?.((item) => item.name === _name);
|
|
723
734
|
} else if (isCustomConnector && !isInIntegration) {
|
|
724
|
-
_module = this.app?.
|
|
735
|
+
_module = this.app?.connectorDependencies?.find?.((item) => item.name === _name);
|
|
725
736
|
} else {
|
|
726
737
|
// default
|
|
727
738
|
_module = this.app.interfaceDependencies.find((item) => item.name === _name);
|
|
@@ -733,8 +744,102 @@ export class CallInterface extends LogicItem {
|
|
|
733
744
|
};
|
|
734
745
|
}
|
|
735
746
|
|
|
747
|
+
reNameInterface(
|
|
748
|
+
itfData: Partial<AbstractInterface>,
|
|
749
|
+
newName: string,
|
|
750
|
+
structureNameMap: Map<string, string>,
|
|
751
|
+
): Partial<AbstractInterface> {
|
|
752
|
+
itfData.name = newName;
|
|
753
|
+
// 全量更新参数引用数据结构名
|
|
754
|
+
// 结构体重命名
|
|
755
|
+
utils.traverse(
|
|
756
|
+
({ node }: { node: any }) => {
|
|
757
|
+
if (node?.concept === 'TypeAnnotation' && node?.typeKind === 'reference') {
|
|
758
|
+
// typeNamespace 全部统一为当前的连接器
|
|
759
|
+
node.typeNamespace = `connector.${this.connector.name}.structures`;
|
|
760
|
+
node.typeName = structureNameMap.get(node.typeName) || node.typeName;
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
{ node: itfData },
|
|
764
|
+
{
|
|
765
|
+
mode: 'anyObject',
|
|
766
|
+
excludedKeySet: new Set(['parentNode', '_events', 'globalDataMap', 'havingPlayground', 'wherePlayground']),
|
|
767
|
+
},
|
|
768
|
+
);
|
|
769
|
+
return itfData;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// 重新命名数据结构
|
|
773
|
+
reNameStructureAndRetureNamesMap(structuresData: Partial<Structure>[], moduleName: string): Map<string, string> {
|
|
774
|
+
const nameMap = new Map<string, string>();
|
|
775
|
+
structuresData.forEach((structureData) => {
|
|
776
|
+
const { name } = structureData;
|
|
777
|
+
const newName = this.connector.getStructureUniqueName(`${moduleName}__${name}`);
|
|
778
|
+
structureData.name = newName;
|
|
779
|
+
nameMap.set(name, newName);
|
|
780
|
+
});
|
|
781
|
+
structuresData.forEach((structureData) => {
|
|
782
|
+
// 结构体重命名
|
|
783
|
+
utils.traverse(
|
|
784
|
+
({ node }: { node: any }) => {
|
|
785
|
+
if (node?.concept === 'TypeAnnotation' && node?.typeKind === 'reference') {
|
|
786
|
+
// typeNamespace 全部统一为当前的连接器
|
|
787
|
+
node.typeNamespace = `connector.${this.connector.name}.structures`;
|
|
788
|
+
node.typeName = nameMap.get(node.typeName) || node.typeName;
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
{ node: structureData },
|
|
792
|
+
{
|
|
793
|
+
mode: 'anyObject',
|
|
794
|
+
excludedKeySet: new Set(['parentNode', '_events', 'globalDataMap', 'havingPlayground', 'wherePlayground']),
|
|
795
|
+
},
|
|
796
|
+
);
|
|
797
|
+
});
|
|
798
|
+
return nameMap;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// 导入接口到连接器
|
|
802
|
+
createInterfaceInConnector({ moduleData, selectedModule }: { moduleData: Partial<Module>; selectedModule: any }) {
|
|
803
|
+
if (!this.connector) return;
|
|
804
|
+
const modelName = moduleData.name;
|
|
805
|
+
const itfData = moduleData.interfaces[0] as unknown as Partial<Interface>;
|
|
806
|
+
const structurseData = moduleData.structures;
|
|
807
|
+
const structureNameMap = this.reNameStructureAndRetureNamesMap(structurseData, modelName);
|
|
808
|
+
const { devDomain } = selectedModule || {};
|
|
809
|
+
if (devDomain) {
|
|
810
|
+
itfData.path = `${devDomain}${itfData.path}`;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
// modelName__itfName
|
|
814
|
+
const targetItfName = this.connector.getInterfaceUniqueName(`${modelName}__${itfData.name}`);
|
|
815
|
+
this.app.emit('collect:start', { actionMsg: '增加接口到连接器' });
|
|
816
|
+
// 不支持 DUBBO 的接口
|
|
817
|
+
const Interface = getConceptConstructor('Interface');
|
|
818
|
+
const newItf = new Interface(this.reNameInterface(itfData, targetItfName, structureNameMap) as Interface);
|
|
819
|
+
|
|
820
|
+
structurseData.forEach((structureData) => {
|
|
821
|
+
this.connector.addStructure(structureData);
|
|
822
|
+
});
|
|
823
|
+
this.connector.addInterface(newItf as Interface);
|
|
824
|
+
this.setCallee(newItf as Interface);
|
|
825
|
+
this.app.emit('collect:end');
|
|
826
|
+
}
|
|
827
|
+
|
|
736
828
|
// 导入接口
|
|
737
829
|
async createOrUpdateInterface({ moduleData, selectedModule }: { moduleData: Partial<Module>; selectedModule: any }) {
|
|
830
|
+
const connectorLogic = this.getAncestor('ConnectorLogic') as ConnectorLogic;
|
|
831
|
+
// 如果是pipleline逻辑,需要将当前的接口复制一份到连接器下
|
|
832
|
+
// 命名规则为: modelName + interfaceName
|
|
833
|
+
const isInPiple = connectorLogic?.kind === 'pipeline';
|
|
834
|
+
// 鉴权方式,如果是连接器下面的,也需要 进入下面的逻辑
|
|
835
|
+
const isInConnector = this.getAncestor('Connector') as Connector;
|
|
836
|
+
const isInAuthInterface = this.getAncestor('AuthInterface');
|
|
837
|
+
const isInAuthLogicForCallInterface = this.getAncestor('AuthLogicForCallInterface');
|
|
838
|
+
if (isInPiple || (isInAuthInterface && isInConnector) || (isInAuthLogicForCallInterface && isInConnector)) {
|
|
839
|
+
this.createInterfaceInConnector({ moduleData, selectedModule });
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
|
|
738
843
|
const moduleName = moduleData.name;
|
|
739
844
|
const itfData = moduleData.interfaces[0];
|
|
740
845
|
this.app.emit('collect:start', { actionMsg: '调用接口' });
|
|
@@ -660,13 +660,20 @@ export class CallLogic extends LogicItem {
|
|
|
660
660
|
const bindAttr = this.getAncestor('BindAttribute');
|
|
661
661
|
|
|
662
662
|
if (['data-source', 'dataSource'].includes(bindAttr?.name)) {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
663
|
+
const currentElement = this.getAncestor('ViewElement') as ViewElement;
|
|
664
|
+
let currentIndex = 0
|
|
665
|
+
let targetElement = currentElement.parentNode
|
|
666
|
+
const currentParamList: string[] = []
|
|
667
|
+
while(asserts.isViewElement(targetElement)) {
|
|
668
|
+
if (targetElement.tag === 'template' && targetElement.haveScope()) {
|
|
669
|
+
currentIndex += 1
|
|
670
|
+
}
|
|
671
|
+
targetElement = targetElement.parentNode
|
|
672
|
+
}
|
|
673
|
+
for (let i = 0; i < currentIndex; i++) {
|
|
674
|
+
currentParamList.push(`,current${i === 0 ? '' : i}`)
|
|
675
|
+
}
|
|
676
|
+
code += `(params)=>__${currentElement.name}_handleDataSourceLoad(params${currentParamList.join('')})`;
|
|
670
677
|
return code;
|
|
671
678
|
}
|
|
672
679
|
if (calleeName === 'jsonSerialize') {
|
|
@@ -339,7 +339,7 @@ export class Connection extends BaseNode {
|
|
|
339
339
|
/**
|
|
340
340
|
* 获取connector 类型
|
|
341
341
|
*/
|
|
342
|
-
get connector() {
|
|
342
|
+
get connector(): Connector {
|
|
343
343
|
return getNodeByNodeCallee(this.rootNode, this.namespace) || ({} as Connector);
|
|
344
344
|
}
|
|
345
345
|
getConnectorType(): String {
|
|
@@ -0,0 +1,84 @@
|
|
|
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 Logic from './Logic__';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 连接器操作逻辑
|
|
17
|
+
*/
|
|
18
|
+
@concept('连接器操作逻辑')
|
|
19
|
+
export class ConnectorLogic extends Logic {
|
|
20
|
+
/** 类名 */
|
|
21
|
+
static readonly ConceptName: string = 'ConnectorLogic';
|
|
22
|
+
/**
|
|
23
|
+
* 是否为抽象类
|
|
24
|
+
* 抽象类不能产生 concept: string
|
|
25
|
+
*/
|
|
26
|
+
static isAbstract: boolean = false;
|
|
27
|
+
/** 继承链 */
|
|
28
|
+
static readonly inheritanceChain: string[] = ['Logic', 'BaseNode'];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 产品概念
|
|
32
|
+
*/
|
|
33
|
+
@property('concept')
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
readonly concept!: 'ConnectorLogic';
|
|
36
|
+
/**
|
|
37
|
+
* 模式类型
|
|
38
|
+
*/
|
|
39
|
+
@property({
|
|
40
|
+
objectRef: '',
|
|
41
|
+
})
|
|
42
|
+
kind: 'http' | 'pipeline';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @param source 需要合并的部分参数
|
|
46
|
+
*/
|
|
47
|
+
constructor(source?: Partial<ConnectorLogic>) {
|
|
48
|
+
source = Object.assign({}, ConnectorLogic.getDefaultOptions(), source);
|
|
49
|
+
super(source);
|
|
50
|
+
super.subConstructor(source);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static from(source: any, parentNode?: any, parentKey?: string): ConnectorLogic {
|
|
54
|
+
return super.from(source, parentNode, parentKey) as ConnectorLogic;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 设置模式类型
|
|
59
|
+
*/
|
|
60
|
+
setKind(kind: 'http' | 'pipeline') {
|
|
61
|
+
const object = {
|
|
62
|
+
kind,
|
|
63
|
+
};
|
|
64
|
+
this.update({
|
|
65
|
+
...object,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//================================================================================
|
|
70
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
71
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
72
|
+
//================================================================================
|
|
73
|
+
|
|
74
|
+
//================================================================================
|
|
75
|
+
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
76
|
+
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
77
|
+
//================================================================================
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default ConnectorLogic;
|
|
81
|
+
//================================================================================
|
|
82
|
+
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
83
|
+
// 自动生成的代码已结束。下面可以手动编写。
|
|
84
|
+
//================================================================================
|