@antelopejs/dms-automation 0.6.0 → 0.8.0

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 (262) hide show
  1. package/README.md +21 -7
  2. package/dist/cluster/bus.js +8 -6
  3. package/dist/cluster/bus.js.map +1 -1
  4. package/dist/cluster/leader.js.map +1 -1
  5. package/dist/data/procedures-query.d.ts +19 -0
  6. package/dist/data/procedures-query.js +105 -0
  7. package/dist/data/procedures-query.js.map +1 -0
  8. package/dist/data/procedures-table.d.ts +5 -16
  9. package/dist/data/procedures-table.js +12 -101
  10. package/dist/data/procedures-table.js.map +1 -1
  11. package/dist/data/runs-table.js +0 -5
  12. package/dist/data/runs-table.js.map +1 -1
  13. package/dist/db/models/automation_template.model.d.ts +2 -4
  14. package/dist/db/models/automation_template.model.js +13 -14
  15. package/dist/db/models/automation_template.model.js.map +1 -1
  16. package/dist/db/models/procedure_run.model.js.map +1 -1
  17. package/dist/db/models/stats.model.js.map +1 -1
  18. package/dist/db/tables/procedure.table.d.ts +0 -1
  19. package/dist/db/tables/procedure.table.js +0 -4
  20. package/dist/db/tables/procedure.table.js.map +1 -1
  21. package/dist/db/tables/procedure_run.table.d.ts +2 -1
  22. package/dist/db/tables/procedure_run.table.js.map +1 -1
  23. package/dist/implementations/dms-automation/index.js.map +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/dist/pages/category.js.map +1 -1
  26. package/dist/pages/index.js.map +1 -1
  27. package/dist/pages/overview.js.map +1 -1
  28. package/dist/pages/procedures.js.map +1 -1
  29. package/dist/pages/runs.js.map +1 -1
  30. package/dist/pages/shared.js +1 -1
  31. package/dist/pages/shared.js.map +1 -1
  32. package/dist/realtime.d.ts +2 -1
  33. package/dist/realtime.js.map +1 -1
  34. package/dist/routes/action-types.d.ts +2 -1
  35. package/dist/routes/action-types.js.map +1 -1
  36. package/dist/routes/deleteConfirm.js +4 -3
  37. package/dist/routes/deleteConfirm.js.map +1 -1
  38. package/dist/routes/graphSchema.d.ts +2 -1
  39. package/dist/routes/graphSchema.js +8 -7
  40. package/dist/routes/graphSchema.js.map +1 -1
  41. package/dist/routes/procedureChecks.js +5 -5
  42. package/dist/routes/procedureChecks.js.map +1 -1
  43. package/dist/routes/procedureRuns.d.ts +2 -2
  44. package/dist/routes/procedureRuns.js +1 -1
  45. package/dist/routes/procedureRuns.js.map +1 -1
  46. package/dist/routes/procedures.d.ts +14 -15
  47. package/dist/routes/procedures.js +2 -1
  48. package/dist/routes/procedures.js.map +1 -1
  49. package/dist/routes/requests.d.ts +11 -5
  50. package/dist/routes/requests.js.map +1 -1
  51. package/dist/routes/runs.d.ts +7 -7
  52. package/dist/routes/runs.js +5 -3
  53. package/dist/routes/runs.js.map +1 -1
  54. package/dist/routes/stats.js.map +1 -1
  55. package/dist/routes/templates.d.ts +3 -2
  56. package/dist/routes/templates.js +2 -1
  57. package/dist/routes/templates.js.map +1 -1
  58. package/dist/routes/trigger-types.d.ts +2 -1
  59. package/dist/routes/trigger-types.js.map +1 -1
  60. package/dist/routes/typeConfigShared.d.ts +2 -1
  61. package/dist/routes/typeConfigShared.js.map +1 -1
  62. package/dist/runtime/armErrors.d.ts +0 -1
  63. package/dist/runtime/armErrors.js +0 -7
  64. package/dist/runtime/armErrors.js.map +1 -1
  65. package/dist/runtime/boundRunLog.d.ts +1 -0
  66. package/dist/runtime/boundRunLog.js +11 -11
  67. package/dist/runtime/boundRunLog.js.map +1 -1
  68. package/dist/runtime/builtins/actions/http.js +16 -9
  69. package/dist/runtime/builtins/actions/http.js.map +1 -1
  70. package/dist/runtime/builtins/actions/log.js.map +1 -1
  71. package/dist/runtime/builtins/data/boolean.js +4 -5
  72. package/dist/runtime/builtins/data/boolean.js.map +1 -1
  73. package/dist/runtime/builtins/data/compare.js +8 -10
  74. package/dist/runtime/builtins/data/compare.js.map +1 -1
  75. package/dist/runtime/builtins/data/constant.js +1 -1
  76. package/dist/runtime/builtins/data/constant.js.map +1 -1
  77. package/dist/runtime/builtins/data/json.js +4 -5
  78. package/dist/runtime/builtins/data/json.js.map +1 -1
  79. package/dist/runtime/builtins/data/math.js +4 -4
  80. package/dist/runtime/builtins/data/math.js.map +1 -1
  81. package/dist/runtime/builtins/data/object.js +12 -17
  82. package/dist/runtime/builtins/data/object.js.map +1 -1
  83. package/dist/runtime/builtins/data/string.js +13 -18
  84. package/dist/runtime/builtins/data/string.js.map +1 -1
  85. package/dist/runtime/builtins/nodes/action.js +5 -2
  86. package/dist/runtime/builtins/nodes/action.js.map +1 -1
  87. package/dist/runtime/builtins/nodes/data.js +2 -2
  88. package/dist/runtime/builtins/nodes/data.js.map +1 -1
  89. package/dist/runtime/builtins/nodes/delay.js +2 -2
  90. package/dist/runtime/builtins/nodes/delay.js.map +1 -1
  91. package/dist/runtime/builtins/nodes/forRange.js +2 -2
  92. package/dist/runtime/builtins/nodes/forRange.js.map +1 -1
  93. package/dist/runtime/builtins/nodes/foreach.js +2 -2
  94. package/dist/runtime/builtins/nodes/foreach.js.map +1 -1
  95. package/dist/runtime/builtins/nodes/groupInput.js +2 -2
  96. package/dist/runtime/builtins/nodes/groupInput.js.map +1 -1
  97. package/dist/runtime/builtins/nodes/groupOutput.js +2 -2
  98. package/dist/runtime/builtins/nodes/groupOutput.js.map +1 -1
  99. package/dist/runtime/builtins/nodes/if.js +2 -2
  100. package/dist/runtime/builtins/nodes/if.js.map +1 -1
  101. package/dist/runtime/builtins/nodes/parallel.js +2 -2
  102. package/dist/runtime/builtins/nodes/parallel.js.map +1 -1
  103. package/dist/runtime/builtins/nodes/retry.js +5 -6
  104. package/dist/runtime/builtins/nodes/retry.js.map +1 -1
  105. package/dist/runtime/builtins/nodes/setVariable.js +2 -2
  106. package/dist/runtime/builtins/nodes/setVariable.js.map +1 -1
  107. package/dist/runtime/builtins/nodes/switch.js +2 -2
  108. package/dist/runtime/builtins/nodes/switch.js.map +1 -1
  109. package/dist/runtime/builtins/nodes/trigger.js +2 -2
  110. package/dist/runtime/builtins/nodes/trigger.js.map +1 -1
  111. package/dist/runtime/builtins/nodes/tryCatch.js +2 -4
  112. package/dist/runtime/builtins/nodes/tryCatch.js.map +1 -1
  113. package/dist/runtime/builtins/triggers/cron.d.ts +2 -1
  114. package/dist/runtime/builtins/triggers/cron.js +5 -7
  115. package/dist/runtime/builtins/triggers/cron.js.map +1 -1
  116. package/dist/runtime/builtins/triggers/webhook.d.ts +6 -5
  117. package/dist/runtime/builtins/triggers/webhook.js +9 -6
  118. package/dist/runtime/builtins/triggers/webhook.js.map +1 -1
  119. package/dist/runtime/declaredProcedures.d.ts +2 -2
  120. package/dist/runtime/declaredProcedures.js +17 -92
  121. package/dist/runtime/declaredProcedures.js.map +1 -1
  122. package/dist/runtime/describe.js +11 -10
  123. package/dist/runtime/describe.js.map +1 -1
  124. package/dist/runtime/executionResult.d.ts +1 -1
  125. package/dist/runtime/executor.js +12 -38
  126. package/dist/runtime/executor.js.map +1 -1
  127. package/dist/runtime/flatten.d.ts +1 -1
  128. package/dist/runtime/flatten.js +1 -1
  129. package/dist/runtime/flatten.js.map +1 -1
  130. package/dist/runtime/graphIssues.js +24 -22
  131. package/dist/runtime/graphIssues.js.map +1 -1
  132. package/dist/runtime/graphVersion.d.ts +1 -1
  133. package/dist/runtime/graphVersion.js +2 -1
  134. package/dist/runtime/graphVersion.js.map +1 -1
  135. package/dist/runtime/nodeKinds.d.ts +3 -2
  136. package/dist/runtime/nodeKinds.js.map +1 -1
  137. package/dist/runtime/reconcile.d.ts +3 -0
  138. package/dist/runtime/reconcile.js +178 -0
  139. package/dist/runtime/reconcile.js.map +1 -0
  140. package/dist/runtime/registry.d.ts +0 -7
  141. package/dist/runtime/registry.js +3 -24
  142. package/dist/runtime/registry.js.map +1 -1
  143. package/dist/runtime/resolveInputs.d.ts +4 -2
  144. package/dist/runtime/resolveInputs.js +13 -12
  145. package/dist/runtime/resolveInputs.js.map +1 -1
  146. package/dist/runtime/resolveSubgraph.js +4 -5
  147. package/dist/runtime/resolveSubgraph.js.map +1 -1
  148. package/dist/runtime/retention.js.map +1 -1
  149. package/dist/runtime/runProcedure.d.ts +1 -1
  150. package/dist/runtime/runProcedure.js +2 -1
  151. package/dist/runtime/runProcedure.js.map +1 -1
  152. package/dist/runtime/schedule.js +3 -0
  153. package/dist/runtime/schedule.js.map +1 -1
  154. package/dist/runtime/schemaProperties.d.ts +11 -0
  155. package/dist/runtime/schemaProperties.js +7 -0
  156. package/dist/runtime/schemaProperties.js.map +1 -0
  157. package/dist/runtime/serialQueue.d.ts +1 -1
  158. package/dist/runtime/serialQueue.js +4 -4
  159. package/dist/runtime/serialQueue.js.map +1 -1
  160. package/dist/runtime/subscriptions.js +21 -183
  161. package/dist/runtime/subscriptions.js.map +1 -1
  162. package/dist/runtime/subwalk.js.map +1 -1
  163. package/dist/runtime/templateCacheState.d.ts +6 -0
  164. package/dist/runtime/templateCacheState.js +10 -0
  165. package/dist/runtime/templateCacheState.js.map +1 -0
  166. package/dist/runtime/templateUsages.js +4 -5
  167. package/dist/runtime/templateUsages.js.map +1 -1
  168. package/dist/runtime/topo.js +2 -4
  169. package/dist/runtime/topo.js.map +1 -1
  170. package/dist/runtime/trace.js +12 -9
  171. package/dist/runtime/trace.js.map +1 -1
  172. package/dist/runtime/triggerHandles.d.ts +3 -0
  173. package/dist/runtime/triggerHandles.js +8 -3
  174. package/dist/runtime/triggerHandles.js.map +1 -1
  175. package/dist/runtime/typeOrigin.js +12 -1
  176. package/dist/runtime/typeOrigin.js.map +1 -1
  177. package/dist/runtime/validate.js.map +1 -1
  178. package/dist/runtime/validateTemplate.js.map +1 -1
  179. package/dist/runtime/withTimeout.js.map +1 -1
  180. package/dist/runtime/wording.js +12 -8
  181. package/dist/runtime/wording.js.map +1 -1
  182. package/dist/stats/health-banner.js.map +1 -1
  183. package/dist/stats/health.js +2 -3
  184. package/dist/stats/health.js.map +1 -1
  185. package/dist/stats/kpi.js +1 -1
  186. package/dist/stats/kpi.js.map +1 -1
  187. package/dist/stats/overview.js +2 -1
  188. package/dist/stats/overview.js.map +1 -1
  189. package/dist/types/dataValue.d.ts +8 -0
  190. package/dist/types/dataValue.js +36 -0
  191. package/dist/types/dataValue.js.map +1 -0
  192. package/dist/types/graph.d.ts +8 -1
  193. package/dist/types/graph.js +8 -0
  194. package/dist/types/graph.js.map +1 -1
  195. package/dist/types/guards.d.ts +8 -0
  196. package/dist/types/guards.js +35 -0
  197. package/dist/types/guards.js.map +1 -0
  198. package/frontend-vue/app/build/components/editor/EditorBanners.vue +120 -0
  199. package/frontend-vue/app/build/components/editor/EditorChoiceModal.vue +44 -0
  200. package/frontend-vue/app/build/components/editor/EditorForkModal.vue +51 -0
  201. package/frontend-vue/app/build/components/editor/EditorHeader.vue +146 -0
  202. package/frontend-vue/app/build/components/editor/EditorSaveTemplateModal.vue +105 -0
  203. package/frontend-vue/app/build/components/editor/NodeInspectorDocs.vue +28 -0
  204. package/frontend-vue/app/build/components/editor/NodeInspectorRun.vue +48 -0
  205. package/frontend-vue/app/build/composables/editor/useBuilderMount.ts +129 -0
  206. package/frontend-vue/app/build/composables/editor/useBuilderSave.ts +256 -0
  207. package/frontend-vue/app/build/composables/editor/useBuilderShortcuts.ts +270 -0
  208. package/frontend-vue/app/build/composables/editor/useDraftProblems.ts +288 -0
  209. package/frontend-vue/app/build/composables/editor/useEditorContext.ts +388 -0
  210. package/frontend-vue/app/build/composables/editor/useEditorLoad.ts +158 -0
  211. package/frontend-vue/app/build/composables/editor/useForkToLocal.ts +193 -0
  212. package/frontend-vue/app/build/composables/editor/useGraphHistory.ts +113 -0
  213. package/frontend-vue/app/build/composables/editor/useGroupEditing.ts +445 -0
  214. package/frontend-vue/app/build/composables/editor/usePalette.ts +41 -0
  215. package/frontend-vue/app/build/composables/editor/useProcedureActions.ts +96 -0
  216. package/frontend-vue/app/build/composables/editor/useRunOverlay.ts +466 -0
  217. package/frontend-vue/app/build/composables/editor/useSaveAsTemplate.ts +172 -0
  218. package/frontend-vue/app/build/composables/editor/useSavedTriggers.ts +100 -0
  219. package/frontend-vue/app/build/composables/editor/useSubgraphNavigation.ts +270 -0
  220. package/frontend-vue/app/build/composables/editor/useUnsavedGuards.ts +233 -0
  221. package/frontend-vue/app/build/composables/graphCanvas/connect.ts +273 -0
  222. package/frontend-vue/app/build/composables/graphCanvas/edgeEvents.ts +172 -0
  223. package/frontend-vue/app/build/composables/graphCanvas/edges.ts +55 -0
  224. package/frontend-vue/app/build/composables/graphCanvas/handles.ts +181 -0
  225. package/frontend-vue/app/build/composables/graphCanvas/linkMenu.ts +123 -0
  226. package/frontend-vue/app/build/composables/graphCanvas/nodeData.ts +222 -0
  227. package/frontend-vue/app/build/composables/graphCanvas/placement.ts +248 -0
  228. package/frontend-vue/app/build/composables/graphCanvas/selection.ts +150 -0
  229. package/frontend-vue/app/build/composables/graphCanvas/types.ts +188 -0
  230. package/frontend-vue/app/build/composables/graphCanvas/view.ts +230 -0
  231. package/frontend-vue/app/build/types/editor.ts +94 -0
  232. package/frontend-vue/app/build/utils/editor/apiErrors.ts +74 -0
  233. package/frontend-vue/app/build/utils/editor/graphShape.ts +68 -0
  234. package/frontend-vue/app/build/utils/editor/groupPlan.ts +322 -0
  235. package/frontend-vue/app/build/utils/editor/groupPorts.ts +210 -0
  236. package/frontend-vue/app/build/utils/editor/keyboard.ts +22 -0
  237. package/frontend-vue/app/build/utils/inspectorFields.ts +117 -0
  238. package/frontend-vue/app/build/utils/templates.ts +88 -0
  239. package/frontend-vue/app/components/AttentionList.vue +2 -6
  240. package/frontend-vue/app/components/Catalog.vue +2 -1
  241. package/frontend-vue/app/components/Editor/BottomDock.vue +0 -3
  242. package/frontend-vue/app/components/Editor/GraphCanvas.vue +78 -1337
  243. package/frontend-vue/app/components/Editor/NodeInspector.vue +31 -123
  244. package/frontend-vue/app/components/Editor.vue +134 -3490
  245. package/frontend-vue/app/components/Templates.vue +14 -84
  246. package/frontend-vue/app/composables/useAutomationRuns.ts +2 -2
  247. package/frontend-vue/build/backend-boundary.ts +122 -0
  248. package/frontend-vue/dms.frontend.build.ts +2 -0
  249. package/frontend-vue/eslint-rules/index.mjs +103 -0
  250. package/frontend-vue/eslint.config.mjs +15 -0
  251. package/frontend-vue/i18n/locales/dms-automation-en-GB.json +0 -3
  252. package/frontend-vue/i18n/locales/dms-automation-fr-FR.json +0 -3
  253. package/frontend-vue/package.json +7 -4
  254. package/frontend-vue/pnpm-lock.yaml +98 -68
  255. package/frontend-vue/tests/api-error-presentation.test.cjs +257 -0
  256. package/frontend-vue/tests/helpers/setup.cjs +44 -0
  257. package/package.json +10 -10
  258. package/skills/dms-automation/SKILL.md +4 -4
  259. package/skills/dms-automation/cases.json +58 -0
  260. package/dist/runtime/departed.d.ts +0 -6
  261. package/dist/runtime/departed.js +0 -38
  262. package/dist/runtime/departed.js.map +0 -1
