@lcap/nasl 2.22.2-beta.3 → 2.22.2-beta.4

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 (669) hide show
  1. package/out/automate/engine/index.d.ts +4 -0
  2. package/out/automate/engine/index.js +443 -0
  3. package/out/automate/engine/index.js.map +1 -0
  4. package/out/automate/engine/operators.d.ts +24 -0
  5. package/out/automate/engine/operators.js +252 -0
  6. package/out/automate/engine/operators.js.map +1 -0
  7. package/out/automate/engine/uniqueName.d.ts +12 -0
  8. package/out/automate/engine/uniqueName.js +112 -0
  9. package/out/automate/engine/uniqueName.js.map +1 -0
  10. package/out/automate/engine/utils.d.ts +25 -0
  11. package/out/automate/engine/utils.js +428 -0
  12. package/out/automate/engine/utils.js.map +1 -0
  13. package/out/automate/engine/viewCache.d.ts +19 -0
  14. package/out/automate/engine/viewCache.js +45 -0
  15. package/out/automate/engine/viewCache.js.map +1 -0
  16. package/out/automate/template/myProcess.d.ts +10 -0
  17. package/out/automate/template/myProcess.js +11498 -0
  18. package/out/automate/template/myProcess.js.map +1 -0
  19. package/out/bak/translator.d.ts +1 -0
  20. package/out/bak/translator.js +130 -0
  21. package/out/bak/translator.js.map +1 -0
  22. package/out/common/BaseNode.d.ts +306 -0
  23. package/out/common/BaseNode.js +1222 -0
  24. package/out/common/BaseNode.js.map +1 -0
  25. package/out/common/Command.d.ts +20 -0
  26. package/out/common/Command.js +66 -0
  27. package/out/common/Command.js.map +1 -0
  28. package/out/common/ComponentAPI.d.ts +110 -0
  29. package/out/common/ComponentAPI.js +3 -0
  30. package/out/common/ComponentAPI.js.map +1 -0
  31. package/out/common/EventEmitter.d.ts +59 -0
  32. package/out/common/EventEmitter.js +69 -0
  33. package/out/common/EventEmitter.js.map +1 -0
  34. package/out/common/Messager.d.ts +91 -0
  35. package/out/common/Messager.js +208 -0
  36. package/out/common/Messager.js.map +1 -0
  37. package/out/common/index.d.ts +3 -0
  38. package/out/common/index.js +20 -0
  39. package/out/common/index.js.map +1 -0
  40. package/out/concepts/Abort__.d.ts +26 -0
  41. package/out/concepts/Abort__.js +79 -0
  42. package/out/concepts/Abort__.js.map +1 -0
  43. package/out/concepts/Anchor__.d.ts +45 -0
  44. package/out/concepts/Anchor__.js +182 -0
  45. package/out/concepts/Anchor__.js.map +1 -0
  46. package/out/concepts/AnonymousFunction__.d.ts +173 -0
  47. package/out/concepts/AnonymousFunction__.js +484 -0
  48. package/out/concepts/AnonymousFunction__.js.map +1 -0
  49. package/out/concepts/App__.d.ts +1166 -0
  50. package/out/concepts/App__.js +1885 -0
  51. package/out/concepts/App__.js.map +1 -0
  52. package/out/concepts/Argument__.d.ts +66 -0
  53. package/out/concepts/Argument__.js +267 -0
  54. package/out/concepts/Argument__.js.map +1 -0
  55. package/out/concepts/Assignee__.d.ts +289 -0
  56. package/out/concepts/Assignee__.js +426 -0
  57. package/out/concepts/Assignee__.js.map +1 -0
  58. package/out/concepts/AssignmentLine__.d.ts +42 -0
  59. package/out/concepts/AssignmentLine__.js +111 -0
  60. package/out/concepts/AssignmentLine__.js.map +1 -0
  61. package/out/concepts/Assignment__.d.ts +74 -0
  62. package/out/concepts/Assignment__.js +287 -0
  63. package/out/concepts/Assignment__.js.map +1 -0
  64. package/out/concepts/Attribute__.d.ts +98 -0
  65. package/out/concepts/Attribute__.js +206 -0
  66. package/out/concepts/Attribute__.js.map +1 -0
  67. package/out/concepts/BatchAssignment__.d.ts +252 -0
  68. package/out/concepts/BatchAssignment__.js +806 -0
  69. package/out/concepts/BatchAssignment__.js.map +1 -0
  70. package/out/concepts/BinaryExpression__.d.ts +71 -0
  71. package/out/concepts/BinaryExpression__.js +347 -0
  72. package/out/concepts/BinaryExpression__.js.map +1 -0
  73. package/out/concepts/BindAttribute__.d.ts +319 -0
  74. package/out/concepts/BindAttribute__.js +896 -0
  75. package/out/concepts/BindAttribute__.js.map +1 -0
  76. package/out/concepts/BindDirective__.d.ts +162 -0
  77. package/out/concepts/BindDirective__.js +538 -0
  78. package/out/concepts/BindDirective__.js.map +1 -0
  79. package/out/concepts/BindEvent__.d.ts +240 -0
  80. package/out/concepts/BindEvent__.js +764 -0
  81. package/out/concepts/BindEvent__.js.map +1 -0
  82. package/out/concepts/BindStyle__.d.ts +140 -0
  83. package/out/concepts/BindStyle__.js +433 -0
  84. package/out/concepts/BindStyle__.js.map +1 -0
  85. package/out/concepts/BooleanLiteral__.d.ts +35 -0
  86. package/out/concepts/BooleanLiteral__.js +100 -0
  87. package/out/concepts/BooleanLiteral__.js.map +1 -0
  88. package/out/concepts/CallFunction__.d.ts +159 -0
  89. package/out/concepts/CallFunction__.js +503 -0
  90. package/out/concepts/CallFunction__.js.map +1 -0
  91. package/out/concepts/CallInterface__.d.ts +116 -0
  92. package/out/concepts/CallInterface__.js +570 -0
  93. package/out/concepts/CallInterface__.js.map +1 -0
  94. package/out/concepts/CallLogic__.d.ts +187 -0
  95. package/out/concepts/CallLogic__.js +1007 -0
  96. package/out/concepts/CallLogic__.js.map +1 -0
  97. package/out/concepts/CallQueryComponent__.d.ts +433 -0
  98. package/out/concepts/CallQueryComponent__.js +1267 -0
  99. package/out/concepts/CallQueryComponent__.js.map +1 -0
  100. package/out/concepts/Comment__.d.ts +32 -0
  101. package/out/concepts/Comment__.js +96 -0
  102. package/out/concepts/Comment__.js.map +1 -0
  103. package/out/concepts/CompletionProperty__.d.ts +105 -0
  104. package/out/concepts/CompletionProperty__.js +262 -0
  105. package/out/concepts/CompletionProperty__.js.map +1 -0
  106. package/out/concepts/ConfigGroup__.d.ts +124 -0
  107. package/out/concepts/ConfigGroup__.js +237 -0
  108. package/out/concepts/ConfigGroup__.js.map +1 -0
  109. package/out/concepts/ConfigPropertyValue__.d.ts +45 -0
  110. package/out/concepts/ConfigPropertyValue__.js +107 -0
  111. package/out/concepts/ConfigPropertyValue__.js.map +1 -0
  112. package/out/concepts/ConfigProperty__.d.ts +154 -0
  113. package/out/concepts/ConfigProperty__.js +324 -0
  114. package/out/concepts/ConfigProperty__.js.map +1 -0
  115. package/out/concepts/Configuration__.d.ts +124 -0
  116. package/out/concepts/Configuration__.js +228 -0
  117. package/out/concepts/Configuration__.js.map +1 -0
  118. package/out/concepts/Constant__.d.ts +106 -0
  119. package/out/concepts/Constant__.js +249 -0
  120. package/out/concepts/Constant__.js.map +1 -0
  121. package/out/concepts/DataElement__.d.ts +47 -0
  122. package/out/concepts/DataElement__.js +119 -0
  123. package/out/concepts/DataElement__.js.map +1 -0
  124. package/out/concepts/DataSource__.d.ts +165 -0
  125. package/out/concepts/DataSource__.js +442 -0
  126. package/out/concepts/DataSource__.js.map +1 -0
  127. package/out/concepts/DatabaseTypeAnnotation__.d.ts +32 -0
  128. package/out/concepts/DatabaseTypeAnnotation__.js +79 -0
  129. package/out/concepts/DatabaseTypeAnnotation__.js.map +1 -0
  130. package/out/concepts/Destination__.d.ts +157 -0
  131. package/out/concepts/Destination__.js +740 -0
  132. package/out/concepts/Destination__.js.map +1 -0
  133. package/out/concepts/End__.d.ts +25 -0
  134. package/out/concepts/End__.js +86 -0
  135. package/out/concepts/End__.js.map +1 -0
  136. package/out/concepts/EntityIndex__.d.ts +96 -0
  137. package/out/concepts/EntityIndex__.js +221 -0
  138. package/out/concepts/EntityIndex__.js.map +1 -0
  139. package/out/concepts/EntityProperty__.d.ts +274 -0
  140. package/out/concepts/EntityProperty__.js +824 -0
  141. package/out/concepts/EntityProperty__.js.map +1 -0
  142. package/out/concepts/Entity__.d.ts +339 -0
  143. package/out/concepts/Entity__.js +711 -0
  144. package/out/concepts/Entity__.js.map +1 -0
  145. package/out/concepts/EnumItem__.d.ts +64 -0
  146. package/out/concepts/EnumItem__.js +146 -0
  147. package/out/concepts/EnumItem__.js.map +1 -0
  148. package/out/concepts/Enum__.d.ts +138 -0
  149. package/out/concepts/Enum__.js +322 -0
  150. package/out/concepts/Enum__.js.map +1 -0
  151. package/out/concepts/Event__.d.ts +144 -0
  152. package/out/concepts/Event__.js +249 -0
  153. package/out/concepts/Event__.js.map +1 -0
  154. package/out/concepts/ExternalDestination__.d.ts +76 -0
  155. package/out/concepts/ExternalDestination__.js +286 -0
  156. package/out/concepts/ExternalDestination__.js.map +1 -0
  157. package/out/concepts/ForEachStatement__.d.ts +189 -0
  158. package/out/concepts/ForEachStatement__.js +446 -0
  159. package/out/concepts/ForEachStatement__.js.map +1 -0
  160. package/out/concepts/FrontendLibrary__.d.ts +214 -0
  161. package/out/concepts/FrontendLibrary__.js +353 -0
  162. package/out/concepts/FrontendLibrary__.js.map +1 -0
  163. package/out/concepts/Frontend__.d.ts +374 -0
  164. package/out/concepts/Frontend__.js +690 -0
  165. package/out/concepts/Frontend__.js.map +1 -0
  166. package/out/concepts/Function__.d.ts +417 -0
  167. package/out/concepts/Function__.js +717 -0
  168. package/out/concepts/Function__.js.map +1 -0
  169. package/out/concepts/Identifier__.d.ts +52 -0
  170. package/out/concepts/Identifier__.js +296 -0
  171. package/out/concepts/Identifier__.js.map +1 -0
  172. package/out/concepts/IfStatement__.d.ts +158 -0
  173. package/out/concepts/IfStatement__.js +305 -0
  174. package/out/concepts/IfStatement__.js.map +1 -0
  175. package/out/concepts/Integration__.d.ts +54 -0
  176. package/out/concepts/Integration__.js +143 -0
  177. package/out/concepts/Integration__.js.map +1 -0
  178. package/out/concepts/InterfaceParam__.d.ts +111 -0
  179. package/out/concepts/InterfaceParam__.js +266 -0
  180. package/out/concepts/InterfaceParam__.js.map +1 -0
  181. package/out/concepts/Interface__.d.ts +284 -0
  182. package/out/concepts/Interface__.js +749 -0
  183. package/out/concepts/Interface__.js.map +1 -0
  184. package/out/concepts/JSBlock__.d.ts +34 -0
  185. package/out/concepts/JSBlock__.js +106 -0
  186. package/out/concepts/JSBlock__.js.map +1 -0
  187. package/out/concepts/JavaLogic__.d.ts +43 -0
  188. package/out/concepts/JavaLogic__.js +124 -0
  189. package/out/concepts/JavaLogic__.js.map +1 -0
  190. package/out/concepts/LogicItem__.d.ts +126 -0
  191. package/out/concepts/LogicItem__.js +253 -0
  192. package/out/concepts/LogicItem__.js.map +1 -0
  193. package/out/concepts/Logic__.d.ts +633 -0
  194. package/out/concepts/Logic__.js +1568 -0
  195. package/out/concepts/Logic__.js.map +1 -0
  196. package/out/concepts/MatchCase__.d.ts +258 -0
  197. package/out/concepts/MatchCase__.js +591 -0
  198. package/out/concepts/MatchCase__.js.map +1 -0
  199. package/out/concepts/Match__.d.ts +124 -0
  200. package/out/concepts/Match__.js +628 -0
  201. package/out/concepts/Match__.js.map +1 -0
  202. package/out/concepts/MemberExpression__.d.ts +73 -0
  203. package/out/concepts/MemberExpression__.js +319 -0
  204. package/out/concepts/MemberExpression__.js.map +1 -0
  205. package/out/concepts/MetadataType__.d.ts +245 -0
  206. package/out/concepts/MetadataType__.js +473 -0
  207. package/out/concepts/MetadataType__.js.map +1 -0
  208. package/out/concepts/MicroApp__.d.ts +52 -0
  209. package/out/concepts/MicroApp__.js +119 -0
  210. package/out/concepts/MicroApp__.js.map +1 -0
  211. package/out/concepts/Module__.d.ts +978 -0
  212. package/out/concepts/Module__.js +1386 -0
  213. package/out/concepts/Module__.js.map +1 -0
  214. package/out/concepts/Namespace__.d.ts +1069 -0
  215. package/out/concepts/Namespace__.js +1380 -0
  216. package/out/concepts/Namespace__.js.map +1 -0
  217. package/out/concepts/NewComposite__.d.ts +346 -0
  218. package/out/concepts/NewComposite__.js +1086 -0
  219. package/out/concepts/NewComposite__.js.map +1 -0
  220. package/out/concepts/NewList__.d.ts +133 -0
  221. package/out/concepts/NewList__.js +385 -0
  222. package/out/concepts/NewList__.js.map +1 -0
  223. package/out/concepts/NewMap__.d.ts +224 -0
  224. package/out/concepts/NewMap__.js +530 -0
  225. package/out/concepts/NewMap__.js.map +1 -0
  226. package/out/concepts/New__.d.ts +21 -0
  227. package/out/concepts/New__.js +68 -0
  228. package/out/concepts/New__.js.map +1 -0
  229. package/out/concepts/NullLiteral__.d.ts +27 -0
  230. package/out/concepts/NullLiteral__.js +81 -0
  231. package/out/concepts/NullLiteral__.js.map +1 -0
  232. package/out/concepts/NumericLiteral__.d.ts +56 -0
  233. package/out/concepts/NumericLiteral__.js +174 -0
  234. package/out/concepts/NumericLiteral__.js.map +1 -0
  235. package/out/concepts/OqlQueryComponent__.d.ts +73 -0
  236. package/out/concepts/OqlQueryComponent__.js +327 -0
  237. package/out/concepts/OqlQueryComponent__.js.map +1 -0
  238. package/out/concepts/Param__.d.ts +161 -0
  239. package/out/concepts/Param__.js +431 -0
  240. package/out/concepts/Param__.js.map +1 -0
  241. package/out/concepts/Point__.d.ts +32 -0
  242. package/out/concepts/Point__.js +79 -0
  243. package/out/concepts/Point__.js.map +1 -0
  244. package/out/concepts/ProcessComponent__.d.ts +220 -0
  245. package/out/concepts/ProcessComponent__.js +339 -0
  246. package/out/concepts/ProcessComponent__.js.map +1 -0
  247. package/out/concepts/ProcessElement__.d.ts +647 -0
  248. package/out/concepts/ProcessElement__.js +1220 -0
  249. package/out/concepts/ProcessElement__.js.map +1 -0
  250. package/out/concepts/ProcessOutcome__.d.ts +32 -0
  251. package/out/concepts/ProcessOutcome__.js +90 -0
  252. package/out/concepts/ProcessOutcome__.js.map +1 -0
  253. package/out/concepts/ProcessOutcomes__.d.ts +32 -0
  254. package/out/concepts/ProcessOutcomes__.js +89 -0
  255. package/out/concepts/ProcessOutcomes__.js.map +1 -0
  256. package/out/concepts/Process__.d.ts +614 -0
  257. package/out/concepts/Process__.js +1031 -0
  258. package/out/concepts/Process__.js.map +1 -0
  259. package/out/concepts/QueryAggregateExpression__.d.ts +52 -0
  260. package/out/concepts/QueryAggregateExpression__.js +149 -0
  261. package/out/concepts/QueryAggregateExpression__.js.map +1 -0
  262. package/out/concepts/QueryFieldExpression__.d.ts +54 -0
  263. package/out/concepts/QueryFieldExpression__.js +160 -0
  264. package/out/concepts/QueryFieldExpression__.js.map +1 -0
  265. package/out/concepts/QueryFromExpression__.d.ts +97 -0
  266. package/out/concepts/QueryFromExpression__.js +197 -0
  267. package/out/concepts/QueryFromExpression__.js.map +1 -0
  268. package/out/concepts/QueryGroupByExpression__.d.ts +47 -0
  269. package/out/concepts/QueryGroupByExpression__.js +142 -0
  270. package/out/concepts/QueryGroupByExpression__.js.map +1 -0
  271. package/out/concepts/QueryJoinExpression__.d.ts +184 -0
  272. package/out/concepts/QueryJoinExpression__.js +318 -0
  273. package/out/concepts/QueryJoinExpression__.js.map +1 -0
  274. package/out/concepts/QueryLimitExpression__.d.ts +58 -0
  275. package/out/concepts/QueryLimitExpression__.js +160 -0
  276. package/out/concepts/QueryLimitExpression__.js.map +1 -0
  277. package/out/concepts/QueryOrderByExpression__.d.ts +69 -0
  278. package/out/concepts/QueryOrderByExpression__.js +173 -0
  279. package/out/concepts/QueryOrderByExpression__.js.map +1 -0
  280. package/out/concepts/QuerySelectExpression__.d.ts +204 -0
  281. package/out/concepts/QuerySelectExpression__.js +295 -0
  282. package/out/concepts/QuerySelectExpression__.js.map +1 -0
  283. package/out/concepts/Rect__.d.ts +40 -0
  284. package/out/concepts/Rect__.js +95 -0
  285. package/out/concepts/Rect__.js.map +1 -0
  286. package/out/concepts/Return__.d.ts +129 -0
  287. package/out/concepts/Return__.js +345 -0
  288. package/out/concepts/Return__.js.map +1 -0
  289. package/out/concepts/Role__.d.ts +63 -0
  290. package/out/concepts/Role__.js +170 -0
  291. package/out/concepts/Role__.js.map +1 -0
  292. package/out/concepts/SelectMembers__.d.ts +143 -0
  293. package/out/concepts/SelectMembers__.js +293 -0
  294. package/out/concepts/SelectMembers__.js.map +1 -0
  295. package/out/concepts/Slot__.d.ts +75 -0
  296. package/out/concepts/Slot__.js +165 -0
  297. package/out/concepts/Slot__.js.map +1 -0
  298. package/out/concepts/SqlQueryComponent__.d.ts +71 -0
  299. package/out/concepts/SqlQueryComponent__.js +271 -0
  300. package/out/concepts/SqlQueryComponent__.js.map +1 -0
  301. package/out/concepts/Start__.d.ts +25 -0
  302. package/out/concepts/Start__.js +73 -0
  303. package/out/concepts/Start__.js.map +1 -0
  304. package/out/concepts/StringInterpolation__.d.ts +117 -0
  305. package/out/concepts/StringInterpolation__.js +252 -0
  306. package/out/concepts/StringInterpolation__.js.map +1 -0
  307. package/out/concepts/StringLiteral__.d.ts +38 -0
  308. package/out/concepts/StringLiteral__.js +134 -0
  309. package/out/concepts/StringLiteral__.js.map +1 -0
  310. package/out/concepts/StructureProperty__.d.ts +131 -0
  311. package/out/concepts/StructureProperty__.js +303 -0
  312. package/out/concepts/StructureProperty__.js.map +1 -0
  313. package/out/concepts/Structure__.d.ts +252 -0
  314. package/out/concepts/Structure__.js +447 -0
  315. package/out/concepts/Structure__.js.map +1 -0
  316. package/out/concepts/SwitchCase__.d.ts +94 -0
  317. package/out/concepts/SwitchCase__.js +232 -0
  318. package/out/concepts/SwitchCase__.js.map +1 -0
  319. package/out/concepts/SwitchStatement__.d.ts +84 -0
  320. package/out/concepts/SwitchStatement__.js +177 -0
  321. package/out/concepts/SwitchStatement__.js.map +1 -0
  322. package/out/concepts/Theme__.d.ts +38 -0
  323. package/out/concepts/Theme__.js +88 -0
  324. package/out/concepts/Theme__.js.map +1 -0
  325. package/out/concepts/Transactional__.d.ts +83 -0
  326. package/out/concepts/Transactional__.js +162 -0
  327. package/out/concepts/Transactional__.js.map +1 -0
  328. package/out/concepts/TypeAnnotation__.d.ts +290 -0
  329. package/out/concepts/TypeAnnotation__.js +885 -0
  330. package/out/concepts/TypeAnnotation__.js.map +1 -0
  331. package/out/concepts/TypeParam__.d.ts +25 -0
  332. package/out/concepts/TypeParam__.js +73 -0
  333. package/out/concepts/TypeParam__.js.map +1 -0
  334. package/out/concepts/UnaryExpression__.d.ts +49 -0
  335. package/out/concepts/UnaryExpression__.js +176 -0
  336. package/out/concepts/UnaryExpression__.js.map +1 -0
  337. package/out/concepts/Unparsed__.d.ts +32 -0
  338. package/out/concepts/Unparsed__.js +94 -0
  339. package/out/concepts/Unparsed__.js.map +1 -0
  340. package/out/concepts/UseComponent__.d.ts +32 -0
  341. package/out/concepts/UseComponent__.js +79 -0
  342. package/out/concepts/UseComponent__.js.map +1 -0
  343. package/out/concepts/ValidationRule__.d.ts +142 -0
  344. package/out/concepts/ValidationRule__.js +473 -0
  345. package/out/concepts/ValidationRule__.js.map +1 -0
  346. package/out/concepts/Variable__.d.ts +139 -0
  347. package/out/concepts/Variable__.js +386 -0
  348. package/out/concepts/Variable__.js.map +1 -0
  349. package/out/concepts/ViewBlock__.d.ts +36 -0
  350. package/out/concepts/ViewBlock__.js +87 -0
  351. package/out/concepts/ViewBlock__.js.map +1 -0
  352. package/out/concepts/ViewComponent__.d.ts +566 -0
  353. package/out/concepts/ViewComponent__.js +762 -0
  354. package/out/concepts/ViewComponent__.js.map +1 -0
  355. package/out/concepts/ViewElement__.d.ts +597 -0
  356. package/out/concepts/ViewElement__.js +1777 -0
  357. package/out/concepts/ViewElement__.js.map +1 -0
  358. package/out/concepts/View__.d.ts +714 -0
  359. package/out/concepts/View__.js +1733 -0
  360. package/out/concepts/View__.js.map +1 -0
  361. package/out/concepts/WhileStatement__.d.ts +97 -0
  362. package/out/concepts/WhileStatement__.js +211 -0
  363. package/out/concepts/WhileStatement__.js.map +1 -0
  364. package/out/concepts/basics/stdlib/index.d.ts +4 -0
  365. package/out/concepts/basics/stdlib/index.js +29 -0
  366. package/out/concepts/basics/stdlib/index.js.map +1 -0
  367. package/out/concepts/basics/stdlib/nasl.auth.d.ts +7 -0
  368. package/out/concepts/basics/stdlib/nasl.auth.js +140 -0
  369. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -0
  370. package/out/concepts/basics/stdlib/nasl.browser.d.ts +3 -0
  371. package/out/concepts/basics/stdlib/nasl.browser.js +133 -0
  372. package/out/concepts/basics/stdlib/nasl.browser.js.map +1 -0
  373. package/out/concepts/basics/stdlib/nasl.collection.d.ts +7 -0
  374. package/out/concepts/basics/stdlib/nasl.collection.js +52 -0
  375. package/out/concepts/basics/stdlib/nasl.collection.js.map +1 -0
  376. package/out/concepts/basics/stdlib/nasl.configuration.d.ts +3 -0
  377. package/out/concepts/basics/stdlib/nasl.configuration.js +33 -0
  378. package/out/concepts/basics/stdlib/nasl.configuration.js.map +1 -0
  379. package/out/concepts/basics/stdlib/nasl.core.d.ts +5 -0
  380. package/out/concepts/basics/stdlib/nasl.core.js +49 -0
  381. package/out/concepts/basics/stdlib/nasl.core.js.map +1 -0
  382. package/out/concepts/basics/stdlib/nasl.event.d.ts +3 -0
  383. package/out/concepts/basics/stdlib/nasl.event.js +25 -0
  384. package/out/concepts/basics/stdlib/nasl.event.js.map +1 -0
  385. package/out/concepts/basics/stdlib/nasl.interface.d.ts +7 -0
  386. package/out/concepts/basics/stdlib/nasl.interface.js +43 -0
  387. package/out/concepts/basics/stdlib/nasl.interface.js.map +1 -0
  388. package/out/concepts/basics/stdlib/nasl.io.d.ts +3 -0
  389. package/out/concepts/basics/stdlib/nasl.io.js +52 -0
  390. package/out/concepts/basics/stdlib/nasl.io.js.map +1 -0
  391. package/out/concepts/basics/stdlib/nasl.logging.d.ts +3 -0
  392. package/out/concepts/basics/stdlib/nasl.logging.js +56 -0
  393. package/out/concepts/basics/stdlib/nasl.logging.js.map +1 -0
  394. package/out/concepts/basics/stdlib/nasl.process.d.ts +7 -0
  395. package/out/concepts/basics/stdlib/nasl.process.js +638 -0
  396. package/out/concepts/basics/stdlib/nasl.process.js.map +1 -0
  397. package/out/concepts/basics/stdlib/nasl.ui.d.ts +7 -0
  398. package/out/concepts/basics/stdlib/nasl.ui.js +1043 -0
  399. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -0
  400. package/out/concepts/basics/stdlib/nasl.util.d.ts +3 -0
  401. package/out/concepts/basics/stdlib/nasl.util.js +1798 -0
  402. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -0
  403. package/out/concepts/basics/stdlib/nasl.validation.d.ts +3 -0
  404. package/out/concepts/basics/stdlib/nasl.validation.js +565 -0
  405. package/out/concepts/basics/stdlib/nasl.validation.js.map +1 -0
  406. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.d.ts +5 -0
  407. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js +26 -0
  408. package/out/concepts/basics/stdlib/reference2TypeAnnotationList.js.map +1 -0
  409. package/out/concepts/basics/types/coreTypeList.d.ts +2 -0
  410. package/out/concepts/basics/types/coreTypeList.js +15 -0
  411. package/out/concepts/basics/types/coreTypeList.js.map +1 -0
  412. package/out/concepts/basics/types/index.d.ts +15 -0
  413. package/out/concepts/basics/types/index.js +32 -0
  414. package/out/concepts/basics/types/index.js.map +1 -0
  415. package/out/concepts/index.d.ts +5 -0
  416. package/out/concepts/index.js +24 -0
  417. package/out/concepts/index.js.map +1 -0
  418. package/out/concepts/index__.d.ts +108 -0
  419. package/out/concepts/index__.js +125 -0
  420. package/out/concepts/index__.js.map +1 -0
  421. package/out/config.d.ts +44 -0
  422. package/out/config.js +73 -0
  423. package/out/config.js.map +1 -0
  424. package/out/decorators/index.d.ts +56 -0
  425. package/out/decorators/index.js +159 -0
  426. package/out/decorators/index.js.map +1 -0
  427. package/out/enums/KEYWORDS.d.ts +6 -0
  428. package/out/enums/KEYWORDS.js +1243 -0
  429. package/out/enums/KEYWORDS.js.map +1 -0
  430. package/out/enums/LEVEL_NAME_MAP.d.ts +26 -0
  431. package/out/enums/LEVEL_NAME_MAP.js +30 -0
  432. package/out/enums/LEVEL_NAME_MAP.js.map +1 -0
  433. package/out/eventBus.d.ts +3 -0
  434. package/out/eventBus.js +7 -0
  435. package/out/eventBus.js.map +1 -0
  436. package/out/generator/compileComponent.d.ts +11 -0
  437. package/out/generator/compileComponent.js +12 -0
  438. package/out/generator/compileComponent.js.map +1 -0
  439. package/out/generator/genBundleFiles.d.ts +33 -0
  440. package/out/generator/genBundleFiles.js +501 -0
  441. package/out/generator/genBundleFiles.js.map +1 -0
  442. package/out/generator/genHash.d.ts +7 -0
  443. package/out/generator/genHash.js +39 -0
  444. package/out/generator/genHash.js.map +1 -0
  445. package/out/generator/genMetaData.d.ts +28 -0
  446. package/out/generator/genMetaData.js +288 -0
  447. package/out/generator/genMetaData.js.map +1 -0
  448. package/out/generator/genReleaseBody.d.ts +60 -0
  449. package/out/generator/genReleaseBody.js +493 -0
  450. package/out/generator/genReleaseBody.js.map +1 -0
  451. package/out/generator/icestark.d.ts +2 -0
  452. package/out/generator/icestark.js +48 -0
  453. package/out/generator/icestark.js.map +1 -0
  454. package/out/generator/index.d.ts +7 -0
  455. package/out/generator/index.js +24 -0
  456. package/out/generator/index.js.map +1 -0
  457. package/out/generator/microApp.d.ts +2 -0
  458. package/out/generator/microApp.js +35 -0
  459. package/out/generator/microApp.js.map +1 -0
  460. package/out/generator/permission.d.ts +10 -0
  461. package/out/generator/permission.js +269 -0
  462. package/out/generator/permission.js.map +1 -0
  463. package/out/generator/qiankun.d.ts +2 -0
  464. package/out/generator/qiankun.js +52 -0
  465. package/out/generator/qiankun.js.map +1 -0
  466. package/out/generator/styleReplacer.d.ts +3 -0
  467. package/out/generator/styleReplacer.js +71 -0
  468. package/out/generator/styleReplacer.js.map +1 -0
  469. package/out/index.d.ts +13 -0
  470. package/out/index.js +64 -0
  471. package/out/index.js.map +1 -0
  472. package/out/manager/diagnostic.d.ts +35 -0
  473. package/out/manager/diagnostic.js +63 -0
  474. package/out/manager/diagnostic.js.map +1 -0
  475. package/out/manager/stepRecorder.d.ts +20 -0
  476. package/out/manager/stepRecorder.js +110 -0
  477. package/out/manager/stepRecorder.js.map +1 -0
  478. package/out/sentry/index.d.ts +29 -0
  479. package/out/sentry/index.js +111 -0
  480. package/out/sentry/index.js.map +1 -0
  481. package/out/server/createUiTs.d.ts +16 -0
  482. package/out/server/createUiTs.js +248 -0
  483. package/out/server/createUiTs.js.map +1 -0
  484. package/out/server/entity2LogicNamespace.d.ts +10 -0
  485. package/out/server/entity2LogicNamespace.js +380 -0
  486. package/out/server/entity2LogicNamespace.js.map +1 -0
  487. package/out/server/event.d.ts +30 -0
  488. package/out/server/event.js +151 -0
  489. package/out/server/event.js.map +1 -0
  490. package/out/server/extendBaseNode.d.ts +1 -0
  491. package/out/server/extendBaseNode.js +475 -0
  492. package/out/server/extendBaseNode.js.map +1 -0
  493. package/out/server/formatTsUtils.d.ts +36 -0
  494. package/out/server/formatTsUtils.js +788 -0
  495. package/out/server/formatTsUtils.js.map +1 -0
  496. package/out/server/getExtensionModules.d.ts +3 -0
  497. package/out/server/getExtensionModules.js +20 -0
  498. package/out/server/getExtensionModules.js.map +1 -0
  499. package/out/server/getFunctions.d.ts +3 -0
  500. package/out/server/getFunctions.js +20 -0
  501. package/out/server/getFunctions.js.map +1 -0
  502. package/out/server/getInterfaces.d.ts +2 -0
  503. package/out/server/getInterfaces.js +48 -0
  504. package/out/server/getInterfaces.js.map +1 -0
  505. package/out/server/getLogging.d.ts +1 -0
  506. package/out/server/getLogging.js +9 -0
  507. package/out/server/getLogging.js.map +1 -0
  508. package/out/server/getLogics.d.ts +4 -0
  509. package/out/server/getLogics.js +352 -0
  510. package/out/server/getLogics.js.map +1 -0
  511. package/out/server/getMemberIdentifier.d.ts +15 -0
  512. package/out/server/getMemberIdentifier.js +290 -0
  513. package/out/server/getMemberIdentifier.js.map +1 -0
  514. package/out/server/getProcessComponents.d.ts +2 -0
  515. package/out/server/getProcessComponents.js +13 -0
  516. package/out/server/getProcessComponents.js.map +1 -0
  517. package/out/server/getProcesses.d.ts +33 -0
  518. package/out/server/getProcesses.js +599 -0
  519. package/out/server/getProcesses.js.map +1 -0
  520. package/out/server/getScope.d.ts +13 -0
  521. package/out/server/getScope.js +61 -0
  522. package/out/server/getScope.js.map +1 -0
  523. package/out/server/getValidates.d.ts +3 -0
  524. package/out/server/getValidates.js +14 -0
  525. package/out/server/getValidates.js.map +1 -0
  526. package/out/server/index.d.ts +5 -0
  527. package/out/server/index.js +38 -0
  528. package/out/server/index.js.map +1 -0
  529. package/out/server/naslServer.d.ts +363 -0
  530. package/out/server/naslServer.js +4382 -0
  531. package/out/server/naslServer.js.map +1 -0
  532. package/out/server/naslStdlibMap.d.ts +2 -0
  533. package/out/server/naslStdlibMap.js +50 -0
  534. package/out/server/naslStdlibMap.js.map +1 -0
  535. package/out/server/process2LogicNamespace.d.ts +26 -0
  536. package/out/server/process2LogicNamespace.js +109 -0
  537. package/out/server/process2LogicNamespace.js.map +1 -0
  538. package/out/server/translator.d.ts +26 -0
  539. package/out/server/translator.js +787 -0
  540. package/out/server/translator.js.map +1 -0
  541. package/out/service/creator/add.configs.d.ts +1 -0
  542. package/out/service/creator/add.configs.js +74 -0
  543. package/out/service/creator/add.configs.js.map +1 -0
  544. package/out/service/creator/errHandles.d.ts +18 -0
  545. package/out/service/creator/errHandles.js +75 -0
  546. package/out/service/creator/errHandles.js.map +1 -0
  547. package/out/service/creator/index.d.ts +1 -0
  548. package/out/service/creator/index.js +74 -0
  549. package/out/service/creator/index.js.map +1 -0
  550. package/out/service/datasource/api.d.ts +12 -0
  551. package/out/service/datasource/api.js +14 -0
  552. package/out/service/datasource/api.js.map +1 -0
  553. package/out/service/datasource/index.d.ts +2 -0
  554. package/out/service/datasource/index.js +10 -0
  555. package/out/service/datasource/index.js.map +1 -0
  556. package/out/service/defaultErrorMessage.json +98 -0
  557. package/out/service/logic/api.d.ts +9 -0
  558. package/out/service/logic/api.js +11 -0
  559. package/out/service/logic/api.js.map +1 -0
  560. package/out/service/logic/index.d.ts +2 -0
  561. package/out/service/logic/index.js +10 -0
  562. package/out/service/logic/index.js.map +1 -0
  563. package/out/service/storage/api.d.ts +45 -0
  564. package/out/service/storage/api.js +36 -0
  565. package/out/service/storage/api.js.map +1 -0
  566. package/out/service/storage/index.d.ts +2 -0
  567. package/out/service/storage/index.js +10 -0
  568. package/out/service/storage/index.js.map +1 -0
  569. package/out/service/storage/init.d.ts +65 -0
  570. package/out/service/storage/init.js +797 -0
  571. package/out/service/storage/init.js.map +1 -0
  572. package/out/service/storage/jsoner.d.ts +36 -0
  573. package/out/service/storage/jsoner.js +131 -0
  574. package/out/service/storage/jsoner.js.map +1 -0
  575. package/out/service/storage/map.d.ts +4 -0
  576. package/out/service/storage/map.js +54 -0
  577. package/out/service/storage/map.js.map +1 -0
  578. package/out/service/storage/service.d.ts +22 -0
  579. package/out/service/storage/service.js +70 -0
  580. package/out/service/storage/service.js.map +1 -0
  581. package/out/service/storage/storagePoint.d.ts +17 -0
  582. package/out/service/storage/storagePoint.js +76 -0
  583. package/out/service/storage/storagePoint.js.map +1 -0
  584. package/out/templator/genCallComponentLogic.d.ts +17 -0
  585. package/out/templator/genCallComponentLogic.js +30 -0
  586. package/out/templator/genCallComponentLogic.js.map +1 -0
  587. package/out/templator/genCreateBlock.d.ts +10 -0
  588. package/out/templator/genCreateBlock.js +338 -0
  589. package/out/templator/genCreateBlock.js.map +1 -0
  590. package/out/templator/genCurdEditMultipleKeyBlock.d.ts +8 -0
  591. package/out/templator/genCurdEditMultipleKeyBlock.js +516 -0
  592. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -0
  593. package/out/templator/genCurdMultipleKeyBlock.d.ts +34 -0
  594. package/out/templator/genCurdMultipleKeyBlock.js +709 -0
  595. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -0
  596. package/out/templator/genEditTableBlock.d.ts +51 -0
  597. package/out/templator/genEditTableBlock.js +299 -0
  598. package/out/templator/genEditTableBlock.js.map +1 -0
  599. package/out/templator/genEnumSelectBlock.d.ts +10 -0
  600. package/out/templator/genEnumSelectBlock.js +26 -0
  601. package/out/templator/genEnumSelectBlock.js.map +1 -0
  602. package/out/templator/genGetBlock.d.ts +6 -0
  603. package/out/templator/genGetBlock.js +138 -0
  604. package/out/templator/genGetBlock.js.map +1 -0
  605. package/out/templator/genGridViewBlock.d.ts +55 -0
  606. package/out/templator/genGridViewBlock.js +350 -0
  607. package/out/templator/genGridViewBlock.js.map +1 -0
  608. package/out/templator/genListViewBlock.d.ts +19 -0
  609. package/out/templator/genListViewBlock.js +143 -0
  610. package/out/templator/genListViewBlock.js.map +1 -0
  611. package/out/templator/genQueryComponent.d.ts +34 -0
  612. package/out/templator/genQueryComponent.js +342 -0
  613. package/out/templator/genQueryComponent.js.map +1 -0
  614. package/out/templator/genSelectBlock.d.ts +45 -0
  615. package/out/templator/genSelectBlock.js +406 -0
  616. package/out/templator/genSelectBlock.js.map +1 -0
  617. package/out/templator/genTableBlock.d.ts +53 -0
  618. package/out/templator/genTableBlock.js +280 -0
  619. package/out/templator/genTableBlock.js.map +1 -0
  620. package/out/templator/genUpdateBlock.d.ts +6 -0
  621. package/out/templator/genUpdateBlock.js +380 -0
  622. package/out/templator/genUpdateBlock.js.map +1 -0
  623. package/out/templator/index.d.ts +18 -0
  624. package/out/templator/index.js +34 -0
  625. package/out/templator/index.js.map +1 -0
  626. package/out/templator/utils.d.ts +676 -0
  627. package/out/templator/utils.js +469 -0
  628. package/out/templator/utils.js.map +1 -0
  629. package/out/translator/constant.d.ts +6 -0
  630. package/out/translator/constant.js +10 -0
  631. package/out/translator/constant.js.map +1 -0
  632. package/out/translator/index.d.ts +3 -0
  633. package/out/translator/index.js +20 -0
  634. package/out/translator/index.js.map +1 -0
  635. package/out/translator/types.d.ts +32 -0
  636. package/out/translator/types.js +3 -0
  637. package/out/translator/types.js.map +1 -0
  638. package/out/translator/utils.d.ts +25 -0
  639. package/out/translator/utils.js +120 -0
  640. package/out/translator/utils.js.map +1 -0
  641. package/out/utils/index.d.ts +42 -0
  642. package/out/utils/index.js +213 -0
  643. package/out/utils/index.js.map +1 -0
  644. package/out/utils/logger.d.ts +7 -0
  645. package/out/utils/logger.js +23 -0
  646. package/out/utils/logger.js.map +1 -0
  647. package/out/utils/sortTsString.d.ts +1 -0
  648. package/out/utils/sortTsString.js +36 -0
  649. package/out/utils/sortTsString.js.map +1 -0
  650. package/out/utils/string.d.ts +51 -0
  651. package/out/utils/string.js +110 -0
  652. package/out/utils/string.js.map +1 -0
  653. package/out/utils/time.d.ts +1 -0
  654. package/out/utils/time.js +6 -0
  655. package/out/utils/time.js.map +1 -0
  656. package/out/utils/traverse.d.ts +36 -0
  657. package/out/utils/traverse.js +145 -0
  658. package/out/utils/traverse.js.map +1 -0
  659. package/out/utils/types.d.ts +1 -0
  660. package/out/utils/types.js +3 -0
  661. package/out/utils/types.js.map +1 -0
  662. package/out/utils/window.d.ts +7 -0
  663. package/out/utils/window.js +14 -0
  664. package/out/utils/window.js.map +1 -0
  665. package/package.json +1 -1
  666. package/src/concepts/BindEvent__.ts +5 -6
  667. package/src/concepts/Module__.ts +2 -2
  668. package/src/concepts/View__.ts +2 -2
  669. package/src/server/naslServer.ts +4 -4
