@lcap/nasl 3.3.2-beta.4 → 3.3.2-beta.5

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 (674) hide show
  1. package/coverage/index.html +108 -108
  2. package/coverage/src/automate/engine/index.html +1 -1
  3. package/coverage/src/automate/engine/utils.js.html +36 -36
  4. package/coverage/src/bak/index.html +15 -15
  5. package/coverage/src/bak/translator.js.html +183 -60
  6. package/coverage/src/breakpoint/generator/AfterStartNode.ts.html +1 -1
  7. package/coverage/src/breakpoint/generator/BeforeEndNode.ts.html +1 -1
  8. package/coverage/src/breakpoint/generator/BreakpointNode.ts.html +1 -1
  9. package/coverage/src/breakpoint/generator/CallbackNode.ts.html +1 -1
  10. package/coverage/src/breakpoint/generator/index.html +1 -1
  11. package/coverage/src/breakpoint/generator/index.ts.html +1 -1
  12. package/coverage/src/breakpoint/index.html +1 -1
  13. package/coverage/src/breakpoint/index.ts.html +1 -1
  14. package/coverage/src/breakpoint/shared/constants.ts.html +1 -1
  15. package/coverage/src/breakpoint/shared/index.html +1 -1
  16. package/coverage/src/breakpoint/shared/index.ts.html +1 -1
  17. package/coverage/src/breakpoint/shared/operations.ts.html +1 -1
  18. package/coverage/src/breakpoint/shared/socket.ts.html +1 -1
  19. package/coverage/src/breakpoint/shared/utils.ts.html +1 -1
  20. package/coverage/src/breakpoint/store/core.ts.html +1 -1
  21. package/coverage/src/breakpoint/store/dock.ts.html +1 -1
  22. package/coverage/src/breakpoint/store/index.html +1 -1
  23. package/coverage/src/breakpoint/store/index.ts.html +1 -1
  24. package/coverage/src/common/BaseNode.ts.html +92 -62
  25. package/coverage/src/common/Command.ts.html +1 -1
  26. package/coverage/src/common/EventEmitter.ts.html +1 -1
  27. package/coverage/src/common/Messager.ts.html +1 -1
  28. package/coverage/src/common/asyncFuncMap.ts.html +1 -1
  29. package/coverage/src/common/index.html +14 -14
  30. package/coverage/src/common/index.ts.html +1 -1
  31. package/coverage/src/concepts/Abort__.ts.html +9 -6
  32. package/coverage/src/concepts/Anchor__.ts.html +36 -21
  33. package/coverage/src/concepts/AnonymousFunction__.ts.html +62 -20
  34. package/coverage/src/concepts/App__.ts.html +917 -74
  35. package/coverage/src/concepts/Argument__.ts.html +41 -26
  36. package/coverage/src/concepts/Assignee__.ts.html +40 -13
  37. package/coverage/src/concepts/AssignmentLine__.ts.html +9 -6
  38. package/coverage/src/concepts/Assignment__.ts.html +61 -22
  39. package/coverage/src/concepts/Attribute__.ts.html +25 -10
  40. package/coverage/src/concepts/AuthInterface__.ts.html +9 -6
  41. package/coverage/src/concepts/AuthLogicForCallInterface__.ts.html +25 -10
  42. package/coverage/src/concepts/AuthLogic__.ts.html +18 -6
  43. package/coverage/src/concepts/BackendVariable__.ts.html +25 -10
  44. package/coverage/src/concepts/Backend__.ts.html +25 -10
  45. package/coverage/src/concepts/BatchAssignment__.ts.html +61 -16
  46. package/coverage/src/concepts/BinaryExpression__.ts.html +141 -39
  47. package/coverage/src/concepts/BindAttribute__.ts.html +134 -41
  48. package/coverage/src/concepts/BindDirective__.ts.html +79 -16
  49. package/coverage/src/concepts/BindEvent__.ts.html +80 -23
  50. package/coverage/src/concepts/BindStyle__.ts.html +25 -10
  51. package/coverage/src/concepts/BooleanLiteral__.ts.html +9 -6
  52. package/coverage/src/concepts/CallAuthInterface__.ts.html +25 -10
  53. package/coverage/src/concepts/CallConnector__.ts.html +9 -6
  54. package/coverage/src/concepts/CallFunction__.ts.html +56 -38
  55. package/coverage/src/concepts/CallInterface__.ts.html +81 -36
  56. package/coverage/src/concepts/CallLogic__.ts.html +195 -264
  57. package/coverage/src/concepts/CallQueryComponent__.ts.html +40 -13
  58. package/coverage/src/concepts/Comment__.ts.html +11 -8
  59. package/coverage/src/concepts/CompletionProperty__.ts.html +25 -10
  60. package/coverage/src/concepts/ConfigGroup__.ts.html +25 -10
  61. package/coverage/src/concepts/ConfigPropertyValue__.ts.html +9 -6
  62. package/coverage/src/concepts/ConfigProperty__.ts.html +25 -10
  63. package/coverage/src/concepts/Configuration__.ts.html +25 -10
  64. package/coverage/src/concepts/Connection__.ts.html +26 -11
  65. package/coverage/src/concepts/ConnectorTrigger__.ts.html +9 -6
  66. package/coverage/src/concepts/Connector__.ts.html +85 -22
  67. package/coverage/src/concepts/Constant__.ts.html +25 -10
  68. package/coverage/src/concepts/DataSource__.ts.html +26 -11
  69. package/coverage/src/concepts/DatabaseTypeAnnotation__.ts.html +9 -6
  70. package/coverage/src/concepts/Destination__.ts.html +24 -12
  71. package/coverage/src/concepts/End__.ts.html +9 -6
  72. package/coverage/src/concepts/EntityIndex__.ts.html +9 -6
  73. package/coverage/src/concepts/EntityProperty__.ts.html +62 -14
  74. package/coverage/src/concepts/Entity__.ts.html +41 -14
  75. package/coverage/src/concepts/EnumItem__.ts.html +9 -6
  76. package/coverage/src/concepts/Enum__.ts.html +25 -10
  77. package/coverage/src/concepts/Event__.ts.html +25 -10
  78. package/coverage/src/concepts/ExternalDestination__.ts.html +25 -10
  79. package/coverage/src/concepts/ForEachStatement__.ts.html +68 -47
  80. package/coverage/src/concepts/FrontendLibrary__.ts.html +40 -13
  81. package/coverage/src/concepts/FrontendVariable__.ts.html +1 -1
  82. package/coverage/src/concepts/Frontend__.ts.html +86 -23
  83. package/coverage/src/concepts/Function__.ts.html +92 -26
  84. package/coverage/src/concepts/Identifier__.ts.html +28 -25
  85. package/coverage/src/concepts/IfStatement__.ts.html +83 -56
  86. package/coverage/src/concepts/Integration__.ts.html +40 -13
  87. package/coverage/src/concepts/InterfaceParam__.ts.html +25 -10
  88. package/coverage/src/concepts/Interface__.ts.html +61 -22
  89. package/coverage/src/concepts/JSBlock__.ts.html +188 -8
  90. package/coverage/src/concepts/JavaLogic__.ts.html +9 -6
  91. package/coverage/src/concepts/LogicItem__.ts.html +15 -12
  92. package/coverage/src/concepts/Logic__.ts.html +117 -81
  93. package/coverage/src/concepts/MatchCase__.ts.html +100 -61
  94. package/coverage/src/concepts/Match__.ts.html +48 -27
  95. package/coverage/src/concepts/MemberExpression__.ts.html +72 -66
  96. package/coverage/src/concepts/MetadataType__.ts.html +1996 -0
  97. package/coverage/src/concepts/MicroApp__.ts.html +9 -6
  98. package/coverage/src/concepts/Module__.ts.html +672 -18
  99. package/coverage/src/concepts/MsgTriggerEvent__.ts.html +25 -10
  100. package/coverage/src/concepts/MsgTriggerLauncher__.ts.html +25 -10
  101. package/coverage/src/concepts/Namespace__.ts.html +175 -40
  102. package/coverage/src/concepts/NewComposite__.ts.html +93 -27
  103. package/coverage/src/concepts/NewList__.ts.html +44 -14
  104. package/coverage/src/concepts/NewMap__.ts.html +44 -14
  105. package/coverage/src/concepts/New__.ts.html +1 -1
  106. package/coverage/src/concepts/NullLiteral__.ts.html +9 -6
  107. package/coverage/src/concepts/NumericLiteral__.ts.html +27 -12
  108. package/coverage/src/concepts/OqlQueryComponent__.ts.html +103 -13
  109. package/coverage/src/concepts/OverriddenLogic__.ts.html +100 -25
  110. package/coverage/src/concepts/Param__.ts.html +24 -15
  111. package/coverage/src/concepts/Point__.ts.html +9 -6
  112. package/coverage/src/concepts/ProcessComponent__.ts.html +40 -13
  113. package/coverage/src/concepts/ProcessElement__.ts.html +128 -29
  114. package/coverage/src/concepts/ProcessOutcome__.ts.html +9 -6
  115. package/coverage/src/concepts/ProcessOutcomes__.ts.html +9 -6
  116. package/coverage/src/concepts/Process__.ts.html +85 -22
  117. package/coverage/src/concepts/QueryAggregateExpression__.ts.html +25 -10
  118. package/coverage/src/concepts/QueryFieldExpression__.ts.html +9 -6
  119. package/coverage/src/concepts/QueryFromExpression__.ts.html +25 -10
  120. package/coverage/src/concepts/QueryGroupByExpression__.ts.html +25 -10
  121. package/coverage/src/concepts/QueryJoinExpression__.ts.html +25 -10
  122. package/coverage/src/concepts/QueryLimitExpression__.ts.html +25 -10
  123. package/coverage/src/concepts/QueryOrderByExpression__.ts.html +25 -10
  124. package/coverage/src/concepts/QuerySelectExpression__.ts.html +25 -10
  125. package/coverage/src/concepts/Rect__.ts.html +9 -6
  126. package/coverage/src/concepts/Return__.ts.html +25 -10
  127. package/coverage/src/concepts/Role__.ts.html +9 -6
  128. package/coverage/src/concepts/SelectMembers__.ts.html +25 -10
  129. package/coverage/src/concepts/Slot__.ts.html +25 -10
  130. package/coverage/src/concepts/SqlQueryComponent__.ts.html +25 -10
  131. package/coverage/src/concepts/Start__.ts.html +9 -6
  132. package/coverage/src/concepts/StringInterpolation__.ts.html +40 -19
  133. package/coverage/src/concepts/StringLiteral__.ts.html +9 -6
  134. package/coverage/src/concepts/StructureProperty__.ts.html +25 -10
  135. package/coverage/src/concepts/Structure__.ts.html +40 -13
  136. package/coverage/src/concepts/SwitchCase__.ts.html +33 -18
  137. package/coverage/src/concepts/SwitchStatement__.ts.html +38 -23
  138. package/coverage/src/concepts/Theme__.ts.html +9 -6
  139. package/coverage/src/concepts/Transactional__.ts.html +9 -6
  140. package/coverage/src/concepts/TriggerEvent__.ts.html +25 -10
  141. package/coverage/src/concepts/TriggerLauncher__.ts.html +9 -6
  142. package/coverage/src/concepts/TypeAnnotation__.ts.html +223 -61
  143. package/coverage/src/concepts/TypeParam__.ts.html +10 -7
  144. package/coverage/src/concepts/UnaryExpression__.ts.html +40 -13
  145. package/coverage/src/concepts/Unparsed__.ts.html +11 -8
  146. package/coverage/src/concepts/UseComponent__.ts.html +9 -6
  147. package/coverage/src/concepts/ValidationRule__.ts.html +30 -15
  148. package/coverage/src/concepts/Variable__.ts.html +61 -16
  149. package/coverage/src/concepts/ViewBlock__.ts.html +9 -6
  150. package/coverage/src/concepts/ViewComponent__.ts.html +99 -24
  151. package/coverage/src/concepts/ViewElement__.ts.html +334 -181
  152. package/coverage/src/concepts/View__.ts.html +326 -71
  153. package/coverage/src/concepts/WhileStatement__.ts.html +78 -45
  154. package/coverage/src/concepts/basics/stdlib/index.html +1 -1
  155. package/coverage/src/concepts/basics/stdlib/index.ts.html +1 -1
  156. package/coverage/src/concepts/basics/stdlib/nasl.auth.ts.html +1 -1
  157. package/coverage/src/concepts/basics/stdlib/nasl.browser.ts.html +1 -1
  158. package/coverage/src/concepts/basics/stdlib/nasl.collection.ts.html +1 -1
  159. package/coverage/src/concepts/basics/stdlib/nasl.configuration.ts.html +1 -1
  160. package/coverage/src/concepts/basics/stdlib/nasl.core.ts.html +1 -1
  161. package/coverage/src/concepts/basics/stdlib/nasl.event.ts.html +1 -1
  162. package/coverage/src/concepts/basics/stdlib/nasl.http.ts.html +1 -1
  163. package/coverage/src/concepts/basics/stdlib/nasl.interface.ts.html +1 -1
  164. package/coverage/src/concepts/basics/stdlib/nasl.io.ts.html +1 -1
  165. package/coverage/src/concepts/basics/stdlib/nasl.logging.ts.html +1 -1
  166. package/coverage/src/concepts/basics/stdlib/nasl.process.ts.html +1 -1
  167. package/coverage/src/concepts/basics/stdlib/nasl.ui.ts.html +1 -1
  168. package/coverage/src/concepts/basics/stdlib/nasl.util.ts.html +1 -1
  169. package/coverage/src/concepts/basics/stdlib/nasl.validation.ts.html +1 -1
  170. package/coverage/src/concepts/basics/stdlib/reference2TypeAnnotationList.ts.html +1 -1
  171. package/coverage/src/concepts/basics/stdlib/timeZone.ts.html +1 -1
  172. package/coverage/src/concepts/basics/types/coreTypeList.ts.html +1 -1
  173. package/coverage/src/concepts/basics/types/index.html +1 -1
  174. package/coverage/src/concepts/basics/types/index.ts.html +1 -1
  175. package/coverage/src/concepts/index.html +823 -808
  176. package/coverage/src/concepts/index.ts.html +1 -1
  177. package/coverage/src/concepts/index__.ts.html +7 -4
  178. package/coverage/src/config.ts.html +1 -1
  179. package/coverage/src/decorators/index.html +1 -1
  180. package/coverage/src/decorators/index.ts.html +24 -24
  181. package/coverage/src/decorators/promise.ts.html +1 -1
  182. package/coverage/src/eventBus.ts.html +1 -1
  183. package/coverage/src/generator/compileComponent.ts.html +1 -1
  184. package/coverage/src/generator/genBundleFiles.ts.html +13 -19
  185. package/coverage/src/generator/genHash.ts.html +1 -1
  186. package/coverage/src/generator/genMetaData.ts.html +103 -16
  187. package/coverage/src/generator/genReleaseBody.ts.html +1 -1
  188. package/coverage/src/generator/icestark.ts.html +1 -1
  189. package/coverage/src/generator/index.html +15 -15
  190. package/coverage/src/generator/index.ts.html +1 -1
  191. package/coverage/src/generator/microApp.ts.html +1 -1
  192. package/coverage/src/generator/permission.ts.html +1 -1
  193. package/coverage/src/generator/qiankun.ts.html +1 -1
  194. package/coverage/src/generator/styleReplacer.ts.html +1 -1
  195. package/coverage/src/index.html +7 -7
  196. package/coverage/src/index.ts.html +4 -4
  197. package/coverage/src/manager/diagnostic.ts.html +1 -1
  198. package/coverage/src/manager/index.html +1 -1
  199. package/coverage/src/manager/stepRecorder.ts.html +1 -1
  200. package/coverage/src/natural/genNaturalTS.ts.html +1 -1
  201. package/coverage/src/natural/index.html +15 -15
  202. package/coverage/src/natural/index.ts.html +1 -1
  203. package/coverage/src/natural/naslStdlibMap.ts.html +1 -1
  204. package/coverage/src/natural/transformTSCode.ts.html +78 -18
  205. package/coverage/src/sentry/index.html +1 -1
  206. package/coverage/src/sentry/index.ts.html +21 -21
  207. package/coverage/src/server/createUiTs.ts.html +15 -6
  208. package/coverage/src/server/entity2LogicNamespace.ts.html +1 -1
  209. package/coverage/src/server/event.js.html +1 -1
  210. package/coverage/src/server/extendBaseNode.ts.html +7 -4
  211. package/coverage/src/server/formatTsUtils.ts.html +1 -1
  212. package/coverage/src/server/getConnector.ts.html +1 -1
  213. package/coverage/src/server/getExtensionModules.ts.html +1 -1
  214. package/coverage/src/server/getFunctions.ts.html +1 -1
  215. package/coverage/src/server/getInterfaces.ts.html +1 -1
  216. package/coverage/src/server/getLogging.ts.html +1 -1
  217. package/coverage/src/server/getLogics.ts.html +1 -1
  218. package/coverage/src/server/getMemberIdentifier.ts.html +161 -113
  219. package/coverage/src/server/getProcessComponents.ts.html +1 -1
  220. package/coverage/src/server/getProcesses.ts.html +1 -1
  221. package/coverage/src/server/getValidates.ts.html +1 -1
  222. package/coverage/src/server/index.html +25 -25
  223. package/coverage/src/server/index.ts.html +1 -1
  224. package/coverage/src/server/naslServer.ts.html +470 -59
  225. package/coverage/src/server/naslStdlibMap.ts.html +1 -1
  226. package/coverage/src/server/process2LogicNamespace.ts.html +1 -1
  227. package/coverage/src/server/translator.ts.html +3 -3
  228. package/coverage/src/service/creator/add.configs.js.html +26 -8
  229. package/coverage/src/service/creator/errHandles.js.html +19 -37
  230. package/coverage/src/service/creator/index.html +22 -22
  231. package/coverage/src/service/creator/index.js.html +1 -1
  232. package/coverage/src/service/datasource/api.js.html +1 -1
  233. package/coverage/src/service/datasource/index.html +1 -1
  234. package/coverage/src/service/datasource/index.js.html +1 -1
  235. package/coverage/src/service/logic/api.js.html +1 -1
  236. package/coverage/src/service/logic/index.html +1 -1
  237. package/coverage/src/service/logic/index.js.html +1 -1
  238. package/coverage/src/service/storage/api.js.html +1 -1
  239. package/coverage/src/service/storage/index.html +19 -19
  240. package/coverage/src/service/storage/index.ts.html +1 -1
  241. package/coverage/src/service/storage/init.ts.html +1498 -598
  242. package/coverage/src/service/storage/jsoner.ts.html +3 -3
  243. package/coverage/src/service/storage/map.ts.html +1 -1
  244. package/coverage/src/service/storage/service.ts.html +1 -1
  245. package/coverage/src/service/storage/storagePoint.ts.html +1 -1
  246. package/coverage/src/templator/genCallComponentLogic.ts.html +1 -1
  247. package/coverage/src/templator/genCreateBlock.ts.html +47 -56
  248. package/coverage/src/templator/genCurdEditMultipleKeyBlock.ts.html +49 -31
  249. package/coverage/src/templator/genCurdMultipleKeyBlock.ts.html +81 -93
  250. package/coverage/src/templator/genEditTableBlock.ts.html +80 -11
  251. package/coverage/src/templator/genEnumSelectBlock.ts.html +1 -1
  252. package/coverage/src/templator/genGetBlock.ts.html +1 -1
  253. package/coverage/src/templator/genGridViewBlock.ts.html +1 -1
  254. package/coverage/src/templator/genListViewBlock.ts.html +1 -1
  255. package/coverage/src/templator/genQueryComponent.ts.html +1 -1
  256. package/coverage/src/templator/genSelectBlock.ts.html +1 -1
  257. package/coverage/src/templator/genTableBlock.ts.html +66 -3
  258. package/coverage/src/templator/genUpdateBlock.ts.html +48 -36
  259. package/coverage/src/templator/index.html +39 -39
  260. package/coverage/src/templator/index.ts.html +1 -1
  261. package/coverage/src/templator/utils.ts.html +77 -11
  262. package/coverage/src/translator/constant.ts.html +1 -1
  263. package/coverage/src/translator/index.html +20 -20
  264. package/coverage/src/translator/index.ts.html +1 -1
  265. package/coverage/src/translator/utils.ts.html +87 -30
  266. package/coverage/src/utils/cookie.ts.html +1 -1
  267. package/coverage/src/utils/env.ts.html +1 -1
  268. package/coverage/src/utils/index.html +27 -27
  269. package/coverage/src/utils/index.ts.html +115 -22
  270. package/coverage/src/utils/logger.ts.html +1 -1
  271. package/coverage/src/utils/sortTsString.ts.html +1 -1
  272. package/coverage/src/utils/string.ts.html +110 -8
  273. package/coverage/src/utils/time-slicing.ts.html +1 -1
  274. package/coverage/src/utils/traverse.ts.html +1 -1
  275. package/coverage/src/utils/window.ts.html +1 -1
  276. package/out/common/BaseNode.d.ts +1 -1
  277. package/out/common/BaseNode.js +6 -2
  278. package/out/common/BaseNode.js.map +1 -1
  279. package/out/concepts/Abort__.js +3 -1
  280. package/out/concepts/Abort__.js.map +1 -1
  281. package/out/concepts/Anchor__.js +11 -4
  282. package/out/concepts/Anchor__.js.map +1 -1
  283. package/out/concepts/AnonymousFunction__.js +30 -11
  284. package/out/concepts/AnonymousFunction__.js.map +1 -1
  285. package/out/concepts/App__.js +147 -63
  286. package/out/concepts/App__.js.map +1 -1
  287. package/out/concepts/Argument__.js +11 -4
  288. package/out/concepts/Argument__.js.map +1 -1
  289. package/out/concepts/Assignee__.js +23 -9
  290. package/out/concepts/Assignee__.js.map +1 -1
  291. package/out/concepts/AssignmentLine__.js +3 -1
  292. package/out/concepts/AssignmentLine__.js.map +1 -1
  293. package/out/concepts/Assignment__.js +19 -6
  294. package/out/concepts/Assignment__.js.map +1 -1
  295. package/out/concepts/Attribute__.js +11 -4
  296. package/out/concepts/Attribute__.js.map +1 -1
  297. package/out/concepts/AuthInterface__.js +3 -1
  298. package/out/concepts/AuthInterface__.js.map +1 -1
  299. package/out/concepts/AuthLogicForCallInterface__.js +12 -5
  300. package/out/concepts/AuthLogicForCallInterface__.js.map +1 -1
  301. package/out/concepts/AuthLogic__.js +3 -1
  302. package/out/concepts/AuthLogic__.js.map +1 -1
  303. package/out/concepts/BackendVariable__.js +11 -4
  304. package/out/concepts/BackendVariable__.js.map +1 -1
  305. package/out/concepts/Backend__.js +12 -5
  306. package/out/concepts/Backend__.js.map +1 -1
  307. package/out/concepts/BatchAssignment__.js +32 -16
  308. package/out/concepts/BatchAssignment__.js.map +1 -1
  309. package/out/concepts/BinaryExpression__.js +15 -8
  310. package/out/concepts/BinaryExpression__.js.map +1 -1
  311. package/out/concepts/BindAttribute__.js +21 -6
  312. package/out/concepts/BindAttribute__.js.map +1 -1
  313. package/out/concepts/BindDirective__.js +28 -5
  314. package/out/concepts/BindDirective__.js.map +1 -1
  315. package/out/concepts/BindEvent__.js +20 -8
  316. package/out/concepts/BindEvent__.js.map +1 -1
  317. package/out/concepts/BindStyle__.js +11 -4
  318. package/out/concepts/BindStyle__.js.map +1 -1
  319. package/out/concepts/BooleanLiteral__.js +3 -1
  320. package/out/concepts/BooleanLiteral__.js.map +1 -1
  321. package/out/concepts/CallAuthInterface__.js +14 -5
  322. package/out/concepts/CallAuthInterface__.js.map +1 -1
  323. package/out/concepts/CallConnector__.js +3 -1
  324. package/out/concepts/CallConnector__.js.map +1 -1
  325. package/out/concepts/CallFunction__.js +23 -12
  326. package/out/concepts/CallFunction__.js.map +1 -1
  327. package/out/concepts/CallInterface__.js +15 -8
  328. package/out/concepts/CallInterface__.js.map +1 -1
  329. package/out/concepts/CallLogic__.js +45 -26
  330. package/out/concepts/CallLogic__.js.map +1 -1
  331. package/out/concepts/CallQueryComponent__.js +19 -7
  332. package/out/concepts/CallQueryComponent__.js.map +1 -1
  333. package/out/concepts/Comment__.js +3 -1
  334. package/out/concepts/Comment__.js.map +1 -1
  335. package/out/concepts/CompletionProperty__.js +11 -4
  336. package/out/concepts/CompletionProperty__.js.map +1 -1
  337. package/out/concepts/ConfigGroup__.js +12 -5
  338. package/out/concepts/ConfigGroup__.js.map +1 -1
  339. package/out/concepts/ConfigPropertyValue__.js +3 -1
  340. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  341. package/out/concepts/ConfigProperty__.js +12 -5
  342. package/out/concepts/ConfigProperty__.js.map +1 -1
  343. package/out/concepts/Configuration__.js +12 -5
  344. package/out/concepts/Configuration__.js.map +1 -1
  345. package/out/concepts/Connection__.js +12 -5
  346. package/out/concepts/Connection__.js.map +1 -1
  347. package/out/concepts/ConnectorTrigger__.js +3 -1
  348. package/out/concepts/ConnectorTrigger__.js.map +1 -1
  349. package/out/concepts/Connector__.js +48 -21
  350. package/out/concepts/Connector__.js.map +1 -1
  351. package/out/concepts/Constant__.js +11 -4
  352. package/out/concepts/Constant__.js.map +1 -1
  353. package/out/concepts/DataSource__.js +12 -5
  354. package/out/concepts/DataSource__.js.map +1 -1
  355. package/out/concepts/DatabaseTypeAnnotation__.js +3 -1
  356. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -1
  357. package/out/concepts/Destination__.js +11 -4
  358. package/out/concepts/Destination__.js.map +1 -1
  359. package/out/concepts/End__.js +3 -1
  360. package/out/concepts/End__.js.map +1 -1
  361. package/out/concepts/EntityIndex__.js +3 -1
  362. package/out/concepts/EntityIndex__.js.map +1 -1
  363. package/out/concepts/EntityProperty__.js +19 -7
  364. package/out/concepts/EntityProperty__.js.map +1 -1
  365. package/out/concepts/Entity__.js +21 -9
  366. package/out/concepts/Entity__.js.map +1 -1
  367. package/out/concepts/EnumItem__.js +3 -1
  368. package/out/concepts/EnumItem__.js.map +1 -1
  369. package/out/concepts/Enum__.js +11 -4
  370. package/out/concepts/Enum__.js.map +1 -1
  371. package/out/concepts/Event__.js +12 -5
  372. package/out/concepts/Event__.js.map +1 -1
  373. package/out/concepts/ExternalDestination__.js +11 -4
  374. package/out/concepts/ExternalDestination__.js.map +1 -1
  375. package/out/concepts/ForEachStatement__.js +34 -24
  376. package/out/concepts/ForEachStatement__.js.map +1 -1
  377. package/out/concepts/FrontendLibrary__.js +21 -9
  378. package/out/concepts/FrontendLibrary__.js.map +1 -1
  379. package/out/concepts/Frontend__.js +47 -20
  380. package/out/concepts/Frontend__.js.map +1 -1
  381. package/out/concepts/Function__.js +47 -18
  382. package/out/concepts/Function__.js.map +1 -1
  383. package/out/concepts/Identifier__.js +3 -1
  384. package/out/concepts/Identifier__.js.map +1 -1
  385. package/out/concepts/IfStatement__.js +26 -17
  386. package/out/concepts/IfStatement__.js.map +1 -1
  387. package/out/concepts/Integration__.js +20 -8
  388. package/out/concepts/Integration__.js.map +1 -1
  389. package/out/concepts/InterfaceParam__.js +11 -4
  390. package/out/concepts/InterfaceParam__.js.map +1 -1
  391. package/out/concepts/Interface__.js +27 -10
  392. package/out/concepts/Interface__.js.map +1 -1
  393. package/out/concepts/JSBlock__.js +3 -1
  394. package/out/concepts/JSBlock__.js.map +1 -1
  395. package/out/concepts/JavaLogic__.js +3 -1
  396. package/out/concepts/JavaLogic__.js.map +1 -1
  397. package/out/concepts/LogicItem__.d.ts +4 -4
  398. package/out/concepts/LogicItem__.js +7 -5
  399. package/out/concepts/LogicItem__.js.map +1 -1
  400. package/out/concepts/Logic__.js +68 -36
  401. package/out/concepts/Logic__.js.map +1 -1
  402. package/out/concepts/MatchCase__.js +36 -24
  403. package/out/concepts/MatchCase__.js.map +1 -1
  404. package/out/concepts/Match__.js +23 -16
  405. package/out/concepts/Match__.js.map +1 -1
  406. package/out/concepts/MemberExpression__.js +27 -20
  407. package/out/concepts/MemberExpression__.js.map +1 -1
  408. package/out/concepts/MicroApp__.js +3 -1
  409. package/out/concepts/MicroApp__.js.map +1 -1
  410. package/out/concepts/Module__.js +5 -3
  411. package/out/concepts/Module__.js.map +1 -1
  412. package/out/concepts/MsgTriggerEvent__.js +12 -5
  413. package/out/concepts/MsgTriggerEvent__.js.map +1 -1
  414. package/out/concepts/MsgTriggerLauncher__.js +12 -5
  415. package/out/concepts/MsgTriggerLauncher__.js.map +1 -1
  416. package/out/concepts/Namespace__.js +102 -45
  417. package/out/concepts/Namespace__.js.map +1 -1
  418. package/out/concepts/NewComposite__.js +57 -25
  419. package/out/concepts/NewComposite__.js.map +1 -1
  420. package/out/concepts/NewList__.js +20 -8
  421. package/out/concepts/NewList__.js.map +1 -1
  422. package/out/concepts/NewMap__.js +20 -8
  423. package/out/concepts/NewMap__.js.map +1 -1
  424. package/out/concepts/NullLiteral__.js +3 -1
  425. package/out/concepts/NullLiteral__.js.map +1 -1
  426. package/out/concepts/NumericLiteral__.js +11 -4
  427. package/out/concepts/NumericLiteral__.js.map +1 -1
  428. package/out/concepts/OqlQueryComponent__.js +32 -5
  429. package/out/concepts/OqlQueryComponent__.js.map +1 -1
  430. package/out/concepts/OverriddenLogic__.js +52 -20
  431. package/out/concepts/OverriddenLogic__.js.map +1 -1
  432. package/out/concepts/Param__.js +12 -5
  433. package/out/concepts/Param__.js.map +1 -1
  434. package/out/concepts/Point__.js +3 -1
  435. package/out/concepts/Point__.js.map +1 -1
  436. package/out/concepts/ProcessComponent__.js +21 -9
  437. package/out/concepts/ProcessComponent__.js.map +1 -1
  438. package/out/concepts/ProcessElement__.js +73 -31
  439. package/out/concepts/ProcessElement__.js.map +1 -1
  440. package/out/concepts/ProcessOutcome__.js +3 -1
  441. package/out/concepts/ProcessOutcome__.js.map +1 -1
  442. package/out/concepts/ProcessOutcomes__.js +3 -1
  443. package/out/concepts/ProcessOutcomes__.js.map +1 -1
  444. package/out/concepts/Process__.js +48 -21
  445. package/out/concepts/Process__.js.map +1 -1
  446. package/out/concepts/QueryAggregateExpression__.js +11 -4
  447. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  448. package/out/concepts/QueryFieldExpression__.js +3 -1
  449. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  450. package/out/concepts/QueryFromExpression__.js +11 -4
  451. package/out/concepts/QueryFromExpression__.js.map +1 -1
  452. package/out/concepts/QueryGroupByExpression__.js +11 -4
  453. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  454. package/out/concepts/QueryJoinExpression__.js +12 -5
  455. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  456. package/out/concepts/QueryLimitExpression__.js +11 -4
  457. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  458. package/out/concepts/QueryOrderByExpression__.js +11 -4
  459. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  460. package/out/concepts/QuerySelectExpression__.js +12 -5
  461. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  462. package/out/concepts/Rect__.js +3 -1
  463. package/out/concepts/Rect__.js.map +1 -1
  464. package/out/concepts/Return__.js +11 -4
  465. package/out/concepts/Return__.js.map +1 -1
  466. package/out/concepts/Role__.js +3 -1
  467. package/out/concepts/Role__.js.map +1 -1
  468. package/out/concepts/SelectMembers__.js +12 -5
  469. package/out/concepts/SelectMembers__.js.map +1 -1
  470. package/out/concepts/Slot__.js +11 -4
  471. package/out/concepts/Slot__.js.map +1 -1
  472. package/out/concepts/SqlQueryComponent__.js +11 -4
  473. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  474. package/out/concepts/Start__.js +3 -1
  475. package/out/concepts/Start__.js.map +1 -1
  476. package/out/concepts/StringInterpolation__.js +12 -5
  477. package/out/concepts/StringInterpolation__.js.map +1 -1
  478. package/out/concepts/StringLiteral__.js +3 -1
  479. package/out/concepts/StringLiteral__.js.map +1 -1
  480. package/out/concepts/StructureProperty__.js +11 -4
  481. package/out/concepts/StructureProperty__.js.map +1 -1
  482. package/out/concepts/Structure__.js +21 -9
  483. package/out/concepts/Structure__.js.map +1 -1
  484. package/out/concepts/SwitchCase__.js +15 -8
  485. package/out/concepts/SwitchCase__.js.map +1 -1
  486. package/out/concepts/SwitchStatement__.js +11 -4
  487. package/out/concepts/SwitchStatement__.js.map +1 -1
  488. package/out/concepts/Theme__.js +3 -1
  489. package/out/concepts/Theme__.js.map +1 -1
  490. package/out/concepts/Transactional__.js +3 -1
  491. package/out/concepts/Transactional__.js.map +1 -1
  492. package/out/concepts/TriggerEvent__.js +12 -5
  493. package/out/concepts/TriggerEvent__.js.map +1 -1
  494. package/out/concepts/TriggerLauncher__.js +3 -1
  495. package/out/concepts/TriggerLauncher__.js.map +1 -1
  496. package/out/concepts/TypeAnnotation__.d.ts +2 -1
  497. package/out/concepts/TypeAnnotation__.js +48 -15
  498. package/out/concepts/TypeAnnotation__.js.map +1 -1
  499. package/out/concepts/TypeParam__.js +3 -1
  500. package/out/concepts/TypeParam__.js.map +1 -1
  501. package/out/concepts/UnaryExpression__.js +17 -6
  502. package/out/concepts/UnaryExpression__.js.map +1 -1
  503. package/out/concepts/Unparsed__.js +3 -1
  504. package/out/concepts/Unparsed__.js.map +1 -1
  505. package/out/concepts/UseComponent__.js +3 -1
  506. package/out/concepts/UseComponent__.js.map +1 -1
  507. package/out/concepts/ValidationRule__.js +11 -4
  508. package/out/concepts/ValidationRule__.js.map +1 -1
  509. package/out/concepts/Variable__.js +11 -4
  510. package/out/concepts/Variable__.js.map +1 -1
  511. package/out/concepts/ViewBlock__.js +3 -1
  512. package/out/concepts/ViewBlock__.js.map +1 -1
  513. package/out/concepts/ViewComponent__.js +59 -25
  514. package/out/concepts/ViewComponent__.js.map +1 -1
  515. package/out/concepts/ViewElement__.js +51 -24
  516. package/out/concepts/ViewElement__.js.map +1 -1
  517. package/out/concepts/View__.js +54 -22
  518. package/out/concepts/View__.js.map +1 -1
  519. package/out/concepts/WhileStatement__.js +20 -11
  520. package/out/concepts/WhileStatement__.js.map +1 -1
  521. package/out/concepts/basics/stdlib/nasl.util.js +2 -2
  522. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  523. package/out/generator/permission.js +32 -6
  524. package/out/generator/permission.js.map +1 -1
  525. package/out/sentry/index.js +2 -1
  526. package/out/sentry/index.js.map +1 -1
  527. package/out/server/translator.js +5 -2
  528. package/out/server/translator.js.map +1 -1
  529. package/out/service/storage/init.d.ts +1 -1
  530. package/out/service/storage/init.js +17 -5
  531. package/out/service/storage/init.js.map +1 -1
  532. package/out/utils/sortTsString.js +10 -4
  533. package/out/utils/sortTsString.js.map +1 -1
  534. package/package.json +1 -1
  535. package/src/common/BaseNode.ts +9 -4
  536. package/src/concepts/Abort__.ts +1 -0
  537. package/src/concepts/Anchor__.ts +20 -14
  538. package/src/concepts/AnonymousFunction__.ts +29 -12
  539. package/src/concepts/App__.ts +161 -76
  540. package/src/concepts/Argument__.ts +9 -3
  541. package/src/concepts/Assignee__.ts +21 -8
  542. package/src/concepts/AssignmentLine__.ts +1 -0
  543. package/src/concepts/Assignment__.ts +28 -14
  544. package/src/concepts/Attribute__.ts +9 -3
  545. package/src/concepts/AuthInterface__.ts +1 -0
  546. package/src/concepts/AuthLogicForCallInterface__.ts +10 -4
  547. package/src/concepts/AuthLogic__.ts +4 -0
  548. package/src/concepts/BackendVariable__.ts +9 -3
  549. package/src/concepts/Backend__.ts +10 -4
  550. package/src/concepts/BatchAssignment__.ts +33 -16
  551. package/src/concepts/BinaryExpression__.ts +15 -9
  552. package/src/concepts/BindAttribute__.ts +35 -18
  553. package/src/concepts/BindDirective__.ts +26 -4
  554. package/src/concepts/BindEvent__.ts +37 -16
  555. package/src/concepts/BindStyle__.ts +9 -3
  556. package/src/concepts/BooleanLiteral__.ts +1 -0
  557. package/src/concepts/CallAuthInterface__.ts +12 -4
  558. package/src/concepts/CallConnector__.ts +1 -0
  559. package/src/concepts/CallFunction__.ts +25 -20
  560. package/src/concepts/CallInterface__.ts +44 -28
  561. package/src/concepts/CallLogic__.ts +80 -59
  562. package/src/concepts/CallQueryComponent__.ts +17 -6
  563. package/src/concepts/Comment__.ts +2 -1
  564. package/src/concepts/CompletionProperty__.ts +9 -3
  565. package/src/concepts/ConfigGroup__.ts +10 -4
  566. package/src/concepts/ConfigPropertyValue__.ts +1 -0
  567. package/src/concepts/ConfigProperty__.ts +10 -4
  568. package/src/concepts/Configuration__.ts +10 -4
  569. package/src/concepts/Connection__.ts +11 -5
  570. package/src/concepts/ConnectorTrigger__.ts +1 -0
  571. package/src/concepts/Connector__.ts +46 -20
  572. package/src/concepts/Constant__.ts +9 -3
  573. package/src/concepts/DataSource__.ts +10 -4
  574. package/src/concepts/DatabaseTypeAnnotation__.ts +1 -0
  575. package/src/concepts/Destination__.ts +9 -4
  576. package/src/concepts/End__.ts +1 -0
  577. package/src/concepts/EntityIndex__.ts +1 -0
  578. package/src/concepts/EntityProperty__.ts +17 -6
  579. package/src/concepts/Entity__.ts +19 -8
  580. package/src/concepts/EnumItem__.ts +1 -0
  581. package/src/concepts/Enum__.ts +9 -3
  582. package/src/concepts/Event__.ts +10 -4
  583. package/src/concepts/ExternalDestination__.ts +9 -3
  584. package/src/concepts/ForEachStatement__.ts +45 -36
  585. package/src/concepts/FrontendLibrary__.ts +19 -8
  586. package/src/concepts/Frontend__.ts +45 -19
  587. package/src/concepts/Function__.ts +46 -19
  588. package/src/concepts/Identifier__.ts +1 -0
  589. package/src/concepts/IfStatement__.ts +30 -20
  590. package/src/concepts/Integration__.ts +18 -7
  591. package/src/concepts/InterfaceParam__.ts +9 -3
  592. package/src/concepts/Interface__.ts +31 -15
  593. package/src/concepts/JSBlock__.ts +1 -0
  594. package/src/concepts/JavaLogic__.ts +1 -0
  595. package/src/concepts/LogicItem__.ts +5 -4
  596. package/src/concepts/Logic__.ts +77 -59
  597. package/src/concepts/MatchCase__.ts +46 -31
  598. package/src/concepts/Match__.ts +24 -16
  599. package/src/concepts/MemberExpression__.ts +25 -19
  600. package/src/concepts/MicroApp__.ts +1 -0
  601. package/src/concepts/Module__.ts +10 -9
  602. package/src/concepts/MsgTriggerEvent__.ts +10 -4
  603. package/src/concepts/MsgTriggerLauncher__.ts +10 -4
  604. package/src/concepts/Namespace__.ts +100 -44
  605. package/src/concepts/NewComposite__.ts +60 -28
  606. package/src/concepts/NewList__.ts +20 -8
  607. package/src/concepts/NewMap__.ts +20 -8
  608. package/src/concepts/NullLiteral__.ts +1 -0
  609. package/src/concepts/NumericLiteral__.ts +9 -3
  610. package/src/concepts/OqlQueryComponent__.ts +32 -4
  611. package/src/concepts/OverriddenLogic__.ts +51 -20
  612. package/src/concepts/Param__.ts +10 -6
  613. package/src/concepts/Point__.ts +1 -0
  614. package/src/concepts/ProcessComponent__.ts +19 -8
  615. package/src/concepts/ProcessElement__.ts +71 -30
  616. package/src/concepts/ProcessOutcome__.ts +1 -0
  617. package/src/concepts/ProcessOutcomes__.ts +1 -0
  618. package/src/concepts/Process__.ts +46 -20
  619. package/src/concepts/QueryAggregateExpression__.ts +9 -3
  620. package/src/concepts/QueryFieldExpression__.ts +1 -0
  621. package/src/concepts/QueryFromExpression__.ts +9 -3
  622. package/src/concepts/QueryGroupByExpression__.ts +9 -3
  623. package/src/concepts/QueryJoinExpression__.ts +10 -4
  624. package/src/concepts/QueryLimitExpression__.ts +9 -3
  625. package/src/concepts/QueryOrderByExpression__.ts +9 -3
  626. package/src/concepts/QuerySelectExpression__.ts +10 -4
  627. package/src/concepts/Rect__.ts +1 -0
  628. package/src/concepts/Return__.ts +9 -3
  629. package/src/concepts/Role__.ts +1 -0
  630. package/src/concepts/SelectMembers__.ts +10 -4
  631. package/src/concepts/Slot__.ts +9 -3
  632. package/src/concepts/SqlQueryComponent__.ts +9 -3
  633. package/src/concepts/Start__.ts +1 -0
  634. package/src/concepts/StringInterpolation__.ts +11 -5
  635. package/src/concepts/StringLiteral__.ts +1 -0
  636. package/src/concepts/StructureProperty__.ts +9 -3
  637. package/src/concepts/Structure__.ts +19 -8
  638. package/src/concepts/SwitchCase__.ts +15 -9
  639. package/src/concepts/SwitchStatement__.ts +22 -16
  640. package/src/concepts/Theme__.ts +1 -0
  641. package/src/concepts/Transactional__.ts +1 -0
  642. package/src/concepts/TriggerEvent__.ts +10 -4
  643. package/src/concepts/TriggerLauncher__.ts +1 -0
  644. package/src/concepts/TypeAnnotation__.ts +55 -21
  645. package/src/concepts/TypeParam__.ts +2 -1
  646. package/src/concepts/UnaryExpression__.ts +16 -6
  647. package/src/concepts/Unparsed__.ts +2 -1
  648. package/src/concepts/UseComponent__.ts +1 -0
  649. package/src/concepts/ValidationRule__.ts +10 -4
  650. package/src/concepts/Variable__.ts +9 -3
  651. package/src/concepts/ViewBlock__.ts +1 -0
  652. package/src/concepts/ViewComponent__.ts +57 -24
  653. package/src/concepts/ViewElement__.ts +148 -110
  654. package/src/concepts/View__.ts +100 -56
  655. package/src/concepts/WhileStatement__.ts +27 -15
  656. package/src/concepts/basics/stdlib/nasl.util.ts +2 -2
  657. package/src/generator/permission.ts +33 -9
  658. package/src/sentry/index.ts +3 -1
  659. package/src/server/translator.ts +5 -2
  660. package/src/service/storage/init.ts +17 -5
  661. package/src/utils/sortTsString.ts +9 -4
  662. package/test/concepts/call-function/__snapshots__/toEmbeddedTS.spec.ts.snap +26 -0
  663. package/test/concepts/call-function/__snapshots__/toJS.spec.ts.snap +26 -0
  664. package/test/concepts/call-function/constant.ts +5 -0
  665. package/test/concepts/call-function/fixtures/from-string.json +100 -0
  666. package/test/concepts/call-function/fixtures/to-string-global-tz.json +99 -0
  667. package/test/concepts/call-function/fixtures/to-string-no-tz.json +89 -0
  668. package/test/concepts/call-function/fixtures/to-string-user-tz.json +101 -0
  669. package/test/concepts/call-function/fixtures/to-string-utc-tz.json +101 -0
  670. package/test/concepts/call-function/toEmbeddedTS.spec.ts +14 -0
  671. package/test/concepts/call-function/toJS.spec.ts +14 -0
  672. package/.nyc_output/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
  673. package/.nyc_output/processinfo/d58d92d8-c0d6-479b-9f82-1f4da8e73ff3.json +0 -1
  674. package/.nyc_output/processinfo/index.json +0 -1