@@ -16,11 +16,11 @@ importers:
16
16
  version: 3.5.44(typescript@5.9.3)
17
17
  devDependencies:
18
18
  '@antelopejs/dms':
19
- specifier: '>=0.10.0 <1.0.0'
20
- version: 0.10.0(@antelopejs/core@1.16.0)
19
+ specifier: '>=0.13.1 <1.0.0'
20
+ version: 0.13.1(@antelopejs/core@1.16.0)
21
21
  '@antelopejs/dms-frontend':
22
- specifier: '>=0.8.0 <0.9.0'
23
- version: 0.8.0(@antelopejs/core@1.16.0)
22
+ specifier: '>=0.9.2 <0.10.0'
23
+ version: 0.9.2(@antelopejs/core@1.16.0)
24
24
  '@antelopejs/tooling-configs':
25
25
  specifier: '>=0.0.9 <1.0.0'
26
26
  version: 0.0.9
@@ -51,6 +51,12 @@ importers:
51
51
  typescript-eslint:
52
52
  specifier: ^8.0.0
53
53
  version: 8.71.2(eslint@9.39.5(jiti@2.7.0))(typescript@5.9.3)
54
+ vite:
55
+ specifier: ^8.3.4
56
+ version: 8.3.4(esbuild@0.27.7)(jiti@2.7.0)
57
+ vue-eslint-parser:
58
+ specifier: ^10.3.0
59
+ version: 10.4.1(eslint@9.39.5(jiti@2.7.0))
54
60
  vue-tsc:
55
61
  specifier: ^3.1.1
56
62
  version: 3.3.13(typescript@5.9.3)
@@ -69,17 +75,18 @@ packages:
69
75
  engines: {node: '>=20.19'}
70
76
  hasBin: true
71
77
 
72
- '@antelopejs/dms-frontend@0.8.0':
73
- resolution: {integrity: sha512-X3okh4WXtmsR2O3/jU7RZ8XCtZDB1X7AGErhjoDxE48NpCn5+fAztpaz5YDyKzQK4ckIBk+6wW1rB8Qg84/DEQ==}
78
+ '@antelopejs/dms-frontend@0.9.2':
79
+ resolution: {integrity: sha512-xhUeS2meMyIZ8wJCCRBJuZaucEZZvFV3d4Aci0apZhhqnm+yQAhtFmSTezB4D1sBgPamulREuzd5qG/8oQISkQ==}
74
80
  engines: {node: '>=20.19.0'}
75
81
  hasBin: true
76
82
  peerDependencies:
77
83
  '@antelopejs/core': '>=1.16.0 <2'
78
84
 
79
- '@antelopejs/dms@0.10.0':
80
- resolution: {integrity: sha512-m8J/CuG8VLH5JwhM5mtVfw4a9tgcDWGSOLFSGE4ikmKkEjHiJnKOYFDRvM8D4gC1O5rFrMftvvGse0Ykkq2WAw==}
85
+ '@antelopejs/dms@0.13.1':
86
+ resolution: {integrity: sha512-caSbDrh1nW3dprRMDr9796Gfm1Oh5EDcBDIfE07l2NOEAFvx03SpEeFNaYIEakwL5wXJWfFCJUpAgDeUEbZ5aQ==}
87
+ hasBin: true
81
88
  peerDependencies:
82
- '@antelopejs/core': '>=1.16.0 <2'
89
+ '@antelopejs/core': '>=1.17.0 <2'
83
90
  peerDependenciesMeta:
84
91
  '@antelopejs/core':
85
92
  optional: true
@@ -98,24 +105,27 @@ packages:
98
105
  '@antelopejs/interface-core@0.2.4':
99
106
  resolution: {integrity: sha512-2qF6/KwahCQvvNuC/piUvPWD4wq2Npmco941HMg2/bMBoJKbhMH16WcXXRvPYznNSkU0U+6vqK6KE+2N5NojSA==}
100
107
 
101
- '@antelopejs/interface-data-api@0.3.0':
102
- resolution: {integrity: sha512-r4nQJgD8Zct/wN1WXgNdBXes0h8zv7OVAZisSnPMnQvIR14XJ40S7pEwE08ggaOFr4rtgLAB0MwbLfaC5ExiPA==}
108
+ '@antelopejs/interface-core@0.3.0':
109
+ resolution: {integrity: sha512-GeGclCe5JOg+9H7XvTxYmE78u9tHG7QpVddHkB11kSgjNKq1hXqbEXPv0BRKQD9jjiV594qr1HuFuuYp4aqCZQ==}
110
+
111
+ '@antelopejs/interface-data-api@0.5.0':
112
+ resolution: {integrity: sha512-oPEWjl+ygV+VLVVa+ctr4ntYYyV6sPEPVL9QgHkHdweTEXTMshQyHa73+Ww9MUTGgFfEjy9pSyYPt6hM2TSMnQ==}
103
113
  peerDependencies:
104
114
  '@antelopejs/interface-api': '>=0.0.15 <1.0.0'
105
115
  '@antelopejs/interface-api-util': '>=0.1.3 <1.0.0'
106
116
  '@antelopejs/interface-core': '>=0.2.4 <1.0.0'
107
117
  '@antelopejs/interface-database': '>=0.1.10 <1.0.0'
108
- '@antelopejs/interface-database-decorators': '>=0.1.9 <1.0.0'
118
+ '@antelopejs/interface-database-decorators': '>=0.1.10 <1.0.0'
109
119
 
110
- '@antelopejs/interface-database-decorators@0.1.9':
111
- resolution: {integrity: sha512-EHMhUE9gCRy5yHbI5n7rRCYJXlLDCJine22184BXL/Q7e8dsdZrc/kzraRYlYOyuFbTzISf15/OwRx554XXjXw==}
120
+ '@antelopejs/interface-database-decorators@0.1.10':
121
+ resolution: {integrity: sha512-frdqN199ExzpoeMu+wi/y0Zc2ARADYXSFJ3+YJH5sUSCKa0U4GXfiXC36XdvBCqNjG+Kv7h+C/vjpi+r0/vqDg==}
112
122
  peerDependencies:
113
123
  '@antelopejs/interface-api': '>=0.0.15 <1.0.0'
114
124
  '@antelopejs/interface-core': '>=0.2.4 <1.0.0'
115
- '@antelopejs/interface-database': '>=0.1.10 <1.0.0'
125
+ '@antelopejs/interface-database': '>=0.1.11 <1.0.0'
116
126
 
117
- '@antelopejs/interface-database@0.1.10':
118
- resolution: {integrity: sha512-sT46GoSXvFTJpXA94toK1B3V+9YmZxjhyyCLhFNtvbijCehdtJCWILb3CbEnrWIWrlj/NPAKZ6ayH+wxUIdRWw==}
127
+ '@antelopejs/interface-database@0.1.11':
128
+ resolution: {integrity: sha512-uv6mB1Lghmlc9z+oWzntmzD1ZNBAmrj+2+7MItv6zClEolbqw5hfAt8+c3IPq2yLfWDfhpqWme2m0eTwsAm0RQ==}
119
129
  peerDependencies:
120
130
  '@antelopejs/interface-core': '>=0.2.4 <1.0.0'
121
131
 
@@ -124,15 +134,15 @@ packages:
124
134
  peerDependencies:
125
135
  '@antelopejs/interface-core': '>=0.2.4 <1.0.0'
126
136
 
127
- '@antelopejs/interface-dms@0.8.0':
128
- resolution: {integrity: sha512-+iL6YaADL9YtRws5E9+vljYoFws4jzT6WoBD3a/mcgeeq9sKIEjboaKpTdnN9RbshXV1Keq0qp4EDNpCrbLMQQ==}
137
+ '@antelopejs/interface-dms@0.10.2':
138
+ resolution: {integrity: sha512-zJ5/eDqKL98zjJZMDsvg9+N1Lx9OA+WsrUT9pJD8Rg6T27ITHlGVxLDa9G1JoHO5+V6n7KtkUSQbL3NHIWtL3w==}
129
139
  peerDependencies:
130
140
  '@antelopejs/interface-api': '>=0.0.15 <1.0.0'
131
141
  '@antelopejs/interface-api-util': '>=0.1.3 <1.0.0'
132
142
  '@antelopejs/interface-core': '>=0.2.4 <1.0.0'
133
- '@antelopejs/interface-data-api': '>=0.3.0 <1.0.0'
134
- '@antelopejs/interface-database': '>=0.1.10 <1.0.0'
135
- '@antelopejs/interface-database-decorators': '>=0.1.9 <1.0.0'
143
+ '@antelopejs/interface-data-api': '>=0.5.0 <1.0.0'
144
+ '@antelopejs/interface-database': '>=0.1.11 <1.0.0'
145
+ '@antelopejs/interface-database-decorators': '>=0.1.10 <1.0.0'
136
146
  '@antelopejs/interface-file-storage': '>=0.1.4 <1.0.0'
137
147
 
138
148
  '@antelopejs/interface-email@0.0.6':
@@ -450,6 +460,14 @@ packages:
450
460
  '@internationalized/number@3.6.9':
451
461
  resolution: {integrity: sha512-GgWy2caO/+hV9sT/oCTWGHvbjmJMPT9kkXzoKRLnkEq7adghhR7UprhvY9sXrKfrp3NcDfhF6QQHXR1KfQbB8g==}
452
462
 
463
+ '@intlify/message-compiler@11.4.16':
464
+ resolution: {integrity: sha512-p4lDWmBAsi3ja+PuEfPRavYyvqkYn/Upxz7UpnyI9LgIIy8XawcGIDzN+k99Z+99etO3HmDXGeTxnJIJGgSZ+g==}
465
+ engines: {node: '>= 22'}
466
+
467
+ '@intlify/shared@11.4.16':
468
+ resolution: {integrity: sha512-xehmkbEgbbNh/V+d8r3hFup0ViaN29YTJSAfRr28C54rxjyZEO0RNQKqW7VVajj16gLdglotNjiq+sIVNtHGzw==}
469
+ engines: {node: '>= 22'}
470
+
453
471
  '@ioredis/commands@1.10.0':
454
472
  resolution: {integrity: sha512-UmeW7z4LfctwoQ5wkhVzgq8tXkreED2xZGpX+Bg+zA+WJFZCT6c062AfCK/Dfk81xZnnwdhJCUMkitihRaoC2Q==}
455
473
 
@@ -3300,9 +3318,10 @@ snapshots:
3300
3318
  semver: 7.8.5
3301
3319
  typescript: 5.9.3
3302
3320
 
3303
- '@antelopejs/dms-frontend@0.8.0(@antelopejs/core@1.16.0)':
3321
+ '@antelopejs/dms-frontend@0.9.2(@antelopejs/core@1.16.0)':
3304
3322
  dependencies:
3305
3323
  '@antelopejs/core': 1.16.0
3324
+ '@intlify/message-compiler': 11.4.16
3306
3325
  chokidar: 4.0.3
3307
3326
  commander: 13.1.0
3308
3327
  ignore: 7.0.12
@@ -3314,18 +3333,18 @@ snapshots:
3314
3333
  '@oxc-parser/binding-linux-x64-gnu': 0.95.0
3315
3334
  '@oxc-parser/binding-win32-x64-msvc': 0.95.0
3316
3335
 
3317
- '@antelopejs/dms@0.10.0(@antelopejs/core@1.16.0)':
3336
+ '@antelopejs/dms@0.13.1(@antelopejs/core@1.16.0)':
3318
3337
  dependencies:
3319
3338
  2fa: 0.1.2
3320
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3321
- '@antelopejs/interface-api-util': 0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)
3322
- '@antelopejs/interface-core': 0.2.4
3323
- '@antelopejs/interface-data-api': 0.3.0(@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database-decorators@0.1.9(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4)))(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4))
3324
- '@antelopejs/interface-database': 0.1.10(@antelopejs/interface-core@0.2.4)
3325
- '@antelopejs/interface-database-decorators': 0.1.9(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4))
3326
- '@antelopejs/interface-dms': 0.8.0(5c390e5d51fb2dad5cd1571f89e8c16b)
3327
- '@antelopejs/interface-email': 0.0.6(@antelopejs/interface-core@0.2.4)
3328
- '@antelopejs/interface-file-storage': 0.1.4(@antelopejs/interface-core@0.2.4)
3339
+ '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.3.0)
3340
+ '@antelopejs/interface-api-util': 0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)
3341
+ '@antelopejs/interface-core': 0.3.0
3342
+ '@antelopejs/interface-data-api': 0.5.0(@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database-decorators@0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0)))(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0))
3343
+ '@antelopejs/interface-database': 0.1.11(@antelopejs/interface-core@0.3.0)
3344
+ '@antelopejs/interface-database-decorators': 0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0))
3345
+ '@antelopejs/interface-dms': 0.10.2(e35f79fb19340a333fab12c271a6cc9f)
3346
+ '@antelopejs/interface-email': 0.0.6(@antelopejs/interface-core@0.3.0)
3347
+ '@antelopejs/interface-file-storage': 0.1.4(@antelopejs/interface-core@0.3.0)
3329
3348
  archiver: 7.0.1
3330
3349
  csv-stringify: 6.9.0
3331
3350
  defu: 6.1.7
