@lcap/nasl 3.7.0-beta.4 → 3.7.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/README.md +97 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +397 -0
- package/dist/index.js.map +1 -0
- package/dist/package.json +91 -0
- package/dist/src/automate/engine/index.d.ts +4 -0
- package/dist/src/automate/engine/operators.d.ts +26 -0
- package/dist/src/automate/engine/uniqueName.d.ts +12 -0
- package/dist/src/automate/engine/utils.d.ts +25 -0
- package/dist/src/automate/engine/viewCache.d.ts +19 -0
- package/dist/src/automate/template/myProcess.d.ts +10 -0
- package/dist/src/automate/upgrader/2.12.d.ts +7 -0
- package/dist/src/automate/upgrader/2.14-components.d.ts +1115 -0
- package/dist/src/automate/upgrader/2.14.d.ts +10 -0
- package/dist/src/automate/upgrader/2.14.old.d.ts +1 -0
- package/dist/src/automate/upgrader/2.16.d.ts +10 -0
- package/dist/src/automate/upgrader/2.17.d.ts +21 -0
- package/dist/src/automate/upgrader/2.18.d.ts +10 -0
- package/dist/src/automate/upgrader/2.20.d.ts +17 -0
- package/dist/src/bak/translator.d.ts +1 -0
- package/dist/src/breakpoint/generator/AfterStartNode.d.ts +7 -0
- package/dist/src/breakpoint/generator/BeforeEndNode.d.ts +7 -0
- package/dist/src/breakpoint/generator/BreakpointNode.d.ts +20 -0
- package/dist/src/breakpoint/generator/CallbackNode.d.ts +4 -0
- package/dist/src/breakpoint/generator/FragmentNode.d.ts +4 -0
- package/dist/src/breakpoint/generator/index.d.ts +4 -0
- package/dist/src/breakpoint/index.d.ts +3 -0
- package/dist/src/breakpoint/shared/constants.d.ts +37 -0
- package/dist/src/breakpoint/shared/index.d.ts +3 -0
- package/dist/src/breakpoint/shared/operations.d.ts +10 -0
- package/dist/src/breakpoint/shared/socket.d.ts +48 -0
- package/dist/src/breakpoint/shared/utils.d.ts +27 -0
- package/dist/src/breakpoint/store/core.d.ts +80 -0
- package/dist/src/breakpoint/store/dock.d.ts +1 -0
- package/dist/src/breakpoint/store/index.d.ts +2 -0
- package/dist/src/common/BaseNode.d.ts +384 -0
- package/dist/src/common/Command.d.ts +21 -0
- package/dist/src/common/ComponentAPI.d.ts +112 -0
- package/dist/src/common/EventEmitter.d.ts +61 -0
- package/dist/src/common/Messager.d.ts +91 -0
- package/dist/src/common/asyncFuncMap.d.ts +2 -0
- package/dist/src/common/index.d.ts +4 -0
- package/dist/src/common/utils.d.ts +2 -0
- package/dist/src/concepts/Abort__.d.ts +31 -0
- package/dist/src/concepts/AbstractInterface__.d.ts +25 -0
- package/dist/src/concepts/Anchor__.d.ts +42 -0
- package/dist/src/concepts/AnonymousFunction__.d.ts +144 -0
- package/dist/src/concepts/App__.d.ts +1711 -0
- package/dist/src/concepts/Argument__.d.ts +64 -0
- package/dist/src/concepts/Assignee__.d.ts +294 -0
- package/dist/src/concepts/AssignmentLine__.d.ts +43 -0
- package/dist/src/concepts/Assignment__.d.ts +57 -0
- package/dist/src/concepts/Attribute__.d.ts +75 -0
- package/dist/src/concepts/AuthInterface__.d.ts +38 -0
- package/dist/src/concepts/AuthLogicForCallInterface__.d.ts +145 -0
- package/dist/src/concepts/AuthLogic__.d.ts +69 -0
- package/dist/src/concepts/BackendVariable__.d.ts +118 -0
- package/dist/src/concepts/Backend__.d.ts +127 -0
- package/dist/src/concepts/BaseSetter__.d.ts +25 -0
- package/dist/src/concepts/BatchAssignment__.d.ts +244 -0
- package/dist/src/concepts/BinaryExpression__.d.ts +61 -0
- package/dist/src/concepts/BindAttribute__.d.ts +284 -0
- package/dist/src/concepts/BindDirective__.d.ts +156 -0
- package/dist/src/concepts/BindEvent__.d.ts +246 -0
- package/dist/src/concepts/BindStyle__.d.ts +127 -0
- package/dist/src/concepts/Block__.d.ts +88 -0
- package/dist/src/concepts/BooleanLiteral__.d.ts +44 -0
- package/dist/src/concepts/BusinessComponent__.d.ts +640 -0
- package/dist/src/concepts/BusinessLogic__.d.ts +44 -0
- package/dist/src/concepts/CallAuthInterface__.d.ts +132 -0
- package/dist/src/concepts/CallConnector__.d.ts +55 -0
- package/dist/src/concepts/CallEvent__.d.ts +100 -0
- package/dist/src/concepts/CallFunction__.d.ts +171 -0
- package/dist/src/concepts/CallInterface__.d.ts +143 -0
- package/dist/src/concepts/CallLogic__.d.ts +224 -0
- package/dist/src/concepts/CallQueryComponent__.d.ts +383 -0
- package/dist/src/concepts/CapsulesSetter__.d.ts +109 -0
- package/dist/src/concepts/Comment__.d.ts +41 -0
- package/dist/src/concepts/CompletionProperty__.d.ts +87 -0
- package/dist/src/concepts/ConfigGroup__.d.ts +121 -0
- package/dist/src/concepts/ConfigPropertyValue__.d.ts +42 -0
- package/dist/src/concepts/ConfigProperty__.d.ts +147 -0
- package/dist/src/concepts/Configuration__.d.ts +120 -0
- package/dist/src/concepts/Connection__.d.ts +159 -0
- package/dist/src/concepts/ConnectorLogic__.d.ts +33 -0
- package/dist/src/concepts/ConnectorTriggerLauncher__.d.ts +44 -0
- package/dist/src/concepts/ConnectorTrigger__.d.ts +76 -0
- package/dist/src/concepts/Connector__.d.ts +532 -0
- package/dist/src/concepts/Constant__.d.ts +94 -0
- package/dist/src/concepts/CountersignPolicy__.d.ts +29 -0
- package/dist/src/concepts/DataSource__.d.ts +163 -0
- package/dist/src/concepts/DatabaseTypeAnnotation__.d.ts +35 -0
- package/dist/src/concepts/DefaultValue__.d.ts +94 -0
- package/dist/src/concepts/Destination__.d.ts +150 -0
- package/dist/src/concepts/End__.d.ts +30 -0
- package/dist/src/concepts/EntityIndex__.d.ts +93 -0
- package/dist/src/concepts/EntityProperty__.d.ts +255 -0
- package/dist/src/concepts/Entity__.d.ts +332 -0
- package/dist/src/concepts/EnumItem__.d.ts +83 -0
- package/dist/src/concepts/EnumSelectSetter__.d.ts +109 -0
- package/dist/src/concepts/Enum__.d.ts +133 -0
- package/dist/src/concepts/EventDeclaration__.d.ts +41 -0
- package/dist/src/concepts/Event__.d.ts +149 -0
- package/dist/src/concepts/ExternalDestination__.d.ts +63 -0
- package/dist/src/concepts/ForEachStatement__.d.ts +126 -0
- package/dist/src/concepts/FrontendLibrary__.d.ts +208 -0
- package/dist/src/concepts/FrontendType__.d.ts +304 -0
- package/dist/src/concepts/FrontendVariable__.d.ts +41 -0
- package/dist/src/concepts/Frontend__.d.ts +389 -0
- package/dist/src/concepts/Function__.d.ts +399 -0
- package/dist/src/concepts/I18nInfo__.d.ts +47 -0
- package/dist/src/concepts/IconSetter__.d.ts +29 -0
- package/dist/src/concepts/Identifier__.d.ts +66 -0
- package/dist/src/concepts/IfStatement__.d.ts +155 -0
- package/dist/src/concepts/ImageSetter__.d.ts +25 -0
- package/dist/src/concepts/ImportedInterface__.d.ts +29 -0
- package/dist/src/concepts/InputSetter__.d.ts +29 -0
- package/dist/src/concepts/Integration__.d.ts +127 -0
- package/dist/src/concepts/InterfaceParam__.d.ts +119 -0
- package/dist/src/concepts/InterfaceTriggerEvent__.d.ts +34 -0
- package/dist/src/concepts/Interface__.d.ts +323 -0
- package/dist/src/concepts/JSBlock__.d.ts +38 -0
- package/dist/src/concepts/JavaLogic__.d.ts +50 -0
- package/dist/src/concepts/LogicDeclaration__.d.ts +289 -0
- package/dist/src/concepts/LogicItem__.d.ts +171 -0
- package/dist/src/concepts/Logic__.d.ts +632 -0
- package/dist/src/concepts/MatchCase__.d.ts +264 -0
- package/dist/src/concepts/Match__.d.ts +122 -0
- package/dist/src/concepts/MemberExpression__.d.ts +64 -0
- package/dist/src/concepts/MetadataType__.d.ts +220 -0
- package/dist/src/concepts/MicroApp__.d.ts +53 -0
- package/dist/src/concepts/Module__.d.ts +1142 -0
- package/dist/src/concepts/MsgTriggerEvent__.d.ts +138 -0
- package/dist/src/concepts/MsgTriggerLauncher__.d.ts +119 -0
- package/dist/src/concepts/MultiApprovalPolicy__.d.ts +25 -0
- package/dist/src/concepts/Namespace__.d.ts +1060 -0
- package/dist/src/concepts/NewComposite__.d.ts +346 -0
- package/dist/src/concepts/NewList__.d.ts +135 -0
- package/dist/src/concepts/NewMap__.d.ts +226 -0
- package/dist/src/concepts/New__.d.ts +30 -0
- package/dist/src/concepts/NullLiteral__.d.ts +36 -0
- package/dist/src/concepts/NumberInputSetter__.d.ts +45 -0
- package/dist/src/concepts/NumericLiteral__.d.ts +53 -0
- package/dist/src/concepts/OqlQueryComponent__.d.ts +67 -0
- package/dist/src/concepts/OverriddenLogic__.d.ts +615 -0
- package/dist/src/concepts/Paginate__.d.ts +59 -0
- package/dist/src/concepts/ParamWithGroup__.d.ts +44 -0
- package/dist/src/concepts/Param__.d.ts +140 -0
- package/dist/src/concepts/Point__.d.ts +33 -0
- package/dist/src/concepts/ProcessComponent__.d.ts +214 -0
- package/dist/src/concepts/ProcessElement__.d.ts +620 -0
- package/dist/src/concepts/ProcessOutcome__.d.ts +35 -0
- package/dist/src/concepts/ProcessOutcomes__.d.ts +35 -0
- package/dist/src/concepts/Process__.d.ts +605 -0
- package/dist/src/concepts/PropDeclaration__.d.ts +99 -0
- package/dist/src/concepts/PropertySelectSetter__.d.ts +25 -0
- package/dist/src/concepts/QueryAggregateExpression__.d.ts +50 -0
- package/dist/src/concepts/QueryFieldExpression__.d.ts +66 -0
- package/dist/src/concepts/QueryFromExpression__.d.ts +107 -0
- package/dist/src/concepts/QueryGroupByExpression__.d.ts +46 -0
- package/dist/src/concepts/QueryJoinExpression__.d.ts +194 -0
- package/dist/src/concepts/QueryLimitExpression__.d.ts +46 -0
- package/dist/src/concepts/QueryOrderByExpression__.d.ts +57 -0
- package/dist/src/concepts/QuerySelectExpression__.d.ts +213 -0
- package/dist/src/concepts/Rect__.d.ts +41 -0
- package/dist/src/concepts/Return__.d.ts +120 -0
- package/dist/src/concepts/Role__.d.ts +58 -0
- package/dist/src/concepts/SelectMembers__.d.ts +134 -0
- package/dist/src/concepts/SequentialPolicy__.d.ts +25 -0
- package/dist/src/concepts/SetterOption__.d.ts +49 -0
- package/dist/src/concepts/SlotDeclaration__.d.ts +213 -0
- package/dist/src/concepts/Slot__.d.ts +53 -0
- package/dist/src/concepts/SqlQueryComponent__.d.ts +63 -0
- package/dist/src/concepts/Start__.d.ts +30 -0
- package/dist/src/concepts/StaticString__.d.ts +49 -0
- package/dist/src/concepts/StringInterpolation__.d.ts +122 -0
- package/dist/src/concepts/StringLiteral__.d.ts +51 -0
- package/dist/src/concepts/StructureProperty__.d.ts +119 -0
- package/dist/src/concepts/Structure__.d.ts +243 -0
- package/dist/src/concepts/SwitchCase__.d.ts +91 -0
- package/dist/src/concepts/SwitchSetter__.d.ts +25 -0
- package/dist/src/concepts/SwitchStatement__.d.ts +90 -0
- package/dist/src/concepts/ThemeVariable__.d.ts +29 -0
- package/dist/src/concepts/Theme__.d.ts +39 -0
- package/dist/src/concepts/Transactional__.d.ts +85 -0
- package/dist/src/concepts/TriggerEvent__.d.ts +42 -0
- package/dist/src/concepts/TriggerLauncher__.d.ts +76 -0
- package/dist/src/concepts/TypeAnnotation__.d.ts +303 -0
- package/dist/src/concepts/TypeParam__.d.ts +34 -0
- package/dist/src/concepts/UnaryExpression__.d.ts +45 -0
- package/dist/src/concepts/Unparsed__.d.ts +41 -0
- package/dist/src/concepts/UseComponent__.d.ts +33 -0
- package/dist/src/concepts/ValidationRule__.d.ts +133 -0
- package/dist/src/concepts/Variable__.d.ts +137 -0
- package/dist/src/concepts/ViewBlockWithImage__.d.ts +33 -0
- package/dist/src/concepts/ViewBlock__.d.ts +37 -0
- package/dist/src/concepts/ViewComponentDeclaration__.d.ts +721 -0
- package/dist/src/concepts/ViewElement__.d.ts +652 -0
- package/dist/src/concepts/View__.d.ts +728 -0
- package/dist/src/concepts/WhileStatement__.d.ts +94 -0
- package/dist/src/concepts/basics/constants.d.ts +1 -0
- package/dist/src/concepts/basics/stdlib/index.d.ts +16 -0
- package/dist/src/concepts/basics/stdlib/nasl.auth.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.browser.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.collection.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.configuration.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.core.d.ts +7 -0
- package/dist/src/concepts/basics/stdlib/nasl.event.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.http.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.interface.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.io.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.logging.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/nasl.process.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.ui.d.ts +9 -0
- package/dist/src/concepts/basics/stdlib/nasl.util.d.ts +6 -0
- package/dist/src/concepts/basics/stdlib/nasl.validation.d.ts +5 -0
- package/dist/src/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +4 -0
- package/dist/src/concepts/basics/stdlib/timeZone.d.ts +5 -0
- package/dist/src/concepts/basics/types/coreTypeList.d.ts +2 -0
- package/dist/src/concepts/basics/types/index.d.ts +17 -0
- package/dist/src/concepts/index.d.ts +7 -0
- package/dist/src/concepts/index__.d.ts +156 -0
- package/dist/src/concepts/utils/asserts.d.ts +7825 -0
- package/dist/src/concepts/utils/quick-info.d.ts +13 -0
- package/dist/src/concepts/utils/types.d.ts +510 -0
- package/dist/src/config.d.ts +52 -0
- package/dist/src/decorators/index.d.ts +67 -0
- package/dist/src/decorators/promise.d.ts +7 -0
- package/dist/src/enums/KEYWORDS.d.ts +6 -0
- package/dist/src/enums/LEVEL_NAME_MAP.d.ts +26 -0
- package/dist/src/eventBus.d.ts +3 -0
- package/dist/src/generator/compileComponent.d.ts +11 -0
- package/dist/src/generator/genBundleFiles.d.ts +37 -0
- package/dist/src/generator/genHash.d.ts +7 -0
- package/dist/src/generator/genMetaData.d.ts +31 -0
- package/dist/src/generator/icestark.d.ts +2 -0
- package/dist/src/generator/index.d.ts +7 -0
- package/dist/src/generator/microApp.d.ts +2 -0
- package/dist/src/generator/permission.d.ts +14 -0
- package/dist/src/generator/qiankun.d.ts +2 -0
- package/dist/src/generator/release-body/body.d.ts +42 -0
- package/dist/src/generator/release-body/data.d.ts +45 -0
- package/dist/src/generator/release-body/index.d.ts +2 -0
- package/dist/src/generator/release-body/internal.d.ts +622 -0
- package/dist/src/generator/release-body/types.d.ts +57 -0
- package/dist/src/generator/release-body/utils.d.ts +418 -0
- package/dist/src/generator/release-body/validation.d.ts +3 -0
- package/dist/src/generator/styleReplacer.d.ts +3 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/manager/diagnostic.d.ts +39 -0
- package/dist/src/manager/stepRecorder.d.ts +20 -0
- package/dist/src/natural/componentData.d.ts +31 -0
- package/dist/src/natural/genNaturalTS.d.ts +241 -0
- package/dist/src/natural/index.d.ts +6 -0
- package/dist/src/natural/naslStdlibMap.d.ts +1 -0
- package/dist/src/natural/prompt/analyzeClaims.d.ts +1 -0
- package/dist/src/natural/prompt/analyzeFormatOutput.d.ts +1 -0
- package/dist/src/natural/prompt/analyzeTasks.d.ts +1 -0
- package/dist/src/natural/prompt/executeClaims.d.ts +1 -0
- package/dist/src/natural/transformTSCode.d.ts +7 -0
- package/dist/src/sentry/index.d.ts +34 -0
- package/dist/src/server/createUiTs.d.ts +17 -0
- package/dist/src/server/entity2LogicNamespace.d.ts +10 -0
- package/dist/src/server/event.d.ts +30 -0
- package/dist/src/server/extendBaseNode.d.ts +1 -0
- package/dist/src/server/formatTsUtils.d.ts +36 -0
- package/dist/src/server/getConnector.d.ts +15 -0
- package/dist/src/server/getExtensionModules.d.ts +3 -0
- package/dist/src/server/getFunctions.d.ts +3 -0
- package/dist/src/server/getInterfaces.d.ts +2 -0
- package/dist/src/server/getLogging.d.ts +1 -0
- package/dist/src/server/getLogics.d.ts +5 -0
- package/dist/src/server/getMemberIdentifier.d.ts +17 -0
- package/dist/src/server/getProcessComponents.d.ts +2 -0
- package/dist/src/server/getProcesses.d.ts +33 -0
- package/dist/src/server/getScope.d.ts +13 -0
- package/dist/src/server/getValidates.d.ts +3 -0
- package/dist/src/server/index.d.ts +5 -0
- package/dist/src/server/naslServer.d.ts +391 -0
- package/dist/src/server/naslStdlibMap.d.ts +2 -0
- package/dist/src/server/process2LogicNamespace.d.ts +26 -0
- package/dist/src/server/translator.d.ts +26 -0
- package/dist/src/service/creator/add.configs.d.ts +1 -0
- package/dist/src/service/creator/errHandles.d.ts +18 -0
- package/dist/src/service/creator/index.d.ts +1 -0
- package/dist/src/service/datasource/api.d.ts +12 -0
- package/dist/src/service/datasource/index.d.ts +2 -0
- package/dist/src/service/logic/api.d.ts +9 -0
- package/dist/src/service/logic/checktypeSocket.d.ts +5 -0
- package/dist/src/service/logic/index.d.ts +2 -0
- package/dist/src/service/storage/api.d.ts +54 -0
- package/dist/src/service/storage/index.d.ts +2 -0
- package/dist/src/service/storage/init.d.ts +105 -0
- package/dist/src/service/storage/jsoner.d.ts +36 -0
- package/dist/src/service/storage/map.d.ts +4 -0
- package/dist/src/service/storage/service.d.ts +25 -0
- package/dist/src/service/storage/storagePoint.d.ts +17 -0
- package/dist/src/service/video/BaseService.d.ts +7 -0
- package/dist/src/service/video/MainCallbackService.d.ts +12 -0
- package/dist/src/service/video/VideoTranscribe.d.ts +15 -0
- package/dist/src/service/video/publishService.d.ts +1 -0
- package/dist/src/templator/genCallComponentLogic.d.ts +17 -0
- package/dist/src/templator/genCreateBlock.d.ts +10 -0
- package/dist/src/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
- package/dist/src/templator/genCurdMultipleKeyBlock.d.ts +61 -0
- package/dist/src/templator/genEditTableBlock.d.ts +51 -0
- package/dist/src/templator/genEnumSelectBlock.d.ts +10 -0
- package/dist/src/templator/genGetBlock.d.ts +6 -0
- package/dist/src/templator/genGridViewBlock.d.ts +55 -0
- package/dist/src/templator/genListViewBlock.d.ts +19 -0
- package/dist/src/templator/genQueryComponent.d.ts +34 -0
- package/dist/src/templator/genSelectBlock.d.ts +45 -0
- package/dist/src/templator/genTableBlock.d.ts +55 -0
- package/dist/src/templator/genUpdateBlock.d.ts +6 -0
- package/dist/src/templator/index.d.ts +19 -0
- package/dist/src/templator/utils.d.ts +683 -0
- package/dist/src/translator/constant.d.ts +6 -0
- package/dist/src/translator/index.d.ts +3 -0
- package/dist/src/translator/types.d.ts +85 -0
- package/dist/src/translator/utils.d.ts +47 -0
- package/dist/src/utils/cookie.d.ts +9 -0
- package/dist/src/utils/create.d.ts +2 -0
- package/dist/src/utils/env.d.ts +2 -0
- package/dist/src/utils/file.d.ts +33 -0
- package/dist/src/utils/i18nInfo.d.ts +5 -0
- package/dist/src/utils/index.d.ts +72 -0
- package/dist/src/utils/logger.d.ts +8 -0
- package/dist/src/utils/sortTsString.d.ts +1 -0
- package/dist/src/utils/string.d.ts +64 -0
- package/dist/src/utils/time-slicing/constant.d.ts +35 -0
- package/dist/src/utils/time-slicing/controller.d.ts +53 -0
- package/dist/src/utils/time-slicing/index.d.ts +5 -0
- package/dist/src/utils/time-slicing/page-state.d.ts +2 -0
- package/dist/src/utils/time-slicing/performance.d.ts +11 -0
- package/dist/src/utils/time-slicing/runner.d.ts +12 -0
- package/dist/src/utils/time-slicing/tool.d.ts +24 -0
- package/dist/src/utils/time-slicing/utils.d.ts +62 -0
- package/dist/src/utils/time-slicing/wrapper.d.ts +18 -0
- package/dist/src/utils/traverse.d.ts +36 -0
- package/dist/src/utils/types.d.ts +13 -0
- package/dist/src/utils/window.d.ts +7 -0
- package/dist/test/concepts/anonymous-function/constant.d.ts +2 -0
- package/dist/test/concepts/anonymous-function/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/anonymous-function/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/anonymous-function/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/assignment/constant.d.ts +2 -0
- package/dist/test/concepts/assignment/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/assignment/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/assignment/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/batch-assignment/constant.d.ts +2 -0
- package/dist/test/concepts/batch-assignment/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/batch-assignment/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/batch-assignment/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/constant.d.ts +2 -0
- package/dist/test/concepts/binary-expression/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/binary-expression/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/boolean-literal/constant.d.ts +2 -0
- package/dist/test/concepts/boolean-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/boolean-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/boolean-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/call-function/constant.d.ts +2 -0
- package/dist/test/concepts/call-function/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/call-function/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/call-function/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/call-interface/constant.d.ts +2 -0
- package/dist/test/concepts/call-interface/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/call-interface/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/call-interface/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/constant.d.ts +2 -0
- package/dist/test/concepts/call-logic/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toUI.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/call-logic/toVueDesigner.spec.d.ts +1 -0
- package/dist/test/concepts/data-source/constant.d.ts +2 -0
- package/dist/test/concepts/data-source/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/data-source/toEmbeddedTSFile.spec.d.ts +1 -0
- package/dist/test/concepts/entity/constant.d.ts +2 -0
- package/dist/test/concepts/entity/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/entity/toEmbeddedTSFile.spec.d.ts +1 -0
- package/dist/test/concepts/identifier/constant.d.ts +2 -0
- package/dist/test/concepts/identifier/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/identifier/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/identifier/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/match/constant.d.ts +2 -0
- package/dist/test/concepts/match/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/match/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/member-expression/constant.d.ts +2 -0
- package/dist/test/concepts/member-expression/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/member-expression/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/member-expression/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/new-composite/constant.d.ts +2 -0
- package/dist/test/concepts/new-composite/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/new-composite/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/new-composite/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/new-list/constant.d.ts +2 -0
- package/dist/test/concepts/new-list/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/new-list/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/new-list/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/new-map/constant.d.ts +2 -0
- package/dist/test/concepts/new-map/getQuickInfoOffset.spec.d.ts +1 -0
- package/dist/test/concepts/new-map/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/new-map/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/null-literal/constant.d.ts +2 -0
- package/dist/test/concepts/null-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/null-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/null-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/numeric-literal/constant.d.ts +2 -0
- package/dist/test/concepts/numeric-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/numeric-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/numeric-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/string-literal/constant.d.ts +2 -0
- package/dist/test/concepts/string-literal/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/string-literal/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/string-literal/toVue.spec.d.ts +1 -0
- package/dist/test/concepts/utils.d.ts +13 -0
- package/dist/test/concepts/validation-rule/constant.d.ts +2 -0
- package/dist/test/concepts/validation-rule/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/validation-rule/toJS.spec.d.ts +1 -0
- package/dist/test/concepts/validation-rule/validation-rule.spec.d.ts +1 -0
- package/dist/test/concepts/view-element/constant.d.ts +2 -0
- package/dist/test/concepts/view-element/toEmbeddedTS.spec.d.ts +1 -0
- package/dist/test/concepts/view-element/toVue.spec.d.ts +1 -0
- package/dist/test/setup.d.ts +1 -0
- package/dist/test/time-slicing/runner.spec.d.ts +1 -0
- package/dist/test/time-slicing/time-slicing-nodejs.spec.d.ts +1 -0
- package/dist/test/time-slicing/utils.d.ts +1 -0
- package/dist/test/time-slicing/wrapper.spec.d.ts +1 -0
- package/out/automate/engine/utils.js +1 -1
- package/out/automate/engine/utils.js.map +1 -1
- package/out/bak/translator.js +12 -12
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.js +3 -3
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/App__.d.ts +6 -2
- package/out/concepts/App__.js +32 -16
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Argument__.js +5 -0
- package/out/concepts/Argument__.js.map +1 -1
- package/out/concepts/AuthLogicForCallInterface__.d.ts +1 -0
- package/out/concepts/AuthLogicForCallInterface__.js +15 -4
- package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
- package/out/concepts/CallAuthInterface__.d.ts +1 -0
- package/out/concepts/CallAuthInterface__.js +14 -1
- package/out/concepts/CallAuthInterface__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +9 -1
- package/out/concepts/CallInterface__.js +105 -16
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +12 -6
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/Connection__.d.ts +2 -1
- package/out/concepts/ConnectorLogic__.d.ts +33 -0
- package/out/concepts/ConnectorLogic__.js +69 -0
- package/out/concepts/ConnectorLogic__.js.map +1 -0
- package/out/concepts/ConnectorTriggerLauncher__.d.ts +44 -0
- package/out/concepts/ConnectorTriggerLauncher__.js +99 -0
- package/out/concepts/ConnectorTriggerLauncher__.js.map +1 -0
- package/out/concepts/ConnectorTrigger__.d.ts +5 -4
- package/out/concepts/ConnectorTrigger__.js +39 -4
- package/out/concepts/ConnectorTrigger__.js.map +1 -1
- package/out/concepts/Connector__.d.ts +1 -0
- package/out/concepts/Connector__.js +5 -0
- package/out/concepts/Connector__.js.map +1 -1
- package/out/concepts/End__.js +1 -0
- package/out/concepts/End__.js.map +1 -1
- package/out/concepts/Frontend__.js +1 -0
- package/out/concepts/Frontend__.js.map +1 -1
- package/out/concepts/Integration__.d.ts +1 -0
- package/out/concepts/Integration__.js +4 -0
- package/out/concepts/Integration__.js.map +1 -1
- package/out/concepts/InterfaceTriggerEvent__.d.ts +34 -0
- package/out/concepts/InterfaceTriggerEvent__.js +72 -0
- package/out/concepts/InterfaceTriggerEvent__.js.map +1 -0
- package/out/concepts/Interface__.d.ts +3 -3
- package/out/concepts/Interface__.js +7 -6
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +5 -0
- package/out/concepts/LogicItem__.js +7 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +1 -1
- package/out/concepts/Logic__.js +4 -4
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Module__.js +1 -0
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/MsgTriggerLauncher__.d.ts +3 -10
- package/out/concepts/MsgTriggerLauncher__.js +6 -19
- package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.js +2 -1
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/Param__.js +3 -1
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/Structure__.js +4 -4
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/TriggerEvent__.d.ts +2 -2
- package/out/concepts/TriggerEvent__.js +1 -1
- package/out/concepts/TriggerEvent__.js.map +1 -1
- package/out/concepts/TriggerLauncher__.d.ts +1 -1
- package/out/concepts/TriggerLauncher__.js +18 -1
- package/out/concepts/TriggerLauncher__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +1 -0
- package/out/concepts/ViewElement__.js +7 -0
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +3 -2
- package/out/concepts/View__.js +11 -18
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.browser.js +42 -0
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.configuration.js +8 -0
- package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -1
- package/out/concepts/index__.d.ts +3 -0
- package/out/concepts/index__.js +3 -0
- package/out/concepts/index__.js.map +1 -1
- package/out/concepts/utils/asserts.d.ts +145 -17
- package/out/concepts/utils/asserts.js +212 -39
- package/out/concepts/utils/asserts.js.map +1 -1
- package/out/concepts/utils/types.d.ts +15 -4
- package/out/generator/genBundleFiles.js +15 -2
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/genMetaData.js +1 -0
- package/out/generator/genMetaData.js.map +1 -1
- package/out/generator/permission.js +1 -0
- package/out/generator/permission.js.map +1 -1
- package/out/generator/release-body/body.d.ts +1 -0
- package/out/generator/release-body/body.js +8 -6
- package/out/generator/release-body/body.js.map +1 -1
- package/out/generator/release-body/data.d.ts +1 -0
- package/out/generator/release-body/data.js +11 -8
- package/out/generator/release-body/data.js.map +1 -1
- package/out/generator/release-body/internal.d.ts +1 -0
- package/out/generator/release-body/internal.js.map +1 -1
- package/out/generator/release-body/types.d.ts +3 -1
- package/out/manager/diagnostic.d.ts +6 -2
- package/out/manager/diagnostic.js +28 -23
- package/out/manager/diagnostic.js.map +1 -1
- package/out/natural/genNaturalTS.d.ts +8 -8
- package/out/natural/genNaturalTS.js +41 -41
- package/out/natural/prompt/analyzeClaims.js +4 -3
- package/out/natural/prompt/analyzeClaims.js.map +1 -1
- package/out/natural/prompt/analyzeFormatOutput.js +1 -1
- package/out/natural/prompt/analyzeTasks.js +2 -2
- package/out/natural/transformTSCode.js +31 -3
- package/out/natural/transformTSCode.js.map +1 -1
- package/out/server/extendBaseNode.js +36 -3
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.d.ts +1 -1
- package/out/server/formatTsUtils.js +7 -3
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getConnector.d.ts +4 -4
- package/out/server/getConnector.js +3 -3
- package/out/server/getConnector.js.map +1 -1
- package/out/server/getExtensionModules.d.ts +1 -1
- package/out/server/getLogics.js +20 -6
- package/out/server/getLogics.js.map +1 -1
- package/out/server/naslServer.d.ts +5 -4
- package/out/server/naslServer.js +94 -61
- package/out/server/naslServer.js.map +1 -1
- package/out/service/storage/init.js +1 -1
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +2 -2
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +2 -3
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +5 -4
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/utils/delay/index.d.ts +0 -0
- package/out/utils/delay/index.js +1 -0
- package/out/utils/delay/index.js.map +1 -0
- package/out/utils/delay.d.ts +9 -0
- package/out/utils/delay.js +41 -0
- package/out/utils/delay.js.map +1 -0
- package/out/utils/env.d.ts +4 -0
- package/out/utils/env.js +6 -1
- package/out/utils/env.js.map +1 -1
- package/out/utils/index.d.ts +5 -0
- package/out/utils/index.js +36 -1
- package/out/utils/index.js.map +1 -1
- package/out/utils/time-slicing/controller.js +4 -2
- package/out/utils/time-slicing/controller.js.map +1 -1
- package/out/utils/time-slicing/page-state.d.ts +1 -1
- package/out/utils/time-slicing/page-state.js +3 -9
- package/out/utils/time-slicing/page-state.js.map +1 -1
- package/package.json +1 -1
- package/sandbox/stdlib/nasl.browser.ts +5 -0
- package/sandbox-natural/stdlib/nasl.core.ts +0 -2
- package/src/automate/engine/utils.js +1 -1
- package/src/bak/translator.js +13 -13
- package/src/common/BaseNode.ts +3 -3
- package/src/concepts/App__.ts +34 -18
- package/src/concepts/Argument__.ts +6 -0
- package/src/concepts/AuthLogicForCallInterface__.ts +15 -4
- package/src/concepts/CallAuthInterface__.ts +18 -1
- package/src/concepts/CallInterface__.ts +121 -16
- package/src/concepts/CallLogic__.ts +14 -7
- package/src/concepts/Connection__.ts +1 -1
- package/src/concepts/ConnectorLogic__.ts +84 -0
- package/src/concepts/ConnectorTriggerLauncher__.ts +117 -0
- package/src/concepts/ConnectorTrigger__.ts +38 -5
- package/src/concepts/Connector__.ts +6 -0
- package/src/concepts/End__.ts +1 -0
- package/src/concepts/Frontend__.ts +1 -0
- package/src/concepts/Integration__.ts +6 -0
- package/src/concepts/InterfaceTriggerEvent__.ts +88 -0
- package/src/concepts/Interface__.ts +9 -8
- package/src/concepts/LogicItem__.ts +8 -1
- package/src/concepts/Logic__.ts +6 -5
- package/src/concepts/MatchCase__.ts +1 -0
- package/src/concepts/Module__.ts +2 -1
- package/src/concepts/MsgTriggerLauncher__.ts +7 -23
- package/src/concepts/OqlQueryComponent__.ts +18 -17
- package/src/concepts/Param__.ts +3 -1
- package/src/concepts/Structure__.ts +4 -4
- package/src/concepts/TriggerEvent__.ts +3 -3
- package/src/concepts/TriggerLauncher__.ts +19 -2
- package/src/concepts/ViewElement__.ts +11 -1
- package/src/concepts/View__.ts +12 -20
- package/src/concepts/basics/stdlib/nasl.browser.ts +42 -0
- package/src/concepts/basics/stdlib/nasl.configuration.ts +8 -0
- package/src/concepts/index__.ts +3 -0
- package/src/concepts/utils/asserts.ts +212 -24
- package/src/concepts/utils/types.ts +25 -6
- package/src/generator/genBundleFiles.ts +14 -4
- package/src/generator/genMetaData.ts +1 -0
- package/src/generator/permission.ts +1 -0
- package/src/generator/release-body/body.ts +10 -7
- package/src/generator/release-body/data.ts +11 -8
- package/src/generator/release-body/internal.ts +1 -0
- package/src/generator/release-body/types.ts +3 -1
- package/src/manager/diagnostic.ts +35 -31
- package/src/natural/genNaturalTS.ts +41 -41
- package/src/natural/prompt/analyzeClaims.ts +4 -3
- package/src/natural/prompt/analyzeFormatOutput.ts +1 -1
- package/src/natural/prompt/analyzeTasks.ts +2 -2
- package/src/natural/transformTSCode.ts +32 -4
- package/src/server/extendBaseNode.ts +35 -4
- package/src/server/formatTsUtils.ts +6 -3
- package/src/server/getConnector.ts +7 -7
- package/src/server/getLogics.ts +21 -6
- package/src/server/naslServer.ts +107 -64
- package/src/service/storage/init.ts +1 -1
- package/src/templator/genCreateBlock.ts +2 -2
- package/src/templator/genCurdEditMultipleKeyBlock.ts +1 -1
- package/src/templator/genCurdMultipleKeyBlock.ts +2 -3
- package/src/templator/genUpdateBlock.ts +5 -4
- package/src/utils/delay/index.ts +0 -0
- package/src/utils/delay.ts +41 -0
- package/src/utils/env.ts +7 -0
- package/src/utils/index.ts +36 -1
- package/src/utils/time-slicing/controller.ts +5 -3
- package/src/utils/time-slicing/page-state.ts +1 -9
- package/test/concepts/view-element/__snapshots__/toVue.spec.ts.snap +2 -2
- package/ts-worker/src/index.js +4 -3
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Worker } from 'worker_threads';
|
|
3
|
+
import * as tsProtocol from 'typescript/lib/protocol';
|
|
4
|
+
import type { AxiosInstance } from 'axios';
|
|
5
|
+
import Messager from '../common/Messager';
|
|
6
|
+
import { Module, BaseNode, App, Logic, TypeAnnotation, Param, Argument, ViewElement, CallInterface, Connector, Connection, types } from '../concepts';
|
|
7
|
+
import * as utils from '../utils';
|
|
8
|
+
import { SourceMapItem } from '../translator';
|
|
9
|
+
import { MinRange } from './translator';
|
|
10
|
+
import { EventPayload } from '../common';
|
|
11
|
+
import { Diagnostic, DiagnosticManager } from '../manager/diagnostic';
|
|
12
|
+
import { EventEmitter } from '../common/EventEmitter';
|
|
13
|
+
interface RenameMinRange extends MinRange {
|
|
14
|
+
newValue?: any;
|
|
15
|
+
setTypeMethods?: string;
|
|
16
|
+
}
|
|
17
|
+
interface QuoteNode {
|
|
18
|
+
icon: any;
|
|
19
|
+
node: BaseNode;
|
|
20
|
+
expanded: boolean;
|
|
21
|
+
children?: QuoteNode[];
|
|
22
|
+
}
|
|
23
|
+
export interface UiTsOptions {
|
|
24
|
+
tsCode: string;
|
|
25
|
+
baseComponents: Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
export interface NaslServerOptions {
|
|
28
|
+
http: AxiosInstance;
|
|
29
|
+
logger?: utils.Logger;
|
|
30
|
+
}
|
|
31
|
+
declare type QuickInfoNodes = Array<{
|
|
32
|
+
filePath: string;
|
|
33
|
+
node: BaseNode;
|
|
34
|
+
item: SourceMapItem;
|
|
35
|
+
}>;
|
|
36
|
+
declare type QuickInfoMap = Map<BaseNode, TypeAnnotation | {
|
|
37
|
+
typeAnnotation: TypeAnnotation;
|
|
38
|
+
option: any;
|
|
39
|
+
}>;
|
|
40
|
+
export declare function getDisplayString2Type(displayString: string): string[];
|
|
41
|
+
declare class NaslServer {
|
|
42
|
+
/** naslStdlib文件缓存 */
|
|
43
|
+
naslStdlibFileCacheMap: Map<string, tsProtocol.OpenRequestArgs>;
|
|
44
|
+
messager: Messager;
|
|
45
|
+
worker: Worker;
|
|
46
|
+
/**
|
|
47
|
+
* 按道理 fileSourceMap: new Map<string, SourceMap>() 比较合理,
|
|
48
|
+
* 但是要多维护一层 vertex 增删 -> file 增删的关系问题,
|
|
49
|
+
* 先用挂在点上面,简单的方法实现,后期再考虑解耦
|
|
50
|
+
*/
|
|
51
|
+
file2NodeMap: Map<string, BaseNode>;
|
|
52
|
+
/** TS 翻译的源码 */
|
|
53
|
+
tsFiles: Map<string, string>;
|
|
54
|
+
/**
|
|
55
|
+
* 调试时是否储存 ts 文件
|
|
56
|
+
*/
|
|
57
|
+
openDebugEmbedded: boolean;
|
|
58
|
+
elementsLogic: {
|
|
59
|
+
[elementLogicName: string]: Array<Logic>;
|
|
60
|
+
};
|
|
61
|
+
diagnosticManager: DiagnosticManager;
|
|
62
|
+
embeddedTSEmitter: EventEmitter;
|
|
63
|
+
changeStackList: Array<EventPayload>;
|
|
64
|
+
filesToCheck: Set<string>;
|
|
65
|
+
singleFileChangeIng: Boolean;
|
|
66
|
+
logicSetWithComponentLogic: Set<string>;
|
|
67
|
+
performance: boolean;
|
|
68
|
+
http: AxiosInstance;
|
|
69
|
+
logger: utils.Logger;
|
|
70
|
+
constructor(opt: NaslServerOptions);
|
|
71
|
+
start(): Promise<void>;
|
|
72
|
+
terminate(): void;
|
|
73
|
+
createUiTs(components: any, options: UiTsOptions): Promise<void>;
|
|
74
|
+
private contentToFile;
|
|
75
|
+
openApp(app: App, performance?: boolean): Promise<void>;
|
|
76
|
+
refreshApp(app: App): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* 初始化之前添加文件
|
|
79
|
+
*/
|
|
80
|
+
addFile(file: tsProtocol.OpenRequestArgs, { cache }?: {
|
|
81
|
+
cache?: boolean;
|
|
82
|
+
}): Promise<void>;
|
|
83
|
+
cacheFile(options: tsProtocol.OpenRequestArgs): void;
|
|
84
|
+
/**
|
|
85
|
+
* 只新增文件
|
|
86
|
+
* @param {*} files
|
|
87
|
+
*/
|
|
88
|
+
writeFiles(files: Array<tsProtocol.OpenRequestArgs>): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* 新增、修改
|
|
91
|
+
* 删除文件 文件用修改内容为空模拟,防止报错
|
|
92
|
+
* @param {*} args
|
|
93
|
+
*/
|
|
94
|
+
updateFiles(args: {
|
|
95
|
+
outputFiles: Array<tsProtocol.OpenRequestArgs>;
|
|
96
|
+
}): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* 清除一个目录下的所有文件
|
|
99
|
+
*/
|
|
100
|
+
deleteDirectoryFiles(args: {
|
|
101
|
+
directoryName: string;
|
|
102
|
+
}): Promise<void>;
|
|
103
|
+
_debugInFileStorage(node: BaseNode, openFiles: Array<tsProtocol.OpenRequestArgs>): Promise<void>;
|
|
104
|
+
open(): Promise<void>;
|
|
105
|
+
updateOpen(args: tsProtocol.UpdateOpenRequestArgs): Promise<void>;
|
|
106
|
+
fileReferences(filePath: string): Promise<void>;
|
|
107
|
+
references(args: tsProtocol.FileLocationRequestArgs): Promise<tsProtocol.ReferencesResponseBody>;
|
|
108
|
+
getValueSelectCompletion(node: BaseNode, value: string, noFilterList?: Array<string>): Promise<void>;
|
|
109
|
+
_getValueSelectCompletion(args: any): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* 获取 Convert 的可选类型
|
|
112
|
+
* @param node 传入当前已经选择的变量
|
|
113
|
+
* @returns 可以选择的类型数组
|
|
114
|
+
*/
|
|
115
|
+
getConvertTypeInfo(node: BaseNode): Promise<{
|
|
116
|
+
title: string;
|
|
117
|
+
children: TypeAnnotation[];
|
|
118
|
+
}[]>;
|
|
119
|
+
/**
|
|
120
|
+
* 获取表格的dataschema类型
|
|
121
|
+
* @param node 当前表格节点
|
|
122
|
+
* @param allType 是不是需要全部类型 默认不要
|
|
123
|
+
* @returns 全部类型的str 或者 最后一个.后的内容
|
|
124
|
+
*/
|
|
125
|
+
getDataSchemaType(node: BaseNode, allType?: boolean): Promise<string>;
|
|
126
|
+
getDataSchemaStructureOrTypeAnnotation(node: ViewElement): Promise<any>;
|
|
127
|
+
/**
|
|
128
|
+
* ts的 quickInfo方法,查询指定位置的详情
|
|
129
|
+
* @param args 文件信息数组
|
|
130
|
+
* @returns 查询到的
|
|
131
|
+
*/
|
|
132
|
+
_getTypeQuickinfo(args: any): {
|
|
133
|
+
responseRequired: boolean;
|
|
134
|
+
response: tsProtocol.QuickInfoResponseBody;
|
|
135
|
+
};
|
|
136
|
+
_getQuickInfoFull(args: Array<any>): {
|
|
137
|
+
responseRequired: boolean;
|
|
138
|
+
response: Array<tsProtocol.QuickInfoResponseBody>;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* 获取nasl节点的 指定位置的详情
|
|
142
|
+
* 而且可以返回正确类型
|
|
143
|
+
* @param args 文件信息数组
|
|
144
|
+
* @returns 查询到的
|
|
145
|
+
*/
|
|
146
|
+
getNaslNodeQuickInfoFull(args: Array<any>): Promise<{
|
|
147
|
+
responseRequired: boolean;
|
|
148
|
+
response: tsProtocol.QuickInfoResponseBody[];
|
|
149
|
+
}>;
|
|
150
|
+
_getTypeFull(args: Array<any>): {
|
|
151
|
+
responseRequired: boolean;
|
|
152
|
+
response: tsProtocol.QuickInfoResponseBody;
|
|
153
|
+
};
|
|
154
|
+
_getTypeBatch(args: Array<any>): {
|
|
155
|
+
responseRequired: boolean;
|
|
156
|
+
response: tsProtocol.QuickInfoResponseBody;
|
|
157
|
+
};
|
|
158
|
+
getNaslNodeTypeFull(args: Array<any>): Promise<{
|
|
159
|
+
responseRequired: boolean;
|
|
160
|
+
response: tsProtocol.QuickInfoResponseBody;
|
|
161
|
+
}>;
|
|
162
|
+
getNaslNodeTypeBatch(args: Array<any>): Promise<{
|
|
163
|
+
responseRequired: boolean;
|
|
164
|
+
response: tsProtocol.QuickInfoResponseBody;
|
|
165
|
+
}>;
|
|
166
|
+
/**
|
|
167
|
+
* 获取已经选中的内容的 下一级的内容
|
|
168
|
+
* @param node 已经选中的内容
|
|
169
|
+
* @param noFilterList 不过滤的key 的数据
|
|
170
|
+
* @returns 可以选择的数据数组
|
|
171
|
+
*/
|
|
172
|
+
getSelectNextCompletion(node: BaseNode, noFilterList?: Array<string>): Promise<void>;
|
|
173
|
+
_getSelectNextCompletion(args: any): Promise<void>;
|
|
174
|
+
getDiagnosticRecordsAndPushAll(fileNames?: Array<string>): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* 节点异常是只能挂载单个,如果已经了就不赋值了
|
|
177
|
+
*/
|
|
178
|
+
baseNodeAssignmentTsError(node: BaseNode, tsErrorDetail: Diagnostic): void;
|
|
179
|
+
private _resolveDiagnosticRecordsWithGenerator;
|
|
180
|
+
/**
|
|
181
|
+
* 处理诊断结果
|
|
182
|
+
* @param records 结果
|
|
183
|
+
* @returns 过滤或者转换后的诊断结果
|
|
184
|
+
*/
|
|
185
|
+
private _resolveDiagnosticRecords;
|
|
186
|
+
/**
|
|
187
|
+
* 判断是否是Javalogic
|
|
188
|
+
*/
|
|
189
|
+
_isJavalogic(node: Logic): boolean;
|
|
190
|
+
/**
|
|
191
|
+
* 额外的建议诊断
|
|
192
|
+
* @param fileNode 文件级别的节点
|
|
193
|
+
* @returns 诊断结果
|
|
194
|
+
*/
|
|
195
|
+
private _attachSuggestionDiagnosticsWithGenerator;
|
|
196
|
+
hasComponentLogics(expression: BaseNode): boolean;
|
|
197
|
+
/** 是否被 触发器依赖, 如果存在,返回第一个触发器对应的名称 */
|
|
198
|
+
isRefedByTriggerAndReturnFirstRef(fileNode: BaseNode): Promise<{
|
|
199
|
+
isRefedByTrigger: boolean;
|
|
200
|
+
fRefNames: string[];
|
|
201
|
+
}>;
|
|
202
|
+
/**
|
|
203
|
+
* 是否符合 触发器规则
|
|
204
|
+
* 规则:
|
|
205
|
+
*/
|
|
206
|
+
isTriggerRule(fileNode: Logic, fRefNames: string[]): {
|
|
207
|
+
isTriggerRule: boolean;
|
|
208
|
+
errorFRefNames: string[];
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* 额外的诊断
|
|
212
|
+
* @param fileNode 文件级别的节点
|
|
213
|
+
* @returns 诊断结果
|
|
214
|
+
*/
|
|
215
|
+
private _attachDiagnosticsWithGenerator;
|
|
216
|
+
_treeMetadataType2CoreType(type: TypeAnnotation, app: App): Generator<any, void, any>;
|
|
217
|
+
_isDuplicateCoreType(type: TypeAnnotation): Generator<any, boolean, any>;
|
|
218
|
+
checkNodeError(node: BaseNode, diagnostics: Diagnostic[]): any;
|
|
219
|
+
/**
|
|
220
|
+
* 判断当前CallInterface 对应的 Interface 是否含有鉴权方式
|
|
221
|
+
*/
|
|
222
|
+
hasAuth(node: CallInterface): boolean;
|
|
223
|
+
private existStructureFix;
|
|
224
|
+
/**
|
|
225
|
+
* 单个问题的诊断处理
|
|
226
|
+
* @param diagnostic 诊断问题
|
|
227
|
+
* @param fileNode 页面节点
|
|
228
|
+
* @returns 处理后的结果
|
|
229
|
+
*/
|
|
230
|
+
private _resolveDiagnosticWithGenerator;
|
|
231
|
+
/**
|
|
232
|
+
* 查找节点
|
|
233
|
+
*
|
|
234
|
+
* @description 生成器原型函数
|
|
235
|
+
*/
|
|
236
|
+
private _findMinRangeWithGenerator;
|
|
237
|
+
/**
|
|
238
|
+
* 查找节点
|
|
239
|
+
*
|
|
240
|
+
* @description 同步模式
|
|
241
|
+
*/
|
|
242
|
+
_findMinRange(...args: Parameters<NaslServer['_findMinRangeWithGenerator']>): MinRange;
|
|
243
|
+
/**
|
|
244
|
+
* 查看当前节点是不是有引用
|
|
245
|
+
* @param node 节点
|
|
246
|
+
* @returns 查找到的数组
|
|
247
|
+
*/
|
|
248
|
+
_isHaveRef(node: BaseNode): Promise<tsProtocol.ReferencesResponseItem[]>;
|
|
249
|
+
/**
|
|
250
|
+
* 查找引用,并且做一些 修改前的准备工作,
|
|
251
|
+
* 有引用有的话,就返回集合
|
|
252
|
+
* @param node 当前重命名的节点
|
|
253
|
+
* @param newValue 传递过来的新值,给MemberExpression用的比较特殊
|
|
254
|
+
* 而且,这个新值不一定会用到,MemberExpression在批量更新的时候,可以取到新的value, 这里需要位置信息防止 a.a.a.a 中的一个a发生修改
|
|
255
|
+
* @returns 找到的引用
|
|
256
|
+
*/
|
|
257
|
+
_renamePrepare(node: BaseNode, refsList: any[], newValue: string): RenameMinRange[];
|
|
258
|
+
_addParamsEffect(refsList: any[], node: Param): void;
|
|
259
|
+
_addParamsPrepare(node: BaseNode, refsList: any[], needAdd?: boolean): BaseNode;
|
|
260
|
+
findReferences(node: BaseNode): Promise<Map<any, any>>;
|
|
261
|
+
nodeFindRefNodes(node: BaseNode): Promise<BaseNode[]>;
|
|
262
|
+
_getTreeMap(minRange: MinRange, fileNode: BaseNode, resMap: Map<BaseNode, Array<Array<QuoteNode>>>, nodeMap: Map<BaseNode, QuoteNode>): void;
|
|
263
|
+
handleTreeMap(resMap: Map<BaseNode, Array<Array<QuoteNode>>>): Map<any, any>;
|
|
264
|
+
/**
|
|
265
|
+
* 处理tree的队列,把相同节点进行合并
|
|
266
|
+
* 这里把当前二维数组进行一个整合
|
|
267
|
+
* @param arr 当前页面下的queue的二维数组,一个数组下有多条链路
|
|
268
|
+
* @returns 最后要使用到的节点和对应的子集
|
|
269
|
+
*/
|
|
270
|
+
handleTreeQueue(queueLists: Array<Array<QuoteNode>>): QuoteNode;
|
|
271
|
+
/**
|
|
272
|
+
* 递归调用输出结果
|
|
273
|
+
* @param root 一个根节点
|
|
274
|
+
* @param map 当前所有节点的map对象
|
|
275
|
+
* @returns 当前节点,最后输出所有节点
|
|
276
|
+
*/
|
|
277
|
+
_recursionCreateResult(root: QuoteNode, map: Map<QuoteNode, Array<QuoteNode>>): QuoteNode;
|
|
278
|
+
/**
|
|
279
|
+
* 获取
|
|
280
|
+
* 当前this上下文 的Source 和 父级文件级别的节点
|
|
281
|
+
*/
|
|
282
|
+
getCurrentSource(node: BaseNode): {
|
|
283
|
+
currentSource: import("../translator").Range;
|
|
284
|
+
fileNode: utils.FileNode & types.SyntaxNode;
|
|
285
|
+
} | {
|
|
286
|
+
fileNode: utils.FileNode & types.SyntaxNode;
|
|
287
|
+
currentSource?: undefined;
|
|
288
|
+
};
|
|
289
|
+
handlingCurrentSourceException(currentSource: SourceMapItem, node: BaseNode): void;
|
|
290
|
+
getFieldKeySelectCompletion(node: BaseNode, fieldKey?: string): Promise<void>;
|
|
291
|
+
_getFieldKeySelectCompletion(args: any): Promise<void>;
|
|
292
|
+
/**
|
|
293
|
+
* 获取模块下多个CallInterface 被依赖的页面节点
|
|
294
|
+
* 查找callInterface 被依赖的页面级别的节点,要让他们重新生成一次代码,因为多个Interface重新导入,需要查找到引用的额内容
|
|
295
|
+
* 对应引用地方,需要重新生成,因为是生成方控制是不是必填的,
|
|
296
|
+
* @param oldInterfaceModule 发生修改的module,查他下面的Interface被引用的地方
|
|
297
|
+
* @returns 查找到的有引用这个内容的页面级别节点
|
|
298
|
+
*/
|
|
299
|
+
findModulesCallInterfaceFileRef(oldInterfaceModule: Module): Promise<BaseNode[]>;
|
|
300
|
+
/**
|
|
301
|
+
* 查找calllogic 被依赖的页面级别的节点,要让他们重新生成一次代码,因为logic,参数必填非必填发生修改,
|
|
302
|
+
* 对应引用地方,需要重新生成,因为是生成方控制是不是必填的,
|
|
303
|
+
* @param logic 发生修改的logic
|
|
304
|
+
* @returns 查找到的有引用这个内容的页面级别节点
|
|
305
|
+
*/
|
|
306
|
+
findCallLogicFileRef(logic: Logic): Promise<BaseNode[]>;
|
|
307
|
+
/** 获取当前节点的已知类型
|
|
308
|
+
* @param node 当前要获取类型的节点
|
|
309
|
+
* @returns 不需要去查就可以返回类型的节点
|
|
310
|
+
*/
|
|
311
|
+
getCurrentNodeKnownTypeAnnotation(node: BaseNode): TypeAnnotation;
|
|
312
|
+
/**
|
|
313
|
+
* 获取传入节点的 TypeAnnotation
|
|
314
|
+
*
|
|
315
|
+
* @description 生成器模式原型
|
|
316
|
+
*/
|
|
317
|
+
private _getQuickInfoNodesTypeMapWithGenerator;
|
|
318
|
+
/**
|
|
319
|
+
* 获取传入节点的 TypeAnnotation
|
|
320
|
+
*/
|
|
321
|
+
getQuickInfoNodesTypeMap(nodes: QuickInfoNodes, flag?: boolean): Promise<QuickInfoMap>;
|
|
322
|
+
getNaslAnnotatedJSON(app: App, releaseFlag: boolean): Promise<any>;
|
|
323
|
+
private _incrementalAnnotationJSONWithGenerator;
|
|
324
|
+
annotationToJson(typesMap: Map<BaseNode, TypeAnnotation | {
|
|
325
|
+
typeAnnotation: TypeAnnotation;
|
|
326
|
+
option: any;
|
|
327
|
+
}>, json: {}): void;
|
|
328
|
+
/**
|
|
329
|
+
* 获取getArgument的参数位的类型
|
|
330
|
+
* 如果内部表达式的,就用表达式的,如果没有就试试用默认值的
|
|
331
|
+
* 获取logic的默认值和原来Arg的类型和默认值对应
|
|
332
|
+
*/
|
|
333
|
+
getArgumentTypeAnnotationWithGenerator(node: Argument, QuickInfoNodes: QuickInfoNodes, types: Map<BaseNode, TypeAnnotation>): Generator<void, TypeAnnotation, void>;
|
|
334
|
+
getCurrentTypeAnnotation(node: BaseNode, outTime?: number): Promise<unknown>;
|
|
335
|
+
getBaseNodesTypeMap(nodes: Array<BaseNode>): Promise<QuickInfoMap>;
|
|
336
|
+
_getTypeStrFull(args: Array<any>): {
|
|
337
|
+
responseRequired: boolean;
|
|
338
|
+
response: tsProtocol.QuickInfoResponseBody;
|
|
339
|
+
};
|
|
340
|
+
getNaslNodeTypeStrFull(args: Array<any>): Promise<{
|
|
341
|
+
responseRequired: boolean;
|
|
342
|
+
response: tsProtocol.QuickInfoResponseBody;
|
|
343
|
+
}>;
|
|
344
|
+
/**
|
|
345
|
+
* 满足一些条件,不去查找依赖去check
|
|
346
|
+
* @param fileNode 当前删除节点的文件级别节点
|
|
347
|
+
* @param targetNode 当前操作的节点
|
|
348
|
+
*/
|
|
349
|
+
noFileRefCheck(fileNode: BaseNode, targetNode: BaseNode, action: string): boolean;
|
|
350
|
+
/**
|
|
351
|
+
* 处理删除节点
|
|
352
|
+
* @param fileNode 当前删除节点的文件级别节点
|
|
353
|
+
* @param targetNode 当前操作的节点
|
|
354
|
+
* @param result toTs生成的内容
|
|
355
|
+
*/
|
|
356
|
+
handleDelete(fileNode: BaseNode, targetNode: BaseNode, result: utils.EmbeddedTSFileResult): Promise<void>;
|
|
357
|
+
/**
|
|
358
|
+
* 除去rename场景下的更新
|
|
359
|
+
* @param fileNode 文件级别的节点
|
|
360
|
+
* @param targetNode 触发修改的节点
|
|
361
|
+
* @param result 生成代码的code 和位置信息
|
|
362
|
+
*/
|
|
363
|
+
handleChange(fileNode: BaseNode, targetNode: BaseNode, result: utils.EmbeddedTSFileResult, action: string): Promise<void>;
|
|
364
|
+
/**
|
|
365
|
+
* 重命名的更新
|
|
366
|
+
* @param fileNode 文件级别的节点
|
|
367
|
+
* @param targetNode 触发修改的节点
|
|
368
|
+
* @param result 生成代码的code 和位置信息
|
|
369
|
+
* @param isRename 是不是修改名字
|
|
370
|
+
* @param oldFilePath 如果是改名,文件级别的才会有这个参数,用于文件新增替换
|
|
371
|
+
*/
|
|
372
|
+
handleRename(fileNode: BaseNode, targetNode: BaseNode, result: utils.EmbeddedTSFileResult, oldFilePath?: string): Promise<void>;
|
|
373
|
+
/**
|
|
374
|
+
* 处理一些节点操作,子节点需要更新并且check的场景
|
|
375
|
+
* 因为删除,新增父页面,或者重命名会一起
|
|
376
|
+
* 删除或者新增view而且他有子集 就要执行同样的操作
|
|
377
|
+
* @param action 当前操作类型
|
|
378
|
+
* @param fileNode 文件节点
|
|
379
|
+
* @param targetNode 操作节点 这里要两个相等才会走家去面对哦逻辑
|
|
380
|
+
* @param oldpath 触发内容的oldpath
|
|
381
|
+
*/
|
|
382
|
+
incidentalAction(action: string, fileNode: BaseNode, targetNode: BaseNode, oldpath?: string): Promise<void>;
|
|
383
|
+
receiveHandleChange($event: EventPayload): Promise<boolean>;
|
|
384
|
+
changeFileNext(): void;
|
|
385
|
+
/**
|
|
386
|
+
* 获取 Connector 对应 Connector 的properties
|
|
387
|
+
*/
|
|
388
|
+
static getPropertyNames(fileNode: Connection | Connector): string[];
|
|
389
|
+
private getNodeCode;
|
|
390
|
+
}
|
|
391
|
+
export { NaslServer };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Namespace, Logic, Process } from '..';
|
|
2
|
+
/**
|
|
3
|
+
* 给调用逻辑用
|
|
4
|
+
* @param process
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function process2LogicNamespace(process: Process): Namespace;
|
|
8
|
+
interface processTreeFragment {
|
|
9
|
+
level: 'processTreeFragment';
|
|
10
|
+
name: string;
|
|
11
|
+
id: string;
|
|
12
|
+
logics: Array<Logic>;
|
|
13
|
+
elements: Array<{
|
|
14
|
+
level: 'processTreeElementFragment';
|
|
15
|
+
name: string;
|
|
16
|
+
id: string;
|
|
17
|
+
logics: Array<Logic>;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 给侧边栏树形用
|
|
22
|
+
* @param process
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export declare function processToTreeFragment(process: Process): processTreeFragment;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseNode } from '../concepts';
|
|
2
|
+
import { SourceMapItem } from '../translator';
|
|
3
|
+
import { Diagnostic } from '../manager/diagnostic';
|
|
4
|
+
export interface MinRange {
|
|
5
|
+
node: BaseNode;
|
|
6
|
+
item: SourceMapItem;
|
|
7
|
+
}
|
|
8
|
+
export declare function outOriginalvalue(value: string): string;
|
|
9
|
+
export declare function translateDiagnosticMessage(message: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* 节点和ts 报错结合,转成更精准的ts报错
|
|
12
|
+
* @param minRange
|
|
13
|
+
* @param tsErrorDetail 报错具体信息
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function naslNodeTranslateMessage(minRange: MinRange, tsErrorDetail: Diagnostic): {
|
|
17
|
+
id?: string;
|
|
18
|
+
severity: string;
|
|
19
|
+
originalDiagnostic?: import("typescript/lib/protocol").DiagnosticWithFileName;
|
|
20
|
+
message?: string;
|
|
21
|
+
code?: number;
|
|
22
|
+
node: BaseNode;
|
|
23
|
+
text?: string;
|
|
24
|
+
titleTip?: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function checkAStructure_(errorText: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(service: any): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
defaults({ config }: {
|
|
3
|
+
config: any;
|
|
4
|
+
}, err?: {}): void;
|
|
5
|
+
401({ config }: {
|
|
6
|
+
config: any;
|
|
7
|
+
}, err?: {}): void;
|
|
8
|
+
500({ config }: {
|
|
9
|
+
config: any;
|
|
10
|
+
}, err?: {}): void;
|
|
11
|
+
400({ config }: {
|
|
12
|
+
config: any;
|
|
13
|
+
}, err?: {}): void;
|
|
14
|
+
localError({ config }: {
|
|
15
|
+
config: any;
|
|
16
|
+
}, err?: {}): void;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function createService(apiSchemaList: any, serviceConfig: any, dynamicServices: any): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
namespace batchQuery {
|
|
3
|
+
namespace url {
|
|
4
|
+
const method: string;
|
|
5
|
+
const path: string;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
namespace batchAction {
|
|
9
|
+
export namespace url_1 {
|
|
10
|
+
const method_1: string;
|
|
11
|
+
export { method_1 as method };
|
|
12
|
+
const path_1: string;
|
|
13
|
+
export { path_1 as path };
|
|
14
|
+
}
|
|
15
|
+
export { url_1 as url };
|
|
16
|
+
}
|
|
17
|
+
namespace batchInstruct {
|
|
18
|
+
export namespace url_2 {
|
|
19
|
+
const method_2: string;
|
|
20
|
+
export { method_2 as method };
|
|
21
|
+
const path_2: string;
|
|
22
|
+
export { path_2 as path };
|
|
23
|
+
}
|
|
24
|
+
export { url_2 as url };
|
|
25
|
+
}
|
|
26
|
+
namespace saveFrontendNasl {
|
|
27
|
+
export namespace url_3 {
|
|
28
|
+
const method_3: string;
|
|
29
|
+
export { method_3 as method };
|
|
30
|
+
const path_3: string;
|
|
31
|
+
export { path_3 as path };
|
|
32
|
+
}
|
|
33
|
+
export { url_3 as url };
|
|
34
|
+
}
|
|
35
|
+
namespace breakpoint {
|
|
36
|
+
export namespace url_4 {
|
|
37
|
+
const method_4: string;
|
|
38
|
+
export { method_4 as method };
|
|
39
|
+
const path_4: string;
|
|
40
|
+
export { path_4 as path };
|
|
41
|
+
}
|
|
42
|
+
export { url_4 as url };
|
|
43
|
+
}
|
|
44
|
+
namespace databaseTypes {
|
|
45
|
+
export namespace url_5 {
|
|
46
|
+
const method_5: string;
|
|
47
|
+
export { method_5 as method };
|
|
48
|
+
const path_5: string;
|
|
49
|
+
export { path_5 as path };
|
|
50
|
+
}
|
|
51
|
+
export { url_5 as url };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { App } from '../../concepts';
|
|
3
|
+
import type { NaslServer } from 'src/server/naslServer';
|
|
4
|
+
export declare const batchQuery: ({ body, headers, config }: {
|
|
5
|
+
body: any[];
|
|
6
|
+
headers: Record<string, string>;
|
|
7
|
+
config?: object;
|
|
8
|
+
}) => any;
|
|
9
|
+
export declare const batchAction: ({ body, headers }: {
|
|
10
|
+
body: any[];
|
|
11
|
+
headers: Record<string, string>;
|
|
12
|
+
}) => any;
|
|
13
|
+
export declare const batchInstruct: ({ body, headers }: {
|
|
14
|
+
body: any[];
|
|
15
|
+
headers: Record<string, string>;
|
|
16
|
+
}) => any;
|
|
17
|
+
export declare const breakpoint: ({ body }: {
|
|
18
|
+
body: any;
|
|
19
|
+
}) => any;
|
|
20
|
+
export declare const databaseTypes: ({ query }: {
|
|
21
|
+
query: any;
|
|
22
|
+
}) => any;
|
|
23
|
+
export declare const operationRecordInfoMap: Map<string, any>;
|
|
24
|
+
export declare function doOperationRecord(operation: Operation): void;
|
|
25
|
+
export declare function operationRecordQuery(app: any): Promise<unknown>;
|
|
26
|
+
export declare function operationRecordPlayback(app: any, operationRecordAction: 'undo' | 'redo'): Promise<any>;
|
|
27
|
+
declare type Instruct = {
|
|
28
|
+
uuid: string;
|
|
29
|
+
actions: any[];
|
|
30
|
+
oldUUid?: string;
|
|
31
|
+
riskList?: string[];
|
|
32
|
+
};
|
|
33
|
+
declare type TaskOption = {
|
|
34
|
+
app: any;
|
|
35
|
+
hasFrontEnd: boolean;
|
|
36
|
+
hasBackEnd: boolean;
|
|
37
|
+
instructList: Instruct[];
|
|
38
|
+
operationList: Operation[];
|
|
39
|
+
};
|
|
40
|
+
declare enum TaskQueueStatus {
|
|
41
|
+
ExceedMaxTaskCount = 0,
|
|
42
|
+
Retrying = 1
|
|
43
|
+
}
|
|
44
|
+
declare type RefreshNaslOptions = {
|
|
45
|
+
errorInfo: {
|
|
46
|
+
message?: string;
|
|
47
|
+
stack?: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
declare class TaskQueue {
|
|
51
|
+
queue: TaskOption[];
|
|
52
|
+
lastQueue: TaskOption[];
|
|
53
|
+
running: Boolean;
|
|
54
|
+
maxTaskCount: number;
|
|
55
|
+
status?: TaskQueueStatus;
|
|
56
|
+
addTask(task: TaskOption): void;
|
|
57
|
+
clear(): void;
|
|
58
|
+
run(queue?: TaskOption[]): Promise<void>;
|
|
59
|
+
retry(): void;
|
|
60
|
+
refreshNasl(app: App, options?: RefreshNaslOptions): Promise<void>;
|
|
61
|
+
recover(app: App): void;
|
|
62
|
+
}
|
|
63
|
+
export declare const taskQueue: TaskQueue;
|
|
64
|
+
declare class Operation {
|
|
65
|
+
appId?: string;
|
|
66
|
+
branchId?: string;
|
|
67
|
+
accountId?: string;
|
|
68
|
+
userId?: string;
|
|
69
|
+
phone?: string;
|
|
70
|
+
actionItem: any;
|
|
71
|
+
res?: any;
|
|
72
|
+
err?: any;
|
|
73
|
+
parentKey?: string;
|
|
74
|
+
timestamp?: any;
|
|
75
|
+
type?: string;
|
|
76
|
+
uuid?: string;
|
|
77
|
+
action?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface ProxyApp extends App {
|
|
80
|
+
_isCollectingCount: number;
|
|
81
|
+
_collectingList: number[];
|
|
82
|
+
_historyList: number[];
|
|
83
|
+
_historyIndex: number;
|
|
84
|
+
_historying: boolean;
|
|
85
|
+
_timer: NodeJS.Timeout;
|
|
86
|
+
_noTimer: NodeJS.Timeout;
|
|
87
|
+
_actionMsg: string;
|
|
88
|
+
_action: string;
|
|
89
|
+
_extra?: any;
|
|
90
|
+
naslServer: NaslServer;
|
|
91
|
+
}
|
|
92
|
+
export declare function handleApp(app: ProxyApp): void;
|
|
93
|
+
/**
|
|
94
|
+
* 加载 app
|
|
95
|
+
* @param appId 如果是从文件读,就不需要传
|
|
96
|
+
* @returns app 对象
|
|
97
|
+
*/
|
|
98
|
+
export declare function loadApp(appId?: string): Promise<App>;
|
|
99
|
+
export declare function mountDatabaseTypes(app: App): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* 加载 app
|
|
102
|
+
* @returns app 对象
|
|
103
|
+
*/
|
|
104
|
+
export declare function loadAppSync(): App;
|
|
105
|
+
export {};
|