@lcap/nasl 2.12.0-beta → 2.12.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/out/automate/engine/index.d.ts +1 -0
  2. package/out/automate/engine/index.js +23 -12
  3. package/out/automate/engine/index.js.map +1 -1
  4. package/out/automate/engine/operators.d.ts +10 -2
  5. package/out/automate/engine/operators.js +105 -7
  6. package/out/automate/engine/operators.js.map +1 -1
  7. package/out/automate/engine/uniqueName.d.ts +8 -2
  8. package/out/automate/engine/uniqueName.js +72 -4
  9. package/out/automate/engine/uniqueName.js.map +1 -1
  10. package/out/automate/engine/utils.js +4 -1
  11. package/out/automate/engine/utils.js.map +1 -1
  12. package/out/automate/template/process.d.ts +9 -0
  13. package/out/automate/template/process.js +10976 -0
  14. package/out/automate/template/process.js.map +1 -0
  15. package/out/bak/translator.js +1 -0
  16. package/out/bak/translator.js.map +1 -1
  17. package/out/common/BaseNode.d.ts +5 -0
  18. package/out/common/BaseNode.js +24 -3
  19. package/out/common/BaseNode.js.map +1 -1
  20. package/out/concepts/App__.js +3 -2
  21. package/out/concepts/App__.js.map +1 -1
  22. package/out/concepts/Argument__.js +1 -1
  23. package/out/concepts/Argument__.js.map +1 -1
  24. package/out/concepts/Assignee__.js +1 -1
  25. package/out/concepts/Assignee__.js.map +1 -1
  26. package/out/concepts/Assignment__.js +1 -1
  27. package/out/concepts/Assignment__.js.map +1 -1
  28. package/out/concepts/Attribute__.js +1 -1
  29. package/out/concepts/Attribute__.js.map +1 -1
  30. package/out/concepts/BinaryExpression__.js +1 -1
  31. package/out/concepts/BinaryExpression__.js.map +1 -1
  32. package/out/concepts/BindAttribute__.js +1 -1
  33. package/out/concepts/BindAttribute__.js.map +1 -1
  34. package/out/concepts/BindDirective__.js +9 -2
  35. package/out/concepts/BindDirective__.js.map +1 -1
  36. package/out/concepts/BindEvent__.js +6 -2
  37. package/out/concepts/BindEvent__.js.map +1 -1
  38. package/out/concepts/BooleanLiteral__.d.ts +4 -0
  39. package/out/concepts/BooleanLiteral__.js +12 -1
  40. package/out/concepts/BooleanLiteral__.js.map +1 -1
  41. package/out/concepts/CallFunction__.js +2 -1
  42. package/out/concepts/CallFunction__.js.map +1 -1
  43. package/out/concepts/CallInterface__.js +1 -1
  44. package/out/concepts/CallInterface__.js.map +1 -1
  45. package/out/concepts/CallLogic__.js +27 -11
  46. package/out/concepts/CallLogic__.js.map +1 -1
  47. package/out/concepts/CallQueryComponent__.d.ts +1 -1
  48. package/out/concepts/CallQueryComponent__.js +3 -3
  49. package/out/concepts/CallQueryComponent__.js.map +1 -1
  50. package/out/concepts/Comment__.js +1 -1
  51. package/out/concepts/Comment__.js.map +1 -1
  52. package/out/concepts/CompletionProperty__.js +1 -1
  53. package/out/concepts/CompletionProperty__.js.map +1 -1
  54. package/out/concepts/ConfigGroup__.js +1 -1
  55. package/out/concepts/ConfigGroup__.js.map +1 -1
  56. package/out/concepts/ConfigPropertyValue__.js +1 -1
  57. package/out/concepts/ConfigPropertyValue__.js.map +1 -1
  58. package/out/concepts/ConfigProperty__.js +1 -1
  59. package/out/concepts/ConfigProperty__.js.map +1 -1
  60. package/out/concepts/Configuration__.js +1 -1
  61. package/out/concepts/Configuration__.js.map +1 -1
  62. package/out/concepts/Constant__.js +1 -1
  63. package/out/concepts/Constant__.js.map +1 -1
  64. package/out/concepts/DataElement__.js +1 -1
  65. package/out/concepts/DataElement__.js.map +1 -1
  66. package/out/concepts/DataSource__.js +2 -0
  67. package/out/concepts/DataSource__.js.map +1 -1
  68. package/out/concepts/End__.js +1 -1
  69. package/out/concepts/End__.js.map +1 -1
  70. package/out/concepts/EntityIndex__.js +1 -1
  71. package/out/concepts/EntityIndex__.js.map +1 -1
  72. package/out/concepts/EntityProperty__.js +1 -1
  73. package/out/concepts/EntityProperty__.js.map +1 -1
  74. package/out/concepts/Entity__.js +1 -1
  75. package/out/concepts/Entity__.js.map +1 -1
  76. package/out/concepts/EnumItem__.js +1 -1
  77. package/out/concepts/EnumItem__.js.map +1 -1
  78. package/out/concepts/Enum__.js +1 -1
  79. package/out/concepts/Enum__.js.map +1 -1
  80. package/out/concepts/Event__.js +1 -1
  81. package/out/concepts/Event__.js.map +1 -1
  82. package/out/concepts/ForEachStatement__.js +1 -1
  83. package/out/concepts/ForEachStatement__.js.map +1 -1
  84. package/out/concepts/Function__.js +2 -2
  85. package/out/concepts/Function__.js.map +1 -1
  86. package/out/concepts/Identifier__.js +3 -2
  87. package/out/concepts/Identifier__.js.map +1 -1
  88. package/out/concepts/IfStatement__.js +1 -1
  89. package/out/concepts/IfStatement__.js.map +1 -1
  90. package/out/concepts/InterfaceParam__.js +1 -1
  91. package/out/concepts/InterfaceParam__.js.map +1 -1
  92. package/out/concepts/Interface__.js +2 -2
  93. package/out/concepts/Interface__.js.map +1 -1
  94. package/out/concepts/JSBlock__.js +2 -4
  95. package/out/concepts/JSBlock__.js.map +1 -1
  96. package/out/concepts/LogicItem__.js +1 -1
  97. package/out/concepts/LogicItem__.js.map +1 -1
  98. package/out/concepts/Logic__.js +7 -6
  99. package/out/concepts/Logic__.js.map +1 -1
  100. package/out/concepts/MemberExpression__.js +1 -1
  101. package/out/concepts/MemberExpression__.js.map +1 -1
  102. package/out/concepts/Module__.d.ts +118 -112
  103. package/out/concepts/Module__.js +25 -7
  104. package/out/concepts/Module__.js.map +1 -1
  105. package/out/concepts/Namespace__.js +2 -2
  106. package/out/concepts/Namespace__.js.map +1 -1
  107. package/out/concepts/NullLiteral__.js +1 -1
  108. package/out/concepts/NullLiteral__.js.map +1 -1
  109. package/out/concepts/NumericLiteral__.js +1 -1
  110. package/out/concepts/NumericLiteral__.js.map +1 -1
  111. package/out/concepts/Param__.js +2 -2
  112. package/out/concepts/Param__.js.map +1 -1
  113. package/out/concepts/Point__.js +1 -1
  114. package/out/concepts/Point__.js.map +1 -1
  115. package/out/concepts/ProcessComponent__.js +1 -1
  116. package/out/concepts/ProcessComponent__.js.map +1 -1
  117. package/out/concepts/ProcessElement__.js +7 -2
  118. package/out/concepts/ProcessElement__.js.map +1 -1
  119. package/out/concepts/ProcessOutcome__.js +1 -1
  120. package/out/concepts/ProcessOutcome__.js.map +1 -1
  121. package/out/concepts/Process__.d.ts +1 -1
  122. package/out/concepts/Process__.js +2 -2
  123. package/out/concepts/Process__.js.map +1 -1
  124. package/out/concepts/QueryAggregateExpression__.js +1 -1
  125. package/out/concepts/QueryAggregateExpression__.js.map +1 -1
  126. package/out/concepts/QueryFieldExpression__.js +1 -1
  127. package/out/concepts/QueryFieldExpression__.js.map +1 -1
  128. package/out/concepts/QueryFromExpression__.js +1 -1
  129. package/out/concepts/QueryFromExpression__.js.map +1 -1
  130. package/out/concepts/QueryGroupByExpression__.js +1 -1
  131. package/out/concepts/QueryGroupByExpression__.js.map +1 -1
  132. package/out/concepts/QueryJoinExpression__.js +1 -1
  133. package/out/concepts/QueryJoinExpression__.js.map +1 -1
  134. package/out/concepts/QueryLimitExpression__.js +1 -1
  135. package/out/concepts/QueryLimitExpression__.js.map +1 -1
  136. package/out/concepts/QueryOrderByExpression__.js +1 -1
  137. package/out/concepts/QueryOrderByExpression__.js.map +1 -1
  138. package/out/concepts/QuerySelectExpression__.js +1 -1
  139. package/out/concepts/QuerySelectExpression__.js.map +1 -1
  140. package/out/concepts/Rect__.js +1 -1
  141. package/out/concepts/Rect__.js.map +1 -1
  142. package/out/concepts/Return__.js +2 -2
  143. package/out/concepts/Return__.js.map +1 -1
  144. package/out/concepts/Role__.js +1 -1
  145. package/out/concepts/Role__.js.map +1 -1
  146. package/out/concepts/Slot__.js +1 -1
  147. package/out/concepts/Slot__.js.map +1 -1
  148. package/out/concepts/SqlQueryComponent__.d.ts +4 -0
  149. package/out/concepts/SqlQueryComponent__.js +16 -0
  150. package/out/concepts/SqlQueryComponent__.js.map +1 -1
  151. package/out/concepts/Start__.js +1 -1
  152. package/out/concepts/Start__.js.map +1 -1
  153. package/out/concepts/StringLiteral__.d.ts +1 -1
  154. package/out/concepts/StringLiteral__.js +2 -2
  155. package/out/concepts/StringLiteral__.js.map +1 -1
  156. package/out/concepts/StructureProperty__.js +5 -4
  157. package/out/concepts/StructureProperty__.js.map +1 -1
  158. package/out/concepts/Structure__.js +1 -1
  159. package/out/concepts/Structure__.js.map +1 -1
  160. package/out/concepts/SwitchCase__.d.ts +1 -1
  161. package/out/concepts/SwitchCase__.js +19 -21
  162. package/out/concepts/SwitchCase__.js.map +1 -1
  163. package/out/concepts/SwitchStatement__.js +2 -7
  164. package/out/concepts/SwitchStatement__.js.map +1 -1
  165. package/out/concepts/Theme__.js +1 -1
  166. package/out/concepts/Theme__.js.map +1 -1
  167. package/out/concepts/Transactional__.js +1 -1
  168. package/out/concepts/Transactional__.js.map +1 -1
  169. package/out/concepts/TypeAnnotation__.js +2 -2
  170. package/out/concepts/TypeAnnotation__.js.map +1 -1
  171. package/out/concepts/TypeParam__.js +1 -1
  172. package/out/concepts/TypeParam__.js.map +1 -1
  173. package/out/concepts/UnaryExpression__.js +1 -1
  174. package/out/concepts/UnaryExpression__.js.map +1 -1
  175. package/out/concepts/Unparsed__.js +1 -1
  176. package/out/concepts/Unparsed__.js.map +1 -1
  177. package/out/concepts/UseComponent__.js +1 -1
  178. package/out/concepts/UseComponent__.js.map +1 -1
  179. package/out/concepts/ValidationRule__.js +1 -1
  180. package/out/concepts/ValidationRule__.js.map +1 -1
  181. package/out/concepts/Variable__.js +2 -2
  182. package/out/concepts/Variable__.js.map +1 -1
  183. package/out/concepts/ViewComponent__.js +1 -1
  184. package/out/concepts/ViewComponent__.js.map +1 -1
  185. package/out/concepts/ViewElement__.js +9 -4
  186. package/out/concepts/ViewElement__.js.map +1 -1
  187. package/out/concepts/View__.d.ts +0 -2
  188. package/out/concepts/View__.js +4 -11
  189. package/out/concepts/View__.js.map +1 -1
  190. package/out/concepts/WhileStatement__.js +1 -1
  191. package/out/concepts/WhileStatement__.js.map +1 -1
  192. package/out/concepts/basics/stdlib/nasl.auth.js +20 -0
  193. package/out/concepts/basics/stdlib/nasl.auth.js.map +1 -1
  194. package/out/concepts/basics/stdlib/nasl.process.d.ts +4 -0
  195. package/out/concepts/basics/stdlib/nasl.process.js +410 -0
  196. package/out/concepts/basics/stdlib/nasl.process.js.map +1 -1
  197. package/out/concepts/basics/stdlib/nasl.ui.js +1 -11
  198. package/out/concepts/basics/stdlib/nasl.ui.js.map +1 -1
  199. package/out/concepts/basics/stdlib/nasl.util.js +25 -25
  200. package/out/concepts/basics/stdlib/nasl.util.js.map +1 -1
  201. package/out/concepts/basics/types/index.d.ts +1 -0
  202. package/out/concepts/basics/types/index.js +4 -1
  203. package/out/concepts/basics/types/index.js.map +1 -1
  204. package/out/generator/genBundleFiles.d.ts +3 -1
  205. package/out/generator/genBundleFiles.js +16 -3
  206. package/out/generator/genBundleFiles.js.map +1 -1
  207. package/out/generator/genMetaData.d.ts +1 -0
  208. package/out/generator/genMetaData.js +7 -0
  209. package/out/generator/genMetaData.js.map +1 -1
  210. package/out/index.d.ts +1 -1
  211. package/out/index.js +2 -1
  212. package/out/index.js.map +1 -1
  213. package/out/server/getLogics.js +18 -0
  214. package/out/server/getLogics.js.map +1 -1
  215. package/out/server/getMemberIdentifier.js +5 -0
  216. package/out/server/getMemberIdentifier.js.map +1 -1
  217. package/out/server/getProcesses.d.ts +1 -0
  218. package/out/server/getProcesses.js +9 -1
  219. package/out/server/getProcesses.js.map +1 -1
  220. package/out/server/naslServer.d.ts +1 -0
  221. package/out/server/naslServer.js +98 -23
  222. package/out/server/naslServer.js.map +1 -1
  223. package/out/server/translator.js +21 -3
  224. package/out/server/translator.js.map +1 -1
  225. package/out/service/creator/errHandles.js +5 -0
  226. package/out/service/creator/errHandles.js.map +1 -1
  227. package/out/service/storage/init.d.ts +1 -0
  228. package/out/service/storage/init.js +94 -83
  229. package/out/service/storage/init.js.map +1 -1
  230. package/out/templator/genCreateBlock.js +20 -14
  231. package/out/templator/genCreateBlock.js.map +1 -1
  232. package/out/templator/genCurdEditMultipleKeyBlock.js +13 -6
  233. package/out/templator/genCurdEditMultipleKeyBlock.js.map +1 -1
  234. package/out/templator/genCurdMultipleKeyBlock.js +20 -8
  235. package/out/templator/genCurdMultipleKeyBlock.js.map +1 -1
  236. package/out/templator/genEditTableBlock.js +3 -1
  237. package/out/templator/genEditTableBlock.js.map +1 -1
  238. package/out/templator/genEnumSelectBlock.js +1 -1
  239. package/out/templator/genEnumSelectBlock.js.map +1 -1
  240. package/out/templator/genGridViewBlock.js +8 -4
  241. package/out/templator/genGridViewBlock.js.map +1 -1
  242. package/out/templator/genListViewBlock.js +1 -2
  243. package/out/templator/genListViewBlock.js.map +1 -1
  244. package/out/templator/genQueryComponent.js +20 -21
  245. package/out/templator/genQueryComponent.js.map +1 -1
  246. package/out/templator/genTableBlock.js +14 -6
  247. package/out/templator/genTableBlock.js.map +1 -1
  248. package/out/templator/genUpdateBlock.js +20 -14
  249. package/out/templator/genUpdateBlock.js.map +1 -1
  250. package/out/utils/index.d.ts +1 -0
  251. package/out/utils/index.js +19 -1
  252. package/out/utils/index.js.map +1 -1
  253. package/package.json +1 -1
  254. package/src/automate/engine/index.js +21 -7
  255. package/src/automate/engine/operators.js +114 -17
  256. package/src/automate/engine/uniqueName.js +77 -9
  257. package/src/automate/engine/utils.js +4 -2
  258. package/src/automate/template/process.js +10999 -0
  259. package/src/bak/translator.js +1 -0
  260. package/src/common/BaseNode.ts +21 -4
  261. package/src/concepts/App__.ts +4 -40
  262. package/src/concepts/Argument__.ts +1 -1
  263. package/src/concepts/Assignee__.ts +1 -1
  264. package/src/concepts/Assignment__.ts +1 -1
  265. package/src/concepts/Attribute__.ts +1 -1
  266. package/src/concepts/BinaryExpression__.ts +1 -1
  267. package/src/concepts/BindAttribute__.ts +1 -1
  268. package/src/concepts/BindDirective__.ts +8 -6
  269. package/src/concepts/BindEvent__.ts +6 -2
  270. package/src/concepts/BooleanLiteral__.ts +13 -1
  271. package/src/concepts/CallFunction__.ts +15 -14
  272. package/src/concepts/CallInterface__.ts +1 -1
  273. package/src/concepts/CallLogic__.ts +26 -11
  274. package/src/concepts/CallQueryComponent__.ts +32 -4
  275. package/src/concepts/Comment__.ts +1 -1
  276. package/src/concepts/CompletionProperty__.ts +1 -1
  277. package/src/concepts/ConfigGroup__.ts +1 -1
  278. package/src/concepts/ConfigPropertyValue__.ts +1 -1
  279. package/src/concepts/ConfigProperty__.ts +1 -1
  280. package/src/concepts/Configuration__.ts +1 -1
  281. package/src/concepts/Constant__.ts +1 -1
  282. package/src/concepts/DataElement__.ts +1 -1
  283. package/src/concepts/DataSource__.ts +2 -0
  284. package/src/concepts/End__.ts +1 -1
  285. package/src/concepts/EntityIndex__.ts +1 -1
  286. package/src/concepts/EntityProperty__.ts +1 -1
  287. package/src/concepts/Entity__.ts +1 -1
  288. package/src/concepts/EnumItem__.ts +1 -1
  289. package/src/concepts/Enum__.ts +1 -1
  290. package/src/concepts/Event__.ts +1 -1
  291. package/src/concepts/ForEachStatement__.ts +1 -1
  292. package/src/concepts/Function__.ts +5 -5
  293. package/src/concepts/Identifier__.ts +3 -2
  294. package/src/concepts/IfStatement__.ts +1 -1
  295. package/src/concepts/InterfaceParam__.ts +1 -1
  296. package/src/concepts/Interface__.ts +2 -2
  297. package/src/concepts/JSBlock__.ts +2 -11
  298. package/src/concepts/LogicItem__.ts +1 -1
  299. package/src/concepts/Logic__.ts +8 -44
  300. package/src/concepts/MemberExpression__.ts +1 -1
  301. package/src/concepts/Module__.ts +141 -147
  302. package/src/concepts/Namespace__.ts +2 -2
  303. package/src/concepts/NullLiteral__.ts +1 -1
  304. package/src/concepts/NumericLiteral__.ts +1 -1
  305. package/src/concepts/Param__.ts +2 -2
  306. package/src/concepts/Point__.ts +1 -1
  307. package/src/concepts/ProcessComponent__.ts +1 -1
  308. package/src/concepts/ProcessElement__.ts +8 -3
  309. package/src/concepts/ProcessOutcome__.ts +1 -1
  310. package/src/concepts/Process__.ts +3 -3
  311. package/src/concepts/QueryAggregateExpression__.ts +1 -1
  312. package/src/concepts/QueryFieldExpression__.ts +1 -1
  313. package/src/concepts/QueryFromExpression__.ts +1 -1
  314. package/src/concepts/QueryGroupByExpression__.ts +1 -1
  315. package/src/concepts/QueryJoinExpression__.ts +1 -1
  316. package/src/concepts/QueryLimitExpression__.ts +1 -1
  317. package/src/concepts/QueryOrderByExpression__.ts +1 -1
  318. package/src/concepts/QuerySelectExpression__.ts +1 -1
  319. package/src/concepts/Rect__.ts +1 -1
  320. package/src/concepts/Return__.ts +2 -2
  321. package/src/concepts/Role__.ts +1 -1
  322. package/src/concepts/Slot__.ts +1 -1
  323. package/src/concepts/SqlQueryComponent__.ts +17 -0
  324. package/src/concepts/Start__.ts +1 -1
  325. package/src/concepts/StringLiteral__.ts +2 -2
  326. package/src/concepts/StructureProperty__.ts +5 -8
  327. package/src/concepts/Structure__.ts +1 -1
  328. package/src/concepts/SwitchCase__.ts +19 -23
  329. package/src/concepts/SwitchStatement__.ts +2 -6
  330. package/src/concepts/Theme__.ts +1 -1
  331. package/src/concepts/Transactional__.ts +1 -1
  332. package/src/concepts/TypeAnnotation__.ts +21 -2
  333. package/src/concepts/TypeParam__.ts +1 -1
  334. package/src/concepts/UnaryExpression__.ts +1 -1
  335. package/src/concepts/Unparsed__.ts +1 -1
  336. package/src/concepts/UseComponent__.ts +1 -1
  337. package/src/concepts/ValidationRule__.ts +1 -1
  338. package/src/concepts/Variable__.ts +2 -2
  339. package/src/concepts/ViewComponent__.ts +1 -1
  340. package/src/concepts/ViewElement__.ts +10 -23
  341. package/src/concepts/View__.ts +6 -13
  342. package/src/concepts/WhileStatement__.ts +1 -1
  343. package/src/concepts/basics/stdlib/nasl.auth.ts +20 -0
  344. package/src/concepts/basics/stdlib/nasl.process.ts +406 -0
  345. package/src/concepts/basics/stdlib/nasl.ui.ts +1 -11
  346. package/src/concepts/basics/stdlib/nasl.util.ts +25 -25
  347. package/src/concepts/basics/types/index.ts +1 -0
  348. package/src/generator/genBundleFiles.ts +21 -5
  349. package/src/generator/genMetaData.ts +10 -1
  350. package/src/index.ts +1 -1
  351. package/src/server/getLogics.ts +18 -1
  352. package/src/server/getMemberIdentifier.ts +4 -0
  353. package/src/server/getProcesses.ts +8 -1
  354. package/src/server/naslServer.ts +107 -28
  355. package/src/server/translator.ts +20 -3
  356. package/src/service/creator/errHandles.js +6 -0
  357. package/src/service/storage/init.ts +96 -85
  358. package/src/templator/genCreateBlock.ts +20 -14
  359. package/src/templator/genCurdEditMultipleKeyBlock.ts +13 -8
  360. package/src/templator/genCurdMultipleKeyBlock.ts +20 -9
  361. package/src/templator/genEditTableBlock.ts +3 -1
  362. package/src/templator/genEnumSelectBlock.ts +1 -1
  363. package/src/templator/genGridViewBlock.ts +8 -4
  364. package/src/templator/genListViewBlock.ts +1 -2
  365. package/src/templator/genQueryComponent.ts +22 -21
  366. package/src/templator/genTableBlock.ts +14 -7
  367. package/src/templator/genUpdateBlock.ts +20 -14
  368. package/src/utils/index.ts +19 -0
