@antelopejs/dms-automation 0.7.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 (246) hide show
  1. package/README.md +19 -5
  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 +4 -20
  9. package/dist/data/procedures-table.js +10 -106
  10. package/dist/data/procedures-table.js.map +1 -1
  11. package/dist/data/runs-table.js.map +1 -1
  12. package/dist/db/models/automation_template.model.d.ts +2 -4
  13. package/dist/db/models/automation_template.model.js +13 -14
  14. package/dist/db/models/automation_template.model.js.map +1 -1
  15. package/dist/db/models/procedure_run.model.js.map +1 -1
  16. package/dist/db/models/stats.model.js.map +1 -1
  17. package/dist/db/tables/procedure_run.table.d.ts +2 -1
  18. package/dist/db/tables/procedure_run.table.js.map +1 -1
  19. package/dist/implementations/dms-automation/index.js.map +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/pages/category.js.map +1 -1
  22. package/dist/pages/index.js.map +1 -1
  23. package/dist/pages/overview.js.map +1 -1
  24. package/dist/pages/procedures.js.map +1 -1
  25. package/dist/pages/runs.js.map +1 -1
  26. package/dist/pages/shared.js +1 -1
  27. package/dist/pages/shared.js.map +1 -1
  28. package/dist/realtime.d.ts +2 -1
  29. package/dist/realtime.js.map +1 -1
  30. package/dist/routes/action-types.d.ts +2 -1
  31. package/dist/routes/action-types.js.map +1 -1
  32. package/dist/routes/deleteConfirm.js +4 -3
  33. package/dist/routes/deleteConfirm.js.map +1 -1
  34. package/dist/routes/graphSchema.d.ts +2 -1
  35. package/dist/routes/graphSchema.js +8 -7
  36. package/dist/routes/graphSchema.js.map +1 -1
  37. package/dist/routes/procedureChecks.js +5 -5
  38. package/dist/routes/procedureChecks.js.map +1 -1
  39. package/dist/routes/procedureRuns.d.ts +2 -2
  40. package/dist/routes/procedureRuns.js +1 -1
  41. package/dist/routes/procedureRuns.js.map +1 -1
  42. package/dist/routes/procedures.d.ts +14 -13
  43. package/dist/routes/procedures.js +2 -1
  44. package/dist/routes/procedures.js.map +1 -1
  45. package/dist/routes/requests.d.ts +11 -5
  46. package/dist/routes/requests.js.map +1 -1
  47. package/dist/routes/runs.d.ts +7 -7
  48. package/dist/routes/runs.js +5 -3
  49. package/dist/routes/runs.js.map +1 -1
  50. package/dist/routes/stats.js.map +1 -1
  51. package/dist/routes/templates.d.ts +3 -2
  52. package/dist/routes/templates.js +2 -1
  53. package/dist/routes/templates.js.map +1 -1
  54. package/dist/routes/trigger-types.d.ts +2 -1
  55. package/dist/routes/trigger-types.js.map +1 -1
  56. package/dist/routes/typeConfigShared.d.ts +2 -1
  57. package/dist/routes/typeConfigShared.js.map +1 -1
  58. package/dist/runtime/armErrors.d.ts +0 -1
  59. package/dist/runtime/armErrors.js +0 -7
  60. package/dist/runtime/armErrors.js.map +1 -1
  61. package/dist/runtime/boundRunLog.d.ts +1 -0
  62. package/dist/runtime/boundRunLog.js +11 -11
  63. package/dist/runtime/boundRunLog.js.map +1 -1
  64. package/dist/runtime/builtins/actions/http.js +16 -9
  65. package/dist/runtime/builtins/actions/http.js.map +1 -1
  66. package/dist/runtime/builtins/actions/log.js.map +1 -1
  67. package/dist/runtime/builtins/data/boolean.js +4 -5
  68. package/dist/runtime/builtins/data/boolean.js.map +1 -1
  69. package/dist/runtime/builtins/data/compare.js +8 -10
  70. package/dist/runtime/builtins/data/compare.js.map +1 -1
  71. package/dist/runtime/builtins/data/constant.js +1 -1
  72. package/dist/runtime/builtins/data/constant.js.map +1 -1
  73. package/dist/runtime/builtins/data/json.js +4 -5
  74. package/dist/runtime/builtins/data/json.js.map +1 -1
  75. package/dist/runtime/builtins/data/math.js +4 -4
  76. package/dist/runtime/builtins/data/math.js.map +1 -1
  77. package/dist/runtime/builtins/data/object.js +12 -17
  78. package/dist/runtime/builtins/data/object.js.map +1 -1
  79. package/dist/runtime/builtins/data/string.js +13 -18
  80. package/dist/runtime/builtins/data/string.js.map +1 -1
  81. package/dist/runtime/builtins/nodes/action.js +5 -2
  82. package/dist/runtime/builtins/nodes/action.js.map +1 -1
  83. package/dist/runtime/builtins/nodes/data.js +2 -2
  84. package/dist/runtime/builtins/nodes/data.js.map +1 -1
  85. package/dist/runtime/builtins/nodes/delay.js +2 -2
  86. package/dist/runtime/builtins/nodes/delay.js.map +1 -1
  87. package/dist/runtime/builtins/nodes/forRange.js +2 -2
  88. package/dist/runtime/builtins/nodes/forRange.js.map +1 -1
  89. package/dist/runtime/builtins/nodes/foreach.js +2 -2
  90. package/dist/runtime/builtins/nodes/foreach.js.map +1 -1
  91. package/dist/runtime/builtins/nodes/groupInput.js +2 -2
  92. package/dist/runtime/builtins/nodes/groupInput.js.map +1 -1
  93. package/dist/runtime/builtins/nodes/groupOutput.js +2 -2
  94. package/dist/runtime/builtins/nodes/groupOutput.js.map +1 -1
  95. package/dist/runtime/builtins/nodes/if.js +2 -2
  96. package/dist/runtime/builtins/nodes/if.js.map +1 -1
  97. package/dist/runtime/builtins/nodes/parallel.js +2 -2
  98. package/dist/runtime/builtins/nodes/parallel.js.map +1 -1
  99. package/dist/runtime/builtins/nodes/retry.js +5 -4
  100. package/dist/runtime/builtins/nodes/retry.js.map +1 -1
  101. package/dist/runtime/builtins/nodes/setVariable.js +2 -2
  102. package/dist/runtime/builtins/nodes/setVariable.js.map +1 -1
  103. package/dist/runtime/builtins/nodes/switch.js +2 -2
  104. package/dist/runtime/builtins/nodes/switch.js.map +1 -1
  105. package/dist/runtime/builtins/nodes/trigger.js +2 -2
  106. package/dist/runtime/builtins/nodes/trigger.js.map +1 -1
  107. package/dist/runtime/builtins/nodes/tryCatch.js +2 -2
  108. package/dist/runtime/builtins/nodes/tryCatch.js.map +1 -1
  109. package/dist/runtime/builtins/triggers/cron.d.ts +2 -1
  110. package/dist/runtime/builtins/triggers/cron.js +5 -7
  111. package/dist/runtime/builtins/triggers/cron.js.map +1 -1
  112. package/dist/runtime/builtins/triggers/webhook.d.ts +6 -5
  113. package/dist/runtime/builtins/triggers/webhook.js +9 -6
  114. package/dist/runtime/builtins/triggers/webhook.js.map +1 -1
  115. package/dist/runtime/declaredProcedures.d.ts +2 -2
  116. package/dist/runtime/declaredProcedures.js +3 -2
  117. package/dist/runtime/declaredProcedures.js.map +1 -1
  118. package/dist/runtime/describe.js +11 -10
  119. package/dist/runtime/describe.js.map +1 -1
  120. package/dist/runtime/executor.js +10 -7
  121. package/dist/runtime/executor.js.map +1 -1
  122. package/dist/runtime/flatten.d.ts +1 -1
  123. package/dist/runtime/flatten.js +1 -1
  124. package/dist/runtime/flatten.js.map +1 -1
  125. package/dist/runtime/graphIssues.js +24 -22
  126. package/dist/runtime/graphIssues.js.map +1 -1
  127. package/dist/runtime/graphVersion.d.ts +1 -1
  128. package/dist/runtime/graphVersion.js +2 -1
  129. package/dist/runtime/graphVersion.js.map +1 -1
  130. package/dist/runtime/nodeKinds.d.ts +3 -2
  131. package/dist/runtime/nodeKinds.js.map +1 -1
  132. package/dist/runtime/reconcile.d.ts +3 -0
  133. package/dist/runtime/reconcile.js +178 -0
  134. package/dist/runtime/reconcile.js.map +1 -0
  135. package/dist/runtime/resolveInputs.d.ts +4 -2
  136. package/dist/runtime/resolveInputs.js +13 -12
  137. package/dist/runtime/resolveInputs.js.map +1 -1
  138. package/dist/runtime/resolveSubgraph.js +4 -5
  139. package/dist/runtime/resolveSubgraph.js.map +1 -1
  140. package/dist/runtime/retention.js.map +1 -1
  141. package/dist/runtime/runProcedure.d.ts +1 -1
  142. package/dist/runtime/runProcedure.js +2 -1
  143. package/dist/runtime/runProcedure.js.map +1 -1
  144. package/dist/runtime/schedule.js +3 -0
  145. package/dist/runtime/schedule.js.map +1 -1
  146. package/dist/runtime/schemaProperties.d.ts +11 -0
  147. package/dist/runtime/schemaProperties.js +7 -0
  148. package/dist/runtime/schemaProperties.js.map +1 -0
  149. package/dist/runtime/serialQueue.d.ts +1 -1
  150. package/dist/runtime/serialQueue.js +4 -4
  151. package/dist/runtime/serialQueue.js.map +1 -1
  152. package/dist/runtime/subscriptions.js +21 -180
  153. package/dist/runtime/subscriptions.js.map +1 -1
  154. package/dist/runtime/subwalk.js.map +1 -1
  155. package/dist/runtime/templateCacheState.d.ts +6 -0
  156. package/dist/runtime/templateCacheState.js +10 -0
  157. package/dist/runtime/templateCacheState.js.map +1 -0
  158. package/dist/runtime/templateUsages.js +4 -5
  159. package/dist/runtime/templateUsages.js.map +1 -1
  160. package/dist/runtime/topo.js +2 -4
  161. package/dist/runtime/topo.js.map +1 -1
  162. package/dist/runtime/trace.js +12 -9
  163. package/dist/runtime/trace.js.map +1 -1
  164. package/dist/runtime/triggerHandles.d.ts +3 -0
  165. package/dist/runtime/triggerHandles.js +8 -0
  166. package/dist/runtime/triggerHandles.js.map +1 -1
  167. package/dist/runtime/typeOrigin.js +12 -1
  168. package/dist/runtime/typeOrigin.js.map +1 -1
  169. package/dist/runtime/validate.js.map +1 -1
  170. package/dist/runtime/validateTemplate.js.map +1 -1
  171. package/dist/runtime/withTimeout.js.map +1 -1
  172. package/dist/runtime/wording.js +12 -8
  173. package/dist/runtime/wording.js.map +1 -1
  174. package/dist/stats/health-banner.js.map +1 -1
  175. package/dist/stats/health.js.map +1 -1
  176. package/dist/stats/kpi.js +1 -1
  177. package/dist/stats/kpi.js.map +1 -1
  178. package/dist/stats/overview.js +2 -1
  179. package/dist/stats/overview.js.map +1 -1
  180. package/dist/types/dataValue.d.ts +8 -0
  181. package/dist/types/dataValue.js +36 -0
  182. package/dist/types/dataValue.js.map +1 -0
  183. package/dist/types/graph.d.ts +8 -1
  184. package/dist/types/graph.js +8 -0
  185. package/dist/types/graph.js.map +1 -1
  186. package/dist/types/guards.d.ts +8 -0
  187. package/dist/types/guards.js +35 -0
  188. package/dist/types/guards.js.map +1 -0
  189. package/frontend-vue/app/build/components/editor/EditorBanners.vue +120 -0
  190. package/frontend-vue/app/build/components/editor/EditorChoiceModal.vue +44 -0
  191. package/frontend-vue/app/build/components/editor/EditorForkModal.vue +51 -0
  192. package/frontend-vue/app/build/components/editor/EditorHeader.vue +146 -0
  193. package/frontend-vue/app/build/components/editor/EditorSaveTemplateModal.vue +105 -0
  194. package/frontend-vue/app/build/components/editor/NodeInspectorDocs.vue +28 -0
  195. package/frontend-vue/app/build/components/editor/NodeInspectorRun.vue +48 -0
  196. package/frontend-vue/app/build/composables/editor/useBuilderMount.ts +129 -0
  197. package/frontend-vue/app/build/composables/editor/useBuilderSave.ts +256 -0
  198. package/frontend-vue/app/build/composables/editor/useBuilderShortcuts.ts +270 -0
  199. package/frontend-vue/app/build/composables/editor/useDraftProblems.ts +288 -0
  200. package/frontend-vue/app/build/composables/editor/useEditorContext.ts +388 -0
  201. package/frontend-vue/app/build/composables/editor/useEditorLoad.ts +158 -0
  202. package/frontend-vue/app/build/composables/editor/useForkToLocal.ts +193 -0
  203. package/frontend-vue/app/build/composables/editor/useGraphHistory.ts +113 -0
  204. package/frontend-vue/app/build/composables/editor/useGroupEditing.ts +445 -0
  205. package/frontend-vue/app/build/composables/editor/usePalette.ts +41 -0
  206. package/frontend-vue/app/build/composables/editor/useProcedureActions.ts +96 -0
  207. package/frontend-vue/app/build/composables/editor/useRunOverlay.ts +466 -0
  208. package/frontend-vue/app/build/composables/editor/useSaveAsTemplate.ts +172 -0
  209. package/frontend-vue/app/build/composables/editor/useSavedTriggers.ts +100 -0
  210. package/frontend-vue/app/build/composables/editor/useSubgraphNavigation.ts +270 -0
  211. package/frontend-vue/app/build/composables/editor/useUnsavedGuards.ts +233 -0
  212. package/frontend-vue/app/build/composables/graphCanvas/connect.ts +273 -0
  213. package/frontend-vue/app/build/composables/graphCanvas/edgeEvents.ts +172 -0
  214. package/frontend-vue/app/build/composables/graphCanvas/edges.ts +55 -0
  215. package/frontend-vue/app/build/composables/graphCanvas/handles.ts +181 -0
  216. package/frontend-vue/app/build/composables/graphCanvas/linkMenu.ts +123 -0
  217. package/frontend-vue/app/build/composables/graphCanvas/nodeData.ts +222 -0
  218. package/frontend-vue/app/build/composables/graphCanvas/placement.ts +248 -0
  219. package/frontend-vue/app/build/composables/graphCanvas/selection.ts +150 -0
  220. package/frontend-vue/app/build/composables/graphCanvas/types.ts +188 -0
  221. package/frontend-vue/app/build/composables/graphCanvas/view.ts +230 -0
  222. package/frontend-vue/app/build/types/editor.ts +94 -0
  223. package/frontend-vue/app/build/utils/editor/apiErrors.ts +74 -0
  224. package/frontend-vue/app/build/utils/editor/graphShape.ts +68 -0
  225. package/frontend-vue/app/build/utils/editor/groupPlan.ts +322 -0
  226. package/frontend-vue/app/build/utils/editor/groupPorts.ts +210 -0
  227. package/frontend-vue/app/build/utils/editor/keyboard.ts +22 -0
  228. package/frontend-vue/app/build/utils/inspectorFields.ts +117 -0
  229. package/frontend-vue/app/build/utils/templates.ts +88 -0
  230. package/frontend-vue/app/components/AttentionList.vue +2 -6
  231. package/frontend-vue/app/components/Catalog.vue +2 -1
  232. package/frontend-vue/app/components/Editor/GraphCanvas.vue +78 -1337
  233. package/frontend-vue/app/components/Editor/NodeInspector.vue +31 -123
  234. package/frontend-vue/app/components/Editor.vue +134 -3484
  235. package/frontend-vue/app/components/Templates.vue +14 -84
  236. package/frontend-vue/build/backend-boundary.ts +122 -0
  237. package/frontend-vue/dms.frontend.build.ts +2 -0
  238. package/frontend-vue/eslint-rules/index.mjs +103 -0
  239. package/frontend-vue/eslint.config.mjs +15 -0
  240. package/frontend-vue/package.json +7 -4
  241. package/frontend-vue/pnpm-lock.yaml +73 -59
  242. package/frontend-vue/tests/api-error-presentation.test.cjs +257 -0
  243. package/frontend-vue/tests/helpers/setup.cjs +44 -0
  244. package/package.json +4 -4
  245. package/skills/dms-automation/SKILL.md +2 -2
  246. package/skills/dms-automation/cases.json +58 -0
