@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.
Files changed (326) hide show
  1. package/out/automate/engine/index.js +3 -3
  2. package/out/automate/engine/index.js.map +1 -1
  3. package/out/bak/translator.js +85 -37
  4. package/out/bak/translator.js.map +1 -1
  5. package/out/common/BaseNode.d.ts +6 -10
  6. package/out/common/BaseNode.js +7 -52
  7. package/out/common/BaseNode.js.map +1 -1
  8. package/out/concepts/AnonymousFunction__.js.map +1 -1
  9. package/out/concepts/App__.d.ts +0 -10
  10. package/out/concepts/App__.js +0 -74
  11. package/out/concepts/App__.js.map +1 -1
  12. package/out/concepts/Assignee__.js.map +1 -1
  13. package/out/concepts/AssignmentLine__.d.ts +5 -5
  14. package/out/concepts/AssignmentLine__.js +6 -6
  15. package/out/concepts/AssignmentLine__.js.map +1 -1
  16. package/out/concepts/Assignment__.js +2 -1
  17. package/out/concepts/Assignment__.js.map +1 -1
  18. package/out/concepts/BatchAssignment__.d.ts +60 -60
  19. package/out/concepts/BatchAssignment__.js +11 -21
  20. package/out/concepts/BatchAssignment__.js.map +1 -1
  21. package/out/concepts/BindAttribute__.d.ts +0 -19
  22. package/out/concepts/BindAttribute__.js +2 -39
  23. package/out/concepts/BindAttribute__.js.map +1 -1
  24. package/out/concepts/BindEvent__.js.map +1 -1
  25. package/out/concepts/BindStyle__.d.ts +2 -2
  26. package/out/concepts/BindStyle__.js +3 -3
  27. package/out/concepts/BindStyle__.js.map +1 -1
  28. package/out/concepts/BooleanLiteral__.js +8 -0
  29. package/out/concepts/BooleanLiteral__.js.map +1 -1
  30. package/out/concepts/CallFunction__.js +25 -58
  31. package/out/concepts/CallFunction__.js.map +1 -1
  32. package/out/concepts/CallInterface__.d.ts +0 -7
  33. package/out/concepts/CallInterface__.js +7 -53
  34. package/out/concepts/CallInterface__.js.map +1 -1
  35. package/out/concepts/CallLogic__.js +14 -63
  36. package/out/concepts/CallLogic__.js.map +1 -1
  37. package/out/concepts/CallQueryComponent__.js +1 -13
  38. package/out/concepts/CallQueryComponent__.js.map +1 -1
  39. package/out/concepts/CompletionProperty__.js +0 -3
  40. package/out/concepts/CompletionProperty__.js.map +1 -1
  41. package/out/concepts/ConfigGroup__.js.map +1 -1
  42. package/out/concepts/ConfigProperty__.js.map +1 -1
  43. package/out/concepts/Configuration__.js.map +1 -1
  44. package/out/concepts/DataSource__.d.ts +0 -6
  45. package/out/concepts/DataSource__.js +0 -41
  46. package/out/concepts/DataSource__.js.map +1 -1
  47. package/out/concepts/Destination__.d.ts +1 -9
  48. package/out/concepts/Destination__.js +29 -61
  49. package/out/concepts/Destination__.js.map +1 -1
  50. package/out/concepts/EntityProperty__.d.ts +8 -21
  51. package/out/concepts/EntityProperty__.js +23 -109
  52. package/out/concepts/EntityProperty__.js.map +1 -1
  53. package/out/concepts/Entity__.d.ts +0 -32
  54. package/out/concepts/Entity__.js +2 -117
  55. package/out/concepts/Entity__.js.map +1 -1
  56. package/out/concepts/Enum__.js +4 -0
  57. package/out/concepts/Enum__.js.map +1 -1
  58. package/out/concepts/Event__.js.map +1 -1
  59. package/out/concepts/ForEachStatement__.d.ts +4 -0
  60. package/out/concepts/ForEachStatement__.js +8 -4
  61. package/out/concepts/ForEachStatement__.js.map +1 -1
  62. package/out/concepts/Function__.js.map +1 -1
  63. package/out/concepts/Identifier__.js +4 -16
  64. package/out/concepts/Identifier__.js.map +1 -1
  65. package/out/concepts/IfStatement__.d.ts +0 -8
  66. package/out/concepts/IfStatement__.js +0 -22
  67. package/out/concepts/IfStatement__.js.map +1 -1
  68. package/out/concepts/InterfaceParam__.js.map +1 -1
  69. package/out/concepts/Interface__.js.map +1 -1
  70. package/out/concepts/LogicItem__.d.ts +1 -1
  71. package/out/concepts/LogicItem__.js.map +1 -1
  72. package/out/concepts/Logic__.d.ts +1 -6
  73. package/out/concepts/Logic__.js +43 -144
  74. package/out/concepts/Logic__.js.map +1 -1
  75. package/out/concepts/MatchCase__.d.ts +1 -1
  76. package/out/concepts/MatchCase__.js +8 -15
  77. package/out/concepts/MatchCase__.js.map +1 -1
  78. package/out/concepts/Match__.d.ts +19 -21
  79. package/out/concepts/Match__.js +25 -112
  80. package/out/concepts/Match__.js.map +1 -1
  81. package/out/concepts/MemberExpression__.d.ts +1 -4
  82. package/out/concepts/MemberExpression__.js +15 -30
  83. package/out/concepts/MemberExpression__.js.map +1 -1
  84. package/out/concepts/Module__.js.map +1 -1
  85. package/out/concepts/Namespace__.js.map +1 -1
  86. package/out/concepts/NumericLiteral__.js +1 -1
  87. package/out/concepts/NumericLiteral__.js.map +1 -1
  88. package/out/concepts/OqlQueryComponent__.d.ts +3 -7
  89. package/out/concepts/OqlQueryComponent__.js +95 -56
  90. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  91. package/out/concepts/Param__.d.ts +1 -1
  92. package/out/concepts/Param__.js +4 -40
  93. package/out/concepts/Param__.js.map +1 -1
  94. package/out/concepts/ProcessComponent__.js.map +1 -1
  95. package/out/concepts/ProcessElement__.js.map +1 -1
  96. package/out/concepts/Process__.js.map +1 -1
  97. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  98. package/out/concepts/QueryOrderByExpression__.d.ts +3 -3
  99. package/out/concepts/QueryOrderByExpression__.js +3 -3
  100. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  101. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  102. package/out/concepts/Return__.js +2 -38
  103. package/out/concepts/Return__.js.map +1 -1
  104. package/out/concepts/SelectMembers__.d.ts +1 -1
  105. package/out/concepts/SelectMembers__.js +2 -2
  106. package/out/concepts/SelectMembers__.js.map +1 -1
  107. package/out/concepts/SqlQueryComponent__.d.ts +4 -2
  108. package/out/concepts/SqlQueryComponent__.js +88 -9
  109. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  110. package/out/concepts/StringLiteral__.js +7 -0
  111. package/out/concepts/StringLiteral__.js.map +1 -1
  112. package/out/concepts/StructureProperty__.js.map +1 -1
  113. package/out/concepts/Structure__.js.map +1 -1
  114. package/out/concepts/TypeAnnotation__.d.ts +0 -1
  115. package/out/concepts/TypeAnnotation__.js +12 -25
  116. package/out/concepts/TypeAnnotation__.js.map +1 -1
  117. package/out/concepts/TypeParam__.d.ts +0 -1
  118. package/out/concepts/TypeParam__.js +0 -2
  119. package/out/concepts/TypeParam__.js.map +1 -1
  120. package/out/concepts/UnaryExpression__.js +9 -6
  121. package/out/concepts/UnaryExpression__.js.map +1 -1
  122. package/out/concepts/ValidationRule__.js +23 -88
  123. package/out/concepts/ValidationRule__.js.map +1 -1
  124. package/out/concepts/Variable__.js +2 -38
  125. package/out/concepts/Variable__.js.map +1 -1
  126. package/out/concepts/ViewComponent__.js.map +1 -1
  127. package/out/concepts/ViewElement__.d.ts +29 -30
  128. package/out/concepts/ViewElement__.js +51 -117
  129. package/out/concepts/ViewElement__.js.map +1 -1
  130. package/out/concepts/View__.d.ts +3 -4
  131. package/out/concepts/View__.js +83 -93
  132. package/out/concepts/View__.js.map +1 -1
  133. package/out/concepts/WhileStatement__.js +1 -1
  134. package/out/concepts/WhileStatement__.js.map +1 -1
  135. package/out/concepts/basics/stdlib/nasl.browser.js +0 -50
  136. package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -1
  137. package/out/concepts/basics/stdlib/nasl.ui.js +4 -36
  138. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
  139. package/out/concepts/basics/stdlib/nasl.util.js +43 -63
  140. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  141. package/out/concepts/index__.d.ts +0 -2
  142. package/out/concepts/index__.js +0 -2
  143. package/out/concepts/index__.js.map +1 -1
  144. package/out/generator/genBundleFiles.d.ts +2 -5
  145. package/out/generator/genBundleFiles.js +45 -148
  146. package/out/generator/genBundleFiles.js.map +1 -1
  147. package/out/generator/index.d.ts +0 -1
  148. package/out/generator/index.js +0 -1
  149. package/out/generator/index.js.map +1 -1
  150. package/out/index.d.ts +2 -3
  151. package/out/index.js +1 -5
  152. package/out/index.js.map +1 -1
  153. package/out/server/entity2LogicNamespace.js +11 -11
  154. package/out/server/entity2LogicNamespace.js.map +1 -1
  155. package/out/server/extendBaseNode.js.map +1 -1
  156. package/out/server/formatTsUtils.js +17 -10
  157. package/out/server/formatTsUtils.js.map +1 -1
  158. package/out/server/getLogics.js +6 -13
  159. package/out/server/getLogics.js.map +1 -1
  160. package/out/server/getMemberIdentifier.js +7 -7
  161. package/out/server/getMemberIdentifier.js.map +1 -1
  162. package/out/server/getProcesses.d.ts +1 -1
  163. package/out/server/index.d.ts +1 -0
  164. package/out/server/index.js +27 -2
  165. package/out/server/index.js.map +1 -1
  166. package/out/server/naslServer.d.ts +7 -47
  167. package/out/server/naslServer.js +393 -591
  168. package/out/server/naslServer.js.map +1 -1
  169. package/out/server/naslStdlibMap.js +28 -30
  170. package/out/server/naslStdlibMap.js.map +1 -1
  171. package/out/server/translator.js +7 -40
  172. package/out/server/translator.js.map +1 -1
  173. package/out/service/storage/init.js +3 -33
  174. package/out/service/storage/init.js.map +1 -1
  175. package/out/templator/genCreateBlock.js +4 -6
  176. package/out/templator/genCreateBlock.js.map +1 -1
  177. package/out/templator/genCurdEditMultipleKeyBlock.js +4 -7
  178. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  179. package/out/templator/genCurdMultipleKeyBlock.js +5 -7
  180. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  181. package/out/templator/genEnumSelectBlock.js +2 -5
  182. package/out/templator/genEnumSelectBlock.js.map +1 -1
  183. package/out/templator/genGridViewBlock.js +2 -2
  184. package/out/templator/genGridViewBlock.js.map +1 -1
  185. package/out/templator/genListViewBlock.js +2 -2
  186. package/out/templator/genListViewBlock.js.map +1 -1
  187. package/out/templator/genQueryComponent.d.ts +2 -2
  188. package/out/templator/genQueryComponent.js +1 -4
  189. package/out/templator/genQueryComponent.js.map +1 -1
  190. package/out/templator/genTableBlock.js +2 -2
  191. package/out/templator/genTableBlock.js.map +1 -1
  192. package/out/templator/genUpdateBlock.js +3 -4
  193. package/out/templator/genUpdateBlock.js.map +1 -1
  194. package/out/templator/utils.js +1 -1
  195. package/out/templator/utils.js.map +1 -1
  196. package/out/test/integration/node-nasl-server.js +38 -10
  197. package/out/test/integration/node-nasl-server.js.map +1 -1
  198. package/out/translator/index.d.ts +0 -1
  199. package/out/translator/index.js +1 -1
  200. package/out/translator/index.js.map +1 -1
  201. package/out/utils/index.d.ts +0 -1
  202. package/out/utils/index.js +1 -38
  203. package/out/utils/index.js.map +1 -1
  204. package/out/utils/string.d.ts +2 -15
  205. package/out/utils/string.js +3 -18
  206. package/out/utils/string.js.map +1 -1
  207. package/package.json +2 -2
  208. package/sandbox/stdlib/nasl.auth.ts +1 -1
  209. package/sandbox/stdlib/nasl.core.ts +1 -0
  210. package/sandbox/stdlib/nasl.logging.ts +4 -4
  211. package/sandbox/stdlib/nasl.util.ts +9 -5
  212. package/src/automate/engine/index.js +4 -4
  213. package/src/automate/engine/uniqueName.js +3 -3
  214. package/src/automate/template/myProcess.js +1 -1
  215. package/src/automate/upgrader/2.20.js +41 -0
  216. package/src/bak/translator.js +4 -1
  217. package/src/common/BaseNode.ts +1 -0
  218. package/src/concepts/AnonymousFunction__.ts +48 -2
  219. package/src/concepts/App__.ts +288 -615
  220. package/src/concepts/BatchAssignment__.ts +111 -51
  221. package/src/concepts/BindAttribute__.ts +18 -25
  222. package/src/concepts/BindDirective__.ts +7 -0
  223. package/src/concepts/BindEvent__.ts +7 -0
  224. package/src/concepts/BindStyle__.ts +7 -0
  225. package/src/concepts/CallFunction__.ts +34 -45
  226. package/src/concepts/CallInterface__.ts +2 -1
  227. package/src/concepts/CallLogic__.ts +87 -55
  228. package/src/concepts/CallQueryComponent__.ts +4 -1
  229. package/src/concepts/Constant__.ts +7 -0
  230. package/src/concepts/DataSource__.ts +57 -5
  231. package/src/concepts/Destination__.ts +100 -43
  232. package/src/concepts/Frontend__.ts +937 -0
  233. package/src/concepts/Identifier__.ts +18 -16
  234. package/src/concepts/LogicItem__.ts +8 -1
  235. package/src/concepts/Logic__.ts +134 -149
  236. package/src/concepts/Match__.ts +13 -29
  237. package/src/concepts/NewComposite__.ts +1357 -0
  238. package/src/concepts/NewList__.ts +440 -0
  239. package/src/concepts/NewMap__.ts +666 -0
  240. package/src/concepts/New__.ts +73 -0
  241. package/src/concepts/Param__.ts +245 -199
  242. package/src/concepts/ProcessElement__.ts +43 -36
  243. package/src/concepts/ProcessOutcomes__.ts +90 -0
  244. package/src/concepts/Process__.ts +1 -23
  245. package/src/concepts/Return__.ts +11 -1
  246. package/src/concepts/SelectMembers__.ts +3 -3
  247. package/src/concepts/Transactional__.ts +7 -0
  248. package/src/concepts/TypeAnnotation__.ts +54 -49
  249. package/src/concepts/ValidationRule__.ts +19 -1
  250. package/src/concepts/Variable__.ts +12 -6
  251. package/src/concepts/ViewElement__.ts +26 -3
  252. package/src/concepts/View__.ts +25 -25
  253. package/src/concepts/basics/stdlib/nasl.auth.ts +1 -1
  254. package/src/concepts/basics/stdlib/nasl.logging.ts +5 -0
  255. package/src/concepts/basics/stdlib/nasl.ui.ts +2 -0
  256. package/src/concepts/basics/stdlib/nasl.util.ts +153 -19
  257. package/src/concepts/index__.ts +7 -0
  258. package/src/enums/KEYWORDS.ts +9 -0
  259. package/src/generator/genBundleFiles.ts +74 -245
  260. package/src/generator/genMetaData.ts +178 -78
  261. package/src/generator/genReleaseBody.ts +87 -44
  262. package/src/generator/index.ts +1 -0
  263. package/src/generator/permission.ts +261 -0
  264. package/src/index.ts +1 -1
  265. package/src/server/entity2LogicNamespace.ts +90 -10
  266. package/src/server/extendBaseNode.ts +33 -22
  267. package/src/server/formatTsUtils.ts +36 -46
  268. package/src/server/getLogics.ts +13 -1
  269. package/src/server/getMemberIdentifier.ts +5 -5
  270. package/src/server/getProcesses.ts +1 -1
  271. package/src/server/naslServer.ts +254 -71
  272. package/src/server/process2LogicNamespace.ts +8 -0
  273. package/src/server/translator.ts +51 -5
  274. package/src/service/creator/add.configs.js +4 -0
  275. package/src/service/datasource/api.js +11 -0
  276. package/src/service/datasource/index.js +6 -0
  277. package/src/service/storage/init.ts +12 -0
  278. package/src/service/video/VideoTranscribe.js +1 -0
  279. package/src/templator/genEditTableBlock.ts +8 -16
  280. package/src/templator/genGetBlock.ts +18 -19
  281. package/src/templator/genGridViewBlock.ts +18 -18
  282. package/src/templator/genListViewBlock.ts +8 -11
  283. package/src/templator/genTableBlock.ts +6 -10
  284. package/ts-worker/lib/tsserver.js +8 -1
  285. package/out/automate/engine/2.14-components.d.ts +0 -1115
  286. package/out/automate/engine/2.14-components.js +0 -1087
  287. package/out/automate/engine/2.14-components.js.map +0 -1
  288. package/out/concepts/ExternalDestination__.d.ts +0 -73
  289. package/out/concepts/ExternalDestination__.js +0 -264
  290. package/out/concepts/ExternalDestination__.js.map +0 -1
  291. package/out/concepts/MatchExpression__.d.ts +0 -97
  292. package/out/concepts/MatchExpression__.js +0 -281
  293. package/out/concepts/MatchExpression__.js.map +0 -1
  294. package/out/concepts/StringInterpolation__.d.ts +0 -113
  295. package/out/concepts/StringInterpolation__.js +0 -227
  296. package/out/concepts/StringInterpolation__.js.map +0 -1
  297. package/out/generator/genReleaseBody.d.ts +0 -41
  298. package/out/generator/genReleaseBody.js +0 -340
  299. package/out/generator/genReleaseBody.js.map +0 -1
  300. package/out/service/defaultErrorMessage.json +0 -97
  301. package/out/service/logic/api.d.ts +0 -9
  302. package/out/service/logic/api.js +0 -11
  303. package/out/service/logic/api.js.map +0 -1
  304. package/out/service/logic/index.d.ts +0 -2
  305. package/out/service/logic/index.js +0 -10
  306. package/out/service/logic/index.js.map +0 -1
  307. package/src/automate/engine/dist/index.dev.js +0 -517
  308. package/src/common/dist/BaseNode.js +0 -1101
  309. package/src/concepts/basics/stdlib/dist/reference2TypeAnnotationList.js +0 -24
  310. package/src/concepts/dist/Anchor__.js +0 -179
  311. package/src/concepts/dist/Assignment__.js +0 -301
  312. package/src/concepts/dist/CallFunction__.js +0 -473
  313. package/src/concepts/dist/CallInterface__.js +0 -533
  314. package/src/concepts/dist/CallLogic__.js +0 -864
  315. package/src/concepts/dist/ForEachStatement__.js +0 -426
  316. package/src/concepts/dist/MatchCase__.js +0 -587
  317. package/src/concepts/dist/MemberExpression__.js +0 -348
  318. package/src/concepts/dist/Param__.js +0 -537
  319. package/src/concepts/dist/Return__.js +0 -493
  320. package/src/generator/dist/genBundleFiles.js +0 -414
  321. package/src/server/dist/formatTsUtils.js +0 -683
  322. package/src/server/dist/naslServer.js +0 -3396
  323. package/src/service/storage/dist/init.js +0 -541
  324. package/ts-worker/dist/webpack.config.dev.js +0 -104
  325. package/ts-worker/lib/dist/tsserver.dev.js +0 -22953
  326. package/ts-worker/sources/lib/dist/tsserver.dev.js +0 -22912
