@antelopejs/dms-automation 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -112
- package/dist/db/models/automation_template.model.d.ts +1 -0
- package/dist/db/models/procedure.model.d.ts +1 -0
- package/dist/db/models/procedure_run.model.d.ts +1 -0
- package/dist/db/models/type_switch.model.d.ts +1 -0
- package/dist/runtime/typeOrigin.js +1 -1
- package/dist/runtime/typeOrigin.js.map +1 -1
- package/frontend-vue/app/components/Editor.vue +18 -19
- package/frontend-vue/package.json +4 -4
- package/frontend-vue/pnpm-lock.yaml +1429 -2947
- package/package.json +31 -15
- package/skills/dms-automation/SKILL.md +30 -0
package/README.md
CHANGED
|
@@ -1,139 +1,85 @@
|
|
|
1
|
-
# @antelopejs/dms-automation
|
|
2
|
-
|
|
3
1
|
<div align="center">
|
|
4
|
-
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue?style=for-the-badge&labelColor=000000"></a>
|
|
5
|
-
<a href="https://discord.gg/sjK28QHrA7"><img src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000" alt="Discord"></a>
|
|
6
|
-
<a href="https://antelopejs.com"><img src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000" alt="Documentation"></a>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
AntelopeJS DMS module that provides a visual automation builder under `/modules/automation`. Author procedures as node graphs (triggers, actions, data nodes), wire trigger and data edges, and run them in response to events such as cron schedules and webhooks.
|
|
10
|
-
|
|
11
|
-
It runs on `@antelopejs/dms` 0.9 (`@antelopejs/interface-dms` 0.7) and `@antelopejs/dms-frontend` 0.6: its pages read their data with the DMS's `useApiData`, which renders it on the server and hands it to the browser, and reads it again when the page refreshes. Webhook triggers are called on the API's public origin (`apiBaseUrl`), not through the frontend server.
|
|
12
|
-
|
|
13
|
-
## Pages
|
|
14
|
-
|
|
15
|
-
| Page | What it shows |
|
|
16
|
-
| --- | --- |
|
|
17
|
-
| Overview | The health of every procedure in one line, KPIs over 24 h / 7 d / 30 d, what needs attention and why, the latest runs |
|
|
18
|
-
| Run history | Every run grouped by day, with KPIs; one click opens a run in the side panel (failure, path taken, payload, log; J / K to step), re-runs with its own payload |
|
|
19
|
-
| Run trace | One run, linkable (`/modules/automation/trace?run=<id>`): its steps on a time line, where and why it failed, compared with the last success |
|
|
20
|
-
| Procedures | Every procedure with its state (failing, degraded, healthy, paused, draft), its last 12 runs, success rate and duration; import and new-procedure dialogs |
|
|
21
|
-
| Builder | The graph editor: test runs of the draft overlaid on the canvas, problems mapped onto nodes, Run now with an editable payload |
|
|
22
|
-
| Library | Triggers, actions, data nodes and templates, each with where it is used |
|
|
23
|
-
|
|
24
|
-
The pages are DMS blocks (KPI and chart cards, period selector, activity feed, table views with the grouped display and module cell displays) around a few module components, each named for the roles screen with `meta()`. Module pages are the platform owner's, like every DMS module, and so is the module's API.
|
|
25
|
-
|
|
26
|
-
A procedure is **failing** when its last run failed, **degraded** when runs failed in the last 7 days but the last one succeeded, **healthy** otherwise; a disabled one is **paused**, and one that has no trigger, or was never enabled nor run, is a **draft**. Test runs from the builder are kept (they have a trace) but never count in these states or in any figure. A procedure whose trigger cannot be armed (an invalid schedule, a webhook path already taken) is **failing**, with the reason under its state.
|
|
27
|
-
|
|
28
|
-
Webhooks are served by the API server, under the path set on the trigger. A path cannot overlap a route the server already serves, nor start with `/api`, `/auth`, `/dms`, `/modules` or `/settings`, and two enabled procedures cannot share the same method and path. A run keeps the request it received, with credentials replaced by `[redacted]` (see `runs.sensitiveNames`): a re-run therefore sends `[redacted]` in their place, and its confirmation says so. The library and the builder show each webhook's full URL on the DMS `apiBaseUrl`.
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
| Key | Default | |
|
|
33
|
-
| --- | --- | --- |
|
|
34
|
-
| `runs.retentionDays` | `30` | Days a run is kept; older runs are deleted every hour by the leader instance. `0` keeps every run. |
|
|
35
|
-
| `runs.sensitiveNames` | `[]` | More header and query parameter names whose value is a credential, matched case-insensitively as part of the name. They are added to the built-in list (`Authorization`, `Cookie`, `*token*`, `*secret*`, `*signature*`, `*hmac*`, `*-key`…). A run stores, shows and replays these values as `[redacted]`. |
|
|
36
|
-
| `httpRequest.blockPrivateNetwork` | `false` | Refuse HTTP requests to this server's network. See [HTTP request: private network](#http-request-private-network). |
|
|
37
|
-
| `cluster.driver` | `auto` | See [Clustering](#clustering). |
|
|
3
|
+
# @antelopejs/dms-automation
|
|
38
4
|
|
|
39
|
-
|
|
5
|
+
<a href="https://www.npmjs.com/package/@antelopejs/dms-automation"><img alt="npm" src="https://img.shields.io/npm/v/@antelopejs/dms-automation?style=for-the-badge&labelColor=000000&color=000000"></a>
|
|
6
|
+
<a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/@antelopejs/dms-automation?style=for-the-badge&labelColor=000000&color=000000"></a>
|
|
7
|
+
<a href="https://discord.gg/sjK28QHrA7"><img alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000"></a>
|
|
8
|
+
<a href="https://dms.antelopejs.com/docs/modules/automation"><img alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000"></a>
|
|
40
9
|
|
|
41
|
-
The
|
|
10
|
+
The visual automation builder of the AntelopeJS DMS.
|
|
42
11
|
|
|
43
|
-
|
|
44
|
-
"dms-automation": {
|
|
45
|
-
config: {
|
|
46
|
-
httpRequest: { blockPrivateNetwork: true },
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
```
|
|
12
|
+
</div>
|
|
50
13
|
|
|
51
|
-
The
|
|
14
|
+

|
|
52
15
|
|
|
53
|
-
|
|
16
|
+
## What it does
|
|
54
17
|
|
|
55
|
-
|
|
18
|
+
- Builds procedures as node graphs: triggers start a run, actions do the work, flow and data nodes branch, loop and shape values.
|
|
19
|
+
- Starts procedures from schedules, webhooks, manual runs or DMS events such as a user registering or a record being created.
|
|
20
|
+
- Keeps every run with its trace, shows where and why it failed, and re-runs it with its own payload.
|
|
21
|
+
- Shows the health of every procedure, with KPIs over 24 hours, 7 days or 30 days.
|
|
22
|
+
- Lets any module add its own nodes through [`@antelopejs/interface-dms-automation`](https://github.com/AntelopeJS/dms-automation/tree/main/packages/interface-dms-automation).
|
|
56
23
|
|
|
57
|
-
|
|
24
|
+
## Install
|
|
58
25
|
|
|
59
|
-
|
|
26
|
+
Run the AntelopeJS CLI from the root of a project that already loads `@antelopejs/dms`:
|
|
60
27
|
|
|
61
28
|
```bash
|
|
62
|
-
|
|
63
|
-
pnpm --dir frontend-vue typecheck
|
|
29
|
+
ajs project modules add @antelopejs/dms-automation
|
|
64
30
|
```
|
|
65
31
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Interface
|
|
69
|
-
|
|
70
|
-
The public contract lives in a dedicated interface package,
|
|
71
|
-
[`@antelopejs/interface-dms-automation`](https://github.com/AntelopeJS/dms-automation/tree/main/packages/interface-dms-automation),
|
|
72
|
-
which this module `implements`. Any DMS module can declare its own automation nodes
|
|
73
|
-
(triggers, actions, data nodes) by depending on the interface package only — never on
|
|
74
|
-
this implementation module. Add it to `optionalDependencies` and call
|
|
75
|
-
`RegisterTriggerType` / `RegisterActionType` / `RegisterDataNodeType`; when
|
|
76
|
-
dms-automation is absent from the project the registrations are inert no-ops. See the
|
|
77
|
-
interface package README for the full guide and examples.
|
|
78
|
-
|
|
79
|
-
The builder's block palette groups each category by the module that registered its
|
|
80
|
-
entries: the built-ins shipped with dms-automation come first, unlabeled, followed by
|
|
81
|
-
one section per external module, labelled with the module's id as named in the
|
|
82
|
-
project's `antelope.config.ts`.
|
|
83
|
-
|
|
84
|
-
The interface package is released before dms-automation because the latter depends on
|
|
85
|
-
it. Both are published to npmjs from their own manually dispatched GitHub workflow:
|
|
86
|
-
run `Release DMS automation interface` first, then `Release DMS automation module`,
|
|
87
|
-
which refuses to run until the interface version its dependency range is floored at is
|
|
88
|
-
resolvable on npmjs. Inside the workspace that same range resolves to the sibling
|
|
89
|
-
package, through `link-workspace-packages`. Existing consumers of the old standalone interface must
|
|
90
|
-
move to `@antelopejs/interface-dms-automation` and update their `implements` or
|
|
91
|
-
optional-dependency wiring; no compatibility alias is provided.
|
|
32
|
+
## Quick start
|
|
92
33
|
|
|
93
|
-
|
|
34
|
+
The module works without configuration. Restart the backend, then the frontend, and open **Modules → Automation**. The Overview offers three recipes to start from: **Forward a webhook**, **Send a scheduled digest** and **Run it on demand**.
|
|
94
35
|
|
|
95
|
-
|
|
36
|
+
To add a node from your own module, depend on the interface and register it in `start()`:
|
|
96
37
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
38
|
+
```ts
|
|
39
|
+
import { RegisterActionType } from "@antelopejs/interface-dms-automation";
|
|
40
|
+
|
|
41
|
+
RegisterActionType({
|
|
42
|
+
id: "bakery.restock-order",
|
|
43
|
+
name: "Place restock order",
|
|
44
|
+
description: "Order an ingredient restock from a supplier",
|
|
45
|
+
icon: "i-lucide-shopping-cart",
|
|
46
|
+
inputSchema: { type: "object", properties: { ingredient: { type: "string" } } },
|
|
47
|
+
outputSchema: { type: "object", properties: { ordered: { type: "boolean" } } },
|
|
48
|
+
async execute(input, ctx) {
|
|
49
|
+
ctx.log("info", "placing restock order", input);
|
|
50
|
+
return { ordered: true };
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
```
|
|
104
54
|
|
|
105
|
-
|
|
55
|
+
## Compatibility
|
|
106
56
|
|
|
107
|
-
|
|
57
|
+
| Package | Version |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `@antelopejs/dms` | `>=0.9.0 <1.0.0` |
|
|
60
|
+
| `@antelopejs/interface-dms` | `>=0.7.0 <1.0.0` |
|
|
61
|
+
| `@antelopejs/dms-frontend` (renderer) | `>=0.6.0 <0.7.0` |
|
|
62
|
+
| `@antelopejs/interface-dms-automation` | `>=0.2.0 <0.3.0` |
|
|
63
|
+
| API provider | `@antelopejs/api`, for webhooks |
|
|
64
|
+
| Database | an `@antelopejs/interface-database` implementation |
|
|
108
65
|
|
|
109
|
-
|
|
110
|
-
- **`replicated`** (e.g. webhook) — every instance activates it. The load balancer in front of the cluster already routes each incoming event to exactly one instance.
|
|
66
|
+
On DMS 0.8, use `@antelopejs/dms-automation` 0.3. Running several instances needs `@antelopejs/interface-redis`: see [Clustering](https://dms.antelopejs.com/docs/modules/automation/configuration#clustering).
|
|
111
67
|
|
|
112
|
-
|
|
68
|
+
## Documentation
|
|
113
69
|
|
|
114
|
-
|
|
70
|
+
- [Introduction](https://dms.antelopejs.com/docs/modules/automation/introduction)
|
|
71
|
+
- [Installation](https://dms.antelopejs.com/docs/modules/automation/installation)
|
|
72
|
+
- [Configuration](https://dms.antelopejs.com/docs/modules/automation/configuration)
|
|
73
|
+
- [Usage](https://dms.antelopejs.com/docs/modules/automation/usage/overview)
|
|
74
|
+
- [Extending](https://dms.antelopejs.com/docs/modules/automation/extending)
|
|
75
|
+
- [FAQ](https://dms.antelopejs.com/docs/modules/automation/faq)
|
|
115
76
|
|
|
116
|
-
|
|
117
|
-
normal operation but not transactionally exactly-once** across leadership
|
|
118
|
-
changes. If a singleton trigger must never run twice, make its downstream effect
|
|
119
|
-
idempotent.
|
|
77
|
+
The guide's sources live in [`packages/dms-automation/docs`](https://github.com/AntelopeJS/dms-automation/tree/main/packages/dms-automation/docs). The module ships the `dms-automation` Claude Code skill in [`packages/dms-automation/skills`](https://github.com/AntelopeJS/dms-automation/tree/main/packages/dms-automation/skills), declared under `antelopeJs.skills`.
|
|
120
78
|
|
|
121
|
-
|
|
122
|
-
- **Brief double-fire on handover.** When leadership moves, the new leader arms its singletons as soon as it acquires the lock, while the old leader only deactivates its copies on its next tick (≤ one tick interval) — or, for a stall/GC-pause longer than the lock TTL, after it notices it lost the lock. An occurrence landing in that overlap can fire on both. The window is bounded by the tick interval (and by the TTL for stalls), never unbounded.
|
|
123
|
-
- **No timeout on Redis itself.** Leader renewal and pub/sub ride the shared Redis client; a Redis server that accepts connections but stops responding (no command timeout configured) can stall a renew. The leader tolerates transient errors up to the TTL before stepping down, so this degrades to the missed-occurrence case rather than a hang.
|
|
124
|
-
- **Very slow promotion can self-evict.** When an instance wins the lock it activates its singletons before the renewal loop resumes; if that activation took longer than the lock TTL (≤30s) the lock could expire mid-promotion. Built-in trigger activation is sub-millisecond, so this only matters for a custom trigger whose `activate` blocks for tens of seconds — keep trigger `activate`/`deactivate` fast and non-blocking.
|
|
79
|
+
## Contributing
|
|
125
80
|
|
|
126
|
-
|
|
81
|
+
This package lives in the [`AntelopeJS/dms-automation`](https://github.com/AntelopeJS/dms-automation) pnpm workspace, next to `@antelopejs/interface-dms-automation`. Read [CONTRIBUTING.md](https://github.com/AntelopeJS/dms-automation/blob/main/CONTRIBUTING.md) and the [repository README](https://github.com/AntelopeJS/dms-automation#contributing) for the development commands.
|
|
127
82
|
|
|
128
|
-
|
|
129
|
-
product. Every identifier that carried the old name moved with it, and there is
|
|
130
|
-
no compatibility path: a deployment is recreated from scratch, not migrated.
|
|
83
|
+
## License
|
|
131
84
|
|
|
132
|
-
-
|
|
133
|
-
`dms_automation`. Existing collections are invisible to this version.
|
|
134
|
-
- Module config key `cmsAutomation` -> `dmsAutomation` in `antelope.config.ts`.
|
|
135
|
-
- Frontend i18n namespace `cms-automation-<locale>` -> `dms-automation-<locale>`;
|
|
136
|
-
a host overriding those keys has to rename its own entries.
|
|
137
|
-
- The contract lives in `@antelopejs/interface-dms-automation`, which this
|
|
138
|
-
module `implements`. Import it from there, never from the runtime package,
|
|
139
|
-
and note that `TriggerType` requires a `cluster` field.
|
|
85
|
+
[Apache-2.0](./LICENSE)
|
|
@@ -55,6 +55,7 @@ declare const AutomationTemplateModel_base: {
|
|
|
55
55
|
delete(id: string): Promise<number>;
|
|
56
56
|
};
|
|
57
57
|
readonly schemaName: string;
|
|
58
|
+
readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<AutomationTemplate>;
|
|
58
59
|
fromPlainData(obj: any): AutomationTemplate;
|
|
59
60
|
fromDatabase(obj: any): AutomationTemplate | undefined;
|
|
60
61
|
toDatabase(obj: any): Record<string, any>;
|
|
@@ -13,6 +13,7 @@ declare const ProcedureModel_base: {
|
|
|
13
13
|
delete(id: string): Promise<number>;
|
|
14
14
|
};
|
|
15
15
|
readonly schemaName: string;
|
|
16
|
+
readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<Procedure>;
|
|
16
17
|
fromPlainData(obj: any): Procedure;
|
|
17
18
|
fromDatabase(obj: any): Procedure | undefined;
|
|
18
19
|
toDatabase(obj: any): Record<string, any>;
|
|
@@ -21,6 +21,7 @@ declare const ProcedureRunModel_base: {
|
|
|
21
21
|
delete(id: string): Promise<number>;
|
|
22
22
|
};
|
|
23
23
|
readonly schemaName: string;
|
|
24
|
+
readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<ProcedureRun>;
|
|
24
25
|
fromPlainData(obj: any): ProcedureRun;
|
|
25
26
|
fromDatabase(obj: any): ProcedureRun | undefined;
|
|
26
27
|
toDatabase(obj: any): Record<string, any>;
|
|
@@ -12,6 +12,7 @@ declare const TypeSwitchModel_base: {
|
|
|
12
12
|
delete(id: string): Promise<number>;
|
|
13
13
|
};
|
|
14
14
|
readonly schemaName: string;
|
|
15
|
+
readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<TypeSwitch>;
|
|
15
16
|
fromPlainData(obj: any): TypeSwitch;
|
|
16
17
|
fromDatabase(obj: any): TypeSwitch | undefined;
|
|
17
18
|
toDatabase(obj: any): Record<string, any>;
|
|
@@ -5,7 +5,7 @@ exports.isOriginAttributionWorking = isOriginAttributionWorking;
|
|
|
5
5
|
const interface_core_1 = require("@antelopejs/interface-core");
|
|
6
6
|
const interface_dms_automation_1 = require("@antelopejs/interface-dms-automation");
|
|
7
7
|
function registryEntry(proxy, id) {
|
|
8
|
-
return proxy.
|
|
8
|
+
return proxy.registered?.get(id);
|
|
9
9
|
}
|
|
10
10
|
const SELF_MODULE = (0, interface_core_1.GetResponsibleModule)();
|
|
11
11
|
function originOf(proxy, id) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeOrigin.js","sourceRoot":"","sources":["../../src/runtime/typeOrigin.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"typeOrigin.js","sourceRoot":"","sources":["../../src/runtime/typeOrigin.ts"],"names":[],"mappings":";;;AAuFA,gEAMC;AA7FD,+DAAkE;AAClE,mFAAgE;AAoChE,SAAS,aAAa,CACpB,KAAgB,EAChB,EAAU;IAMV,OAAQ,KAAkC,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AACjE,CAAC;AASD,MAAM,WAAW,GAAG,IAAA,qCAAoB,GAAE,CAAC;AAW3C,SAAS,QAAQ,CAAC,KAAgB,EAAE,EAAU;IAC5C,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAChD,OAAO,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;AAC1E,CAAC;AAEM,MAAM,iBAAiB,GAAG,CAAC,EAAU,EAAc,EAAE,CAC1D,QAAQ,CAAC,mCAAQ,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;AADhC,QAAA,iBAAiB,qBACe;AAEtC,MAAM,gBAAgB,GAAG,CAAC,EAAU,EAAc,EAAE,CACzD,QAAQ,CAAC,mCAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAD/B,QAAA,gBAAgB,oBACe;AAErC,MAAM,kBAAkB,GAAG,CAAC,EAAU,EAAc,EAAE,CAC3D,QAAQ,CAAC,mCAAQ,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AADjC,QAAA,kBAAkB,sBACe;AAS9C,SAAgB,0BAA0B,CAAC,gBAAwB;IACjE,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC5C,OAAO,CACL,aAAa,CAAC,mCAAQ,CAAC,mBAAmB,EAAE,gBAAgB,CAAC,EAAE,MAAM;QACrE,WAAW,CACZ,CAAC;AACJ,CAAC"}
|
|
@@ -2745,6 +2745,24 @@ const testPayloadSource = ref<string | null>(null)
|
|
|
2745
2745
|
// the draft's triggers at the end).
|
|
2746
2746
|
const testTriggerNodeId = ref<string | undefined>(undefined)
|
|
2747
2747
|
|
|
2748
|
+
// The last real payload of the trigger a Test run starts from, which fills
|
|
2749
|
+
// the test payload the user then edits. Left to the browser: it is shown
|
|
2750
|
+
// only once the dock's payload tab is opened, and may be large.
|
|
2751
|
+
const lastPayloadRead = useApiData<{ last: { runId: string; payload: unknown } | null }>(selectedProcedureUrl('last-payload'), {
|
|
2752
|
+
query: () => (testTriggerNodeId.value ? { triggerNodeId: testTriggerNodeId.value } : {}),
|
|
2753
|
+
server: false,
|
|
2754
|
+
// Copied into an editable field: the page's refreshes leave the draft alone.
|
|
2755
|
+
refreshOnPageRefresh: false,
|
|
2756
|
+
})
|
|
2757
|
+
// Each answer (or failure) of another procedure or trigger replaces the
|
|
2758
|
+
// payload; the previous procedure's, still on screen meanwhile, does not.
|
|
2759
|
+
watch([() => lastPayloadRead.data.value, () => lastPayloadRead.error.value], ([answer, error]) => {
|
|
2760
|
+
if (!error && lastPayloadRead.placeholder.value) return
|
|
2761
|
+
const last = error ? null : answer?.last
|
|
2762
|
+
testPayload.value = JSON.stringify(last?.payload ?? {}, null, 2)
|
|
2763
|
+
testPayloadSource.value = last?.runId ?? null
|
|
2764
|
+
})
|
|
2765
|
+
|
|
2748
2766
|
const runStates = computed<Record<string, NodeRunState> | undefined>(() => {
|
|
2749
2767
|
const run = overlayRun.value
|
|
2750
2768
|
if (!run || subgraphPath.value.length > 1) return undefined
|
|
@@ -3084,25 +3102,6 @@ watch(
|
|
|
3084
3102
|
{ immediate: true },
|
|
3085
3103
|
)
|
|
3086
3104
|
|
|
3087
|
-
// The last real payload of the trigger a Test run starts from, which fills
|
|
3088
|
-
// the test payload the user then edits. Left to the browser: it is shown
|
|
3089
|
-
// only once the dock's payload tab is opened, and may be large. Declared
|
|
3090
|
-
// once that trigger is chosen, so that it starts on the key it reads.
|
|
3091
|
-
const lastPayloadRead = useApiData<{ last: { runId: string; payload: unknown } | null }>(selectedProcedureUrl('last-payload'), {
|
|
3092
|
-
query: () => (testTriggerNodeId.value ? { triggerNodeId: testTriggerNodeId.value } : {}),
|
|
3093
|
-
server: false,
|
|
3094
|
-
// Copied into an editable field: the page's refreshes leave the draft alone.
|
|
3095
|
-
refreshOnPageRefresh: false,
|
|
3096
|
-
})
|
|
3097
|
-
// Each answer (or failure) of another procedure or trigger replaces the
|
|
3098
|
-
// payload; the previous procedure's, still on screen meanwhile, does not.
|
|
3099
|
-
watch([() => lastPayloadRead.data.value, () => lastPayloadRead.error.value], ([answer, error]) => {
|
|
3100
|
-
if (!error && lastPayloadRead.placeholder.value) return
|
|
3101
|
-
const last = error ? null : answer?.last
|
|
3102
|
-
testPayload.value = JSON.stringify(last?.payload ?? {}, null, 2)
|
|
3103
|
-
testPayloadSource.value = last?.runId ?? null
|
|
3104
|
-
})
|
|
3105
|
-
|
|
3106
3105
|
// Below xl the inspector floats over the canvas instead of narrowing it; the
|
|
3107
3106
|
// palette can be put away. Remembered per browser.
|
|
3108
3107
|
const PALETTE_HIDDEN_KEY = 'dms-automation:builder-palette-hidden'
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"vue": "^3.5.18"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@antelopejs/dms": ">=0.9.
|
|
20
|
-
"@antelopejs/dms-frontend": ">=0.6.
|
|
21
|
-
"@antelopejs/tooling-configs": ">=0.0.
|
|
19
|
+
"@antelopejs/dms": ">=0.9.3 <1.0.0",
|
|
20
|
+
"@antelopejs/dms-frontend": ">=0.6.3 <0.7.0",
|
|
21
|
+
"@antelopejs/tooling-configs": ">=0.0.9 <1.0.0",
|
|
22
22
|
"@eslint/js": "^9.0.0",
|
|
23
23
|
"@nuxt/ui": "4.10.0",
|
|
24
24
|
"eslint": "^9.0.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"vue-tsc": "^3.1.1"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
34
|
-
"@antelopejs/dms-frontend": ">=0.6.
|
|
34
|
+
"@antelopejs/dms-frontend": ">=0.6.3 <0.7.0"
|
|
35
35
|
},
|
|
36
36
|
"packageManager": "pnpm@10.6.5"
|
|
37
37
|
}
|