@@ -1,4 +1,4 @@
1
- import { App, Module, View, BaseNode, Entity, Structure, Enum, uiStructures, collectionStructures, Logic, Interface, Process } from '../concepts';
1
+ import { App, Module, View, BaseNode, Entity, Structure, Enum, uiStructures, collectionStructures, processStructures, Logic, Interface, Process } from '../concepts';
2
2
  import * as utils from '../utils';
3
3
  import { genHash, RawOptions } from '.';
4
4
  import { compileComponent } from './compileComponent';
@@ -20,8 +20,8 @@ export interface PageOptions {
20
20
  hasUserCenter: boolean;
21
21
  hasAuth: boolean;
22
22
  domainName: string;
23
- nuimsDomain: string;
24
23
  auth: boolean;
24
+ subPage: object;
25
25
  documentTitle?: string;
26
26
  router: {
27
27
  notFound: string;
@@ -44,8 +44,12 @@ export async function genBundleFiles(app: App,
44
44
  USER_STATIC_URL: string;
45
45
  extendedConfig: string;
46
46
  lowcodeDomain: string;
47
+ envLcpDomain: any,
48
+ envNuimsDomain: any,
47
49
  appid: string;
48
50
  }) {
51
+ const fnNuimsDomain = config?.envNuimsDomain?.[config?.env] || config?.nuimsDomain;
52
+ const fnLowcodeDomain = config?.envLcpDomain?.[config?.env]?.lcpDomain || config?.lowcodeDomain;
49
53
  const modules: Module[] = [];
50
54
  const views: View[] = [];
51
55
  const entities: Entity[] = [];
@@ -135,8 +139,8 @@ export async function genBundleFiles(app: App,
135
139
  hasUserCenter: app.hasUserCenter,
136
140
  hasAuth: app.hasAuth,
137
141
  domainName: app.name,
138
- nuimsDomain: config.nuimsDomain,
139
142
  auth: view.auth,
143
+ subPage: view.children,
140
144
  documentTitle: app.documentTitle,
141
145
  router: {
142
146
  notFound: '/',
@@ -217,6 +221,14 @@ export async function genBundleFiles(app: App,
217
221
  });
218
222
  }
219
223
 
224
+ if (Array.isArray(processStructures)) {
225
+ const namespace = 'nasl.process';
226
+ processStructures.forEach((node) => {
227
+ const id = `${namespace}.${node.name}`;
228
+ dataTypesMap[id] = node;
229
+ });
230
+ }
231
+
220
232
  if (Array.isArray(logics)) {
221
233
  allLogics.push(...logics);
222
234
  }
@@ -252,9 +264,11 @@ export async function genBundleFiles(app: App,
252
264
  },
253
265
  },
254
266
  extendedConfig: config.extendedConfig,
255
- lowcodeDomain: config.lowcodeDomain,
267
+ lowcodeDomain: fnLowcodeDomain,
256
268
  tenant: config.tenant,
257
269
  env: config.env,
270
+ nuimsDomain: fnNuimsDomain,
271
+ envNuimsDomain: config.envNuimsDomain,
258
272
  indexName,
259
273
  }, null, 4);