@@ -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.11.0 <1.0.0'
20
- version: 0.11.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.9.0 <0.10.0'
23
- version: 0.9.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,15 +75,16 @@ packages:
69
75
  engines: {node: '>=20.19'}
70
76
  hasBin: true
71
77
 
72
- '@antelopejs/dms-frontend@0.9.0':
73
- resolution: {integrity: sha512-G9Ax7H7EmMM9s1KncED7Gen+4viOPiX45HqM/QGISR6kPVgWAT/aICA+71M1AmjhLwlNkzpMR2OToLIPW+s88w==}
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.11.0':
80
- resolution: {integrity: sha512-2agf+fWoRnAwymQ8Ys+XR9N/8HEcwwRcTPAJNXP4i2sEFsuvF+t6t7f712zjbeL4YS9YbbNEMYC42KOHBgMrLQ==}
85
+ '@antelopejs/dms@0.13.1':
86
+ resolution: {integrity: sha512-caSbDrh1nW3dprRMDr9796Gfm1Oh5EDcBDIfE07l2NOEAFvx03SpEeFNaYIEakwL5wXJWfFCJUpAgDeUEbZ5aQ==}
87
+ hasBin: true
81
88
  peerDependencies:
82
89
  '@antelopejs/core': '>=1.17.0 <2'
