@lcap/nasl 2.12.0-beta → 2.12.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 (368) hide show
  1. package/out/automate/engine/index.d.ts +1 -0
  2. package/out/automate/engine/index.js +23 -12
  3. package/out/automate/engine/index.js.map +1 -1
  4. package/out/automate/engine/operators.d.ts +10 -2
  5. package/out/automate/engine/operators.js +105 -7
  6. package/out/automate/engine/operators.js.map +1 -1
  7. package/out/automate/engine/uniqueName.d.ts +8 -2
  8. package/out/automate/engine/uniqueName.js +72 -4
  9. package/out/automate/engine/uniqueName.js.map +1 -1
  10. package/out/automate/engine/utils.js +4 -1
  11. package/out/automate/engine/utils.js.map +1 -1
  12. package/out/automate/template/process.d.ts +9 -0
  13. package/out/automate/template/process.js +10976 -0
  14. package/out/automate/template/process.js.map +1 -0
  15. package/out/bak/translator.js +1 -0
  16. package/out/bak/translator.js.map +1 -1
  17. package/out/common/BaseNode.d.ts +5 -0
  18. package/out/common/BaseNode.js +24 -3
  19. package/out/common/BaseNode.js.map +1 -1
  20. package/out/concepts/App__.js +3 -2
  21. package/out/concepts/App__.js.map +1 -1
  22. package/out/concepts/Argument__.js +1 -1
  23. package/out/concepts/Argument__.js.map +1 -1
  24. package/out/concepts/Assignee__.js +1 -1
  25. package/out/concepts/Assignee__.js.map +1 -1
  26. package/out/concepts/Assignment__.js +1 -1
  27. package/out/concepts/Assignment__.js.map +1 -1
  28. package/out/concepts/Attribute__.js +1 -1
  29. package/out/concepts/Attribute__.js.map +1 -1
  30. package/out/concepts/BinaryExpression__.js +1 -1
  31. package/out/concepts/BinaryExpression__.js.map +1 -1
  32. package/out/concepts/BindAttribute__.js +1 -1
  33. package/out/concepts/BindAttribute__.js.map +1 -1
  34. package/out/concepts/BindDirective__.js +9 -2
  35. package/out/concepts/BindDirective__.js.map +1 -1
  36. package/out/concepts/BindEvent__.js +6 -2
  37. package/out/concepts/BindEvent__.js.map +1 -1
  38. package/out/concepts/BooleanLiteral__.d.ts +4 -0
  39. package/out/concepts/BooleanLiteral__.js +12 -1
  40. package/out/concepts/BooleanLiteral__.js.map +1 -1
  41. package/out/concepts/CallFunction__.js +2 -1
  42. package/out/concepts/CallFunction__.js.map +1 -1
  43. package/out/concepts/CallInterface__.js +1 -1
  44. package/out/concepts/CallInterface__.js.map +1 -1
  45. package/out/concepts/CallLogic__.js +27 -11
  46. package/out/concepts/CallLogic__.js.map +1 -1
  47. package/out/concepts/CallQueryComponent__.d.ts +1 -1
  48. package/out/concepts/CallQueryComponent__.js +3 -3
  49. package/out/concepts/CallQueryComponent__.js.map +1 -1
  50. package/out/concepts/Comment__.js +1 -1
  51. package/out/concepts/Comment__.js.map +1 -1
  52. package/out/concepts/CompletionProperty__.js +1 -1
  53. package/out/concepts/CompletionProperty__.js.map +1 -1
  54. package/out/concepts/ConfigGroup__.js +1 -1
  55. package/out/concepts/ConfigGroup__.js.map +1 -1
  56. package/out/concepts/ConfigPropertyValue__.js +1 -1
  57. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  58. package/out/concepts/ConfigProperty__.js +1 -1
  59. package/out/concepts/ConfigProperty__.js.map +1 -1
  60. package/out/concepts/Configuration__.js +1 -1
  61. package/out/concepts/Configuration__.js.map +1 -1
  62. package/out/concepts/Constant__.js +1 -1
  63. package/out/concepts/Constant__.js.map +1 -1
  64. package/out/concepts/DataElement__.js +1 -1
  65. package/out/concepts/DataElement__.js.map +1 -1
  66. package/out/concepts/DataSource__.js +2 -0
  67. package/out/concepts/DataSource__.js.map +1 -1
  68. package/out/concepts/End__.js +1 -1
  69. package/out/concepts/End__.js.map +1 -1
  70. package/out/concepts/EntityIndex__.js +1 -1
  71. package/out/concepts/EntityIndex__.js.map +1 -1
  72. package/out/concepts/EntityProperty__.js +1 -1
  73. package/out/concepts/EntityProperty__.js.map +1 -1
  74. package/out/concepts/Entity__.js +1 -1
  75. package/out/concepts/Entity__.js.map +1 -1
  76. package/out/concepts/EnumItem__.js +1 -1
  77. package/out/concepts/EnumItem__.js.map +1 -1
  78. package/out/concepts/Enum__.js +1 -1
  79. package/out/concepts/Enum__.js.map +1 -1
  80. package/out/concepts/Event__.js +1 -1
  81. package/out/concepts/Event__.js.map +1 -1
  82. package/out/concepts/ForEachStatement__.js +1 -1
  83. package/out/concepts/ForEachStatement__.js.map +1 -1
  84. package/out/concepts/Function__.js +2 -2
  85. package/out/concepts/Function__.js.map +1 -1
  86. package/out/concepts/Identifier__.js +3 -2
  87. package/out/concepts/Identifier__.js.map +1 -1
  88. package/out/concepts/IfStatement__.js +1 -1
  89. package/out/concepts/IfStatement__.js.map +1 -1
  90. package/out/concepts/InterfaceParam__.js +1 -1
  91. package/out/concepts/InterfaceParam__.js.map +1 -1
  92. package/out/concepts/Interface__.js +2 -2
  93. package/out/concepts/Interface__.js.map +1 -1
  94. package/out/concepts/JSBlock__.js +2 -4
  95. package/out/concepts/JSBlock__.js.map +1 -1
  96. package/out/concepts/LogicItem__.js +1 -1
  97. package/out/concepts/LogicItem__.js.map +1 -1
  98. package/out/concepts/Logic__.js +7 -6
  99. package/out/concepts/Logic__.js.map +1 -1
  100. package/out/concepts/MemberExpression__.js +1 -1
  101. package/out/concepts/MemberExpression__.js.map +1 -1
  102. package/out/concepts/Module__.d.ts +118 -112
  103. package/out/concepts/Module__.js +25 -7
  104. package/out/concepts/Module__.js.map +1 -1
  105. package/out/concepts/Namespace__.js +2 -2
  106. package/out/concepts/Namespace__.js.map +1 -1
  107. package/out/concepts/NullLiteral__.js +1 -1
  108. package/out/concepts/NullLiteral__.js.map +1 -1
  109. package/out/concepts/NumericLiteral__.js +1 -1
  110. package/out/concepts/NumericLiteral__.js.map +1 -1
  111. package/out/concepts/Param__.js +2 -2
  112. package/out/concepts/Param__.js.map +1 -1
  113. package/out/concepts/Point__.js +1 -1
  114. package/out/concepts/Point__.js.map +1 -1
  115. package/out/concepts/ProcessComponent__.js +1 -1
  116. package/out/concepts/ProcessComponent__.js.map +1 -1
  117. package/out/concepts/ProcessElement__.js +7 -2
  118. package/out/concepts/ProcessElement__.js.map +1 -1
  119. package/out/concepts/ProcessOutcome__.js +1 -1
  120. package/out/concepts/ProcessOutcome__.js.map +1 -1
  121. package/out/concepts/Process__.d.ts +1 -1
  122. package/out/concepts/Process__.js +2 -2
  123. package/out/concepts/Process__.js.map +1 -1
  124. package/out/concepts/QueryAggregateExpression__.js +1 -1
  125. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  126. package/out/concepts/QueryFieldExpression__.js +1 -1
  127. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  128. package/out/concepts/QueryFromExpression__.js +1 -1
  129. package/out/concepts/QueryFromExpression__.js.map +1 -1
  130. package/out/concepts/QueryGroupByExpression__.js +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 +1 -1
  135. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  136. package/out/concepts/QueryOrderByExpression__.js +1 -1
  137. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  138. package/out/concepts/QuerySelectExpression__.js +1 -1
  139. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  140. package/out/concepts/Rect__.js +1 -1
  141. package/out/concepts/Rect__.js.map +1 -1
  142. package/out/concepts/Return__.js +2 -2
  143. package/out/concepts/Return__.js.map +1 -1
  144. package/out/concepts/Role__.js +1 -1
  145. package/out/concepts/Role__.js.map +1 -1
  146. package/out/concepts/Slot__.js +1 -1
  147. package/out/concepts/Slot__.js.map +1 -1
  148. package/out/concepts/SqlQueryComponent__.d.ts +4 -0
  149. package/out/concepts/SqlQueryComponent__.js +16 -0
  150. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  151. package/out/concepts/Start__.js +1 -1
  152. package/out/concepts/Start__.js.map +1 -1
  153. package/out/concepts/StringLiteral__.d.ts +1 -1
  154. package/out/concepts/StringLiteral__.js +2 -2
  155. package/out/concepts/StringLiteral__.js.map +1 -1
  156. package/out/concepts/StructureProperty__.js +5 -4
  157. package/out/concepts/StructureProperty__.js.map +1 -1
  158. package/out/concepts/Structure__.js +1 -1
  159. package/out/concepts/Structure__.js.map +1 -1
  160. package/out/concepts/SwitchCase__.d.ts +1 -1
  161. package/out/concepts/SwitchCase__.js +19 -21
  162. package/out/concepts/SwitchCase__.js.map +1 -1
  163. package/out/concepts/SwitchStatement__.js +2 -7
  164. package/out/concepts/SwitchStatement__.js.map +1 -1
  165. package/out/concepts/Theme__.js +1 -1
  166. package/out/concepts/Theme__.js.map +1 -1
  167. package/out/concepts/Transactional__.js +1 -1
  168. package/out/concepts/Transactional__.js.map +1 -1
  169. package/out/concepts/TypeAnnotation__.js +2 -2
  170. package/out/concepts/TypeAnnotation__.js.map +1 -1
  171. package/out/concepts/TypeParam__.js +1 -1
  172. package/out/concepts/TypeParam__.js.map +1 -1
  173. package/out/concepts/UnaryExpression__.js +1 -1
  174. package/out/concepts/UnaryExpression__.js.map +1 -1
  175. package/out/concepts/Unparsed__.js +1 -1
  176. package/out/concepts/Unparsed__.js.map +1 -1
  177. package/out/concepts/UseComponent__.js +1 -1
  178. package/out/concepts/UseComponent__.js.map +1 -1
  179. package/out/concepts/ValidationRule__.js +1 -1
  180. package/out/concepts/ValidationRule__.js.map +1 -1
  181. package/out/concepts/Variable__.js +2 -2
  182. package/out/concepts/Variable__.js.map +1 -1
  183. package/out/concepts/ViewComponent__.js +1 -1
  184. package/out/concepts/ViewComponent__.js.map +1 -1
  185. package/out/concepts/ViewElement__.js +9 -4
  186. package/out/concepts/ViewElement__.js.map +1 -1
  187. package/out/concepts/View__.d.ts +0 -2
  188. package/out/concepts/View__.js +4 -11
  189. package/out/concepts/View__.js.map +1 -1
  190. package/out/concepts/WhileStatement__.js +1 -1
  191. package/out/concepts/WhileStatement__.js.map +1 -1
  192. package/out/concepts/basics/stdlib/nasl.auth.js +20 -0
  193. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
  194. package/out/concepts/basics/stdlib/nasl.process.d.ts +4 -0
  195. package/out/concepts/basics/stdlib/nasl.process.js +410 -0
  196. package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
  197. package/out/concepts/basics/stdlib/nasl.ui.js +1 -11
  198. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
  199. package/out/concepts/basics/stdlib/nasl.util.js +25 -25
  200. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  201. package/out/concepts/basics/types/index.d.ts +1 -0
  202. package/out/concepts/basics/types/index.js +4 -1
  203. package/out/concepts/basics/types/index.js.map +1 -1
  204. package/out/generator/genBundleFiles.d.ts +3 -1
  205. package/out/generator/genBundleFiles.js +16 -3
  206. package/out/generator/genBundleFiles.js.map +1 -1
  207. package/out/generator/genMetaData.d.ts +1 -0
  208. package/out/generator/genMetaData.js +7 -0
  209. package/out/generator/genMetaData.js.map +1 -1
  210. package/out/index.d.ts +1 -1
  211. package/out/index.js +2 -1
  212. package/out/index.js.map +1 -1
  213. package/out/server/getLogics.js +18 -0
  214. package/out/server/getLogics.js.map +1 -1
  215. package/out/server/getMemberIdentifier.js +5 -0
  216. package/out/server/getMemberIdentifier.js.map +1 -1
  217. package/out/server/getProcesses.d.ts +1 -0
  218. package/out/server/getProcesses.js +9 -1
  219. package/out/server/getProcesses.js.map +1 -1
  220. package/out/server/naslServer.d.ts +1 -0
  221. package/out/server/naslServer.js +98 -23
  222. package/out/server/naslServer.js.map +1 -1
  223. package/out/server/translator.js +21 -3
  224. package/out/server/translator.js.map +1 -1
  225. package/out/service/creator/errHandles.js +5 -0
  226. package/out/service/creator/errHandles.js.map +1 -1
  227. package/out/service/storage/init.d.ts +1 -0
  228. package/out/service/storage/init.js +94 -83
  229. package/out/service/storage/init.js.map +1 -1
  230. package/out/templator/genCreateBlock.js +20 -14
  231. package/out/templator/genCreateBlock.js.map +1 -1
  232. package/out/templator/genCurdEditMultipleKeyBlock.js +13 -6
  233. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  234. package/out/templator/genCurdMultipleKeyBlock.js +20 -8
  235. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  236. package/out/templator/genEditTableBlock.js +3 -1
  237. package/out/templator/genEditTableBlock.js.map +1 -1
  238. package/out/templator/genEnumSelectBlock.js +1 -1
  239. package/out/templator/genEnumSelectBlock.js.map +1 -1
  240. package/out/templator/genGridViewBlock.js +8 -4
  241. package/out/templator/genGridViewBlock.js.map +1 -1
  242. package/out/templator/genListViewBlock.js +1 -2
  243. package/out/templator/genListViewBlock.js.map +1 -1
  244. package/out/templator/genQueryComponent.js +20 -21
  245. package/out/templator/genQueryComponent.js.map +1 -1
  246. package/out/templator/genTableBlock.js +14 -6
  247. package/out/templator/genTableBlock.js.map +1 -1
  248. package/out/templator/genUpdateBlock.js +20 -14
  249. package/out/templator/genUpdateBlock.js.map +1 -1
  250. package/out/utils/index.d.ts +1 -0
  251. package/out/utils/index.js +19 -1
  252. package/out/utils/index.js.map +1 -1
  253. package/package.json +1 -1
  254. package/src/automate/engine/index.js +21 -7
  255. package/src/automate/engine/operators.js +114 -17
  256. package/src/automate/engine/uniqueName.js +77 -9
  257. package/src/automate/engine/utils.js +4 -2
  258. package/src/automate/template/process.js +10999 -0
  259. package/src/bak/translator.js +1 -0
  260. package/src/common/BaseNode.ts +21 -4
  261. package/src/concepts/App__.ts +4 -40
  262. package/src/concepts/Argument__.ts +1 -1
  263. package/src/concepts/Assignee__.ts +1 -1
  264. package/src/concepts/Assignment__.ts +1 -1
  265. package/src/concepts/Attribute__.ts +1 -1
  266. package/src/concepts/BinaryExpression__.ts +1 -1
  267. package/src/concepts/BindAttribute__.ts +1 -1
  268. package/src/concepts/BindDirective__.ts +8 -6
  269. package/src/concepts/BindEvent__.ts +6 -2
  270. package/src/concepts/BooleanLiteral__.ts +13 -1
  271. package/src/concepts/CallFunction__.ts +15 -14
  272. package/src/concepts/CallInterface__.ts +1 -1
  273. package/src/concepts/CallLogic__.ts +26 -11
  274. package/src/concepts/CallQueryComponent__.ts +32 -4
  275. package/src/concepts/Comment__.ts +1 -1
  276. package/src/concepts/CompletionProperty__.ts +1 -1
  277. package/src/concepts/ConfigGroup__.ts +1 -1
  278. package/src/concepts/ConfigPropertyValue__.ts +1 -1
  279. package/src/concepts/ConfigProperty__.ts +1 -1
  280. package/src/concepts/Configuration__.ts +1 -1
  281. package/src/concepts/Constant__.ts +1 -1
  282. package/src/concepts/DataElement__.ts +1 -1
  283. package/src/concepts/DataSource__.ts +2 -0
  284. package/src/concepts/End__.ts +1 -1
  285. package/src/concepts/EntityIndex__.ts +1 -1
  286. package/src/concepts/EntityProperty__.ts +1 -1
  287. package/src/concepts/Entity__.ts +1 -1
  288. package/src/concepts/EnumItem__.ts +1 -1
  289. package/src/concepts/Enum__.ts +1 -1
  290. package/src/concepts/Event__.ts +1 -1
  291. package/src/concepts/ForEachStatement__.ts +1 -1
  292. package/src/concepts/Function__.ts +5 -5
  293. package/src/concepts/Identifier__.ts +3 -2
  294. package/src/concepts/IfStatement__.ts +1 -1
  295. package/src/concepts/InterfaceParam__.ts +1 -1
  296. package/src/concepts/Interface__.ts +2 -2
  297. package/src/concepts/JSBlock__.ts +2 -11
  298. package/src/concepts/LogicItem__.ts +1 -1
  299. package/src/concepts/Logic__.ts +8 -44
  300. package/src/concepts/MemberExpression__.ts +1 -1
  301. package/src/concepts/Module__.ts +141 -147
  302. package/src/concepts/Namespace__.ts +2 -2
  303. package/src/concepts/NullLiteral__.ts +1 -1
  304. package/src/concepts/NumericLiteral__.ts +1 -1
  305. package/src/concepts/Param__.ts +2 -2
  306. package/src/concepts/Point__.ts +1 -1
  307. package/src/concepts/ProcessComponent__.ts +1 -1
  308. package/src/concepts/ProcessElement__.ts +8 -3
  309. package/src/concepts/ProcessOutcome__.ts +1 -1
  310. package/src/concepts/Process__.ts +3 -3
  311. package/src/concepts/QueryAggregateExpression__.ts +1 -1
  312. package/src/concepts/QueryFieldExpression__.ts +1 -1
  313. package/src/concepts/QueryFromExpression__.ts +1 -1
  314. package/src/concepts/QueryGroupByExpression__.ts +1 -1
  315. package/src/concepts/QueryJoinExpression__.ts +1 -1
  316. package/src/concepts/QueryLimitExpression__.ts +1 -1
  317. package/src/concepts/QueryOrderByExpression__.ts +1 -1
  318. package/src/concepts/QuerySelectExpression__.ts +1 -1
  319. package/src/concepts/Rect__.ts +1 -1
  320. package/src/concepts/Return__.ts +2 -2
  321. package/src/concepts/Role__.ts +1 -1
  322. package/src/concepts/Slot__.ts +1 -1
  323. package/src/concepts/SqlQueryComponent__.ts +17 -0
  324. package/src/concepts/Start__.ts +1 -1
  325. package/src/concepts/StringLiteral__.ts +2 -2
  326. package/src/concepts/StructureProperty__.ts +5 -8
  327. package/src/concepts/Structure__.ts +1 -1
  328. package/src/concepts/SwitchCase__.ts +19 -23
  329. package/src/concepts/SwitchStatement__.ts +2 -6
  330. package/src/concepts/Theme__.ts +1 -1
  331. package/src/concepts/Transactional__.ts +1 -1
  332. package/src/concepts/TypeAnnotation__.ts +21 -2
  333. package/src/concepts/TypeParam__.ts +1 -1
  334. package/src/concepts/UnaryExpression__.ts +1 -1
  335. package/src/concepts/Unparsed__.ts +1 -1
  336. package/src/concepts/UseComponent__.ts +1 -1
  337. package/src/concepts/ValidationRule__.ts +1 -1
  338. package/src/concepts/Variable__.ts +2 -2
  339. package/src/concepts/ViewComponent__.ts +1 -1
  340. package/src/concepts/ViewElement__.ts +10 -23
  341. package/src/concepts/View__.ts +6 -13
  342. package/src/concepts/WhileStatement__.ts +1 -1
  343. package/src/concepts/basics/stdlib/nasl.auth.ts +20 -0
  344. package/src/concepts/basics/stdlib/nasl.process.ts +406 -0
  345. package/src/concepts/basics/stdlib/nasl.ui.ts +1 -11
  346. package/src/concepts/basics/stdlib/nasl.util.ts +25 -25
  347. package/src/concepts/basics/types/index.ts +1 -0
  348. package/src/generator/genBundleFiles.ts +21 -5
  349. package/src/generator/genMetaData.ts +10 -1
  350. package/src/index.ts +1 -1
  351. package/src/server/getLogics.ts +18 -1
  352. package/src/server/getMemberIdentifier.ts +4 -0
  353. package/src/server/getProcesses.ts +8 -1
  354. package/src/server/naslServer.ts +107 -28
  355. package/src/server/translator.ts +20 -3
  356. package/src/service/creator/errHandles.js +6 -0
  357. package/src/service/storage/init.ts +96 -85
  358. package/src/templator/genCreateBlock.ts +20 -14
  359. package/src/templator/genCurdEditMultipleKeyBlock.ts +13 -8
  360. package/src/templator/genCurdMultipleKeyBlock.ts +20 -9
  361. package/src/templator/genEditTableBlock.ts +3 -1
  362. package/src/templator/genEnumSelectBlock.ts +1 -1
  363. package/src/templator/genGridViewBlock.ts +8 -4
  364. package/src/templator/genListViewBlock.ts +1 -2
  365. package/src/templator/genQueryComponent.ts +22 -21
  366. package/src/templator/genTableBlock.ts +14 -7
  367. package/src/templator/genUpdateBlock.ts +20 -14
  368. package/src/utils/index.ts +19 -0
