@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
|
@@ -145,12 +145,15 @@ import type { AuthInterface } from '../AuthInterface__';
|
|
|
145
145
|
import type { CallAuthInterface } from '../CallAuthInterface__';
|
|
146
146
|
import type { TriggerEvent } from '../TriggerEvent__';
|
|
147
147
|
import type { MsgTriggerEvent } from '../MsgTriggerEvent__';
|
|
148
|
+
import type { InterfaceTriggerEvent } from '../InterfaceTriggerEvent__';
|
|
148
149
|
import type { ConnectorTrigger } from '../ConnectorTrigger__';
|
|
149
150
|
import type { TriggerLauncher } from '../TriggerLauncher__';
|
|
151
|
+
import type { ConnectorTriggerLauncher } from '../ConnectorTriggerLauncher__';
|
|
150
152
|
import type { MsgTriggerLauncher } from '../MsgTriggerLauncher__';
|
|
151
153
|
import type { Connector } from '../Connector__';
|
|
152
154
|
import type { CallConnector } from '../CallConnector__';
|
|
153
155
|
import type { Connection } from '../Connection__';
|
|
156
|
+
import type { ConnectorLogic } from '../ConnectorLogic__';
|
|
154
157
|
|
|
155
158
|
/** concept 与类类型映射表 */
|
|
156
159
|
export interface ConceptTypeofClassMap {
|
|
@@ -301,12 +304,15 @@ export interface ConceptTypeofClassMap {
|
|
|
301
304
|
CallAuthInterface: typeof CallAuthInterface;
|
|
302
305
|
TriggerEvent: typeof TriggerEvent;
|
|
303
306
|
MsgTriggerEvent: typeof MsgTriggerEvent;
|
|
307
|
+
InterfaceTriggerEvent: typeof InterfaceTriggerEvent;
|
|
304
308
|
ConnectorTrigger: typeof ConnectorTrigger;
|
|
305
309
|
TriggerLauncher: typeof TriggerLauncher;
|
|
310
|
+
ConnectorTriggerLauncher: typeof ConnectorTriggerLauncher;
|
|
306
311
|
MsgTriggerLauncher: typeof MsgTriggerLauncher;
|
|
307
312
|
Connector: typeof Connector;
|
|
308
313
|
CallConnector: typeof CallConnector;
|
|
309
314
|
Connection: typeof Connection;
|
|
315
|
+
ConnectorLogic: typeof ConnectorLogic;
|
|
310
316
|
}
|
|
311
317
|
|
|
312
318
|
/** concept 与类实例类型映射表 */
|
|
@@ -458,12 +464,15 @@ export interface ConceptClassMap {
|
|
|
458
464
|
CallAuthInterface: CallAuthInterface;
|
|
459
465
|
TriggerEvent: TriggerEvent;
|
|
460
466
|
MsgTriggerEvent: MsgTriggerEvent;
|
|
467
|
+
InterfaceTriggerEvent: InterfaceTriggerEvent;
|
|
461
468
|
ConnectorTrigger: ConnectorTrigger;
|
|
462
469
|
TriggerLauncher: TriggerLauncher;
|
|
470
|
+
ConnectorTriggerLauncher: ConnectorTriggerLauncher;
|
|
463
471
|
MsgTriggerLauncher: MsgTriggerLauncher;
|
|
464
472
|
Connector: Connector;
|
|
465
473
|
CallConnector: CallConnector;
|
|
466
474
|
Connection: Connection;
|
|
475
|
+
ConnectorLogic: ConnectorLogic;
|
|
467
476
|
}
|
|
468
477
|
|
|
469
478
|
export type SyntaxNode =
|
|
@@ -607,14 +616,16 @@ export type SyntaxNode =
|
|
|
607
616
|
| ViewBlockWithImage
|
|
608
617
|
| AuthInterface
|
|
609
618
|
| CallAuthInterface
|
|
610
|
-
| TriggerEvent
|
|
611
619
|
| MsgTriggerEvent
|
|
620
|
+
| InterfaceTriggerEvent
|
|
612
621
|
| ConnectorTrigger
|
|
613
622
|
| TriggerLauncher
|
|
623
|
+
| ConnectorTriggerLauncher
|
|
614
624
|
| MsgTriggerLauncher
|
|
615
625
|
| Connector
|
|
616
626
|
| CallConnector
|
|
617
|
-
| Connection
|
|
627
|
+
| Connection
|
|
628
|
+
| ConnectorLogic;
|
|
618
629
|
|
|
619
630
|
export type SyntaxNodeConcept = SyntaxNode['concept'];
|
|
620
631
|
|
|
@@ -640,7 +651,8 @@ export type LogicNode =
|
|
|
640
651
|
| Logic
|
|
641
652
|
| AuthLogic
|
|
642
653
|
| AuthLogicForCallInterface
|
|
643
|
-
| BusinessLogic
|
|
654
|
+
| BusinessLogic
|
|
655
|
+
| ConnectorLogic;
|
|
644
656
|
|
|
645
657
|
export type LogicNodeConcept = LogicNode['concept'];
|
|
646
658
|
|
|
@@ -766,13 +778,20 @@ export type ViewBlockNode =
|
|
|
766
778
|
export type ViewBlockNodeConcept = ViewBlockNode['concept'];
|
|
767
779
|
|
|
768
780
|
export type TriggerEventNode =
|
|
769
|
-
|
|
|
770
|
-
|
|
|
781
|
+
| MsgTriggerEvent
|
|
782
|
+
| InterfaceTriggerEvent;
|
|
771
783
|
|
|
772
784
|
export type TriggerEventNodeConcept = TriggerEventNode['concept'];
|
|
773
785
|
|
|
774
786
|
export type TriggerLauncherNode =
|
|
775
787
|
| TriggerLauncher
|
|
788
|
+
| ConnectorTriggerLauncher
|
|
789
|
+
| MsgTriggerLauncher;
|
|
790
|
+
|
|
791
|
+
export type TriggerLauncherNodeConcept = TriggerLauncherNode['concept'];
|
|
792
|
+
|
|
793
|
+
export type ConnectorTriggerLauncherNode =
|
|
794
|
+
| ConnectorTriggerLauncher
|
|
776
795
|
| MsgTriggerLauncher;
|
|
777
796
|
|
|
778
|
-
export type
|
|
797
|
+
export type ConnectorTriggerLauncherNodeConcept = ConnectorTriggerLauncherNode['concept'];
|
|
@@ -101,6 +101,7 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
|
|
|
101
101
|
|
|
102
102
|
app.dependencies && modules.push(...app.dependencies);
|
|
103
103
|
app.interfaceDependencies && modules.push(...app.interfaceDependencies);
|
|
104
|
+
app.connectorDependencies && modules.push(...app.connectorDependencies);
|
|
104
105
|
frontend.views && views.push(...frontend.views);
|
|
105
106
|
modules.forEach((module: Module) => {
|
|
106
107
|
module.views && views.push(...module.views);
|
|
@@ -367,7 +368,6 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
|
|
|
367
368
|
const assetsInfo = app.genAllAssetsInfo(STATIC_URL, frontend.type);
|
|
368
369
|
const customNames = JSON5.stringify(assetsInfo.custom.names);
|
|
369
370
|
|
|
370
|
-
|
|
371
371
|
let content = `(function(){
|
|
372
372
|
`;
|
|
373
373
|
if (frontend.globalScaleEnabled) {
|
|
@@ -660,7 +660,12 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
|
|
|
660
660
|
if(config.isPreviewFe){
|
|
661
661
|
const changeToRelativePath =(str:any)=>{
|
|
662
662
|
const {pathname} = new URL(`http:${str}`)
|
|
663
|
-
|
|
663
|
+
let arr = pathname.split('/').filter(v=>v)
|
|
664
|
+
if( ['packages',config?.tenant].includes(arr[0])) {
|
|
665
|
+
return `${arr.join('/')}`
|
|
666
|
+
}else {
|
|
667
|
+
return `${arr.slice(1).join('/')}`
|
|
668
|
+
}
|
|
664
669
|
}
|
|
665
670
|
jsAssetsList = jsAssetsList.map(changeToRelativePath)
|
|
666
671
|
cssAssetsList = cssAssetsList.map(changeToRelativePath)
|
|
@@ -745,10 +750,15 @@ export function genBundleFiles(app: App, frontend: Frontend, config: Config) {
|
|
|
745
750
|
}`
|
|
746
751
|
}
|
|
747
752
|
|
|
748
|
-
|
|
749
753
|
const loadMockAssets = `
|
|
750
754
|
const loadJSWrap = (arr)=>{
|
|
751
|
-
LazyLoad.js(arr.map(url=>
|
|
755
|
+
LazyLoad.js(arr.map(url=>{
|
|
756
|
+
if(url.includes('mockBundle')){
|
|
757
|
+
return window.userAssetsDomain + url
|
|
758
|
+
}else {
|
|
759
|
+
return window.assetsDomain + url
|
|
760
|
+
}
|
|
761
|
+
}));
|
|
752
762
|
}
|
|
753
763
|
const loadCSSWrap = (arr)=>{
|
|
754
764
|
LazyLoad.css(arr.map(url=>window.assetsDomain + url));
|
|
@@ -93,6 +93,7 @@ export function genMetaData(app: App, frontend: Frontend, config: any) {
|
|
|
93
93
|
|
|
94
94
|
app.dependencies && modules.push(...app.dependencies);
|
|
95
95
|
app.interfaceDependencies && modules.push(...app.interfaceDependencies);
|
|
96
|
+
app.connectorDependencies && modules.push(...app.connectorDependencies);
|
|
96
97
|
|
|
97
98
|
// 内置国际化枚举
|
|
98
99
|
enums.push(...configurationEnums)
|
|
@@ -194,6 +194,7 @@ export function getAllLogics(app: App) {
|
|
|
194
194
|
|
|
195
195
|
app.dependencies && modules.push(...app.dependencies);
|
|
196
196
|
app.interfaceDependencies && modules.push(...app.interfaceDependencies);
|
|
197
|
+
app.connectorDependencies && modules.push(...app.connectorDependencies);
|
|
197
198
|
|
|
198
199
|
modules.forEach((module: Module) => {
|
|
199
200
|
module.logics && logics.push(...module.logics);
|
|
@@ -16,8 +16,8 @@ async function getNaslAnnotatedJSON(app: App, opt: InternalReleaseData) {
|
|
|
16
16
|
|
|
17
17
|
let NaslAnnotatedJSON: any;
|
|
18
18
|
try {
|
|
19
|
-
NaslAnnotatedJSON = await
|
|
20
|
-
opt.logPublishFunc?.('语言', '获取类型标注成功');
|
|
19
|
+
NaslAnnotatedJSON = await app.naslServer.getNaslAnnotatedJSON(app, true);
|
|
20
|
+
await opt.logPublishFunc?.('语言', '获取类型标注成功');
|
|
21
21
|
|
|
22
22
|
// // 打印传给服务端的 nasl,为了服务端排查问题方便
|
|
23
23
|
// if (globalThis.window) {
|
|
@@ -47,11 +47,11 @@ async function getFrontendBundleFiles(app: App, opt: InternalReleaseData) {
|
|
|
47
47
|
let files: utils.GetPromise<ReturnType<typeof genFrontendBundleFiles>> = [];
|
|
48
48
|
|
|
49
49
|
if (opt.frontends && opt.frontends.length) {
|
|
50
|
-
opt.logPublishFunc?.('代码', '生成页面代码:开始');
|
|
50
|
+
await opt.logPublishFunc?.('代码', '生成页面代码:开始');
|
|
51
|
+
app.naslServer.logger.time('生成前端页面');
|
|
51
52
|
files = await genFrontendBundleFiles(app, opt.frontends, {
|
|
52
53
|
...opt.appInfo,
|
|
53
|
-
|
|
54
|
-
debug: opt.debug,
|
|
54
|
+
...opt,
|
|
55
55
|
appid: app.id,
|
|
56
56
|
devDnsAddr: (app as any).devDnsAddr,
|
|
57
57
|
miniEnable: (app as any).miniEnable,
|
|
@@ -65,9 +65,11 @@ async function getFrontendBundleFiles(app: App, opt: InternalReleaseData) {
|
|
|
65
65
|
files = replaceAssetUrl(files, opt.appInfo.USER_STATIC_URL, opt.staticUrl);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
app.naslServer.logger.timeEnd('生成前端页面');
|
|
69
|
+
await opt.logPublishFunc?.('代码', '生成页面代码:完成');
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
|
|
71
73
|
return files;
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -75,7 +77,7 @@ async function mergeBodyData(app: App, opt: InternalReleaseData) {
|
|
|
75
77
|
await utils.delay(500);
|
|
76
78
|
|
|
77
79
|
const authReport: ReturnType<typeof getAuthReport> = getAuthReport(app, opt.frontends);
|
|
78
|
-
opt.logPublishFunc?.('权限', '分析权限数据成功!');
|
|
80
|
+
await opt.logPublishFunc?.('权限', '分析权限数据成功!');
|
|
79
81
|
const logicPageResourceDtoList = await genPermissionData(app);
|
|
80
82
|
const allFrontends = getFrontendByTypes(app?.frontendTypes);
|
|
81
83
|
const releaseFrontends = allFrontends.map((frontend: Frontend) => ({
|
|
@@ -92,6 +94,7 @@ async function mergeBodyData(app: App, opt: InternalReleaseData) {
|
|
|
92
94
|
reportIdList: findAllReportIdList(app, opt.frontends),
|
|
93
95
|
appId: app.id,
|
|
94
96
|
env: opt.env,
|
|
97
|
+
branchId: opt.branchId,
|
|
95
98
|
replicas: opt.replicas,
|
|
96
99
|
appSpecification: opt.appSpecification,
|
|
97
100
|
callbackLogicsName: app.getExtensionsCallbackLogics(),
|
|
@@ -17,10 +17,11 @@ import { Logger, File } from '../../utils';
|
|
|
17
17
|
export async function getReleaseData(app: App, data: ReleaseData, naslServer: NaslServer, inputLogger?: Logger) {
|
|
18
18
|
const { http, logger: defaultLogger } = naslServer;
|
|
19
19
|
const logger = inputLogger ?? defaultLogger;
|
|
20
|
+
defaultLogger.time('前端生成器发布');
|
|
20
21
|
const appInfo = await getAppInfo(http, data);
|
|
21
|
-
logger.info('构建环境', '获取环境信息成功');
|
|
22
|
+
await logger.info('构建环境', '获取环境信息成功');
|
|
22
23
|
const { version, fullVersion, dependencies } = await getVersionDetail(http, app);
|
|
23
|
-
logger.info('构建环境', '获取版本数据成功');
|
|
24
|
+
await logger.info('构建环境', '获取版本数据成功');
|
|
24
25
|
const allFrontend = getFrontendByTypes(app.frontendTypes);
|
|
25
26
|
const inputFrontendNames = (data.config.frontendNames ?? []).filter(Boolean);
|
|
26
27
|
const releaseFrontends = inputFrontendNames.length > 0
|
|
@@ -29,13 +30,14 @@ export async function getReleaseData(app: App, data: ReleaseData, naslServer: Na
|
|
|
29
30
|
const result: InternalReleaseData = {
|
|
30
31
|
appInfo: appInfo as any,
|
|
31
32
|
env: data.env,
|
|
33
|
+
branchId: data.branchId,
|
|
32
34
|
debug: data.config.debug ?? false,
|
|
33
35
|
replicas: data.replicas ?? 1,
|
|
34
36
|
realRelease: data.config.mode === ReleaseMode.Release,
|
|
35
37
|
isExport: data.config.mode === ReleaseMode.ExportCode,
|
|
36
38
|
isPreviewFe: data.config.mode === ReleaseMode.ExportTemplate,
|
|
37
39
|
ignoreFiles: data.config.ignoreFiles ?? false,
|
|
38
|
-
previewVersion: data.config.
|
|
40
|
+
previewVersion: data.config.previewVersion,
|
|
39
41
|
appSpecification: data.appSpecification,
|
|
40
42
|
frontends: releaseFrontends,
|
|
41
43
|
validations: {},
|
|
@@ -45,13 +47,13 @@ export async function getReleaseData(app: App, data: ReleaseData, naslServer: Na
|
|
|
45
47
|
// 设置依赖数据
|
|
46
48
|
if (app.packageInfos.length === 0) {
|
|
47
49
|
app.packageInfos = await getPackageInfos(http, app, dependencies, appInfo.STATIC_URL, fullVersion);
|
|
48
|
-
logger.info('构建环境', '设置依赖库内容');
|
|
50
|
+
await logger.info('构建环境', '设置依赖库内容');
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
// 私有化环境,需要同步资源;内部环境暂不需要,针对使用 CDN 场景增加判断
|
|
52
54
|
if (String(appInfo.isPrivatized) === 'true') {
|
|
53
55
|
result.staticUrl = await staticResourceSync(http, data.appId, data.env, releaseFrontends);
|
|
54
|
-
logger.info('构建环境', '私有化部署同步资源成功');
|
|
56
|
+
await logger.info('构建环境', '私有化部署同步资源成功');
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
// 服务端验证规则
|
|
@@ -62,18 +64,19 @@ export async function getReleaseData(app: App, data: ReleaseData, naslServer: Na
|
|
|
62
64
|
throw new Error(result.validations);
|
|
63
65
|
}
|
|
64
66
|
else {
|
|
65
|
-
logger.info('生成器', '服务端验证数据获取成功');
|
|
67
|
+
await logger.info('生成器', '服务端验证数据获取成功');
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
logger.info('构建环境', '构建环境完成,开始拼装发布数据');
|
|
71
|
+
await logger.info('构建环境', '构建环境完成,开始拼装发布数据');
|
|
70
72
|
|
|
71
73
|
const releaseBody = await genReleaseBody(app, {
|
|
72
74
|
...result,
|
|
73
75
|
logPublishFunc: (...message: string[]) => logger.info(...message),
|
|
74
76
|
});
|
|
75
77
|
|
|
76
|
-
logger.info('前端生成器', '应用发布数据准备完成');
|
|
78
|
+
await logger.info('前端生成器', '应用发布数据准备完成');
|
|
79
|
+
defaultLogger.timeEnd('前端生成器发布');
|
|
77
80
|
|
|
78
81
|
return releaseBody;
|
|
79
82
|
}
|
|
@@ -12,6 +12,8 @@ export interface ReleaseData {
|
|
|
12
12
|
appId: string;
|
|
13
13
|
/** 发布环境 dev | online */
|
|
14
14
|
env: string;
|
|
15
|
+
/** 分支 Id */
|
|
16
|
+
branchId: string;
|
|
15
17
|
/** 副本数 */
|
|
16
18
|
replicas: number;
|
|
17
19
|
/** 应用特性版本 */
|
|
@@ -28,7 +30,7 @@ export interface ReleaseConfig {
|
|
|
28
30
|
/** 忽略前端文件 */
|
|
29
31
|
ignoreFiles?: boolean;
|
|
30
32
|
/** 发布版本 */
|
|
31
|
-
|
|
33
|
+
previewVersion?: string;
|
|
32
34
|
/** 调试模式 */
|
|
33
35
|
debug?: boolean;
|
|
34
36
|
/**
|
|
@@ -38,20 +38,44 @@ export interface Diagnostic {
|
|
|
38
38
|
*/
|
|
39
39
|
export interface DiagnosticRecord {
|
|
40
40
|
id: string;
|
|
41
|
+
|
|
41
42
|
logicId?: string;
|
|
42
|
-
|
|
43
|
+
|
|
43
44
|
filePath?: string;
|
|
44
45
|
node: BaseNode;
|
|
45
46
|
message: string;
|
|
46
47
|
syntaxDiagnostics: Array<Diagnostic>;
|
|
47
48
|
semanticDiagnostics: Array<Diagnostic>;
|
|
48
49
|
suggestionDiagnostics: Array<Diagnostic>;
|
|
49
|
-
// processComponentId?: string,
|
|
50
|
-
// attributes?: TypeCheckAttribute[],
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
export class DiagnosticManager {
|
|
54
|
-
|
|
53
|
+
private initVersionByFilePath(filePath: string) {
|
|
54
|
+
if (this.versions[filePath] === undefined) {
|
|
55
|
+
this.versions[filePath] = 0;
|
|
56
|
+
}
|
|
57
|
+
return this.versions[filePath];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
incrementVersionByFilePath(filePath: string): number {
|
|
61
|
+
this.initVersionByFilePath(filePath);
|
|
62
|
+
return ++this.versions[filePath];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
getVersionByFilePath(filePath: string) {
|
|
66
|
+
// 单纯 get 不需要写入
|
|
67
|
+
return this.versions[filePath] ?? 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
deleteVersionByFilePath(filePath: string) {
|
|
71
|
+
if (!filePath) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
delete this.versions[filePath];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private versions: Record<string, number> = Object.create(null);
|
|
78
|
+
private records: Array<DiagnosticRecord> = [];
|
|
55
79
|
|
|
56
80
|
push(record: DiagnosticRecord) {
|
|
57
81
|
const index = this.records.findIndex((item) => item.id === record.id);
|
|
@@ -60,15 +84,7 @@ export class DiagnosticManager {
|
|
|
60
84
|
} else {
|
|
61
85
|
this.records.splice(index, 1, record);
|
|
62
86
|
}
|
|
63
|
-
|
|
64
|
-
// if(record.typeCheckNote?.message?.filter)
|
|
65
|
-
// record.typeCheckNote.message = record.typeCheckNote.message.filter((item) => !!item);
|
|
66
|
-
|
|
67
|
-
// if(!record.typeCheckNote || record.typeCheckNote.status === 'success'
|
|
68
|
-
// || (record.typeCheckNote && record.typeCheckNote.message && record.typeCheckNote.message.length === 0))
|
|
69
|
-
// return;
|
|
70
87
|
}
|
|
71
|
-
|
|
72
88
|
getRecord(id: string) {
|
|
73
89
|
const index = this.records.findIndex((item) => item.id === id);
|
|
74
90
|
return this.records[index];
|
|
@@ -76,27 +92,18 @@ export class DiagnosticManager {
|
|
|
76
92
|
|
|
77
93
|
deleteOwn(id: string) {
|
|
78
94
|
const index = this.records.findIndex((item) => item.id === id);
|
|
95
|
+
if (index !== -1) {
|
|
96
|
+
const path = this.records[index].filePath;
|
|
97
|
+
if (path) {
|
|
98
|
+
this.deleteVersionByFilePath(path);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
79
101
|
~index && this.records.splice(index, 1);
|
|
80
102
|
}
|
|
81
103
|
|
|
82
|
-
delete(id: string) {
|
|
83
|
-
// const node = vertexsMap.get(id);
|
|
84
|
-
// this.deleteOwn(id);
|
|
85
|
-
// if (node) {
|
|
86
|
-
// const children: LogicItem[] = [];
|
|
87
|
-
// // [...logicItemKeyOfLogicItem, ...logicItemArrayKeyOfLogicItem].forEach((key) => {
|
|
88
|
-
// // const item = (node as LogicItem)[key as keyof LogicItem];
|
|
89
|
-
// // if (item)
|
|
90
|
-
// // children = children.concat(item);
|
|
91
|
-
// // });
|
|
92
|
-
// children.forEach((item) => {
|
|
93
|
-
// this.delete(item.id);
|
|
94
|
-
// });
|
|
95
|
-
// }
|
|
96
|
-
}
|
|
97
|
-
|
|
98
104
|
clear() {
|
|
99
105
|
this.records.splice(0, this.records.length);
|
|
106
|
+
this.versions = Object.create(null);
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
pushAll(records: DiagnosticRecord[]) {
|
|
@@ -108,9 +115,6 @@ export class DiagnosticManager {
|
|
|
108
115
|
return [].concat(
|
|
109
116
|
...this.records.map((record) => {
|
|
110
117
|
const diagnostics: Diagnostic[] = [].concat(record.semanticDiagnostics, record.suggestionDiagnostics);
|
|
111
|
-
// if (!showTSError) {
|
|
112
|
-
// diagnostics = diagnostics.filter((diagnostic) => chineseRE.test(diagnostic.message));
|
|
113
|
-
// }
|
|
114
118
|
return diagnostics;
|
|
115
119
|
})
|
|
116
120
|
);
|
|
@@ -100,8 +100,8 @@ export const getNaslOql = () => {
|
|
|
100
100
|
return { code, naslOql };
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
-
export const getEnums = (app: App, state: any,
|
|
104
|
-
const needNamespace =
|
|
103
|
+
export const getEnums = (app: App, state: any, requiredIndexes?: string[]) => {
|
|
104
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
105
105
|
const namespace = 'app.enums';
|
|
106
106
|
const data = [] as { description: string; code: string; }[];
|
|
107
107
|
let code = '';
|
|
@@ -116,8 +116,8 @@ export const getEnums = (app: App, state: any, moduleIndexList?: string[]) => {
|
|
|
116
116
|
return { code, namespace, enums: { namespace, data } };
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
export const getEntities = (app: App, state: any,
|
|
120
|
-
const needNamespace =
|
|
119
|
+
export const getEntities = (app: App, state: any, requiredIndexes?: string[]) => {
|
|
120
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
121
121
|
const entities = [] as { namespace: string; data: { description: string; code: string; }[]; }[];
|
|
122
122
|
let code = '';
|
|
123
123
|
app.dataSources.forEach((dataSource) => {
|
|
@@ -139,8 +139,8 @@ export const getEntities = (app: App, state: any, moduleIndexList?: string[]) =>
|
|
|
139
139
|
return { code, entities };
|
|
140
140
|
};
|
|
141
141
|
|
|
142
|
-
export const getStructures = (app: App, state: any,
|
|
143
|
-
const needNamespace =
|
|
142
|
+
export const getStructures = (app: App, state: any, requiredIndexes?: string[]) => {
|
|
143
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
144
144
|
const data = [] as { description: string; code: string; }[];
|
|
145
145
|
const namespace = `app.structures`;
|
|
146
146
|
let code = '';
|
|
@@ -157,8 +157,8 @@ export const getStructures = (app: App, state: any, moduleIndexList?: string[])
|
|
|
157
157
|
return { code, structures: { namespace, data } };
|
|
158
158
|
};
|
|
159
159
|
|
|
160
|
-
export const getLogics = (app: App, currentNode: BaseNode,
|
|
161
|
-
const hasModuleIndexList =
|
|
160
|
+
export const getLogics = (app: App, currentNode: BaseNode, requiredIndexes?: string[]) => {
|
|
161
|
+
const hasModuleIndexList = requiredIndexes?.length > 0;
|
|
162
162
|
const data = [] as { description: string; code: string; }[];
|
|
163
163
|
const namespace = `app.logics`;
|
|
164
164
|
let code = '';
|
|
@@ -166,9 +166,9 @@ export const getLogics = (app: App, currentNode: BaseNode, moduleIndexList?: str
|
|
|
166
166
|
?.filter((logic) => logic !== currentNode && !logic.name.startsWith('LCAP'))
|
|
167
167
|
?.forEach((logic, index) => {
|
|
168
168
|
const logicIndex = `6-${index}`;
|
|
169
|
-
if (hasModuleIndexList && !
|
|
170
|
-
const rename =
|
|
171
|
-
const needNamespace =
|
|
169
|
+
if (hasModuleIndexList && !requiredIndexes?.includes(logicIndex)) return;
|
|
170
|
+
const rename = requiredIndexes?.length >= 0 ? logic?.calleewholeKey : undefined;
|
|
171
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
172
172
|
const tempCode = `${logic?.toNaturalTS({ needNamespace, rename, declaration: true })}`;
|
|
173
173
|
const description = logic?.description || '';
|
|
174
174
|
code += `[${logicIndex}]${description} ${tempCode}\n`;
|
|
@@ -177,8 +177,8 @@ export const getLogics = (app: App, currentNode: BaseNode, moduleIndexList?: str
|
|
|
177
177
|
return { code, appLogics: { namespace, data } };
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
export const getModuleInterfaces = (app: App, state: any,
|
|
181
|
-
const hasModuleIndexList =
|
|
180
|
+
export const getModuleInterfaces = (app: App, state: any, requiredIndexes?: string[]) => {
|
|
181
|
+
const hasModuleIndexList = requiredIndexes?.length > 0;
|
|
182
182
|
const interfaceDependencies = [] as {
|
|
183
183
|
name: string;
|
|
184
184
|
structures: { namespace: string; data: { description: string; code: string; }[]; };
|
|
@@ -202,14 +202,14 @@ export const getModuleInterfaces = (app: App, state: any, moduleIndexList?: stri
|
|
|
202
202
|
const logicData = [] as { description: string; code: string; }[];
|
|
203
203
|
interfaceDependency?.interfaces?.forEach((interface_: any, index) => {
|
|
204
204
|
const interfaceIndex = `7-${moduleIndex}-${index}`;
|
|
205
|
-
if (hasModuleIndexList && !
|
|
205
|
+
if (hasModuleIndexList && !requiredIndexes?.includes(interfaceIndex)) return;
|
|
206
206
|
const description = interface_?.description || '';
|
|
207
|
-
const interfaceName =
|
|
208
|
-
const needNamespace =
|
|
207
|
+
const interfaceName = requiredIndexes?.length >= 0 ? interface_?.calleewholeKey : undefined;
|
|
208
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
209
209
|
const tempCode = interface_?.toNaturalTS(createCompilerState('', { needNamespace }), interfaceName);
|
|
210
210
|
logicData.push({ description, code: tempCode });
|
|
211
211
|
|
|
212
|
-
if (
|
|
212
|
+
if (requiredIndexes?.includes(interfaceIndex)) {
|
|
213
213
|
code += getLogicStructures(interface_, 'interface', { description, codeStr: tempCode }, structureNamespace);
|
|
214
214
|
} else {
|
|
215
215
|
code += `[${interfaceIndex}]${description} ${tempCode}\n`;
|
|
@@ -222,8 +222,8 @@ export const getModuleInterfaces = (app: App, state: any, moduleIndexList?: stri
|
|
|
222
222
|
return { code, interfaceDependencies };
|
|
223
223
|
};
|
|
224
224
|
|
|
225
|
-
export const getConnectors = (app: App, state: any,
|
|
226
|
-
const hasModuleIndexList =
|
|
225
|
+
export const getConnectors = (app: App, state: any, requiredIndexes?: string[]) => {
|
|
226
|
+
const hasModuleIndexList = requiredIndexes?.length > 0;
|
|
227
227
|
const connections = [] as {
|
|
228
228
|
name: string;
|
|
229
229
|
structures: { namespace: string; data: { description: string; code: string; }[]; };
|
|
@@ -250,14 +250,14 @@ export const getConnectors = (app: App, state: any, moduleIndexList?: string[])
|
|
|
250
250
|
connection?.connector?.namespaces?.forEach((namespace: Namespace, namespaceIndex: number) => {
|
|
251
251
|
namespace?.logics?.forEach((logic: Logic, index) => {
|
|
252
252
|
const logicIndex = `8-${connectionIndex}-${namespaceIndex}-${index}`;
|
|
253
|
-
if (hasModuleIndexList && !
|
|
253
|
+
if (hasModuleIndexList && !requiredIndexes?.includes(logicIndex)) return;
|
|
254
254
|
const description = `${logic?.description || logic?.title || ''}`;
|
|
255
|
-
const rename =
|
|
256
|
-
const needNamespace =
|
|
255
|
+
const rename = requiredIndexes?.length >= 0 ? `${connection?.name}.${logic?.calleewholeKey}` : undefined;
|
|
256
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
257
257
|
const tempCode = `${logic?.toNaturalTS(shiftState(state, code, { needNamespace, rename, declaration: true }))}`;
|
|
258
258
|
logicData.push({ description, code: tempCode });
|
|
259
259
|
|
|
260
|
-
if (
|
|
260
|
+
if (requiredIndexes?.includes(logicIndex)) {
|
|
261
261
|
code += getLogicStructures(logic, 'connector', { description, codeStr: tempCode }, structureNamespace);
|
|
262
262
|
} else {
|
|
263
263
|
code += `[${logicIndex}]${description} ${tempCode}\n`;
|
|
@@ -268,14 +268,14 @@ export const getConnectors = (app: App, state: any, moduleIndexList?: string[])
|
|
|
268
268
|
if (!connection?.connector?.namespaces?.length && connection?.connector?.logics?.length) {
|
|
269
269
|
connection?.connector?.logics.forEach((logic: Logic, index: number) => {
|
|
270
270
|
const logicIndex = `8-${connectionIndex}-${index}`;
|
|
271
|
-
if (hasModuleIndexList && !
|
|
271
|
+
if (hasModuleIndexList && !requiredIndexes?.includes(logicIndex)) return;
|
|
272
272
|
const description = logic?.description || '';
|
|
273
|
-
const rename =
|
|
274
|
-
const needNamespace =
|
|
273
|
+
const rename = requiredIndexes?.length >= 0 ? `${connection?.name}.${logic?.calleewholeKey}` : undefined;
|
|
274
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
275
275
|
const tempCode = `${logic?.toNaturalTS(shiftState(state, code, { needNamespace, rename, declaration: true }))}`;
|
|
276
276
|
logicData.push({ description, code: tempCode });
|
|
277
277
|
|
|
278
|
-
if (
|
|
278
|
+
if (requiredIndexes?.includes(logicIndex)) {
|
|
279
279
|
code += getLogicStructures(logic, 'connector', { description, codeStr: tempCode }, structureNamespace);
|
|
280
280
|
} else {
|
|
281
281
|
code += `[${logicIndex}]${description} ${tempCode}\n`;
|
|
@@ -288,8 +288,8 @@ export const getConnectors = (app: App, state: any, moduleIndexList?: string[])
|
|
|
288
288
|
return { code, connections };
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
-
export const getDependencies = (app: App, state: any,
|
|
292
|
-
const hasModuleIndexList =
|
|
291
|
+
export const getDependencies = (app: App, state: any, requiredIndexes?: string[]) => {
|
|
292
|
+
const hasModuleIndexList = requiredIndexes?.length > 0;
|
|
293
293
|
const dependencies = [] as {
|
|
294
294
|
name: string;
|
|
295
295
|
structures: { namespace: string; data: { description: string; code: string; }[]; };
|
|
@@ -315,14 +315,14 @@ export const getDependencies = (app: App, state: any, moduleIndexList?: string[]
|
|
|
315
315
|
const logicData = [] as { description: string; code: string; }[];
|
|
316
316
|
module?.logics?.forEach((logic, index) => {
|
|
317
317
|
const logicIndex = `9-${moduleIndex}-${index}`;
|
|
318
|
-
if (hasModuleIndexList && !
|
|
318
|
+
if (hasModuleIndexList && !requiredIndexes?.includes(logicIndex)) return;
|
|
319
319
|
const description = logic?.description || '';
|
|
320
|
-
const rename =
|
|
321
|
-
const needNamespace =
|
|
320
|
+
const rename = requiredIndexes?.length >= 0 ? logic?.calleewholeKey : undefined;
|
|
321
|
+
const needNamespace = requiredIndexes?.length >= 0;
|
|
322
322
|
const tempCode = `${logic?.toNaturalTS(shiftState(state, code, { needNamespace, rename, declaration: true }))}`;
|
|
323
323
|
logicData.push({ description, code: tempCode });
|
|
324
324
|
|
|
325
|
-
if (
|
|
325
|
+
if (requiredIndexes?.includes(logicIndex)) {
|
|
326
326
|
code += getLogicStructures(logic, 'extension', { description, codeStr: tempCode }, structureNamespace);
|
|
327
327
|
} else {
|
|
328
328
|
code += `[${logicIndex}]${description} ${tempCode}\n`;
|
|
@@ -427,7 +427,7 @@ export const getCurrentNodeContext = (currentNode: BaseNode, focusedNodePath?: s
|
|
|
427
427
|
return { code: genTsBlock(code), currentLogic: code };
|
|
428
428
|
};
|
|
429
429
|
|
|
430
|
-
export function genNaturalTSContext(app: App, currentNode?: BaseNode, focusedNodePath?: string,
|
|
430
|
+
export function genNaturalTSContext(app: App, currentNode?: BaseNode, focusedNodePath?: string, requiredIndexes?: string[]) {
|
|
431
431
|
const frontend = currentNode?.getAncestor('Frontend') as Frontend;
|
|
432
432
|
const logicType = currentNode?.parentNode?.concept === 'App' ? 'global_logic' : 'view_logic';
|
|
433
433
|
const state = createCompilerState();
|
|
@@ -450,28 +450,28 @@ export function genNaturalTSContext(app: App, currentNode?: BaseNode, focusedNod
|
|
|
450
450
|
|
|
451
451
|
code += '\n### [5]全局上下文\n';
|
|
452
452
|
code += '\n#### [5-0]枚举\n';
|
|
453
|
-
code += getEnums(app, state,
|
|
453
|
+
code += getEnums(app, state, requiredIndexes).code;
|
|
454
454
|
|
|
455
455
|
code += '\n#### [5-1]实体\n';
|
|
456
|
-
code += getEntities(app, state,
|
|
456
|
+
code += getEntities(app, state, requiredIndexes).code;
|
|
457
457
|
|
|
458
458
|
code += '\n#### [5-2]可用的数据结构\n';
|
|
459
|
-
code += getStructures(app, state,
|
|
459
|
+
code += getStructures(app, state, requiredIndexes).code;
|
|
460
460
|
|
|
461
461
|
code += '\n### [6]服务端逻辑\n';
|
|
462
|
-
code += getLogics(app, currentNode,
|
|
462
|
+
code += getLogics(app, currentNode, requiredIndexes).code;
|
|
463
463
|
|
|
464
464
|
code += '\n### [7]可调用的接口列表\n';
|
|
465
|
-
code += getModuleInterfaces(app, state,
|
|
465
|
+
code += getModuleInterfaces(app, state, requiredIndexes).code;
|
|
466
466
|
|
|
467
467
|
if (app?.connections?.length > 0 && logicType === 'global_logic') {
|
|
468
468
|
code += '\n### [8]连接器逻辑列表\n';
|
|
469
|
-
code += getConnectors(app, state,
|
|
469
|
+
code += getConnectors(app, state, requiredIndexes).code;
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
if (app?.dependencies?.length > 0) {
|
|
473
473
|
code += '\n### [9]依赖库逻辑列表\n';
|
|
474
|
-
code += getDependencies(app, state,
|
|
474
|
+
code += getDependencies(app, state, requiredIndexes).code;
|
|
475
475
|
}
|
|
476
476
|
|
|
477
477
|
if (frontend) {
|
|
@@ -2,7 +2,7 @@ export const analyzeClaims = (params: any) => {
|
|
|
2
2
|
const { logicType } = params;
|
|
3
3
|
const claims = `
|
|
4
4
|
- Knowledge 是你的知识库,你可以参考,但是你最终制定的计划中禁止包含方法或者函数名
|
|
5
|
-
-
|
|
5
|
+
- requiredIndexes 用于下一步的具体实施,需要尽可能详细的返回所有和执行计划相关的模块或方法索引
|
|
6
6
|
- 如果用户没有特别指明是打印(日志/输出结果),"输出结果"一律按照"返回输出结果"处理
|
|
7
7
|
- 涉及到查询、获取数据时,先查找当前上下文[6/7/8/9]中是否有相关的方法,如果没有,再考虑实体的方法
|
|
8
8
|
- 实体的 get 方法一次只能获取一条数据,返回一个对象,无法返回列表。
|
|
@@ -14,12 +14,13 @@ export const analyzeClaims = (params: any) => {
|
|
|
14
14
|
const claimsMap = {
|
|
15
15
|
global_logic: `
|
|
16
16
|
- Knowledge 是你的知识库,你可以参考,但是你最终制定的计划中禁止包含方法或者函数名
|
|
17
|
-
-
|
|
17
|
+
- requiredIndexes 用于下一步的具体实施,需要尽可能详细的返回所有和执行计划相关的模块或方法索引
|
|
18
18
|
- 如果用户没有特别指明是打印(日志/输出结果),"输出结果"一律按照"返回输出结果"处理
|
|
19
19
|
- 如果用户的需求涉及定时或延时等操作,请提示用户:当前暂不支持定时或延时操作,请调整后重新输入。
|
|
20
20
|
- 如果用户的需求需要调用某个方法并且当前上下文中不存在时,请提示用户:当前应用中暂无该方法,请先导入相关依赖库或连接器模块
|
|
21
21
|
- 例如:加解密依赖库中的方法
|
|
22
|
-
- 当前逻辑类型下暂不支持跳转页面功能,请提示用户:
|
|
22
|
+
- 当前逻辑类型下暂不支持跳转页面功能,请提示用户: 如果需要跳转页面,请切换到前端页面逻辑或事件逻辑。
|
|
23
|
+
- 当前逻辑类型下暂不支持弹出消息/弹窗消息功能,请提示用户: 当前逻辑类型暂不支持此功能。
|
|
23
24
|
- 分析用户的需求,当需要从实体中获取或者查询数据时
|
|
24
25
|
- 优先使用 SQL 的查询和数据操纵能力: 例如 JOIN、SUM、GROUP_BY 等能力
|
|
25
26
|
- 使用 SQL 语句同时实现查询和计算
|