83
90
  peerDependenciesMeta:
@@ -98,8 +105,11 @@ 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.4.0':
102
- resolution: {integrity: sha512-DG0/Iroi0YjBpx4goJmrQ0oU79ylSG4QdRGswh1TlP7ucgT4K3l2BhVDEln5BevkKqiiE0fycdzFJcOKMzHiRw==}
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'
@@ -124,13 +134,13 @@ packages:
124
134
  peerDependencies:
125
135
  '@antelopejs/interface-core': '>=0.2.4 <1.0.0'
126
136
 
127
- '@antelopejs/interface-dms@0.9.0':
128
- resolution: {integrity: sha512-PrLbDaToYjzNR7sbEtUA3fo6Cvn9E5HOKm06hab8LWJ9F1pcZM75uLAIhMTgnaxOIiGTvUJ+E70bq0Rd2ZDIgw==}
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.4.0 <1.0.0'
143
+ '@antelopejs/interface-data-api': '>=0.5.0 <1.0.0'
134
144
  '@antelopejs/interface-database': '>=0.1.11 <1.0.0'
135
145
  '@antelopejs/interface-database-decorators': '>=0.1.10 <1.0.0'
136
146
  '@antelopejs/interface-file-storage': '>=0.1.4 <1.0.0'
@@ -3308,7 +3318,7 @@ snapshots:
3308
3318
  semver: 7.8.5