@@ -25,6 +25,7 @@ export class QuerySelectExpression extends LogicItem {
25
25
  /**
26
26
  * 产品概念
27
27
  */
28
+ @property('concept')
28
29
  // @ts-ignore
29
30
  readonly concept!: 'QuerySelectExpression';
30
31
 
@@ -75,7 +76,7 @@ export class QuerySelectExpression extends LogicItem {
75
76
  const excludedSet = new Set(excludedList);
76
77
  return ((this.selectElements as QueryAggregateExpression[]) || [])
77
78
  .filter((item) => !excludedSet.has(item))
78
- .map((item) => item.name);
79
+ .map((item) => item?.name);
79
80
  }
80
81
  getQueryAggregateExpressionUniqueName(name = 'queryAggregateExpression1') {
81
82
  return utils.unique(name, this.getQueryAggregateExpressionExistingNames(), undefined, false);
@@ -486,11 +487,16 @@ export class QuerySelectExpression extends LogicItem {
486
487
  };
487
488
  if (parentKey) {
488
489
  params.parentKey = parentKey;
489
- if (Array.isArray((this as any)[parentKey])) {
490
- const index = (this as any)[parentKey].indexOf(logicItem);
490
+ // @ts-ignore
491
+ const t = this.__v_raw || this;
492
+ // @ts-ignore
493
+ const n = logicItem.__v_raw || logicItem;
494
+ if (Array.isArray((t as any)[parentKey])) {
495
+ // @ts-ignore
496
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
491
497
  ~index && (this as any)[parentKey].splice(index, 1);
492
498
  params.index = index;
493
- } else if ((this as any)[parentKey] === logicItem) {
499
+ } else if ((t as any)[parentKey] === n) {
494
500
  params.index = 0;
495
501
  (this as any)[parentKey] = undefined;
496
502
  }
@@ -22,6 +22,7 @@ export class Rect extends BaseNode {
22
22
  /**
23
23
  * 产品概念
24
24
  */
25
+ @property('concept')
25
26
  // @ts-ignore
26
27
  readonly concept!: 'Rect';
27
28
 
@@ -46,6 +46,7 @@ export class Return extends BaseNode {
46
46
  /**
47
47
  * 产品概念
48
48
  */
49
+ @property('concept')
49
50
  // @ts-ignore
50
51
  readonly concept!: 'Return';
51
52
 
@@ -223,11 +224,16 @@ export class Return extends BaseNode {
223
224
  };
224
225
  if (parentKey) {
225
226
  params.parentKey = parentKey;
226
- if (Array.isArray((this as any)[parentKey])) {
227
- const index = (this as any)[parentKey].indexOf(typeAnnotation);
227
+ // @ts-ignore
228
+ const t = this.__v_raw || this;
229
+ // @ts-ignore
230
+ const n = typeAnnotation.__v_raw || typeAnnotation;
231
+ if (Array.isArray((t as any)[parentKey])) {
232
+ // @ts-ignore
233
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
228
234
  ~index && (this as any)[parentKey].splice(index, 1);
229
235
  params.index = index;
230
- } else if ((this as any)[parentKey] === typeAnnotation) {
236
+ } else if ((t as any)[parentKey] === n) {
231
237
  params.index = 0;
232
238
  (this as any)[parentKey] = undefined;
233
239
  }
@@ -25,6 +25,7 @@ export class Role extends BaseNode {
25
25
  /**
26
26
  * 产品概念
27
27
  */
28
+ @property('concept')
28
29
  // @ts-ignore
29
30
  readonly concept!: 'Role';
30
31
 
@@ -26,6 +26,7 @@ export class SelectMembers extends BaseNode {
26
26
  /**
27
27
  * 产品概念
28
28
  */
29
+ @property('concept')
29
30
  // @ts-ignore
30
31
  readonly concept!: 'SelectMembers';
31
32
 
@@ -113,7 +114,7 @@ export class SelectMembers extends BaseNode {
113
114
 
114
115
  getLogicItemExistingNames(excludedList: Array<LogicItem> = []) {
115
116
  const excludedSet = new Set(excludedList);
116
- return ((this.members as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
117
+ return ((this.members as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
117
118
  }
118
119
  getLogicItemUniqueName(name = 'logicItem1') {
119
120
  return utils.unique(name, this.getLogicItemExistingNames(), undefined, false);
@@ -325,11 +326,16 @@ export class SelectMembers extends BaseNode {
325
326
  };
326
327
  if (parentKey) {
327
328
  params.parentKey = parentKey;
328
- if (Array.isArray((this as any)[parentKey])) {
329
- const index = (this as any)[parentKey].indexOf(logicItem);
329
+ // @ts-ignore
330
+ const t = this.__v_raw || this;
331
+ // @ts-ignore
332
+ const n = logicItem.__v_raw || logicItem;
333
+ if (Array.isArray((t as any)[parentKey])) {
334
+ // @ts-ignore
335
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
330
336
  ~index && (this as any)[parentKey].splice(index, 1);
331
337
  params.index = index;
332
- } else if ((this as any)[parentKey] === logicItem) {
338
+ } else if ((t as any)[parentKey] === n) {
333
339
  params.index = 0;
334
340
  (this as any)[parentKey] = undefined;
335
341
  }
@@ -26,6 +26,7 @@ export class Slot extends BaseNode {
26
26
  /**
27
27
  * 产品概念
28
28
  */
29
+ @property('concept')
29
30
  // @ts-ignore
30
31
  readonly concept!: 'Slot';
31
32
 
@@ -151,11 +152,16 @@ export class Slot extends BaseNode {
151
152
  };
152
153
  if (parentKey) {
153
154
  params.parentKey = parentKey;
154
- if (Array.isArray((this as any)[parentKey])) {
155
- const index = (this as any)[parentKey].indexOf(param);
155
+ // @ts-ignore
156
+ const t = this.__v_raw || this;
157
+ // @ts-ignore
158
+ const n = param.__v_raw || param;
159
+ if (Array.isArray((t as any)[parentKey])) {
160
+ // @ts-ignore
161
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
156
162
  ~index && (this as any)[parentKey].splice(index, 1);
157
163
  params.index = index;
158
- } else if ((this as any)[parentKey] === param) {
164
+ } else if ((t as any)[parentKey] === n) {
159
165
  params.index = 0;
160
166
  (this as any)[parentKey] = undefined;
161
167
  }
@@ -31,6 +31,7 @@ export class SqlQueryComponent extends LogicItem {
31
31
  /**
32
32
  * 产品概念
33
33
  */
34
+ @property('concept')
34
35
  // @ts-ignore
35
36
  readonly concept!: 'SqlQueryComponent';
36
37
 
@@ -129,11 +130,16 @@ export class SqlQueryComponent extends LogicItem {
129
130
  };
130
131
  if (parentKey) {
131
132
  params.parentKey = parentKey;
132
- if (Array.isArray((this as any)[parentKey])) {
133
- const index = (this as any)[parentKey].indexOf(typeAnnotation);
133
+ // @ts-ignore
134
+ const t = this.__v_raw || this;
135
+ // @ts-ignore
136
+ const n = typeAnnotation.__v_raw || typeAnnotation;
137
+ if (Array.isArray((t as any)[parentKey])) {
138
+ // @ts-ignore
139
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
134
140
  ~index && (this as any)[parentKey].splice(index, 1);
135
141
  params.index = index;
136
- } else if ((this as any)[parentKey] === typeAnnotation) {
142
+ } else if ((t as any)[parentKey] === n) {
137
143
  params.index = 0;
138
144
  (this as any)[parentKey] = undefined;
139
145
  }
@@ -24,6 +24,7 @@ export class Start extends LogicItem {
24
24
  /**
25
25
  * 产品概念
26
26
  */
27
+ @property('concept')
27
28
  // @ts-ignore
28
29
  readonly concept!: 'Start';
29
30
 
@@ -26,6 +26,7 @@ export class StringInterpolation extends LogicItem {
26
26
  /**
27
27
  * 产品概念
28
28
  */
29
+ @property('concept')
29
30
  // @ts-ignore
30
31
  readonly concept!: 'StringInterpolation';
31
32
 
@@ -62,7 +63,7 @@ export class StringInterpolation extends LogicItem {
62
63
 
63
64
  getItemExistingNames(excludedList: Array<LogicItem> = []) {
64
65
  const excludedSet = new Set(excludedList);
65
- return ((this.expressions as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
66
+ return ((this.expressions as LogicItem[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
66
67
  }
67
68
  getItemUniqueName(name = 'logicItem1') {
68
69
  return utils.unique(name, this.getItemExistingNames(), undefined, false);
@@ -249,11 +250,16 @@ export class StringInterpolation extends LogicItem {
249
250
  };
250
251
  if (parentKey) {
251
252
  params.parentKey = parentKey;
252
- if (Array.isArray((this as any)[parentKey])) {
253
- const index = (this as any)[parentKey].indexOf(logicItem);
253
+ // @ts-ignore
254
+ const t = this.__v_raw || this;
255
+ // @ts-ignore
256
+ const n = logicItem.__v_raw || logicItem;
257
+ if (Array.isArray((t as any)[parentKey])) {
258
+ // @ts-ignore
259
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
254
260
  ~index && (this as any)[parentKey].splice(index, 1);
255
261
  params.index = index;
256
- } else if ((this as any)[parentKey] === logicItem) {
262
+ } else if ((t as any)[parentKey] === n) {
257
263
  params.index = 0;
258
264
  (this as any)[parentKey] = undefined;
259
265
  }
@@ -335,7 +341,7 @@ export class StringInterpolation extends LogicItem {
335
341
  return code;
336
342
  }
337
343
 
338
- //= ===============================================================================
344
+ //================================================================================
339
345
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
340
346
  // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
341
347
  //================================================================================
@@ -25,6 +25,7 @@ export class StringLiteral extends LogicItem {
25
25
  /**
26
26
  * 产品概念
27
27
  */
28
+ @property('concept')
28
29
  // @ts-ignore
29
30
  readonly concept!: 'StringLiteral';
30
31
 
@@ -29,6 +29,7 @@ export class StructureProperty extends BaseNode {
29
29
  /**
30
30
  * 产品概念
31
31
  */
32
+ @property('concept')
32
33
  // @ts-ignore
33
34
  readonly concept!: 'StructureProperty';
34
35
 
@@ -233,11 +234,16 @@ export class StructureProperty extends BaseNode {
233
234
  };
234
235
  if (parentKey) {
235
236
  params.parentKey = parentKey;
236
- if (Array.isArray((this as any)[parentKey])) {
237
- const index = (this as any)[parentKey].indexOf(typeAnnotation);
237
+ // @ts-ignore
238
+ const t = this.__v_raw || this;
239
+ // @ts-ignore
240
+ const n = typeAnnotation.__v_raw || typeAnnotation;
241
+ if (Array.isArray((t as any)[parentKey])) {
242
+ // @ts-ignore
243
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
238
244
  ~index && (this as any)[parentKey].splice(index, 1);
239
245
  params.index = index;
240
- } else if ((this as any)[parentKey] === typeAnnotation) {
246
+ } else if ((t as any)[parentKey] === n) {
241
247
  params.index = 0;
242
248
  (this as any)[parentKey] = undefined;
243
249
  }
@@ -28,6 +28,7 @@ export class Structure extends BaseNode {
28
28
  /**
29
29
  * 产品概念
30
30
  */
31
+ @property('concept')
31
32
  // @ts-ignore
32
33
  readonly concept!: 'Structure';
33
34
 
@@ -128,7 +129,7 @@ export class Structure extends BaseNode {
128
129
 
129
130
  getTypeParamExistingNames(excludedList: Array<TypeParam> = []) {
130
131
  const excludedSet = new Set(excludedList);
131
- return ((this.typeParams as TypeParam[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
132
+ return ((this.typeParams as TypeParam[]) || []).filter((item) => !excludedSet.has(item)).map((item) => item?.name);
132
133
  }
133
134
  getTypeParamUniqueName(name = 'typeParam1') {
134
135
  return utils.unique(name, this.getTypeParamExistingNames(), undefined, false);
@@ -283,7 +284,7 @@ export class Structure extends BaseNode {
283
284
  const excludedSet = new Set(excludedList);
284
285
  return ((this.properties as StructureProperty[]) || [])
285
286
  .filter((item) => !excludedSet.has(item))
286
- .map((item) => item.name);
287
+ .map((item) => item?.name);
287
288
  }
288
289
  getPropertyUniqueName(name = 'property1') {
289
290
  return utils.unique(name, this.getPropertyExistingNames(), undefined, false);
@@ -470,11 +471,16 @@ export class Structure extends BaseNode {
470
471
  };
471
472
  if (parentKey) {
472
473
  params.parentKey = parentKey;
473
- if (Array.isArray((this as any)[parentKey])) {
474
- const index = (this as any)[parentKey].indexOf(typeParam);
474
+ // @ts-ignore
475
+ const t = this.__v_raw || this;
476
+ // @ts-ignore
477
+ const n = typeParam.__v_raw || typeParam;
478
+ if (Array.isArray((t as any)[parentKey])) {
479
+ // @ts-ignore
480
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
475
481
  ~index && (this as any)[parentKey].splice(index, 1);
476
482
  params.index = index;
477
- } else if ((this as any)[parentKey] === typeParam) {
483
+ } else if ((t as any)[parentKey] === n) {
478
484
  params.index = 0;
479
485
  (this as any)[parentKey] = undefined;
480
486
  }
@@ -518,11 +524,16 @@ export class Structure extends BaseNode {
518
524
  };
519
525
  if (parentKey) {
520
526
  params.parentKey = parentKey;
521
- if (Array.isArray((this as any)[parentKey])) {
522
- const index = (this as any)[parentKey].indexOf(property);
527
+ // @ts-ignore
528
+ const t = this.__v_raw || this;
529
+ // @ts-ignore
530
+ const n = property.__v_raw || property;
531
+ if (Array.isArray((t as any)[parentKey])) {
532
+ // @ts-ignore
533
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
523
534
  ~index && (this as any)[parentKey].splice(index, 1);
524
535
  params.index = index;
525
- } else if ((this as any)[parentKey] === property) {
536
+ } else if ((t as any)[parentKey] === n) {
526
537
  params.index = 0;
527
538
  (this as any)[parentKey] = undefined;
528
539
  }
@@ -1,4 +1,3 @@
1
- import { v4 as uuidv4 } from 'uuid';
2
1
  import { TranslatorState, shiftState, withSourceMap, indent, createCompilerState } from '../translator';
3
2
  //================================================================================
4
3
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
@@ -8,6 +7,7 @@ import { EventPayload, Params } from '../common/EventEmitter';
8
7
  import { concept, excludedInJSON, property, className } from '../decorators';
9
8
 
10
9
  import * as utils from '../utils';
10
+ import { v4 as uuidv4 } from 'uuid';
11
11
  import BaseNode from '../common/BaseNode';
12
12
  import LogicItem from './LogicItem__';
13
13
 
@@ -24,6 +24,7 @@ export class SwitchCase extends LogicItem {
24
24
  /**
25
25
  * 产品概念
26
26
  */
27
+ @property('concept')
27
28
  // @ts-ignore
28
29
  readonly concept!: 'SwitchCase';
29
30
 
@@ -44,7 +45,7 @@ export class SwitchCase extends LogicItem {
44
45
  * @param source 需要合并的部分参数
45
46
  */
46
47
  constructor(source?: Partial<SwitchCase>) {
47
- source = { ...SwitchCase.getDefaultOptions(), ...source};
48
+ source = Object.assign({}, SwitchCase.getDefaultOptions(), source);
48
49
  super(source);
49
50
  super.subConstructor(source);
50
51
  }
@@ -185,7 +186,7 @@ export class SwitchCase extends LogicItem {
185
186
  if (typeof options === 'string') {
186
187
  test = this.test;
187
188
  if (!test) {
188
- throw new Error(`找不到逻辑项 ${ options}`);
189
+ throw new Error('找不到逻辑项 ' + options);
189
190
  }
190
191
  } else {
191
192
  test = options;
@@ -200,12 +201,12 @@ export class SwitchCase extends LogicItem {
200
201
  removeItemInConsequent(logicItem: LogicItem): void;
201
202
 
202
203
  removeItemInConsequent(options: LogicItem) {
203
- const logicItem: LogicItem = options;
204
+ let logicItem: LogicItem = options;
204
205
  return logicItem.delete();
205
206
  }
206
207
 
207
208
  __removeLogicItem(logicItem: LogicItem) {
208
- const {parentKey} = logicItem;
209
+ const parentKey = logicItem.parentKey;
209
210
  const params: Params = {
210
211
  parentNode: this,
211
212
  parentKey,
@@ -215,11 +216,16 @@ export class SwitchCase extends LogicItem {
215
216
  };
216
217
  if (parentKey) {
217
218
  params.parentKey = parentKey;
218
- if (Array.isArray((this as any)[parentKey])) {
219
- const index = (this as any)[parentKey].indexOf(logicItem);
219
+ // @ts-ignore
220
+ const t = this.__v_raw || this;
221
+ // @ts-ignore
222
+ const n = logicItem.__v_raw || logicItem;
223
+ if (Array.isArray((t as any)[parentKey])) {
224
+ // @ts-ignore
225
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
220
226
  ~index && (this as any)[parentKey].splice(index, 1);
221
227
  params.index = index;
222
- } else if ((this as any)[parentKey] === logicItem) {
228
+ } else if ((t as any)[parentKey] === n) {
223
229
  params.index = 0;
224
230
  (this as any)[parentKey] = undefined;
225
231
  }
@@ -350,7 +356,7 @@ export class SwitchCase extends LogicItem {
350
356
  return code;
351
357
  }
352
358
 
353
- //= ===============================================================================
359
+ //================================================================================
354
360
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
355
361
  // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
356
362
  //================================================================================
@@ -26,6 +26,7 @@ export class SwitchStatement extends LogicItem {
26
26
  /**
27
27
  * 产品概念
28
28
  */
29
+ @property('concept')
29
30
  // @ts-ignore
30
31
  readonly concept!: 'SwitchStatement';
31
32
 
@@ -170,11 +171,16 @@ export class SwitchStatement extends LogicItem {
170
171
  };
171
172
  if (parentKey) {
172
173
  params.parentKey = parentKey;
173
- if (Array.isArray((this as any)[parentKey])) {
174
- const index = (this as any)[parentKey].indexOf(logicItem);
174
+ // @ts-ignore
175
+ const t = this.__v_raw || this;
176
+ // @ts-ignore
177
+ const n = logicItem.__v_raw || logicItem;
178
+ if (Array.isArray((t as any)[parentKey])) {
179
+ // @ts-ignore
180
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
175
181
  ~index && (this as any)[parentKey].splice(index, 1);
176
182
  params.index = index;
177
- } else if ((this as any)[parentKey] === logicItem) {
183
+ } else if ((t as any)[parentKey] === n) {
178
184
  params.index = 0;
179
185
  (this as any)[parentKey] = undefined;
180
186
  }
@@ -237,21 +243,21 @@ export class SwitchStatement extends LogicItem {
237
243
 
238
244
  @withSourceMap()
239
245
  toNaturalTS(state = createCompilerState()): string {
240
- let code = '';
241
- // 最后一项是else
242
- this.cases.forEach((item, index) => {
243
- // 如果是最后一项
244
- if (index === this.cases.length - 1) {
245
- code += item.toNaturalTS(shiftState(state, code, { inline: true }), true);
246
- } else {
247
- code += item.toNaturalTS(shiftState(state, code, { inline: true }), false, index === 0);
248
- }
249
- });
250
- code += '\n';
251
- return code;
246
+ let code = '';
247
+ // 最后一项是else
248
+ this.cases.forEach((item, index) => {
249
+ // 如果是最后一项
250
+ if (index === this.cases.length - 1) {
251
+ code += item.toNaturalTS(shiftState(state, code, { inline: true }), true);
252
+ } else {
253
+ code += item.toNaturalTS(shiftState(state, code, { inline: true }), false, index === 0);
254
+ }
255
+ });
256
+ code += '\n';
257
+ return code;
252
258
  }
253
259
 
254
- //= ===============================================================================
260
+ //================================================================================
255
261
  // 从这里开始到结尾注释之间的代码由 NASL Workbench 自动生成,请不手动修改!
256
262
  // ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
257
263
  //================================================================================
@@ -22,6 +22,7 @@ export class Theme extends BaseNode {
22
22
  /**
23
23
  * 产品概念
24
24
  */
25
+ @property('concept')
25
26
  // @ts-ignore
26
27
  readonly concept!: 'Theme';
27
28
 
@@ -30,6 +30,7 @@ export class Transactional extends BaseNode {
30
30
  /**
31
31
  * 产品概念
32
32
  */
33
+ @property('concept')
33
34
  // @ts-ignore
34
35
  readonly concept!: 'Transactional';
35
36
 
@@ -23,6 +23,7 @@ export class TriggerEvent extends BaseNode {
23
23
  /**
24
24
  * 产品概念
25
25
  */
26
+ @property('concept')
26
27
  // @ts-ignore
27
28
  readonly concept!: 'TriggerEvent' | 'MsgTriggerEvent';
28
29
 
@@ -92,7 +93,7 @@ export class TriggerEvent extends BaseNode {
92
93
  const excludedSet = new Set(excludedList);
93
94
  return ((this.callBackLogic as TypeAnnotation[]) || [])
94
95
  .filter((item) => !excludedSet.has(item))
95
- .map((item) => item.name);
96
+ .map((item) => item?.name);
96
97
  }
97
98
  getTypeAnnotationUniqueName(name = 'typeAnnotation1') {
98
99
  return utils.unique(name, this.getTypeAnnotationExistingNames(), undefined, false);
@@ -279,11 +280,16 @@ export class TriggerEvent extends BaseNode {
279
280
  };
280
281
  if (parentKey) {
281
282
  params.parentKey = parentKey;
282
- if (Array.isArray((this as any)[parentKey])) {
283
- const index = (this as any)[parentKey].indexOf(typeAnnotation);
283
+ // @ts-ignore
284
+ const t = this.__v_raw || this;
285
+ // @ts-ignore
286
+ const n = typeAnnotation.__v_raw || typeAnnotation;
287
+ if (Array.isArray((t as any)[parentKey])) {
288
+ // @ts-ignore
289
+ const index = (t as any)[parentKey].findIndex((el) => (el.__v_raw || el) === n);
284
290
  ~index && (this as any)[parentKey].splice(index, 1);
285
291
  params.index = index;
286
- } else if ((this as any)[parentKey] === typeAnnotation) {
292
+ } else if ((t as any)[parentKey] === n) {
287
293
  params.index = 0;
288
294
  (this as any)[parentKey] = undefined;
289
295
  }
@@ -29,6 +29,7 @@ export class TriggerLauncher extends BaseNode {
29
29
  /**
30
30
  * 产品概念
31
31
  */
32
+ @property('concept')
32
33
  // @ts-ignore
33
34
  readonly concept!: 'TriggerLauncher' | 'MsgTriggerLauncher';
34
35