@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
@@ -113,6 +113,7 @@ export default function (definition) {
113
113
  title: ${JSON.stringify(definition.title)},
114
114
  crumb: ${JSON.stringify(definition.crumb)},
115
115
  first: ${JSON.stringify(definition.first)},
116
+ auth: ${JSON.stringify(definition.auth)},
116
117
  });
117
118
 
118
119
  ${events.join('\n\n')}
@@ -48,6 +48,13 @@ export class BaseNode extends EventEmitter {
48
48
  */
49
49
  @property()
50
50
  branchName: string = undefined;
51
+ /**
52
+ * 合并代码相关
53
+ */
54
+ @property()
55
+ workingCopy: object = undefined;
56
+ @property()
57
+ branch: object = undefined;
51
58
  /**
52
59
  * 父节点
53
60
  */
@@ -159,13 +166,23 @@ export class BaseNode extends EventEmitter {
159
166
  const property = propertyMap.get(key);
160
167
  const sourceItem = (source as any)[key] !== undefined ? (source as any)[key] : (this as any)[key];
161
168
  const { objectRef: propertyObjectRef } = property;
162
- let objectRefCtor;
169
+ let objectRefCtor: any;
163
170
  try {
164
171
  if (propertyObjectRef) {
165
172
  objectRefCtor = getConceptConstructor(propertyObjectRef);
166
- if (objectRefCtor && sourceItem instanceof objectRefCtor) {
167
- sourceItem.parentNode = this;
168
- sourceItem.parentKey = key;
173
+ if (objectRefCtor) {
174
+ // if (Array.isArray(sourceItem)) {
175
+ // sourceItem.forEach((item) => {
176
+ // if (item instanceof objectRefCtor) {
177
+ // item.parentNode = this;
178
+ // item.parentKey = key;
179
+ // }
180
+ // });
181
+ // } else
182
+ if (sourceItem instanceof objectRefCtor) {
183
+ sourceItem.parentNode = this;
184
+ sourceItem.parentKey = key;
185
+ }
169
186
  }
170
187
  }
171
188
 
@@ -187,8 +187,6 @@ export class App extends BaseNode {
187
187
  @property('Module')
188
188
  componentDependencies: Array<Module> = [];
189
189
 
190
-
191
-
192
190
  /**
193
191
  * @param source 需要合并的部分参数
194
192
  */
@@ -237,11 +235,11 @@ export class App extends BaseNode {
237
235
  });
238
236
  }
239
237
 
240
- getDataSourceExistingNames(excludedList: Array<DataSource> = []) {
238
+ getDataSourceExistingNames(excludedList: Array<DataSource> = []) {
241
239
  const excludedSet = new Set(excludedList);
242
240
  return (this.dataSources || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
243
241
  }
244
- getDataSourceUniqueName(name = 'DataSource1') {
242
+ getDataSourceUniqueName(name = 'dataSource1') {
245
243
  return utils.unique(name, this.getDataSourceExistingNames(), undefined, true);
246
244
  }
247
245
 
@@ -378,7 +376,6 @@ export class App extends BaseNode {
378
376
  return node;
379
377
  }
380
378
 
381
-
382
379
  getStructureExistingNames(excludedList: Array<Structure> = []) {
383
380
  const excludedSet = new Set(excludedList);
384
381
  return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -520,7 +517,6 @@ export class App extends BaseNode {
520
517
  return node;
521
518
  }
522
519
 
523
-
524
520
  getEnumExistingNames(excludedList: Array<Enum> = []) {
525
521
  const excludedSet = new Set(excludedList);
526
522
  return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -662,7 +658,6 @@ export class App extends BaseNode {
662
658
  return node;
663
659
  }
664
660
 
665
-
666
661
  getLogicExistingNames(excludedList: Array<Logic> = []) {
667
662
  const excludedSet = new Set(excludedList);
668
663
  return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -804,7 +799,6 @@ export class App extends BaseNode {
804
799
  return node;
805
800
  }
806
801
 
807
-
808
802
  getInterfaceExistingNames(excludedList: Array<Interface> = []) {
809
803
  const excludedSet = new Set(excludedList);
810
804
  return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -946,7 +940,6 @@ export class App extends BaseNode {
946
940
  return node;
947
941
  }
948
942
 
949
-
950
943
  getViewExistingNames(excludedList: Array<View> = []) {
951
944
  const excludedSet = new Set(excludedList);
952
945
  return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1088,7 +1081,6 @@ export class App extends BaseNode {
1088
1081
  return node;
1089
1082
  }
1090
1083
 
1091
-
1092
1084
  getProcessExistingNames(excludedList: Array<Process> = []) {
1093
1085
  const excludedSet = new Set(excludedList);
1094
1086
  return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1230,7 +1222,6 @@ export class App extends BaseNode {
1230
1222
  return node;
1231
1223
  }
1232
1224
 
1233
-
1234
1225
  getRoleExistingNames(excludedList: Array<Role> = []) {
1235
1226
  const excludedSet = new Set(excludedList);
1236
1227
  return (this.roles || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1372,7 +1363,6 @@ export class App extends BaseNode {
1372
1363
  return node;
1373
1364
  }
1374
1365
 
1375
-
1376
1366
  getModuleExistingNames(excludedList: Array<Module> = []) {
1377
1367
  const excludedSet = new Set(excludedList);
1378
1368
  return (this.dependencies || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1780,9 +1770,6 @@ export class App extends BaseNode {
1780
1770
  return node;
1781
1771
  }
1782
1772
 
1783
-
1784
-
1785
-
1786
1773
  /**
1787
1774
  * 删除数据源
1788
1775
  * @param name 数据源名称
@@ -1831,8 +1818,6 @@ export class App extends BaseNode {
1831
1818
  return params;
1832
1819
  }
1833
1820
 
1834
-
1835
-
1836
1821
  /**
1837
1822
  * 删除数据结构
1838
1823
  * @param name 数据结构名称
@@ -1881,8 +1866,6 @@ export class App extends BaseNode {
1881
1866
  return params;
1882
1867
  }
1883
1868
 
1884
-
1885
-
1886
1869
  /**
1887
1870
  * 删除枚举
1888
1871
  * @param name 枚举名称
@@ -1931,8 +1914,6 @@ export class App extends BaseNode {
1931
1914
  return params;
1932
1915
  }
1933
1916
 
1934
-
1935
-
1936
1917
  /**
1937
1918
  * 删除逻辑
1938
1919
  * @param name 逻辑名称
@@ -1981,8 +1962,6 @@ export class App extends BaseNode {
1981
1962
  return params;
1982
1963
  }
1983
1964
 
1984
-
1985
-
1986
1965
  /**
1987
1966
  * 删除接口
1988
1967
  * @param name 接口名称
@@ -2031,8 +2010,6 @@ export class App extends BaseNode {
2031
2010
  return params;
2032
2011
  }
2033
2012
 
2034
-
2035
-
2036
2013
  /**
2037
2014
  * 删除页面
2038
2015
  * @param name 页面名称
@@ -2081,8 +2058,6 @@ export class App extends BaseNode {
2081
2058
  return params;
2082
2059
  }
2083
2060
 
2084
-
2085
-
2086
2061
  /**
2087
2062
  * 删除流程
2088
2063
  * @param name 流程名称
@@ -2131,8 +2106,6 @@ export class App extends BaseNode {
2131
2106
  return params;
2132
2107
  }
2133
2108
 
2134
-
2135
-
2136
2109
  /**
2137
2110
  * 删除角色
2138
2111
  * @param name 角色名称
@@ -2181,8 +2154,6 @@ export class App extends BaseNode {
2181
2154
  return params;
2182
2155
  }
2183
2156
 
2184
-
2185
-
2186
2157
  /**
2187
2158
  * 删除主题
2188
2159
  * @param name 主题名称
@@ -2231,8 +2202,6 @@ export class App extends BaseNode {
2231
2202
  return params;
2232
2203
  }
2233
2204
 
2234
-
2235
-
2236
2205
  /**
2237
2206
  * 删除配置管理
2238
2207
  * @param name 配置管理名称
@@ -2281,8 +2250,6 @@ export class App extends BaseNode {
2281
2250
  return params;
2282
2251
  }
2283
2252
 
2284
-
2285
-
2286
2253
  /**
2287
2254
  * 删除模块
2288
2255
  * @param name 模块名称
@@ -2308,8 +2275,6 @@ export class App extends BaseNode {
2308
2275
  return module.delete();
2309
2276
  }
2310
2277
 
2311
-
2312
-
2313
2278
  /**
2314
2279
  * 删除模块
2315
2280
  * @param name 模块名称
@@ -2335,8 +2300,6 @@ export class App extends BaseNode {
2335
2300
  return module.delete();
2336
2301
  }
2337
2302
 
2338
-
2339
-
2340
2303
  /**
2341
2304
  * 删除模块
2342
2305
  * @param name 模块名称
@@ -2510,6 +2473,7 @@ export class App extends BaseNode {
2510
2473
  const modulesMap: any = {
2511
2474
  extensions: node.dependencies,
2512
2475
  apis: node.interfaceDependencies,
2476
+ components: node.componentDependencies,
2513
2477
  };
2514
2478
  const modules = modulesMap[start];
2515
2479
  if (Array.isArray(modules)) {
@@ -2637,7 +2601,7 @@ ${keys.map((key) => ` ${key}: ${this.theme?.variableMap[key]};`).join('\n')}
2637
2601
  //================================================================================
2638
2602
  }
2639
2603
 
2640
- classMap['App'] = App;
2604
+ classMap.App = App;
2641
2605
  export default App;
2642
2606
  //================================================================================
2643
2607
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -209,7 +209,7 @@ export class Argument extends LogicItem {
209
209
  //================================================================================
210
210
  }
211
211
 
212
- classMap.Argument = Argument;
212
+ classMap['Argument'] = Argument;
213
213
  export default Argument;
214
214
  //================================================================================
215
215
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -459,7 +459,7 @@ export class Assignee extends LogicItem {
459
459
  //================================================================================
460
460
  }
461
461
 
462
- classMap.Assignee = Assignee;
462
+ classMap['Assignee'] = Assignee;
463
463
  export default Assignee;
464
464
  //================================================================================
465
465
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -231,7 +231,7 @@ export class Assignment extends LogicItem {
231
231
  //================================================================================
232
232
  }
233
233
 
234
- classMap.Assignment = Assignment;
234
+ classMap['Assignment'] = Assignment;
235
235
  export default Assignment;
236
236
  //================================================================================
237
237
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -244,7 +244,7 @@ export class Attribute extends BaseNode {
244
244
  //================================================================================
245
245
  }
246
246
 
247
- classMap.Attribute = Attribute;
247
+ classMap['Attribute'] = Attribute;
248
248
  export default Attribute;
249
249
  //================================================================================
250
250
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -281,7 +281,7 @@ export class BinaryExpression extends LogicItem {
281
281
  //================================================================================
282
282
  }
283
283
 
284
- classMap.BinaryExpression = BinaryExpression;
284
+ classMap['BinaryExpression'] = BinaryExpression;
285
285
  export default BinaryExpression;
286
286
  //================================================================================
287
287
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -560,7 +560,7 @@ export class BindAttribute extends BaseNode {
560
560
  //================================================================================
561
561
  }
562
562
 
563
- classMap.BindAttribute = BindAttribute;
563
+ classMap['BindAttribute'] = BindAttribute;
564
564
  export default BindAttribute;
565
565
  //================================================================================
566
566
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -133,10 +133,6 @@ export class BindDirective extends BaseNode {
133
133
  });
134
134
  }
135
135
 
136
-
137
-
138
-
139
-
140
136
  /**
141
137
  * 删除逻辑项
142
138
  * @param name 逻辑项名称
@@ -208,8 +204,14 @@ export class BindDirective extends BaseNode {
208
204
  */
209
205
  toVue(options?: ElementToVueOptions) {
210
206
  let modifiersString = '';
211
- Object.keys(this.modifiers || {}).forEach((key) => {
212
- const value = (this.modifiers as any)[key];
207
+ let modifiers = {};
208
+ try {
209
+ modifiers = JSON.parse(this.modifiers || '{}');
210
+ } catch (err) {
211
+ modifiers = {};
212
+ }
213
+ Object.keys(modifiers).forEach((key) => {
214
+ const value = (modifiers as any)[key];
213
215
  if (value)
214
216
  modifiersString += '.' + key;
215
217
  });
@@ -291,6 +291,10 @@ export class BindEvent extends BaseNode {
291
291
  //================================================================================
292
292
  // 用于logic回填
293
293
  get calleewholeKey(): string {
294
+ if (!this.calleeNamespace && this.calleeName) {
295
+ // 页面逻辑单独处理
296
+ return `${this.view.getNamespace()}.${this.view.name}.logics.${this.calleeName}`;
297
+ }
294
298
  return this.calleeNamespace + '.' + this.calleeName;
295
299
  }
296
300
  get tsCalleeNamespace() {
@@ -338,7 +342,7 @@ export class BindEvent extends BaseNode {
338
342
  if (isPageCycle) {
339
343
  return `${this.calleeKey}();`;
340
344
  }
341
- let code = `${this.toHump(this.name) || '__IDENTIFIER__'}: (event) => [\n`;
345
+ let code = `${this.toHump(this.name) || '__IDENTIFIER__'}: (event: any) => [\n`;
342
346
  code += indent((state?.tabSize || 0) + 1);
343
347
  code += `() => {${this.calleeKey}()}`;
344
348
  code += '\n';
@@ -440,7 +444,7 @@ export class BindEvent extends BaseNode {
440
444
  //================================================================================
441
445
  }
442
446
 
443
- classMap.BindEvent = BindEvent;
447
+ classMap['BindEvent'] = BindEvent;
444
448
  export default BindEvent;
445
449
  //================================================================================
446
450
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -72,6 +72,18 @@ export class BooleanLiteral extends LogicItem {
72
72
  toEmbeddedTS(state?: TranslatorState) {
73
73
  return this.value;
74
74
  }
75
+
76
+ /**
77
+ * 设置布尔值内容
78
+ */
79
+ setValue(value: string) {
80
+ const object = {
81
+ value,
82
+ };
83
+ this.update({
84
+ ...object,
85
+ });
86
+ }
75
87
  getValue() {
76
88
  return this.value;
77
89
  }
@@ -82,7 +94,7 @@ export class BooleanLiteral extends LogicItem {
82
94
  //================================================================================
83
95
  }
84
96
 
85
- classMap.BooleanLiteral = BooleanLiteral;
97
+ classMap['BooleanLiteral'] = BooleanLiteral;
86
98
  export default BooleanLiteral;
87
99
  //================================================================================
88
100
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -64,7 +64,7 @@ export class CallFunction extends LogicItem {
64
64
  @property('Argument')
65
65
  arguments: Array<Argument> = [];
66
66
 
67
-
67
+
68
68
 
69
69
  /**
70
70
  * @param source 需要合并的部分参数
@@ -79,12 +79,12 @@ export class CallFunction extends LogicItem {
79
79
  return super.from(source, parentNode, parentKey) as CallFunction;
80
80
  }
81
81
 
82
+
83
+
82
84
 
85
+
83
86
 
84
-
85
-
86
-
87
-
87
+
88
88
 
89
89
  /**
90
90
  * 插入类型标注
@@ -118,7 +118,7 @@ export class CallFunction extends LogicItem {
118
118
  return typeAnnotation;
119
119
  }
120
120
 
121
-
121
+
122
122
 
123
123
  /**
124
124
  * 插入类型标注
@@ -142,7 +142,7 @@ export class CallFunction extends LogicItem {
142
142
  return node;
143
143
  }
144
144
 
145
-
145
+
146
146
 
147
147
  /**
148
148
  * 添加类型标注
@@ -163,7 +163,7 @@ export class CallFunction extends LogicItem {
163
163
  return this._insertTypeAnnotationAt(options as any, index);
164
164
  }
165
165
 
166
-
166
+
167
167
 
168
168
  /**
169
169
  * 添加类型标注
@@ -191,7 +191,7 @@ export class CallFunction extends LogicItem {
191
191
 
192
192
 
193
193
 
194
-
194
+
195
195
 
196
196
  /**
197
197
  * 插入实际参数
@@ -225,7 +225,7 @@ export class CallFunction extends LogicItem {
225
225
  return argument;
226
226
  }
227
227
 
228
-
228
+
229
229
 
230
230
  /**
231
231
  * 插入实际参数
@@ -249,7 +249,7 @@ export class CallFunction extends LogicItem {
249
249
  return node;
250
250
  }
251
251
 
252
-
252
+
253
253
 
254
254
  /**
255
255
  * 添加实际参数
@@ -270,7 +270,7 @@ export class CallFunction extends LogicItem {
270
270
  return this._insertArgumentAt(options as any, index);
271
271
  }
272
272
 
273
-
273
+
274
274
 
275
275
  /**
276
276
  * 添加实际参数
@@ -296,7 +296,7 @@ export class CallFunction extends LogicItem {
296
296
  }
297
297
 
298
298
 
299
-
299
+
300
300
 
301
301
  /**
302
302
  * 删除类型标注
@@ -457,6 +457,7 @@ export class CallFunction extends LogicItem {
457
457
  argument.expression = BaseNode.from(param.defaultExpression, argument, 'expression') as Identifier;
458
458
  }
459
459
  if (param.defaultExpression instanceof Function) {
460
+ (param.defaultExpression as Function).returnExpression = null;
460
461
  argument.expression = BaseNode.from(param.defaultExpression, argument, 'expression') as Identifier;
461
462
  }
462
463
  Object.assign(argument, relationOptions);
@@ -523,7 +524,7 @@ export class CallFunction extends LogicItem {
523
524
  //================================================================================
524
525
  }
525
526
 
526
- classMap.CallFunction = CallFunction;
527
+ classMap['CallFunction'] = CallFunction;
527
528
  export default CallFunction;
528
529
  //================================================================================
529
530
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -516,7 +516,7 @@ export class CallInterface extends LogicItem {
516
516
  //================================================================================
517
517
  }
518
518
 
519
- classMap.CallInterface = CallInterface;
519
+ classMap['CallInterface'] = CallInterface;
520
520
  export default CallInterface;
521
521
  //================================================================================
522
522
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -389,6 +389,10 @@ export class CallLogic extends LogicItem {
389
389
 
390
390
  // 用于logic回填
391
391
  get calleewholeKey(): string {
392
+ if (!this.calleeNamespace && this.calleeName && this.view) {
393
+ // 页面逻辑单独处理
394
+ return `${this.view.getNamespace()}.${this.view.name}.logics.${this.calleeName}`;
395
+ }
392
396
  return this.calleeNamespace + '.' + this.calleeName;
393
397
  }
394
398
  get calleeKey(): string {
@@ -539,7 +543,7 @@ export class CallLogic extends LogicItem {
539
543
 
540
544
  toVue(options?: ElementToVueOptions): string {
541
545
  let code = '';
542
- if (this.calleeNamespace === 'nasl.browser' || this.calleeNamespace === 'nasl.auth' || this.calleeNamespace === 'nasl.configuration') {
546
+ if (this.calleeNamespace === 'nasl.browser' || this.calleeNamespace === 'nasl.auth' || this.calleeNamespace === 'nasl.configuration' || this.calleeNamespace === 'nasl.process') {
543
547
  code += '$global.';
544
548
  }
545
549
  code += this.calleeName;
@@ -688,19 +692,30 @@ export class CallLogic extends LogicItem {
688
692
  code += `JSON.parse`;
689
693
  break;
690
694
  }
691
- } else if (calleeNamespace === 'nasl.browser' || calleeNamespace === 'nasl.auth' || calleeNamespace === 'nasl.configuration') {
695
+ } else if (calleeNamespace === 'nasl.browser' || calleeNamespace === 'nasl.auth' || calleeNamespace === 'nasl.configuration' || calleeNamespace === 'nasl.process') {
692
696
  code += `this.$global.${this.calleeName}`;
693
697
  } else {
694
698
  code += `this.${this.calleeName}`;
695
699
  }
696
- code += '(';
697
- this.arguments?.filter((arg) => arg?.expression)
698
- .forEach((arg, index) => {
699
- code += arg?.toJS(shiftState(state, code));
700
- if (index !== this.arguments?.length - 1)
701
- code += ', ';
702
- });
703
- code += ')';
700
+ if (calleeNamespace === 'nasl.process') {
701
+ code += '({';
702
+ this.arguments?.filter((arg) => arg?.expression)
703
+ .forEach((arg, index) => {
704
+ code += `${arg.keyword}: ${arg?.toJS(shiftState(state, code))}`;
705
+ if (index !== this.arguments?.length - 1)
706
+ code += ', ';
707
+ });
708
+ code += '})';
709
+ } else {
710
+ code += '(';
711
+ this.arguments?.filter((arg) => arg?.expression)
712
+ .forEach((arg, index) => {
713
+ code += arg?.toJS(shiftState(state, code));
714
+ if (index !== this.arguments?.length - 1)
715
+ code += ', ';
716
+ });
717
+ code += ')';
718
+ }
704
719
  }
705
720
  return code;
706
721
  }
@@ -736,7 +751,7 @@ export class CallLogic extends LogicItem {
736
751
  //================================================================================
737
752
  }
738
753
 
739
- classMap.CallLogic = CallLogic;
754
+ classMap['CallLogic'] = CallLogic;
740
755
  export default CallLogic;
741
756
  //================================================================================
742
757
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