@lcap/nasl 1.0.2 → 2.12.0-beta

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 (355) hide show
  1. package/out/automate/engine/index.js +11 -0
  2. package/out/automate/engine/index.js.map +1 -1
  3. package/out/automate/engine/uniqueName.js +1 -1
  4. package/out/automate/engine/uniqueName.js.map +1 -1
  5. package/out/automate/engine/utils.d.ts +1 -0
  6. package/out/automate/engine/utils.js +89 -67
  7. package/out/automate/engine/utils.js.map +1 -1
  8. package/out/concepts/App__.d.ts +51 -49
  9. package/out/concepts/App__.js +86 -54
  10. package/out/concepts/App__.js.map +1 -1
  11. package/out/concepts/Argument__.js +1 -1
  12. package/out/concepts/Argument__.js.map +1 -1
  13. package/out/concepts/Assignee__.js +1 -1
  14. package/out/concepts/Assignee__.js.map +1 -1
  15. package/out/concepts/Assignment__.js +1 -1
  16. package/out/concepts/Assignment__.js.map +1 -1
  17. package/out/concepts/Attribute__.js +1 -1
  18. package/out/concepts/Attribute__.js.map +1 -1
  19. package/out/concepts/BinaryExpression__.js +1 -1
  20. package/out/concepts/BinaryExpression__.js.map +1 -1
  21. package/out/concepts/BindAttribute__.js +3 -3
  22. package/out/concepts/BindAttribute__.js.map +1 -1
  23. package/out/concepts/BindDirective__.js +1 -1
  24. package/out/concepts/BindDirective__.js.map +1 -1
  25. package/out/concepts/BindEvent__.js +11 -6
  26. package/out/concepts/BindEvent__.js.map +1 -1
  27. package/out/concepts/BooleanLiteral__.js +1 -1
  28. package/out/concepts/BooleanLiteral__.js.map +1 -1
  29. package/out/concepts/CallFunction__.js +8 -3
  30. package/out/concepts/CallFunction__.js.map +1 -1
  31. package/out/concepts/CallInterface__.js +1 -1
  32. package/out/concepts/CallInterface__.js.map +1 -1
  33. package/out/concepts/CallLogic__.js +23 -21
  34. package/out/concepts/CallLogic__.js.map +1 -1
  35. package/out/concepts/CallQueryComponent__.d.ts +9 -8
  36. package/out/concepts/CallQueryComponent__.js +89 -79
  37. package/out/concepts/CallQueryComponent__.js.map +1 -1
  38. package/out/concepts/Comment__.js +2 -2
  39. package/out/concepts/Comment__.js.map +1 -1
  40. package/out/concepts/CompletionProperty__.js +1 -1
  41. package/out/concepts/CompletionProperty__.js.map +1 -1
  42. package/out/concepts/ConfigGroup__.d.ts +1 -0
  43. package/out/concepts/ConfigGroup__.js +8 -1
  44. package/out/concepts/ConfigGroup__.js.map +1 -1
  45. package/out/concepts/ConfigPropertyValue__.js +1 -1
  46. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  47. package/out/concepts/ConfigProperty__.d.ts +1 -0
  48. package/out/concepts/ConfigProperty__.js +4 -1
  49. package/out/concepts/ConfigProperty__.js.map +1 -1
  50. package/out/concepts/Configuration__.d.ts +1 -0
  51. package/out/concepts/Configuration__.js +4 -1
  52. package/out/concepts/Configuration__.js.map +1 -1
  53. package/out/concepts/Constant__.js +1 -1
  54. package/out/concepts/Constant__.js.map +1 -1
  55. package/out/concepts/DataElement__.js +1 -1
  56. package/out/concepts/DataElement__.js.map +1 -1
  57. package/out/concepts/DataSource__.d.ts +143 -0
  58. package/out/concepts/DataSource__.js +316 -0
  59. package/out/concepts/DataSource__.js.map +1 -0
  60. package/out/concepts/Destination__.js +8 -8
  61. package/out/concepts/Destination__.js.map +1 -1
  62. package/out/concepts/End__.js +3 -3
  63. package/out/concepts/End__.js.map +1 -1
  64. package/out/concepts/EntityIndex__.d.ts +5 -0
  65. package/out/concepts/EntityIndex__.js +7 -1
  66. package/out/concepts/EntityIndex__.js.map +1 -1
  67. package/out/concepts/EntityProperty__.d.ts +9 -0
  68. package/out/concepts/EntityProperty__.js +20 -3
  69. package/out/concepts/EntityProperty__.js.map +1 -1
  70. package/out/concepts/Entity__.d.ts +5 -0
  71. package/out/concepts/Entity__.js +21 -11
  72. package/out/concepts/Entity__.js.map +1 -1
  73. package/out/concepts/EnumItem__.js +1 -1
  74. package/out/concepts/EnumItem__.js.map +1 -1
  75. package/out/concepts/Enum__.js +11 -5
  76. package/out/concepts/Enum__.js.map +1 -1
  77. package/out/concepts/Event__.js +1 -1
  78. package/out/concepts/Event__.js.map +1 -1
  79. package/out/concepts/ForEachStatement__.js +3 -3
  80. package/out/concepts/ForEachStatement__.js.map +1 -1
  81. package/out/concepts/Function__.d.ts +18 -0
  82. package/out/concepts/Function__.js +96 -1
  83. package/out/concepts/Function__.js.map +1 -1
  84. package/out/concepts/Identifier__.js +3 -13
  85. package/out/concepts/Identifier__.js.map +1 -1
  86. package/out/concepts/IfStatement__.js +9 -9
  87. package/out/concepts/IfStatement__.js.map +1 -1
  88. package/out/concepts/InterfaceParam__.js +1 -1
  89. package/out/concepts/InterfaceParam__.js.map +1 -1
  90. package/out/concepts/Interface__.js +19 -12
  91. package/out/concepts/Interface__.js.map +1 -1
  92. package/out/concepts/JSBlock__.js +1 -1
  93. package/out/concepts/JSBlock__.js.map +1 -1
  94. package/out/concepts/LogicItem__.js +1 -1
  95. package/out/concepts/LogicItem__.js.map +1 -1
  96. package/out/concepts/Logic__.js +41 -42
  97. package/out/concepts/Logic__.js.map +1 -1
  98. package/out/concepts/MemberExpression__.js +1 -1
  99. package/out/concepts/MemberExpression__.js.map +1 -1
  100. package/out/concepts/Module__.d.ts +1 -85
  101. package/out/concepts/Module__.js +6 -107
  102. package/out/concepts/Module__.js.map +1 -1
  103. package/out/concepts/Namespace__.d.ts +0 -86
  104. package/out/concepts/Namespace__.js +1 -108
  105. package/out/concepts/Namespace__.js.map +1 -1
  106. package/out/concepts/NullLiteral__.js +1 -1
  107. package/out/concepts/NullLiteral__.js.map +1 -1
  108. package/out/concepts/NumericLiteral__.js +1 -1
  109. package/out/concepts/NumericLiteral__.js.map +1 -1
  110. package/out/concepts/Param__.d.ts +2 -1
  111. package/out/concepts/Param__.js +1 -1
  112. package/out/concepts/Param__.js.map +1 -1
  113. package/out/concepts/Point__.js +1 -1
  114. package/out/concepts/Point__.js.map +1 -1
  115. package/out/concepts/ProcessComponent__.js +1 -1
  116. package/out/concepts/ProcessComponent__.js.map +1 -1
  117. package/out/concepts/ProcessElement__.js +26 -11
  118. package/out/concepts/ProcessElement__.js.map +1 -1
  119. package/out/concepts/ProcessOutcome__.js +1 -1
  120. package/out/concepts/ProcessOutcome__.js.map +1 -1
  121. package/out/concepts/Process__.js +17 -10
  122. package/out/concepts/Process__.js.map +1 -1
  123. package/out/concepts/QueryAggregateExpression__.js +1 -1
  124. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  125. package/out/concepts/QueryFieldExpression__.js +9 -2
  126. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  127. package/out/concepts/QueryFromExpression__.d.ts +4 -0
  128. package/out/concepts/QueryFromExpression__.js +14 -3
  129. package/out/concepts/QueryFromExpression__.js.map +1 -1
  130. package/out/concepts/QueryGroupByExpression__.js +1 -1
  131. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  132. package/out/concepts/QueryJoinExpression__.d.ts +4 -0
  133. package/out/concepts/QueryJoinExpression__.js +15 -4
  134. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  135. package/out/concepts/QueryLimitExpression__.js +1 -1
  136. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  137. package/out/concepts/QueryOrderByExpression__.js +1 -1
  138. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  139. package/out/concepts/QuerySelectExpression__.js +1 -1
  140. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  141. package/out/concepts/Rect__.js +1 -1
  142. package/out/concepts/Rect__.js.map +1 -1
  143. package/out/concepts/Return__.js +1 -1
  144. package/out/concepts/Return__.js.map +1 -1
  145. package/out/concepts/Role__.js +11 -4
  146. package/out/concepts/Role__.js.map +1 -1
  147. package/out/concepts/Slot__.js +1 -1
  148. package/out/concepts/Slot__.js.map +1 -1
  149. package/out/concepts/SqlQueryComponent__.d.ts +10 -0
  150. package/out/concepts/SqlQueryComponent__.js +32 -5
  151. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  152. package/out/concepts/Start__.js +1 -1
  153. package/out/concepts/Start__.js.map +1 -1
  154. package/out/concepts/StringLiteral__.js +1 -1
  155. package/out/concepts/StringLiteral__.js.map +1 -1
  156. package/out/concepts/StructureProperty__.js +1 -1
  157. package/out/concepts/StructureProperty__.js.map +1 -1
  158. package/out/concepts/Structure__.js +20 -13
  159. package/out/concepts/Structure__.js.map +1 -1
  160. package/out/concepts/SwitchCase__.js +6 -6
  161. package/out/concepts/SwitchCase__.js.map +1 -1
  162. package/out/concepts/SwitchStatement__.js +1 -1
  163. package/out/concepts/SwitchStatement__.js.map +1 -1
  164. package/out/concepts/Theme__.js +1 -1
  165. package/out/concepts/Theme__.js.map +1 -1
  166. package/out/concepts/Transactional__.js +1 -1
  167. package/out/concepts/Transactional__.js.map +1 -1
  168. package/out/concepts/TypeAnnotation__.d.ts +8 -0
  169. package/out/concepts/TypeAnnotation__.js +46 -4
  170. package/out/concepts/TypeAnnotation__.js.map +1 -1
  171. package/out/concepts/TypeParam__.js +1 -1
  172. package/out/concepts/TypeParam__.js.map +1 -1
  173. package/out/concepts/UnaryExpression__.js +1 -1
  174. package/out/concepts/UnaryExpression__.js.map +1 -1
  175. package/out/concepts/Unparsed__.js +1 -1
  176. package/out/concepts/Unparsed__.js.map +1 -1
  177. package/out/concepts/UseComponent__.js +1 -1
  178. package/out/concepts/UseComponent__.js.map +1 -1
  179. package/out/concepts/ValidationRule__.js +1 -1
  180. package/out/concepts/ValidationRule__.js.map +1 -1
  181. package/out/concepts/Variable__.js +1 -1
  182. package/out/concepts/Variable__.js.map +1 -1
  183. package/out/concepts/ViewComponent__.js +1 -1
  184. package/out/concepts/ViewComponent__.js.map +1 -1
  185. package/out/concepts/ViewElement__.js +18 -18
  186. package/out/concepts/ViewElement__.js.map +1 -1
  187. package/out/concepts/View__.js +25 -23
  188. package/out/concepts/View__.js.map +1 -1
  189. package/out/concepts/WhileStatement__.js +5 -5
  190. package/out/concepts/WhileStatement__.js.map +1 -1
  191. package/out/concepts/basics/stdlib/nasl.util.js +278 -0
  192. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  193. package/out/concepts/index__.d.ts +1 -0
  194. package/out/concepts/index__.js +1 -0
  195. package/out/concepts/index__.js.map +1 -1
  196. package/out/generator/genBundleFiles.js +8 -3
  197. package/out/generator/genBundleFiles.js.map +1 -1
  198. package/out/generator/genMetaData.js +13 -12
  199. package/out/generator/genMetaData.js.map +1 -1
  200. package/out/server/createUiTs.js +1 -0
  201. package/out/server/createUiTs.js.map +1 -1
  202. package/out/server/getLogics.js +9 -1
  203. package/out/server/getLogics.js.map +1 -1
  204. package/out/server/getProcesses.d.ts +3 -0
  205. package/out/server/getProcesses.js +61 -1
  206. package/out/server/getProcesses.js.map +1 -1
  207. package/out/server/naslServer.js +128 -6
  208. package/out/server/naslServer.js.map +1 -1
  209. package/out/server/process2LogicNamespace.js +10 -1
  210. package/out/server/process2LogicNamespace.js.map +1 -1
  211. package/out/server/translator.js +19 -1
  212. package/out/server/translator.js.map +1 -1
  213. package/out/service/storage/init.js +2 -2
  214. package/out/service/storage/init.js.map +1 -1
  215. package/out/templator/genCreateBlock.js +15 -11
  216. package/out/templator/genCreateBlock.js.map +1 -1
  217. package/out/templator/genCurdEditMultipleKeyBlock.js +15 -12
  218. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  219. package/out/templator/genCurdMultipleKeyBlock.js +25 -21
  220. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  221. package/out/templator/genEditTableBlock.js +12 -12
  222. package/out/templator/genEditTableBlock.js.map +1 -1
  223. package/out/templator/genGridViewBlock.js +21 -20
  224. package/out/templator/genGridViewBlock.js.map +1 -1
  225. package/out/templator/genListViewBlock.js +6 -3
  226. package/out/templator/genListViewBlock.js.map +1 -1
  227. package/out/templator/genQueryComponent.js +5 -5
  228. package/out/templator/genQueryComponent.js.map +1 -1
  229. package/out/templator/genSelectBlock.js +8 -7
  230. package/out/templator/genSelectBlock.js.map +1 -1
  231. package/out/templator/genTableBlock.js +17 -15
  232. package/out/templator/genTableBlock.js.map +1 -1
  233. package/out/templator/genUpdateBlock.js +15 -11
  234. package/out/templator/genUpdateBlock.js.map +1 -1
  235. package/out/templator/utils.d.ts +2 -2
  236. package/out/templator/utils.js.map +1 -1
  237. package/out/test/integration/connect-file.js +6 -6
  238. package/out/test/integration/connect-file.js.map +1 -1
  239. package/out/translator/index.js +1 -1
  240. package/out/translator/index.js.map +1 -1
  241. package/out/utils/index.d.ts +4 -0
  242. package/out/utils/index.js +32 -1
  243. package/out/utils/index.js.map +1 -1
  244. package/package.json +1 -1
  245. package/src/automate/engine/index.js +12 -1
  246. package/src/automate/engine/uniqueName.js +1 -1
  247. package/src/automate/engine/utils.js +92 -67
  248. package/src/concepts/App__.ts +165 -95
  249. package/src/concepts/Argument__.ts +1 -1
  250. package/src/concepts/Assignee__.ts +1 -1
  251. package/src/concepts/Assignment__.ts +1 -1
  252. package/src/concepts/Attribute__.ts +1 -1
  253. package/src/concepts/BinaryExpression__.ts +1 -1
  254. package/src/concepts/BindAttribute__.ts +3 -3
  255. package/src/concepts/BindDirective__.ts +1 -1
  256. package/src/concepts/BindEvent__.ts +10 -6
  257. package/src/concepts/BooleanLiteral__.ts +1 -1
  258. package/src/concepts/CallFunction__.ts +19 -16
  259. package/src/concepts/CallInterface__.ts +1 -1
  260. package/src/concepts/CallLogic__.ts +23 -23
  261. package/src/concepts/CallQueryComponent__.ts +96 -113
  262. package/src/concepts/Comment__.ts +2 -2
  263. package/src/concepts/CompletionProperty__.ts +1 -1
  264. package/src/concepts/ConfigGroup__.ts +4 -2
  265. package/src/concepts/ConfigPropertyValue__.ts +1 -1
  266. package/src/concepts/ConfigProperty__.ts +5 -1
  267. package/src/concepts/Configuration__.ts +4 -1
  268. package/src/concepts/Constant__.ts +1 -1
  269. package/src/concepts/DataElement__.ts +1 -1
  270. package/src/concepts/DataSource__.ts +389 -0
  271. package/src/concepts/Destination__.ts +24 -8
  272. package/src/concepts/End__.ts +3 -3
  273. package/src/concepts/EntityIndex__.ts +8 -1
  274. package/src/concepts/EntityProperty__.ts +21 -3
  275. package/src/concepts/Entity__.ts +24 -12
  276. package/src/concepts/EnumItem__.ts +1 -1
  277. package/src/concepts/Enum__.ts +24 -5
  278. package/src/concepts/Event__.ts +1 -1
  279. package/src/concepts/ForEachStatement__.ts +3 -3
  280. package/src/concepts/Function__.ts +97 -3
  281. package/src/concepts/Identifier__.ts +12 -13
  282. package/src/concepts/IfStatement__.ts +10 -10
  283. package/src/concepts/InterfaceParam__.ts +1 -1
  284. package/src/concepts/Interface__.ts +20 -12
  285. package/src/concepts/JSBlock__.ts +1 -1
  286. package/src/concepts/LogicItem__.ts +1 -1
  287. package/src/concepts/Logic__.ts +41 -39
  288. package/src/concepts/MemberExpression__.ts +1 -1
  289. package/src/concepts/Module__.ts +9 -204
  290. package/src/concepts/Namespace__.ts +1 -204
  291. package/src/concepts/NullLiteral__.ts +1 -1
  292. package/src/concepts/NumericLiteral__.ts +1 -1
  293. package/src/concepts/Param__.ts +3 -2
  294. package/src/concepts/Point__.ts +1 -1
  295. package/src/concepts/ProcessComponent__.ts +1 -1
  296. package/src/concepts/ProcessElement__.ts +29 -13
  297. package/src/concepts/ProcessOutcome__.ts +1 -1
  298. package/src/concepts/Process__.ts +17 -11
  299. package/src/concepts/QueryAggregateExpression__.ts +1 -1
  300. package/src/concepts/QueryFieldExpression__.ts +10 -2
  301. package/src/concepts/QueryFromExpression__.ts +14 -3
  302. package/src/concepts/QueryGroupByExpression__.ts +1 -1
  303. package/src/concepts/QueryJoinExpression__.ts +15 -4
  304. package/src/concepts/QueryLimitExpression__.ts +1 -1
  305. package/src/concepts/QueryOrderByExpression__.ts +1 -1
  306. package/src/concepts/QuerySelectExpression__.ts +1 -1
  307. package/src/concepts/Rect__.ts +1 -1
  308. package/src/concepts/Return__.ts +1 -1
  309. package/src/concepts/Role__.ts +11 -5
  310. package/src/concepts/Slot__.ts +1 -1
  311. package/src/concepts/SqlQueryComponent__.ts +30 -11
  312. package/src/concepts/Start__.ts +1 -1
  313. package/src/concepts/StringLiteral__.ts +1 -1
  314. package/src/concepts/StructureProperty__.ts +1 -1
  315. package/src/concepts/Structure__.ts +20 -12
  316. package/src/concepts/SwitchCase__.ts +6 -6
  317. package/src/concepts/SwitchStatement__.ts +1 -1
  318. package/src/concepts/Theme__.ts +1 -1
  319. package/src/concepts/Transactional__.ts +1 -1
  320. package/src/concepts/TypeAnnotation__.ts +45 -23
  321. package/src/concepts/TypeParam__.ts +1 -1
  322. package/src/concepts/UnaryExpression__.ts +1 -1
  323. package/src/concepts/Unparsed__.ts +1 -1
  324. package/src/concepts/UseComponent__.ts +1 -1
  325. package/src/concepts/ValidationRule__.ts +1 -1
  326. package/src/concepts/Variable__.ts +1 -1
  327. package/src/concepts/ViewComponent__.ts +1 -1
  328. package/src/concepts/ViewElement__.ts +19 -19
  329. package/src/concepts/View__.ts +25 -23
  330. package/src/concepts/WhileStatement__.ts +5 -5
  331. package/src/concepts/basics/stdlib/nasl.util.ts +279 -0
  332. package/src/concepts/index__.ts +1 -0
  333. package/src/generator/genBundleFiles.ts +8 -3
  334. package/src/generator/genMetaData.ts +13 -13
  335. package/src/server/createUiTs.ts +1 -0
  336. package/src/server/getLogics.ts +11 -3
  337. package/src/server/getProcesses.ts +61 -0
  338. package/src/server/naslServer.ts +124 -6
  339. package/src/server/process2LogicNamespace.ts +29 -19
  340. package/src/server/translator.ts +22 -1
  341. package/src/service/storage/init.ts +2 -2
  342. package/src/templator/genCreateBlock.ts +16 -13
  343. package/src/templator/genCurdEditMultipleKeyBlock.ts +16 -13
  344. package/src/templator/genCurdMultipleKeyBlock.ts +26 -22
  345. package/src/templator/genEditTableBlock.ts +14 -13
  346. package/src/templator/genGridViewBlock.ts +22 -21
  347. package/src/templator/genListViewBlock.ts +9 -5
  348. package/src/templator/genQueryComponent.ts +6 -6
  349. package/src/templator/genSelectBlock.ts +9 -8
  350. package/src/templator/genTableBlock.ts +18 -16
  351. package/src/templator/genUpdateBlock.ts +16 -12
  352. package/src/templator/utils.ts +2 -2
  353. package/src/test/integration/connect-file.ts +6 -6
  354. package/src/translator/index.ts +1 -1
  355. package/src/utils/index.ts +32 -0
