@lcap/nasl 1.0.0-alpha.2 → 1.0.0-alpha.3

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 (391) hide show
  1. package/README.md +3 -3
  2. package/docs/assets/search.js +1 -1
  3. package/docs/classes/Entity.html +2832 -204
  4. package/docs/classes/View.html +4567 -365
  5. package/out/common/BaseNode.js +23 -16
  6. package/out/common/BaseNode.js.map +1 -1
  7. package/out/concepts/App__.d.ts +22 -0
  8. package/out/concepts/App__.js +77 -15
  9. package/out/concepts/App__.js.map +1 -1
  10. package/out/concepts/Argument__.d.ts +2 -1
  11. package/out/concepts/Argument__.js +2 -2
  12. package/out/concepts/Argument__.js.map +1 -1
  13. package/out/concepts/Assignment__.d.ts +2 -1
  14. package/out/concepts/Assignment__.js +3 -8
  15. package/out/concepts/Assignment__.js.map +1 -1
  16. package/out/concepts/Attribute__.js.map +1 -1
  17. package/out/concepts/BinaryExpression__.d.ts +2 -1
  18. package/out/concepts/BinaryExpression__.js +5 -5
  19. package/out/concepts/BinaryExpression__.js.map +1 -1
  20. package/out/concepts/BindAttribute__.d.ts +2 -1
  21. package/out/concepts/BindAttribute__.js +9 -4
  22. package/out/concepts/BindAttribute__.js.map +1 -1
  23. package/out/concepts/BindDirective__.d.ts +2 -1
  24. package/out/concepts/BindDirective__.js +2 -2
  25. package/out/concepts/BindDirective__.js.map +1 -1
  26. package/out/concepts/BindEvent__.d.ts +2 -1
  27. package/out/concepts/BindEvent__.js +4 -3
  28. package/out/concepts/BindEvent__.js.map +1 -1
  29. package/out/concepts/BooleanLiteral__.d.ts +2 -1
  30. package/out/concepts/BooleanLiteral__.js +1 -1
  31. package/out/concepts/BooleanLiteral__.js.map +1 -1
  32. package/out/concepts/CallFunction__.d.ts +57 -1
  33. package/out/concepts/CallFunction__.js +119 -11
  34. package/out/concepts/CallFunction__.js.map +1 -1
  35. package/out/concepts/CallInterface__.d.ts +2 -1
  36. package/out/concepts/CallInterface__.js +2 -2
  37. package/out/concepts/CallInterface__.js.map +1 -1
  38. package/out/concepts/CallLogic__.d.ts +57 -1
  39. package/out/concepts/CallLogic__.js +117 -10
  40. package/out/concepts/CallLogic__.js.map +1 -1
  41. package/out/concepts/CallQueryComponent__.js +1 -1
  42. package/out/concepts/CallQueryComponent__.js.map +1 -1
  43. package/out/concepts/Comment__.js.map +1 -1
  44. package/out/concepts/CompletionProperty__.js.map +1 -1
  45. package/out/concepts/ConfigGroup__.d.ts +120 -0
  46. package/out/concepts/ConfigGroup__.js +214 -0
  47. package/out/concepts/ConfigGroup__.js.map +1 -0
  48. package/out/concepts/ConfigPropertyValue__.d.ts +43 -0
  49. package/out/concepts/ConfigPropertyValue__.js +103 -0
  50. package/out/concepts/ConfigPropertyValue__.js.map +1 -0
  51. package/out/concepts/ConfigProperty__.d.ts +128 -0
  52. package/out/concepts/ConfigProperty__.js +236 -0
  53. package/out/concepts/ConfigProperty__.js.map +1 -0
  54. package/out/concepts/Configuration__.d.ts +120 -0
  55. package/out/concepts/Configuration__.js +210 -0
  56. package/out/concepts/Configuration__.js.map +1 -0
  57. package/out/concepts/Constant__.d.ts +2 -1
  58. package/out/concepts/Constant__.js +1 -1
  59. package/out/concepts/Constant__.js.map +1 -1
  60. package/out/concepts/DataElement__.js.map +1 -1
  61. package/out/concepts/Destination__.d.ts +2 -1
  62. package/out/concepts/Destination__.js +4 -3
  63. package/out/concepts/Destination__.js.map +1 -1
  64. package/out/concepts/End__.js.map +1 -1
  65. package/out/concepts/EntityIndex__.d.ts +8 -0
  66. package/out/concepts/EntityIndex__.js +18 -0
  67. package/out/concepts/EntityIndex__.js.map +1 -1
  68. package/out/concepts/EntityProperty__.d.ts +5 -5
  69. package/out/concepts/EntityProperty__.js +10 -9
  70. package/out/concepts/EntityProperty__.js.map +1 -1
  71. package/out/concepts/Entity__.d.ts +30 -26
  72. package/out/concepts/Entity__.js +44 -36
  73. package/out/concepts/Entity__.js.map +1 -1
  74. package/out/concepts/EnumItem__.js.map +1 -1
  75. package/out/concepts/Enum__.d.ts +8 -8
  76. package/out/concepts/Enum__.js +10 -4
  77. package/out/concepts/Enum__.js.map +1 -1
  78. package/out/concepts/Event__.js +1 -1
  79. package/out/concepts/Event__.js.map +1 -1
  80. package/out/concepts/ForEachStatement__.d.ts +35 -33
  81. package/out/concepts/ForEachStatement__.js +103 -36
  82. package/out/concepts/ForEachStatement__.js.map +1 -1
  83. package/out/concepts/Function__.js +1 -1
  84. package/out/concepts/Function__.js.map +1 -1
  85. package/out/concepts/Identifier__.d.ts +2 -1
  86. package/out/concepts/Identifier__.js +15 -1
  87. package/out/concepts/Identifier__.js.map +1 -1
  88. package/out/concepts/IfStatement__.js.map +1 -1
  89. package/out/concepts/InterfaceParam__.js +1 -1
  90. package/out/concepts/InterfaceParam__.js.map +1 -1
  91. package/out/concepts/Interface__.d.ts +5 -1
  92. package/out/concepts/Interface__.js +19 -5
  93. package/out/concepts/Interface__.js.map +1 -1
  94. package/out/concepts/JSBlock__.js.map +1 -1
  95. package/out/concepts/LogicItem__.d.ts +2 -1
  96. package/out/concepts/LogicItem__.js +2 -2
  97. package/out/concepts/LogicItem__.js.map +1 -1
  98. package/out/concepts/Logic__.js +9 -7
  99. package/out/concepts/Logic__.js.map +1 -1
  100. package/out/concepts/MemberExpression__.d.ts +2 -5
  101. package/out/concepts/MemberExpression__.js +12 -18
  102. package/out/concepts/MemberExpression__.js.map +1 -1
  103. package/out/concepts/Module__.d.ts +121 -126
  104. package/out/concepts/Module__.js +10 -17
  105. package/out/concepts/Module__.js.map +1 -1
  106. package/out/concepts/Namespace__.js +12 -12
  107. package/out/concepts/Namespace__.js.map +1 -1
  108. package/out/concepts/NullLiteral__.d.ts +2 -1
  109. package/out/concepts/NullLiteral__.js +1 -1
  110. package/out/concepts/NullLiteral__.js.map +1 -1
  111. package/out/concepts/NumericLiteral__.d.ts +2 -1
  112. package/out/concepts/NumericLiteral__.js +1 -1
  113. package/out/concepts/NumericLiteral__.js.map +1 -1
  114. package/out/concepts/Param__.d.ts +1 -1
  115. package/out/concepts/Param__.js +2 -2
  116. package/out/concepts/Param__.js.map +1 -1
  117. package/out/concepts/Point__.js.map +1 -1
  118. package/out/concepts/ProcessComponent__.js +2 -2
  119. package/out/concepts/ProcessComponent__.js.map +1 -1
  120. package/out/concepts/ProcessElement__.d.ts +82 -81
  121. package/out/concepts/ProcessElement__.js +19 -6
  122. package/out/concepts/ProcessElement__.js.map +1 -1
  123. package/out/concepts/ProcessOutcome__.js.map +1 -1
  124. package/out/concepts/Process__.d.ts +1 -0
  125. package/out/concepts/Process__.js +10 -4
  126. package/out/concepts/Process__.js.map +1 -1
  127. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  128. package/out/concepts/QueryFieldExpression__.js +1 -1
  129. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  130. package/out/concepts/QueryFromExpression__.js.map +1 -1
  131. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  132. package/out/concepts/QueryJoinExpression__.js +1 -1
  133. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  134. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  135. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  136. package/out/concepts/QuerySelectExpression__.js +1 -1
  137. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  138. package/out/concepts/Rect__.js.map +1 -1
  139. package/out/concepts/Return__.d.ts +1 -1
  140. package/out/concepts/Return__.js +2 -2
  141. package/out/concepts/Return__.js.map +1 -1
  142. package/out/concepts/Role__.d.ts +5 -0
  143. package/out/concepts/Role__.js +19 -2
  144. package/out/concepts/Role__.js.map +1 -1
  145. package/out/concepts/Slot__.js.map +1 -1
  146. package/out/concepts/SqlQueryComponent__.d.ts +2 -0
  147. package/out/concepts/SqlQueryComponent__.js +16 -0
  148. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  149. package/out/concepts/Start__.js.map +1 -1
  150. package/out/concepts/StringLiteral__.d.ts +2 -1
  151. package/out/concepts/StringLiteral__.js +1 -1
  152. package/out/concepts/StringLiteral__.js.map +1 -1
  153. package/out/concepts/StructureProperty__.d.ts +1 -1
  154. package/out/concepts/StructureProperty__.js +1 -1
  155. package/out/concepts/StructureProperty__.js.map +1 -1
  156. package/out/concepts/Structure__.d.ts +1 -1
  157. package/out/concepts/Structure__.js +4 -4
  158. package/out/concepts/Structure__.js.map +1 -1
  159. package/out/concepts/SwitchCase__.js.map +1 -1
  160. package/out/concepts/SwitchStatement__.js.map +1 -1
  161. package/out/concepts/Theme__.js.map +1 -1
  162. package/out/concepts/Transactional__.js.map +1 -1
  163. package/out/concepts/TypeAnnotation__.js +3 -0
  164. package/out/concepts/TypeAnnotation__.js.map +1 -1
  165. package/out/concepts/TypeParam__.js.map +1 -1
  166. package/out/concepts/UnaryExpression__.d.ts +2 -1
  167. package/out/concepts/UnaryExpression__.js +3 -3
  168. package/out/concepts/UnaryExpression__.js.map +1 -1
  169. package/out/concepts/Unparsed__.d.ts +2 -1
  170. package/out/concepts/Unparsed__.js +1 -1
  171. package/out/concepts/Unparsed__.js.map +1 -1
  172. package/out/concepts/UseComponent__.js.map +1 -1
  173. package/out/concepts/ValidationRule__.d.ts +2 -1
  174. package/out/concepts/ValidationRule__.js +2 -2
  175. package/out/concepts/ValidationRule__.js.map +1 -1
  176. package/out/concepts/Variable__.d.ts +6 -5
  177. package/out/concepts/Variable__.js +3 -3
  178. package/out/concepts/Variable__.js.map +1 -1
  179. package/out/concepts/ViewComponent__.js +5 -5
  180. package/out/concepts/ViewComponent__.js.map +1 -1
  181. package/out/concepts/ViewElement__.d.ts +5 -4
  182. package/out/concepts/ViewElement__.js +109 -65
  183. package/out/concepts/ViewElement__.js.map +1 -1
  184. package/out/concepts/View__.d.ts +97 -90
  185. package/out/concepts/View__.js +153 -118
  186. package/out/concepts/View__.js.map +1 -1
  187. package/out/concepts/WhileStatement__.js.map +1 -1
  188. package/out/concepts/basics/stdlib/index.js +2 -2
  189. package/out/concepts/basics/stdlib/index.js.map +1 -1
  190. package/out/concepts/basics/stdlib/nasl.ui.js +3 -137
  191. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
  192. package/out/concepts/basics/stdlib/nasl.util.js +21 -5
  193. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  194. package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
  195. package/out/concepts/basics/stdlib/nasl.validation.js +527 -0
  196. package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
  197. package/out/concepts/index__.d.ts +4 -0
  198. package/out/concepts/index__.js +4 -0
  199. package/out/concepts/index__.js.map +1 -1
  200. package/out/data/Module.d.ts +34 -0
  201. package/out/data/Module.js +53 -0
  202. package/out/data/Module.js.map +1 -0
  203. package/out/generator/compileComponent.d.ts +1 -1
  204. package/out/generator/genBundleFiles.d.ts +0 -1
  205. package/out/generator/genBundleFiles.js +1 -1
  206. package/out/generator/genBundleFiles.js.map +1 -1
  207. package/out/generator/genMetaData.d.ts +35 -0
  208. package/out/generator/genMetaData.js +78 -0
  209. package/out/generator/genMetaData.js.map +1 -0
  210. package/out/generator/index.d.ts +1 -0
  211. package/out/generator/index.js +1 -0
  212. package/out/generator/index.js.map +1 -1
  213. package/out/index.d.ts +2 -2
  214. package/out/index.js +3 -1
  215. package/out/index.js.map +1 -1
  216. package/out/server/createUiTs.d.ts +7 -0
  217. package/out/server/createUiTs.js +157 -0
  218. package/out/server/createUiTs.js.map +1 -0
  219. package/out/server/entity2LogicNamespace.d.ts +9 -1
  220. package/out/server/entity2LogicNamespace.js +11 -1
  221. package/out/server/entity2LogicNamespace.js.map +1 -1
  222. package/out/server/getExtensionModules.d.ts +3 -0
  223. package/out/server/getExtensionModules.js +18 -0
  224. package/out/server/getExtensionModules.js.map +1 -0
  225. package/out/server/getLogics.js +18 -15
  226. package/out/server/getLogics.js.map +1 -1
  227. package/out/server/getMemberIdentifier.d.ts +3 -2
  228. package/out/server/getMemberIdentifier.js +47 -15
  229. package/out/server/getMemberIdentifier.js.map +1 -1
  230. package/out/server/getProcesses.d.ts +4 -1
  231. package/out/server/getProcesses.js +16 -7
  232. package/out/server/getProcesses.js.map +1 -1
  233. package/out/server/getValidates.js +1 -1
  234. package/out/server/getValidates.js.map +1 -1
  235. package/out/server/index.js +1 -0
  236. package/out/server/index.js.map +1 -1
  237. package/out/server/naslServer.d.ts +23 -5
  238. package/out/server/naslServer.js +199 -25
  239. package/out/server/naslServer.js.map +1 -1
  240. package/out/server/process2LogicNamespace.d.ts +15 -1
  241. package/out/server/process2LogicNamespace.js +30 -3
  242. package/out/server/process2LogicNamespace.js.map +1 -1
  243. package/out/server/translator.js +28 -0
  244. package/out/server/translator.js.map +1 -1
  245. package/out/service/storage/init.d.ts +5 -0
  246. package/out/service/storage/init.js +60 -52
  247. package/out/service/storage/init.js.map +1 -1
  248. package/out/templator/genCallComponentLogic.js +2 -2
  249. package/out/templator/genCallComponentLogic.js.map +1 -1
  250. package/out/templator/genCreateBlock.js +6 -8
  251. package/out/templator/genCreateBlock.js.map +1 -1
  252. package/out/templator/genCurdEditMultipleKeyBlock.js +3 -3
  253. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  254. package/out/templator/genCurdMultipleKeyBlock.js +4 -4
  255. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  256. package/out/templator/genEditTableBlock.js +3 -3
  257. package/out/templator/genEditTableBlock.js.map +1 -1
  258. package/out/templator/genGetBlock.js +1 -1
  259. package/out/templator/genGetBlock.js.map +1 -1
  260. package/out/templator/genListViewBlock.js +2 -2
  261. package/out/templator/genListViewBlock.js.map +1 -1
  262. package/out/templator/genSelectBlock.js +1 -1
  263. package/out/templator/genSelectBlock.js.map +1 -1
  264. package/out/templator/genUpdateBlock.js +8 -12
  265. package/out/templator/genUpdateBlock.js.map +1 -1
  266. package/out/templator/utils.d.ts +20 -20
  267. package/out/templator/utils.js +22 -22
  268. package/out/templator/utils.js.map +1 -1
  269. package/package.json +2 -1
  270. package/src/automate/engine/index.js +37 -3
  271. package/src/automate/engine/utils.js +68 -64
  272. package/src/common/BaseNode.ts +24 -17
  273. package/src/concepts/App__.ts +93 -17
  274. package/src/concepts/Argument__.ts +4 -2
  275. package/src/concepts/Assignment__.ts +5 -7
  276. package/src/concepts/Attribute__.ts +1 -0
  277. package/src/concepts/BinaryExpression__.ts +7 -5
  278. package/src/concepts/BindAttribute__.ts +9 -4
  279. package/src/concepts/BindDirective__.ts +4 -2
  280. package/src/concepts/BindEvent__.ts +6 -4
  281. package/src/concepts/BooleanLiteral__.ts +3 -1
  282. package/src/concepts/CallFunction__.ts +195 -11
  283. package/src/concepts/CallInterface__.ts +4 -2
  284. package/src/concepts/CallLogic__.ts +211 -12
  285. package/src/concepts/CallQueryComponent__.ts +2 -1
  286. package/src/concepts/Comment__.ts +1 -0
  287. package/src/concepts/CompletionProperty__.ts +1 -0
  288. package/src/concepts/ConfigGroup__.ts +290 -0
  289. package/src/concepts/ConfigPropertyValue__.ts +112 -0
  290. package/src/concepts/ConfigProperty__.ts +306 -0
  291. package/src/concepts/Configuration__.ts +286 -0
  292. package/src/concepts/Constant__.ts +3 -1
  293. package/src/concepts/DataElement__.ts +1 -0
  294. package/src/concepts/Destination__.ts +7 -5
  295. package/src/concepts/End__.ts +1 -0
  296. package/src/concepts/EntityIndex__.ts +19 -0
  297. package/src/concepts/EntityProperty__.ts +9 -8
  298. package/src/concepts/Entity__.ts +66 -59
  299. package/src/concepts/EnumItem__.ts +1 -0
  300. package/src/concepts/Enum__.ts +32 -12
  301. package/src/concepts/Event__.ts +2 -1
  302. package/src/concepts/ForEachStatement__.ts +115 -69
  303. package/src/concepts/Function__.ts +2 -1
  304. package/src/concepts/Identifier__.ts +18 -1
  305. package/src/concepts/IfStatement__.ts +1 -0
  306. package/src/concepts/InterfaceParam__.ts +2 -1
  307. package/src/concepts/Interface__.ts +21 -5
  308. package/src/concepts/JSBlock__.ts +1 -0
  309. package/src/concepts/LogicItem__.ts +9 -40
  310. package/src/concepts/Logic__.ts +48 -9
  311. package/src/concepts/MemberExpression__.ts +14 -17
  312. package/src/concepts/Module__.ts +158 -139
  313. package/src/concepts/Namespace__.ts +13 -12
  314. package/src/concepts/NullLiteral__.ts +3 -1
  315. package/src/concepts/NumericLiteral__.ts +3 -1
  316. package/src/concepts/Param__.ts +3 -2
  317. package/src/concepts/Point__.ts +1 -0
  318. package/src/concepts/ProcessComponent__.ts +3 -2
  319. package/src/concepts/ProcessElement__.ts +102 -107
  320. package/src/concepts/ProcessOutcome__.ts +1 -0
  321. package/src/concepts/Process__.ts +12 -4
  322. package/src/concepts/QueryAggregateExpression__.ts +1 -0
  323. package/src/concepts/QueryFieldExpression__.ts +2 -1
  324. package/src/concepts/QueryFromExpression__.ts +1 -0
  325. package/src/concepts/QueryGroupByExpression__.ts +1 -0
  326. package/src/concepts/QueryJoinExpression__.ts +2 -1
  327. package/src/concepts/QueryLimitExpression__.ts +1 -0
  328. package/src/concepts/QueryOrderByExpression__.ts +1 -0
  329. package/src/concepts/QuerySelectExpression__.ts +2 -1
  330. package/src/concepts/Rect__.ts +1 -0
  331. package/src/concepts/Return__.ts +3 -2
  332. package/src/concepts/Role__.ts +19 -2
  333. package/src/concepts/Slot__.ts +1 -0
  334. package/src/concepts/SqlQueryComponent__.ts +11 -1
  335. package/src/concepts/Start__.ts +1 -0
  336. package/src/concepts/StringLiteral__.ts +3 -1
  337. package/src/concepts/StructureProperty__.ts +2 -1
  338. package/src/concepts/Structure__.ts +5 -4
  339. package/src/concepts/SwitchCase__.ts +1 -0
  340. package/src/concepts/SwitchStatement__.ts +1 -0
  341. package/src/concepts/Theme__.ts +1 -0
  342. package/src/concepts/Transactional__.ts +1 -0
  343. package/src/concepts/TypeAnnotation__.ts +4 -0
  344. package/src/concepts/TypeParam__.ts +1 -0
  345. package/src/concepts/UnaryExpression__.ts +6 -3
  346. package/src/concepts/Unparsed__.ts +3 -1
  347. package/src/concepts/UseComponent__.ts +1 -0
  348. package/src/concepts/ValidationRule__.ts +5 -2
  349. package/src/concepts/Variable__.ts +12 -6
  350. package/src/concepts/ViewComponent__.ts +6 -5
  351. package/src/concepts/ViewElement__.ts +109 -80
  352. package/src/concepts/View__.ts +245 -206
  353. package/src/concepts/WhileStatement__.ts +1 -0
  354. package/src/concepts/basics/stdlib/index.ts +2 -2
  355. package/src/concepts/basics/stdlib/nasl.ui.ts +3 -137
  356. package/src/concepts/basics/stdlib/nasl.util.ts +21 -5
  357. package/src/concepts/basics/stdlib/{nasl.validate.ts → nasl.validation.ts} +28 -28
  358. package/src/concepts/index__.ts +4 -0
  359. package/src/generator/compileComponent.ts +1 -1
  360. package/src/generator/genBundleFiles.ts +1 -2
  361. package/src/generator/genMetaData.ts +111 -0
  362. package/src/generator/index.ts +1 -0
  363. package/src/index.ts +2 -2
  364. package/src/server/createUiTs.ts +153 -0
  365. package/src/server/entity2LogicNamespace.ts +17 -1
  366. package/src/server/getExtensionModules.ts +13 -0
  367. package/src/server/getLogics.ts +19 -18
  368. package/src/server/getMemberIdentifier.ts +60 -19
  369. package/src/server/getProcesses.ts +15 -8
  370. package/src/server/getValidates.ts +1 -1
  371. package/src/server/index.ts +2 -1
  372. package/src/server/naslServer.ts +204 -24
  373. package/src/server/process2LogicNamespace.ts +44 -3
  374. package/src/server/translator.ts +121 -97
  375. package/src/service/config/api.js +32 -0
  376. package/src/service/config/index.js +6 -0
  377. package/src/service/creator/index.js +2 -2
  378. package/src/service/logic/checktypeSocket.js +49 -0
  379. package/src/service/modules/api.js +20 -0
  380. package/src/service/modules/index.js +6 -0
  381. package/src/service/storage/init.ts +62 -54
  382. package/src/templator/genCallComponentLogic.ts +2 -2
  383. package/src/templator/genCreateBlock.ts +19 -25
  384. package/src/templator/genCurdEditMultipleKeyBlock.ts +3 -3
  385. package/src/templator/genCurdMultipleKeyBlock.ts +4 -4
  386. package/src/templator/genEditTableBlock.ts +3 -3
  387. package/src/templator/genGetBlock.ts +1 -1
  388. package/src/templator/genListViewBlock.ts +2 -2
  389. package/src/templator/genSelectBlock.ts +1 -1
  390. package/src/templator/genUpdateBlock.ts +19 -25
  391. package/src/templator/utils.ts +25 -153