3309
3319
  typescript: 5.9.3
3310
3320
 
3311
- '@antelopejs/dms-frontend@0.9.0(@antelopejs/core@1.16.0)':
3321
+ '@antelopejs/dms-frontend@0.9.2(@antelopejs/core@1.16.0)':
3312
3322
  dependencies:
3313
3323
  '@antelopejs/core': 1.16.0
3314
3324
  '@intlify/message-compiler': 11.4.16
@@ -3323,18 +3333,18 @@ snapshots:
3323
3333
  '@oxc-parser/binding-linux-x64-gnu': 0.95.0
3324
3334
  '@oxc-parser/binding-win32-x64-msvc': 0.95.0
3325
3335
 
3326
- '@antelopejs/dms@0.11.0(@antelopejs/core@1.16.0)':
3336
+ '@antelopejs/dms@0.13.1(@antelopejs/core@1.16.0)':
3327
3337
  dependencies:
3328
3338
  2fa: 0.1.2
3329
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3330
- '@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)
3331
- '@antelopejs/interface-core': 0.2.4
3332
- '@antelopejs/interface-data-api': 0.4.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.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4)))(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4))
3333
- '@antelopejs/interface-database': 0.1.11(@antelopejs/interface-core@0.2.4)
3334
- '@antelopejs/interface-database-decorators': 0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4))
3335
- '@antelopejs/interface-dms': 0.9.0(57cdc4cdfc3be14a3edccd2f9b728cdb)
3336
- '@antelopejs/interface-email': 0.0.6(@antelopejs/interface-core@0.2.4)
3337
- '@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)
3338
3348
  archiver: 7.0.1