@@ -14,7 +14,7 @@ import * as utils from '../utils';
14
14
  import { v4 as uuidv4 } from 'uuid';
15
15
  import BaseNode from '../common/BaseNode';
16
16
  import classMap from '../common/classMap';
17
- import Entity from './Entity__';
17
+ import DataSource from './DataSource__';
18
18
  import Structure from './Structure__';
19
19
  import Enum from './Enum__';
20
20
  import Logic from './Logic__';
@@ -110,10 +110,10 @@ export class App extends BaseNode {
110
110
  hasAuth: boolean = undefined;
111
111
 
112
112
  /**
113
- * 实体列表
113
+ * 数据源列表
114
114
  */
115
- @property('Entity')
116
- entities: Array<Entity> = [];
115
+ @property('DataSource')
116
+ dataSources: Array<DataSource> = [];
117
117
 
118
118
  /**
119
119
  * 数据结构列表
@@ -187,6 +187,8 @@ export class App extends BaseNode {
187
187
  @property('Module')
188
188
  componentDependencies: Array<Module> = [];
189
189
 
190
+
191
+
190
192
  /**
191
193
  * @param source 需要合并的部分参数
192
194
  */
@@ -235,147 +237,148 @@ export class App extends BaseNode {
235
237
  });
236
238
  }