@@ -0,0 +1,937 @@
1
+ import { TranslatorState, shiftState, withSourceMap, indent, createCompilerState } from '../translator';
2
+ import Namespace from './Namespace__';
3
+
4
+ //================================================================================
5
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
6
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
7
+ //================================================================================
8
+ import { EventPayload, Params } from '../common/EventEmitter';
9
+ import { concept, excludedInJSON, property } from '../decorators';
10
+
11
+ import * as utils from '../utils';
12
+ import { v4 as uuidv4 } from 'uuid';
13
+ import BaseNode from '../common/BaseNode';
14
+ import classMap from '../common/classMap';
15
+ import View from './View__';
16
+ import Variable from './Variable__';
17
+ import Theme from './Theme__';
18
+ import Module from './Module__';
19
+ import App, { AssetsInfo } from './App__';
20
+
21
+ /**
22
+ * 端
23
+ */
24
+ @concept('端')
25
+ export class Frontend extends BaseNode {
26
+ /**
27
+ * 产品概念
28
+ */
29
+ @property()
30
+ concept: 'Frontend' = 'Frontend';
31
+
32
+ /**
33
+ * 端标识
34
+ */
35
+ @property()
36
+ name: string = undefined;
37
+
38
+ /**
39
+ * pc端
40
+ */
41
+ @property()
42
+ title: string = undefined;
43
+
44
+ /**
45
+ * PC/H5 端
46
+ */
47
+ @property()
48
+ type: 'pc' | 'h5' = undefined;
49
+
50
+ /**
51
+ * 基础路径
52
+ */
53
+ @property()
54
+ path: string = undefined;
55
+
56
+ /**
57
+ * 制品应用标题
58
+ */
59
+ @property()
60
+ documentTitle: string = undefined;
61
+
62
+ /**
63
+ * 制品应用图标
64
+ */
65
+ @property()
66
+ documentIcon: string = undefined;
67
+
68
+ /**
69
+ * 页面列表
70
+ */
71
+ @property('View')
72
+ views: Array<View> = [];
73
+
74
+ /**
75
+ * 变量列表
76
+ */
77
+ @property('Variable')
78
+ variables: Array<Variable> = [];
79
+
80
+ /**
81
+ * 主题配置
82
+ */
83
+ @property('Theme')
84
+ theme: Theme = new Theme();
85
+
86
+ /**
87
+ * 扩展组件列表(兼容老版)
88
+ */
89
+ @property('Module')
90
+ componentDependencies: Array<Module> = [];
91
+
92
+ /**
93
+ * 祖先 App
94
+ */
95
+ get app() {
96
+ return this.getAncestor('App') as App;
97
+ }
98
+
99
+ /**
100
+ * @param source 需要合并的部分参数
101
+ */
102
+ constructor(source?: Partial<Frontend>) {
103
+ source = Object.assign({}, Frontend.getDefaultOptions(), source);
104
+ super(source);
105
+ super.subConstructor(source);
106
+ }
107
+
108
+ static from(source: any, parentNode?: any, parentKey?: string): Frontend {
109
+ return super.from(source, parentNode, parentKey) as Frontend;
110
+ }
111
+
112
+ /**
113
+ * 从父级删除该节点
114
+ * @internal
115
+ */
116
+ _delete() {
117
+ let params: Params = null;
118
+ if (this.parentNode) {
119
+ params = (this.parentNode as any)?.__removeFrontend?.(this);
120
+ }
121
+ return params;
122
+ }
123
+ /**
124
+ * 设置端标识
125
+ */
126
+ setName(name: string) {
127
+ const object = {
128
+ name,
129
+ };
130
+ this.update({
131
+ ...object,
132
+ field: 'name',
133
+ });
134
+ }
135
+
136
+ /**
137
+ * 设置pc端
138
+ */
139
+ setTitle(title: string) {
140
+ const object = {
141
+ title,
142
+ };
143
+ this.update({
144
+ ...object,
145
+ });
146
+ }
147
+
148
+ /**
149
+ * 设置基础路径
150
+ */
151
+ setPath(path: string) {
152
+ const object = {
153
+ path,
154
+ };
155
+ this.update({
156
+ ...object,
157
+ });
158
+ }
159
+
160
+ /**
161
+ * 设置制品应用标题
162
+ */
163
+ setDocumentTitle(documentTitle: string) {
164
+ const object = {
165
+ documentTitle,
166
+ };
167
+ this.update({
168
+ ...object,
169
+ });
170
+ }
171
+
172
+ /**
173
+ * 设置制品应用图标
174
+ */
175
+ setDocumentIcon(documentIcon: string) {
176
+ const object = {
177
+ documentIcon,
178
+ };
179
+ this.update({
180
+ ...object,
181
+ });
182
+ }
183
+
184
+ getViewExistingNames(excludedList: Array<View> = []) {
185
+ const excludedSet = new Set(excludedList);
186
+ return ((this.views as View[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
187
+ }
188
+ getViewUniqueName(name = 'view1') {
189
+ return utils.unique(name, this.getViewExistingNames(), undefined, true);
190
+ }
191
+
192
+ /**
193
+ * 插入页面
194
+ * @internal
195
+ * @param name 页面名称,如果不填会自动生成一个唯一名称
196
+ */
197
+ _insertViewAt(name: string, index: number): View;
198
+
199
+ /**
200
+ * 插入页面
201
+ * @internal
202
+ * @param viewOptions 页面参数
203
+ */
204
+ _insertViewAt(viewOptions: Partial<View>, index: number): View;
205
+
206
+ /**
207
+ * 插入页面
208
+ * @internal
209
+ * @param view 已有的页面实例
210
+ */
211
+ _insertViewAt(view: View, index: number): View;
212
+
213
+ _insertViewAt(options: string | Partial<View> | View, index: number) {
214
+ const viewOptions: any = {};
215
+ const relationOptions = { parentNode: this, parentKey: 'views' };
216
+ let view: View;
217
+ if (!options) {
218
+ view = View.from({
219
+ ...viewOptions,
220
+ name: this.getViewUniqueName(),
221
+ }, this, 'views');
222
+ } else if (typeof options === 'string') {
223
+ view = View.from({
224
+ ...viewOptions,
225
+ name: options,
226
+ }, this, 'views');
227
+ } else if (options instanceof View) {
228
+ options.ensureDelete(); // 同一实例不支持多处存在
229
+ view = options;
230
+ Object.assign(view, relationOptions);
231
+ } else {
232
+ view = View.from({
233
+ ...viewOptions,
234
+ ...options,
235
+ }, this, 'views');
236
+ }
237
+ this.views.splice(index, 0, view);
238
+ return view;
239
+ }
240
+
241
+ /**
242
+ * 插入页面
243
+ * @param name 页面名称,如果不填会自动生成一个唯一名称
244
+ */
245
+ insertViewAt(name: string, index: number): View;
246
+
247
+ /**
248
+ * 插入页面
249
+ * @param viewOptions 页面参数
250
+ */
251
+ insertViewAt(viewOptions: Partial<View>, index: number): View;
252
+
253
+ /**
254
+ * 插入页面
255
+ * @param view 已有的页面实例
256
+ */
257
+ insertViewAt(view: View, index: number): View;
258
+
259
+ insertViewAt(options: string | Partial<View> | View, index: number) {
260
+ const node = this._insertViewAt(options as any, index);
261
+ node.create({
262
+ index,
263
+ parentNode: this,
264
+ parentKey: 'views',
265
+ });
266
+ return node;
267
+ }
268
+
269
+ /**
270
+ * 添加页面
271
+ * @internal
272
+ * @param name 页面名称,如果不填会自动生成一个唯一名称
273
+ */
274
+ _addView(name?: string): View;
275
+
276
+ /**
277
+ * 添加页面
278
+ * @internal
279
+ * @param viewOptions 页面参数
280
+ */
281
+ _addView(viewOptions: Partial<View>): View;
282
+
283
+ /**
284
+ * 添加页面
285
+ * @internal
286
+ * @param view 已有的页面实例
287
+ */
288
+ _addView(view: View): View;
289
+
290
+ _addView(options?: string | Partial<View> | View) {
291
+ const index = this.views.length;
292
+ return this._insertViewAt(options as any, index);
293
+ }
294
+
295
+ /**
296
+ * 添加页面
297
+ * @internal
298
+ * @param name 页面名称,如果不填会自动生成一个唯一名称
299
+ */
300
+ addView(name?: string): View;
301
+
302
+ /**
303
+ * 添加页面
304
+ * @param viewOptions 页面参数
305
+ */
306
+ addView(viewOptions: Partial<View>): View;
307
+
308
+ /**
309
+ * 添加页面
310
+ * @param view 已有的页面实例
311
+ */
312
+ addView(view: View): View;
313
+
314
+ addView(options?: string | Partial<View> | View) {
315
+ const node = this._addView(options as any);
316
+ const index = this.views.indexOf(node);
317
+ node.create({
318
+ index,
319
+ parentNode: this,
320
+ parentKey: 'views',
321
+ });
322
+ return node;
323
+ }
324
+
325
+ getVarExistingNames(excludedList: Array<Variable> = []) {
326
+ const excludedSet = new Set(excludedList);
327
+ return ((this.variables as Variable[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
328
+ }
329
+ getVariableUniqueName(name = 'variable1') {
330
+ return utils.unique(name, this.getVarExistingNames(), undefined, true);
331
+ }
332
+
333
+ /**
334
+ * 插入变量
335
+ * @internal
336
+ * @param name 变量名称,如果不填会自动生成一个唯一名称
337
+ */
338
+ _insertVariableAt(name: string, index: number): Variable;
339
+
340
+ /**
341
+ * 插入变量
342
+ * @internal
343
+ * @param variableOptions 变量参数
344
+ */
345
+ _insertVariableAt(variableOptions: Partial<Variable>, index: number): Variable;
346
+
347
+ /**
348
+ * 插入变量
349
+ * @internal
350
+ * @param variable 已有的变量实例
351
+ */
352
+ _insertVariableAt(variable: Variable, index: number): Variable;
353
+
354
+ _insertVariableAt(options: string | Partial<Variable> | Variable, index: number) {
355
+ const variableOptions: any = {};
356
+ const relationOptions = { parentNode: this, parentKey: 'variables' };
357
+ let variable: Variable;
358
+ if (!options) {
359
+ variable = Variable.from({
360
+ ...variableOptions,
361
+ name: this.getVariableUniqueName(),
362
+ }, this, 'variables');
363
+ } else if (typeof options === 'string') {
364
+ variable = Variable.from({
365
+ ...variableOptions,
366
+ name: options,
367
+ }, this, 'variables');
368
+ } else if (options instanceof Variable) {
369
+ options.ensureDelete(); // 同一实例不支持多处存在
370
+ variable = options;
371
+ Object.assign(variable, relationOptions);
372
+ } else {
373
+ variable = Variable.from({
374
+ ...variableOptions,
375
+ ...options,
376
+ }, this, 'variables');
377
+ }
378
+ this.variables.splice(index, 0, variable);
379
+ return variable;
380
+ }
381
+
382
+ /**
383
+ * 插入变量
384
+ * @param name 变量名称,如果不填会自动生成一个唯一名称
385
+ */
386
+ insertVariableAt(name: string, index: number): Variable;
387
+
388
+ /**
389
+ * 插入变量
390
+ * @param variableOptions 变量参数
391
+ */
392
+ insertVariableAt(variableOptions: Partial<Variable>, index: number): Variable;
393
+
394
+ /**
395
+ * 插入变量
396
+ * @param variable 已有的变量实例
397
+ */
398
+ insertVariableAt(variable: Variable, index: number): Variable;
399
+
400
+ insertVariableAt(options: string | Partial<Variable> | Variable, index: number) {
401
+ const node = this._insertVariableAt(options as any, index);
402
+ node.create({
403
+ index,
404
+ parentNode: this,
405
+ parentKey: 'variables',
406
+ });
407
+ return node;
408
+ }
409
+
410
+ /**
411
+ * 添加变量
412
+ * @internal
413
+ * @param name 变量名称,如果不填会自动生成一个唯一名称
414
+ */
415
+ _addVariable(name?: string): Variable;
416
+
417
+ /**
418
+ * 添加变量
419
+ * @internal
420
+ * @param variableOptions 变量参数
421
+ */
422
+ _addVariable(variableOptions: Partial<Variable>): Variable;
423
+
424
+ /**
425
+ * 添加变量
426
+ * @internal
427
+ * @param variable 已有的变量实例
428
+ */
429
+ _addVariable(variable: Variable): Variable;
430
+
431
+ _addVariable(options?: string | Partial<Variable> | Variable) {
432
+ const index = this.variables.length;
433
+ return this._insertVariableAt(options as any, index);
434
+ }
435
+
436
+ /**
437
+ * 添加变量
438
+ * @internal
439
+ * @param name 变量名称,如果不填会自动生成一个唯一名称
440
+ */
441
+ addVariable(name?: string): Variable;
442
+
443
+ /**
444
+ * 添加变量
445
+ * @param variableOptions 变量参数
446
+ */
447
+ addVariable(variableOptions: Partial<Variable>): Variable;
448
+
449
+ /**
450
+ * 添加变量
451
+ * @param variable 已有的变量实例
452
+ */
453
+ addVariable(variable: Variable): Variable;
454
+
455
+ addVariable(options?: string | Partial<Variable> | Variable) {
456
+ const node = this._addVariable(options as any);
457
+ const index = this.variables.indexOf(node);
458
+ node.create({
459
+ index,
460
+ parentNode: this,
461
+ parentKey: 'variables',
462
+ });
463
+ return node;
464
+ }
465
+
466
+ getModuleExistingNames(excludedList: Array<Module> = []) {
467
+ const excludedSet = new Set(excludedList);
468
+ return ((this.componentDependencies as Module[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
469
+ }
470
+ getModuleUniqueName(name = 'module1') {
471
+ return utils.unique(name, this.getModuleExistingNames(), undefined, false);
472
+ }
473
+
474
+ /**
475
+ * 插入模块
476
+ * @internal
477
+ * @param name 模块名称,如果不填会自动生成一个唯一名称
478
+ */
479
+ _insertModuleAt(name: string, index: number): Module;
480
+
481
+ /**
482
+ * 插入模块
483
+ * @internal
484
+ * @param moduleOptions 模块参数
485
+ */
486
+ _insertModuleAt(moduleOptions: Partial<Module>, index: number): Module;
487
+
488
+ /**
489
+ * 插入模块
490
+ * @internal
491
+ * @param module 已有的模块实例
492
+ */
493
+ _insertModuleAt(module: Module, index: number): Module;
494
+
495
+ _insertModuleAt(options: string | Partial<Module> | Module, index: number) {
496
+ const moduleOptions: any = {};
497
+ const relationOptions = { parentNode: this, parentKey: 'componentDependencies' };
498
+ let module: Module;
499
+ if (!options) {
500
+ module = Module.from({
501
+ ...moduleOptions,
502
+ name: this.getModuleUniqueName(),
503
+ }, this, 'componentDependencies');
504
+ } else if (typeof options === 'string') {
505
+ module = Module.from({
506
+ ...moduleOptions,
507
+ name: options,
508
+ }, this, 'componentDependencies');
509
+ } else if (options instanceof Module) {
510
+ options.ensureDelete(); // 同一实例不支持多处存在
511
+ module = options;
512
+ Object.assign(module, relationOptions);
513
+ } else {
514
+ module = Module.from({
515
+ ...moduleOptions,
516
+ ...options,
517
+ }, this, 'componentDependencies');
518
+ }
519
+ this.componentDependencies.splice(index, 0, module);
520
+ return module;
521
+ }
522
+
523
+ /**
524
+ * 插入模块
525
+ * @param name 模块名称,如果不填会自动生成一个唯一名称
526
+ */
527
+ insertModuleAt(name: string, index: number): Module;
528
+
529
+ /**
530
+ * 插入模块
531
+ * @param moduleOptions 模块参数
532
+ */
533
+ insertModuleAt(moduleOptions: Partial<Module>, index: number): Module;
534
+
535
+ /**
536
+ * 插入模块
537
+ * @param module 已有的模块实例
538
+ */
539
+ insertModuleAt(module: Module, index: number): Module;
540
+
541
+ insertModuleAt(options: string | Partial<Module> | Module, index: number) {
542
+ const node = this._insertModuleAt(options as any, index);
543
+ node.create({
544
+ index,
545
+ parentNode: this,
546
+ parentKey: 'componentDependencies',
547
+ });
548
+ return node;
549
+ }
550
+
551
+ /**
552
+ * 添加模块
553
+ * @internal
554
+ * @param name 模块名称,如果不填会自动生成一个唯一名称
555
+ */
556
+ _addModule(name?: string): Module;
557
+
558
+ /**
559
+ * 添加模块
560
+ * @internal
561
+ * @param moduleOptions 模块参数
562
+ */
563
+ _addModule(moduleOptions: Partial<Module>): Module;
564
+
565
+ /**
566
+ * 添加模块
567
+ * @internal
568
+ * @param module 已有的模块实例
569
+ */
570
+ _addModule(module: Module): Module;
571
+
572
+ _addModule(options?: string | Partial<Module> | Module) {
573
+ const index = this.componentDependencies.length;
574
+ return this._insertModuleAt(options as any, index);
575
+ }
576
+
577
+ /**
578
+ * 添加模块
579
+ * @internal
580
+ * @param name 模块名称,如果不填会自动生成一个唯一名称
581
+ */
582
+ addModule(name?: string): Module;
583
+
584
+ /**
585
+ * 添加模块
586
+ * @param moduleOptions 模块参数
587
+ */
588
+ addModule(moduleOptions: Partial<Module>): Module;
589
+
590
+ /**
591
+ * 添加模块
592
+ * @param module 已有的模块实例
593
+ */
594
+ addModule(module: Module): Module;
595
+
596
+ addModule(options?: string | Partial<Module> | Module) {
597
+ const node = this._addModule(options as any);
598
+ const index = this.componentDependencies.indexOf(node);
599
+ node.create({
600
+ index,
601
+ parentNode: this,
602
+ parentKey: 'componentDependencies',
603
+ });
604
+ return node;
605
+ }
606
+
607
+ /**
608
+ * 删除页面
609
+ * @param name 页面名称
610
+ */
611
+ removeView(name: string): void;
612
+
613
+ /**
614
+ * 删除页面
615
+ * @param view 已有的页面实例
616
+ */
617
+ removeView(view: View): void;
618
+
619
+ removeView(options: string | View) {
620
+ let view: View;
621
+ if (typeof options === 'string') {
622
+ view = (this.views as View[]).find((item) => item.name === options);
623
+ if (!view) {
624
+ throw new Error('找不到页面 ' + options);
625
+ }
626
+ } else {
627
+ view = options;
628
+ }
629
+ return view.delete();
630
+ }
631
+
632
+ __removeView(view: View) {
633
+ const parentKey = view.parentKey;
634
+ const params: Params = {
635
+ parentNode: this,
636
+ parentKey,
637
+ index: -1,
638
+ object: null,
639
+ oldObject: view,
640
+ };
641
+ if (parentKey) {
642
+ params.parentKey = parentKey;
643
+ if (Array.isArray((this as any)[parentKey])) {
644
+ const index = (this as any)[parentKey].indexOf(view);
645
+ ~index && (this as any)[parentKey].splice(index, 1);
646
+ params.index = index;
647
+ } else if ((this as any)[parentKey] === view) {
648
+ params.index = 0;
649
+ (this as any)[parentKey] = undefined;
650
+ }
651
+ }
652
+ return params;
653
+ }
654
+
655
+ /**
656
+ * 删除变量
657
+ * @param name 变量名称
658
+ */
659
+ removeVariable(name: string): void;
660
+
661
+ /**
662
+ * 删除变量
663
+ * @param variable 已有的变量实例
664
+ */
665
+ removeVariable(variable: Variable): void;
666
+
667
+ removeVariable(options: string | Variable) {
668
+ let variable: Variable;
669
+ if (typeof options === 'string') {
670
+ variable = (this.variables as Variable[]).find((item) => item.name === options);
671
+ if (!variable) {
672
+ throw new Error('找不到变量 ' + options);
673
+ }
674
+ } else {
675
+ variable = options;
676
+ }
677
+ return variable.delete();
678
+ }
679
+
680
+ __removeVariable(variable: Variable) {
681
+ const parentKey = variable.parentKey;
682
+ const params: Params = {
683
+ parentNode: this,
684
+ parentKey,
685
+ index: -1,
686
+ object: null,
687
+ oldObject: variable,
688
+ };
689
+ if (parentKey) {
690
+ params.parentKey = parentKey;
691
+ if (Array.isArray((this as any)[parentKey])) {
692
+ const index = (this as any)[parentKey].indexOf(variable);
693
+ ~index && (this as any)[parentKey].splice(index, 1);
694
+ params.index = index;
695
+ } else if ((this as any)[parentKey] === variable) {
696
+ params.index = 0;
697
+ (this as any)[parentKey] = undefined;
698
+ }
699
+ }
700
+ return params;
701
+ }
702
+
703
+ /**
704
+ * 删除主题
705
+ * @param name 主题名称
706
+ */
707
+ removeTheme(name: string): void;
708
+
709
+ /**
710
+ * 删除主题
711
+ * @param theme 已有的主题实例
712
+ */
713
+ removeTheme(theme: Theme): void;
714
+
715
+ removeTheme(options: string | Theme) {
716
+ let theme: Theme;
717
+ if (typeof options === 'string') {
718
+ theme = this.theme;
719
+ if (!theme) {
720
+ throw new Error('找不到主题 ' + options);
721
+ }
722
+ } else {
723
+ theme = options;
724
+ }
725
+ return theme.delete();
726
+ }
727
+
728
+ __removeTheme(theme: Theme) {
729
+ const parentKey = theme.parentKey;
730
+ const params: Params = {
731
+ parentNode: this,
732
+ parentKey,
733
+ index: -1,
734
+ object: null,
735
+ oldObject: theme,
736
+ };
737
+ if (parentKey) {
738
+ params.parentKey = parentKey;
739
+ if (Array.isArray((this as any)[parentKey])) {
740
+ const index = (this as any)[parentKey].indexOf(theme);
741
+ ~index && (this as any)[parentKey].splice(index, 1);
742
+ params.index = index;
743
+ } else if ((this as any)[parentKey] === theme) {
744
+ params.index = 0;
745
+ (this as any)[parentKey] = undefined;
746
+ }
747
+ }
748
+ return params;
749
+ }
750
+
751
+ /**
752
+ * 删除模块
753
+ * @param name 模块名称
754
+ */
755
+ removeModule(name: string): void;
756
+
757
+ /**
758
+ * 删除模块
759
+ * @param module 已有的模块实例
760
+ */
761
+ removeModule(module: Module): void;
762
+
763
+ removeModule(options: string | Module) {
764
+ let module: Module;
765
+ if (typeof options === 'string') {
766
+ module = (this.componentDependencies as Module[]).find((item) => item.name === options);
767
+ if (!module) {
768
+ throw new Error('找不到模块 ' + options);
769
+ }
770
+ } else {
771
+ module = options;
772
+ }
773
+ return module.delete();
774
+ }
775
+
776
+ __removeModule(module: Module) {
777
+ const parentKey = module.parentKey;
778
+ const params: Params = {
779
+ parentNode: this,
780
+ parentKey,
781
+ index: -1,
782
+ object: null,
783
+ oldObject: module,
784
+ };
785
+ if (parentKey) {
786
+ params.parentKey = parentKey;
787
+ if (Array.isArray((this as any)[parentKey])) {
788
+ const index = (this as any)[parentKey].indexOf(module);
789
+ ~index && (this as any)[parentKey].splice(index, 1);
790
+ params.index = index;
791
+ } else if ((this as any)[parentKey] === module) {
792
+ params.index = 0;
793
+ (this as any)[parentKey] = undefined;
794
+ }
795
+ }
796
+ return params;
797
+ }
798
+
799
+ //================================================================================
800
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
801
+ // 自动生成的代码已结束。下面可以手动编写。
802
+ //================================================================================
803
+
804
+ findComponentDependencyByName(name: string) {
805
+ return this.componentDependencies.find((componentDependency) => componentDependency.name === name);
806
+ }
807
+
808
+ /**
809
+ * @param path 路径
810
+ * path 为要查找路径:如 /dashboard/student/list、/dashboard/student/list
811
+ */
812
+ findViewByPath(path: string) {
813
+ const arr = path.split('/');
814
+ if (arr[0] === '')
815
+ arr.shift();
816
+
817
+ if (!arr.length)
818
+ throw Error('Cannot find View ' + path);
819
+ const childName = arr.shift();
820
+ const subView = this.views.find((child) => child.name === childName);
821
+ return arr.length ? subView.findViewByPath(arr.join('/')) : subView;
822
+ }
823
+
824
+ findViewByName(name: string): View {
825
+ return utils.traverse((current) => {
826
+ if (current.node.name === name)
827
+ return current.node;
828
+ }, { node: { name: '', children: this.views } });
829
+ }
830
+
831
+ genThemeCSS() {
832
+ const keys = Object.keys(this.theme?.variableMap || {});
833
+ if (!keys.length)
834
+ return;
835
+
836
+ return `:root {
837
+ ${keys.map((key) => ` ${key}: ${this.theme?.variableMap[key]};`).join('\n')}
838
+ }`;
839
+ }
840
+
841
+ getNamespace() {
842
+ if (this.parentNode && (this.parentNode as Namespace).getNamespace) {
843
+ const parentNamespace = (this.parentNode as Namespace).getNamespace();
844
+ const parentName = this.parentNode.name;
845
+ const arr = [parentNamespace];
846
+ if (this.parentNode.concept !== 'App' && parentName) {
847
+ arr.push(parentName);
848
+ }
849
+ return `${arr.join('.')}.frontends`;
850
+ } else
851
+ throw new Error('无法获取命名空间,请设置 parentNode!');
852
+ }
853
+
854
+ /**
855
+ * 生成宿主语言的文件路径
856
+ * @param name 一般不用传,用于 rename
857
+ */
858
+ getEmbeddedFilePath(name = this.name) {
859
+ return `/embedded/${this.rootNode?.name || this.parentNode.name}/frontends/${name}.ts`;
860
+ }
861
+
862
+ @withSourceMap()
863
+ toEmbeddedTS(state?: TranslatorState): string {
864
+ let code = `export namespace ${this.name} {\n`;
865
+ code += 'const name = ';
866
+ code += '"' + this.name + '";\n';
867
+ code += '}\n';
868
+ return code;
869
+ }
870
+ toEmbeddedTSFile() {
871
+ let code = `namespace ${this.getNamespace()} {\n`;
872
+
873
+ const state = createCompilerState(code, { tabSize: 1 });
874
+ try {
875
+ code += this.toEmbeddedTS(state);
876
+ } catch (err) {
877
+ code += '';
878
+ console.log(err);
879
+ }
880
+ code += '}\n';
881
+
882
+ return {
883
+ code,
884
+ filePath: this.getEmbeddedFilePath(),
885
+ sourceMap: state.sourceMap,
886
+ };
887
+ }
888
+
889
+ getPath() {
890
+ const path = this.path;
891
+ const finalPath = path && path !== '/' ? path : '';
892
+ return finalPath;
893
+ }
894
+
895
+ /**
896
+ * 为/的转成'',便于url拼接
897
+ */
898
+ get basePath() {
899
+ const path = this.path;
900
+ const basePath = path && path !== '/' ? path : '';
901
+ return basePath;
902
+ }
903
+
904
+ genCustomAssetsInfo(prefix: string) {
905
+ const custom: AssetsInfo = {
906
+ js: [],
907
+ css: [],
908
+ names: [],
909
+ };
910
+ const existingSet = new Set();
911
+ this.componentDependencies.forEach((dep) => {
912
+ const { name, version } = dep;
913
+ const jsName = `${prefix}/packages/${name}@${version}/dist-theme/index.js`;
914
+ if (!existingSet.has(jsName)) {
915
+ existingSet.add(jsName);
916
+ custom.js.push(jsName);
917
+ if (utils.shouldLoadCss(name, version)) {
918
+ custom.css.push(`${prefix}/packages/${name}@${version}/dist-theme/index.css`);
919
+ }
920
+ custom.names.push(name);
921
+ }
922
+ });
923
+ return custom;
924
+ }
925
+
926
+ //================================================================================
927
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
928
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
929
+ //================================================================================
930
+ }
931
+
932
+ classMap.Frontend = Frontend;
933
+ export default Frontend;
934
+ //================================================================================
935
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
936
+ // 自动生成的代码已结束。下面可以手动编写。
937
+ //================================================================================