@@ -0,0 +1,112 @@
1
+ //================================================================================
2
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
3
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
4
+ //================================================================================
5
+ import { EventPayload, Params } from '../common/EventEmitter';
6
+ import { concept, excludedInJSON, property } from '../decorators';
7
+
8
+ import * as utils from '../utils';
9
+ import { v4 as uuidv4 } from 'uuid';
10
+ import BaseNode from '../common/BaseNode';
11
+ import classMap from '../common/classMap';
12
+ import App from './App__';
13
+
14
+ /**
15
+ * 配置属性值
16
+ */
17
+ @concept
18
+ export class ConfigPropertyValue extends BaseNode {
19
+ /**
20
+ * 产品概念
21
+ */
22
+ @property()
23
+ concept: 'ConfigPropertyValue' = 'ConfigPropertyValue';
24
+
25
+ /**
26
+ * env
27
+ */
28
+ @property()
29
+ env: string = undefined;
30
+
31
+ /**
32
+ * 配置属性值的值
33
+ */
34
+ @property()
35
+ value: string = undefined;
36
+
37
+ /**
38
+ * 祖先 App
39
+ */
40
+ get app() {
41
+ return this.getAncestor('App') as App;
42
+ }
43
+
44
+ /**
45
+ * @param source 需要合并的部分参数
46
+ */
47
+ constructor(source?: Partial<ConfigPropertyValue>) {
48
+ source = Object.assign({}, ConfigPropertyValue.getDefaultOptions(), source);
49
+ super(source);
50
+ super.subConstructor(source);
51
+ }
52
+
53
+ static from(source: any, parentNode?: any, parentKey?: string): ConfigPropertyValue {
54
+ return super.from(source, parentNode, parentKey) as ConfigPropertyValue;
55
+ }
56
+
57
+ /**
58
+ * 从父级删除该节点
59
+ * @internal
60
+ */
61
+ _delete() {
62
+ let params: Params = null;
63
+ if (this.parentNode) {
64
+ params = (this.parentNode as any)?.__removeConfigPropertyValue?.(this);
65
+ }
66
+ return params;
67
+ }
68
+ /**
69
+ * 设置env
70
+ */
71
+ setEnv(env: string) {
72
+ const object = {
73
+ env,
74
+ };
75
+ this.update({
76
+ ...object,
77
+ });
78
+ }
79
+
80
+ /**
81
+ * 设置配置属性值的值
82
+ */
83
+ setValue(value: string) {
84
+ const object = {
85
+ value,
86
+ };
87
+ this.update({
88
+ ...object,
89
+ });
90
+ }
91
+
92
+
93
+
94
+
95
+
96
+ //================================================================================
97
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
98
+ // 自动生成的代码已结束。下面可以手动编写。
99
+ //================================================================================
100
+
101
+ //================================================================================
102
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
103
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
104
+ //================================================================================
105
+ }
106
+
107
+ classMap['ConfigPropertyValue'] = ConfigPropertyValue;
108
+ export default ConfigPropertyValue;
109
+ //================================================================================
110
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
111
+ // 自动生成的代码已结束。下面可以手动编写。
112
+ //================================================================================
@@ -0,0 +1,306 @@
1
+ //================================================================================
2
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
3
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
4
+ //================================================================================
5
+ import { EventPayload, Params } from '../common/EventEmitter';
6
+ import { concept, excludedInJSON, property } from '../decorators';
7
+
8
+ import * as utils from '../utils';
9
+ import { v4 as uuidv4 } from 'uuid';
10
+ import BaseNode from '../common/BaseNode';
11
+ import classMap from '../common/classMap';
12
+ import ConfigPropertyValue from './ConfigPropertyValue__';
13
+ import App from './App__';
14
+
15
+ /**
16
+ * 配置属性
17
+ */
18
+ @concept
19
+ export class ConfigProperty extends BaseNode {
20
+ /**
21
+ * 产品概念
22
+ */
23
+ @property()
24
+ concept: 'ConfigProperty' = 'ConfigProperty';
25
+
26
+ /**
27
+ * 配置属性名称
28
+ */
29
+ @property()
30
+ name: string = undefined;
31
+
32
+ /**
33
+ * 配置属性描述
34
+ */
35
+ @property()
36
+ description: string = undefined;
37
+
38
+ /**
39
+ * 配置属性值列表
40
+ */
41
+ @property('ConfigPropertyValue')
42
+ values: Array<ConfigPropertyValue> = [];
43
+
44
+ /**
45
+ * 祖先 App
46
+ */
47
+ get app() {
48
+ return this.getAncestor('App') as App;
49
+ }
50
+
51
+ /**
52
+ * @param source 需要合并的部分参数
53
+ */
54
+ constructor(source?: Partial<ConfigProperty>) {
55
+ source = Object.assign({}, ConfigProperty.getDefaultOptions(), source);
56
+ super(source);
57
+ super.subConstructor(source);
58
+ }
59
+
60
+ static from(source: any, parentNode?: any, parentKey?: string): ConfigProperty {
61
+ return super.from(source, parentNode, parentKey) as ConfigProperty;
62
+ }
63
+
64
+ /**
65
+ * 从父级删除该节点
66
+ * @internal
67
+ */
68
+ _delete() {
69
+ let params: Params = null;
70
+ if (this.parentNode) {
71
+ params = (this.parentNode as any)?.__removeConfigProperty?.(this);
72
+ }
73
+ return params;
74
+ }
75
+ /**
76
+ * 设置配置属性名称
77
+ */
78
+ setName(name: string) {
79
+ const object = {
80
+ name,
81
+ };
82
+ this.update({
83
+ ...object,
84
+ field: 'name',
85
+ });
86
+ }
87
+
88
+ getConfigPropertyValueExistingNames(excludedList: Array<ConfigPropertyValue> = []) {
89
+ const excludedSet = new Set(excludedList);
90
+ return (this.values || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
91
+ }
92
+ getConfigPropertyValueUniqueName(name = 'configPropertyValue1') {
93
+ return utils.unique(name, this.getConfigPropertyValueExistingNames());
94
+ }
95
+
96
+ /**
97
+ * 插入配置属性值
98
+ * @internal
99
+ * @param name 配置属性值名称,如果不填会自动生成一个唯一名称
100
+ */
101
+ _insertConfigPropertyValueAt(name: string, index: number): ConfigPropertyValue;
102
+
103
+ /**
104
+ * 插入配置属性值
105
+ * @internal
106
+ * @param configPropertyValueOptions 配置属性值参数
107
+ */
108
+ _insertConfigPropertyValueAt(configPropertyValueOptions: Partial<ConfigPropertyValue>, index: number): ConfigPropertyValue;
109
+
110
+ /**
111
+ * 插入配置属性值
112
+ * @internal
113
+ * @param configPropertyValue 已有的配置属性值实例
114
+ */
115
+ _insertConfigPropertyValueAt(configPropertyValue: ConfigPropertyValue, index: number): ConfigPropertyValue;
116
+
117
+ _insertConfigPropertyValueAt(options: string | Partial<ConfigPropertyValue> | ConfigPropertyValue, index: number) {
118
+ const configPropertyValueOptions: any = {};
119
+ const relationOptions = { parentNode: this, parentKey: 'values' };
120
+ let configPropertyValue: ConfigPropertyValue;
121
+ if (!options) {
122
+ configPropertyValue = ConfigPropertyValue.from({
123
+ ...configPropertyValueOptions,
124
+ name: this.getConfigPropertyValueUniqueName(),
125
+ }, this, 'values');
126
+ } else if (typeof options === 'string') {
127
+ configPropertyValue = ConfigPropertyValue.from({
128
+ ...configPropertyValueOptions,
129
+ name: options,
130
+ }, this, 'values');
131
+ } else if (options instanceof ConfigPropertyValue) {
132
+ options.delete(); // 同一实例不支持多处存在
133
+ configPropertyValue = options;
134
+ Object.assign(configPropertyValue, relationOptions);
135
+ } else {
136
+ configPropertyValue = ConfigPropertyValue.from({
137
+ ...configPropertyValueOptions,
138
+ ...options,
139
+ }, this, 'values');
140
+ }
141
+ this.values.splice(index, 0, configPropertyValue);
142
+ return configPropertyValue;
143
+ }
144
+
145
+ /**
146
+ * 插入配置属性值
147
+ * @param name 配置属性值名称,如果不填会自动生成一个唯一名称
148
+ */
149
+ insertConfigPropertyValueAt(name: string, index: number): ConfigPropertyValue;
150
+
151
+ /**
152
+ * 插入配置属性值
153
+ * @param configPropertyValueOptions 配置属性值参数
154
+ */
155
+ insertConfigPropertyValueAt(configPropertyValueOptions: Partial<ConfigPropertyValue>, index: number): ConfigPropertyValue;
156
+
157
+ /**
158
+ * 插入配置属性值
159
+ * @param configPropertyValue 已有的配置属性值实例
160
+ */
161
+ insertConfigPropertyValueAt(configPropertyValue: ConfigPropertyValue, index: number): ConfigPropertyValue;
162
+
163
+ insertConfigPropertyValueAt(options: string | Partial<ConfigPropertyValue> | ConfigPropertyValue, index: number) {
164
+ const node = this._insertConfigPropertyValueAt(options as any, index);
165
+ node.create({
166
+ index,
167
+ parentNode: this,
168
+ parentKey: 'values',
169
+ });
170
+ return node;
171
+ }
172
+
173
+ /**
174
+ * 添加配置属性值
175
+ * @internal
176
+ * @param name 配置属性值名称,如果不填会自动生成一个唯一名称
177
+ */
178
+ _addConfigPropertyValue(name?: string): ConfigPropertyValue;
179
+
180
+ /**
181
+ * 添加配置属性值
182
+ * @internal
183
+ * @param configPropertyValueOptions 配置属性值参数
184
+ */
185
+ _addConfigPropertyValue(configPropertyValueOptions: Partial<ConfigPropertyValue>): ConfigPropertyValue;
186
+
187
+ /**
188
+ * 添加配置属性值
189
+ * @internal
190
+ * @param configPropertyValue 已有的配置属性值实例
191
+ */
192
+ _addConfigPropertyValue(configPropertyValue: ConfigPropertyValue): ConfigPropertyValue;
193
+
194
+ _addConfigPropertyValue(options?: string | Partial<ConfigPropertyValue> | ConfigPropertyValue) {
195
+ const index = this.values.length;
196
+ return this._insertConfigPropertyValueAt(options as any, index);
197
+ }
198
+
199
+ /**
200
+ * 添加配置属性值
201
+ * @internal
202
+ * @param name 配置属性值名称,如果不填会自动生成一个唯一名称
203
+ */
204
+ addConfigPropertyValue(name?: string): ConfigPropertyValue;
205
+
206
+ /**
207
+ * 添加配置属性值
208
+ * @param configPropertyValueOptions 配置属性值参数
209
+ */
210
+ addConfigPropertyValue(configPropertyValueOptions: Partial<ConfigPropertyValue>): ConfigPropertyValue;
211
+
212
+ /**
213
+ * 添加配置属性值
214
+ * @param configPropertyValue 已有的配置属性值实例
215
+ */
216
+ addConfigPropertyValue(configPropertyValue: ConfigPropertyValue): ConfigPropertyValue;
217
+
218
+ addConfigPropertyValue(options?: string | Partial<ConfigPropertyValue> | ConfigPropertyValue) {
219
+ const node = this._addConfigPropertyValue(options as any);
220
+ const index = this.values.length;
221
+ node.create({
222
+ index,
223
+ parentNode: this,
224
+ parentKey: 'values',
225
+ });
226
+ return node;
227
+ }
228
+
229
+
230
+
231
+
232
+ /**
233
+ * 删除配置属性值
234
+ * @param name 配置属性值名称
235
+ */
236
+ removeConfigPropertyValue(name: string): void;
237
+
238
+ /**
239
+ * 删除配置属性值
240
+ * @param configPropertyValue 已有的配置属性值实例
241
+ */
242
+ removeConfigPropertyValue(configPropertyValue: ConfigPropertyValue): void;
243
+
244
+ removeConfigPropertyValue(options: string | ConfigPropertyValue) {
245
+ let configPropertyValue: ConfigPropertyValue;
246
+ if (typeof options === 'string') {
247
+ configPropertyValue = this.values.find((item) => item.name === options);
248
+ if (!configPropertyValue) {
249
+ throw new Error('找不到配置属性值 ' + options);
250
+ }
251
+ } else {
252
+ configPropertyValue = options;
253
+ }
254
+ return configPropertyValue.delete();
255
+ }
256
+
257
+ __removeConfigPropertyValue(configPropertyValue: ConfigPropertyValue) {
258
+ const parentKey = configPropertyValue.parentKey;
259
+ const params: Params = {
260
+ parentNode: this,
261
+ parentKey,
262
+ index: -1,
263
+ object: null,
264
+ oldObject: configPropertyValue,
265
+ };
266
+ if (parentKey) {
267
+ params.parentKey = parentKey;
268
+ if (Array.isArray((this as any)[parentKey])) {
269
+ const index = (this as any)[parentKey].indexOf(configPropertyValue);
270
+ ~index && (this as any)[parentKey].splice(index, 1);
271
+ params.index = index;
272
+ } else if ((this as any)[parentKey] === configPropertyValue) {
273
+ params.index = 0;
274
+ (this as any)[parentKey] = undefined;
275
+ }
276
+ }
277
+ return params;
278
+ }
279
+
280
+ //================================================================================
281
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
282
+ // 自动生成的代码已结束。下面可以手动编写。
283
+ //================================================================================
284
+ /**
285
+ * 修改属性
286
+ */
287
+ setData(data: ConfigProperty) {
288
+ const object = {
289
+ ...data,
290
+ };
291
+ this.update({
292
+ ...object,
293
+ });
294
+ }
295
+ //================================================================================
296
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
297
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
298
+ //================================================================================
299
+ }
300
+
301
+ classMap['ConfigProperty'] = ConfigProperty;
302
+ export default ConfigProperty;
303
+ //================================================================================
304
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
305
+ // 自动生成的代码已结束。下面可以手动编写。
306
+ //================================================================================
@@ -0,0 +1,286 @@
1
+ import ConfigProperty from './ConfigProperty__';
2
+ //================================================================================
3
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
4
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
5
+ //================================================================================
6
+ import { EventPayload, Params } from '../common/EventEmitter';
7
+ import { concept, excludedInJSON, property } from '../decorators';
8
+
9
+ import * as utils from '../utils';
10
+ import { v4 as uuidv4 } from 'uuid';
11
+ import BaseNode from '../common/BaseNode';
12
+ import classMap from '../common/classMap';
13
+ import ConfigGroup from './ConfigGroup__';
14
+ import App from './App__';
15
+
16
+ /**
17
+ * 配置管理
18
+ */
19
+ @concept
20
+ export class Configuration extends BaseNode {
21
+ /**
22
+ * 产品概念
23
+ */
24
+ @property()
25
+ concept: 'Configuration' = 'Configuration';
26
+
27
+ /**
28
+ * 配置组列表
29
+ */
30
+ @property('ConfigGroup')
31
+ groups: Array<ConfigGroup> = [];
32
+
33
+ /**
34
+ * 祖先 App
35
+ */
36
+ get app() {
37
+ return this.getAncestor('App') as App;
38
+ }
39
+
40
+ /**
41
+ * @param source 需要合并的部分参数
42
+ */
43
+ constructor(source?: Partial<Configuration>) {
44
+ source = Object.assign({}, Configuration.getDefaultOptions(), source);
45
+ super(source);
46
+ super.subConstructor(source);
47
+ }
48
+
49
+ static from(source: any, parentNode?: any, parentKey?: string): Configuration {
50
+ return super.from(source, parentNode, parentKey) as Configuration;
51
+ }
52
+
53
+ /**
54
+ * 从父级删除该节点
55
+ * @internal
56
+ */
57
+ _delete() {
58
+ let params: Params = null;
59
+ if (this.parentNode) {
60
+ params = (this.parentNode as any)?.__removeConfiguration?.(this);
61
+ }
62
+ return params;
63
+ }
64
+
65
+
66
+ getConfigGroupExistingNames(excludedList: Array<ConfigGroup> = []) {
67
+ const excludedSet = new Set(excludedList);
68
+ return (this.groups || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
69
+ }
70
+ getConfigGroupUniqueName(name = 'configGroup1') {
71
+ return utils.unique(name, this.getConfigGroupExistingNames());
72
+ }
73
+
74
+ /**
75
+ * 插入配置组
76
+ * @internal
77
+ * @param name 配置组名称,如果不填会自动生成一个唯一名称
78
+ */
79
+ _insertConfigGroupAt(name: string, index: number): ConfigGroup;
80
+
81
+ /**
82
+ * 插入配置组
83
+ * @internal
84
+ * @param configGroupOptions 配置组参数
85
+ */
86
+ _insertConfigGroupAt(configGroupOptions: Partial<ConfigGroup>, index: number): ConfigGroup;
87
+
88
+ /**
89
+ * 插入配置组
90
+ * @internal
91
+ * @param configGroup 已有的配置组实例
92
+ */
93
+ _insertConfigGroupAt(configGroup: ConfigGroup, index: number): ConfigGroup;
94
+
95
+ _insertConfigGroupAt(options: string | Partial<ConfigGroup> | ConfigGroup, index: number) {
96
+ const configGroupOptions: any = {};
97
+ const relationOptions = { parentNode: this, parentKey: 'groups' };
98
+ let configGroup: ConfigGroup;
99
+ if (!options) {
100
+ configGroup = ConfigGroup.from({
101
+ ...configGroupOptions,
102
+ name: this.getConfigGroupUniqueName(),
103
+ }, this, 'groups');
104
+ } else if (typeof options === 'string') {
105
+ configGroup = ConfigGroup.from({
106
+ ...configGroupOptions,
107
+ name: options,
108
+ }, this, 'groups');
109
+ } else if (options instanceof ConfigGroup) {
110
+ options.delete(); // 同一实例不支持多处存在
111
+ configGroup = options;
112
+ Object.assign(configGroup, relationOptions);
113
+ } else {
114
+ configGroup = ConfigGroup.from({
115
+ ...configGroupOptions,
116
+ ...options,
117
+ }, this, 'groups');
118
+ }
119
+ this.groups.splice(index, 0, configGroup);
120
+ return configGroup;
121
+ }
122
+
123
+ /**
124
+ * 插入配置组
125
+ * @param name 配置组名称,如果不填会自动生成一个唯一名称
126
+ */
127
+ insertConfigGroupAt(name: string, index: number): ConfigGroup;
128
+
129
+ /**
130
+ * 插入配置组
131
+ * @param configGroupOptions 配置组参数
132
+ */
133
+ insertConfigGroupAt(configGroupOptions: Partial<ConfigGroup>, index: number): ConfigGroup;
134
+
135
+ /**
136
+ * 插入配置组
137
+ * @param configGroup 已有的配置组实例
138
+ */
139
+ insertConfigGroupAt(configGroup: ConfigGroup, index: number): ConfigGroup;
140
+
141
+ insertConfigGroupAt(options: string | Partial<ConfigGroup> | ConfigGroup, index: number) {
142
+ const node = this._insertConfigGroupAt(options as any, index);
143
+ node.create({
144
+ index,
145
+ parentNode: this,
146
+ parentKey: 'groups',
147
+ });
148
+ return node;
149
+ }
150
+
151
+ /**
152
+ * 添加配置组
153
+ * @internal
154
+ * @param name 配置组名称,如果不填会自动生成一个唯一名称
155
+ */
156
+ _addConfigGroup(name?: string): ConfigGroup;
157
+
158
+ /**
159
+ * 添加配置组
160
+ * @internal
161
+ * @param configGroupOptions 配置组参数
162
+ */
163
+ _addConfigGroup(configGroupOptions: Partial<ConfigGroup>): ConfigGroup;
164
+
165
+ /**
166
+ * 添加配置组
167
+ * @internal
168
+ * @param configGroup 已有的配置组实例
169
+ */
170
+ _addConfigGroup(configGroup: ConfigGroup): ConfigGroup;
171
+
172
+ _addConfigGroup(options?: string | Partial<ConfigGroup> | ConfigGroup) {
173
+ const index = this.groups.length;
174
+ return this._insertConfigGroupAt(options as any, index);
175
+ }
176
+
177
+ /**
178
+ * 添加配置组
179
+ * @internal
180
+ * @param name 配置组名称,如果不填会自动生成一个唯一名称
181
+ */
182
+ addConfigGroup(name?: string): ConfigGroup;
183
+
184
+ /**
185
+ * 添加配置组
186
+ * @param configGroupOptions 配置组参数
187
+ */
188
+ addConfigGroup(configGroupOptions: Partial<ConfigGroup>): ConfigGroup;
189
+
190
+ /**
191
+ * 添加配置组
192
+ * @param configGroup 已有的配置组实例
193
+ */
194
+ addConfigGroup(configGroup: ConfigGroup): ConfigGroup;
195
+
196
+ addConfigGroup(options?: string | Partial<ConfigGroup> | ConfigGroup) {
197
+ const node = this._addConfigGroup(options as any);
198
+ const index = this.groups.length;
199
+ node.create({
200
+ index,
201
+ parentNode: this,
202
+ parentKey: 'groups',
203
+ });
204
+ return node;
205
+ }
206
+
207
+
208
+
209
+
210
+ /**
211
+ * 删除配置组
212
+ * @param name 配置组名称
213
+ */
214
+ removeConfigGroup(name: string): void;
215
+
216
+ /**
217
+ * 删除配置组
218
+ * @param configGroup 已有的配置组实例
219
+ */
220
+ removeConfigGroup(configGroup: ConfigGroup): void;
221
+
222
+ removeConfigGroup(options: string | ConfigGroup) {
223
+ let configGroup: ConfigGroup;
224
+ if (typeof options === 'string') {
225
+ configGroup = this.groups.find((item) => item.name === options);
226
+ if (!configGroup) {
227
+ throw new Error('找不到配置组 ' + options);
228
+ }
229
+ } else {
230
+ configGroup = options;
231
+ }
232
+ return configGroup.delete();
233
+ }
234
+
235
+ __removeConfigGroup(configGroup: ConfigGroup) {
236
+ const parentKey = configGroup.parentKey;
237
+ const params: Params = {
238
+ parentNode: this,
239
+ parentKey,
240
+ index: -1,
241
+ object: null,
242
+ oldObject: configGroup,
243
+ };
244
+ if (parentKey) {
245
+ params.parentKey = parentKey;
246
+ if (Array.isArray((this as any)[parentKey])) {
247
+ const index = (this as any)[parentKey].indexOf(configGroup);
248
+ ~index && (this as any)[parentKey].splice(index, 1);
249
+ params.index = index;
250
+ } else if ((this as any)[parentKey] === configGroup) {
251
+ params.index = 0;
252
+ (this as any)[parentKey] = undefined;
253
+ }
254
+ }
255
+ return params;
256
+ }
257
+
258
+ //================================================================================
259
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
260
+ // 自动生成的代码已结束。下面可以手动编写。
261
+ //================================================================================
262
+
263
+ public static getDefaultOptions() {
264
+ return {
265
+ groups: [
266
+ {
267
+ concept: 'ConfigGroup',
268
+ name: 'custom',
269
+ properties: [] as Array<Partial<ConfigProperty>>,
270
+ },
271
+ ],
272
+ };
273
+ }
274
+
275
+ //================================================================================
276
+ // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
277
+ // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
278
+ //================================================================================
279
+ }
280
+
281
+ classMap['Configuration'] = Configuration;
282
+ export default Configuration;
283
+ //================================================================================
284
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
285
+ // 自动生成的代码已结束。下面可以手动编写。
286
+ //================================================================================