237
239
 
238
- getEntityExistingNames(excludedList: Array<Entity> = []) {
240
+ getDataSourceExistingNames(excludedList: Array<DataSource> = []) {
239
241
  const excludedSet = new Set(excludedList);
240
- return (this.entities || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
242
+ return (this.dataSources || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
241
243
  }
242
- getEntityUniqueName(name = 'Entity1') {
243
- return utils.unique(name, this.getEntityExistingNames(), undefined, true);
244
+ getDataSourceUniqueName(name = 'DataSource1') {
245
+ return utils.unique(name, this.getDataSourceExistingNames(), undefined, true);
244
246
  }
245
247
 
246
248
  /**
247
- * 插入实体
249
+ * 插入数据源
248
250
  * @internal
249
- * @param name 实体名称,如果不填会自动生成一个唯一名称
251
+ * @param name 数据源名称,如果不填会自动生成一个唯一名称
250
252
  */
251
- _insertEntityAt(name: string, index: number): Entity;
253
+ _insertDataSourceAt(name: string, index: number): DataSource;
252
254
 
253
255
  /**
254
- * 插入实体
256
+ * 插入数据源
255
257
  * @internal
256
- * @param entityOptions 实体参数
258
+ * @param dataSourceOptions 数据源参数
257
259
  */
258
- _insertEntityAt(entityOptions: Partial<Entity>, index: number): Entity;
260
+ _insertDataSourceAt(dataSourceOptions: Partial<DataSource>, index: number): DataSource;
259
261
 
260
262
  /**
261
- * 插入实体
263
+ * 插入数据源
262
264
  * @internal
263
- * @param entity 已有的实体实例
265
+ * @param dataSource 已有的数据源实例
264
266
  */
265
- _insertEntityAt(entity: Entity, index: number): Entity;
267
+ _insertDataSourceAt(dataSource: DataSource, index: number): DataSource;
266
268
 
267
- _insertEntityAt(options: string | Partial<Entity> | Entity, index: number) {
268
- const entityOptions: any = {};
269
- const relationOptions = { parentNode: this, parentKey: 'entities' };
270
- let entity: Entity;
269
+ _insertDataSourceAt(options: string | Partial<DataSource> | DataSource, index: number) {
270
+ const dataSourceOptions: any = {};
271
+ const relationOptions = { parentNode: this, parentKey: 'dataSources' };
272
+ let dataSource: DataSource;
271
273
  if (!options) {
272
- entity = Entity.from({
273
- ...entityOptions,
274
- name: this.getEntityUniqueName(),
275
- }, this, 'entities');
274
+ dataSource = DataSource.from({
275
+ ...dataSourceOptions,
276
+ name: this.getDataSourceUniqueName(),
277
+ }, this, 'dataSources');
276
278
  } else if (typeof options === 'string') {
277
- entity = Entity.from({
278
- ...entityOptions,
279
+ dataSource = DataSource.from({
280
+ ...dataSourceOptions,
279
281
  name: options,
280
- }, this, 'entities');
281
- } else if (options instanceof Entity) {
282
+ }, this, 'dataSources');
283
+ } else if (options instanceof DataSource) {
282
284
  options.ensureDelete(); // 同一实例不支持多处存在
283
- entity = options;
284
- Object.assign(entity, relationOptions);
285
+ dataSource = options;
286
+ Object.assign(dataSource, relationOptions);
285
287
  } else {
286
- entity = Entity.from({
287
- ...entityOptions,
288
+ dataSource = DataSource.from({
289
+ ...dataSourceOptions,
288
290
  ...options,
289
- }, this, 'entities');
291
+ }, this, 'dataSources');
290
292
  }
291
- this.entities.splice(index, 0, entity);
292
- return entity;
293
+ this.dataSources.splice(index, 0, dataSource);
294
+ return dataSource;
293
295
  }
294
296
 
295
297
  /**
296
- * 插入实体
297
- * @param name 实体名称,如果不填会自动生成一个唯一名称
298
+ * 插入数据源
299
+ * @param name 数据源名称,如果不填会自动生成一个唯一名称
298
300
  */
299
- insertEntityAt(name: string, index: number): Entity;
301
+ insertDataSourceAt(name: string, index: number): DataSource;
300
302
 
301
303
  /**
302
- * 插入实体
303
- * @param entityOptions 实体参数
304
+ * 插入数据源
305
+ * @param dataSourceOptions 数据源参数
304
306
  */
305
- insertEntityAt(entityOptions: Partial<Entity>, index: number): Entity;
307
+ insertDataSourceAt(dataSourceOptions: Partial<DataSource>, index: number): DataSource;
306
308
 
307
309
  /**
308
- * 插入实体
309
- * @param entity 已有的实体实例
310
+ * 插入数据源
311
+ * @param dataSource 已有的数据源实例
310
312
  */
311
- insertEntityAt(entity: Entity, index: number): Entity;
313
+ insertDataSourceAt(dataSource: DataSource, index: number): DataSource;
312
314
 
313
- insertEntityAt(options: string | Partial<Entity> | Entity, index: number) {
314
- const node = this._insertEntityAt(options as any, index);
315
+ insertDataSourceAt(options: string | Partial<DataSource> | DataSource, index: number) {
316
+ const node = this._insertDataSourceAt(options as any, index);
315
317
  node.create({
316
318
  index,
317
319
  parentNode: this,
318
- parentKey: 'entities',
320
+ parentKey: 'dataSources',
319
321
  });
320
322
  return node;
321
323
  }
322
324
 
323
325
  /**
324
- * 添加实体
326
+ * 添加数据源
325
327
  * @internal
326
- * @param name 实体名称,如果不填会自动生成一个唯一名称
328
+ * @param name 数据源名称,如果不填会自动生成一个唯一名称
327
329
  */
328
- _addEntity(name?: string): Entity;
330
+ _addDataSource(name?: string): DataSource;
329
331
 
330
332
  /**
331
- * 添加实体
333
+ * 添加数据源
332
334
  * @internal
333
- * @param entityOptions 实体参数
335
+ * @param dataSourceOptions 数据源参数
334
336
  */
335
- _addEntity(entityOptions: Partial<Entity>): Entity;
337
+ _addDataSource(dataSourceOptions: Partial<DataSource>): DataSource;
336
338
 
337
339
  /**
338
- * 添加实体
340
+ * 添加数据源
339
341
  * @internal
340
- * @param entity 已有的实体实例
342
+ * @param dataSource 已有的数据源实例
341
343
  */
342
- _addEntity(entity: Entity): Entity;
344
+ _addDataSource(dataSource: DataSource): DataSource;
343
345
 
344
- _addEntity(options?: string | Partial<Entity> | Entity) {
345
- const index = 0;
346
- return this._insertEntityAt(options as any, index);
346
+ _addDataSource(options?: string | Partial<DataSource> | DataSource) {
347
+ const index = this.dataSources.length;
348
+ return this._insertDataSourceAt(options as any, index);
347
349
  }
348
350
 
349
351
  /**
350
- * 添加实体
352
+ * 添加数据源
351
353
  * @internal
352
- * @param name 实体名称,如果不填会自动生成一个唯一名称
354
+ * @param name 数据源名称,如果不填会自动生成一个唯一名称
353
355
  */
354
- addEntity(name?: string): Entity;
356
+ addDataSource(name?: string): DataSource;
355
357
 
356
358
  /**
357
- * 添加实体
358
- * @param entityOptions 实体参数
359
+ * 添加数据源
360
+ * @param dataSourceOptions 数据源参数
359
361
  */
360
- addEntity(entityOptions: Partial<Entity>): Entity;
362
+ addDataSource(dataSourceOptions: Partial<DataSource>): DataSource;
361
363
 
362
364
  /**
363
- * 添加实体
364
- * @param entity 已有的实体实例
365
+ * 添加数据源
366
+ * @param dataSource 已有的数据源实例
365
367
  */
366
- addEntity(entity: Entity): Entity;
368
+ addDataSource(dataSource: DataSource): DataSource;
367
369
 
368
- addEntity(options?: string | Partial<Entity> | Entity) {
369
- const node = this._addEntity(options as any);
370
- const index = this.entities.indexOf(node);
370
+ addDataSource(options?: string | Partial<DataSource> | DataSource) {
371
+ const node = this._addDataSource(options as any);
372
+ const index = this.dataSources.indexOf(node);
371
373
  node.create({
372
374
  index,
373
375
  parentNode: this,
374
- parentKey: 'entities',
376
+ parentKey: 'dataSources',
375
377
  });
376
378
  return node;
377
379
  }
378
380
 
381
+
379
382
  getStructureExistingNames(excludedList: Array<Structure> = []) {
380
383
  const excludedSet = new Set(excludedList);
381
384
  return (this.structures || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -517,6 +520,7 @@ export class App extends BaseNode {
517
520
  return node;
518
521
  }
519
522
 
523
+
520
524
  getEnumExistingNames(excludedList: Array<Enum> = []) {
521
525
  const excludedSet = new Set(excludedList);
522
526
  return (this.enums || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -658,6 +662,7 @@ export class App extends BaseNode {
658
662
  return node;
659
663
  }
660
664
 
665
+
661
666
  getLogicExistingNames(excludedList: Array<Logic> = []) {
662
667
  const excludedSet = new Set(excludedList);
663
668
  return (this.logics || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -799,6 +804,7 @@ export class App extends BaseNode {
799
804
  return node;
800
805
  }
801
806
 
807
+
802
808
  getInterfaceExistingNames(excludedList: Array<Interface> = []) {
803
809
  const excludedSet = new Set(excludedList);
804
810
  return (this.interfaces || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -940,6 +946,7 @@ export class App extends BaseNode {
940
946
  return node;
941
947
  }
942
948
 
949
+
943
950
  getViewExistingNames(excludedList: Array<View> = []) {
944
951
  const excludedSet = new Set(excludedList);
945
952
  return (this.views || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1081,6 +1088,7 @@ export class App extends BaseNode {
1081
1088
  return node;
1082
1089
  }
1083
1090
 
1091
+
1084
1092
  getProcessExistingNames(excludedList: Array<Process> = []) {
1085
1093
  const excludedSet = new Set(excludedList);
1086
1094
  return (this.processes || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1222,6 +1230,7 @@ export class App extends BaseNode {
1222
1230
  return node;
1223
1231
  }
1224
1232
 
1233
+
1225
1234
  getRoleExistingNames(excludedList: Array<Role> = []) {
1226
1235
  const excludedSet = new Set(excludedList);
1227
1236
  return (this.roles || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1363,6 +1372,7 @@ export class App extends BaseNode {
1363
1372
  return node;
1364
1373
  }
1365
1374
 
1375
+
1366
1376
  getModuleExistingNames(excludedList: Array<Module> = []) {
1367
1377
  const excludedSet = new Set(excludedList);
1368
1378
  return (this.dependencies || []).filter((item) => !excludedSet.has(item)).map((item) => item.name);
@@ -1770,47 +1780,50 @@ export class App extends BaseNode {
1770
1780
  return node;
1771
1781
  }
1772
1782
 
1783
+
1784
+
1785
+
1773
1786
  /**
1774
- * 删除实体
1775
- * @param name 实体名称
1787
+ * 删除数据源
1788
+ * @param name 数据源名称
1776
1789
  */
1777
- removeEntity(name: string): void;
1790
+ removeDataSource(name: string): void;
1778
1791
 
1779
1792
  /**
1780
- * 删除实体
1781
- * @param entity 已有的实体实例
1793
+ * 删除数据源
1794
+ * @param dataSource 已有的数据源实例
1782
1795
  */
1783
- removeEntity(entity: Entity): void;
1796
+ removeDataSource(dataSource: DataSource): void;
1784
1797
 
1785
- removeEntity(options: string | Entity) {
1786
- let entity: Entity;
1798
+ removeDataSource(options: string | DataSource) {
1799
+ let dataSource: DataSource;
1787
1800
  if (typeof options === 'string') {
1788
- entity = this.entities.find((item) => item.name === options);
1789
- if (!entity) {
1790
- throw new Error('找不到实体 ' + options);
1801
+ dataSource = this.dataSources.find((item) => item.name === options);
1802
+ if (!dataSource) {
1803
+ throw new Error('找不到数据源 ' + options);
1791
1804
  }
1792
1805
  } else {
1793
- entity = options;
1806
+ dataSource = options;
1794
1807
  }
1795
- return entity.delete();
1808
+ return dataSource.delete();
1796
1809
  }
1797
1810
 
1798
- __removeEntity(entity: Entity) {
1799
- const parentKey = entity.parentKey;
1811
+ __removeDataSource(dataSource: DataSource) {
1812
+ const parentKey = dataSource.parentKey;
1800
1813
  const params: Params = {
1801
1814
  parentNode: this,
1802
1815
  parentKey,
1803
1816
  index: -1,
1804
1817
  object: null,
1805
- oldObject: entity,
1818
+ oldObject: dataSource,
1806
1819
  };
1807
1820
  if (parentKey) {
1808
1821
  params.parentKey = parentKey;
1809
1822
  if (Array.isArray((this as any)[parentKey])) {
1810
- const index = (this as any)[parentKey].indexOf(entity);
1823
+ const index = (this as any)[parentKey].indexOf(dataSource);
1811
1824
  ~index && (this as any)[parentKey].splice(index, 1);
1812
1825
  params.index = index;
1813
- } else if ((this as any)[parentKey] === entity) {
1826
+ } else if ((this as any)[parentKey] === dataSource) {
1814
1827
  params.index = 0;
1815
1828
  (this as any)[parentKey] = undefined;
1816
1829
  }
@@ -1818,6 +1831,8 @@ export class App extends BaseNode {
1818
1831
  return params;
1819
1832
  }
1820
1833
 
1834
+
1835
+
1821
1836
  /**
1822
1837
  * 删除数据结构
1823
1838
  * @param name 数据结构名称
@@ -1866,6 +1881,8 @@ export class App extends BaseNode {
1866
1881
  return params;
1867
1882
  }
1868
1883
 
1884
+
1885
+
1869
1886
  /**
1870
1887
  * 删除枚举
1871
1888
  * @param name 枚举名称
@@ -1914,6 +1931,8 @@ export class App extends BaseNode {
1914
1931
  return params;
1915
1932
  }
1916
1933
 
1934
+
1935
+
1917
1936
  /**
1918
1937
  * 删除逻辑
1919
1938
  * @param name 逻辑名称
@@ -1962,6 +1981,8 @@ export class App extends BaseNode {
1962
1981
  return params;
1963
1982
  }
1964
1983
 
1984
+
1985
+
1965
1986
  /**
1966
1987
  * 删除接口
1967
1988
  * @param name 接口名称
@@ -2010,6 +2031,8 @@ export class App extends BaseNode {
2010
2031
  return params;
2011
2032
  }
2012
2033
 
2034
+
2035
+
2013
2036
  /**
2014
2037
  * 删除页面
2015
2038
  * @param name 页面名称
@@ -2058,6 +2081,8 @@ export class App extends BaseNode {
2058
2081
  return params;
2059
2082
  }
2060
2083
 
2084
+
2085
+
2061
2086
  /**
2062
2087
  * 删除流程
2063
2088
  * @param name 流程名称
@@ -2106,6 +2131,8 @@ export class App extends BaseNode {
2106
2131
  return params;
2107
2132
  }
2108
2133
 
2134
+
2135
+
2109
2136
  /**
2110
2137
  * 删除角色
2111
2138
  * @param name 角色名称
@@ -2154,6 +2181,8 @@ export class App extends BaseNode {
2154
2181
  return params;
2155
2182
  }
2156
2183
 
2184
+
2185
+
2157
2186
  /**
2158
2187
  * 删除主题
2159
2188
  * @param name 主题名称
@@ -2202,6 +2231,8 @@ export class App extends BaseNode {
2202
2231
  return params;
2203
2232
  }
2204
2233
 
2234
+
2235
+
2205
2236
  /**
2206
2237
  * 删除配置管理
2207
2238
  * @param name 配置管理名称
@@ -2250,6 +2281,8 @@ export class App extends BaseNode {
2250
2281
  return params;
2251
2282
  }
2252
2283
 
2284
+
2285
+
2253
2286
  /**
2254
2287
  * 删除模块
2255
2288
  * @param name 模块名称
@@ -2275,6 +2308,8 @@ export class App extends BaseNode {
2275
2308
  return module.delete();
2276
2309
  }
2277
2310
 
2311
+
2312
+
2278
2313
  /**
2279
2314
  * 删除模块
2280
2315
  * @param name 模块名称
@@ -2300,6 +2335,8 @@ export class App extends BaseNode {
2300
2335
  return module.delete();
2301
2336
  }
2302
2337
 
2338
+
2339
+
2303
2340
  /**
2304
2341
  * 删除模块
2305
2342
  * @param name 模块名称
@@ -2356,8 +2393,12 @@ export class App extends BaseNode {
2356
2393
  return this.componentDependencies.find((componentDependency) => componentDependency.name === name);
2357
2394
  }
2358
2395
 
2359
- findEntityByName(name: string) {
2360
- return this.entities.find((entity) => entity.name === name);
2396
+ findDataSourceByName(name: string) {
2397
+ return this.dataSources.find((dataSourceItem) => dataSourceItem.name === name);
2398
+ }
2399
+
2400
+ get defaultDS() {
2401
+ return this.dataSources?.find((dataSource) => dataSource.name === 'defaultDS');
2361
2402
  }
2362
2403
 
2363
2404
  findEnumByName(name: string) {
@@ -2430,7 +2471,7 @@ export class App extends BaseNode {
2430
2471
  * 获取命名空间
2431
2472
  */
2432
2473
  getNamespace() {
2433
- return `app`;
2474
+ return 'app';
2434
2475
  }
2435
2476
 
2436
2477
  getTsNamespace() {
@@ -2461,6 +2502,35 @@ export class App extends BaseNode {
2461
2502
  return node;
2462
2503
  }
2463
2504
 
2505
+ findNodeByCompleteName(completeName: string) {
2506
+ const nameArr = completeName?.split('.') || [];
2507
+ const start = nameArr.shift();
2508
+ let node: any = this;
2509
+ const mod = 0;
2510
+ const modulesMap: any = {
2511
+ extensions: node.dependencies,
2512
+ apis: node.interfaceDependencies,
2513
+ };
2514
+ const modules = modulesMap[start];
2515
+ if (Array.isArray(modules)) {
2516
+ const moduleName = nameArr.shift();
2517
+ node = modules.find((moduleItem) => moduleItem.name === moduleName);
2518
+ }
2519
+ for (let index = 0; index < nameArr.length; index++) {
2520
+ if (!node) {
2521
+ return null;
2522
+ }
2523
+ const nameItem = nameArr[index];
2524
+ const isKeyword = index % 2 === mod;
2525
+ if (!isKeyword && Array.isArray(node)) {
2526
+ node = node.find(({ name }) => name === nameItem);
2527
+ } else {
2528
+ node = node[nameItem];
2529
+ }
2530
+ }
2531
+ return node;
2532
+ }
2533
+
2464
2534
  /**
2465
2535
  * @param path 路径
2466
2536
  * path 为要查找路径:如 /dashboard/student/list、/dashboard/student/list
@@ -2567,7 +2637,7 @@ ${keys.map((key) => ` ${key}: ${this.theme?.variableMap[key]};`).join('\n')}
2567
2637
  //================================================================================
2568
2638
  }
2569
2639
 
2570
- classMap.App = App;
2640
+ classMap['App'] = App;
2571
2641
  export default App;
2572
2642
  //================================================================================
2573
2643
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -209,7 +209,7 @@ export class Argument extends LogicItem {
209
209
  //================================================================================
210
210
  }
211
211
 
212
- classMap['Argument'] = Argument;
212
+ classMap.Argument = Argument;
213
213
  export default Argument;
214
214
  //================================================================================
215
215
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -459,7 +459,7 @@ export class Assignee extends LogicItem {
459
459
  //================================================================================
460
460
  }
461
461
 
462
- classMap['Assignee'] = Assignee;
462
+ classMap.Assignee = Assignee;
463
463
  export default Assignee;
464
464
  //================================================================================
465
465
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -231,7 +231,7 @@ export class Assignment extends LogicItem {
231
231
  //================================================================================
232
232
  }
233
233
 
234
- classMap['Assignment'] = Assignment;
234
+ classMap.Assignment = Assignment;
235
235
  export default Assignment;
236
236
  //================================================================================
237
237
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -244,7 +244,7 @@ export class Attribute extends BaseNode {
244
244
  //================================================================================
245
245
  }
246
246
 
247
- classMap['Attribute'] = Attribute;
247
+ classMap.Attribute = Attribute;
248
248
  export default Attribute;
249
249
  //================================================================================
250
250
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -281,7 +281,7 @@ export class BinaryExpression extends LogicItem {
281
281
  //================================================================================
282
282
  }
283
283
 
284
- classMap['BinaryExpression'] = BinaryExpression;
284
+ classMap.BinaryExpression = BinaryExpression;
285
285
  export default BinaryExpression;
286
286
  //================================================================================
287
287
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -548,9 +548,9 @@ export class BindAttribute extends BaseNode {
548
548
  toEmbeddedTS(state?: TranslatorState): string {
549
549
  let code = '';
550
550
  if (this.name === 'destination') {
551
- code += this.destination.toEmbeddedTS(shiftState(state, code, { tabSize: state.tabSize + 1 }));
551
+ code += this.destination.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
552
552
  } else if (this.expression) {
553
- code += this.expression.toEmbeddedTS(shiftState(state, code, { tabSize: state.tabSize + 1 }));
553
+ code += this.expression.toEmbeddedTS(shiftState(state, code, { tabSize: (state?.tabSize || 0) + 1 }));
554
554
  }
555
555
  return code;
556
556
  }
@@ -560,7 +560,7 @@ export class BindAttribute extends BaseNode {
560
560
  //================================================================================
561
561
  }
562
562
 
563
- classMap['BindAttribute'] = BindAttribute;
563
+ classMap.BindAttribute = BindAttribute;
564
564
  export default BindAttribute;
565
565
  //================================================================================
566
566
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -253,7 +253,7 @@ export class BindDirective extends BaseNode {
253
253
  //================================================================================
254
254
  }
255
255
 
256
- classMap['BindDirective'] = BindDirective;
256
+ classMap.BindDirective = BindDirective;
257
257
  export default BindDirective;
258
258
  //================================================================================
259
259
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
@@ -339,10 +339,10 @@ export class BindEvent extends BaseNode {
339
339
  return `${this.calleeKey}();`;
340
340
  }
341
341
  let code = `${this.toHump(this.name) || '__IDENTIFIER__'}: (event) => [\n`;
342
- code += indent(state.tabSize + 1);
342
+ code += indent((state?.tabSize || 0) + 1);
343
343
  code += `() => {${this.calleeKey}()}`;
344
344
  code += '\n';
345
- code += indent(state.tabSize);
345
+ code += indent((state?.tabSize || 0));
346
346
  code += '],\n';
347
347
  return code;
348
348
  }
@@ -354,10 +354,10 @@ export class BindEvent extends BaseNode {
354
354
  // let code = '';
355
355
  // if (this.name) {
356
356
  // code = `function ${this.name || '__IDENTIFIER__'} () {\n`;
357
- // code += indent(state.tabSize + 1);
357
+ // code += indent((state?.tabSize || 0) + 1);
358
358
  // code += `${this.calleeKey}()`;
359
359
  // code += '\n';
360
- // code += indent(state.tabSize);
360
+ // code += indent((state?.tabSize || 0));
361
361
  // code += '};\n';
362
362
  // }
363
363
  // return code;
@@ -367,8 +367,12 @@ export class BindEvent extends BaseNode {
367
367
  * 设置callee
368
368
  */
369
369
  setCallee(logic: Logic) {
370
+ let calleeNamespace = logic.getNamespace();
371
+ if (logic.parentNode instanceof View) {
372
+ calleeNamespace = '';
373
+ }
370
374
  const object = {
371
- calleeNamespace: logic.getNamespace(),
375
+ calleeNamespace,
372
376
  calleeName: logic.name,
373
377
  };
374
378
  this.update({
@@ -436,7 +440,7 @@ export class BindEvent extends BaseNode {
436
440
  //================================================================================
437
441
  }
438
442
 
439
- classMap['BindEvent'] = BindEvent;
443
+ classMap.BindEvent = BindEvent;
440
444
  export default BindEvent;
441
445
  //================================================================================
442
446
  // ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