@@ -234,7 +234,7 @@ export class View extends BaseNode {
234
234
  });
235
235
  }
236
236
 
237
-
237
+
238
238
 
239
239
  /**
240
240
  * 插入页面元素
@@ -370,12 +370,8 @@ export class View extends BaseNode {
370
370
  }
371
371
 
372
372
 
373
- getParamExistingNames(excludedList: Array<Param> = []) {
374
- const excludedSet = new Set(excludedList);
375
- return (this.params || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
376
- }
377
373
  getParamUniqueName(name = 'param1') {
378
- return utils.unique(name, this.getParamExistingNames(), undefined, false);
374
+ return utils.unique(name, this.getVarExistingNames(), undefined, false);
379
375
  }
380
376
 
381
377
  /**
@@ -512,12 +508,8 @@ export class View extends BaseNode {
512
508
  }
513
509
 
514
510
 
515
- getVariableExistingNames(excludedList: Array<Variable> = []) {
516
- const excludedSet = new Set(excludedList);
517
- return (this.variables || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
518
- }
519
511
  getVariableUniqueName(name = 'variable1') {
520
- return utils.unique(name, this.getVariableExistingNames(), undefined, false);
512
+ return utils.unique(name, this.getVarExistingNames(), undefined, false);
521
513
  }
522
514
 
523
515
  /**
@@ -1078,7 +1070,7 @@ export class View extends BaseNode {
1078
1070
  }
1079
1071
 
1080
1072
 
1081
-
1073
+
1082
1074
 
1083
1075
  /**
1084
1076
  * 删除页面元素
@@ -1599,6 +1591,7 @@ export class View extends BaseNode {
1599
1591
  title: this.title,
1600
1592
  crumb: this.crumb,
1601
1593
  first: this.children.find((child) => child.isIndex)?.name,
1594
+ auth: this.auth ? 'loginAuth' : undefined,
1602
1595
  };
1603
1596
  return `${componentOptions}
1604
1597
  ${translator(definition)}
@@ -1916,7 +1909,7 @@ export class View extends BaseNode {
1916
1909
  //================================================================================
1917
1910
  }
1918
1911
 
1919
- classMap.View = View;
1912
+ classMap['View'] = View;
1920
1913
  export default View;
1921
1914
  //================================================================================
1922
1915
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -293,7 +293,7 @@ export class WhileStatement extends LogicItem {
293
293
  //================================================================================
294
294
  }
295
295
 
296
- classMap.WhileStatement = WhileStatement;
296
+ classMap['WhileStatement'] = WhileStatement;
297
297
  export default WhileStatement;
298
298
  //================================================================================
299
299
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -22,5 +22,25 @@ export default new Namespace({
22
22
  params: [],
23
23
  returns: [],
24
24
  }),
25
+ new Logic({
26
+ name: 'encryptByAES',
27
+ params: [
28
+ new Param({
29
+ name: 'string',
30
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
31
+ }),
32
+ ],
33
+ returns: [],
34
+ }),
35
+ new Logic({
36
+ name: 'decryptByAES',
37
+ params: [
38
+ new Param({
39
+ name: 'string',
40
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
41
+ }),
42
+ ],
43
+ returns: [],
44
+ }),
25
45
  ],
26
46
  });
@@ -13,8 +13,414 @@ import Attribute from '../../Attribute__';
13
13
  import { primitiveTypeList } from '../types/coreTypeList';
14
14
  import { reference2TypeAnnotationList } from './reference2TypeAnnotationList';
15
15
 
16
+ const logics = [
17
+ new Logic({
18
+ name: 'getProcessDefinitionList',
19
+ params: [],
20
+ returns: [
21
+ new Return({
22
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
23
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
24
+ }),
25
+ }),
26
+ ],
27
+ }),
28
+ new Logic({
29
+ name: 'getProcessDefinition',
30
+ params: [
31
+ new Param({
32
+ name: 'name',
33
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
34
+ }),
35
+ ],
36
+ returns: [
37
+ new Return({
38
+ name: 'result',
39
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
40
+ }),
41
+ ],
42
+ }),
43
+ new Logic({
44
+ name: 'getProcessInstance',
45
+ params: [
46
+ new Param({
47
+ name: 'processId',
48
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
49
+ }),
50
+ ],
51
+ returns: [
52
+ new Return({
53
+ name: 'result',
54
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
55
+ }),
56
+ ],
57
+ }),
58
+ new Logic({
59
+ name: 'getProcessInstanceList',
60
+ params: [
61
+ new Param({
62
+ name: 'processId',
63
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
64
+ }),
65
+ new Param({
66
+ name: 'startBy',
67
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
68
+ }),
69
+ new Param({
70
+ name: 'finished',
71
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
72
+ }),
73
+ new Param({
74
+ name: 'processDefName',
75
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
76
+ }),
77
+ new Param({
78
+ name: 'startTimeBefore',
79
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
80
+ }),
81
+ new Param({
82
+ name: 'startTimeAfter',
83
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
84
+ }),
85
+ new Param({
86
+ name: 'endTimeBefore',
87
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
88
+ }),
89
+ new Param({
90
+ name: 'endTimeAfter',
91
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
92
+ }),
93
+ new Param({
94
+ name: 'page',
95
+ typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
96
+ }),
97
+ new Param({
98
+ name: 'size',
99
+ typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
100
+ }),
101
+ new Param({
102
+ name: 'sort',
103
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
104
+ }),
105
+ new Param({
106
+ name: 'order',
107
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
108
+ }),
109
+ ],
110
+ returns: [
111
+ new Return({
112
+ name: 'result',
113
+ typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
114
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
115
+ }),
116
+ }),
117
+ ],
118
+ }),
119
+ new Logic({
120
+ name: 'getTaskDefinitionList',
121
+ params: [
122
+ new Param({
123
+ name: 'processDefName',
124
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
125
+ }),
126
+ ],
127
+ returns: [
128
+ new Return({
129
+ name: 'result',
130
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
131
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
132
+ }),
133
+ }),
134
+ ],
135
+ }),
136
+ new Logic({
137
+ name: 'getTaskDefinition',
138
+ params: [
139
+ new Param({
140
+ name: 'name',
141
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
142
+ }),
143
+ new Param({
144
+ name: 'processDefName',
145
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
146
+ }),
147
+ ],
148
+ returns: [
149
+ new Return({
150
+ name: 'result',
151
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
152
+ }),
153
+ ],
154
+ }),
155
+ new Logic({
156
+ name: 'getTaskInstance',
157
+ params: [
158
+ new Param({
159
+ name: 'taskId',
160
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
161
+ }),
162
+ ],
163
+ returns: [
164
+ new Return({
165
+ name: 'result',
166
+ typeAnnotation: TypeAnnotation.createTypeParam('T'),
167
+ }),
168
+ ],
169
+ }),
170
+ new Logic({
171
+ name: 'getTaskInstanceList',
172
+ params: [
173
+ new Param({
174
+ name: 'taskId',
175
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
176
+ }),
177
+ new Param({
178
+ name: 'user',
179
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
180
+ }),
181
+ new Param({
182
+ name: 'finished',
183
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
184
+ }),
185
+ new Param({
186
+ name: 'processId',
187
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
188
+ }),
189
+ new Param({
190
+ name: 'processIdIn',
191
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
192
+ typeArguments: [TypeAnnotation.createTypeParam('String')],
193
+ }),
194
+ }),
195
+ new Param({
196
+ name: 'processDefName',
197
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
198
+ }),
199
+ new Param({
200
+ name: 'taskDefName',
201
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
202
+ }),
203
+ new Param({
204
+ name: 'createTimeBefore',
205
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
206
+ }),
207
+ new Param({
208
+ name: 'createTimeAfter',
209
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
210
+ }),
211
+ new Param({
212
+ name: 'completeTimeBefore',
213
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
214
+ }),
215
+ new Param({
216
+ name: 'completeTimeAfter',
217
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
218
+ }),
219
+ new Param({
220
+ name: 'page',
221
+ typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
222
+ }),
223
+ new Param({
224
+ name: 'size',
225
+ typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
226
+ }),
227
+ new Param({
228
+ name: 'sort',
229
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
230
+ }),
231
+ new Param({
232
+ name: 'order',
233
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
234
+ }),
235
+ ],
236
+ returns: [
237
+ new Return({
238
+ typeAnnotation: TypeAnnotation.createPrimitive('PageOf', {
239
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
240
+ }),
241
+ }),
242
+ ],
243
+ }),
244
+ new Logic({
245
+ name: 'claimTaskInstance',
246
+ params: [
247
+ new Param({
248
+ name: 'taskId',
249
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
250
+ }),
251
+ new Param({
252
+ name: 'user',
253
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
254
+ }),
255
+ ],
256
+ returns: [
257
+ new Return({
258
+ name: 'result',
259
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
260
+ }),
261
+ ],
262
+ }),
263
+ new Logic({
264
+ name: 'unclaimTaskInstance',
265
+ params: [
266
+ new Param({
267
+ name: 'taskId',
268
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
269
+ }),
270
+ ],
271
+ returns: [
272
+ new Return({
273
+ name: 'result',
274
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
275
+ }),
276
+ ],
277
+ }),
278
+ new Logic({
279
+ name: 'getTaskDestinationUrl',
280
+ params: [
281
+ new Param({
282
+ name: 'taskId',
283
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
284
+ }),
285
+ ],
286
+ returns: [
287
+ new Return({
288
+ name: 'result',
289
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
290
+ }),
291
+ ],
292
+ }),
293
+ ];
294
+
295
+ export const processStructures = [
296
+ new Structure({
297
+ name: 'LCAPProcessDefinition',
298
+ properties: [
299
+ new StructureProperty({
300
+ name: 'name',
301
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
302
+ }),
303
+ new StructureProperty({
304
+ name: 'title',
305
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
306
+ }),
307
+ new StructureProperty({
308
+ name: 'description',
309
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
310
+ }),
311
+ ],
312
+ }),
313
+ new Structure({
314
+ name: 'LCAPProcessInstance',
315
+ properties: [
316
+ new StructureProperty({
317
+ name: 'processId',
318
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
319
+ }),
320
+ new StructureProperty({
321
+ name: 'title',
322
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
323
+ }),
324
+ new StructureProperty({
325
+ name: 'description',
326
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
327
+ }),
328
+ new StructureProperty({
329
+ name: 'startBy',
330
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
331
+ }),
332
+ new StructureProperty({
333
+ name: 'startTime',
334
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
335
+ }),
336
+ new StructureProperty({
337
+ name: 'endTime',
338
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
339
+ }),
340
+ new StructureProperty({
341
+ name: 'finished',
342
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
343
+ }),
344
+ new StructureProperty({
345
+ name: 'processDefName',
346
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
347
+ }),
348
+ ],
349
+ }),
350
+ new Structure({
351
+ name: 'LCAPTaskDefinition',
352
+ properties: [
353
+ new StructureProperty({
354
+ name: 'name',
355
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
356
+ }),
357
+ new StructureProperty({
358
+ name: 'title',
359
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
360
+ }),
361
+ new StructureProperty({
362
+ name: 'description',
363
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
364
+ }),
365
+ new StructureProperty({
366
+ name: 'processDefName',
367
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
368
+ }),
369
+ ],
370
+ }),
371
+ new Structure({
372
+ name: 'LCAPTaskInstance',
373
+ properties: [
374
+ new StructureProperty({
375
+ name: 'taskId',
376
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
377
+ }),
378
+ new StructureProperty({
379
+ name: 'title',
380
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
381
+ }),
382
+ new StructureProperty({
383
+ name: 'description',
384
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
385
+ }),
386
+ new StructureProperty({
387
+ name: 'finished',
388
+ typeAnnotation: TypeAnnotation.createPrimitive('Boolean'),
389
+ }),
390
+ new StructureProperty({
391
+ name: 'completeBy',
392
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
393
+ }),
394
+ new StructureProperty({
395
+ name: 'createTime',
396
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
397
+ }),
398
+ new StructureProperty({
399
+ name: 'completeTime',
400
+ typeAnnotation: TypeAnnotation.createPrimitive('DateTime'),
401
+ }),
402
+ new StructureProperty({
403
+ name: 'taskDefName',
404
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
405
+ }),
406
+ new StructureProperty({
407
+ name: 'processId',
408
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
409
+ }),
410
+ new StructureProperty({
411
+ name: 'processDefName',
412
+ typeAnnotation: TypeAnnotation.createPrimitive('String'),
413
+ }),
414
+ ],
415
+ }),
416
+ ];
417
+
418
+ export const processTypeList: Array<TypeAnnotation> = reference2TypeAnnotationList(processStructures, 'nasl.process');
419
+
16
420
  export default new Namespace({
17
421
  name: 'process',
422
+ logics,
423
+ structures: processStructures,
18
424
  processComponents: [
19
425
  new ProcessComponent({
20
426
  name: 'UserTask',
@@ -599,16 +599,6 @@ export const uiStructures = [
599
599
  new Structure({
600
600
  name: 'TreeChangeEvent',
601
601
  properties: [
602
- new StructureProperty({
603
- name: 'param1',
604
- description: '参数1',
605
- typeAnnotation: TypeAnnotation.createPrimitive('String'),
606
- }),
607
- new StructureProperty({
608
- name: 'param2',
609
- description: '参数2',
610
- typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
611
- }),
612
602
  new StructureProperty({
613
603
  name: 'value',
614
604
  description: '改变后的值',
@@ -653,7 +643,7 @@ export const uiStructures = [
653
643
  }),
654
644
  new StructureProperty({
655
645
  name: 'oldValues',
656
- description: '改变后每项值的数组',
646
+ description: '旧的每项值的数组',
657
647
  typeAnnotation: TypeAnnotation.createGeneric('List', {
658
648
  typeArguments: [TypeAnnotation.createTypeParam('T')],
659
649
  }),
@@ -416,6 +416,29 @@ export default new Namespace({
416
416
  }),
417
417
  ],
418
418
  }),
419
+ new Function({
420
+ name: 'AddAll',
421
+ description: '为集合添加多项内容,并返回集合长度',
422
+ params: [
423
+ new Param({
424
+ name: 'list',
425
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
426
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
427
+ }),
428
+ }),
429
+ new Param({
430
+ name: 'addlist',
431
+ typeAnnotation: TypeAnnotation.createGeneric('List', {
432
+ typeArguments: [TypeAnnotation.createTypeParam('T')],
433
+ }),
434
+ }),
435
+ ],
436
+ returns: [
437
+ new Return({
438
+ typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
439
+ }),
440
+ ],
441
+ }),
419
442
  new Function({
420
443
  name: 'Insert',
421
444
  description: '为集合指定索引插入项(原索引项依次后推)',
@@ -555,7 +578,7 @@ export default new Namespace({
555
578
  new Param({
556
579
  name: 'digits',
557
580
  typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
558
- description: "保留小数位数",
581
+ description: '保留小数位数',
559
582
  defaultValue: '2',
560
583
  defaultExpression: new NumericLiteral({ value: '2' }),
561
584
  }),
@@ -568,7 +591,7 @@ export default new Namespace({
568
591
  { text: 'true', value: 'true' },
569
592
  { text: 'false', value: 'false' },
570
593
  ],
571
- description: "是否显示千分位:true显示,false不显示",
594
+ description: '是否显示千分位:true显示,false不显示',
572
595
  }),
573
596
  ],
574
597
  returns: [
@@ -957,29 +980,6 @@ export default new Namespace({
957
980
  }),
958
981
  ],
959
982
  }),
960
- new Function({
961
- name: 'ListAddAll',
962
- description: '为集合添加多项内容,并返回集合长度',
963
- params: [
964
- new Param({
965
- name: 'list',
966
- typeAnnotation: TypeAnnotation.createGeneric('List', {
967
- typeArguments: [TypeAnnotation.createTypeParam('T')],
968
- }),
969
- }),
970
- new Param({
971
- name: 'addlist',
972
- typeAnnotation: TypeAnnotation.createGeneric('List', {
973
- typeArguments: [TypeAnnotation.createTypeParam('T')],
974
- }),
975
- }),
976
- ],
977
- returns: [
978
- new Return({
979
- typeAnnotation: TypeAnnotation.createPrimitive('Integer'),
980
- }),
981
- ],
982
- }),
983
983
  new Function({
984
984
  name: 'New',
985
985
  description: '根据参数选择的类型,返回该参数的实例化对象',
@@ -16,6 +16,7 @@ primitiveTypeList.forEach((typeAnnotation) => {
16
16
  });
17
17
 
18
18
  export { collectionStructures, collectionTypeList } from '../stdlib/nasl.collection';
19
+ export { processStructures, processTypeList } from '../stdlib/nasl.process';
19
20
  export { uiStructures, uiTypeList } from '../stdlib/nasl.ui';
20
21
  export { interfaceTypeList } from '../stdlib/nasl.interface';
21
22
  export { interfaceStructures } from '../stdlib/nasl.interface';