@antelopejs/dms-automation 0.9.1 → 0.9.2
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 +1 -1
- package/dist/cluster/leader.d.ts +2 -1
- package/dist/cluster/leader.js +78 -36
- package/dist/cluster/leader.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/pages/procedures.js +1 -1
- package/dist/pages/procedures.js.map +1 -1
- package/dist/pages/runs.js +1 -1
- package/dist/pages/runs.js.map +1 -1
- package/dist/pages/shared.js +1 -2
- package/dist/pages/shared.js.map +1 -1
- package/dist/routes/procedureChecks.d.ts +1 -1
- package/dist/routes/procedureChecks.js +1 -3
- package/dist/routes/procedureChecks.js.map +1 -1
- package/dist/routes/procedureRuns.d.ts +1 -1
- package/dist/routes/procedureRuns.js +16 -5
- package/dist/routes/procedureRuns.js.map +1 -1
- package/dist/routes/procedures.js +6 -2
- package/dist/routes/procedures.js.map +1 -1
- package/dist/routes/runs.d.ts +1 -1
- package/dist/routes/runs.js +2 -2
- package/dist/routes/runs.js.map +1 -1
- package/dist/runtime/builtins/actions/log.js +3 -1
- package/dist/runtime/builtins/actions/log.js.map +1 -1
- package/dist/runtime/executor.js +3 -1
- package/dist/runtime/executor.js.map +1 -1
- package/dist/runtime/reconcile.js +9 -1
- package/dist/runtime/reconcile.js.map +1 -1
- package/dist/runtime/resolveInputs.js +8 -5
- package/dist/runtime/resolveInputs.js.map +1 -1
- package/dist/runtime/runProcedure.d.ts +2 -0
- package/dist/runtime/runProcedure.js +12 -0
- package/dist/runtime/runProcedure.js.map +1 -1
- package/dist/runtime/subscriptions.d.ts +1 -1
- package/dist/runtime/subscriptions.js +16 -18
- package/dist/runtime/subscriptions.js.map +1 -1
- package/dist/runtime/trace.js +4 -1
- package/dist/runtime/trace.js.map +1 -1
- package/dist/stats/overview.js +6 -5
- package/dist/stats/overview.js.map +1 -1
- package/frontend-vue/app/build/composables/editor/useDraftProblems.ts +14 -16
- package/frontend-vue/app/build/composables/editor/useRunOverlay.ts +6 -6
- package/frontend-vue/app/build/composables/graphCanvas/handles.ts +2 -2
- package/frontend-vue/app/build/composables/graphCanvas/nodeData.ts +3 -3
- package/frontend-vue/app/build/composables/graphCanvas/types.ts +2 -2
- package/frontend-vue/app/components/Catalog.vue +3 -3
- package/frontend-vue/app/components/Editor.vue +1 -1
- package/frontend-vue/app/components/Run/RunCompare.vue +3 -3
- package/frontend-vue/package.json +1 -1
- package/frontend-vue/pnpm-lock.yaml +114 -94
- package/frontend-vue/tests/inherited-keys.test.cjs +244 -0
- package/package.json +4 -4
|
@@ -205,22 +205,20 @@ export function useDraftProblems(
|
|
|
205
205
|
);
|
|
206
206
|
|
|
207
207
|
// Code and params travel along: the inspector names a setting as its form does.
|
|
208
|
-
const issuesByNode = computed
|
|
209
|
-
()
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
);
|
|
208
|
+
const issuesByNode = computed(() => {
|
|
209
|
+
const out = new Map<string, Omit<GraphIssue, "nodeId">>();
|
|
210
|
+
for (const issue of issues.value) {
|
|
211
|
+
if (!issue.nodeId) continue;
|
|
212
|
+
if (!out.has(issue.nodeId) || issue.severity === "error")
|
|
213
|
+
out.set(issue.nodeId, {
|
|
214
|
+
severity: issue.severity,
|
|
215
|
+
message: issueText(issue),
|
|
216
|
+
code: issue.code,
|
|
217
|
+
params: issue.params,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
return out;
|
|
221
|
+
});
|
|
224
222
|
|
|
225
223
|
let dockOpenedForProblems = false;
|
|
226
224
|
watch(
|
|
@@ -99,23 +99,23 @@ export function useRunOverlay(
|
|
|
99
99
|
},
|
|
100
100
|
);
|
|
101
101
|
|
|
102
|
-
const runStates = computed<
|
|
102
|
+
const runStates = computed<Map<string, NodeRunState> | undefined>(() => {
|
|
103
103
|
const run = overlayRun.value;
|
|
104
104
|
if (!run || subgraphPath.value.length > 1) return undefined;
|
|
105
|
-
const out
|
|
105
|
+
const out = new Map<string, NodeRunState>();
|
|
106
106
|
for (const step of run.trace.steps) {
|
|
107
107
|
const id = step.nodeId.split("__")[0]!;
|
|
108
|
-
const previous = out
|
|
108
|
+
const previous = out.get(id);
|
|
109
109
|
const status = step.status === "failed" ? "failed" : "ok";
|
|
110
110
|
if (!previous || status === "failed") {
|
|
111
|
-
out
|
|
111
|
+
out.set(id, {
|
|
112
112
|
status,
|
|
113
113
|
durationMs: (previous?.durationMs ?? 0) + (step.durationMs ?? 0),
|
|
114
|
-
};
|
|
114
|
+
});
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
for (const skipped of run.trace.skipped)
|
|
118
|
-
out
|
|
118
|
+
out.set(skipped.nodeId, { status: "skipped" });
|
|
119
119
|
return out;
|
|
120
120
|
});
|
|
121
121
|
|
|
@@ -103,8 +103,8 @@ export function edgeClass(
|
|
|
103
103
|
to: string,
|
|
104
104
|
): string {
|
|
105
105
|
if (!runs) return "edge-trigger";
|
|
106
|
-
const target = runs
|
|
107
|
-
const taken = runs
|
|
106
|
+
const target = runs.get(to)?.status;
|
|
107
|
+
const taken = runs.has(from) && target && target !== "skipped";
|
|
108
108
|
if (taken && target === "failed") return "edge-trigger edge-failed";
|
|
109
109
|
return taken ? "edge-trigger edge-taken" : "edge-trigger edge-idle";
|
|
110
110
|
}
|
|
@@ -52,7 +52,7 @@ export function useCanvasNodes(props: Readonly<CanvasProps>, text: CanvasText) {
|
|
|
52
52
|
// The validator's problem on a node, in the reader's language (its English
|
|
53
53
|
// message when this version has no text for the code).
|
|
54
54
|
function issueOf(id: string): NodeIssue | null {
|
|
55
|
-
const issue = props.issues?.
|
|
55
|
+
const issue = props.issues?.get(id);
|
|
56
56
|
if (!issue) return null;
|
|
57
57
|
const key = `dms_automation.editor.problems.codes.${issue.code}`;
|
|
58
58
|
return issue.code && te(key)
|
|
@@ -116,7 +116,7 @@ export function useCanvasNodes(props: Readonly<CanvasProps>, text: CanvasText) {
|
|
|
116
116
|
processI18n,
|
|
117
117
|
scheduleTextOf(node),
|
|
118
118
|
),
|
|
119
|
-
run: props.runStates?.
|
|
119
|
+
run: props.runStates?.get(node.id) ?? null,
|
|
120
120
|
issue: issueOf(node.id),
|
|
121
121
|
icon,
|
|
122
122
|
category,
|
|
@@ -148,7 +148,7 @@ export function useCanvasNodes(props: Readonly<CanvasProps>, text: CanvasText) {
|
|
|
148
148
|
g.label ||
|
|
149
149
|
(node.config?.name as string | undefined) ||
|
|
150
150
|
t("dms_automation.nodes.role.group"),
|
|
151
|
-
run: props.runStates?.
|
|
151
|
+
run: props.runStates?.get(node.id) ?? null,
|
|
152
152
|
issue: issueOf(node.id),
|
|
153
153
|
ports: Array.isArray(g.ports) ? g.ports : [],
|
|
154
154
|
templateId: g.templateId,
|
|
@@ -39,9 +39,9 @@ export interface CanvasProps {
|
|
|
39
39
|
// move, delete, or edit. The "Apply / Cancel" buttons are hidden too.
|
|
40
40
|
readOnly?: boolean;
|
|
41
41
|
/** Outcome of each node in the run shown over the canvas (a test run, a debugged run). */
|
|
42
|
-
runStates?:
|
|
42
|
+
runStates?: Map<string, NodeRunState>;
|
|
43
43
|
/** The problem of each node the validator named. */
|
|
44
|
-
issues?:
|
|
44
|
+
issues?: Map<string, NodeIssue>;
|
|
45
45
|
/**
|
|
46
46
|
* The node the editor has selected (inspector, dock "Select node", a
|
|
47
47
|
* `?node=` link): the canvas selects it too and brings it into view.
|
|
@@ -88,7 +88,7 @@ const router = useDmsRouter()
|
|
|
88
88
|
// The catalog and where its entries are used, read with the page.
|
|
89
89
|
const listRead = useApiData<CatalogEntry[] | NodeKindEntry[]>(`${props.apiUrl}/${ENDPOINTS[props.kind]}`)
|
|
90
90
|
const usageRead = useApiData<Record<string, TypeUsage[]>>(`${props.apiUrl}/library/usage/${props.kind}`)
|
|
91
|
-
const usage = computed(() => usageRead.data.value ?? {})
|
|
91
|
+
const usage = computed(() => new Map(Object.entries(usageRead.data.value ?? {})))
|
|
92
92
|
const loading = computed(() => listRead.pending.value || usageRead.pending.value)
|
|
93
93
|
const error = computed(() => {
|
|
94
94
|
const failure = listRead.error.value ?? usageRead.error.value
|
|
@@ -219,7 +219,7 @@ function backToList() {
|
|
|
219
219
|
list.value?.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
const uses = computed(() => (selected.value ? (usage.value
|
|
222
|
+
const uses = computed(() => (selected.value ? (usage.value.get(selected.value.id) ?? []) : []))
|
|
223
223
|
const enabledUses = computed(() => new Set(uses.value.filter((u) => u.enabled).map((u) => u.procedureId)).size)
|
|
224
224
|
|
|
225
225
|
/** "Used by", one line per procedure with the nodes placing the entry under it, by state then name. */
|
|
@@ -233,7 +233,7 @@ const procedureUses = computed(() => {
|
|
|
233
233
|
const shownProcedureUses = computed(() => (showAllUses.value ? procedureUses.value : procedureUses.value.slice(0, USES_SHOWN)))
|
|
234
234
|
|
|
235
235
|
function useCount(id: string): number {
|
|
236
|
-
return new Set((usage.value
|
|
236
|
+
return new Set((usage.value.get(id) ?? []).map((u) => u.procedureId)).size
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
const settingsSchema = computed(() => (props.kind === 'actions' ? selected.value?.inputSchema : selected.value?.configSchema))
|
|
@@ -298,7 +298,7 @@ const { paletteHidden, togglePalette } = palette
|
|
|
298
298
|
:run-step="subgraphPath.length <= 1 ? selectedRunStep : null"
|
|
299
299
|
:run-label="overlayLabel"
|
|
300
300
|
:run-trace-url="overlayRun ? `${traceUrl}?run=${overlayRun._id}` : undefined"
|
|
301
|
-
:issue="issuesByNode
|
|
301
|
+
:issue="issuesByNode.get(selectedNode.id) ?? null"
|
|
302
302
|
:node-name="nodeDisplayName"
|
|
303
303
|
:saved-triggers="savedTriggers"
|
|
304
304
|
@update:node="onUpdateNode"
|
|
@@ -28,13 +28,13 @@ interface Row {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const rows = computed<Row[]>(() => {
|
|
31
|
-
const before = props.run.lastSuccess?.stepDurations ?? {}
|
|
31
|
+
const before = new Map(Object.entries(props.run.lastSuccess?.stepDurations ?? {}))
|
|
32
32
|
const rowsById = new Map<string, Row>()
|
|
33
33
|
for (const step of props.run.trace.steps) {
|
|
34
34
|
const row = rowsById.get(step.nodeId) ?? {
|
|
35
35
|
nodeId: step.nodeId,
|
|
36
36
|
name: stepTitle(step.name, processI18n),
|
|
37
|
-
before: before
|
|
37
|
+
before: before.get(step.nodeId) ?? null,
|
|
38
38
|
now: null,
|
|
39
39
|
notReached: false,
|
|
40
40
|
tone: 'ok',
|
|
@@ -47,7 +47,7 @@ const rows = computed<Row[]>(() => {
|
|
|
47
47
|
const labels = new Map((props.run.graph?.nodes ?? []).flatMap((n) => (n.label ? [[n.id, n.label] as const] : [])))
|
|
48
48
|
// A step this run never reached reads as one row, its inner steps (a
|
|
49
49
|
// group's) added up into it.
|
|
50
|
-
for (const [flatId, ms] of
|
|
50
|
+
for (const [flatId, ms] of before) {
|
|
51
51
|
if (rowsById.has(flatId)) continue
|
|
52
52
|
const nodeId = flatId.split('__')[0] ?? flatId
|
|
53
53
|
const row = rowsById.get(nodeId) ?? {
|