@@ -0,0 +1,73 @@
1
+ import { TranslatorState } from '../translator';
2
+ import { TypeAnnotation } from '..';
3
+ import { ElementToVueOptions } from './ViewElement__';
4
+ import { Params } from '../common/EventEmitter';
5
+ import LogicItem from './LogicItem__';
6
+ /**
7
+ * 成员表达式
8
+ */
9
+ export declare class MemberExpression extends LogicItem {
10
+ /** 类名 */
11
+ static readonly ConceptName = "MemberExpression";
12
+ /**
13
+ * 产品概念
14
+ */
15
+ readonly concept: 'MemberExpression';
16
+ /**
17
+ * 逻辑项
18
+ */
19
+ object: LogicItem;
20
+ /**
21
+ * 逻辑项
22
+ */
23
+ property: LogicItem;
24
+ /**
25
+ * @param source 需要合并的部分参数
26
+ */
27
+ constructor(source?: Partial<MemberExpression>);
28
+ static from(source: any, parentNode?: any, parentKey?: string): MemberExpression;
29
+ /**
30
+ * 删除逻辑项
31
+ * @param name 逻辑项名称
32
+ */
33
+ removeObject(name: string): void;
34
+ /**
35
+ * 删除逻辑项
36
+ * @param object 已有的逻辑项实例
37
+ */
38
+ removeObject(object: LogicItem): void;
39
+ /**
40
+ * 删除逻辑项
41
+ * @param name 逻辑项名称
42
+ */
43
+ removeProperty(name: string): void;
44
+ /**
45
+ * 删除逻辑项
46
+ * @param property 已有的逻辑项实例
47
+ */
48
+ removeProperty(property: LogicItem): void;
49
+ __removeLogicItem(logicItem: LogicItem): Params;
50
+ typeAnnotation: TypeAnnotation;
51
+ toVue(options?: ElementToVueOptions): string;
52
+ toUI(): string;
53
+ toJS(): string;
54
+ toBrief(): string;
55
+ setValue(newValue: string): void;
56
+ /**
57
+ * 设置数据结构属性名称
58
+ */
59
+ setName(name: string): void;
60
+ isEnum(): boolean;
61
+ getValue(): string;
62
+ get completeName(): string;
63
+ get rootName(): string;
64
+ /**
65
+ * 翻译
66
+ * @param state
67
+ * @returns
68
+ */
69
+ toEmbeddedTS(state?: TranslatorState): string;
70
+ get lastObject(): any;
71
+ firstMemberExpressionNode(): any;
72
+ }
73
+ export default MemberExpression;
@@ -0,0 +1,319 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ var MemberExpression_1;
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.MemberExpression = void 0;
14
+ const translator_1 = require("../translator");
15
+ const Identifier_RE = /^[a-zA-Z_][a-zA-Z0-9_]*$/;
16
+ const decorators_1 = require("../decorators");
17
+ const LogicItem__1 = __importDefault(require("./LogicItem__"));
18
+ /**
19
+ * 成员表达式
20
+ */
21
+ let MemberExpression = MemberExpression_1 =
22
+ // @ts-ignore
23
+ class MemberExpression extends LogicItem__1.default {
24
+ /** 类名 */
25
+ static ConceptName = 'MemberExpression';
26
+ /**
27
+ * 产品概念
28
+ */
29
+ // @ts-ignore
30
+ concept;
31
+ /**
32
+ * 逻辑项
33
+ */
34
+ // @ts-ignore
35
+ object;
36
+ /**
37
+ * 逻辑项
38
+ */
39
+ // @ts-ignore
40
+ property;
41
+ /**
42
+ * @param source 需要合并的部分参数
43
+ */
44
+ constructor(source) {
45
+ source = Object.assign({}, MemberExpression_1.getDefaultOptions(), source);
46
+ super(source);
47
+ super.subConstructor(source);
48
+ }
49
+ static from(source, parentNode, parentKey) {
50
+ return super.from(source, parentNode, parentKey);
51
+ }
52
+ removeObject(options) {
53
+ let object;
54
+ if (typeof options === 'string') {
55
+ object = this.object;
56
+ if (!object) {
57
+ throw new Error('找不到逻辑项 ' + options);
58
+ }
59
+ }
60
+ else {
61
+ object = options;
62
+ }
63
+ return object.delete();
64
+ }
65
+ removeProperty(options) {
66
+ let property;
67
+ if (typeof options === 'string') {
68
+ property = this.property;
69
+ if (!property) {
70
+ throw new Error('找不到逻辑项 ' + options);
71
+ }
72
+ }
73
+ else {
74
+ property = options;
75
+ }
76
+ return property.delete();
77
+ }
78
+ __removeLogicItem(logicItem) {
79
+ const parentKey = logicItem.parentKey;
80
+ const params = {
81
+ parentNode: this,
82
+ parentKey,
83
+ index: -1,
84
+ object: null,
85
+ oldObject: logicItem,
86
+ };
87
+ if (parentKey) {
88
+ params.parentKey = parentKey;
89
+ if (Array.isArray(this[parentKey])) {
90
+ const index = this[parentKey].indexOf(logicItem);
91
+ ~index && this[parentKey].splice(index, 1);
92
+ params.index = index;
93
+ }
94
+ else if (this[parentKey] === logicItem) {
95
+ params.index = 0;
96
+ this[parentKey] = undefined;
97
+ }
98
+ }
99
+ return params;
100
+ }
101
+ //================================================================================
102
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
103
+ // 自动生成的代码已结束。下面可以手动编写。
104
+ //================================================================================
105
+ // 选中的数据类型,这个用作暂存
106
+ typeAnnotation = undefined;
107
+ toVue(options) {
108
+ // 如果是枚举取值
109
+ if (this.object?.concept === 'Identifier' && this.object?.isEnum() && this.property?.concept === 'Identifier') {
110
+ return `"${this.property?.name}"`;
111
+ }
112
+ else if (this.object?.__TypeAnnotation?.sortedTypeKey?.startsWith('nasl.collection.Map') && this.property?.name === 'length') {
113
+ return `Object.keys(${this.object?.toJS()}).length`;
114
+ }
115
+ const object = String(this.object?.toVue(options)); // undefined 也让正常展示
116
+ const property = String(this.property?.toVue(options));
117
+ const bindAttr = this.getAncestor('BindAttribute');
118
+ if (bindAttr && (bindAttr.sync || bindAttr.model))
119
+ return Identifier_RE.test(property) ? `${object}.${property}` : `${object}['${property}']`;
120
+ if (Identifier_RE.test(property))
121
+ return options?.finalCode === false ? `${object}.${property}` : `(${object} || {}).${property}`;
122
+ else
123
+ return options?.finalCode === false ? `${object}['${property}']` : `(${object} || {})['${property}']`;
124
+ }
125
+ toUI() {
126
+ // 如果是枚举取值
127
+ if (this.object?.concept === 'Identifier' && this.object?.isEnum() && this.property?.concept === 'Identifier') {
128
+ return `${this.object?.name}.${this.property?.name}`;
129
+ }
130
+ else if (this.object?.__TypeAnnotation?.sortedTypeKey?.startsWith('nasl.collection.Map') && this.property?.name === 'length') {
131
+ return `Object.keys(${this.object?.toJS()}).length`;
132
+ }
133
+ const object = this.object?.toUI();
134
+ const property = this.property?.toUI();
135
+ return Identifier_RE.test(property) ? `${object}.${property}` : `${object}['${property}']`;
136
+ }
137
+ toJS() {
138
+ // 如果是枚举取值
139
+ if (this.object?.concept === 'Identifier' && this.object?.isEnum() && this.property?.concept === 'Identifier') {
140
+ return `"${this.property?.name}"`;
141
+ }
142
+ else if (this.object?.__TypeAnnotation?.sortedTypeKey?.startsWith('nasl.collection.Map') && this.property?.name === 'length') {
143
+ return `Object.keys(${this.object?.toJS()}).length`;
144
+ }
145
+ const object = this.object?.toJS();
146
+ const property = this.property?.toJS();
147
+ // 在赋值语句的左侧,不能有 &&
148
+ const assignment = this.getAncestor('Assignment');
149
+ const batchAssignment = this.getAncestor('BatchAssignment');
150
+ if (assignment) {
151
+ const left = assignment.left;
152
+ let node = this;
153
+ while (node.parentNode && node.parentNode.concept === 'MemberExpression') {
154
+ node = node.parentNode;
155
+ }
156
+ // 在赋值语句的左侧
157
+ if (left === node) {
158
+ return Identifier_RE.test(property) ? `${object}.${property}` : `${object}['${property}']`;
159
+ }
160
+ }
161
+ else if (batchAssignment) {
162
+ const selectMember = batchAssignment.left;
163
+ let topNode = this;
164
+ while (topNode.parentNode && topNode.parentNode.concept === 'MemberExpression') {
165
+ topNode = topNode.parentNode;
166
+ }
167
+ // 在赋值语句的左侧
168
+ if (selectMember === topNode.parentNode) {
169
+ return Identifier_RE.test(property) ? `${object}.${property}` : `${object}['${property}']`;
170
+ }
171
+ }
172
+ return Identifier_RE.test(property) ? `(${object} || {}).${property}` : `(${object} || {})['${property}']`;
173
+ }
174
+ toBrief() {
175
+ return `${this.object.toBrief()}.${this.property.toBrief()}`;
176
+ }
177
+ setValue(newValue) {
178
+ const valueList = newValue.split('.');
179
+ const newValueList = valueList.reverse();
180
+ let arrIndex = 0;
181
+ let current = this;
182
+ while (current.object) {
183
+ if (current.property.name !== newValueList[arrIndex]) {
184
+ current.property.setName(newValueList[arrIndex]);
185
+ return;
186
+ }
187
+ current = current.object;
188
+ arrIndex++;
189
+ }
190
+ // 前面没有找到,到这里就是最后一项的值要修改
191
+ // 最后一个是Identifier,他的值是自己的name
192
+ current.setName(newValueList[arrIndex]);
193
+ }
194
+ /**
195
+ * 设置数据结构属性名称
196
+ */
197
+ setName(name) {
198
+ // 需要单独处理下内容向上查找覆盖
199
+ this.setValue(name);
200
+ }
201
+ isEnum() {
202
+ return this.object?.isEnum?.();
203
+ }
204
+ // 方便快速取值,遍历获取value
205
+ getValue() {
206
+ let current = this;
207
+ let value = '';
208
+ // MemberExpression 有两个属性object代表父级,property代表自己
209
+ // 先向上找父级的值在获取自己的值进行拼接
210
+ while (current.object) {
211
+ const currentValue = current.property.name;
212
+ value = value ? currentValue + '.' + value : currentValue;
213
+ current = current.object;
214
+ }
215
+ // 最后一个是Identifier,他的值是自己的name
216
+ let currentValue = current.name;
217
+ // 实体逻辑 deleteBy/updateBy 的 filter 参数的回调函数的参数:_
218
+ // 处理 _ 的显示问题
219
+ if (currentValue === '_') {
220
+ const parentNode = this.parentNode;
221
+ if (parentNode) {
222
+ let p = parentNode;
223
+ while (p && p.concept !== 'CallLogic') {
224
+ p = p.parentNode;
225
+ }
226
+ if (p && (p.calleeName === 'deleteBy' || p.calleeName === 'updateBy')) {
227
+ const ns = p.calleeNamespace.split('.');
228
+ currentValue = ns[ns.length - 2] || 'item';
229
+ }
230
+ else {
231
+ currentValue = 'item';
232
+ }
233
+ }
234
+ }
235
+ value = value ? currentValue + '.' + value : currentValue || '';
236
+ return value;
237
+ }
238
+ get completeName() {
239
+ const object = this.object?.completeName;
240
+ const property = this.property?.completeName;
241
+ // 在赋值语句的左侧,不能有 &&
242
+ const assignment = this.getAncestor('Assignment');
243
+ if (assignment) {
244
+ const left = assignment.left;
245
+ let node = this;
246
+ while (node && node.concept === 'MemberExpression' && left !== node) {
247
+ node = node.parentNode;
248
+ }
249
+ // 在赋值语句的左侧
250
+ if (node) {
251
+ return Identifier_RE.test(property) ? `${object}.${property}` : `${object}['${property}']`;
252
+ }
253
+ }
254
+ return Identifier_RE.test(property) ? `${object}.${property}` : `${object}['${property}']`;
255
+ }
256
+ get rootName() {
257
+ const completeNameArr = this.completeName.split('.');
258
+ let name = completeNameArr[0];
259
+ // 公共变量, 全局变量情况下
260
+ if (completeNameArr[0] === 'app' || completeNameArr[0] === 'nasl')
261
+ name = `${completeNameArr[0]}.${completeNameArr[1]}.${completeNameArr[2]}`;
262
+ return name;
263
+ }
264
+ /**
265
+ * 翻译
266
+ * @param state
267
+ * @returns
268
+ */
269
+ toEmbeddedTS(state) {
270
+ let code = '';
271
+ const leftCode = this.object ? this.object.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) + '.' : '';
272
+ code += this.object ? this.object.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) + '.' : '';
273
+ code += this.property ? this.property.toEmbeddedTS((0, translator_1.shiftState)(state, code, { inline: true })) : '';
274
+ // 就说明这是一个枚举取值操作,直接啊app.enums.color.red 要转成字符串
275
+ // 解决枚举可能全是数字的问题
276
+ // app.enums.color || extensions.tool.enums.color
277
+ if (leftCode.startsWith('app.enums.') || (leftCode.startsWith('extensions') && leftCode.includes('.enums.'))) {
278
+ const lastIndex = leftCode.lastIndexOf('.');
279
+ const newCode = `${code.substring(0, lastIndex)}['${code.substring(lastIndex + 1, code.length)}']`;
280
+ code = newCode;
281
+ }
282
+ return code;
283
+ }
284
+ get lastObject() {
285
+ let tempNode = this;
286
+ while (tempNode.object.concept === 'MemberExpression') {
287
+ tempNode = tempNode.object;
288
+ }
289
+ return tempNode.object;
290
+ }
291
+ firstMemberExpressionNode() {
292
+ let tempNode = this;
293
+ while (tempNode.parentNode?.concept === 'MemberExpression') {
294
+ tempNode = tempNode.parentNode;
295
+ }
296
+ return tempNode;
297
+ }
298
+ };
299
+ __decorate([
300
+ (0, decorators_1.property)('LogicItem')
301
+ ], MemberExpression.prototype, "object", void 0);
302
+ __decorate([
303
+ (0, decorators_1.property)('LogicItem')
304
+ ], MemberExpression.prototype, "property", void 0);
305
+ __decorate([
306
+ (0, translator_1.withSourceMap)()
307
+ ], MemberExpression.prototype, "toEmbeddedTS", null);
308
+ MemberExpression = MemberExpression_1 = __decorate([
309
+ decorators_1.className,
310
+ (0, decorators_1.concept)('成员表达式')
311
+ // @ts-ignore
312
+ ], MemberExpression);
313
+ exports.MemberExpression = MemberExpression;
314
+ exports.default = MemberExpression;
315
+ //================================================================================
316
+ // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
317
+ // 自动生成的代码已结束。下面可以手动编写。
318
+ //================================================================================
319
+ //# sourceMappingURL=MemberExpression__.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemberExpression__.js","sourceRoot":"","sources":["../../src/concepts/MemberExpression__.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8CAA2E;AAQ3E,MAAM,aAAa,GAAG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,MAAM,CAAC;SAC9B;QACD,OAAO,QAAQ,CAAC,MAAM,CAAC;IAC3B,CAAC;IACD,yBAAyB;QACrB,IAAI,QAAQ,GAAQ,IAAI,CAAC;QACzB,OAAO,QAAQ,CAAC,UAAU,EAAE,OAAO,KAAK,kBAAkB,EAAE;YACxD,QAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC;SAClC;QACD,OAAO,QAAQ,CAAC;IACpB,CAAC;CAMJ,CAAA;AAhUG;IAFC,IAAA,qBAAQ,EAAC,WAAW,CAAC;gDAEH;AAOnB;IAFC,IAAA,qBAAQ,EAAC,WAAW,CAAC;kDAED;AAsRrB;IADC,IAAA,0BAAa,GAAE;oDAef;AA1TQ,gBAAgB;IAH5B,sBAAS;IACT,IAAA,oBAAO,EAAC,OAAO,CAAC;IACjB,aAAa;GACA,gBAAgB,CA+U5B;AA/UY,4CAAgB;AAiV7B,kBAAe,gBAAgB,CAAC;AAChC,kFAAkF;AAClF,gEAAgE;AAChE,uBAAuB;AACvB,kFAAkF"}
@@ -0,0 +1,245 @@
1
+ import { TranslatorState } from '../translator';
2
+ import { Params } from '../common/EventEmitter';
3
+ import BaseNode from '../common/BaseNode';
4
+ import TypeAnnotation from './TypeAnnotation__';
5
+ import ValidationRule from './ValidationRule__';
6
+ import LogicItem from './LogicItem__';
7
+ import Module from './Module__';
8
+ import App from './App__';
9
+ /**
10
+ * 元数据类型
11
+ */
12
+ export declare class MetadataType extends BaseNode {
13
+ /** 类名 */
14
+ static readonly ConceptName = "MetadataType";
15
+ /**
16
+ * 产品概念
17
+ */
18
+ readonly concept: 'MetadataType';
19
+ /**
20
+ * 名称
21
+ */
22
+ name: string;
23
+ /**
24
+ * 标题
25
+ */
26
+ label: string;
27
+ /**
28
+ * 描述
29
+ */
30
+ description: string;
31
+ /**
32
+ * 类型
33
+ */
34
+ typeAnnotation: TypeAnnotation;
35
+ /**
36
+ * 是否必填
37
+ */
38
+ required: boolean;
39
+ /**
40
+ * 验证规则
41
+ */
42
+ rules: Array<ValidationRule>;
43
+ /**
44
+ * 草稿态
45
+ */
46
+ playground: Array<LogicItem>;
47
+ /**
48
+ * 唯一标识
49
+ */
50
+ uuid: string;
51
+ /**
52
+ * 祖先 Module
53
+ */
54
+ get module(): Module;
55
+ /**
56
+ * 祖先 App
57
+ */
58
+ get app(): App;
59
+ /**
60
+ * @param source 需要合并的部分参数
61
+ */
62
+ constructor(source?: Partial<MetadataType>);
63
+ static from(source: any, parentNode?: any, parentKey?: string): MetadataType;
64
+ /**
65
+ * 从父级删除该节点
66
+ * @internal
67
+ */
68
+ _delete(): Params;
69
+ /**
70
+ * 设置是否必填
71
+ */
72
+ setRequired(required: boolean): void;
73
+ getValidationRuleExistingNames(excludedList?: Array<ValidationRule>): string[];
74
+ getValidationRuleUniqueName(name?: string): string;
75
+ /**
76
+ * 插入验证规则
77
+ * @internal
78
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
79
+ */
80
+ _insertValidationRuleInRulesAt(name: string, index: number): ValidationRule;
81
+ /**
82
+ * 插入验证规则
83
+ * @internal
84
+ * @param validationRuleOptions 验证规则参数
85
+ */
86
+ _insertValidationRuleInRulesAt(validationRuleOptions: Partial<ValidationRule>, index: number): ValidationRule;
87
+ /**
88
+ * 插入验证规则
89
+ * @internal
90
+ * @param validationRule 已有的验证规则实例
91
+ */
92
+ _insertValidationRuleInRulesAt(validationRule: ValidationRule, index: number): ValidationRule;
93
+ /**
94
+ * 插入验证规则
95
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
96
+ */
97
+ insertValidationRuleInRulesAt(name: string, index: number): ValidationRule;
98
+ /**
99
+ * 插入验证规则
100
+ * @param validationRuleOptions 验证规则参数
101
+ */
102
+ insertValidationRuleInRulesAt(validationRuleOptions: Partial<ValidationRule>, index: number): ValidationRule;
103
+ /**
104
+ * 插入验证规则
105
+ * @param validationRule 已有的验证规则实例
106
+ */
107
+ insertValidationRuleInRulesAt(validationRule: ValidationRule, index: number): ValidationRule;
108
+ /**
109
+ * 添加验证规则
110
+ * @internal
111
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
112
+ */
113
+ _addValidationRuleInRules(name?: string): ValidationRule;
114
+ /**
115
+ * 添加验证规则
116
+ * @internal
117
+ * @param validationRuleOptions 验证规则参数
118
+ */
119
+ _addValidationRuleInRules(validationRuleOptions: Partial<ValidationRule>): ValidationRule;
120
+ /**
121
+ * 添加验证规则
122
+ * @internal
123
+ * @param validationRule 已有的验证规则实例
124
+ */
125
+ _addValidationRuleInRules(validationRule: ValidationRule): ValidationRule;
126
+ /**
127
+ * 添加验证规则
128
+ * @internal
129
+ * @param name 验证规则名称,如果不填会自动生成一个唯一名称
130
+ */
131
+ addValidationRuleInRules(name?: string): ValidationRule;
132
+ /**
133
+ * 添加验证规则
134
+ * @param validationRuleOptions 验证规则参数
135
+ */
136
+ addValidationRuleInRules(validationRuleOptions: Partial<ValidationRule>): ValidationRule;
137
+ /**
138
+ * 添加验证规则
139
+ * @param validationRule 已有的验证规则实例
140
+ */
141
+ addValidationRuleInRules(validationRule: ValidationRule): ValidationRule;
142
+ /**
143
+ * 插入逻辑项
144
+ * @internal
145
+ * @param logicItemOptions 逻辑项参数
146
+ */
147
+ _insertItemInPlaygroundAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
148
+ /**
149
+ * 插入逻辑项
150
+ * @internal
151
+ * @param logicItem 已有的逻辑项实例
152
+ */
153
+ _insertItemInPlaygroundAt(logicItem: LogicItem, index: number): LogicItem;
154
+ /**
155
+ * 插入逻辑项
156
+ * @param logicItemOptions 逻辑项参数
157
+ */
158
+ insertItemInPlaygroundAt(logicItemOptions: Partial<LogicItem>, index: number): LogicItem;
159
+ /**
160
+ * 插入逻辑项
161
+ * @param logicItem 已有的逻辑项实例
162
+ */
163
+ insertItemInPlaygroundAt(logicItem: LogicItem, index: number): LogicItem;
164
+ /**
165
+ * 添加逻辑项
166
+ * @internal
167
+ * @param logicItemOptions 逻辑项参数
168
+ */
169
+ _addItemInPlayground(logicItemOptions: Partial<LogicItem>): LogicItem;
170
+ /**
171
+ * 添加逻辑项
172
+ * @internal
173
+ * @param logicItem 已有的逻辑项实例
174
+ */
175
+ _addItemInPlayground(logicItem: LogicItem): LogicItem;
176
+ /**
177
+ * 添加逻辑项
178
+ * @param logicItemOptions 逻辑项参数
179
+ */
180
+ addItemInPlayground(logicItemOptions: Partial<LogicItem>): LogicItem;
181
+ /**
182
+ * 添加逻辑项
183
+ * @param logicItem 已有的逻辑项实例
184
+ */
185
+ addItemInPlayground(logicItem: LogicItem): LogicItem;
186
+ /**
187
+ * 删除类型标注
188
+ * @param name 类型标注名称
189
+ */
190
+ removeTypeAnnotation(name: string): void;
191
+ /**
192
+ * 删除类型标注
193
+ * @param typeAnnotation 已有的类型标注实例
194
+ */
195
+ removeTypeAnnotation(typeAnnotation: TypeAnnotation): void;
196
+ __removeTypeAnnotation(typeAnnotation: TypeAnnotation): Params;
197
+ /**
198
+ * 删除验证规则
199
+ * @param name 验证规则名称
200
+ */
201
+ removeValidationRuleInRules(name: string): void;
202
+ /**
203
+ * 删除验证规则
204
+ * @param validationRule 已有的验证规则实例
205
+ */
206
+ removeValidationRuleInRules(validationRule: ValidationRule): void;
207
+ /**
208
+ * 删除逻辑项
209
+ * @param logicItem 已有的逻辑项实例
210
+ */
211
+ removeItemInPlayground(logicItem: LogicItem): void;
212
+ __removeLogicItem(logicItem: LogicItem): Params;
213
+ /**
214
+ * 是否可编辑
215
+ *
216
+ */
217
+ get readonly(): boolean;
218
+ deleteLogincAndModule(): void;
219
+ /**
220
+ * 设置元数据名称
221
+ */
222
+ setName(name: string): void;
223
+ /**
224
+ * 设置元数据标题
225
+ */
226
+ setLabel(label: string): void;
227
+ /**
228
+ * 设置元数据描述
229
+ */
230
+ setDescription(description: string): void;
231
+ toEmbeddedTS(state?: TranslatorState): string;
232
+ getNamespace(): string;
233
+ getTsNamespace(): string;
234
+ /**
235
+ * 生成宿主语言的文件路径
236
+ * @param name 一般不用传,用于 rename
237
+ */
238
+ getEmbeddedFilePath(name?: string): string;
239
+ toEmbeddedTSFile(): {
240
+ code: string;
241
+ filePath: string;
242
+ sourceMap: import("../translator").SourceMap;
243
+ };
244
+ }
245
+ export default MetadataType;