3339
3349
  csv-stringify: 6.9.0
3340
3350
  defu: 6.1.7
@@ -3348,76 +3358,80 @@ snapshots:
3348
3358
  zod: 3.24.4
3349
3359
  optionalDependencies:
3350
3360
  '@antelopejs/core': 1.16.0
3351
- '@antelopejs/interface-dms-automation': 0.4.0(@antelopejs/interface-core@0.2.4)
3352
- '@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)
3353
3363
  transitivePeerDependencies:
3354
3364
  - bare-abort-controller
3355
3365
  - bare-buffer
3356
3366
  - react-native-b4a
3357
3367
  - supports-color
3358
3368
 
3359
- '@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)':
3360
3370
  dependencies:
3361
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3362
- '@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
3363
3373
 
3364
- '@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)':
3365
3375
  dependencies:
3366
- '@antelopejs/interface-core': 0.2.4
3376
+ '@antelopejs/interface-core': 0.3.0
3367
3377
 
3368
3378
  '@antelopejs/interface-core@0.2.4':
3369
3379
  dependencies:
3370
3380
  reflect-metadata: 0.2.2
3371
3381
 
3372
- '@antelopejs/interface-data-api@0.4.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.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4)))(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4))':
3382
+ '@antelopejs/interface-core@0.3.0':
3373
3383
  dependencies:
3374
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3375
- '@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)
3376
- '@antelopejs/interface-core': 0.2.4
3377
- '@antelopejs/interface-database': 0.1.11(@antelopejs/interface-core@0.2.4)
3378
- '@antelopejs/interface-database-decorators': 0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4))
3384
+ reflect-metadata: 0.2.2
3379
3385
 
3380
- '@antelopejs/interface-database-decorators@0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.11(@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))':
3381
3387
  dependencies:
3382
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3383
- '@antelopejs/interface-core': 0.2.4
3384
- '@antelopejs/interface-database': 0.1.11(@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)
3385
3399
  randomstring: 1.3.2
3386
3400
  reflect-metadata: 0.2.2
3387
3401
 
3388
- '@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4)':
3402
+ '@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.3.0)':
3389
3403
  dependencies:
3390
- '@antelopejs/interface-core': 0.2.4
3404
+ '@antelopejs/interface-core': 0.3.0
3391
3405
 
3392
- '@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)':
3393
3407
  dependencies:
3394
- '@antelopejs/interface-core': 0.2.4
3408
+ '@antelopejs/interface-core': 0.3.0
3395
3409
  optional: true
3396
3410
 
3397
- '@antelopejs/interface-dms@0.9.0(57cdc4cdfc3be14a3edccd2f9b728cdb)':
3411
+ '@antelopejs/interface-dms@0.10.2(e35f79fb19340a333fab12c271a6cc9f)':
3398
3412
  dependencies:
3399
- '@antelopejs/interface-api': 0.0.15(@antelopejs/interface-core@0.2.4)
3400
- '@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)
3401
- '@antelopejs/interface-core': 0.2.4
3402
- '@antelopejs/interface-data-api': 0.4.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.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4)))(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4))
3403
- '@antelopejs/interface-database': 0.1.11(@antelopejs/interface-core@0.2.4)
3404
- '@antelopejs/interface-database-decorators': 0.1.10(@antelopejs/interface-api@0.0.15(@antelopejs/interface-core@0.2.4))(@antelopejs/interface-core@0.2.4)(@antelopejs/interface-database@0.1.11(@antelopejs/interface-core@0.2.4))
3405
- '@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)
3406
3420
  randomstring: 1.3.2
3407
3421
  zod: 3.24.4
3408
3422
  zod-to-json-schema: 3.24.6(zod@3.24.4)
3409
3423
 
3410
- '@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)':
3411
3425
  dependencies:
3412
- '@antelopejs/interface-core': 0.2.4
3426
+ '@antelopejs/interface-core': 0.3.0
3413
3427
 
3414
- '@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)':
3415
3429
  dependencies:
3416
- '@antelopejs/interface-core': 0.2.4
3430
+ '@antelopejs/interface-core': 0.3.0
3417
3431
 
3418
- '@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)':
3419
3433
  dependencies:
3420
- '@antelopejs/interface-core': 0.2.4
3434
+ '@antelopejs/interface-core': 0.3.0
3421
3435
  ioredis: 5.11.1
3422
3436
  transitivePeerDependencies:
3423
3437
  - supports-color
@@ -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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-automation",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Visual automation builder for the AntelopeJS DMS: procedures as node graphs started by schedules, webhooks, manual runs or DMS events, with a trace for every run.",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -83,17 +83,17 @@
83
83
  "dmsFrontend": "dist/frontend-module.js",
