@w6w/embed 0.2.11 → 0.2.20
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 +22 -5
- package/dist/ConfirmModal-Pv2-A_3U.js +186 -0
- package/dist/ConfirmModal-Pv2-A_3U.js.map +1 -0
- package/dist/{CreateFunctionModal-D6CQLpa_.js → CreateFunctionModal-DScxp_LN.js} +2 -2
- package/dist/{CreateFunctionModal-D6CQLpa_.js.map → CreateFunctionModal-DScxp_LN.js.map} +1 -1
- package/dist/{DocumentFormModal-YauVdolr.js → DocumentFormModal-Br4s8wmi.js} +3 -3
- package/dist/{DocumentFormModal-YauVdolr.js.map → DocumentFormModal-Br4s8wmi.js.map} +1 -1
- package/dist/ImportSpecModal-Cpzp8ndt.js +251 -0
- package/dist/ImportSpecModal-Cpzp8ndt.js.map +1 -0
- package/dist/{ModelRoutesManager-BGESQahw.js → ModelRoutesManager-1Ac5wcas.js} +3 -3
- package/dist/{ModelRoutesManager-BGESQahw.js.map → ModelRoutesManager-1Ac5wcas.js.map} +1 -1
- package/dist/WorkflowEditor-CmhXHRxi.js +1109 -0
- package/dist/WorkflowEditor-CmhXHRxi.js.map +1 -0
- package/dist/apps-ItBvnWX3.js +92 -0
- package/dist/apps-ItBvnWX3.js.map +1 -0
- package/dist/chrome/DangerZone.d.ts +4 -3
- package/dist/chrome/ExecutionProfileHeader.d.ts +3 -3
- package/dist/chrome/JsonToggle.d.ts +29 -20
- package/dist/chrome/Modal.d.ts +3 -1
- package/dist/chrome/RightRail.d.ts +6 -1
- package/dist/chrome/VersionHistoryModal.d.ts +2 -0
- package/dist/chrome/index.d.ts +1 -0
- package/dist/chrome/workspace.d.ts +32 -1
- package/dist/{coerce-input-DttlcSdO.js → coerce-input-DFJ4n_wc.js} +68 -69
- package/dist/coerce-input-DFJ4n_wc.js.map +1 -0
- package/dist/{connections-D7cgXhDS.js → connections-CzsCyIxY.js} +10 -10
- package/dist/{connections-D7cgXhDS.js.map → connections-CzsCyIxY.js.map} +1 -1
- package/dist/{credentials-DaQU3Ca_.js → credentials-Cn92LGhJ.js} +4 -4
- package/dist/{credentials-DaQU3Ca_.js.map → credentials-Cn92LGhJ.js.map} +1 -1
- package/dist/data-stores-UeQvwVCa.js +170 -0
- package/dist/data-stores-UeQvwVCa.js.map +1 -0
- package/dist/document-sources-DNmBojx6.js +169 -0
- package/dist/document-sources-DNmBojx6.js.map +1 -0
- package/dist/draft/use-workflow-draft.d.ts +2 -0
- package/dist/draft.mjs +2 -2
- package/dist/editor/PublishTooltip.d.ts +7 -0
- package/dist/editor/SetupIncompleteBanner.d.ts +12 -0
- package/dist/editor/StartingStateModal.d.ts +14 -0
- package/dist/editor/WorkflowSettingsModal.d.ts +6 -1
- package/dist/editor/WorkflowVariablesEditor.d.ts +6 -0
- package/dist/editor/definition.d.ts +4 -0
- package/dist/editor/json-apply.d.ts +29 -0
- package/dist/editor/step-problems-feed.d.ts +5 -0
- package/dist/editor/types.d.ts +2 -2
- package/dist/editor-apps-DkkC7wOQ.js +152 -0
- package/dist/editor-apps-DkkC7wOQ.js.map +1 -0
- package/dist/editor-tools-BR27RGto.js +1683 -0
- package/dist/editor-tools-BR27RGto.js.map +1 -0
- package/dist/editor.mjs +1 -1
- package/dist/editors.mjs +536 -478
- package/dist/editors.mjs.map +1 -1
- package/dist/forms.mjs +3 -3
- package/dist/{rail-settings-XYGToh00.js → import-bindings-EUtxZ9Ti.js} +90 -24
- package/dist/import-bindings-EUtxZ9Ti.js.map +1 -0
- package/dist/index.mjs +138 -108
- package/dist/index.mjs.map +1 -1
- package/dist/lib/binding-problems.d.ts +5 -1
- package/dist/lib/history-query.d.ts +45 -0
- package/dist/lib/import-bindings.d.ts +89 -0
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/rail-settings.d.ts +1 -1
- package/dist/lib/setup-incomplete.d.ts +22 -0
- package/dist/lib/starting-data.d.ts +31 -0
- package/dist/lib/state-panel.d.ts +29 -0
- package/dist/lib/target-fields.d.ts +3 -15
- package/dist/lib/workflow-live-run.d.ts +84 -6
- package/dist/lib/workflow-validity.d.ts +64 -16
- package/dist/lib/workflow-variables.d.ts +1 -1
- package/dist/lib/workflow-version.d.ts +2 -0
- package/dist/lib.mjs +87 -72
- package/dist/lists/DataStoreList.d.ts +17 -0
- package/dist/lists/DataStoreView.d.ts +19 -0
- package/dist/lists/Logs.d.ts +19 -0
- package/dist/lists.d.ts +6 -0
- package/dist/lists.mjs +1255 -816
- package/dist/lists.mjs.map +1 -1
- package/dist/rail/ConnectionsTool.d.ts +2 -0
- package/dist/rail/HistoryTool.d.ts +2 -0
- package/dist/rail/StartingStateTool.d.ts +2 -0
- package/dist/rail/settings-sections.d.ts +4 -1
- package/dist/rail.mjs +1 -1
- package/dist/repos/connections.d.ts +1 -0
- package/dist/repos/constants.d.ts +12 -0
- package/dist/repos/data-stores.d.ts +84 -0
- package/dist/repos/history.d.ts +9 -0
- package/dist/repos/index.d.ts +2 -0
- package/dist/repos/spec-export.d.ts +3 -3
- package/dist/repos/spec-import.d.ts +30 -1
- package/dist/repos/step-tests.d.ts +2 -0
- package/dist/repos/webhook-listen.d.ts +35 -0
- package/dist/repos/workflows.d.ts +105 -2
- package/dist/repos.mjs +370 -328
- package/dist/repos.mjs.map +1 -1
- package/dist/setup-incomplete-BHs3Lpfy.js +199 -0
- package/dist/setup-incomplete-BHs3Lpfy.js.map +1 -0
- package/dist/{spec-export-CBbloO_n.js → spec-export-DGy5ijps.js} +72 -59
- package/dist/spec-export-DGy5ijps.js.map +1 -0
- package/dist/spec-import-SWOonsNr.js +116 -0
- package/dist/spec-import-SWOonsNr.js.map +1 -0
- package/dist/{step-tests-CivICmTq.js → step-tests-B4E4W3ly.js} +8 -7
- package/dist/step-tests-B4E4W3ly.js.map +1 -0
- package/dist/{use-callable-draft-DsALnSfF.js → use-callable-draft-DCauHt5o.js} +2 -2
- package/dist/{use-callable-draft-DsALnSfF.js.map → use-callable-draft-DCauHt5o.js.map} +1 -1
- package/dist/use-workflow-draft-l3P5KZzw.js +338 -0
- package/dist/use-workflow-draft-l3P5KZzw.js.map +1 -0
- package/dist/workflows-BZN4Hyz1.js +623 -0
- package/dist/workflows-BZN4Hyz1.js.map +1 -0
- package/package.json +4 -3
- package/src/styles.css +153 -1
- package/dist/ConfirmModal-BE-SdX-O.js +0 -185
- package/dist/ConfirmModal-BE-SdX-O.js.map +0 -1
- package/dist/ImportSpecModal-B7qd1Km2.js +0 -136
- package/dist/ImportSpecModal-B7qd1Km2.js.map +0 -1
- package/dist/WorkflowEditor-CwvmAGp2.js +0 -925
- package/dist/WorkflowEditor-CwvmAGp2.js.map +0 -1
- package/dist/apps-CboASBKr.js +0 -77
- package/dist/apps-CboASBKr.js.map +0 -1
- package/dist/coerce-input-DttlcSdO.js.map +0 -1
- package/dist/document-sources-UCwe8x77.js +0 -91
- package/dist/document-sources-UCwe8x77.js.map +0 -1
- package/dist/editor-apps-BUZWld-m.js +0 -95
- package/dist/editor-apps-BUZWld-m.js.map +0 -1
- package/dist/editor-tools-B_Lfx3kw.js +0 -1279
- package/dist/editor-tools-B_Lfx3kw.js.map +0 -1
- package/dist/rail-settings-XYGToh00.js.map +0 -1
- package/dist/spec-export-CBbloO_n.js.map +0 -1
- package/dist/spec-import-CW6R_Wk1.js +0 -469
- package/dist/spec-import-CW6R_Wk1.js.map +0 -1
- package/dist/step-tests-CivICmTq.js.map +0 -1
- package/dist/trigger-preview-DKxfjzUY.js +0 -145
- package/dist/trigger-preview-DKxfjzUY.js.map +0 -1
- package/dist/use-workflow-draft-DzAyUeA6.js +0 -316
- package/dist/use-workflow-draft-DzAyUeA6.js.map +0 -1
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
function k(e, t) {
|
|
2
|
-
var r, o;
|
|
3
|
-
const n = [];
|
|
4
|
-
for (const s of e) {
|
|
5
|
-
const i = (r = s.uses) == null ? void 0 : r.app, a = (o = s.uses) == null ? void 0 : o.connection;
|
|
6
|
-
if (typeof i != "string" || i === "" || typeof a != "string" || a === "") continue;
|
|
7
|
-
const u = t(i);
|
|
8
|
-
(u == null ? void 0 : u.state) === "ready" && (u.ids.has(a) || n.push({ siteId: s.id, app: i, connection: a, code: "unknown_connection" }));
|
|
9
|
-
}
|
|
10
|
-
return n;
|
|
11
|
-
}
|
|
12
|
-
function g(e) {
|
|
13
|
-
const t = e.enabled === !1 && (e.problemCount > 0 || e.hadProblems);
|
|
14
|
-
return {
|
|
15
|
-
show: t,
|
|
16
|
-
canEnable: t && e.problemCount === 0 && !e.dirty,
|
|
17
|
-
problemCount: e.problemCount
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function f(e) {
|
|
21
|
-
return (e == null ? void 0 : e.nodes) ?? (e == null ? void 0 : e.steps) ?? [];
|
|
22
|
-
}
|
|
23
|
-
function l(e, t) {
|
|
24
|
-
const n = e.uses;
|
|
25
|
-
if (n != null && n.function) return null;
|
|
26
|
-
if (!(n != null && n.app) || !(n != null && n.action)) return "target missing";
|
|
27
|
-
const r = t.actionParamsByKey[`${n.app}::${n.action}`] ?? [], o = e.with ?? {};
|
|
28
|
-
return t.requiredParamsFilled(r, o) ? n.app in t.appsById && t.isTestRequired(t.appsById[n.app]) && !t.testStatus[e.id] ? "saved test" : null : "required params";
|
|
29
|
-
}
|
|
30
|
-
function d(e, t) {
|
|
31
|
-
return l(e, t) === null;
|
|
32
|
-
}
|
|
33
|
-
function b(e, t) {
|
|
34
|
-
return t.hasTrigger ? f(e).every((n) => d(n, t)) : !1;
|
|
35
|
-
}
|
|
36
|
-
function h(e, t) {
|
|
37
|
-
if (!t.hasTrigger) return "no trigger node";
|
|
38
|
-
for (const n of f(e)) {
|
|
39
|
-
const r = l(n, t);
|
|
40
|
-
if (r) return `${n.id}: ${r}`;
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
const p = /* @__PURE__ */ new Set(["string", "number", "boolean", "object", "array"]);
|
|
45
|
-
function m(e) {
|
|
46
|
-
if (!Array.isArray(e)) return [];
|
|
47
|
-
const t = [];
|
|
48
|
-
for (const n of e) {
|
|
49
|
-
if (typeof n != "object" || n === null || Array.isArray(n)) continue;
|
|
50
|
-
const r = n, o = { key: typeof r.key == "string" ? r.key : "" };
|
|
51
|
-
typeof r.type == "string" && p.has(r.type) && (o.type = r.type), typeof r.required == "boolean" && (o.required = r.required), r.default !== void 0 && (o.default = r.default), t.push(o);
|
|
52
|
-
}
|
|
53
|
-
return t;
|
|
54
|
-
}
|
|
55
|
-
function v(e) {
|
|
56
|
-
if (e.length !== 0)
|
|
57
|
-
return e.map((t) => {
|
|
58
|
-
const n = { key: t.key };
|
|
59
|
-
return t.type !== void 0 && (n.type = t.type), t.required && (n.required = !0), t.default !== void 0 && (n.default = t.default), n;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function S(e) {
|
|
63
|
-
const t = /* @__PURE__ */ new Set(), n = [];
|
|
64
|
-
return e.forEach((r, o) => {
|
|
65
|
-
t.has(r.key) ? n.push(o) : t.add(r.key);
|
|
66
|
-
}), n;
|
|
67
|
-
}
|
|
68
|
-
function A(e, t, n) {
|
|
69
|
-
const r = /* @__PURE__ */ new Set(), o = [];
|
|
70
|
-
for (const s of [...e.slice(0, t).map((i) => i.key), ...n])
|
|
71
|
-
s === "" || r.has(s) || (r.add(s), o.push(s));
|
|
72
|
-
return o;
|
|
73
|
-
}
|
|
74
|
-
function y(e) {
|
|
75
|
-
return typeof e == "object" && e !== null && !Array.isArray(e) && e.type === "expr" && Array.isArray(e.parts);
|
|
76
|
-
}
|
|
77
|
-
function q(e) {
|
|
78
|
-
const t = [], n = [];
|
|
79
|
-
for (const r of e)
|
|
80
|
-
if (r.key.trim() !== "") {
|
|
81
|
-
if (y(r.default)) {
|
|
82
|
-
t.push({ key: r.key, type: r.type, required: !1 }), n.push(r.key);
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
t.push({ key: r.key, type: r.type, default: r.default, required: r.required });
|
|
86
|
-
}
|
|
87
|
-
return { fields: t, computed: n };
|
|
88
|
-
}
|
|
89
|
-
function w(e) {
|
|
90
|
-
return e === "active" || e === "archived" ? e : "draft";
|
|
91
|
-
}
|
|
92
|
-
function P(e) {
|
|
93
|
-
const t = e;
|
|
94
|
-
return {
|
|
95
|
-
autoSave: (t == null ? void 0 : t.autoSave) !== !1,
|
|
96
|
-
savePosition: (t == null ? void 0 : t.savePosition) !== !1
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function F(e, t, n) {
|
|
100
|
-
const o = { ...typeof e == "object" && e !== null && !Array.isArray(e) ? e : void 0 };
|
|
101
|
-
return n ? delete o[t] : o[t] = !1, Object.keys(o).length === 0 ? void 0 : o;
|
|
102
|
-
}
|
|
103
|
-
function j(e, t) {
|
|
104
|
-
var o, s;
|
|
105
|
-
const n = f(e), r = [];
|
|
106
|
-
for (const i of n) {
|
|
107
|
-
const a = (o = i.uses) == null ? void 0 : o.app;
|
|
108
|
-
if (!a || !t.isManualTrigger(a)) continue;
|
|
109
|
-
const u = t.asFieldDefs((s = i.with) == null ? void 0 : s.fields).filter((c) => typeof c.key == "string" && c.key.trim() !== "");
|
|
110
|
-
r.push({ id: i.id, label: i.displayName ?? i.id, fields: u });
|
|
111
|
-
}
|
|
112
|
-
return r;
|
|
113
|
-
}
|
|
114
|
-
function B(e) {
|
|
115
|
-
const t = {};
|
|
116
|
-
for (const n of (e == null ? void 0 : e.fields) ?? [])
|
|
117
|
-
if (!(typeof n.key != "string" || n.key.trim() === "")) {
|
|
118
|
-
if (n.default !== void 0) {
|
|
119
|
-
t[n.key] = n.default;
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
t[n.key] = n.type === "number" ? 0 : n.type === "boolean" ? !1 : "";
|
|
123
|
-
}
|
|
124
|
-
return t;
|
|
125
|
-
}
|
|
126
|
-
export {
|
|
127
|
-
S as a,
|
|
128
|
-
y as b,
|
|
129
|
-
m as c,
|
|
130
|
-
g as d,
|
|
131
|
-
w as e,
|
|
132
|
-
k as f,
|
|
133
|
-
q as g,
|
|
134
|
-
j as h,
|
|
135
|
-
h as i,
|
|
136
|
-
A as j,
|
|
137
|
-
F as k,
|
|
138
|
-
f as l,
|
|
139
|
-
P as r,
|
|
140
|
-
d as s,
|
|
141
|
-
B as t,
|
|
142
|
-
v,
|
|
143
|
-
b as w
|
|
144
|
-
};
|
|
145
|
-
//# sourceMappingURL=trigger-preview-DKxfjzUY.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trigger-preview-DKxfjzUY.js","sources":["../src/lib/binding-problems.ts","../src/lib/workflow-nodes.ts","../src/lib/workflow-validity.ts","../src/lib/workflow-variables.ts","../src/lib/workflow-settings.ts","../src/lib/trigger-preview.ts"],"sourcesContent":["// Pure detection of dangling connection bindings (R5). No React, no I/O: call sites gather the\n// inputs (per-app connection lists, the callable's enabled flag, draft dirtiness) and render.\n\nexport type AppConnections =\n | { state: \"loading\" }\n | { state: \"error\" }\n | { state: \"ready\"; ids: ReadonlySet<string> };\n\nexport interface BindingSite {\n id: string;\n uses?: { app?: string; connection?: string | null };\n}\n\nexport interface BindingProblem {\n siteId: string;\n app: string;\n connection: string;\n code: \"unknown_connection\";\n}\n\n/** A problem iff app + connection are non-empty and the app's list is `ready` without the id.\n * `loading`, `error` and `undefined` (internal app / not fetched) never report — no false red. */\nexport function findBindingProblems(\n sites: readonly BindingSite[],\n byApp: (app: string) => AppConnections | undefined,\n): BindingProblem[] {\n const out: BindingProblem[] = [];\n for (const site of sites) {\n const app = site.uses?.app;\n const connection = site.uses?.connection;\n if (typeof app !== \"string\" || app === \"\") continue;\n if (typeof connection !== \"string\" || connection === \"\") continue;\n const conns = byApp(app);\n if (conns?.state !== \"ready\") continue;\n if (conns.ids.has(connection)) continue;\n out.push({ siteId: site.id, app, connection, code: \"unknown_connection\" });\n }\n return out;\n}\n\nexport interface DisabledBannerInput {\n enabled: boolean | undefined;\n problemCount: number;\n dirty: boolean;\n hadProblems: boolean;\n}\n\nexport interface DisabledBannerState {\n show: boolean;\n canEnable: boolean;\n problemCount: number;\n}\n\n/** Show iff disabled AND (problems now OR problems seen this mount). Enable only once every\n * binding is fixed AND saved. `enabled` undefined (versions not loaded) never shows. */\nexport function disabledBannerState(input: DisabledBannerInput): DisabledBannerState {\n const show = input.enabled === false && (input.problemCount > 0 || input.hadProblems);\n return {\n show,\n canEnable: show && input.problemCount === 0 && !input.dirty,\n problemCount: input.problemCount,\n };\n}\n","/** The vertex array of a workflow definition, in either shape — `nodes` wins, `steps` is the legacy name. */\nexport function workflowNodes<T = unknown>(\n def: { nodes?: T[]; steps?: T[] } | null | undefined,\n): T[] {\n return def?.nodes ?? def?.steps ?? [];\n}\n","import { workflowNodes } from \"./workflow-nodes.ts\";\n\n/**\n * The publish-time validity gate (`logs/decisions.jsonl` row 9, verbatim):\n *\n * > a step is valid iff (app+action set, or function id set) and all its\n * > required params are filled (reuse `requiredParamsFilled`,\n * > `StepBuilderModal.tsx:577-590`) and, where `testRequired` is set for the\n * > app, its saved test has passed. The workflow is valid iff a trigger exists\n * > and every step is valid. Graph well-formedness (orphaned/unreachable\n * > nodes, dangling edges) is explicitly OUT of scope for this project.\n *\n * Pure and testable by design: `WorkflowsPage.tsx` is JSX, which Node 24's\n * type-stripping cannot parse, so nothing in it can be loaded by `node --test`\n * (same shape as `src/lib/workflow-save.ts` + its `.test.ts`). This module\n * cannot import `@w6w/ui`/`@w6w/ui/flow` either way: `@w6w/ui`'s\n * `package.json` `exports[\".\"]` resolves to raw `./src/index.ts`, which\n * re-exports `StepBuilderModal.tsx` — a `.tsx` file — so `node --test` throws\n * `ERR_UNKNOWN_FILE_EXTENSION` the moment anything here imports it. Instead,\n * the two functions the pinned predicate reuses\n * (`requiredParamsFilled`/`isTestRequired`) are **caller-injected** on\n * `ValidityContext` — `WorkflowsPage.tsx` (unaffected by the JSX constraint)\n * imports the real ones from `@w6w/ui` and passes them in. Same for \"a\n * trigger exists\": that reads a graph STEP whose `INTERNAL_NODES` entry has\n * `group === \"trigger\"` (`@w6w/ui/flow`), never the workflow's top-level\n * `trigger` field (`rfcs/workflow.md:114`, \"Absent means manual-only\" — always\n * present, so it can't gate anything) — so `hasTrigger` is caller-computed too.\n *\n * `ActionParamLike`/`WorkflowStepLike`/`WorkflowLike` below are this file's\n * own minimal local types (see `rfcs/workflow.md` §\"Step\" for the real shape,\n * `rfcs/function.md` for the `uses.function` arm).\n */\n\n/** A declared action/internal-node param, just enough of it for this gate. */\nexport interface ActionParamLike {\n key: string;\n type: string;\n required?: boolean;\n default?: unknown;\n children?: ActionParamLike[];\n}\n\n/** A workflow graph step, just enough of it for this gate. */\nexport interface WorkflowStepLike {\n id: string;\n uses?: {\n app?: string;\n action?: string;\n /** The \"or a function id\" arm (`rfcs/function.md:49,260`) — `Step.uses.function`. */\n function?: string;\n };\n with?: Record<string, unknown>;\n}\n\n/** A workflow definition, just enough of it for this gate. */\nexport interface WorkflowLike {\n nodes?: WorkflowStepLike[];\n steps?: WorkflowStepLike[];\n /**\n * Present on real definitions, never read here — graph well-formedness\n * (orphaned/unreachable nodes, dangling edges) is explicitly out of scope\n * for the publish gate (`logs/decisions.jsonl` row 9).\n */\n edges?: unknown;\n}\n\n/**\n * Everything `stepValid`/`workflowValid`/`invalidReason` need that this pure\n * module cannot compute or import itself — see the module docstring for why\n * each field is caller-built rather than derived in here.\n */\nexport interface ValidityContext {\n /** Does the graph contain a step whose (app, action) is a trigger node? */\n hasTrigger: boolean;\n /** Declared params for a step's target, keyed `` `${app}::${action}` ``. */\n actionParamsByKey: Record<string, ActionParamLike[]>;\n /** The fetched apps list, keyed by app id — only a key present here is test-gated. */\n appsById: Record<string, unknown>;\n /** Whether the given step id has a saved test that last ran successfully. */\n testStatus: Record<string, boolean>;\n /** `@w6w/ui`'s `requiredParamsFilled`, injected (see module docstring). */\n requiredParamsFilled: (params: ActionParamLike[], values: Record<string, unknown>) => boolean;\n /** `@w6w/ui`'s `isTestRequired`, injected (see module docstring). */\n isTestRequired: (app: unknown) => boolean;\n}\n\n/** Which of the pinned predicate's checks a step fails, or `null` when it's valid. */\ntype StepFailure = \"target missing\" | \"required params\" | \"saved test\";\n\n/**\n * The single place the pinned predicate's branching lives — `stepValid` and\n * `invalidReason` both read this rather than re-deriving the same checks.\n */\nfunction stepFailure(step: WorkflowStepLike, ctx: ValidityContext): StepFailure | null {\n const uses = step.uses;\n // A function-targeted step is valid on presence alone (T5.1.1 owns a\n // Function's own runnability separately — not duplicated here).\n if (uses?.function) return null;\n if (!uses?.app || !uses?.action) return \"target missing\";\n const params = ctx.actionParamsByKey[`${uses.app}::${uses.action}`] ?? [];\n const values = step.with ?? {};\n if (!ctx.requiredParamsFilled(params, values)) return \"required params\";\n // The testRequired/saved-test branch applies only when `uses.app` is a real,\n // fetched app — an internal/trigger/control step's app is never a key in\n // `appsById`, so it is never gated on a saved test.\n if (uses.app in ctx.appsById && ctx.isTestRequired(ctx.appsById[uses.app])) {\n if (!ctx.testStatus[step.id]) return \"saved test\";\n }\n return null;\n}\n\n/** Is this one step valid, per the pinned predicate? */\nexport function stepValid(step: WorkflowStepLike, ctx: ValidityContext): boolean {\n return stepFailure(step, ctx) === null;\n}\n\n/**\n * Is the whole workflow valid? A trigger step must exist and every step must\n * be individually valid — nothing about graph well-formedness (this never\n * reads `workflow.edges`, even when present).\n */\nexport function workflowValid(workflow: WorkflowLike, ctx: ValidityContext): boolean {\n if (!ctx.hasTrigger) return false;\n return workflowNodes(workflow).every((step) => stepValid(step, ctx));\n}\n\n/**\n * `null` when the workflow is valid; otherwise names the cause — `\"no trigger\n * step\"`, or the id of the first invalid step in declared order plus which\n * check it fails.\n */\nexport function invalidReason(workflow: WorkflowLike, ctx: ValidityContext): string | null {\n if (!ctx.hasTrigger) return \"no trigger node\";\n for (const step of workflowNodes(workflow)) {\n const failure = stepFailure(step, ctx);\n if (failure) return `${step.id}: ${failure}`;\n }\n return null;\n}\n","/**\n * The pure decisions behind a workflow's `variables` list (T1.1.5) — the\n * Variables tab's authoring surface and the run page's generated-form\n * projection. `variables` rides inside the workflow **definition**\n * (`w6w-workflow/packages/types/mod.ts:170`), the same JSON document that\n * already carries `steps`, so there is no column, no migration and no server\n * change behind it.\n *\n * Pure, React-free, `.ts`, **no value import of `@w6w/ui`** — studio's\n * `test:unit` is a bare `node --test` with no jsx loader\n * (`studio/package.json:17`), so a value import of the barrel (which\n * re-exports `.tsx`) kills the test. Same shape as `workflow-settings.ts`'s\n * reader/writer discipline and `input-seeding.ts`'s pure-module docstring\n * rule.\n *\n * The row type is defined **locally**, structurally identical to\n * `WorkflowVariable` (`w6w-workflow/packages/types/mod.ts:40-45`: `key`,\n * `type?`, `required?`, `default?`), so no cast is needed at the `.tsx`\n * boundary in either direction.\n */\n\n/** One row of a workflow's declared `variables` list. */\nexport interface WorkflowVariableRow {\n key: string;\n type?: \"string\" | \"number\" | \"boolean\" | \"object\" | \"array\";\n required?: boolean;\n default?: unknown;\n}\n\n/** The declared type union `WorkflowVariable.type` accepts. */\nconst VARIABLE_TYPES = new Set([\"string\", \"number\", \"boolean\", \"object\", \"array\"]);\n\n/**\n * Read a workflow definition's `variables` field as an array of rows.\n *\n * Takes `unknown` because the source is `JSON.parse`d and the `</>` editor\n * lets an author type anything: a non-array reads as no variables, and a\n * non-object array entry is dropped rather than crashing the tab. **Never\n * sorts, never de-dups, never re-orders** — declaration order *is*\n * resolution order (D-5) and `resolveVariables` iterates the array in order\n * (`w6w-workflow/packages/engine/src/run.ts:70-83`), so two rows sharing a\n * key both survive, in the order they were declared.\n */\nexport function readVariables(raw: unknown): WorkflowVariableRow[] {\n if (!Array.isArray(raw)) return [];\n const out: WorkflowVariableRow[] = [];\n for (const entry of raw) {\n if (typeof entry !== \"object\" || entry === null || Array.isArray(entry)) continue;\n const e = entry as Record<string, unknown>;\n const row: WorkflowVariableRow = { key: typeof e.key === \"string\" ? e.key : \"\" };\n if (typeof e.type === \"string\" && VARIABLE_TYPES.has(e.type)) {\n row.type = e.type as WorkflowVariableRow[\"type\"];\n }\n if (typeof e.required === \"boolean\") row.required = e.required;\n if (e.default !== undefined) row.default = e.default;\n out.push(row);\n }\n return out;\n}\n\n/**\n * The rows ready to write back into the definition's `variables` field.\n *\n * Mirrors `workflow-settings.ts`'s \"default written as absent\" rule, but here\n * it applies to a row's **optional flags, not the value**: `required` is\n * omitted when `false` and `type` is omitted when unset, so opening the tab\n * and touching nothing does not rewrite a legacy definition into\n * `{required:false,type:undefined}` rows. `default` is user data and is kept\n * **verbatim** — including `false`, `0`, `\"\"` and `null` — never dropped as\n * an optimisation (a \"drop falsy\" implementation would lose a `false`\n * default, which is exactly the case the tests pin).\n *\n * Returns `undefined` for an empty array (never `[]`) so the caller\n * (`patchMeta`, via `JSON.stringify`) drops the key entirely — which matters\n * beyond hygiene here: `draftFromWorkflowVariables`\n * (`server/packages/api/mcp/tool-schema.ts:310-326`) treats `undefined` and\n * `length === 0` identically (pass-through), so `[]` and absent already agree\n * on the wire; this just keeps the definition itself from growing an empty\n * `\"variables\": []` on the first open of the tab.\n */\nexport function variablesForSave(rows: WorkflowVariableRow[]): WorkflowVariableRow[] | undefined {\n if (rows.length === 0) return undefined;\n return rows.map((r) => {\n const out: WorkflowVariableRow = { key: r.key };\n if (r.type !== undefined) out.type = r.type;\n if (r.required) out.required = true;\n if (r.default !== undefined) out.default = r.default;\n return out;\n });\n}\n\n/**\n * Every index whose `key` repeats an earlier row's key. `resolveVariables`\n * writes `vars[v.key]` in a loop with no duplicate check (`run.ts:74-80`), so\n * a later row silently wins — this is informational only (the tab marks the\n * row; nothing here blocks a save), never de-duping or rejecting.\n */\nexport function duplicateKeyIndexes(rows: WorkflowVariableRow[]): number[] {\n const seen = new Set<string>();\n const out: number[] = [];\n rows.forEach((r, i) => {\n if (seen.has(r.key)) out.push(i);\n else seen.add(r.key);\n });\n return out;\n}\n\n/**\n * The `vars.*` names to offer row `index`'s expression rail: the keys of\n * rows **strictly above** it, then `projectVars`, deduped, with blanks\n * dropped. Declaration order is resolution order (D-5), so a row can only\n * reference a variable declared earlier than itself — offering a row at or\n * below `index` would suggest a forward reference the engine rejects\n * (T2.1.1). This is the offered rail only; it is not validation.\n */\nexport function varsRailFor(\n rows: WorkflowVariableRow[],\n index: number,\n projectVars: string[],\n): string[] {\n const seen = new Set<string>();\n const out: string[] = [];\n for (const k of [...rows.slice(0, index).map((r) => r.key), ...projectVars]) {\n if (k === \"\" || seen.has(k)) continue;\n seen.add(k);\n out.push(k);\n }\n return out;\n}\n\n/** `true` if `v` is an `ExprValue` envelope — the two-key check `@w6w/ui`'s\n * `isExprValue` (`ui/src/types.ts:301-309`) makes, re-implemented locally\n * because this module cannot import `@w6w/ui` at value level (see the\n * module docstring). Mirrors `trigger-preview.ts:102-119`'s sanctioned\n * pattern for the same constraint — this is not duplication. */\nexport function isExprDefault(v: unknown): boolean {\n return (\n typeof v === \"object\" &&\n v !== null &&\n !Array.isArray(v) &&\n (v as { type?: unknown }).type === \"expr\" &&\n Array.isArray((v as { parts?: unknown }).parts)\n );\n}\n\n/** One field the run page's generated form fills — structurally assignable\n * to `@w6w/ui/flow`'s `TriggerFieldDef` (all fields optional) with no cast. */\nexport interface RunFormField {\n key: string;\n type?: WorkflowVariableRow[\"type\"];\n default?: unknown;\n required?: boolean;\n}\n\n/**\n * Project a workflow's declared variables into the run page's form fields.\n *\n * A row whose `default` is an `ExprValue` envelope is a server-side\n * computation (its value is resolved at run time, not authored on the\n * client), so it is emitted with **`default` dropped and `required: false`**\n * — never as a value `ui`'s `seedValues` would `String(...)` the envelope\n * into — and its key is listed in `computed` so the host can label the field\n * \"computed at run time\" and post nothing for it. A row with a blank/missing\n * key is dropped, mirroring `@w6w/ui`'s `fieldsToParams`, which does the same\n * before turning field definitions into a fillable form.\n */\nexport function runFormFields(rows: WorkflowVariableRow[]): {\n fields: RunFormField[];\n computed: string[];\n} {\n const fields: RunFormField[] = [];\n const computed: string[] = [];\n for (const r of rows) {\n if (r.key.trim() === \"\") continue;\n if (isExprDefault(r.default)) {\n fields.push({ key: r.key, type: r.type, required: false });\n computed.push(r.key);\n continue;\n }\n fields.push({ key: r.key, type: r.type, default: r.default, required: r.required });\n }\n return { fields, computed };\n}\n","/**\n * The two pure decisions behind a workflow's authoring settings\n * (`rfcs/workflow.md` — \"Amendment — 2026-07-29: authoring presentation\").\n *\n * `settings` rides inside the workflow **definition** — the same JSON document\n * that already carries `steps` — so there is no column, no migration and no\n * server change behind it. What needs pinning is not the storage but the two\n * readings that can silently corrupt a definition, and both live here rather\n * than in `WorkflowsPage.tsx` so they are executable: that file is JSX, which\n * Node 24's type-stripping cannot parse, so nothing in it can be loaded by\n * `node --test`. Same shape as `src/lib/workflow-save.ts` + its `.test.ts`.\n */\nimport type { WorkflowStatus } from \"@w6w/sdk\";\n\n/**\n * Read a workflow definition's `status` field as the real three-state value.\n *\n * `WorkflowsPage.tsx` used to coerce this with `status === \"active\" ? \"active\" :\n * \"draft\"` — a two-way ternary that silently collapsed a freshly-archived\n * workflow back down to `\"draft\"`, which would have reproduced the same bug one\n * layer up in the archive/delete button-swap (an archived workflow would render\n * Archive again instead of Delete). `unknown` because the source is parsed JSON,\n * not a validated value — anything that isn't exactly `\"active\"` or `\"archived\"`\n * reads as `\"draft\"`, same fallback the old coercion used for a missing/garbage\n * status.\n */\nexport function readWorkflowStatus(status: unknown): WorkflowStatus {\n if (status === \"active\" || status === \"archived\") return status;\n return \"draft\";\n}\n\n/** Authoring presentation for one workflow. Declarative only — the engine ignores it. */\nexport type WorkflowSettings = {\n /** Persist edits without an explicit save. Omitted ⇒ **true**. */\n autoSave?: boolean;\n /** Persist step coordinates and `viewport` on save. Omitted ⇒ **true**. */\n savePosition?: boolean;\n /** The canvas camera, written by the editor — never by the settings modal. */\n viewport?: { x: number; y: number; zoom: number };\n};\n\n/** Both flags resolved against their defaults. */\nexport type EffectiveWorkflowSettings = {\n autoSave: boolean;\n savePosition: boolean;\n};\n\n/**\n * The effective flags for a workflow, applying the **true-by-default** rule.\n *\n * ⚠️ Both flags are `true` when omitted. That is deliberately *unlike* the house\n * convention `ports` and `onError` follow, where an absent field reproduces\n * prior behaviour: here the product requires both features on by default, so an\n * absent `settings` object means auto-save **on** and positions **persisted**.\n * The RFC states it three ways and names `?? false` as a contradiction. Only an\n * explicit `false` turns a feature off — hence `!== false`, which also refuses\n * to read `null`, `0` or `\"false\"` out of a hand-edited definition as \"off\".\n *\n * Takes `unknown` because the caller's source is parsed JSON, not a validated\n * value; every non-object reads as \"no flags set\", i.e. both on.\n */\nexport function readSettings(settings: unknown): EffectiveWorkflowSettings {\n const s = settings as WorkflowSettings | undefined;\n return {\n autoSave: s?.autoSave !== false,\n savePosition: s?.savePosition !== false,\n };\n}\n\n/**\n * Set one flag, returning the `settings` object to store.\n *\n * Two rules, both about *not* writing more than was asked:\n *\n * 1. **The default is written as absent.** `true` deletes the key instead of\n * storing `autoSave: true` (the same idiom as an omitted `onError: \"fail\"`).\n * Otherwise merely opening this modal on a legacy workflow and toggling\n * something back would rewrite the definition of every workflow ever\n * authored — and with auto-save on, that write happens by itself.\n * 2. **Everything else survives verbatim**, `viewport` above all: it is the\n * author's saved camera, written by the editor, and a whole-object replace\n * here would silently discard it on the next toggle.\n *\n * Returns `undefined` when nothing is left to store, so the caller drops the\n * key entirely rather than persisting an empty object.\n *\n * The input is `unknown` for the same reason `readSettings`' is — it comes straight\n * out of `JSON.parse`, and the `</>` editor in the very same header lets an author\n * write `\"settings\": \"hello\"`. Spreading that would persist `{\"0\":\"h\",\"1\":\"e\",…}`,\n * and with auto-save on the rewrite would repeat on a debounce, without anyone\n * clicking anything. So anything that is not a plain object reads as \"no flags\n * set\", exactly as it does in `readSettings`.\n */\nexport function writeSetting(\n settings: unknown,\n key: \"autoSave\" | \"savePosition\",\n value: boolean,\n): WorkflowSettings | undefined {\n const prev: WorkflowSettings | undefined =\n typeof settings === \"object\" && settings !== null && !Array.isArray(settings)\n ? (settings as WorkflowSettings)\n : undefined;\n // The copy is load-bearing: a debounced saver keeps payloads across ticks, so a\n // function that mutated `prev` in place would leave a \"has this actually changed?\"\n // comparison looking at one object twice. Never simplify this to `prev ?? {}`.\n const next: WorkflowSettings = { ...prev };\n if (value) delete next[key];\n else next[key] = false;\n return Object.keys(next).length === 0 ? undefined : next;\n}\n","import { workflowNodes } from \"./workflow-nodes.ts\";\n\n/**\n * \"Call from code\" trigger preview (T2.2.1, HITL-2/HITL-4 pinned):\n *\n * > one tab per MANUAL (`@w6w/trigger`) trigger step, in declared order,\n * > labelled `step.displayName ?? step.id`. Webhook/scheduler steps are\n * > excluded — they declare named params, never a generic `fields` array.\n *\n * Pure and testable by design, same shape as `workflow-validity.ts`:\n * `WorkflowDetailPage.tsx`/`WorkflowsPage.tsx` are JSX, which Node 24's\n * type-stripping cannot parse, so nothing in it can be loaded by\n * `node --test`. This module cannot import `@w6w/ui`/`@w6w/ui/flow` either\n * way (`ERR_UNKNOWN_FILE_EXTENSION` — see `workflow-validity.ts`'s docstring).\n * Instead, \"is this step a MANUAL trigger\" and \"read a trigger's declared\n * `fields`\" are **caller-injected** on `TriggerPreviewContext` —\n * `WorkflowsPage.tsx`/`WorkflowDetailPage.tsx` import the real\n * `TRIGGER_APP`/`asFieldDefs` from `@w6w/ui/flow` and pass them in. This file\n * contains no `@w6w/*` app-id string literal.\n *\n * Deliberately narrower than `@w6w/ui/flow`'s own `isTriggerApp`, which also\n * matches `@w6w/webhook`/`@w6w/scheduler` (all three are \"entry nodes\" for the\n * canvas). Those two kinds declare named params, not a generic `fields`\n * array, so they cannot be previewed the same way — the injected predicate a\n * caller supplies here is expected to be the MANUAL-only check\n * (`app === TRIGGER_APP`), not the broader `isTriggerApp`.\n */\n\n/** One field a trigger declares — just enough of `@w6w/ui/flow`'s\n * `TriggerFieldDef` for this preview (structurally compatible, not imported). */\nexport interface TriggerPreviewFieldDef {\n key?: string;\n type?: string;\n required?: boolean;\n default?: unknown;\n}\n\n/** A workflow graph step, just enough of it for this preview. */\nexport interface WorkflowStepLike {\n id: string;\n /** Human-facing step name, when the author set one. Falls back to `id`. */\n displayName?: string;\n uses?: { app?: string; action?: string };\n with?: Record<string, unknown>;\n}\n\n/** A workflow definition, just enough of it for this preview. */\nexport interface WorkflowLike {\n nodes?: WorkflowStepLike[];\n steps?: WorkflowStepLike[];\n}\n\n/**\n * Everything `triggerPreviews` needs that this pure module cannot compute or\n * import itself — see the module docstring for why each field is\n * caller-injected rather than derived in here.\n */\nexport interface TriggerPreviewContext {\n /** Is this step's `uses.app` a MANUAL trigger (`@w6w/trigger`)? Webhook and\n * scheduler steps must answer `false` here even though they are also\n * \"entry nodes\" — they have no generic `fields` array to preview. */\n isManualTrigger: (app: string) => boolean;\n /** `@w6w/ui/flow`'s `asFieldDefs`, injected — reads a step's `with.fields`\n * param value as an array of field definitions. */\n asFieldDefs: (fields: unknown) => TriggerPreviewFieldDef[];\n}\n\n/** One manual trigger's declared fields, ready for the modal's picker. */\nexport interface TriggerPreview {\n id: string;\n /** `step.displayName ?? step.id`. */\n label: string;\n fields: TriggerPreviewFieldDef[];\n}\n\n/**\n * One `TriggerPreview` per manual trigger step in `workflow.steps`, in\n * declared order. Non-manual steps (including webhook/scheduler entry nodes)\n * are excluded. A field with a missing/blank `key` is dropped — mirrors\n * `@w6w/ui/flow`'s `fieldsToParams`, which does the same before turning\n * `TriggerFieldDef[]` into a fillable form.\n */\nexport function triggerPreviews(\n workflow: WorkflowLike,\n ctx: TriggerPreviewContext,\n): TriggerPreview[] {\n const steps = workflowNodes(workflow);\n const previews: TriggerPreview[] = [];\n for (const step of steps) {\n const app = step.uses?.app;\n if (!app || !ctx.isManualTrigger(app)) continue;\n const fields = ctx\n .asFieldDefs(step.with?.fields)\n .filter((f) => typeof f.key === \"string\" && f.key.trim() !== \"\");\n previews.push({ id: step.id, label: step.displayName ?? step.id, fields });\n }\n return previews;\n}\n\n/**\n * A start-payload skeleton for one manual trigger — every declared field at its\n * declared default, so the Run panel opens with the shape the workflow actually\n * expects instead of an empty object the author has to reconstruct by hand.\n *\n * Mirrors `@w6w/ui/flow`'s `seedValues` (which this module cannot import — see\n * the header): an explicit `default` wins; otherwise the empty value for the\n * declared type. Unknown types fall to `\"\"`, matching that function.\n *\n * `undefined` in → `{}`, so a caller can pass a still-loading preview.\n */\nexport function triggerInputSeed(preview: TriggerPreview | undefined): Record<string, unknown> {\n const seed: Record<string, unknown> = {};\n for (const f of preview?.fields ?? []) {\n if (typeof f.key !== \"string\" || f.key.trim() === \"\") continue;\n if (f.default !== undefined) {\n seed[f.key] = f.default;\n continue;\n }\n seed[f.key] = f.type === \"number\" ? 0 : f.type === \"boolean\" ? false : \"\";\n }\n return seed;\n}\n"],"names":["findBindingProblems","sites","byApp","_a","_b","out","site","app","connection","conns","disabledBannerState","input","show","workflowNodes","def","stepFailure","step","ctx","uses","params","values","stepValid","workflowValid","workflow","invalidReason","failure","VARIABLE_TYPES","readVariables","raw","entry","e","row","variablesForSave","rows","r","duplicateKeyIndexes","seen","i","varsRailFor","index","projectVars","k","isExprDefault","v","runFormFields","fields","computed","readWorkflowStatus","status","readSettings","settings","s","writeSetting","key","value","next","triggerPreviews","steps","previews","f","triggerInputSeed","preview","seed"],"mappings":"AAsBO,SAASA,EACdC,GACAC,GACkB;AAHb,MAAAC,GAAAC;AAIL,QAAMC,IAAwB,CAAA;AAC9B,aAAWC,KAAQL,GAAO;AACxB,UAAMM,KAAMJ,IAAAG,EAAK,SAAL,gBAAAH,EAAW,KACjBK,KAAaJ,IAAAE,EAAK,SAAL,gBAAAF,EAAW;AAE9B,QADI,OAAOG,KAAQ,YAAYA,MAAQ,MACnC,OAAOC,KAAe,YAAYA,MAAe,GAAI;AACzD,UAAMC,IAAQP,EAAMK,CAAG;AACvB,KAAIE,KAAA,gBAAAA,EAAO,WAAU,YACjBA,EAAM,IAAI,IAAID,CAAU,KAC5BH,EAAI,KAAK,EAAE,QAAQC,EAAK,IAAI,KAAAC,GAAK,YAAAC,GAAY,MAAM,sBAAsB;AAAA,EAC3E;AACA,SAAOH;AACT;AAiBO,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stack/react-query";
|
|
2
|
-
import { useState as O, useRef as D, useCallback as j, useEffect as I, useMemo as ve } from "react";
|
|
3
|
-
import { u as he } from "./client-context-CX61Bgw-.js";
|
|
4
|
-
import { u as pe } from "./draft-registry-YF0tqNN0.js";
|
|
5
|
-
const ke = 1200;
|
|
6
|
-
function ye(l) {
|
|
7
|
-
const u = l.delayMs ?? ke, d = l.setTimer ?? ((a, E) => setTimeout(a, E)), p = l.clearTimer ?? ((a) => clearTimeout(a));
|
|
8
|
-
let r = null, o = null, f = null;
|
|
9
|
-
function k() {
|
|
10
|
-
o !== null && (p(o), o = null);
|
|
11
|
-
}
|
|
12
|
-
function b() {
|
|
13
|
-
o = null;
|
|
14
|
-
const a = r;
|
|
15
|
-
if (r = null, !a || !a.enabled || !a.canSave || a.payload === f) return Promise.resolve();
|
|
16
|
-
const E = l.save(a.payload, a.ctx);
|
|
17
|
-
return Promise.resolve(E);
|
|
18
|
-
}
|
|
19
|
-
return {
|
|
20
|
-
push(a, E, w, P) {
|
|
21
|
-
r = { payload: a, enabled: E, canSave: w, ctx: P }, k(), o = d(() => {
|
|
22
|
-
b().catch(() => {
|
|
23
|
-
});
|
|
24
|
-
}, u);
|
|
25
|
-
},
|
|
26
|
-
flush() {
|
|
27
|
-
return k(), b();
|
|
28
|
-
},
|
|
29
|
-
cancel() {
|
|
30
|
-
k(), r = null;
|
|
31
|
-
},
|
|
32
|
-
markSaved(a) {
|
|
33
|
-
f = a;
|
|
34
|
-
},
|
|
35
|
-
isDirty(a) {
|
|
36
|
-
return a !== f;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
function ge(l, u, d) {
|
|
41
|
-
const p = () => {
|
|
42
|
-
d();
|
|
43
|
-
}, r = () => {
|
|
44
|
-
u.visibilityState === "hidden" && d();
|
|
45
|
-
};
|
|
46
|
-
return l.addEventListener("beforeunload", p), u.addEventListener("visibilitychange", r), () => {
|
|
47
|
-
l.removeEventListener("beforeunload", p), u.removeEventListener("visibilitychange", r);
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
function me(l) {
|
|
51
|
-
if (typeof l != "object" || l === null) return !1;
|
|
52
|
-
const u = l.code;
|
|
53
|
-
return u === "workflow_stale" || u === "function_stale" || u === "endpoint_stale";
|
|
54
|
-
}
|
|
55
|
-
function M(l, u) {
|
|
56
|
-
return typeof u.updatedAt == "string" ? u.updatedAt : null;
|
|
57
|
-
}
|
|
58
|
-
function U(l, u, d) {
|
|
59
|
-
return l ? l.client !== u ? !0 : (l.project || null) !== (d || null) && !!l.project : !1;
|
|
60
|
-
}
|
|
61
|
-
const $ = "No project selected: a workflow can only be saved into a project.";
|
|
62
|
-
function re(l, u, d, p) {
|
|
63
|
-
let r = null, o = null;
|
|
64
|
-
try {
|
|
65
|
-
r = JSON.parse(l);
|
|
66
|
-
} catch (k) {
|
|
67
|
-
o = k instanceof Error ? k.message : String(k);
|
|
68
|
-
}
|
|
69
|
-
let f = null;
|
|
70
|
-
return d ? o !== null ? f = `Invalid JSON: ${o}` : typeof r != "object" || r === null || Array.isArray(r) ? f = "A workflow definition must be a JSON object." : typeof r.id == "string" && r.id !== u ? f = "The workflow id cannot be changed here." : p && (f = p(r) ?? null) : f = $, { parsed: r, syntaxError: o, blocked: f };
|
|
71
|
-
}
|
|
72
|
-
function Re(l) {
|
|
73
|
-
var te;
|
|
74
|
-
const u = he(), d = pe(), p = de(), { workflowId: r } = l, { project: o, saveGuard: f } = l, k = l.autoSave ?? !0, [b, a] = O(""), [E, w] = O(null), [P, q] = O(null), [z, Q] = O(!1), [V, B] = O(!1), [ne, T] = O(null), [X, Y] = O(!1), g = D(l);
|
|
75
|
-
g.current = l;
|
|
76
|
-
const N = D(u);
|
|
77
|
-
N.current = u;
|
|
78
|
-
const Z = D(p);
|
|
79
|
-
Z.current = p;
|
|
80
|
-
const c = D(null), G = D(f);
|
|
81
|
-
if (r === null) c.current = null;
|
|
82
|
-
else if (((te = c.current) == null ? void 0 : te.id) !== r) {
|
|
83
|
-
const e = {
|
|
84
|
-
id: r,
|
|
85
|
-
text: "",
|
|
86
|
-
token: null,
|
|
87
|
-
// a token from another row would 409 against this one
|
|
88
|
-
loaded: !1,
|
|
89
|
-
stale: !1,
|
|
90
|
-
refused: null,
|
|
91
|
-
lastError: null,
|
|
92
|
-
inflight: null,
|
|
93
|
-
saver: void 0,
|
|
94
|
-
auth: null,
|
|
95
|
-
handover: !1,
|
|
96
|
-
gen: 0,
|
|
97
|
-
discardReported: -1
|
|
98
|
-
};
|
|
99
|
-
e.saver = ye({
|
|
100
|
-
save: (t, n) => W(e, t, n)
|
|
101
|
-
}), c.current = e;
|
|
102
|
-
}
|
|
103
|
-
const se = D(W);
|
|
104
|
-
se.current = W;
|
|
105
|
-
function W(e, t, n) {
|
|
106
|
-
if (e.inflight) return Promise.resolve();
|
|
107
|
-
const s = g.current;
|
|
108
|
-
if (!n.explicit && s.canAutoSave && !s.canAutoSave()) return Promise.resolve();
|
|
109
|
-
const i = () => c.current === e, y = e.gen, A = (async () => {
|
|
110
|
-
if (!n.project) throw new Error($);
|
|
111
|
-
const K = JSON.parse(t);
|
|
112
|
-
i() && (Q(!0), T(null));
|
|
113
|
-
try {
|
|
114
|
-
const J = await n.client.workflows.update(n.id, K, {
|
|
115
|
-
project: n.project,
|
|
116
|
-
ifUnmodifiedSince: n.token
|
|
117
|
-
});
|
|
118
|
-
if (Z.current.invalidateQueries({ queryKey: ["workflows"] }), y !== e.gen) return;
|
|
119
|
-
e.token = M(n.token, J), e.saver.markSaved(t), e.refused = null;
|
|
120
|
-
} catch (J) {
|
|
121
|
-
throw y === e.gen && (e.refused = t, e.lastError = J, e.saver.cancel(), me(J) && (e.stale = !0), i() && (e.stale && B(!0), T(J))), J;
|
|
122
|
-
}
|
|
123
|
-
})();
|
|
124
|
-
e.inflight = A;
|
|
125
|
-
const _ = () => {
|
|
126
|
-
e.inflight === A && (e.inflight = null), i() && Q(!1);
|
|
127
|
-
};
|
|
128
|
-
return A.then(_, _), A;
|
|
129
|
-
}
|
|
130
|
-
const C = j((e, t) => {
|
|
131
|
-
var n, s;
|
|
132
|
-
if (!(t.status !== "blocked" && t.status !== "failed") && e.discardReported !== e.gen) {
|
|
133
|
-
e.discardReported = e.gen;
|
|
134
|
-
try {
|
|
135
|
-
(s = (n = g.current).onDiscard) == null || s.call(n, {
|
|
136
|
-
workflowId: e.id,
|
|
137
|
-
text: e.text,
|
|
138
|
-
reason: t.status
|
|
139
|
-
});
|
|
140
|
-
} catch {
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}, []), m = j(
|
|
144
|
-
async (e, t, n = !1) => {
|
|
145
|
-
try {
|
|
146
|
-
let s = null;
|
|
147
|
-
for (; e.inflight; )
|
|
148
|
-
try {
|
|
149
|
-
await e.inflight;
|
|
150
|
-
} catch (K) {
|
|
151
|
-
s = { error: K };
|
|
152
|
-
}
|
|
153
|
-
if (!e.loaded) return { status: "blocked", reason: "The workflow has not loaded." };
|
|
154
|
-
const i = e.text;
|
|
155
|
-
if (!e.saver.isDirty(i)) return { status: "clean" };
|
|
156
|
-
if (s && e.refused === i) return { status: "failed", error: s.error };
|
|
157
|
-
if (e.stale) return { status: "failed", error: e.lastError };
|
|
158
|
-
const y = g.current, x = e.auth;
|
|
159
|
-
!x.project && x.client === N.current && (x.project = y.project);
|
|
160
|
-
const { blocked: A } = re(i, e.id, x.project, G.current);
|
|
161
|
-
if (A !== null) return { status: "blocked", reason: A };
|
|
162
|
-
if (!t) {
|
|
163
|
-
if (!n && !(y.autoSave ?? !0))
|
|
164
|
-
return { status: "blocked", reason: "Auto-save is off." };
|
|
165
|
-
if (!n && y.canAutoSave && !y.canAutoSave())
|
|
166
|
-
return { status: "blocked", reason: "The editor is busy." };
|
|
167
|
-
}
|
|
168
|
-
const _ = {
|
|
169
|
-
client: x.client,
|
|
170
|
-
project: x.project,
|
|
171
|
-
id: e.id,
|
|
172
|
-
token: e.token,
|
|
173
|
-
// `saveRow` re-checks the busy probe for automatic saves; a gate-ignoring flush is explicit.
|
|
174
|
-
explicit: t || n
|
|
175
|
-
};
|
|
176
|
-
return e.saver.push(i, !0, !0, _), await e.saver.flush(), { status: "saved" };
|
|
177
|
-
} catch (s) {
|
|
178
|
-
return { status: "failed", error: s };
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
|
-
[]
|
|
182
|
-
);
|
|
183
|
-
I(() => {
|
|
184
|
-
const e = c.current;
|
|
185
|
-
if (!e) return;
|
|
186
|
-
let t = !1;
|
|
187
|
-
a(""), w(null), q(null), T(null), B(!1), Q(!1);
|
|
188
|
-
const n = { client: N.current, project: g.current.project };
|
|
189
|
-
return n.client.workflows.get(e.id).then(
|
|
190
|
-
(s) => {
|
|
191
|
-
if (t) return;
|
|
192
|
-
e.auth = n;
|
|
193
|
-
const i = JSON.stringify(s.workflow, null, 2);
|
|
194
|
-
e.text = i, e.token = M(null, s), e.saver.markSaved(i), e.loaded = !0, a(i), w(e.id);
|
|
195
|
-
},
|
|
196
|
-
(s) => {
|
|
197
|
-
t || q(s);
|
|
198
|
-
}
|
|
199
|
-
), () => {
|
|
200
|
-
t = !0, m(e, !1), e.saver.cancel();
|
|
201
|
-
};
|
|
202
|
-
}, [r, m]);
|
|
203
|
-
const v = c.current, h = (v == null ? void 0 : v.loaded) === !0 && E === r, L = h ? b : "", S = ve(
|
|
204
|
-
() => h && r !== null ? re(L, r, o, f) : null,
|
|
205
|
-
[h, L, r, o, f]
|
|
206
|
-
), ee = S ? S.blocked : !o && r !== null ? $ : null;
|
|
207
|
-
h && U((v == null ? void 0 : v.auth) ?? null, u, o) || (G.current = f);
|
|
208
|
-
const le = X || h && U((v == null ? void 0 : v.auth) ?? null, u, o), F = h && ee === null && !z && !le, ue = h && (v == null ? void 0 : v.saver.isDirty(L)) === !0, ae = S && S.parsed !== null && l.publishBlockedReason ? l.publishBlockedReason(S.parsed) : null;
|
|
209
|
-
I(() => {
|
|
210
|
-
const e = c.current;
|
|
211
|
-
if (!e || !h || e.id !== r || V || b === e.refused || e.handover || !e.auth || U(e.auth, N.current, g.current.project))
|
|
212
|
-
return;
|
|
213
|
-
e.auth.project || (e.auth.project = g.current.project);
|
|
214
|
-
const t = {
|
|
215
|
-
client: e.auth.client,
|
|
216
|
-
project: e.auth.project,
|
|
217
|
-
id: e.id,
|
|
218
|
-
token: e.token,
|
|
219
|
-
explicit: !1
|
|
220
|
-
};
|
|
221
|
-
e.saver.push(b, k, F, t);
|
|
222
|
-
}, [h, r, b, V, k, F]), I(() => {
|
|
223
|
-
const e = c.current;
|
|
224
|
-
if (!(!e || !h || e.id !== r || e.handover)) {
|
|
225
|
-
if (!U(e.auth, u, o)) {
|
|
226
|
-
e.auth && !e.auth.project && (e.auth.project = o);
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
e.handover = !0, Y(!0), (async () => {
|
|
230
|
-
try {
|
|
231
|
-
if (C(e, await m(e, !1, !0)), c.current !== e) return;
|
|
232
|
-
e.saver.cancel();
|
|
233
|
-
const t = { client: N.current, project: g.current.project }, n = await t.client.workflows.get(e.id);
|
|
234
|
-
if (c.current !== e) return;
|
|
235
|
-
const s = JSON.stringify(n.workflow, null, 2);
|
|
236
|
-
e.gen++, e.auth = t, e.text = s, e.token = M(null, n), e.saver.markSaved(s), e.refused = null, e.stale = !1, e.lastError = null, a(s), B(!1), T(null);
|
|
237
|
-
} catch (t) {
|
|
238
|
-
c.current === e && (e.loaded = !1, w(null), q(t));
|
|
239
|
-
} finally {
|
|
240
|
-
e.handover = !1, c.current === e && Y(!1);
|
|
241
|
-
}
|
|
242
|
-
})();
|
|
243
|
-
}
|
|
244
|
-
}, [h, r, u, o, X, m, C]), I(() => {
|
|
245
|
-
const e = c.current;
|
|
246
|
-
if (!e) return;
|
|
247
|
-
const t = globalThis.window, n = globalThis.document, s = t && n ? ge(t, n, () => {
|
|
248
|
-
m(e, !1);
|
|
249
|
-
}) : void 0, i = d == null ? void 0 : d.register(async () => {
|
|
250
|
-
const y = await m(e, !1, !0);
|
|
251
|
-
return C(e, y), y;
|
|
252
|
-
});
|
|
253
|
-
return () => {
|
|
254
|
-
s == null || s(), i == null || i();
|
|
255
|
-
};
|
|
256
|
-
}, [r, d, m, C]);
|
|
257
|
-
const H = j((e) => {
|
|
258
|
-
const t = c.current;
|
|
259
|
-
!t || !t.loaded || (t.text = e, a(e));
|
|
260
|
-
}, []), R = j(() => {
|
|
261
|
-
const e = c.current;
|
|
262
|
-
return e ? m(e, !0) : Promise.resolve({ status: "clean" });
|
|
263
|
-
}, [m]), oe = j(() => {
|
|
264
|
-
R();
|
|
265
|
-
}, [R]), ce = j(
|
|
266
|
-
async (e) => {
|
|
267
|
-
const t = await R();
|
|
268
|
-
return t.status === "clean" || t.status === "saved" ? { ok: !0, value: await e() } : { ok: !1, outcome: t };
|
|
269
|
-
},
|
|
270
|
-
[R]
|
|
271
|
-
), ie = j(
|
|
272
|
-
(e) => (H(e), R()),
|
|
273
|
-
[H, R]
|
|
274
|
-
), fe = j(async () => {
|
|
275
|
-
const e = c.current;
|
|
276
|
-
if (e)
|
|
277
|
-
try {
|
|
278
|
-
const t = { client: N.current, project: g.current.project }, n = await t.client.workflows.get(e.id);
|
|
279
|
-
if (c.current !== e) return;
|
|
280
|
-
e.auth = t;
|
|
281
|
-
const s = JSON.stringify(n.workflow, null, 2);
|
|
282
|
-
e.saver.cancel(), e.gen++, e.text = s, e.token = M(null, n), e.saver.markSaved(s), e.refused = null, e.stale = !1, e.lastError = null, e.loaded = !0, a(s), w(e.id), B(!1), T(null);
|
|
283
|
-
} catch (t) {
|
|
284
|
-
c.current === e && T(t);
|
|
285
|
-
}
|
|
286
|
-
}, []);
|
|
287
|
-
return {
|
|
288
|
-
json: L,
|
|
289
|
-
setJson: H,
|
|
290
|
-
parsed: S ? S.parsed : null,
|
|
291
|
-
syntaxError: S ? S.syntaxError : null,
|
|
292
|
-
loading: r !== null && !h && P === null,
|
|
293
|
-
loadError: P,
|
|
294
|
-
dirty: ue,
|
|
295
|
-
saving: z,
|
|
296
|
-
canSave: F,
|
|
297
|
-
saveBlockedReason: ee,
|
|
298
|
-
stale: V,
|
|
299
|
-
error: ne,
|
|
300
|
-
publishBlockedReason: ae,
|
|
301
|
-
saveNow: oe,
|
|
302
|
-
flush: R,
|
|
303
|
-
flushThen: ce,
|
|
304
|
-
commit: ie,
|
|
305
|
-
reload: fe
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
export {
|
|
309
|
-
ke as A,
|
|
310
|
-
ye as c,
|
|
311
|
-
me as i,
|
|
312
|
-
M as n,
|
|
313
|
-
ge as r,
|
|
314
|
-
Re as u
|
|
315
|
-
};
|
|
316
|
-
//# sourceMappingURL=use-workflow-draft-DzAyUeA6.js.map
|