@lcap/nasl 2.18.0 → 2.20.0-beta.1
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/out/automate/engine/index.js +3 -3
- package/out/automate/engine/index.js.map +1 -1
- package/out/bak/translator.js +85 -37
- package/out/bak/translator.js.map +1 -1
- package/out/common/BaseNode.d.ts +6 -10
- package/out/common/BaseNode.js +7 -52
- package/out/common/BaseNode.js.map +1 -1
- package/out/concepts/AnonymousFunction__.js.map +1 -1
- package/out/concepts/App__.d.ts +0 -10
- package/out/concepts/App__.js +0 -74
- package/out/concepts/App__.js.map +1 -1
- package/out/concepts/Assignee__.js.map +1 -1
- package/out/concepts/AssignmentLine__.d.ts +5 -5
- package/out/concepts/AssignmentLine__.js +6 -6
- package/out/concepts/AssignmentLine__.js.map +1 -1
- package/out/concepts/Assignment__.js +2 -1
- package/out/concepts/Assignment__.js.map +1 -1
- package/out/concepts/BatchAssignment__.d.ts +60 -60
- package/out/concepts/BatchAssignment__.js +11 -21
- package/out/concepts/BatchAssignment__.js.map +1 -1
- package/out/concepts/BindAttribute__.d.ts +0 -19
- package/out/concepts/BindAttribute__.js +2 -39
- package/out/concepts/BindAttribute__.js.map +1 -1
- package/out/concepts/BindEvent__.js.map +1 -1
- package/out/concepts/BindStyle__.d.ts +2 -2
- package/out/concepts/BindStyle__.js +3 -3
- package/out/concepts/BindStyle__.js.map +1 -1
- package/out/concepts/BooleanLiteral__.js +8 -0
- package/out/concepts/BooleanLiteral__.js.map +1 -1
- package/out/concepts/CallFunction__.js +25 -58
- package/out/concepts/CallFunction__.js.map +1 -1
- package/out/concepts/CallInterface__.d.ts +0 -7
- package/out/concepts/CallInterface__.js +7 -53
- package/out/concepts/CallInterface__.js.map +1 -1
- package/out/concepts/CallLogic__.js +14 -63
- package/out/concepts/CallLogic__.js.map +1 -1
- package/out/concepts/CallQueryComponent__.js +1 -13
- package/out/concepts/CallQueryComponent__.js.map +1 -1
- package/out/concepts/CompletionProperty__.js +0 -3
- package/out/concepts/CompletionProperty__.js.map +1 -1
- package/out/concepts/ConfigGroup__.js.map +1 -1
- package/out/concepts/ConfigProperty__.js.map +1 -1
- package/out/concepts/Configuration__.js.map +1 -1
- package/out/concepts/DataSource__.d.ts +0 -6
- package/out/concepts/DataSource__.js +0 -41
- package/out/concepts/DataSource__.js.map +1 -1
- package/out/concepts/Destination__.d.ts +1 -9
- package/out/concepts/Destination__.js +29 -61
- package/out/concepts/Destination__.js.map +1 -1
- package/out/concepts/EntityProperty__.d.ts +8 -21
- package/out/concepts/EntityProperty__.js +23 -109
- package/out/concepts/EntityProperty__.js.map +1 -1
- package/out/concepts/Entity__.d.ts +0 -32
- package/out/concepts/Entity__.js +2 -117
- package/out/concepts/Entity__.js.map +1 -1
- package/out/concepts/Enum__.js +4 -0
- package/out/concepts/Enum__.js.map +1 -1
- package/out/concepts/Event__.js.map +1 -1
- package/out/concepts/ForEachStatement__.d.ts +4 -0
- package/out/concepts/ForEachStatement__.js +8 -4
- package/out/concepts/ForEachStatement__.js.map +1 -1
- package/out/concepts/Function__.js.map +1 -1
- package/out/concepts/Identifier__.js +4 -16
- package/out/concepts/Identifier__.js.map +1 -1
- package/out/concepts/IfStatement__.d.ts +0 -8
- package/out/concepts/IfStatement__.js +0 -22
- package/out/concepts/IfStatement__.js.map +1 -1
- package/out/concepts/InterfaceParam__.js.map +1 -1
- package/out/concepts/Interface__.js.map +1 -1
- package/out/concepts/LogicItem__.d.ts +1 -1
- package/out/concepts/LogicItem__.js.map +1 -1
- package/out/concepts/Logic__.d.ts +1 -6
- package/out/concepts/Logic__.js +43 -144
- package/out/concepts/Logic__.js.map +1 -1
- package/out/concepts/MatchCase__.d.ts +1 -1
- package/out/concepts/MatchCase__.js +8 -15
- package/out/concepts/MatchCase__.js.map +1 -1
- package/out/concepts/Match__.d.ts +19 -21
- package/out/concepts/Match__.js +25 -112
- package/out/concepts/Match__.js.map +1 -1
- package/out/concepts/MemberExpression__.d.ts +1 -4
- package/out/concepts/MemberExpression__.js +15 -30
- package/out/concepts/MemberExpression__.js.map +1 -1
- package/out/concepts/Module__.js.map +1 -1
- package/out/concepts/Namespace__.js.map +1 -1
- package/out/concepts/NumericLiteral__.js +1 -1
- package/out/concepts/NumericLiteral__.js.map +1 -1
- package/out/concepts/OqlQueryComponent__.d.ts +3 -7
- package/out/concepts/OqlQueryComponent__.js +95 -56
- package/out/concepts/OqlQueryComponent__.js.map +1 -1
- package/out/concepts/Param__.d.ts +1 -1
- package/out/concepts/Param__.js +4 -40
- package/out/concepts/Param__.js.map +1 -1
- package/out/concepts/ProcessComponent__.js.map +1 -1
- package/out/concepts/ProcessElement__.js.map +1 -1
- package/out/concepts/Process__.js.map +1 -1
- package/out/concepts/QueryJoinExpression__.js.map +1 -1
- package/out/concepts/QueryOrderByExpression__.d.ts +3 -3
- package/out/concepts/QueryOrderByExpression__.js +3 -3
- package/out/concepts/QueryOrderByExpression__.js.map +1 -1
- package/out/concepts/QuerySelectExpression__.js.map +1 -1
- package/out/concepts/Return__.js +2 -38
- package/out/concepts/Return__.js.map +1 -1
- package/out/concepts/SelectMembers__.d.ts +1 -1
- package/out/concepts/SelectMembers__.js +2 -2
- package/out/concepts/SelectMembers__.js.map +1 -1
- package/out/concepts/SqlQueryComponent__.d.ts +4 -2
- package/out/concepts/SqlQueryComponent__.js +88 -9
- package/out/concepts/SqlQueryComponent__.js.map +1 -1
- package/out/concepts/StringLiteral__.js +7 -0
- package/out/concepts/StringLiteral__.js.map +1 -1
- package/out/concepts/StructureProperty__.js.map +1 -1
- package/out/concepts/Structure__.js.map +1 -1
- package/out/concepts/TypeAnnotation__.d.ts +0 -1
- package/out/concepts/TypeAnnotation__.js +12 -25
- package/out/concepts/TypeAnnotation__.js.map +1 -1
- package/out/concepts/TypeParam__.d.ts +0 -1
- package/out/concepts/TypeParam__.js +0 -2
- package/out/concepts/TypeParam__.js.map +1 -1
- package/out/concepts/UnaryExpression__.js +9 -6
- package/out/concepts/UnaryExpression__.js.map +1 -1
- package/out/concepts/ValidationRule__.js +23 -88
- package/out/concepts/ValidationRule__.js.map +1 -1
- package/out/concepts/Variable__.js +2 -38
- package/out/concepts/Variable__.js.map +1 -1
- package/out/concepts/ViewComponent__.js.map +1 -1
- package/out/concepts/ViewElement__.d.ts +29 -30
- package/out/concepts/ViewElement__.js +51 -117
- package/out/concepts/ViewElement__.js.map +1 -1
- package/out/concepts/View__.d.ts +3 -4
- package/out/concepts/View__.js +83 -93
- package/out/concepts/View__.js.map +1 -1
- package/out/concepts/WhileStatement__.js +1 -1
- package/out/concepts/WhileStatement__.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.browser.js +0 -50
- package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.ui.js +4 -36
- package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
- package/out/concepts/basics/stdlib/nasl.util.js +43 -63
- package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
- package/out/concepts/index__.d.ts +0 -2
- package/out/concepts/index__.js +0 -2
- package/out/concepts/index__.js.map +1 -1
- package/out/generator/genBundleFiles.d.ts +2 -5
- package/out/generator/genBundleFiles.js +45 -148
- package/out/generator/genBundleFiles.js.map +1 -1
- package/out/generator/index.d.ts +0 -1
- package/out/generator/index.js +0 -1
- package/out/generator/index.js.map +1 -1
- package/out/index.d.ts +2 -3
- package/out/index.js +1 -5
- package/out/index.js.map +1 -1
- package/out/server/entity2LogicNamespace.js +11 -11
- package/out/server/entity2LogicNamespace.js.map +1 -1
- package/out/server/extendBaseNode.js.map +1 -1
- package/out/server/formatTsUtils.js +17 -10
- package/out/server/formatTsUtils.js.map +1 -1
- package/out/server/getLogics.js +6 -13
- package/out/server/getLogics.js.map +1 -1
- package/out/server/getMemberIdentifier.js +7 -7
- package/out/server/getMemberIdentifier.js.map +1 -1
- package/out/server/getProcesses.d.ts +1 -1
- package/out/server/index.d.ts +1 -0
- package/out/server/index.js +27 -2
- package/out/server/index.js.map +1 -1
- package/out/server/naslServer.d.ts +7 -47
- package/out/server/naslServer.js +393 -591
- package/out/server/naslServer.js.map +1 -1
- package/out/server/naslStdlibMap.js +28 -30
- package/out/server/naslStdlibMap.js.map +1 -1
- package/out/server/translator.js +7 -40
- package/out/server/translator.js.map +1 -1
- package/out/service/storage/init.js +3 -33
- package/out/service/storage/init.js.map +1 -1
- package/out/templator/genCreateBlock.js +4 -6
- package/out/templator/genCreateBlock.js.map +1 -1
- package/out/templator/genCurdEditMultipleKeyBlock.js +4 -7
- package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
- package/out/templator/genCurdMultipleKeyBlock.js +5 -7
- package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
- package/out/templator/genEnumSelectBlock.js +2 -5
- package/out/templator/genEnumSelectBlock.js.map +1 -1
- package/out/templator/genGridViewBlock.js +2 -2
- package/out/templator/genGridViewBlock.js.map +1 -1
- package/out/templator/genListViewBlock.js +2 -2
- package/out/templator/genListViewBlock.js.map +1 -1
- package/out/templator/genQueryComponent.d.ts +2 -2
- package/out/templator/genQueryComponent.js +1 -4
- package/out/templator/genQueryComponent.js.map +1 -1
- package/out/templator/genTableBlock.js +2 -2
- package/out/templator/genTableBlock.js.map +1 -1
- package/out/templator/genUpdateBlock.js +3 -4
- package/out/templator/genUpdateBlock.js.map +1 -1
- package/out/templator/utils.js +1 -1
- package/out/templator/utils.js.map +1 -1
- package/out/test/integration/node-nasl-server.js +38 -10
- package/out/test/integration/node-nasl-server.js.map +1 -1
- package/out/translator/index.d.ts +0 -1
- package/out/translator/index.js +1 -1
- package/out/translator/index.js.map +1 -1
- package/out/utils/index.d.ts +0 -1
- package/out/utils/index.js +1 -38
- package/out/utils/index.js.map +1 -1
- package/out/utils/string.d.ts +2 -15
- package/out/utils/string.js +3 -18
- package/out/utils/string.js.map +1 -1
- package/package.json +2 -2
- package/sandbox/stdlib/nasl.auth.ts +1 -1
- package/sandbox/stdlib/nasl.core.ts +1 -0
- package/sandbox/stdlib/nasl.logging.ts +4 -4
- package/sandbox/stdlib/nasl.util.ts +9 -5
- package/src/automate/engine/index.js +4 -4
- package/src/automate/engine/uniqueName.js +3 -3
- package/src/automate/template/myProcess.js +1 -1
- package/src/automate/upgrader/2.20.js +41 -0
- package/src/bak/translator.js +4 -1
- package/src/common/BaseNode.ts +1 -0
- package/src/concepts/AnonymousFunction__.ts +48 -2
- package/src/concepts/App__.ts +288 -615
- package/src/concepts/BatchAssignment__.ts +111 -51
- package/src/concepts/BindAttribute__.ts +18 -25
- package/src/concepts/BindDirective__.ts +7 -0
- package/src/concepts/BindEvent__.ts +7 -0
- package/src/concepts/BindStyle__.ts +7 -0
- package/src/concepts/CallFunction__.ts +34 -45
- package/src/concepts/CallInterface__.ts +2 -1
- package/src/concepts/CallLogic__.ts +87 -55
- package/src/concepts/CallQueryComponent__.ts +4 -1
- package/src/concepts/Constant__.ts +7 -0
- package/src/concepts/DataSource__.ts +57 -5
- package/src/concepts/Destination__.ts +100 -43
- package/src/concepts/Frontend__.ts +937 -0
- package/src/concepts/Identifier__.ts +18 -16
- package/src/concepts/LogicItem__.ts +8 -1
- package/src/concepts/Logic__.ts +134 -149
- package/src/concepts/Match__.ts +13 -29
- package/src/concepts/NewComposite__.ts +1357 -0
- package/src/concepts/NewList__.ts +440 -0
- package/src/concepts/NewMap__.ts +666 -0
- package/src/concepts/New__.ts +73 -0
- package/src/concepts/Param__.ts +245 -199
- package/src/concepts/ProcessElement__.ts +43 -36
- package/src/concepts/ProcessOutcomes__.ts +90 -0
- package/src/concepts/Process__.ts +1 -23
- package/src/concepts/Return__.ts +11 -1
- package/src/concepts/SelectMembers__.ts +3 -3
- package/src/concepts/Transactional__.ts +7 -0
- package/src/concepts/TypeAnnotation__.ts +54 -49
- package/src/concepts/ValidationRule__.ts +19 -1
- package/src/concepts/Variable__.ts +12 -6
- package/src/concepts/ViewElement__.ts +26 -3
- package/src/concepts/View__.ts +25 -25
- package/src/concepts/basics/stdlib/nasl.auth.ts +1 -1
- package/src/concepts/basics/stdlib/nasl.logging.ts +5 -0
- package/src/concepts/basics/stdlib/nasl.ui.ts +2 -0
- package/src/concepts/basics/stdlib/nasl.util.ts +153 -19
- package/src/concepts/index__.ts +7 -0
- package/src/enums/KEYWORDS.ts +9 -0
- package/src/generator/genBundleFiles.ts +74 -245
- package/src/generator/genMetaData.ts +178 -78
- package/src/generator/genReleaseBody.ts +87 -44
- package/src/generator/index.ts +1 -0
- package/src/generator/permission.ts +261 -0
- package/src/index.ts +1 -1
- package/src/server/entity2LogicNamespace.ts +90 -10
- package/src/server/extendBaseNode.ts +33 -22
- package/src/server/formatTsUtils.ts +36 -46
- package/src/server/getLogics.ts +13 -1
- package/src/server/getMemberIdentifier.ts +5 -5
- package/src/server/getProcesses.ts +1 -1
- package/src/server/naslServer.ts +254 -71
- package/src/server/process2LogicNamespace.ts +8 -0
- package/src/server/translator.ts +51 -5
- package/src/service/creator/add.configs.js +4 -0
- package/src/service/datasource/api.js +11 -0
- package/src/service/datasource/index.js +6 -0
- package/src/service/storage/init.ts +12 -0
- package/src/service/video/VideoTranscribe.js +1 -0
- package/src/templator/genEditTableBlock.ts +8 -16
- package/src/templator/genGetBlock.ts +18 -19
- package/src/templator/genGridViewBlock.ts +18 -18
- package/src/templator/genListViewBlock.ts +8 -11
- package/src/templator/genTableBlock.ts +6 -10
- package/ts-worker/lib/tsserver.js +8 -1
- package/out/automate/engine/2.14-components.d.ts +0 -1115
- package/out/automate/engine/2.14-components.js +0 -1087
- package/out/automate/engine/2.14-components.js.map +0 -1
- package/out/concepts/ExternalDestination__.d.ts +0 -73
- package/out/concepts/ExternalDestination__.js +0 -264
- package/out/concepts/ExternalDestination__.js.map +0 -1
- package/out/concepts/MatchExpression__.d.ts +0 -97
- package/out/concepts/MatchExpression__.js +0 -281
- package/out/concepts/MatchExpression__.js.map +0 -1
- package/out/concepts/StringInterpolation__.d.ts +0 -113
- package/out/concepts/StringInterpolation__.js +0 -227
- package/out/concepts/StringInterpolation__.js.map +0 -1
- package/out/generator/genReleaseBody.d.ts +0 -41
- package/out/generator/genReleaseBody.js +0 -340
- package/out/generator/genReleaseBody.js.map +0 -1
- package/out/service/defaultErrorMessage.json +0 -97
- package/out/service/logic/api.d.ts +0 -9
- package/out/service/logic/api.js +0 -11
- package/out/service/logic/api.js.map +0 -1
- package/out/service/logic/index.d.ts +0 -2
- package/out/service/logic/index.js +0 -10
- package/out/service/logic/index.js.map +0 -1
- package/src/automate/engine/dist/index.dev.js +0 -517
- package/src/common/dist/BaseNode.js +0 -1101
- package/src/concepts/basics/stdlib/dist/reference2TypeAnnotationList.js +0 -24
- package/src/concepts/dist/Anchor__.js +0 -179
- package/src/concepts/dist/Assignment__.js +0 -301
- package/src/concepts/dist/CallFunction__.js +0 -473
- package/src/concepts/dist/CallInterface__.js +0 -533
- package/src/concepts/dist/CallLogic__.js +0 -864
- package/src/concepts/dist/ForEachStatement__.js +0 -426
- package/src/concepts/dist/MatchCase__.js +0 -587
- package/src/concepts/dist/MemberExpression__.js +0 -348
- package/src/concepts/dist/Param__.js +0 -537
- package/src/concepts/dist/Return__.js +0 -493
- package/src/generator/dist/genBundleFiles.js +0 -414
- package/src/server/dist/formatTsUtils.js +0 -683
- package/src/server/dist/naslServer.js +0 -3396
- package/src/service/storage/dist/init.js +0 -541
- package/ts-worker/dist/webpack.config.dev.js +0 -104
- package/ts-worker/lib/dist/tsserver.dev.js +0 -22953
- package/ts-worker/sources/lib/dist/tsserver.dev.js +0 -22912
package/src/concepts/App__.ts
CHANGED
|
@@ -3,10 +3,12 @@ export interface AssetsInfo {
|
|
|
3
3
|
css: Array<string>;
|
|
4
4
|
names?: Array<string>;
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
import { queryNodeByPath } from '../service/storage/jsoner';
|
|
7
8
|
import { getNaslNodeByNodeCallee, getNodeByNodeCallee } from '../automate/engine/utils';
|
|
8
9
|
import ConfigProperty from './ConfigProperty__';
|
|
9
10
|
import TypeAnnotation from './TypeAnnotation__';
|
|
11
|
+
// import CallLogic from './CallLogic__';
|
|
10
12
|
//================================================================================
|
|
11
13
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
12
14
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|
|
@@ -23,11 +25,9 @@ import Structure from './Structure__';
|
|
|
23
25
|
import Enum from './Enum__';
|
|
24
26
|
import Logic from './Logic__';
|
|
25
27
|
import Interface from './Interface__';
|
|
26
|
-
import
|
|
27
|
-
import Variable from './Variable__';
|
|
28
|
+
import Frontend from './Frontend__';
|
|
28
29
|
import Process from './Process__';
|
|
29
30
|
import Role from './Role__';
|
|
30
|
-
import Theme from './Theme__';
|
|
31
31
|
import Configuration from './Configuration__';
|
|
32
32
|
import Module from './Module__';
|
|
33
33
|
|
|
@@ -84,24 +84,6 @@ export class App extends BaseNode {
|
|
|
84
84
|
@property()
|
|
85
85
|
dnsAddr: string = undefined;
|
|
86
86
|
|
|
87
|
-
/**
|
|
88
|
-
* PC/H5 端
|
|
89
|
-
*/
|
|
90
|
-
@property()
|
|
91
|
-
scope: 'pc' | 'h5' = undefined;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* 制品应用标题
|
|
95
|
-
*/
|
|
96
|
-
@property()
|
|
97
|
-
documentTitle: string = undefined;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* 制品应用图标
|
|
101
|
-
*/
|
|
102
|
-
@property()
|
|
103
|
-
documentIcon: string = undefined;
|
|
104
|
-
|
|
105
87
|
/**
|
|
106
88
|
* 是否有用户中心
|
|
107
89
|
*/
|
|
@@ -145,16 +127,10 @@ export class App extends BaseNode {
|
|
|
145
127
|
interfaces: Array<Interface> = [];
|
|
146
128
|
|
|
147
129
|
/**
|
|
148
|
-
*
|
|
149
|
-
*/
|
|
150
|
-
@property('View')
|
|
151
|
-
views: Array<View> = [];
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* 变量列表
|
|
130
|
+
* 端列表
|
|
155
131
|
*/
|
|
156
|
-
@property('
|
|
157
|
-
|
|
132
|
+
@property('Frontend')
|
|
133
|
+
frontends: Array<Frontend> = [];
|
|
158
134
|
|
|
159
135
|
/**
|
|
160
136
|
* 流程列表
|
|
@@ -168,12 +144,6 @@ export class App extends BaseNode {
|
|
|
168
144
|
@property('Role')
|
|
169
145
|
roles: Array<Role> = [];
|
|
170
146
|
|
|
171
|
-
/**
|
|
172
|
-
* 主题配置
|
|
173
|
-
*/
|
|
174
|
-
@property('Theme')
|
|
175
|
-
theme: Theme = new Theme();
|
|
176
|
-
|
|
177
147
|
/**
|
|
178
148
|
* 配置管理
|
|
179
149
|
*/
|
|
@@ -192,12 +162,6 @@ export class App extends BaseNode {
|
|
|
192
162
|
@property('Module')
|
|
193
163
|
interfaceDependencies: Array<Module> = [];
|
|
194
164
|
|
|
195
|
-
/**
|
|
196
|
-
* 扩展组件列表(兼容老版)
|
|
197
|
-
*/
|
|
198
|
-
@property('Module')
|
|
199
|
-
componentDependencies: Array<Module> = [];
|
|
200
|
-
|
|
201
165
|
|
|
202
166
|
|
|
203
167
|
/**
|
|
@@ -224,29 +188,7 @@ export class App extends BaseNode {
|
|
|
224
188
|
}
|
|
225
189
|
return params;
|
|
226
190
|
}
|
|
227
|
-
|
|
228
|
-
* 设置制品应用标题
|
|
229
|
-
*/
|
|
230
|
-
setDocumentTitle(documentTitle: string) {
|
|
231
|
-
const object = {
|
|
232
|
-
documentTitle,
|
|
233
|
-
};
|
|
234
|
-
this.update({
|
|
235
|
-
...object,
|
|
236
|
-
});
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* 设置制品应用图标
|
|
241
|
-
*/
|
|
242
|
-
setDocumentIcon(documentIcon: string) {
|
|
243
|
-
const object = {
|
|
244
|
-
documentIcon,
|
|
245
|
-
};
|
|
246
|
-
this.update({
|
|
247
|
-
...object,
|
|
248
|
-
});
|
|
249
|
-
}
|
|
191
|
+
|
|
250
192
|
|
|
251
193
|
getDataSourceUniqueName(name = 'dataSource1') {
|
|
252
194
|
return utils.unique(name, this.getDataSourceExistingNames(), undefined, true);
|
|
@@ -954,285 +896,143 @@ export class App extends BaseNode {
|
|
|
954
896
|
}
|
|
955
897
|
|
|
956
898
|
|
|
957
|
-
|
|
958
|
-
const excludedSet = new Set(excludedList);
|
|
959
|
-
return ((this.views as View[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
960
|
-
}
|
|
961
|
-
getViewUniqueName(name = 'view1') {
|
|
962
|
-
return utils.unique(name, this.getViewExistingNames(), undefined, true);
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* 插入页面
|
|
967
|
-
* @internal
|
|
968
|
-
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
969
|
-
*/
|
|
970
|
-
_insertViewAt(name: string, index: number): View;
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* 插入页面
|
|
974
|
-
* @internal
|
|
975
|
-
* @param viewOptions 页面参数
|
|
976
|
-
*/
|
|
977
|
-
_insertViewAt(viewOptions: Partial<View>, index: number): View;
|
|
978
|
-
|
|
979
|
-
/**
|
|
980
|
-
* 插入页面
|
|
981
|
-
* @internal
|
|
982
|
-
* @param view 已有的页面实例
|
|
983
|
-
*/
|
|
984
|
-
_insertViewAt(view: View, index: number): View;
|
|
985
|
-
|
|
986
|
-
_insertViewAt(options: string | Partial<View> | View, index: number) {
|
|
987
|
-
const viewOptions: any = {};
|
|
988
|
-
const relationOptions = { parentNode: this, parentKey: 'views' };
|
|
989
|
-
let view: View;
|
|
990
|
-
if (!options) {
|
|
991
|
-
view = View.from({
|
|
992
|
-
...viewOptions,
|
|
993
|
-
name: this.getViewUniqueName(),
|
|
994
|
-
}, this, 'views');
|
|
995
|
-
} else if (typeof options === 'string') {
|
|
996
|
-
view = View.from({
|
|
997
|
-
...viewOptions,
|
|
998
|
-
name: options,
|
|
999
|
-
}, this, 'views');
|
|
1000
|
-
} else if (options instanceof View) {
|
|
1001
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1002
|
-
view = options;
|
|
1003
|
-
Object.assign(view, relationOptions);
|
|
1004
|
-
} else {
|
|
1005
|
-
view = View.from({
|
|
1006
|
-
...viewOptions,
|
|
1007
|
-
...options,
|
|
1008
|
-
}, this, 'views');
|
|
1009
|
-
}
|
|
1010
|
-
this.views.splice(index, 0, view);
|
|
1011
|
-
return view;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* 插入页面
|
|
1016
|
-
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
1017
|
-
*/
|
|
1018
|
-
insertViewAt(name: string, index: number): View;
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* 插入页面
|
|
1022
|
-
* @param viewOptions 页面参数
|
|
1023
|
-
*/
|
|
1024
|
-
insertViewAt(viewOptions: Partial<View>, index: number): View;
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* 插入页面
|
|
1028
|
-
* @param view 已有的页面实例
|
|
1029
|
-
*/
|
|
1030
|
-
insertViewAt(view: View, index: number): View;
|
|
1031
|
-
|
|
1032
|
-
insertViewAt(options: string | Partial<View> | View, index: number) {
|
|
1033
|
-
const node = this._insertViewAt(options as any, index);
|
|
1034
|
-
node.create({
|
|
1035
|
-
index,
|
|
1036
|
-
parentNode: this,
|
|
1037
|
-
parentKey: 'views',
|
|
1038
|
-
});
|
|
1039
|
-
return node;
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
|
-
/**
|
|
1043
|
-
* 添加页面
|
|
1044
|
-
* @internal
|
|
1045
|
-
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
1046
|
-
*/
|
|
1047
|
-
_addView(name?: string): View;
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* 添加页面
|
|
1051
|
-
* @internal
|
|
1052
|
-
* @param viewOptions 页面参数
|
|
1053
|
-
*/
|
|
1054
|
-
_addView(viewOptions: Partial<View>): View;
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* 添加页面
|
|
1058
|
-
* @internal
|
|
1059
|
-
* @param view 已有的页面实例
|
|
1060
|
-
*/
|
|
1061
|
-
_addView(view: View): View;
|
|
1062
|
-
|
|
1063
|
-
_addView(options?: string | Partial<View> | View) {
|
|
1064
|
-
const index = this.views.length;
|
|
1065
|
-
return this._insertViewAt(options as any, index);
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
/**
|
|
1069
|
-
* 添加页面
|
|
1070
|
-
* @internal
|
|
1071
|
-
* @param name 页面名称,如果不填会自动生成一个唯一名称
|
|
1072
|
-
*/
|
|
1073
|
-
addView(name?: string): View;
|
|
1074
|
-
|
|
1075
|
-
/**
|
|
1076
|
-
* 添加页面
|
|
1077
|
-
* @param viewOptions 页面参数
|
|
1078
|
-
*/
|
|
1079
|
-
addView(viewOptions: Partial<View>): View;
|
|
1080
|
-
|
|
1081
|
-
/**
|
|
1082
|
-
* 添加页面
|
|
1083
|
-
* @param view 已有的页面实例
|
|
1084
|
-
*/
|
|
1085
|
-
addView(view: View): View;
|
|
1086
|
-
|
|
1087
|
-
addView(options?: string | Partial<View> | View) {
|
|
1088
|
-
const node = this._addView(options as any);
|
|
1089
|
-
const index = this.views.indexOf(node);
|
|
1090
|
-
node.create({
|
|
1091
|
-
index,
|
|
1092
|
-
parentNode: this,
|
|
1093
|
-
parentKey: 'views',
|
|
1094
|
-
});
|
|
1095
|
-
return node;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
getVarExistingNames(excludedList: Array<Variable> = []) {
|
|
899
|
+
getFrontendExistingNames(excludedList: Array<Frontend> = []) {
|
|
1100
900
|
const excludedSet = new Set(excludedList);
|
|
1101
|
-
return ((this.
|
|
901
|
+
return ((this.frontends as Frontend[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
|
|
1102
902
|
}
|
|
1103
|
-
|
|
1104
|
-
return utils.unique(name, this.
|
|
903
|
+
getFrontendUniqueName(name = 'frontend1') {
|
|
904
|
+
return utils.unique(name, this.getFrontendExistingNames(), undefined, true);
|
|
1105
905
|
}
|
|
1106
906
|
|
|
1107
907
|
/**
|
|
1108
|
-
*
|
|
908
|
+
* 插入端
|
|
1109
909
|
* @internal
|
|
1110
|
-
* @param name
|
|
910
|
+
* @param name 端名称,如果不填会自动生成一个唯一名称
|
|
1111
911
|
*/
|
|
1112
|
-
|
|
912
|
+
_insertFrontendAt(name: string, index: number): Frontend;
|
|
1113
913
|
|
|
1114
914
|
/**
|
|
1115
|
-
*
|
|
915
|
+
* 插入端
|
|
1116
916
|
* @internal
|
|
1117
|
-
* @param
|
|
917
|
+
* @param frontendOptions 端参数
|
|
1118
918
|
*/
|
|
1119
|
-
|
|
919
|
+
_insertFrontendAt(frontendOptions: Partial<Frontend>, index: number): Frontend;
|
|
1120
920
|
|
|
1121
921
|
/**
|
|
1122
|
-
*
|
|
922
|
+
* 插入端
|
|
1123
923
|
* @internal
|
|
1124
|
-
* @param
|
|
924
|
+
* @param frontend 已有的端实例
|
|
1125
925
|
*/
|
|
1126
|
-
|
|
926
|
+
_insertFrontendAt(frontend: Frontend, index: number): Frontend;
|
|
1127
927
|
|
|
1128
|
-
|
|
1129
|
-
const
|
|
1130
|
-
const relationOptions = { parentNode: this, parentKey: '
|
|
1131
|
-
let
|
|
928
|
+
_insertFrontendAt(options: string | Partial<Frontend> | Frontend, index: number) {
|
|
929
|
+
const frontendOptions: any = {};
|
|
930
|
+
const relationOptions = { parentNode: this, parentKey: 'frontends' };
|
|
931
|
+
let frontend: Frontend;
|
|
1132
932
|
if (!options) {
|
|
1133
|
-
|
|
1134
|
-
...
|
|
1135
|
-
name: this.
|
|
1136
|
-
}, this, '
|
|
933
|
+
frontend = Frontend.from({
|
|
934
|
+
...frontendOptions,
|
|
935
|
+
name: this.getFrontendUniqueName(),
|
|
936
|
+
}, this, 'frontends');
|
|
1137
937
|
} else if (typeof options === 'string') {
|
|
1138
|
-
|
|
1139
|
-
...
|
|
938
|
+
frontend = Frontend.from({
|
|
939
|
+
...frontendOptions,
|
|
1140
940
|
name: options,
|
|
1141
|
-
}, this, '
|
|
1142
|
-
} else if (options instanceof
|
|
941
|
+
}, this, 'frontends');
|
|
942
|
+
} else if (options instanceof Frontend) {
|
|
1143
943
|
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1144
|
-
|
|
1145
|
-
Object.assign(
|
|
944
|
+
frontend = options;
|
|
945
|
+
Object.assign(frontend, relationOptions);
|
|
1146
946
|
} else {
|
|
1147
|
-
|
|
1148
|
-
...
|
|
947
|
+
frontend = Frontend.from({
|
|
948
|
+
...frontendOptions,
|
|
1149
949
|
...options,
|
|
1150
|
-
}, this, '
|
|
950
|
+
}, this, 'frontends');
|
|
1151
951
|
}
|
|
1152
|
-
this.
|
|
1153
|
-
return
|
|
952
|
+
this.frontends.splice(index, 0, frontend);
|
|
953
|
+
return frontend;
|
|
1154
954
|
}
|
|
1155
955
|
|
|
1156
956
|
/**
|
|
1157
|
-
*
|
|
1158
|
-
* @param name
|
|
957
|
+
* 插入端
|
|
958
|
+
* @param name 端名称,如果不填会自动生成一个唯一名称
|
|
1159
959
|
*/
|
|
1160
|
-
|
|
960
|
+
insertFrontendAt(name: string, index: number): Frontend;
|
|
1161
961
|
|
|
1162
962
|
/**
|
|
1163
|
-
*
|
|
1164
|
-
* @param
|
|
963
|
+
* 插入端
|
|
964
|
+
* @param frontendOptions 端参数
|
|
1165
965
|
*/
|
|
1166
|
-
|
|
966
|
+
insertFrontendAt(frontendOptions: Partial<Frontend>, index: number): Frontend;
|
|
1167
967
|
|
|
1168
968
|
/**
|
|
1169
|
-
*
|
|
1170
|
-
* @param
|
|
969
|
+
* 插入端
|
|
970
|
+
* @param frontend 已有的端实例
|
|
1171
971
|
*/
|
|
1172
|
-
|
|
972
|
+
insertFrontendAt(frontend: Frontend, index: number): Frontend;
|
|
1173
973
|
|
|
1174
|
-
|
|
1175
|
-
const node = this.
|
|
974
|
+
insertFrontendAt(options: string | Partial<Frontend> | Frontend, index: number) {
|
|
975
|
+
const node = this._insertFrontendAt(options as any, index);
|
|
1176
976
|
node.create({
|
|
1177
977
|
index,
|
|
1178
978
|
parentNode: this,
|
|
1179
|
-
parentKey: '
|
|
979
|
+
parentKey: 'frontends',
|
|
1180
980
|
});
|
|
1181
981
|
return node;
|
|
1182
982
|
}
|
|
1183
983
|
|
|
1184
984
|
/**
|
|
1185
|
-
*
|
|
985
|
+
* 添加端
|
|
1186
986
|
* @internal
|
|
1187
|
-
* @param name
|
|
987
|
+
* @param name 端名称,如果不填会自动生成一个唯一名称
|
|
1188
988
|
*/
|
|
1189
|
-
|
|
989
|
+
_addFrontend(name?: string): Frontend;
|
|
1190
990
|
|
|
1191
991
|
/**
|
|
1192
|
-
*
|
|
992
|
+
* 添加端
|
|
1193
993
|
* @internal
|
|
1194
|
-
* @param
|
|
994
|
+
* @param frontendOptions 端参数
|
|
1195
995
|
*/
|
|
1196
|
-
|
|
996
|
+
_addFrontend(frontendOptions: Partial<Frontend>): Frontend;
|
|
1197
997
|
|
|
1198
998
|
/**
|
|
1199
|
-
*
|
|
999
|
+
* 添加端
|
|
1200
1000
|
* @internal
|
|
1201
|
-
* @param
|
|
1001
|
+
* @param frontend 已有的端实例
|
|
1202
1002
|
*/
|
|
1203
|
-
|
|
1003
|
+
_addFrontend(frontend: Frontend): Frontend;
|
|
1204
1004
|
|
|
1205
|
-
|
|
1206
|
-
const index = this.
|
|
1207
|
-
return this.
|
|
1005
|
+
_addFrontend(options?: string | Partial<Frontend> | Frontend) {
|
|
1006
|
+
const index = this.frontends.length;
|
|
1007
|
+
return this._insertFrontendAt(options as any, index);
|
|
1208
1008
|
}
|
|
1209
1009
|
|
|
1210
1010
|
/**
|
|
1211
|
-
*
|
|
1011
|
+
* 添加端
|
|
1212
1012
|
* @internal
|
|
1213
|
-
* @param name
|
|
1013
|
+
* @param name 端名称,如果不填会自动生成一个唯一名称
|
|
1214
1014
|
*/
|
|
1215
|
-
|
|
1015
|
+
addFrontend(name?: string): Frontend;
|
|
1216
1016
|
|
|
1217
1017
|
/**
|
|
1218
|
-
*
|
|
1219
|
-
* @param
|
|
1018
|
+
* 添加端
|
|
1019
|
+
* @param frontendOptions 端参数
|
|
1220
1020
|
*/
|
|
1221
|
-
|
|
1021
|
+
addFrontend(frontendOptions: Partial<Frontend>): Frontend;
|
|
1222
1022
|
|
|
1223
1023
|
/**
|
|
1224
|
-
*
|
|
1225
|
-
* @param
|
|
1024
|
+
* 添加端
|
|
1025
|
+
* @param frontend 已有的端实例
|
|
1226
1026
|
*/
|
|
1227
|
-
|
|
1027
|
+
addFrontend(frontend: Frontend): Frontend;
|
|
1228
1028
|
|
|
1229
|
-
|
|
1230
|
-
const node = this.
|
|
1231
|
-
const index = this.
|
|
1029
|
+
addFrontend(options?: string | Partial<Frontend> | Frontend) {
|
|
1030
|
+
const node = this._addFrontend(options as any);
|
|
1031
|
+
const index = this.frontends.indexOf(node);
|
|
1232
1032
|
node.create({
|
|
1233
1033
|
index,
|
|
1234
1034
|
parentNode: this,
|
|
1235
|
-
parentKey: '
|
|
1035
|
+
parentKey: 'frontends',
|
|
1236
1036
|
});
|
|
1237
1037
|
return node;
|
|
1238
1038
|
}
|
|
@@ -1796,139 +1596,6 @@ export class App extends BaseNode {
|
|
|
1796
1596
|
return node;
|
|
1797
1597
|
}
|
|
1798
1598
|
|
|
1799
|
-
/**
|
|
1800
|
-
* 插入模块
|
|
1801
|
-
* @internal
|
|
1802
|
-
* @param name 模块名称,如果不填会自动生成一个唯一名称
|
|
1803
|
-
*/
|
|
1804
|
-
_insertModuleInComponentDependenciesAt(name: string, index: number): Module;
|
|
1805
|
-
|
|
1806
|
-
/**
|
|
1807
|
-
* 插入模块
|
|
1808
|
-
* @internal
|
|
1809
|
-
* @param moduleOptions 模块参数
|
|
1810
|
-
*/
|
|
1811
|
-
_insertModuleInComponentDependenciesAt(moduleOptions: Partial<Module>, index: number): Module;
|
|
1812
|
-
|
|
1813
|
-
/**
|
|
1814
|
-
* 插入模块
|
|
1815
|
-
* @internal
|
|
1816
|
-
* @param module 已有的模块实例
|
|
1817
|
-
*/
|
|
1818
|
-
_insertModuleInComponentDependenciesAt(module: Module, index: number): Module;
|
|
1819
|
-
|
|
1820
|
-
_insertModuleInComponentDependenciesAt(options: string | Partial<Module> | Module, index: number) {
|
|
1821
|
-
const moduleOptions: any = {};
|
|
1822
|
-
const relationOptions = { parentNode: this, parentKey: 'componentDependencies' };
|
|
1823
|
-
let module: Module;
|
|
1824
|
-
if (!options) {
|
|
1825
|
-
module = Module.from({
|
|
1826
|
-
...moduleOptions,
|
|
1827
|
-
name: this.getModuleUniqueName(),
|
|
1828
|
-
}, this, 'componentDependencies');
|
|
1829
|
-
} else if (typeof options === 'string') {
|
|
1830
|
-
module = Module.from({
|
|
1831
|
-
...moduleOptions,
|
|
1832
|
-
name: options,
|
|
1833
|
-
}, this, 'componentDependencies');
|
|
1834
|
-
} else if (options instanceof Module) {
|
|
1835
|
-
options.ensureDelete(); // 同一实例不支持多处存在
|
|
1836
|
-
module = options;
|
|
1837
|
-
Object.assign(module, relationOptions);
|
|
1838
|
-
} else {
|
|
1839
|
-
module = Module.from({
|
|
1840
|
-
...moduleOptions,
|
|
1841
|
-
...options,
|
|
1842
|
-
}, this, 'componentDependencies');
|
|
1843
|
-
}
|
|
1844
|
-
this.componentDependencies.splice(index, 0, module);
|
|
1845
|
-
return module;
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
/**
|
|
1849
|
-
* 插入模块
|
|
1850
|
-
* @param name 模块名称,如果不填会自动生成一个唯一名称
|
|
1851
|
-
*/
|
|
1852
|
-
insertModuleInComponentDependenciesAt(name: string, index: number): Module;
|
|
1853
|
-
|
|
1854
|
-
/**
|
|
1855
|
-
* 插入模块
|
|
1856
|
-
* @param moduleOptions 模块参数
|
|
1857
|
-
*/
|
|
1858
|
-
insertModuleInComponentDependenciesAt(moduleOptions: Partial<Module>, index: number): Module;
|
|
1859
|
-
|
|
1860
|
-
/**
|
|
1861
|
-
* 插入模块
|
|
1862
|
-
* @param module 已有的模块实例
|
|
1863
|
-
*/
|
|
1864
|
-
insertModuleInComponentDependenciesAt(module: Module, index: number): Module;
|
|
1865
|
-
|
|
1866
|
-
insertModuleInComponentDependenciesAt(options: string | Partial<Module> | Module, index: number) {
|
|
1867
|
-
const node = this._insertModuleInComponentDependenciesAt(options as any, index);
|
|
1868
|
-
node.create({
|
|
1869
|
-
index,
|
|
1870
|
-
parentNode: this,
|
|
1871
|
-
parentKey: 'componentDependencies',
|
|
1872
|
-
});
|
|
1873
|
-
return node;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
/**
|
|
1877
|
-
* 添加模块
|
|
1878
|
-
* @internal
|
|
1879
|
-
* @param name 模块名称,如果不填会自动生成一个唯一名称
|
|
1880
|
-
*/
|
|
1881
|
-
_addModuleInComponentDependencies(name?: string): Module;
|
|
1882
|
-
|
|
1883
|
-
/**
|
|
1884
|
-
* 添加模块
|
|
1885
|
-
* @internal
|
|
1886
|
-
* @param moduleOptions 模块参数
|
|
1887
|
-
*/
|
|
1888
|
-
_addModuleInComponentDependencies(moduleOptions: Partial<Module>): Module;
|
|
1889
|
-
|
|
1890
|
-
/**
|
|
1891
|
-
* 添加模块
|
|
1892
|
-
* @internal
|
|
1893
|
-
* @param module 已有的模块实例
|
|
1894
|
-
*/
|
|
1895
|
-
_addModuleInComponentDependencies(module: Module): Module;
|
|
1896
|
-
|
|
1897
|
-
_addModuleInComponentDependencies(options?: string | Partial<Module> | Module) {
|
|
1898
|
-
const index = this.componentDependencies.length;
|
|
1899
|
-
return this._insertModuleInComponentDependenciesAt(options as any, index);
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
|
-
/**
|
|
1903
|
-
* 添加模块
|
|
1904
|
-
* @internal
|
|
1905
|
-
* @param name 模块名称,如果不填会自动生成一个唯一名称
|
|
1906
|
-
*/
|
|
1907
|
-
addModuleInComponentDependencies(name?: string): Module;
|
|
1908
|
-
|
|
1909
|
-
/**
|
|
1910
|
-
* 添加模块
|
|
1911
|
-
* @param moduleOptions 模块参数
|
|
1912
|
-
*/
|
|
1913
|
-
addModuleInComponentDependencies(moduleOptions: Partial<Module>): Module;
|
|
1914
|
-
|
|
1915
|
-
/**
|
|
1916
|
-
* 添加模块
|
|
1917
|
-
* @param module 已有的模块实例
|
|
1918
|
-
*/
|
|
1919
|
-
addModuleInComponentDependencies(module: Module): Module;
|
|
1920
|
-
|
|
1921
|
-
addModuleInComponentDependencies(options?: string | Partial<Module> | Module) {
|
|
1922
|
-
const node = this._addModuleInComponentDependencies(options as any);
|
|
1923
|
-
const index = this.componentDependencies.indexOf(node);
|
|
1924
|
-
node.create({
|
|
1925
|
-
index,
|
|
1926
|
-
parentNode: this,
|
|
1927
|
-
parentKey: 'componentDependencies',
|
|
1928
|
-
});
|
|
1929
|
-
return node;
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
1599
|
|
|
1933
1600
|
|
|
1934
1601
|
|
|
@@ -2183,96 +1850,46 @@ export class App extends BaseNode {
|
|
|
2183
1850
|
|
|
2184
1851
|
|
|
2185
1852
|
/**
|
|
2186
|
-
*
|
|
2187
|
-
* @param name
|
|
2188
|
-
*/
|
|
2189
|
-
removeView(name: string): void;
|
|
2190
|
-
|
|
2191
|
-
/**
|
|
2192
|
-
* 删除页面
|
|
2193
|
-
* @param view 已有的页面实例
|
|
2194
|
-
*/
|
|
2195
|
-
removeView(view: View): void;
|
|
2196
|
-
|
|
2197
|
-
removeView(options: string | View) {
|
|
2198
|
-
let view: View;
|
|
2199
|
-
if (typeof options === 'string') {
|
|
2200
|
-
view = (this.views as View[]).find((item) => item.name === options);
|
|
2201
|
-
if (!view) {
|
|
2202
|
-
throw new Error('找不到页面 ' + options);
|
|
2203
|
-
}
|
|
2204
|
-
} else {
|
|
2205
|
-
view = options;
|
|
2206
|
-
}
|
|
2207
|
-
return view.delete();
|
|
2208
|
-
}
|
|
2209
|
-
|
|
2210
|
-
__removeView(view: View) {
|
|
2211
|
-
const parentKey = view.parentKey;
|
|
2212
|
-
const params: Params = {
|
|
2213
|
-
parentNode: this,
|
|
2214
|
-
parentKey,
|
|
2215
|
-
index: -1,
|
|
2216
|
-
object: null,
|
|
2217
|
-
oldObject: view,
|
|
2218
|
-
};
|
|
2219
|
-
if (parentKey) {
|
|
2220
|
-
params.parentKey = parentKey;
|
|
2221
|
-
if (Array.isArray((this as any)[parentKey])) {
|
|
2222
|
-
const index = (this as any)[parentKey].indexOf(view);
|
|
2223
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
2224
|
-
params.index = index;
|
|
2225
|
-
} else if ((this as any)[parentKey] === view) {
|
|
2226
|
-
params.index = 0;
|
|
2227
|
-
(this as any)[parentKey] = undefined;
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
return params;
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
/**
|
|
2236
|
-
* 删除变量
|
|
2237
|
-
* @param name 变量名称
|
|
1853
|
+
* 删除端
|
|
1854
|
+
* @param name 端名称
|
|
2238
1855
|
*/
|
|
2239
|
-
|
|
1856
|
+
removeFrontend(name: string): void;
|
|
2240
1857
|
|
|
2241
1858
|
/**
|
|
2242
|
-
*
|
|
2243
|
-
* @param
|
|
1859
|
+
* 删除端
|
|
1860
|
+
* @param frontend 已有的端实例
|
|
2244
1861
|
*/
|
|
2245
|
-
|
|
1862
|
+
removeFrontend(frontend: Frontend): void;
|
|
2246
1863
|
|
|
2247
|
-
|
|
2248
|
-
let
|
|
1864
|
+
removeFrontend(options: string | Frontend) {
|
|
1865
|
+
let frontend: Frontend;
|
|
2249
1866
|
if (typeof options === 'string') {
|
|
2250
|
-
|
|
2251
|
-
if (!
|
|
2252
|
-
throw new Error('
|
|
1867
|
+
frontend = (this.frontends as Frontend[]).find((item) => item.name === options);
|
|
1868
|
+
if (!frontend) {
|
|
1869
|
+
throw new Error('找不到端 ' + options);
|
|
2253
1870
|
}
|
|
2254
1871
|
} else {
|
|
2255
|
-
|
|
1872
|
+
frontend = options;
|
|
2256
1873
|
}
|
|
2257
|
-
return
|
|
1874
|
+
return frontend.delete();
|
|
2258
1875
|
}
|
|
2259
1876
|
|
|
2260
|
-
|
|
2261
|
-
const parentKey =
|
|
1877
|
+
__removeFrontend(frontend: Frontend) {
|
|
1878
|
+
const parentKey = frontend.parentKey;
|
|
2262
1879
|
const params: Params = {
|
|
2263
1880
|
parentNode: this,
|
|
2264
1881
|
parentKey,
|
|
2265
1882
|
index: -1,
|
|
2266
1883
|
object: null,
|
|
2267
|
-
oldObject:
|
|
1884
|
+
oldObject: frontend,
|
|
2268
1885
|
};
|
|
2269
1886
|
if (parentKey) {
|
|
2270
1887
|
params.parentKey = parentKey;
|
|
2271
1888
|
if (Array.isArray((this as any)[parentKey])) {
|
|
2272
|
-
const index = (this as any)[parentKey].indexOf(
|
|
1889
|
+
const index = (this as any)[parentKey].indexOf(frontend);
|
|
2273
1890
|
~index && (this as any)[parentKey].splice(index, 1);
|
|
2274
1891
|
params.index = index;
|
|
2275
|
-
} else if ((this as any)[parentKey] ===
|
|
1892
|
+
} else if ((this as any)[parentKey] === frontend) {
|
|
2276
1893
|
params.index = 0;
|
|
2277
1894
|
(this as any)[parentKey] = undefined;
|
|
2278
1895
|
}
|
|
@@ -2382,56 +1999,6 @@ export class App extends BaseNode {
|
|
|
2382
1999
|
|
|
2383
2000
|
|
|
2384
2001
|
|
|
2385
|
-
/**
|
|
2386
|
-
* 删除主题
|
|
2387
|
-
* @param name 主题名称
|
|
2388
|
-
*/
|
|
2389
|
-
removeTheme(name: string): void;
|
|
2390
|
-
|
|
2391
|
-
/**
|
|
2392
|
-
* 删除主题
|
|
2393
|
-
* @param theme 已有的主题实例
|
|
2394
|
-
*/
|
|
2395
|
-
removeTheme(theme: Theme): void;
|
|
2396
|
-
|
|
2397
|
-
removeTheme(options: string | Theme) {
|
|
2398
|
-
let theme: Theme;
|
|
2399
|
-
if (typeof options === 'string') {
|
|
2400
|
-
theme = this.theme;
|
|
2401
|
-
if (!theme) {
|
|
2402
|
-
throw new Error('找不到主题 ' + options);
|
|
2403
|
-
}
|
|
2404
|
-
} else {
|
|
2405
|
-
theme = options;
|
|
2406
|
-
}
|
|
2407
|
-
return theme.delete();
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
__removeTheme(theme: Theme) {
|
|
2411
|
-
const parentKey = theme.parentKey;
|
|
2412
|
-
const params: Params = {
|
|
2413
|
-
parentNode: this,
|
|
2414
|
-
parentKey,
|
|
2415
|
-
index: -1,
|
|
2416
|
-
object: null,
|
|
2417
|
-
oldObject: theme,
|
|
2418
|
-
};
|
|
2419
|
-
if (parentKey) {
|
|
2420
|
-
params.parentKey = parentKey;
|
|
2421
|
-
if (Array.isArray((this as any)[parentKey])) {
|
|
2422
|
-
const index = (this as any)[parentKey].indexOf(theme);
|
|
2423
|
-
~index && (this as any)[parentKey].splice(index, 1);
|
|
2424
|
-
params.index = index;
|
|
2425
|
-
} else if ((this as any)[parentKey] === theme) {
|
|
2426
|
-
params.index = 0;
|
|
2427
|
-
(this as any)[parentKey] = undefined;
|
|
2428
|
-
}
|
|
2429
|
-
}
|
|
2430
|
-
return params;
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
2002
|
/**
|
|
2436
2003
|
* 删除配置管理
|
|
2437
2004
|
* @param name 配置管理名称
|
|
@@ -2534,33 +2101,6 @@ export class App extends BaseNode {
|
|
|
2534
2101
|
return module.delete();
|
|
2535
2102
|
}
|
|
2536
2103
|
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
/**
|
|
2540
|
-
* 删除模块
|
|
2541
|
-
* @param name 模块名称
|
|
2542
|
-
*/
|
|
2543
|
-
removeModuleInComponentDependencies(name: string): void;
|
|
2544
|
-
|
|
2545
|
-
/**
|
|
2546
|
-
* 删除模块
|
|
2547
|
-
* @param module 已有的模块实例
|
|
2548
|
-
*/
|
|
2549
|
-
removeModuleInComponentDependencies(module: Module): void;
|
|
2550
|
-
|
|
2551
|
-
removeModuleInComponentDependencies(options: string | Module) {
|
|
2552
|
-
let module: Module;
|
|
2553
|
-
if (typeof options === 'string') {
|
|
2554
|
-
module = (this.componentDependencies as Module[]).find((item) => item.name === options);
|
|
2555
|
-
if (!module) {
|
|
2556
|
-
throw new Error('找不到模块 ' + options);
|
|
2557
|
-
}
|
|
2558
|
-
} else {
|
|
2559
|
-
module = options;
|
|
2560
|
-
}
|
|
2561
|
-
return module.delete();
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
2104
|
__removeModule(module: Module) {
|
|
2565
2105
|
const parentKey = module.parentKey;
|
|
2566
2106
|
const params: Params = {
|
|
@@ -2588,9 +2128,6 @@ export class App extends BaseNode {
|
|
|
2588
2128
|
// ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
|
|
2589
2129
|
// 自动生成的代码已结束。下面可以手动编写。
|
|
2590
2130
|
//================================================================================
|
|
2591
|
-
findComponentDependencyByName(name: string) {
|
|
2592
|
-
return this.componentDependencies.find((componentDependency) => componentDependency.name === name);
|
|
2593
|
-
}
|
|
2594
2131
|
|
|
2595
2132
|
findDataSourceByName(name: string) {
|
|
2596
2133
|
return this.dataSources.find((dataSourceItem) => dataSourceItem.name === name);
|
|
@@ -2722,50 +2259,35 @@ export class App extends BaseNode {
|
|
|
2722
2259
|
return node;
|
|
2723
2260
|
}
|
|
2724
2261
|
|
|
2725
|
-
/**
|
|
2726
|
-
* @param path 路径
|
|
2727
|
-
* path 为要查找路径:如 /dashboard/student/list、/dashboard/student/list
|
|
2728
|
-
*/
|
|
2729
|
-
findViewByPath(path: string) {
|
|
2730
|
-
const arr = path.split('/');
|
|
2731
|
-
if (arr[0] === '')
|
|
2732
|
-
arr.shift();
|
|
2733
|
-
|
|
2734
|
-
if (!arr.length)
|
|
2735
|
-
throw Error('Cannot find View ' + path);
|
|
2736
|
-
const childName = arr.shift();
|
|
2737
|
-
const subView = this.views.find((child) => child.name === childName);
|
|
2738
|
-
return arr.length ? subView.findViewByPath(arr.join('/')) : subView;
|
|
2739
|
-
}
|
|
2740
|
-
|
|
2741
|
-
findViewByName(name: string): View {
|
|
2742
|
-
return utils.traverse((current) => {
|
|
2743
|
-
if (current.node.name === name)
|
|
2744
|
-
return current.node;
|
|
2745
|
-
}, { node: { name: '', children: this.views } });
|
|
2746
|
-
}
|
|
2747
|
-
|
|
2748
2262
|
loadEnvList() {
|
|
2749
2263
|
this.envList = ['dev', 'online'];
|
|
2750
2264
|
}
|
|
2751
2265
|
|
|
2752
|
-
|
|
2753
|
-
public packageInfo: {
|
|
2754
|
-
template: { name: string; version: string };
|
|
2755
|
-
ui: { name: string; version: string };
|
|
2756
|
-
} = null;
|
|
2757
|
-
|
|
2758
|
-
loadPackageInfo() {
|
|
2266
|
+
loadPackageInfo(scope: string) {
|
|
2759
2267
|
const dependencyMap = (window as any).globalData.ideVersionDetail.dependencies;
|
|
2760
|
-
|
|
2761
|
-
template: { name: '', version: '' },
|
|
2762
|
-
ui: { name: '', version: '' },
|
|
2268
|
+
const packageInfo = {
|
|
2269
|
+
template: { name: '', version: '', scope },
|
|
2270
|
+
ui: { name: '', version: '', scope },
|
|
2271
|
+
scope,
|
|
2763
2272
|
};
|
|
2764
2273
|
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2274
|
+
packageInfo.template.name = scope === 'h5' ? '@lcap/mobile-template' : 'lcap-pc-template';
|
|
2275
|
+
packageInfo.template.version = scope === 'h5' ? dependencyMap.FrontendArchH5.version : dependencyMap.FrontendArchPC.version;
|
|
2276
|
+
packageInfo.ui.name = scope === 'h5' ? '@lcap/mobile-ui' : 'cloud-ui.vusion';
|
|
2277
|
+
packageInfo.ui.version = scope === 'h5' ? dependencyMap.FrontendComponentLibraryH5.version : dependencyMap.FrontendComponentLibraryPC.version;
|
|
2278
|
+
return packageInfo;
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
public packageInfos: Array<{
|
|
2282
|
+
template: { name: string; version: string, scope: string };
|
|
2283
|
+
ui: { name: string; version: string, scope: string };
|
|
2284
|
+
scope: string;
|
|
2285
|
+
}>= [];
|
|
2286
|
+
loadPackageInfos() {
|
|
2287
|
+
const scopes = ['pc', 'h5'];
|
|
2288
|
+
scopes.forEach((scope) => {
|
|
2289
|
+
this.packageInfos.push(this.loadPackageInfo(scope));
|
|
2290
|
+
});
|
|
2769
2291
|
}
|
|
2770
2292
|
|
|
2771
2293
|
/**
|
|
@@ -2773,9 +2295,9 @@ export class App extends BaseNode {
|
|
|
2773
2295
|
* 在环境中需要 basic 和 custom 分开 load,否则容易报错
|
|
2774
2296
|
* @param prefix
|
|
2775
2297
|
*/
|
|
2776
|
-
genAllAssetsInfo(prefix: string) {
|
|
2777
|
-
const packageInfo = this.packageInfo;
|
|
2778
|
-
const
|
|
2298
|
+
genAllAssetsInfo(prefix: string, scope: string) {
|
|
2299
|
+
// const packageInfo = this.packageInfo;
|
|
2300
|
+
const packageInfo = this.packageInfos.find((info) => info.scope === scope);
|
|
2779
2301
|
const result: {
|
|
2780
2302
|
basic: AssetsInfo;
|
|
2781
2303
|
custom?: AssetsInfo;
|
|
@@ -2800,28 +2322,25 @@ export class App extends BaseNode {
|
|
|
2800
2322
|
names: [],
|
|
2801
2323
|
},
|
|
2802
2324
|
};
|
|
2803
|
-
this.
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2325
|
+
const frontends = this.frontends.filter((frontend) => frontend.type === scope);
|
|
2326
|
+
const existingSet = new Set();
|
|
2327
|
+
frontends.forEach((frontend) => {
|
|
2328
|
+
frontend.componentDependencies.forEach((dep) => {
|
|
2329
|
+
const { name, version } = dep;
|
|
2330
|
+
const jsName = `${prefix}/packages/${name}@${version}/dist-theme/index.js`;
|
|
2331
|
+
if (!existingSet.has(jsName)) {
|
|
2332
|
+
existingSet.add(jsName);
|
|
2333
|
+
result.custom.js.push(jsName);
|
|
2334
|
+
if (utils.shouldLoadCss(name, version)) {
|
|
2335
|
+
result.custom.css.push(`${prefix}/packages/${name}@${version}/dist-theme/index.css`);
|
|
2336
|
+
}
|
|
2337
|
+
result.custom.names.push(name);
|
|
2338
|
+
}
|
|
2339
|
+
});
|
|
2810
2340
|
});
|
|
2811
2341
|
return result;
|
|
2812
2342
|
}
|
|
2813
2343
|
|
|
2814
|
-
genThemeCSS() {
|
|
2815
|
-
const keys = Object.keys(this.theme?.variableMap || {});
|
|
2816
|
-
if (!keys.length)
|
|
2817
|
-
return;
|
|
2818
|
-
|
|
2819
|
-
return `:root {
|
|
2820
|
-
${keys.map((key) => ` ${key}: ${this.theme?.variableMap[key]};`).join('\n')}
|
|
2821
|
-
}
|
|
2822
|
-
`;
|
|
2823
|
-
}
|
|
2824
|
-
|
|
2825
2344
|
onChange($event?: EventPayload): void {
|
|
2826
2345
|
this.emit('change', $event);
|
|
2827
2346
|
}
|
|
@@ -2947,6 +2466,160 @@ ${keys.map((key) => ` ${key}: ${this.theme?.variableMap[key]};`).join('\n')}
|
|
|
2947
2466
|
console.log(err);
|
|
2948
2467
|
}
|
|
2949
2468
|
}
|
|
2469
|
+
/* 判断接口是否有误,需要重新导出 */
|
|
2470
|
+
|
|
2471
|
+
getQualifiedInterface(interfaces: Interface[] = this.interfaces):MessageData[] {
|
|
2472
|
+
const errorList: MessageData[] = [];
|
|
2473
|
+
interfaces.forEach((item:Interface) => {
|
|
2474
|
+
const logic = this.logics.find((logic: Logic) => logic.name === item.originLogicName);
|
|
2475
|
+
const logicParamMap: any = {};
|
|
2476
|
+
logic.params.forEach((param) => {
|
|
2477
|
+
logicParamMap[param.name] = param.typeAnnotation;
|
|
2478
|
+
});
|
|
2479
|
+
item.params.forEach((param) => {
|
|
2480
|
+
const logicTypeAnnotation = logicParamMap[param.name]?.toJSON();
|
|
2481
|
+
delete logicParamMap[param.name];
|
|
2482
|
+
if (!logicTypeAnnotation) {
|
|
2483
|
+
return errorList.push({
|
|
2484
|
+
logicName: logic.name,
|
|
2485
|
+
interfaceName: item.name,
|
|
2486
|
+
param: param.name,
|
|
2487
|
+
type: 1,
|
|
2488
|
+
message: `参数“${param.name}”已被删除,请确定请求类型无误后点击“重新导出”为接口`,
|
|
2489
|
+
});
|
|
2490
|
+
}
|
|
2491
|
+
const interfaceTypeAnnotation = param.typeAnnotation.toJSON() as TypeAnnotation;
|
|
2492
|
+
let isSame = false;
|
|
2493
|
+
if (logicTypeAnnotation?.typeNamespace === 'app.enums') {
|
|
2494
|
+
if (interfaceTypeAnnotation.typeNamespace === 'nasl.core' && interfaceTypeAnnotation.typeName === 'String') {
|
|
2495
|
+
isSame = true;
|
|
2496
|
+
}
|
|
2497
|
+
}
|
|
2498
|
+
if (JSON.stringify(logicTypeAnnotation) === JSON.stringify(interfaceTypeAnnotation)) {
|
|
2499
|
+
isSame = true;
|
|
2500
|
+
}
|
|
2501
|
+
if (!isSame) {
|
|
2502
|
+
errorList.push({
|
|
2503
|
+
logicName: logic.name,
|
|
2504
|
+
interfaceName: item.name,
|
|
2505
|
+
param: param.name,
|
|
2506
|
+
type: 2,
|
|
2507
|
+
message: `参数“${param.name}”数据类型变更,请确定请求类型无误后点击“重新导出”为接口`,
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
});
|
|
2511
|
+
const logicReturns = logic.returns;
|
|
2512
|
+
const interfaceReturns = item.returns;
|
|
2513
|
+
if (logicReturns?.length > interfaceReturns?.length) {
|
|
2514
|
+
if (!logicReturns[0].typeAnnotation) {
|
|
2515
|
+
errorList.push({
|
|
2516
|
+
logicName: logic.name,
|
|
2517
|
+
interfaceName: item.name,
|
|
2518
|
+
resultName: logicReturns[0].name,
|
|
2519
|
+
type: 4,
|
|
2520
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
2521
|
+
});
|
|
2522
|
+
} else {
|
|
2523
|
+
errorList.push({
|
|
2524
|
+
logicName: logic.name,
|
|
2525
|
+
interfaceName: item.name,
|
|
2526
|
+
resultName: logicReturns[0].name,
|
|
2527
|
+
type: 4,
|
|
2528
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
2529
|
+
});
|
|
2530
|
+
}
|
|
2531
|
+
} else if (logicReturns?.length < interfaceReturns?.length) {
|
|
2532
|
+
errorList.push({
|
|
2533
|
+
logicName: logic.name,
|
|
2534
|
+
interfaceName: item.name,
|
|
2535
|
+
resultName: interfaceReturns[0].name,
|
|
2536
|
+
type: 4,
|
|
2537
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
2538
|
+
});
|
|
2539
|
+
} else if (logicReturns?.length === interfaceReturns?.length) {
|
|
2540
|
+
if (logicReturns.length !== 0) {
|
|
2541
|
+
if (logicReturns[0].name !== interfaceReturns[0].name) {
|
|
2542
|
+
errorList.push({
|
|
2543
|
+
logicName: logic.name,
|
|
2544
|
+
interfaceName: item.name,
|
|
2545
|
+
resultName: logicReturns[0].name,
|
|
2546
|
+
type: 4,
|
|
2547
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
2548
|
+
});
|
|
2549
|
+
} else if (!logicReturns[0].typeAnnotation) {
|
|
2550
|
+
if (!logicReturns[0]?.__TypeAnnotation) {
|
|
2551
|
+
errorList.push({
|
|
2552
|
+
logicName: logic.name,
|
|
2553
|
+
interfaceName: item.name,
|
|
2554
|
+
resultName: logicReturns[0].name,
|
|
2555
|
+
type: 7,
|
|
2556
|
+
message: `输出参数“${logicReturns[0].name}”没有数据类型,无法导出`,
|
|
2557
|
+
});
|
|
2558
|
+
} else if (JSON.stringify(logicReturns[0]?.__TypeAnnotation?.toJSON()) !== JSON.stringify(interfaceReturns[0]?.typeAnnotation?.toJSON())) {
|
|
2559
|
+
errorList.push({
|
|
2560
|
+
logicName: logic.name,
|
|
2561
|
+
interfaceName: item.name,
|
|
2562
|
+
resultName: logicReturns[0].name,
|
|
2563
|
+
type: 4,
|
|
2564
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
2565
|
+
});
|
|
2566
|
+
}
|
|
2567
|
+
} else if (JSON.stringify(logicReturns[0]?.typeAnnotation?.toJSON()) !== JSON.stringify(interfaceReturns[0]?.typeAnnotation?.toJSON())) {
|
|
2568
|
+
errorList.push({
|
|
2569
|
+
logicName: logic.name,
|
|
2570
|
+
interfaceName: item.name,
|
|
2571
|
+
resultName: logicReturns[0].name,
|
|
2572
|
+
type: 4,
|
|
2573
|
+
message: `输出参数发生变更,请点击“重新导出”`,
|
|
2574
|
+
});
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
for (const i in logicParamMap) {
|
|
2579
|
+
errorList.push({
|
|
2580
|
+
logicName: logic.name,
|
|
2581
|
+
param: i,
|
|
2582
|
+
message: `新增参数“${i}”,请确定请求类型无误后点击“重新导出”为接口`,
|
|
2583
|
+
type: 3,
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
});
|
|
2587
|
+
return errorList;
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
addFrontendForType(options?: string | Partial<Frontend> | Frontend) {
|
|
2591
|
+
let insertIndex = -1;
|
|
2592
|
+
this.frontends.forEach((frontend, index) => {
|
|
2593
|
+
if (frontend.type === (options as any).type) {
|
|
2594
|
+
insertIndex = index;
|
|
2595
|
+
}
|
|
2596
|
+
});
|
|
2597
|
+
if ((options as any).type === 'h5' && insertIndex === -1) {
|
|
2598
|
+
insertIndex = this.frontends.length;
|
|
2599
|
+
}
|
|
2600
|
+
const node = this._insertFrontendAt(options as any, insertIndex + 1);
|
|
2601
|
+
const index = this.frontends.indexOf(node);
|
|
2602
|
+
node.create({
|
|
2603
|
+
index,
|
|
2604
|
+
parentNode: this,
|
|
2605
|
+
parentKey: 'frontends',
|
|
2606
|
+
});
|
|
2607
|
+
return node;
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
getFrontendExistingTitles(excludedList: Array<Frontend> = []) {
|
|
2611
|
+
const excludedSet = new Set(excludedList);
|
|
2612
|
+
return ((this.frontends as Frontend[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.title);
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
getExtensionsCallbackLogics() {
|
|
2616
|
+
let resultLogics:string[] = [];
|
|
2617
|
+
this.frontends.forEach((frontend) => {
|
|
2618
|
+
resultLogics = [...resultLogics, ...frontend.getExtensionsCallbackLogics()];
|
|
2619
|
+
});
|
|
2620
|
+
return Array.from(new Set(resultLogics));
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2950
2623
|
//================================================================================
|
|
2951
2624
|
// 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
|
|
2952
2625
|
// ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
|