84
84
  "scripts": {
85
85
  "build": "pnpm --filter @antelopejs/interface-dms-automation build && rimraf dist && tsc",
86
- "test": "pnpm run build && node --test tests/*.test.cjs",
86
+ "test": "pnpm run build && node --test tests/*.test.cjs && pnpm --dir frontend-vue test",
87
87
  "test:frontend-registration": "pnpm run build && node --test tests/frontend-registration.test.cjs",
88
88
  "test:run-storage": "pnpm run build && node --test tests/run-storage.test.cjs",
89
89
  "test:runs-display": "pnpm run build && node --test tests/runs-display.test.cjs",
90
90
  "test:type-origin": "pnpm run build && node --test tests/type-origin.test.cjs",
91
91
  "test:type-display": "node --test tests/type-display.test.cjs",
92
- "test:unit": "pnpm run build && node --test tests/health.test.cjs tests/kpi.test.cjs tests/graph-issues.test.cjs tests/trace.test.cjs tests/schedule.test.cjs tests/pages.test.cjs tests/procedures-page.test.cjs tests/wording.test.cjs tests/health-banner.test.cjs tests/runtime-nodes.test.cjs tests/runs-api.test.cjs tests/run-detail.test.cjs tests/graph-connect.test.cjs tests/library.test.cjs tests/template-delete.test.cjs tests/template-comments.test.cjs tests/overview.test.cjs tests/declared-procedures.test.cjs tests/trigger-rearm.test.cjs tests/module-departure.test.cjs tests/run-procedure.test.cjs tests/dry-run.test.cjs tests/test-run-confirm.test.cjs tests/confirm-from.test.cjs",
92
+ "test:unit": "pnpm run build && node --test tests/health.test.cjs tests/kpi.test.cjs tests/graph-issues.test.cjs tests/trace.test.cjs tests/schedule.test.cjs tests/pages.test.cjs tests/procedures-page.test.cjs tests/wording.test.cjs tests/health-banner.test.cjs tests/runtime-nodes.test.cjs tests/runs-api.test.cjs tests/run-detail.test.cjs tests/graph-connect.test.cjs tests/library.test.cjs tests/template-delete.test.cjs tests/frontend-lint-rules.test.cjs tests/overview.test.cjs tests/declared-procedures.test.cjs tests/trigger-rearm.test.cjs tests/module-departure.test.cjs tests/run-procedure.test.cjs tests/dry-run.test.cjs tests/test-run-confirm.test.cjs tests/confirm-from.test.cjs tests/backend-boundary.test.cjs",
93
93
  "dev": "ajs project run -w -p playground",
94
94
  "lint": "oxlint && oxfmt --check . && cd frontend-vue && pnpm lint && antelopejs-check-interface-ranges",
95
95
  "typecheck": "pnpm --filter @antelopejs/interface-dms-automation typecheck && tsc --noEmit",
96
- "lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && cd frontend-vue && pnpm lint:fix",
96
+ "lint:fix": "oxlint --fix && oxfmt . && cd frontend-vue && pnpm lint:fix",
97
97
  "format": "oxfmt .",
98
98
  "frontend:dev": "cd playground && pnpm frontend:dev",
99
99
  "release": "pnpm --filter @antelopejs/interface-dms-automation build && pnpm --dir frontend-vue install --frozen-lockfile && pnpm lint && pnpm typecheck && pnpm test:frontend-registration && pnpm run verify:interface && release-it",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dms-automation
3
- description: Uses the @antelopejs/dms-automation module of the AntelopeJS DMS (procedures as node graphs started by schedules, webhooks, manual runs or DMS events, with run history and traces under /modules/automation). Use when installing or configuring dms-automation (runs.retentionDays, runs.sensitiveNames, httpRequest.blockPrivateNetwork, cluster.driver), creating, importing or shipping a procedure as code, debugging a failing run, or choosing a trigger (table watch needs a MongoDB replica set). To declare new nodes from a module, use dms-automation-interface instead.
3
+ description: Operates the installed @antelopejs/dms-automation module of the AntelopeJS DMS (procedures as node graphs started by schedules, webhooks, manual runs or DMS events, with run history and traces under /modules/automation). Use when installing or configuring dms-automation (runs.retentionDays, runs.sensitiveNames, httpRequest.blockPrivateNetwork, cluster.driver), creating, importing or shipping a procedure as code, debugging a failing run, or choosing a trigger (table watch needs a MongoDB replica set). To declare new nodes from a module, use dms-automation-interface instead.
4
4
  icon: i-lucide-workflow
5
5
  category: automation
6
6
  tags: [automation, procedures, workflows, triggers, webhooks, cron]
@@ -25,7 +25,7 @@ Runs procedures: a trigger starts a run, actions run along trigger edges, data n
25
25
  ## Gotchas
26
26
 
27
27
  - Webhook paths cannot overlap an existing route or start with `/api`, `/auth`, `/dms`, `/modules`, `/settings`; two enabled procedures cannot share method + path. URLs shown use the DMS `apiBaseUrl` (the API server, not the frontend server).
28
- - Version 0.4+ needs `@antelopejs/dms` 0.9 (`interface-dms` 0.7) and `@antelopejs/dms-frontend` 0.6; 0.3 is the DMS 0.8 line.
28
+ - It needs `@antelopejs/dms` 0.11 or later (`interface-dms` 0.9 or later) and `@antelopejs/dms-frontend` 0.9; 0.6.0 is the DMS 0.10 line.
29
29
  - **Test run** simulates only actions declaring `dryRun` (and runs `sideEffects: false` ones as is); every other action (HTTP request, module actions without `dryRun`) acts for real. The builder lists those steps and asks first; `POST …/:id/test` answers 409 with `realEffects` until called with `confirmRealEffects: true` (`POST …/:id/test-effects` `{ graph }` lists them). To make a project or module action safe to test, give it `dryRun` (see `dms-automation-interface`).
30
30
  - A re-run sends `[redacted]` where the original request held credentials.
31
31
  - Data-change triggers on a project's own tables: `database.table-watch` from `@antelopejs/dms-database` (`schema` = the `RegisterSchema` id, `table`). It needs a change feed: MongoDB **replica set** only (single node `--replSet rs0` + `rs.initiate()` + `replicaSet=rs0` in the URL); on a standalone server the procedure is Failing with "$changeStream is only supported on replica sets".
@@ -0,0 +1,58 @@
1
+ {
2
+ "version": 1,
3
+ "cases": [
4
+ {
5
+ "id": "automation-nightly-report",
6
+ "area": "modules",
7
+ "style": "clean",
8
+ "prompt": "Run a procedure every night that e-mails a sales report.",
9
+ "expect": {
10
+ "skills": ["dms-automation"],
11
+ "acceptable": ["dms-mailing", "dms-automation-interface", "dms"]
12
+ }
13
+ },
14
+ {
15
+ "id": "dms-automation-failing-cron-casual",
16
+ "area": "modules",
17
+ "style": "casual",
18
+ "prompt": "my nightly procedure says failing and idk why, where do i look",
19
+ "expect": {
20
+ "skills": ["dms-automation"],
21
+ "acceptable": ["dms", "dms-automation-interface"]
22
+ }
23
+ },
24
+ {
25
+ "id": "dms-automation-test-run-real-effects",
26
+ "area": "modules",
27
+ "style": "clean",
28
+ "prompt": "My procedure has an HTTP request node that charges a customer. If I press Test run in the builder, will it call the real service, and how does the builder protect me?",
29
+ "expect": {
30
+ "skills": ["dms-automation"],
31
+ "acceptable": ["dms", "dms-automation-interface"],
32
+ "mustMention": ["confirmRealEffects", "dryRun"]
33
+ }
34
+ },
35
+ {
36
+ "id": "dms-automation-table-watch-replica-set",
37
+ "area": "modules",
38
+ "style": "clean",
39
+ "prompt": "Start a procedure whenever a row of my orders table changes. My local MongoDB is a single standalone server, what do I have to set up?",
40
+ "expect": {
41
+ "skills": ["dms-automation"],
42
+ "acceptable": ["dms", "dms-database"],
43
+ "mustMention": ["database.table-watch", "replicaSet=rs0"]
44
+ }
45
+ },
46
+ {
47
+ "id": "dms-automation-avoid-register-trigger",
48
+ "area": "modules",
49
+ "style": "clean",
50
+ "prompt": "My module must offer a new trigger type in the procedure editor that fires when a delivery arrives. Should it be singleton or replicated?",
51
+ "expect": {
52
+ "skills": ["dms-automation-interface"],
53
+ "acceptable": ["dms-module", "dms"],
54
+ "avoid": ["dms-automation"]
55
+ }
56
+ }
57
+ ]
58
+ }