@@ -3339,76 +3358,80 @@ snapshots:
3339
3358
  zod: 3.24.4
3340
3359
  optionalDependencies:
3341
3360
  '@antelopejs/core': 1.16.0
3342
- '@antelopejs/interface-dms-automation': 0.4.0(@antelopejs/interface-core@0.2.4)
3343
- '@antelopejs/interface-redis': 0.0.9(@antelopejs/interface-core@0.2.4)
3361
+ '@antelopejs/interface-dms-automation': 0.4.0(@antelopejs/interface-core@0.3.0)
3362
+ '@antelopejs/interface-redis': 0.0.9(@antelopejs/interface-core@0.3.0)
3344
3363
  transitivePeerDependencies:
3345
3364
  - bare-abort-controller
3346
3365
  - bare-buffer
3347
3366
  - react-native-b4a
3348
3367
  - supports-color
3349
3368
 
3350
- '@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)':
3369
+ '@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)':
3351
3370
  dependencies:
3352
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3353
- '@antelopejs/interface-core': 0.2.4
3371
+ '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.3.0)
3372
+ '@antelopejs/interface-core': 0.3.0
3354
3373
 
3355
- '@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4)':
3374
+ '@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0)':
3356
3375
  dependencies:
3357
- '@antelopejs/interface-core': 0.2.4
3376
+ '@antelopejs/interface-core': 0.3.0
3358
3377
 
3359
3378
  '@antelopejs/interface-core@0.2.4':
3360
3379
  dependencies:
3361
3380
  reflect-metadata: 0.2.2
3362
3381
 
3363
- '@antelopejs/interface-data-api@0.3.0(@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database-decorators@0.1.9(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4)))(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4))':
3382
+ '@antelopejs/interface-core@0.3.0':
3364
3383
  dependencies:
3365
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3366
- '@antelopejs/interface-api-util': 0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)
3367
- '@antelopejs/interface-core': 0.2.4
3368
- '@antelopejs/interface-database': 0.1.10(@antelopejs/interface-core@0.2.4)
3369
- '@antelopejs/interface-database-decorators': 0.1.9(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4))
3384
+ reflect-metadata: 0.2.2
3370
3385
 
3371
- '@antelopejs/interface-database-decorators@0.1.9(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4))':
3386
+ '@antelopejs/interface-data-api@0.5.0(@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database-decorators@0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0)))(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0))':
3372
3387
  dependencies:
3373
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3374
- '@antelopejs/interface-core': 0.2.4
3375
- '@antelopejs/interface-database': 0.1.10(@antelopejs/interface-core@0.2.4)
3388
+ '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.3.0)
3389
+ '@antelopejs/interface-api-util': 0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)
3390
+ '@antelopejs/interface-core': 0.3.0
3391
+ '@antelopejs/interface-database': 0.1.11(@antelopejs/interface-core@0.3.0)
3392
+ '@antelopejs/interface-database-decorators': 0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0))
3393
+
3394
+ '@antelopejs/interface-database-decorators@0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0))':
3395
+ dependencies:
3396
+ '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.3.0)
3397
+ '@antelopejs/interface-core': 0.3.0
3398
+ '@antelopejs/interface-database': 0.1.11(@antelopejs/interface-core@0.3.0)
3376
3399
  randomstring: 1.3.2
3377
3400
  reflect-metadata: 0.2.2
3378
3401
 
3379
- '@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4)':
3402
+ '@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0)':
3380
3403
  dependencies:
3381
- '@antelopejs/interface-core': 0.2.4
3404
+ '@antelopejs/interface-core': 0.3.0
3382
3405
 
3383
- '@antelopejs/interface-dms-automation@0.4.0(@antelopejs/interface-core@0.2.4)':
3406
+ '@antelopejs/interface-dms-automation@0.4.0(@antelopejs/interface-core@0.3.0)':
3384
3407
  dependencies:
3385
- '@antelopejs/interface-core': 0.2.4
3408
+ '@antelopejs/interface-core': 0.3.0
3386
3409
  optional: true
3387
3410
 
3388
- '@antelopejs/interface-dms@0.8.0(5c390e5d51fb2dad5cd1571f89e8c16b)':
3411
+ '@antelopejs/interface-dms@0.10.2(e35f79fb19340a333fab12c271a6cc9f)':
3389
3412
  dependencies:
3390
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3391
- '@antelopejs/interface-api-util': 0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)
3392
- '@antelopejs/interface-core': 0.2.4
3393
- '@antelopejs/interface-data-api': 0.3.0(@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database-decorators@0.1.9(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4)))(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4))
3394
- '@antelopejs/interface-database': 0.1.10(@antelopejs/interface-core@0.2.4)
3395
- '@antelopejs/interface-database-decorators': 0.1.9(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.10(@antelopejs/interface-core@0.2.4))
3396
- '@antelopejs/interface-file-storage': 0.1.4(@antelopejs/interface-core@0.2.4)
3413
+ '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.3.0)
3414
+ '@antelopejs/interface-api-util': 0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)
3415
+ '@antelopejs/interface-core': 0.3.0
3416
+ '@antelopejs/interface-data-api': 0.5.0(@antelopejs/interface-api-util@0.1.3(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database-decorators@0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0)))(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0))
3417
+ '@antelopejs/interface-database': 0.1.11(@antelopejs/interface-core@0.3.0)
3418
+ '@antelopejs/interface-database-decorators': 0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.3.0))(@antelopejs/interface-core@0.3.0)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0))
3419
+ '@antelopejs/interface-file-storage': 0.1.4(@antelopejs/interface-core@0.3.0)
3397
3420
  randomstring: 1.3.2
3398
3421
  zod: 3.24.4
3399
3422
  zod-to-json-schema: 3.24.6(zod@3.24.4)
3400
3423
 
3401
- '@antelopejs/interface-email@0.0.6(@antelopejs/interface-core@0.2.4)':
3424
+ '@antelopejs/interface-email@0.0.6(@antelopejs/interface-core@0.3.0)':
3402
3425
  dependencies:
3403
- '@antelopejs/interface-core': 0.2.4
3426
+ '@antelopejs/interface-core': 0.3.0
3404
3427
 
3405
- '@antelopejs/interface-file-storage@0.1.4(@antelopejs/interface-core@0.2.4)':
3428
+ '@antelopejs/interface-file-storage@0.1.4(@antelopejs/interface-core@0.3.0)':
3406
3429
  dependencies:
3407
- '@antelopejs/interface-core': 0.2.4
3430
+ '@antelopejs/interface-core': 0.3.0
3408
3431
 
3409
- '@antelopejs/interface-redis@0.0.9(@antelopejs/interface-core@0.2.4)':
3432
+ '@antelopejs/interface-redis@0.0.9(@antelopejs/interface-core@0.3.0)':
3410
3433
  dependencies:
3411
- '@antelopejs/interface-core': 0.2.4
3434
+ '@antelopejs/interface-core': 0.3.0
3412
3435
  ioredis: 5.11.1
3413
3436
  transitivePeerDependencies:
3414
3437
  - supports-color
@@ -3637,6 +3660,13 @@ snapshots:
3637
3660
  dependencies:
3638
3661
  '@swc/helpers': 0.5.23
3639
3662
 
3663
+ '@intlify/message-compiler@11.4.16':
3664
+ dependencies:
3665
+ '@intlify/shared': 11.4.16
3666
+ source-map-js: 1.2.2
3667
+
3668
+ '@intlify/shared@11.4.16': {}
3669
+
3640
3670
  '@ioredis/commands@1.10.0':
3641
3671
  optional: true
3642
3672
 
@@ -0,0 +1,257 @@
1
+ const assert = require("node:assert/strict");
2
+ const path = require("node:path");
3
+ const { beforeEach, after, test } = require("node:test");
4
+ const {
5
+ FRONTEND,
6
+ frontendRequire,
7
+ } = require("../../tests/helpers/frontend.cjs");
8
+ const { componentSetup, clientComposable } = require("./helpers/setup.cjs");
9
+ const { ref, computed, effectScope } = frontendRequire("vue");
10
+ const { createFetch } = frontendRequire("ofetch");
11
+ const { useApiErrorPresenter } = clientComposable(
12
+ path.join(
13
+ FRONTEND,
14
+ "node_modules/@antelopejs/dms/frontend-vue/layers/dms-core/app/composables/useApiErrorPresenter.ts",
15
+ ),
16
+ );
17
+ const {
18
+ useBuilderSave,
19
+ } = require("../app/build/composables/editor/useBuilderSave.ts");
20
+ const {
21
+ useRunOverlay,
22
+ } = require("../app/build/composables/editor/useRunOverlay.ts");
23
+ const {
24
+ useSaveAsTemplate,
25
+ } = require("../app/build/composables/editor/useSaveAsTemplate.ts");
26
+ const {
27
+ useForkToLocal,
28
+ } = require("../app/build/composables/editor/useForkToLocal.ts");
29
+
30
+ const notices = [];
31
+ const readonlyTitle = "Read-only demo, changes are not saved";
32
+ const noop = () => {};
33
+ let scope;
34
+ let request;
35
+ let failure;
36
+ const read = () => ({
37
+ data: ref(null),
38
+ error: ref(null),
39
+ pending: ref(false),
40
+ refresh: noop,
41
+ });
42
+
43
+ beforeEach(() => {
44
+ scope?.stop();
45
+ scope = effectScope();
46
+ notices.length = 0;
47
+ const presented = ref(new WeakMap());
48
+ Object.assign(globalThis, {
49
+ useApiErrorPresenter,
50
+ useToast: () => ({
51
+ add: (notice) => {
52
+ notices.push(notice);
53
+ return { id: notices.length };
54
+ },
55
+ }),
56
+ useDmsState: () => presented,
57
+ getPluginI18n: () => ({
58
+ i18n: {
59
+ tm: (key) => {
60
+ if (key === "error.read_only_demo") return readonlyTitle;
61
+ if (key === "dms_automation.editor.dock.invalidJson")
62
+ return "Invalid JSON";
63
+ if (key === "error.500.description") return "Unexpected error";
64
+ return {};
65
+ },
66
+ rt: (message) => message,
67
+ },
68
+ }),
69
+ describeApiError: () => "Forbidden",
70
+ apiErrorStatus: (error) => error?.response?.status,
71
+ useApiData: read,
72
+ useFieldErrors: () => ({ clear: noop }),
73
+ useAuthFetch: () => ({ $authFetch: (...args) => request(...args) }),
74
+ useI18n: () => ({ t: (key) => key, te: () => false }),
75
+ useTranslation: () => ({ processI18n: (key) => key }),
76
+ useRegionalFormat: () => ({}),
77
+ useChartFetch: () => ({
78
+ data: ref(null),
79
+ error: ref(null),
80
+ isLoading: ref(false),
81
+ }),
82
+ });
83
+ });
84
+ after(() => scope?.stop());
85
+
86
+ function context() {
87
+ const selected = ref({ _id: "p1", name: "Draft", graph: { nodes: [] } });
88
+ return {
89
+ $authFetch: (...args) => request(...args),
90
+ selected,
91
+ editorMode: ref("procedure"),
92
+ props: { apiUrl: "/api/automation" },
93
+ t: (key) => key,
94
+ toast: globalThis.useToast(),
95
+ saving: ref(false),
96
+ testing: ref(false),
97
+ dockTab: ref("payload"),
98
+ dockCollapsed: ref(true),
99
+ issues: ref([]),
100
+ saveBlocked: ref(false),
101
+ savedSnapshot: ref(null),
102
+ testPayload: ref("{}"),
103
+ subgraphPath: ref([]),
104
+ overlayRun: ref(null),
105
+ overlayIsTest: ref(false),
106
+ selectedNodeId: ref(null),
107
+ testTriggerNodeId: ref(null),
108
+ currentGraph: computed(() => selected.value.graph),
109
+ selectedNode: ref({ id: "group", kind: "group", subgraph: { nodes: [] } }),
110
+ isCurrentGraphReadOnly: ref(false),
111
+ subgraphFrames: ref([]),
112
+ };
113
+ }
114
+
115
+ const scenarios = [
116
+ [
117
+ "builder save",
118
+ (ctx) => {
119
+ const actions = useBuilderSave(
120
+ ctx,
121
+ { takeSnapshot: () => ({ name: "Draft", graph: {} }) },
122
+ { nameMissing: ref(false), blockingIssues: ref([]) },
123
+ {},
124
+ {},
125
+ {},
126
+ );
127
+ return { act: actions.onSave, pending: ctx.saving };
128
+ },
129
+ ],
130
+ [
131
+ "test run",
132
+ (ctx) => {
133
+ const actions = useRunOverlay(
134
+ ctx,
135
+ {},
136
+ {},
137
+ { selectedProcedureUrl: () => null },
138
+ {},
139
+ );
140
+ return { act: actions.onTestRun, pending: ctx.testing };
141
+ },
142
+ ],
143
+ [
144
+ "save as template",
145
+ (ctx) => {
146
+ const actions = useSaveAsTemplate(ctx, {}, {}, {});
147
+ actions.saveAsTemplateName.value = "Shared";
148
+ return {
149
+ act: actions.submitSaveAsTemplate,
150
+ pending: actions.saveAsTemplateSubmitting,
151
+ };
152
+ },
153
+ ],
154
+ [
155
+ "attention action",
156
+ () => {
157
+ const actions = componentSetup("AttentionList.vue", {
158
+ apiUrl: "/api/automation",
159
+ });
160
+ return {
161
+ act: () =>
162
+ actions.act(
163
+ { procedureId: "p1" },
164
+ { url: "/enabled", method: "PUT" },
165
+ {},
166
+ "resumed",
167
+ ),
168
+ pending: actions.busy,
169
+ };
170
+ },
171
+ ],
172
+ ];
173
+
174
+ for (const [name, setup] of scenarios) {
175
+ for (const corePresented of [false, true]) {
176
+ void test(`${name} shows one translated warning for a JSON 403${corePresented ? " already presented by core" : ""}`, async () => {
177
+ const fetch = createFetch({
178
+ fetch: async () =>
179
+ new Response(
180
+ JSON.stringify({
181
+ message: "error.read_only_demo",
182
+ severity: "warning",
183
+ }),
184
+ {
185
+ status: 403,
186
+ headers: { "Content-Type": "application/json" },
187
+ },
188
+ ),
189
+ defaults: { retry: 0 },
190
+ });
191
+ const core = useApiErrorPresenter();
192
+ request = async () => {
193
+ try {
194
+ return await fetch("https://example.test/write");
195
+ } catch (error) {
196
+ failure = error;
197
+ if (corePresented)
198
+ core.presentError(error, { fallbackKey: "error.500.description" });
199
+ throw error;
200
+ }
201
+ };
202
+ const action = scope.run(() => setup(context()));
203
+ await action.act();
204
+ assert.ok(!action.pending.value);
205
+ assert.deepEqual(
206
+ notices.map(({ title, color }) => ({ title, color })),
207
+ [{ title: readonlyTitle, color: "warning" }],
208
+ );
209
+ core.presentError(failure, { fallbackKey: "error.500.description" });
210
+ assert.equal(notices.length, 1);
211
+ });
212
+ }
213
+ }
214
+
215
+ test("fork refusal resolves the server key and warning inline without adding a toast", async () => {
216
+ const ctx = context();
217
+ ctx.selectedNode.value.templateId = "t1";
218
+ const fetch = createFetch({
219
+ fetch: async () =>
220
+ new Response(
221
+ JSON.stringify({
222
+ message: "error.read_only_demo",
223
+ severity: "warning",
224
+ }),
225
+ {
226
+ status: 403,
227
+ headers: { "Content-Type": "application/json" },
228
+ },
229
+ ),
230
+ defaults: { retry: 0 },
231
+ });
232
+ request = () => fetch("https://example.test/template");
233
+ const actions = scope.run(() => useForkToLocal(ctx, {}));
234
+ await actions.submitFork();
235
+ assert.equal(actions.forkSubmitting.value, false);
236
+ assert.deepEqual(actions.forkError.value, {
237
+ message: readonlyTitle,
238
+ severity: "warning",
239
+ });
240
+ assert.deepEqual(notices, []);
241
+ });
242
+
243
+ test("invalid test payload stays a local validation error and makes no request", async () => {
244
+ const ctx = context();
245
+ ctx.testPayload.value = "{";
246
+ request = () => assert.fail("Invalid JSON must not reach the backend");
247
+ const actions = scope.run(() =>
248
+ useRunOverlay(ctx, {}, {}, { selectedProcedureUrl: () => null }, {}),
249
+ );
250
+ await actions.onTestRun();
251
+ assert.deepEqual(
252
+ notices.map(({ title, color }) => ({ title, color })),
253
+ [{ title: "Invalid JSON", color: "error" }],
254
+ );
255
+ assert.equal(ctx.dockTab.value, "payload");
256
+ assert.equal(ctx.dockCollapsed.value, false);
257
+ });
@@ -0,0 +1,44 @@
1
+ const fs = require("node:fs");
2
+ const Module = require("node:module");
3
+ const path = require("node:path");
4
+ const { compileScript, parse } = require("vue/compiler-sfc");
5
+ const ts = require("typescript");
6
+
7
+ /** Loads a composable with browser-side presentation enabled. */
8
+ function clientComposable(filename) {
9
+ const source = fs.readFileSync(filename, "utf8");
10
+ const { outputText } = ts.transpileModule(
11
+ source.replaceAll("import.meta.env", "({ SSR: false })"),
12
+ {
13
+ compilerOptions: {
14
+ module: ts.ModuleKind.CommonJS,
15
+ target: ts.ScriptTarget.ES2022,
16
+ },
17
+ },
18
+ );
19
+ const loaded = new Module(filename, module);
20
+ loaded.filename = filename;
21
+ loaded.paths = Module._nodeModulePaths(path.dirname(filename));
22
+ loaded._compile(outputText, filename);
23
+ return loaded.exports;
24
+ }
25
+
26
+ /** Loads setup bindings so tests can submit the component's forms. */
27
+ function componentSetup(file, props) {
28
+ const filename = path.resolve(__dirname, "../../app/components", file);
29
+ const { descriptor } = parse(fs.readFileSync(filename, "utf8"), { filename });
30
+ const { content } = compileScript(descriptor, { id: file });
31
+ const { outputText } = ts.transpileModule(content, {
32
+ compilerOptions: {
33
+ module: ts.ModuleKind.CommonJS,
34
+ target: ts.ScriptTarget.ES2022,
35
+ },
36
+ });
37
+ const loaded = new Module(filename, module);
38
+ loaded.filename = filename;
39
+ loaded.paths = Module._nodeModulePaths(path.dirname(filename));
40
+ loaded._compile(outputText, filename);
41
+ return loaded.exports.default.setup(props, { expose() {}, emit() {} });
42
+ }
43
+
44
+ module.exports = { componentSetup, clientComposable };