@oomol-lab/open-flow 0.1.0-alpha.3 → 0.1.0-alpha.5
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/dist/browser/{addNodeOptions-B_d-Z5D3.js → addNodeOptions-B6tOfd2Y.js} +80 -81
- package/dist/browser/carbon-DMCVsjHo.js +53 -0
- package/dist/browser/{createLucideIcon-MmUpJrIU.js → createLucideIcon-BlEx4FzJ.js} +80 -80
- package/dist/browser/{createResourceDialog-CIVfStiE.js → createResourceDialog-CrBp3E8P.js} +12 -12
- package/dist/browser/{dist-BbyiRq3c.js → dist-B0Q2Mn0n.js} +117 -107
- package/dist/browser/{dist-B9OV3YTx.js → dist-Bc9TvHYl.js} +7 -7
- package/dist/browser/{dist-0lWKriL5.js → dist-C46JByB-.js} +1 -1
- package/dist/browser/{dist-CvcmLAMW.js → dist-CUkceEvN.js} +4 -4
- package/dist/browser/{dist-zyY--HOV.js → dist-CVtP-E2c.js} +2 -2
- package/dist/browser/{dist-CLZJNoWB.js → dist-D5mdziGP.js} +4 -4
- package/dist/browser/{dist-7oZK9QXZ.js → dist-DMi8_lU3.js} +5 -5
- package/dist/browser/{dist-DL0SDskM.js → dist-DQVavPcf.js} +9 -8
- package/dist/browser/{dist-aWSZx4q1.js → dist-DWzdGVm9.js} +2 -2
- package/dist/browser/{dist-Djd02JSy.js → dist-DXgEYMFx.js} +4 -4
- package/dist/browser/{dist-o4dBuwiG.js → dist-DhsGR_K3.js} +4 -4
- package/dist/browser/{dist-BLk5M0uK.js → dist-Mecbzdl2.js} +3 -3
- package/dist/browser/{dist-CIq6ue3I.js → dist-n9WmBm5w.js} +1115 -1103
- package/dist/browser/{esm-DXw7EADW.js → esm-CoE5_2w7.js} +5 -5
- package/dist/browser/{field-runIpvMd.js → field-Daq9Lk-Y.js} +6 -6
- package/dist/browser/{flowRunInputEditorStore-B49C0ZmK.js → flowRunInputEditorStore-DXOyyY7o.js} +850 -675
- package/dist/browser/{flowWorkspace-CRRe__mi.js → flowWorkspace-CylW6hge.js} +6202 -5872
- package/dist/browser/{lib-S4ccuMeT.js → lib-GrGxYjsJ.js} +3 -5
- package/dist/browser/licenses.md +11 -11
- package/dist/browser/{markdownContent-BvYiwIwR.js → markdownContent-ColGUxHy.js} +4046 -4018
- package/dist/browser/project-authoring.js +1 -1
- package/dist/browser/workbench-contract.d.ts +0 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +22 -23
- package/dist/common/connector-action.js +1 -1
- package/dist/common/control-api-conformance.js +15 -18
- package/dist/common/control-api-errors.d.ts +4 -0
- package/dist/common/control-api.d.ts +6 -6
- package/dist/common/control-api.js +24 -24
- package/dist/common/cron-trigger.js +1 -1
- package/dist/common/integration-trigger.d.ts +1 -0
- package/dist/common/integration-trigger.js +1 -1
- package/dist/common/project-semantics.js +3 -5
- package/dist/common/provider-triggers.js +928 -796
- package/dist/common/run-lifecycle.js +1 -1
- package/dist/common/runtime-contract.js +1 -1
- package/dist/common/webhook-trigger.js +35 -1
- package/package.json +1 -1
- package/dist/browser/carbon-nMY84Amv.js +0 -53
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e, f as t, i as n } from "./dist-
|
|
2
|
-
import { Ir as r, Rr as i, Wr as a } from "./createLucideIcon-
|
|
3
|
-
import { _ as o, a as s, c, d as l, dt as u, f as d, g as f, i as p, l as m, m as h, n as g, o as _, p as v, st as y, t as b, u as x, ut as ee, v as S, x as te, y as ne } from "./addNodeOptions-
|
|
1
|
+
import { a as e, f as t, i as n } from "./dist-C46JByB-.js";
|
|
2
|
+
import { Ir as r, Rr as i, Wr as a } from "./createLucideIcon-BlEx4FzJ.js";
|
|
3
|
+
import { _ as o, a as s, c, d as l, dt as u, f as d, g as f, i as p, l as m, m as h, n as g, o as _, p as v, st as y, t as b, u as x, ut as ee, v as S, x as te, y as ne } from "./addNodeOptions-B6tOfd2Y.js";
|
|
4
4
|
import { Suspense as re, lazy as ie, useEffect as C, useRef as ae, useState as oe } from "react";
|
|
5
5
|
import { jsx as w, jsxs as se } from "react/jsx-runtime";
|
|
6
6
|
//#region src/workbench/browser/runtime/navigation.ts
|
|
@@ -475,7 +475,7 @@ function me(e) {
|
|
|
475
475
|
return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
|
|
476
476
|
}
|
|
477
477
|
async function he(e, t, n) {
|
|
478
|
-
let { FlowRunInputEditorStore: r } = await import("./flowRunInputEditorStore-
|
|
478
|
+
let { FlowRunInputEditorStore: r } = await import("./flowRunInputEditorStore-DXOyyY7o.js").then((e) => e.n), i = f(e), a = i.graph({
|
|
479
479
|
id: t,
|
|
480
480
|
kind: "flow"
|
|
481
481
|
});
|
|
@@ -597,23 +597,25 @@ var ge = class {
|
|
|
597
597
|
starting: !0,
|
|
598
598
|
submitting: e
|
|
599
599
|
});
|
|
600
|
-
let c =
|
|
600
|
+
let c = e == "draft" ? {
|
|
601
601
|
flowId: n.flowId,
|
|
602
|
-
inputs: i,
|
|
603
602
|
projectId: t,
|
|
604
|
-
revisionId: r
|
|
605
|
-
|
|
606
|
-
|
|
603
|
+
revisionId: r
|
|
604
|
+
} : { publicationId: n.live.publication.publicationId }, l = JSON.stringify({
|
|
605
|
+
inputs: i,
|
|
606
|
+
source: e,
|
|
607
|
+
...c
|
|
608
|
+
}), u = this.#c?.signature == l ? this.#c : {
|
|
607
609
|
key: this.#t(),
|
|
608
|
-
signature:
|
|
610
|
+
signature: l
|
|
609
611
|
};
|
|
610
|
-
this.#c =
|
|
612
|
+
this.#c = u;
|
|
611
613
|
try {
|
|
612
614
|
let o = e == "draft" ? await this.#e.createDraftRun(t, r, n.flowId, {
|
|
613
|
-
idempotencyKey:
|
|
615
|
+
idempotencyKey: u.key,
|
|
614
616
|
inputs: i
|
|
615
|
-
}) : await this.#e.createLiveRun(
|
|
616
|
-
idempotencyKey:
|
|
617
|
+
}) : await this.#e.createLiveRun(n.live.publication.publicationId, {
|
|
618
|
+
idempotencyKey: u.key,
|
|
617
619
|
inputs: i
|
|
618
620
|
});
|
|
619
621
|
return !a() || !s() ? !1 : (this.#c = void 0, this.#a.follow(o, s));
|
|
@@ -839,7 +841,7 @@ var be = class {
|
|
|
839
841
|
if (t == null) return;
|
|
840
842
|
let n = this.#l.value.catalogs[e];
|
|
841
843
|
try {
|
|
842
|
-
if (!await this.#n.openExternalPage(() => this.#e.createConnectorConnectionPage(t, e
|
|
844
|
+
if (!await this.#n.openExternalPage(() => this.#e.createConnectorConnectionPage(t, e))) {
|
|
843
845
|
this.#c({
|
|
844
846
|
kind: "error",
|
|
845
847
|
message: this.#t.t("notice.connectionPopupBlocked")
|
|
@@ -1126,7 +1128,7 @@ var Ce = class {
|
|
|
1126
1128
|
async connect(e) {
|
|
1127
1129
|
let t = this.#l.$.projectId.value;
|
|
1128
1130
|
if (!(this.#u || t == null)) try {
|
|
1129
|
-
if (!await this.#r.openExternalPage(() => this.#n.createConnectorConnectionPage(t, e
|
|
1131
|
+
if (!await this.#r.openExternalPage(() => this.#n.createConnectorConnectionPage(t, e))) {
|
|
1130
1132
|
this.#s({
|
|
1131
1133
|
kind: "error",
|
|
1132
1134
|
message: this.#i.t("notice.connectionPopupBlocked")
|
|
@@ -1230,7 +1232,7 @@ function De(e) {
|
|
|
1230
1232
|
//#region src/project/common/moduleChanges.ts
|
|
1231
1233
|
async function Oe(e) {
|
|
1232
1234
|
try {
|
|
1233
|
-
let { parse: t } = await import("./lib-
|
|
1235
|
+
let { parse: t } = await import("./lib-GrGxYjsJ.js"), n = t(e, {
|
|
1234
1236
|
errorRecovery: !0,
|
|
1235
1237
|
sourceType: "module"
|
|
1236
1238
|
}).program, r = /* @__PURE__ */ new Set();
|
|
@@ -3215,10 +3217,7 @@ function At(e, t, n, r, i) {
|
|
|
3215
3217
|
return e.payload.scopeId == a && e.payload.flowId == t.id && typeof n == "string" && i.has(n) ? [[e.sequence, n]] : [];
|
|
3216
3218
|
})) : /* @__PURE__ */ new Map();
|
|
3217
3219
|
}
|
|
3218
|
-
var jt = {
|
|
3219
|
-
openExternalPage: async () => !1,
|
|
3220
|
-
returnUrl: ""
|
|
3221
|
-
}, Mt = class {
|
|
3220
|
+
var jt = { openExternalPage: async () => !1 }, Mt = class {
|
|
3222
3221
|
#e;
|
|
3223
3222
|
#t;
|
|
3224
3223
|
#n;
|
|
@@ -3332,14 +3331,14 @@ var jt = {
|
|
|
3332
3331
|
if (this.#r || this.runRequests.$.submitting.value != null || this.workspace.$.projectId.value != t.projectId || n?.kind != "flow" || n.id != t.flowId) return;
|
|
3333
3332
|
let r = this.#e.begin();
|
|
3334
3333
|
try {
|
|
3335
|
-
let n = await e.getRun(t.
|
|
3334
|
+
let n = await e.getRun(t.runId), i = this.workspace.$.target.value;
|
|
3336
3335
|
if (!r() || this.#r || this.workspace.$.projectId.value != t.projectId || i?.kind != "flow" || i.id != t.flowId || n.projectId != t.projectId || n.flowId != t.flowId || n.runId != t.runId) return;
|
|
3337
3336
|
this.runs.followExternal(n);
|
|
3338
3337
|
} catch {
|
|
3339
3338
|
return;
|
|
3340
3339
|
}
|
|
3341
3340
|
}
|
|
3342
|
-
}, Nt = ie(() => import("./flowWorkspace-
|
|
3341
|
+
}, Nt = ie(() => import("./flowWorkspace-CylW6hge.js"));
|
|
3343
3342
|
function Pt({ host: e, store: t }) {
|
|
3344
3343
|
let n = a(t.$.notice);
|
|
3345
3344
|
return C(() => e.notify(n), [e, n]), C(() => () => e.notify(void 0), [e]), null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/@wopjs/cast/dist/index.mjs
|
|
1
|
+
//#region ../../node_modules/.bun/@wopjs+cast@0.1.16/node_modules/@wopjs/cast/dist/index.mjs
|
|
2
2
|
var e = Array.isArray, t = (e) => typeof e == "object" && !!e, n = (n) => t(n) && !e(n), r = (e) => n(e) ? e : void 0;
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/connector/common/actionSchema.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/dequal/lite/index.mjs
|
|
1
|
+
//#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/lite/index.mjs
|
|
2
2
|
var e = Object.prototype.hasOwnProperty;
|
|
3
3
|
function t(n, r) {
|
|
4
4
|
var i, a;
|
|
@@ -164,13 +164,14 @@ function S(e, t, n, r, i, a) {
|
|
|
164
164
|
method: "POST"
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
function C(e, t, n, r
|
|
168
|
-
return m(e,
|
|
167
|
+
function C(e, t, n, r = {}) {
|
|
168
|
+
return m(e, "/v1/runs", {
|
|
169
169
|
body: JSON.stringify({
|
|
170
|
-
inputs:
|
|
170
|
+
inputs: r,
|
|
171
|
+
publicationId: t,
|
|
171
172
|
version: 1
|
|
172
173
|
}),
|
|
173
|
-
headers: { "idempotency-key":
|
|
174
|
+
headers: { "idempotency-key": n },
|
|
174
175
|
method: "POST"
|
|
175
176
|
});
|
|
176
177
|
}
|
|
@@ -266,14 +267,14 @@ var T = [
|
|
|
266
267
|
method: "POST"
|
|
267
268
|
}), d = await f(await u(), 202, "Create Draft Run"), h = s(d.runId, "Draft Run runId");
|
|
268
269
|
i(d.projectId, r, "Draft Run projectId"), i(d.revisionId, c, "Draft Run revisionId"), i(d.flowId, "main", "Draft Run flowId"), i(d.source, "draft", "Draft Run source"), i(d.status, "queued", "Draft Run status"), i(await f(await u(), 200, "Replay Draft Run"), d, "Replayed Draft Run");
|
|
269
|
-
let _ = `/v1/
|
|
270
|
+
let _ = `/v1/runs/${encodeURIComponent(h)}`;
|
|
270
271
|
i(await f(await m(e, _), 200, "Read Draft Run"), d, "Read Draft Run");
|
|
271
272
|
let b = await f(await m(e, `/v1/projects/${encodeURIComponent(r)}/runs`), 200, "List Draft Runs");
|
|
272
273
|
i(b.projectId, r, "Run list projectId"), i(o(b.runs, "Listed Runs").map((e) => a(e, "Listed Run").runId), [h], "Listed Run ids");
|
|
273
274
|
let x = await f(await m(e, `${_}/events`), 200, "Read queued Run events"), [S] = o(x.events, "Queued Run events");
|
|
274
275
|
i(a(S, "Queued Run event").kind, "run.queued", "Queued Run event kind"), i(x.done, !1, "Queued Run events done"), await p(await m(e, `${_}/result`), 409, "run.not-terminal", "Read pending Run result");
|
|
275
|
-
let C = await g(e, "Other project", "other-run-project");
|
|
276
|
-
await
|
|
276
|
+
let C = s((await g(e, "Other project", "other-run-project")).projectId, "Other Project projectId");
|
|
277
|
+
i(o((await f(await m(e, `/v1/projects/${encodeURIComponent(C)}/runs`), 200, "List other Project Runs")).runs, "Other Project Runs"), [], "Run remains scoped to its fixed Project list");
|
|
277
278
|
let w = () => m(e, `${_}/cancel`, {
|
|
278
279
|
body: JSON.stringify({ version: 1 }),
|
|
279
280
|
method: "POST"
|
|
@@ -300,7 +301,7 @@ var T = [
|
|
|
300
301
|
name: "publishes one immutable Flow with idempotent Live CAS",
|
|
301
302
|
async verify(e) {
|
|
302
303
|
let t = await g(e, "Publication project", "publication-project"), r = s(t.projectId, "Publication Project projectId"), c = a((await v(e, r, s(t.draftRevisionId, "Publication Project Draft head"))).revision, "Publication Revision"), l = s(c.revisionId, "Publication Revision revisionId"), u = `/v1/projects/${encodeURIComponent(r)}/flows/main`, d = await f(await m(e, `${u}/live`), 200, "Read unpublished Live");
|
|
303
|
-
i(d.projectId, r, "Unpublished Live projectId"), i(d.flowId, "main", "Unpublished Live flowId"), i(d.publication, null, "Unpublished Live Publication"), i(d.revision, 0, "Unpublished Live revision"), i(d.status, "not-published", "Unpublished Live status"), i(d.hasUnpublishedChanges, !0, "Unpublished Live Draft state"), await p(await C(e,
|
|
304
|
+
i(d.projectId, r, "Unpublished Live projectId"), i(d.flowId, "main", "Unpublished Live flowId"), i(d.publication, null, "Unpublished Live Publication"), i(d.revision, 0, "Unpublished Live revision"), i(d.status, "not-published", "Unpublished Live status"), i(d.hasUnpublishedChanges, !0, "Unpublished Live Draft state"), await p(await C(e, "publication_missing", "missing-live-run"), 404, "publication.not-found", "Run missing Publication");
|
|
304
305
|
let h = () => x(e, r, l, "main", null, "publication-first"), _ = await f(await h(), 201, "Publish Flow"), y = w(_, "Published Flow");
|
|
305
306
|
i(_.projectId, r, "Publication projectId"), i(_.flowId, "main", "Publication flowId"), i(_.revisionId, l, "Publication revisionId"), i(_.revisionDigest, c.digest, "Publication revision digest"), i(_.engineContract, n, "Publication Engine Contract"), i(_.modelVersion, 1, "Publication model version"), i(_.operation, "publish", "Publication operation"), i(_.sourcePublicationId, void 0, "Publication source"), i(_.version, 1, "Publication version"), s(_.actorId, "Publication actorId"), s(_.closureDigest, "Publication closure digest"), s(_.createdAt, "Publication createdAt"), i(await f(await h(), 200, "Replay Publish"), _, "Replayed Publication"), await p(await x(e, r, l, "main", y, "publication-first"), 409, "publication.conflict", "Conflicting Publish replay"), await p(await x(e, r, l, "main", null, "publication-stale-live"), 412, "live.conflict", "Stale Publish Live precondition");
|
|
306
307
|
let b = await f(await m(e, `${u}/live`), 200, "Read published Live");
|
|
@@ -339,8 +340,8 @@ var T = [
|
|
|
339
340
|
i(O.publications, [_, u], "First Publication page"), i(O.total, 3, "Publication page total");
|
|
340
341
|
let k = s(O.nextCursor, "Publication next cursor"), A = await f(await m(e, `${E}/publications?cursor=${encodeURIComponent(k)}&limit=2`), 200, "List second Publication page");
|
|
341
342
|
i(A.publications, [o], "Second Publication page"), i(A.nextCursor, void 0, "Final Publication cursor");
|
|
342
|
-
let j = () => C(e,
|
|
343
|
-
i(M.projectId, n, "Live Run projectId"), i(M.flowId, "main", "Live Run flowId"), i(M.publicationId, T, "Live Run Publication"), i(M.revisionId, a, "Live Run fixed Revision"), i(M.source, "live", "Live Run source"), i(M.status, "queued", "Live Run status"), i(await f(await j(), 200, "Replay Live Run"), M, "Replayed Live Run"), await p(await C(e,
|
|
343
|
+
let j = () => C(e, T, "rollback-live-run"), M = await f(await j(), 202, "Create rolled back Live Run"), N = s(M.runId, "Rolled back Live Run runId");
|
|
344
|
+
i(M.projectId, n, "Live Run projectId"), i(M.flowId, "main", "Live Run flowId"), i(M.publicationId, T, "Live Run Publication"), i(M.revisionId, a, "Live Run fixed Revision"), i(M.source, "live", "Live Run source"), i(M.status, "queued", "Live Run status"), i(await f(await j(), 200, "Replay Live Run"), M, "Replayed Live Run"), await p(await C(e, T, "rollback-live-run", { changed: {} }), 409, "run.conflict", "Conflicting Live Run replay"), await f(await x(e, n, l, "main", T, "rollback-publish-current"), 201, "Move Live after Run admission"), i(await f(await m(e, `/v1/runs/${encodeURIComponent(N)}`), 200, "Read fixed Live Run"), M, "Live Run after Live moved");
|
|
344
345
|
}
|
|
345
346
|
},
|
|
346
347
|
{
|
|
@@ -354,13 +355,13 @@ var T = [
|
|
|
354
355
|
let o = `/v1/projects/${encodeURIComponent(n)}/flows/main`, c = await f(await m(e, `${o}/live`), 200, "Read deleted Flow Live");
|
|
355
356
|
i(c.publication, null, "Deleted Flow Live Publication"), i(c.revision, 0, "Deleted Flow Live revision"), i(c.status, "not-published", "Deleted Flow Live status"), i(c.hasUnpublishedChanges, !1, "Deleted Flow unpublished state"), i((await f(await m(e, `/v1/projects/${encodeURIComponent(n)}/flows`), 200, "List deleted Flows")).flows, [], "Deleted Flow projection");
|
|
356
357
|
let l = await f(await m(e, `${o}/publications?includeTotal=true`), 200, "List deleted Flow history");
|
|
357
|
-
i(l.publications, [a], "Deleted Flow Publication history"), i(l.total, 1, "Deleted Flow Publication total"), await p(await C(e,
|
|
358
|
+
i(l.publications, [a], "Deleted Flow Publication history"), i(l.total, 1, "Deleted Flow Publication total"), await p(await C(e, w(a, "Deleted Flow Publication"), "deleted-flow-run"), 412, "live.conflict", "Run deleted Flow Publication");
|
|
358
359
|
let u = await g(e, "Retired Live project", "retired-live-project"), d = s(u.projectId, "Retired Live Project projectId"), h = y(await v(e, d, s(u.draftRevisionId, "Retired Live Project Draft head")), "Retired Live Revision"), _ = await f(await x(e, d, h, "main", null, "retired-live-publish"), 201, "Publish retiring Project Flow"), T = w(_, "Retired Live Publication");
|
|
359
360
|
await f(await m(e, `/v1/projects/${encodeURIComponent(d)}`, { method: "DELETE" }), 202, "Retire Live Project");
|
|
360
361
|
let E = `/v1/projects/${encodeURIComponent(d)}/flows/main`, D = await f(await m(e, `${E}/live`), 200, "Read retired Project Live");
|
|
361
362
|
i(D.publication, null, "Retired Project Live Publication"), i(D.revision, 0, "Retired Project Live revision"), i(D.status, "not-published", "Retired Project Live status");
|
|
362
363
|
let O = await f(await m(e, `${E}/publications?includeTotal=true`), 200, "List retired Publication history");
|
|
363
|
-
i(O.publications, [_], "Retired Publication history"), i(O.total, 1, "Retired Publication total"), await p(await C(e,
|
|
364
|
+
i(O.publications, [_], "Retired Publication history"), i(O.total, 1, "Retired Publication total"), await p(await C(e, T, "retired-live-run"), 409, "project.busy", "Run retired Live"), await p(await x(e, d, h, "main", null, "retired-live-republish"), 409, "project.busy", "Publish retired Project"), await p(await S(e, d, "main", T, T, "retired-live-rollback"), 409, "project.busy", "Rollback retired Project");
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
367
|
], D = [{
|
|
@@ -490,10 +491,7 @@ var T = [
|
|
|
490
491
|
let E = o(T.connections, "Connector Connections").map((e, t) => l(e, `Connector Connection ${t}`)), D = Object.hasOwn(v, "defaultConnection") ? l(v.defaultConnection, "Selected Connector Action default Connection") : void 0;
|
|
491
492
|
D != null && !E.some((e) => e.connectionId == D.connectionId) && r("Connector Action default Connection must be present in the service Connection list.");
|
|
492
493
|
let O = await f(await m(e, `${n}/connections/${encodeURIComponent(y)}/page`, {
|
|
493
|
-
body: JSON.stringify({
|
|
494
|
-
returnUrl: "https://workbench.example/projects/connector",
|
|
495
|
-
version: 1
|
|
496
|
-
}),
|
|
494
|
+
body: JSON.stringify({ version: 1 }),
|
|
497
495
|
method: "POST"
|
|
498
496
|
}), 200, "Create Connector Connection page");
|
|
499
497
|
c(O, ["url", "version"], "Connector Connection external page");
|
|
@@ -507,7 +505,6 @@ var T = [
|
|
|
507
505
|
await p(await m(e, `${n}/actions?service=mail&q=send`), 400, "project.invalid", "Conflicting Connector Action query"), await p(await m(e, `${n}/actions?q=%20%20`), 400, "project.invalid", "Empty Connector Action query"), await p(await m(e, `${n}/actions?q=${"a".repeat(257)}`), 400, "project.invalid", "Oversized Connector Action query"), await p(await m(e, `${n}/connections/${"a".repeat(257)}`), 400, "project.invalid", "Oversized Connector service"), await p(await m(e, `${n}/connections/mail/page`, {
|
|
508
506
|
body: JSON.stringify({
|
|
509
507
|
extra: !0,
|
|
510
|
-
returnUrl: "https://workbench.example",
|
|
511
508
|
version: 1
|
|
512
509
|
}),
|
|
513
510
|
method: "POST"
|
|
@@ -25,6 +25,7 @@ export declare const controlErrorCode: {
|
|
|
25
25
|
readonly runInvalid: 'run.invalid';
|
|
26
26
|
readonly runNotFound: 'run.not-found';
|
|
27
27
|
readonly runNotTerminal: 'run.not-terminal';
|
|
28
|
+
readonly runOverloaded: 'run.overloaded';
|
|
28
29
|
readonly triggerKeyInvalid: 'trigger-key.invalid';
|
|
29
30
|
readonly triggerKeyNotFound: 'trigger-key.not-found';
|
|
30
31
|
readonly triggerNotFound: 'trigger.not-found';
|
|
@@ -109,6 +110,9 @@ export declare const controlErrorMetadata: {
|
|
|
109
110
|
readonly "run.not-terminal": {
|
|
110
111
|
readonly status: 409;
|
|
111
112
|
};
|
|
113
|
+
readonly "run.overloaded": {
|
|
114
|
+
readonly status: 429;
|
|
115
|
+
};
|
|
112
116
|
readonly "trigger-key.invalid": {
|
|
113
117
|
readonly status: 409;
|
|
114
118
|
};
|
|
@@ -318,7 +318,7 @@ export declare class ControlClient {
|
|
|
318
318
|
searchConnectorActions(projectId: string, query: string, signal?: AbortSignal): Promise<readonly ConnectorAction[]>;
|
|
319
319
|
getConnectorAction(projectId: string, actionId: string, signal?: AbortSignal): Promise<ConnectorAction>;
|
|
320
320
|
listConnectorConnections(projectId: string, serviceId: string, signal?: AbortSignal): Promise<readonly ConnectorConnection[]>;
|
|
321
|
-
createConnectorConnectionPage(projectId: string, serviceId: string
|
|
321
|
+
createConnectorConnectionPage(projectId: string, serviceId: string): Promise<string>;
|
|
322
322
|
changeDraft(projectId: string, expectedRevisionId: string, operations: readonly ChangeOperation[]): Promise<DraftChange>;
|
|
323
323
|
checkFlow(projectId: string, revisionId: string, flowId: string): Promise<FlowCheck>;
|
|
324
324
|
getLive(projectId: string, flowId: string): Promise<Live>;
|
|
@@ -328,22 +328,22 @@ export declare class ControlClient {
|
|
|
328
328
|
readonly limit?: number;
|
|
329
329
|
}): Promise<PublicationPage>;
|
|
330
330
|
createDraftRun(projectId: string, revisionId: string, flowId: string, options?: RunOptions): Promise<DraftRun>;
|
|
331
|
-
createLiveRun(
|
|
331
|
+
createLiveRun(publicationId: string, options?: RunOptions): Promise<LiveRun>;
|
|
332
332
|
publishFlow(projectId: string, revisionId: string, flowId: string, expectedLivePublicationId: string | null, options?: PublicationOptions): Promise<Publication>;
|
|
333
333
|
rollbackFlow(projectId: string, flowId: string, publicationId: string, expectedLivePublicationId: string, options?: PublicationOptions): Promise<Publication>;
|
|
334
|
-
getRun(
|
|
334
|
+
getRun(runId: string): Promise<RunDetails>;
|
|
335
335
|
listRuns(projectId: string, options?: {
|
|
336
336
|
readonly cursor?: string;
|
|
337
337
|
readonly flowId?: string;
|
|
338
338
|
readonly limit?: number;
|
|
339
339
|
readonly status?: RunStatus;
|
|
340
340
|
}): Promise<RunPage>;
|
|
341
|
-
getRunEvents(
|
|
341
|
+
getRunEvents(runId: string, options?: {
|
|
342
342
|
readonly after?: number;
|
|
343
343
|
readonly limit?: number;
|
|
344
344
|
}): Promise<RunEvents>;
|
|
345
|
-
getRunResult(
|
|
346
|
-
cancelRun(
|
|
345
|
+
getRunResult(runId: string): Promise<RunResult>;
|
|
346
|
+
cancelRun(runId: string): Promise<RunCancellation>;
|
|
347
347
|
private connectorActions;
|
|
348
348
|
protected request<Value = unknown>(path: string, init?: RequestInit): Promise<Value>;
|
|
349
349
|
}
|
|
@@ -26,6 +26,7 @@ var e = {
|
|
|
26
26
|
runInvalid: "run.invalid",
|
|
27
27
|
runNotFound: "run.not-found",
|
|
28
28
|
runNotTerminal: "run.not-terminal",
|
|
29
|
+
runOverloaded: "run.overloaded",
|
|
29
30
|
triggerKeyInvalid: "trigger-key.invalid",
|
|
30
31
|
triggerKeyNotFound: "trigger-key.not-found",
|
|
31
32
|
triggerNotFound: "trigger.not-found"
|
|
@@ -56,6 +57,7 @@ var e = {
|
|
|
56
57
|
[e.runInvalid]: { status: 400 },
|
|
57
58
|
[e.runNotFound]: { status: 404 },
|
|
58
59
|
[e.runNotTerminal]: { status: 409 },
|
|
60
|
+
[e.runOverloaded]: { status: 429 },
|
|
59
61
|
[e.triggerKeyInvalid]: { status: 409 },
|
|
60
62
|
[e.triggerKeyNotFound]: { status: 404 },
|
|
61
63
|
[e.triggerNotFound]: { status: 404 }
|
|
@@ -741,17 +743,14 @@ var $ = class {
|
|
|
741
743
|
"version"
|
|
742
744
|
]), r.version != 1 || o(r.projectId) != e || o(r.serviceId) != t || !Array.isArray(r.connections) ? i() : r.connections.map(u);
|
|
743
745
|
}
|
|
744
|
-
async createConnectorConnectionPage(e, t
|
|
745
|
-
let
|
|
746
|
-
body: JSON.stringify({
|
|
747
|
-
returnUrl: n,
|
|
748
|
-
version: 1
|
|
749
|
-
}),
|
|
746
|
+
async createConnectorConnectionPage(e, t) {
|
|
747
|
+
let n = a(await this.request(`/v1/projects/${Z(e)}/connector/connections/${Z(t)}/page`, {
|
|
748
|
+
body: JSON.stringify({ version: 1 }),
|
|
750
749
|
method: "POST"
|
|
751
750
|
}));
|
|
752
|
-
if (s(
|
|
751
|
+
if (s(n, ["url", "version"]), n.version != 1) return i();
|
|
753
752
|
try {
|
|
754
|
-
let e = new URL(o(
|
|
753
|
+
let e = new URL(o(n.url));
|
|
755
754
|
return e.protocol != "http:" && e.protocol != "https:" ? i() : e.href;
|
|
756
755
|
} catch {
|
|
757
756
|
return i();
|
|
@@ -797,16 +796,17 @@ var $ = class {
|
|
|
797
796
|
}));
|
|
798
797
|
return a.source == "draft" ? a : i();
|
|
799
798
|
}
|
|
800
|
-
async createLiveRun(e, t
|
|
801
|
-
let
|
|
799
|
+
async createLiveRun(e, t = {}) {
|
|
800
|
+
let n = W(await this.request("/v1/runs", {
|
|
802
801
|
body: JSON.stringify({
|
|
803
|
-
inputs:
|
|
802
|
+
inputs: t.inputs ?? {},
|
|
803
|
+
publicationId: e,
|
|
804
804
|
version: 1
|
|
805
805
|
}),
|
|
806
|
-
headers: { "idempotency-key":
|
|
806
|
+
headers: { "idempotency-key": t.idempotencyKey ?? Q("run") },
|
|
807
807
|
method: "POST"
|
|
808
808
|
}));
|
|
809
|
-
return
|
|
809
|
+
return n.source == "live" ? n : i();
|
|
810
810
|
}
|
|
811
811
|
async publishFlow(e, t, n, r, i = {}) {
|
|
812
812
|
return P(await this.request(`/v1/projects/${Z(e)}/revisions/${Z(t)}/flows/${Z(n)}/publications`, {
|
|
@@ -829,8 +829,8 @@ var $ = class {
|
|
|
829
829
|
method: "POST"
|
|
830
830
|
}));
|
|
831
831
|
}
|
|
832
|
-
async getRun(e
|
|
833
|
-
return W(await this.request(`/v1/
|
|
832
|
+
async getRun(e) {
|
|
833
|
+
return W(await this.request(`/v1/runs/${Z(e)}`));
|
|
834
834
|
}
|
|
835
835
|
async listRuns(e, t = {}) {
|
|
836
836
|
let n = new URLSearchParams();
|
|
@@ -838,17 +838,17 @@ var $ = class {
|
|
|
838
838
|
let r = n.size == 0 ? "" : `?${n}`;
|
|
839
839
|
return G(await this.request(`/v1/projects/${Z(e)}/runs${r}`));
|
|
840
840
|
}
|
|
841
|
-
async getRunEvents(e, t
|
|
842
|
-
let
|
|
843
|
-
|
|
844
|
-
let
|
|
845
|
-
return J(await this.request(`/v1/
|
|
841
|
+
async getRunEvents(e, t = {}) {
|
|
842
|
+
let n = new URLSearchParams();
|
|
843
|
+
t.after != null && n.set("after", String(t.after)), t.limit != null && n.set("limit", String(t.limit));
|
|
844
|
+
let r = n.size == 0 ? "" : `?${n}`;
|
|
845
|
+
return J(await this.request(`/v1/runs/${Z(e)}/events${r}`));
|
|
846
846
|
}
|
|
847
|
-
async getRunResult(e
|
|
848
|
-
return X(await this.request(`/v1/
|
|
847
|
+
async getRunResult(e) {
|
|
848
|
+
return X(await this.request(`/v1/runs/${Z(e)}/result`));
|
|
849
849
|
}
|
|
850
|
-
async cancelRun(e
|
|
851
|
-
return Y(await this.request(`/v1/
|
|
850
|
+
async cancelRun(e) {
|
|
851
|
+
return Y(await this.request(`/v1/runs/${Z(e)}/cancel`, {
|
|
852
852
|
body: JSON.stringify({ version: 1 }),
|
|
853
853
|
method: "POST"
|
|
854
854
|
}));
|
|
@@ -39,6 +39,7 @@ export interface IntegrationReceiveContext {
|
|
|
39
39
|
readonly now: Date;
|
|
40
40
|
readonly payload: JsonValue;
|
|
41
41
|
readonly query: (name: string) => string | undefined;
|
|
42
|
+
readonly rawBody: Uint8Array;
|
|
42
43
|
readonly state?: IntegrationStateContext;
|
|
43
44
|
}
|
|
44
45
|
export interface IntegrationReconcileContext {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/@babel/parser/lib/index.js
|
|
1
|
+
//#region ../../node_modules/.bun/@babel+parser@8.0.4/node_modules/@babel/parser/lib/index.js
|
|
2
2
|
var e = class {
|
|
3
3
|
constructor(e, t, n) {
|
|
4
4
|
this.line = void 0, this.column = void 0, n !== void 0 && (this.index = void 0), this.line = e, this.column = t, n !== void 0 && (this.index = n);
|
|
@@ -1348,8 +1348,7 @@ var nt = /\*?\s*@((?:no)?flow)\b/, rt = (e) => class extends e {
|
|
|
1348
1348
|
} finally {
|
|
1349
1349
|
this.state.context = t;
|
|
1350
1350
|
}
|
|
1351
|
-
}
|
|
1352
|
-
return e();
|
|
1351
|
+
} else return e();
|
|
1353
1352
|
}
|
|
1354
1353
|
flowParseTypeParameterInstantiationInExpression() {
|
|
1355
1354
|
if (this.reScan_lt() === 43) return this.flowParseTypeParameterInstantiation();
|
|
@@ -6695,8 +6694,7 @@ var ln = (e) => class extends e {
|
|
|
6695
6694
|
} finally {
|
|
6696
6695
|
this.state.context = t;
|
|
6697
6696
|
}
|
|
6698
|
-
}
|
|
6699
|
-
return e();
|
|
6697
|
+
} else return e();
|
|
6700
6698
|
}
|
|
6701
6699
|
tsInType(e) {
|
|
6702
6700
|
let t = this.state.inType;
|