260
274
 
@@ -341,6 +355,8 @@ export async function genBundleFiles(app: App,
341
355
  tenant: data.tenant,
342
356
  env: data.env,
343
357
  extendedConfig: data.extendedConfig,
358
+ nuimsDomain: data.nuimsDomain,
359
+ envNuimsDomain: data.envNuimsDomain,
344
360
  envConfig: {
345
361
  lowcodeDomain: data.lowcodeDomain,
346
362
  },
@@ -350,7 +366,7 @@ export async function genBundleFiles(app: App,
350
366
 
351
367
  if (config.env === 'dev') {
352
368
  // 加载资源js
353
- const domain = config.lowcodeDomain.slice(config.lowcodeDomain.indexOf('.') + 1);
369
+ const domain = fnLowcodeDomain.slice(fnLowcodeDomain.indexOf('.') + 1);
354
370
  const targetUrl = `${location.origin}/empty?url=${domain}&appid=${config.appid}`;
355
371
  const str = `
356
372
  if(!document.querySelector("iframe[name='iframeEmpty']")){
@@ -1,10 +1,11 @@
1
- import { App, View, BaseNode, Module, Interface, Entity, Structure, Enum, uiStructures, collectionStructures, Logic, Process, DataSource } from '../concepts';
1
+ import { App, View, BaseNode, Module, Interface, Entity, Structure, Enum, uiStructures, collectionStructures, processStructures, Logic, Process, DataSource } from '../concepts';
2
2
 
3
3
  export function genMetaData(app: App,
4
4
  config: {
5
5
  tenant: string;
6
6
  env: string;
7
7
  nuimsDomain: string;
8
+ envNuimsDomain: Object;
8
9
  STATIC_URL: string;
9
10
  USER_STATIC_URL: string;
10
11
  extendedConfig: string;
@@ -127,6 +128,14 @@ export function genMetaData(app: App,
127
128
  });
128
129
  }
129
130
 
131
+ if (Array.isArray(processStructures)) {
132
+ const namespace = 'nasl.process';
133
+ processStructures.forEach((node) => {
134
+ const id = `${namespace}.${node.name}`;
135
+ dataTypesMap[id] = node;
136
+ });
137
+ }
138
+
130
139
  if (Array.isArray(logics)) {
131
140
  allLogics.push(...logics);
132
141
  }
package/src/index.ts CHANGED
@@ -8,5 +8,5 @@ export * as genBlock from './templator';
8
8
  export * as utils from './utils';
9
9
  export * from './config';
10
10
  export * from './eventBus';
11
- export { loadApp, loadAppSync } from './service/storage/init';
11
+ export { loadApp, loadAppSync, handleApp } from './service/storage/init';
12
12
  import './automate/engine';
@@ -128,12 +128,18 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
128
128
  });
129
129
  tree.expanded = true;
130
130
  result.push(tree);
131
-
132
131
  const systemTree = new Namespace({
133
132
  name: 'category',
134
133
  path: `nasl`,
135
134
  title: '系统逻辑',
136
135
  children: [
136
+ new Namespace({
137
+ name: 'category',
138
+ path: `process`,
139
+ title: '流程逻辑',
140
+ logics: stdlibNamespace.findChild('process').logics,
141
+ expanded: true,
142
+ }),
137
143
  new Namespace({
138
144
  name: 'category',
139
145
  path: `browser`,
@@ -158,6 +164,8 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
158
164
  ],
159
165
  expanded: true,
160
166
  });
167
+ if (!app.processes.length)
168
+ systemTree.children.shift();
161
169
 
162
170
  systemTree.expanded = true;
163
171
  systemTree.children.forEach((child) => (child.expanded = true));
@@ -169,6 +177,13 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
169
177
  path: `nasl`,
170
178
  title: '系统逻辑',
171
179
  children: [
180
+ new Namespace({
181
+ name: 'category',
182
+ path: `process`,
183
+ title: '流程逻辑',
184
+ logics: stdlibNamespace.findChild('process').logics,
185
+ expanded: true,
186
+ }),
172
187
  new Namespace({
173
188
  name: 'category',
174
189
  path: `configuration`,
@@ -179,6 +194,8 @@ export async function getLogics(node: CallLogic | BindEvent, needAllLogic: boole
179
194
  ],
180
195
  expanded: true,
181
196
  });
197
+ if (!app.processes.length)
198
+ systemTree.children.shift();
182
199
 
183
200
  systemTree.expanded = true;
184
201
  systemTree.children.forEach((child) => (child.expanded = true));
@@ -76,6 +76,10 @@ function createType2Annotation(type: string): TypeAnnotation {
76
76
  typeAnnotation = TypeAnnotation.createReference(types[types.length - 1], {
77
77
  typeNamespace: 'nasl.ui',
78
78
  });
79
+ } else if (type.startsWith('nasl.process')) {
80
+ typeAnnotation = TypeAnnotation.createReference(types[types.length - 1], {
81
+ typeNamespace: 'nasl.process',
82
+ });
79
83
  } else if (type.startsWith('nasl.collection')) {
80
84
  typeAnnotation = TypeAnnotation.createGeneric(types[types.length - 1], {
81
85
  typeNamespace: 'nasl.collection',
@@ -536,6 +536,13 @@ export function getFlowAfterElements(el: ProcessElement) {
536
536
  const links = elems.filter(e => e.type === 'SequenceFlow' && e.sourceRef === processname);
537
537
  return links;
538
538
  }
539
+ export function getFlowBeforeElements(el: ProcessElement) {
540
+ const process = el.process;
541
+ const processname = el.name;
542
+ const elems = process.elements;
543
+ const links = elems.filter(e => e.type === 'SequenceFlow' && e.targetRef === processname);
544
+ return links;
545
+ }
539
546
 
540
547
  export function isFromStartNode(el: ProcessElement) {
541
548
  const process = el.process;
@@ -587,4 +594,4 @@ export function findNodeAfterNodeInFlow(el: ProcessElement) {
587
594
  });
588
595
  }
589
596
  return Array.from(nodeSet);
590
- }
597
+ }
@@ -46,6 +46,7 @@ import {
46
46
  Variable,
47
47
  DataSource,
48
48
  Assignee,
49
+ SqlQueryComponent,
49
50
  } from '../concepts';
50
51
  import { lsp2tspNumber, SourceMap, SourceMapItem, embeddedTSEmitter } from '../translator';
51
52
  import axios from '../service/storage';
@@ -101,6 +102,10 @@ interface QuoteNode {
101
102
  expanded: boolean;
102
103
  children?: QuoteNode[];
103
104
  }
105
+ let isChangeInterface = false; //判断是否导入接口
106
+ type ActionNode = { target: Variable; typeannotation: TypeAnnotation };
107
+ let actionArr: Array<ActionNode> = []; //用于导入接口收集更改的节点
108
+ let timer: number = null; //超时器用于收集导入接口相关
104
109
  const naslServer = {
105
110
  messager,
106
111
  worker,
@@ -495,8 +500,10 @@ const naslServer = {
495
500
  oldRecord?.semanticDiagnostics.forEach((item) => {
496
501
  item.node ? (item.node.tsErrorDetail = undefined) : '';
497
502
  });
498
-
499
503
  // 语义诊断
504
+ if (isChangeInterface) {
505
+ this.existStructureFix(record.semanticDiagnostics, node as FileNode, this);
506
+ }
500
507
  record.semanticDiagnostics = record.semanticDiagnostics
501
508
  .map((diag) => this._resolveDiagnostic(diag as unknown as tsProtocol.DiagnosticWithFileName, node as FileNode))
502
509
  .filter((diag) => !!diag);
@@ -521,6 +528,7 @@ const naslServer = {
521
528
  record.suggestionDiagnostics = [];
522
529
  // 语法诊断暂时不需要
523
530
  });
531
+
524
532
  return records;
525
533
  },
526
534
  _attachDiagnostics(fileNode: BaseNode): Diagnostic[] {
@@ -529,8 +537,7 @@ const naslServer = {
529
537
  traverse((current) => {
530
538
  if (current.node.tag) {
531
539
  current.node.bindAttrs.forEach((bindAttr) => {
532
- if ((bindAttr.model || bindAttr.sync)
533
- && bindAttr.expression && bindAttr.expression.concept !== 'Identifier' && bindAttr.expression.concept !== 'MemberExpression') {
540
+ if ((bindAttr.model || bindAttr.sync) && bindAttr.expression && bindAttr.expression.concept !== 'Identifier' && bindAttr.expression.concept !== 'MemberExpression') {
534
541
  const diagnostic = {
535
542
  node: bindAttr,
536
543
  severity: 'error',
@@ -549,7 +556,7 @@ const naslServer = {
549
556
  const property = dataSourceGroup.getProperty(fileNode.name);
550
557
  if (property && property.values) {
551
558
  property.values.forEach((propertyValue) => {
552
- if (!propertyValue.value) {
559
+ if (!propertyValue.value && fileNode.name !== 'defaultDS') {
553
560
  const diagnostic = {
554
561
  node: fileNode,
555
562
  severity: 'error',
@@ -572,6 +579,62 @@ const naslServer = {
572
579
 
573
580
  return diagnostics;
574
581
  },
582
+ /* 接口导入查找 */
583
+ existStructureFix(semanticDiagnostics: Diagnostic[], node: FileNode, that: any) {
584
+ let module: Module;
585
+ semanticDiagnostics.map((diag) => {
586
+ const minRange = this._findMinRange(diag as unknown as tsProtocol.DiagnosticWithFileName, node);
587
+ if (diag.text?.includes('has no exported member named')) {
588
+ if (minRange.node instanceof Logic) {
589
+ return null;
590
+ }
591
+ const typeAnnotation = minRange.node instanceof TypeAnnotation ? (minRange.node.upperNode as Variable).typeAnnotation : (minRange.node as Variable).typeAnnotation;
592
+ const regNamespace = /<(\S*)>/;
593
+ const typeKey = (typeAnnotation.typeKey.match(regNamespace) && typeAnnotation.typeKey.match(regNamespace)[1]) || typeAnnotation.typeKey;
594
+ const typeKeyArr = typeKey.split('.');
595
+ if (typeKeyArr[0] === 'apis') {
596
+ const structureName = typeKeyArr[3];
597
+ const moduleName = typeKeyArr[1];
598
+ const app = (typeAnnotation.upperNode as Variable).app;
599
+ if (!app) {
600
+ return null;
601
+ }
602
+ module = app.interfaceDependencies?.find((item) => item.name === moduleName);
603
+ let existStructure = module?.structures?.find((item) => item.name.toUpperCase() === structureName.toUpperCase());
604
+ if (!existStructure) {
605
+ const realName = structureName.replace(/\d*$/, (m) => String(''));
606
+ existStructure = module?.structures?.find((item) => item.name.toUpperCase() === realName.toUpperCase());
607
+ }
608
+ if (existStructure) {
609
+ const editTypeAnnotation = JSON.parse(JSON.stringify(typeAnnotation).replace(new RegExp(structureName, 'g'), existStructure.name));
610
+ actionArr.push({ target: typeAnnotation.parentNode as Variable, typeannotation: editTypeAnnotation });
611
+ }
612
+ }
613
+ return null;
614
+ } else {
615
+ return diag;
616
+ }
617
+ });
618
+ if (actionArr.length) {
619
+ if (timer)
620
+ return;
621
+ timer = window.setTimeout(() => {
622
+ const app = actionArr[0].target.app;
623
+ app.emit('collect:start', {
624
+ actionMsg: '设置导入接口数据类型错误',
625
+ });
626
+ module.isAdd && module.setIsAdd(false);
627
+ actionArr.forEach((item) => {
628
+ item.target.setDataType(TypeAnnotation.from(item.typeannotation));
629
+ });
630
+ app.emit('collect:end');
631
+ actionArr = [];
632
+ isChangeInterface = false;
633
+ clearTimeout(timer);
634
+ timer = null;
635
+ }, 2000);
636
+ }
637
+ },
575
638
  _resolveDiagnostic(diagnostic: tsProtocol.DiagnosticWithFileName, fileNode: FileNode): Diagnostic {
576
639
  const minRange = this._findMinRange(diagnostic, fileNode);
577
640
  const tsErrorDetail = {
@@ -684,7 +747,7 @@ const naslServer = {
684
747
  const entity = this.file2NodeMap.get(item.file);
685
748
  const { currentSource } = naslServer.getCurrentSource(entity);
686
749
  // 32 8个函数的总行数
687
- if (item.end.line < (currentSource.range.end.line - 32) && item.start.line > 1) {
750
+ if (item.end.line < currentSource.range.end.line - 32 && item.start.line > 1) {
688
751
  flag = true;
689
752
  }
690
753
  }
@@ -976,19 +1039,19 @@ const naslServer = {
976
1039
  // logic 和 views名称修改 可能会触发bindEvent修改
977
1040
  if (minRange.node instanceof BindEvent) {
978
1041
  // 页面逻辑直接赋值就可以, 因为是相对路径
979
- if ((node instanceof ViewElement)) {
1042
+ if (node instanceof ViewElement) {
980
1043
  minRange.setTypeMethods = 'setCalleeNamespace';
981
1044
  minRange.newValue = 'elements.' + newValue + '.logics';
982
1045
  } else {
983
1046
  /**
984
- * 如果namespce是 'app.views.Student.views.404.views.505.views.update'
985
- * 在ts中会是'app.views.Student.views.$404.views.$505.views.update'
986
- * 但是505 要改名为 666 ,要存的是666
987
- * 'app.views.Student.views.404.views.666.views.update'
988
- * 1.取到转后的
989
- * 2.在匹配到的内容中取转后的namespace的位置
990
- * 3.然后把namespace中的 $替换成 ''
991
- */
1047
+ * 如果namespce是 'app.views.Student.views.404.views.505.views.update'
1048
+ * 在ts中会是'app.views.Student.views.$404.views.$505.views.update'
1049
+ * 但是505 要改名为 666 ,要存的是666
1050
+ * 'app.views.Student.views.404.views.666.views.update'
1051
+ * 1.取到转后的
1052
+ * 2.在匹配到的内容中取转后的namespace的位置
1053
+ * 3.然后把namespace中的 $替换成 ''
1054
+ */
992
1055
  const tsCalleeNamespace = minRange.node.tsCalleeNamespace;
993
1056
  const oldValue = tsCalleeNamespace;
994
1057
 
@@ -1082,6 +1145,8 @@ const naslServer = {
1082
1145
  minRange.setTypeMethods = 'setRelationNamespace';
1083
1146
  const newValue = setTypeNamespace(minRange.node.relationNamespace, record);
1084
1147
  minRange.newValue = newValue;
1148
+ } else if (minRange.node instanceof SqlQueryComponent) {
1149
+ minRange.setTypeMethods = 'setDataSource';
1085
1150
  }
1086
1151
  }
1087
1152
  if (minRange.node instanceof QueryGroupByExpression && node instanceof Entity) {
@@ -1099,7 +1164,10 @@ const naslServer = {
1099
1164
  }
1100
1165
 
1101
1166
  // 如果跳转链接或者页面变量同一个param和TypeAnnotation 有两个过滤掉一个
1102
- if ((minRange.node instanceof Param || minRange.node instanceof Variable || minRange.node instanceof Return) && (node instanceof Entity || node instanceof Enum || node instanceof Structure)) {
1167
+ if (
1168
+ (minRange.node instanceof Param || minRange.node instanceof Variable || minRange.node instanceof Return)
1169
+ && (node instanceof Entity || node instanceof Enum || node instanceof Structure)
1170
+ ) {
1103
1171
  return null;
1104
1172
  }
1105
1173
  if (minRange.node instanceof Destination && (node instanceof Process || node instanceof ProcessElement)) {
@@ -1138,7 +1206,7 @@ const naslServer = {
1138
1206
  /**
1139
1207
  * 这里过滤一下,一些查找引用,重复的内容,直接屏蔽掉,防止操作重复
1140
1208
  * 因为在生成的时候 ,可能弄了一些副作用的引用
1141
- */
1209
+ */
1142
1210
  // 本来是想在上面过滤一把的先放到这里匹配这两个的时候 就会找到
1143
1211
  // refsList = refsList.filter((item) => {
1144
1212
  // 屏蔽组件查找查到定义这里,也过滤一下
@@ -1153,7 +1221,7 @@ const naslServer = {
1153
1221
  * 流程改名不触发Logic改名
1154
1222
  * 如果是修改param查找到logic就不操作
1155
1223
  * 除非想在内部修改别的内容所以暂时屏蔽掉
1156
- */
1224
+ */
1157
1225
  if (minRange.node instanceof Logic && node !== minRange.node) {
1158
1226
  return null;
1159
1227
  }
@@ -1180,11 +1248,11 @@ const naslServer = {
1180
1248
  if (minRange) {
1181
1249
  // 如果找到节点是callLogic就去更新
1182
1250
  if (minRange.node instanceof CallLogic && node instanceof Param) {
1183
- minRange.node.setCalleeArgName((parantNode) as Logic);
1251
+ minRange.node.setCalleeArgName(parantNode as Logic);
1184
1252
  }
1185
1253
  // 如果节点参数增加页面也要更新
1186
1254
  if (minRange.node instanceof Destination && node instanceof Param) {
1187
- minRange.node.setViewArgument((parantNode) as View);
1255
+ minRange.node.setViewArgument(parantNode as View);
1188
1256
  }
1189
1257
  }
1190
1258
  });
@@ -1202,12 +1270,12 @@ const naslServer = {
1202
1270
  parentNode: parantNode,
1203
1271
  parentKey: node.parentKey,
1204
1272
  });
1205
- naslServer._addParamsEffect(refsList, (node) as Param);
1273
+ naslServer._addParamsEffect(refsList, node as Param);
1206
1274
  // 结束修改 ,批量操作
1207
1275
  App.emit('collect:end');
1208
1276
  return node;
1209
1277
  }
1210
- naslServer._addParamsEffect(refsList, (node) as Param);
1278
+ naslServer._addParamsEffect(refsList, node as Param);
1211
1279
  return node;
1212
1280
  },
1213
1281
  // 查找引用
@@ -1215,10 +1283,10 @@ const naslServer = {
1215
1283
  let refsList = await naslServer._isHaveRef(node);
1216
1284
  // 如果查找引用查到自己里面的引用不展示
1217
1285
  refsList = refsList.filter((item) =>
1218
- // 自己引用自己的过滤掉
1219
- // 删除的时候过滤一把组件删除提示
1220
- // 展示组件自己屏蔽掉
1221
- !item.isDefinition && !(item.lineText.includes(' = new nasl.ui.')));
1286
+ // 自己引用自己的过滤掉
1287
+ // 删除的时候过滤一把组件删除提示
1288
+ // 展示组件自己屏蔽掉
1289
+ !item.isDefinition && !item.lineText.includes(' = new nasl.ui.'));
1222
1290
  // 最后返回的结果
1223
1291
  let result = new Map();
1224
1292
  // 树的构造,key: 一个file的node, 值是 [[logic, params],[logic, returns]]
@@ -1379,7 +1447,14 @@ const naslServer = {
1379
1447
  // 如果没有sourceMap,就继续向上找 ,或者到module结束
1380
1448
  // 如果 节点找到 app 或者module 停止 或者entity找到DataSource为止
1381
1449
  // 如果当前节点是view就不要向上查找了
1382
- while (!sourceMap && fileNode && !(fileNode.parentNode instanceof App) && !(fileNode.parentNode instanceof Module) && !(fileNode.parentNode instanceof DataSource) && !(fileNode instanceof View)) {
1450
+ while (
1451
+ !sourceMap
1452
+ && fileNode
1453
+ && !(fileNode.parentNode instanceof App)
1454
+ && !(fileNode.parentNode instanceof Module)
1455
+ && !(fileNode.parentNode instanceof DataSource)
1456
+ && !(fileNode instanceof View)
1457
+ ) {
1383
1458
  fileNode = fileNode.parentNode;
1384
1459
  sourceMap = fileNode?.sourceMap;
1385
1460
  }
@@ -1584,6 +1659,7 @@ async function incidentalAction(action: string, fileNode: BaseNode, targetNode:
1584
1659
  for (let i = 0; i < fileNodeChildren.length; i++) {
1585
1660
  const fileNodeItem = fileNodeChildren[i];
1586
1661
  const result = (fileNodeItem as FileNode).toEmbeddedTSFile();
1662
+ fileNodeItem.sourceMap = result.sourceMap;
1587
1663
  if (action === 'create') {
1588
1664
  await handleChange(fileNodeItem, fileNodeItem, result, action);
1589
1665
  await incidentalAction(action, fileNodeItem, fileNodeItem);
@@ -1602,7 +1678,10 @@ async function incidentalAction(action: string, fileNode: BaseNode, targetNode:
1602
1678
  // 删除或新增模块
1603
1679
  // 需要把下面的哦内容全部都更新一遍
1604
1680
  if (fileNode instanceof Module) {
1605
- const module: Module = (targetNode) as Module;
1681
+ if (fileNode.type === 'interface' && fileNode.isAdd && action === 'create') {
1682
+ isChangeInterface = true;
1683
+ }
1684
+ const module: Module = targetNode as Module;
1606
1685
  const results: Array<ReturnType<Structure['toEmbeddedTSFile']>> = [];
1607
1686
  naslServer.contentToFile(module, results);
1608
1687
  for (let i = 0; i < results.length; i++) {
@@ -1629,7 +1708,7 @@ async function incidentalAction(action: string, fileNode: BaseNode, targetNode:
1629
1708
  * DataSource只会重命名时候,需要把子集全部重新生成一下
1630
1709
  */
1631
1710
  if (fileNode instanceof DataSource) {
1632
- (fileNode as DataSource).entities.forEach(async(entity) => {
1711
+ (fileNode as DataSource).entities.forEach(async (entity) => {
1633
1712
  try {
1634
1713
  const result = entity.toEmbeddedTSFile();
1635
1714
  const parentPath = oldpath.replace('.ts', '/');
@@ -360,6 +360,8 @@ export function naslNodeTranslateMessage(minRange: MinRange, tsErrorDetail: Diag
360
360
  return null;
361
361
  } else if (text.startsWith(`Namespace 'nasl.ui' has no exported member `)) {
362
362
  return null;
363
+ } else if (text.startsWith(`Function expression, which lacks return-type annotation, implicitly has an 'any[]' return type.`)) {
364
+ return null;
363
365
  }
364
366
  }
365
367
  // 处理bindevent参数没传递的报错
@@ -369,20 +371,35 @@ export function naslNodeTranslateMessage(minRange: MinRange, tsErrorDetail: Diag
369
371
  return null;
370
372
  }
371
373
 
372
- if (node instanceof ProcessElement && (node.type === 'UserTask' || node.type === 'AutoTask')) {
374
+ if (node instanceof ProcessElement && (node.type === 'UserTask' || node.type === 'AutoTask' || node.type === 'StartNoneEvent')) {
375
+ const reg = /Expected (.+?) arguments, but got (.+?)./.exec(text);
373
376
  let u = '用户任务';
374
377
  if(node.type === 'AutoTask') {
375
378
  u = '自动任务';
376
379
  }
377
- tsErrorDetail.message = `${u}出口顺序流个数不能大于1`;
380
+ if(reg[2] === '0') {
381
+ tsErrorDetail.message = `${u}出口顺序流个数不能是0`;
382
+ } else {
383
+ tsErrorDetail.message = `${u}出口顺序流个数不能大于1`;
384
+ }
385
+
386
+ if(node.type === 'StartNoneEvent') {
387
+ tsErrorDetail.message = `开始节点只能有一个出口顺序流`;
388
+ }
378
389
  }
379
390
 
380
391
  if (node instanceof ProcessElement && (node.type === 'ExclusiveGateway' || node.type === 'ParallelGateway')) {
392
+ const reg = /Expected (.+?) arguments, but got (.+?)./.exec(text);
381
393
  let u = '排他网关';
382
394
  if(node.type === 'ParallelGateway') {
383
395
  u = '并行网关';
384
396
  }
385
- tsErrorDetail.message = `${u}出口顺序流个数不能小于2`;
397
+ if(reg[2] === '0') {
398
+ tsErrorDetail.message = `${u}出口顺序流和入口顺序流个数不能等于0`;
399
+ } else {
400
+ tsErrorDetail.message = `${u}出口顺序流和入口顺序流个数同时等于1,该${u}没有意义`;
401
+ }
402
+
386
403
  }
387
404
  }
388
405
 
@@ -26,6 +26,12 @@ export default {
26
26
  if (config.noErrorTip)
27
27
  return;
28
28
 
29
+ // 检测到当前应用拉取操作已被强制结束
30
+ if(err.code === 401650) {
31
+ eventBus.emit('forceCancelPull');
32
+ return;
33
+ }
34
+
29
35
  if (versionStatus[err.code])
30
36
  eventBus.emit('updateVersionStatus', {
31
37
  status: versionStatus[err.code],