@powerhousedao/reactor-workflow 6.2.3-dev.24 → 6.2.3-dev.26
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 +3 -1
- package/dist/{descriptor-E4swpRpd.js → descriptor-CtMB-wPx.js} +21 -12
- package/dist/descriptor-CtMB-wPx.js.map +1 -0
- package/dist/index.d.ts +69 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +171 -64
- package/dist/index.js.map +1 -1
- package/dist/{piece-registry-CYXV_aEv.js → piece-registry-CAS4wiSA.js} +25 -7
- package/dist/{piece-registry-CYXV_aEv.js.map → piece-registry-CAS4wiSA.js.map} +1 -1
- package/dist/{piece-registry-q4bgYbXa.d.ts → piece-registry-D6dvy2OD.d.ts} +7 -37
- package/dist/piece-registry-D6dvy2OD.d.ts.map +1 -0
- package/dist/{redact-C2y8tU--.js → redact-DM3JhxdF.js} +16 -5
- package/dist/redact-DM3JhxdF.js.map +1 -0
- package/dist/testing.d.ts +37 -2
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +3 -3
- package/dist/worker-entry.d.ts +2 -1
- package/dist/worker-entry.js +36 -28
- package/dist/worker-entry.js.map +1 -1
- package/package.json +7 -7
- package/dist/descriptor-E4swpRpd.js.map +0 -1
- package/dist/piece-registry-q4bgYbXa.d.ts.map +0 -1
- package/dist/redact-C2y8tU--.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as REACTOR_FIND, D as OUTPUT_UPDATE, E as LOG_WRITE, F as STORE_GET, I as STORE_PUT, M as REACTOR_MODEL, N as REACTOR_MODELS, O as REACTOR_CREATE, P as STORE_DELETE, T as jsonSafe, a as redactMessage, c as DEFAULT_EGRESS_POLICY, g as rewriteFileRefs, i as redactError, j as REACTOR_GET, k as REACTOR_EXECUTE, n as containsRedactedMarker, o as rememberSecrets, r as redact, s as secretsFor, t as collectSecretValues, y as configuredMaxFileBytes } from "./redact-
|
|
1
|
+
import { A as REACTOR_FIND, D as OUTPUT_UPDATE, E as LOG_WRITE, F as STORE_GET, I as STORE_PUT, M as REACTOR_MODEL, N as REACTOR_MODELS, O as REACTOR_CREATE, P as STORE_DELETE, T as jsonSafe, a as redactMessage, c as DEFAULT_EGRESS_POLICY, g as rewriteFileRefs, i as redactError, j as REACTOR_GET, k as REACTOR_EXECUTE, n as containsRedactedMarker, o as rememberSecrets, r as redact, s as secretsFor, t as collectSecretValues, y as configuredMaxFileBytes } from "./redact-DM3JhxdF.js";
|
|
2
2
|
import { AppConnectionType } from "@powerhousedao/pieces-framework";
|
|
3
3
|
import { execFile, fork } from "node:child_process";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
@@ -42,7 +42,8 @@ function cdnTarballUrl(name, version) {
|
|
|
42
42
|
return `${CDN_PIECES_URL}${name.replace("/", "-")}-${version}.tgz`;
|
|
43
43
|
}
|
|
44
44
|
function npmTarballUrl(name, version) {
|
|
45
|
-
|
|
45
|
+
const unscoped = name.startsWith("@") ? name.split("/")[1] : name;
|
|
46
|
+
return `${NPM_REGISTRY_URL}/${name}/-/${unscoped}-${version}.tgz`;
|
|
46
47
|
}
|
|
47
48
|
const NPM_NAME_RE = /^(@[a-z0-9][a-z0-9-_.]*\/)?[a-z0-9][a-z0-9-_.]*$/;
|
|
48
49
|
const NPM_VERSION_RE = /^[A-Za-z0-9][A-Za-z0-9.+-]*$/;
|
|
@@ -60,8 +61,8 @@ function readString(header, offset, length) {
|
|
|
60
61
|
const nul = slice.indexOf(0);
|
|
61
62
|
return slice.subarray(0, nul === -1 ? length : nul).toString("utf8");
|
|
62
63
|
}
|
|
63
|
-
const MAX_EXTRACTED_BYTES =
|
|
64
|
-
const MAX_COMPRESSED_BYTES =
|
|
64
|
+
const MAX_EXTRACTED_BYTES = 67108864;
|
|
65
|
+
const MAX_COMPRESSED_BYTES = 67108864;
|
|
65
66
|
async function extractTarball(tgz, dest) {
|
|
66
67
|
const tar = await gunzip$1(tgz, { maxOutputLength: MAX_EXTRACTED_BYTES }).catch((error) => {
|
|
67
68
|
throw new Error(`Failed to decompress piece bundle: ${String(error)}`);
|
|
@@ -293,6 +294,10 @@ async function runInstall(cwd, timeoutMs) {
|
|
|
293
294
|
});
|
|
294
295
|
}
|
|
295
296
|
var PieceNotInstallableError = class extends Error {
|
|
297
|
+
packageName;
|
|
298
|
+
version;
|
|
299
|
+
dependencies;
|
|
300
|
+
cause;
|
|
296
301
|
constructor(packageName, version, dependencies, cause) {
|
|
297
302
|
const declared = Object.keys(dependencies);
|
|
298
303
|
const listed = declared.slice(0, MAX_LISTED_DEPENDENCIES).map((dep) => `${dep}@${dependencies[dep]}`);
|
|
@@ -580,6 +585,7 @@ var PieceWorkerSessionClosedError = class extends Error {
|
|
|
580
585
|
};
|
|
581
586
|
const DEFAULT_SIZE = 4;
|
|
582
587
|
var PieceWorkerSession = class {
|
|
588
|
+
pool;
|
|
583
589
|
worker;
|
|
584
590
|
taking;
|
|
585
591
|
held = false;
|
|
@@ -867,6 +873,7 @@ function shapeAuth(source, resolved) {
|
|
|
867
873
|
}
|
|
868
874
|
}
|
|
869
875
|
var StaticConnectionResolver = class {
|
|
876
|
+
secrets;
|
|
870
877
|
connections;
|
|
871
878
|
constructor(connections, secrets) {
|
|
872
879
|
this.secrets = secrets;
|
|
@@ -891,6 +898,9 @@ function declaredConnectionIds(definition) {
|
|
|
891
898
|
return declared;
|
|
892
899
|
}
|
|
893
900
|
var BoundConnectionResolver = class {
|
|
901
|
+
inner;
|
|
902
|
+
binding;
|
|
903
|
+
onRefused;
|
|
894
904
|
resolveWithSecrets;
|
|
895
905
|
constructor(inner, binding, onRefused) {
|
|
896
906
|
this.inner = inner;
|
|
@@ -1141,6 +1151,7 @@ function parseBlockType(blockType, packages = {}) {
|
|
|
1141
1151
|
};
|
|
1142
1152
|
}
|
|
1143
1153
|
var ActivepiecesBlockExecutor = class {
|
|
1154
|
+
options;
|
|
1144
1155
|
own;
|
|
1145
1156
|
resolver;
|
|
1146
1157
|
constructor(options) {
|
|
@@ -1272,6 +1283,8 @@ var ActivepiecesBlockExecutor = class {
|
|
|
1272
1283
|
}
|
|
1273
1284
|
};
|
|
1274
1285
|
var CompositeBlockExecutor = class {
|
|
1286
|
+
pieces;
|
|
1287
|
+
handlers;
|
|
1275
1288
|
core = new CoreBlockExecutor();
|
|
1276
1289
|
constructor(pieces, handlers = {}) {
|
|
1277
1290
|
this.pieces = pieces;
|
|
@@ -1364,6 +1377,7 @@ async function runWorkflow(options) {
|
|
|
1364
1377
|
return;
|
|
1365
1378
|
}
|
|
1366
1379
|
const input = resolveExpressions(step.config, scope);
|
|
1380
|
+
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
1367
1381
|
try {
|
|
1368
1382
|
const result = await executor.execute({
|
|
1369
1383
|
blockType: step.blockType,
|
|
@@ -1379,7 +1393,9 @@ async function runWorkflow(options) {
|
|
|
1379
1393
|
status: "SUCCEEDED",
|
|
1380
1394
|
input: journaled(input, result.redactValues),
|
|
1381
1395
|
output: journaled(result.output, result.redactValues),
|
|
1382
|
-
port
|
|
1396
|
+
port,
|
|
1397
|
+
startedAt,
|
|
1398
|
+
endedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1383
1399
|
};
|
|
1384
1400
|
records.set(step.id, record);
|
|
1385
1401
|
await journal(record);
|
|
@@ -1394,7 +1410,9 @@ async function runWorkflow(options) {
|
|
|
1394
1410
|
blockType: step.blockType,
|
|
1395
1411
|
status: "FAILED",
|
|
1396
1412
|
input: journaled(input, values),
|
|
1397
|
-
error: detail
|
|
1413
|
+
error: detail,
|
|
1414
|
+
startedAt,
|
|
1415
|
+
endedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1398
1416
|
};
|
|
1399
1417
|
records.set(step.id, record);
|
|
1400
1418
|
await journal(record);
|
|
@@ -1467,4 +1485,4 @@ const packagePieces = new PieceRegistry();
|
|
|
1467
1485
|
//#endregion
|
|
1468
1486
|
export { setPieceRegistryUrl as A, PieceWorkerError as C, ensurePieceBundle as D, pieceModuleRef as E, fetchPieceBundle as O, PieceWorker as S, localFirstResolver as T, SecretDeletedError as _, CompositeBlockExecutor as a, secretRefFromId as b, parseBlockType as c, storeHandlers as d, BoundConnectionResolver as f, InMemorySecretProvider as g, shapeConnection as h, ActivepiecesBlockExecutor as i, pieceRegistrySource as k, reactorHandlers as l, declaredConnectionIds as m, packagePieces as n, REACTOR_PORT_PIECE as o, StaticConnectionResolver as p, runWorkflow as r, blockTypeParts as s, PieceRegistry as t, servesReactorPort as u, SecretNotFoundError as v, PieceWorkerTimeoutError as w, PieceWorkerPool as x, parseSecretRef as y };
|
|
1469
1487
|
|
|
1470
|
-
//# sourceMappingURL=piece-registry-
|
|
1488
|
+
//# sourceMappingURL=piece-registry-CAS4wiSA.js.map
|