@powerhousedao/reactor-workflow 6.2.3-dev.96 → 6.2.3-dev.97
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/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as PieceWorkerPool, A as builtinPiece, At as isIndeterminateError, B as shapeConnection, C as flowsHandlers, Ct as unsupportedAuth, D as blockLabel, Dt as npmRegistryBaseUrl, E as storeHandlers, F as AttachmentCache, G as SecretCreatorMismatchError, H as expressionsIn, I as BoundConnectionResolver, J as SecretOwnerMismatchError, K as SecretDeletedError, M as CORE_PIECE_NAME, N as CORE_PIECE_VERSION, O as unpinnedNote, Ot as pieceRegistrySource, P as loopItems, Q as triggerBlock, R as declaredConnectionIds, S as CompositeBlockExecutor, St as authMethodFor, T as resolvedBlock, U as unavailableValue, V as resolveStepInput, X as secretRefFromId, Y as parseSecretRef, Z as stepBlock, _ as stepConfigHash, _t as bundleResolver, a as PieceRegistry, at as redact, b as effectiveRetryPolicy, c as packagePieces, ct as secretsFor, d as runWorkflow, dt as parseAddress, et as PieceWorker, f as isLoopStep, ft as extractDedupeKey, g as hashOf, gt as HOST_ORIGIN, h as canonicalJson, ht as FLOWS_LIST, i as tracedSteps, it as containsRedactedMarker, j as describeBuiltinPiece, k as blockPorts, kt as setPieceRegistryUrl, lt as DEFAULT_EGRESS_POLICY, m as loopStructure, mt as maxFileBytes, n as WorkflowTelemetry, nt as PieceWorkerError, o as installedPiece, ot as redactMessage, p as loopConfigHash, pt as FileTooLargeError, q as SecretNotFoundError, r as tracedMethods, rt as PieceWorkerTimeoutError, s as installedPieces, st as rememberSecrets, t as TELEMETRY_SCOPE, tt as PieceWorkerDisposedError, u as errorNameOf, ut as isPrivateAddress, v as DynamicPropertiesError, vt as pieceModuleRef, w as isHostBound, wt as unsupportedTrigger, x as ActivepiecesBlockExecutor, xt as UnsupportedPieceFeatureError, y as checkDynamicProperties, yt as sourcedResolver, z as declaredReactorConnectionIds } from "./telemetry-
|
|
1
|
+
import { $ as PieceWorkerPool, A as builtinPiece, At as isIndeterminateError, B as shapeConnection, C as flowsHandlers, Ct as unsupportedAuth, D as blockLabel, Dt as npmRegistryBaseUrl, E as storeHandlers, F as AttachmentCache, G as SecretCreatorMismatchError, H as expressionsIn, I as BoundConnectionResolver, J as SecretOwnerMismatchError, K as SecretDeletedError, M as CORE_PIECE_NAME, N as CORE_PIECE_VERSION, O as unpinnedNote, Ot as pieceRegistrySource, P as loopItems, Q as triggerBlock, R as declaredConnectionIds, S as CompositeBlockExecutor, St as authMethodFor, T as resolvedBlock, U as unavailableValue, V as resolveStepInput, X as secretRefFromId, Y as parseSecretRef, Z as stepBlock, _ as stepConfigHash, _t as bundleResolver, a as PieceRegistry, at as redact, b as effectiveRetryPolicy, c as packagePieces, ct as secretsFor, d as runWorkflow, dt as parseAddress, et as PieceWorker, f as isLoopStep, ft as extractDedupeKey, g as hashOf, gt as HOST_ORIGIN, h as canonicalJson, ht as FLOWS_LIST, i as tracedSteps, it as containsRedactedMarker, j as describeBuiltinPiece, k as blockPorts, kt as setPieceRegistryUrl, lt as DEFAULT_EGRESS_POLICY, m as loopStructure, mt as maxFileBytes, n as WorkflowTelemetry, nt as PieceWorkerError, o as installedPiece, ot as redactMessage, p as loopConfigHash, pt as FileTooLargeError, q as SecretNotFoundError, r as tracedMethods, rt as PieceWorkerTimeoutError, s as installedPieces, st as rememberSecrets, t as TELEMETRY_SCOPE, tt as PieceWorkerDisposedError, u as errorNameOf, ut as isPrivateAddress, v as DynamicPropertiesError, vt as pieceModuleRef, w as isHostBound, wt as unsupportedTrigger, x as ActivepiecesBlockExecutor, xt as UnsupportedPieceFeatureError, y as checkDynamicProperties, yt as sourcedResolver, z as declaredReactorConnectionIds } from "./telemetry-DXQJjuMd.js";
|
|
2
2
|
import { DENIED_ACTION_INDEXES, ReactorAccessDeniedError, ReactorAccessDeniedError as ReactorAccessDeniedError$1, ReactorJobFailedError, ReactorJobPendingError as ReactorJobPendingError$1, WebhookHandshakeStrategy, assertActionsApplied } from "@powerhousedao/pieces-framework";
|
|
3
3
|
import { mkdirSync, openAsBlob, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { open, readFile, readdir, rm, stat } from "node:fs/promises";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
|
-
import { childLogger, garbageCollect, generateId, hashDocumentStateForScope, isDenied, sortOperations } from "document-model";
|
|
6
|
+
import { childLogger, garbageCollect, generateId, hashDocumentStateForScope, isDenied, operationsByActionType, sortOperations } from "document-model";
|
|
7
7
|
import { CALL_FLOW_ACTION as CALL_FLOW_ACTION$1, DEFAULT_TIMEZONE, DOCUMENT_REF_KEY, SUBFLOWS_PIECE as SUBFLOWS_PIECE$1, ScheduleConfigError, checkTriggerStrategy, coerceManualPayload, containsDocumentRef, documentRefsIn, expandDocumentRefs, isCallableFlow, isDocumentRefMarker, manualInputTypeName, parseManualInputs, parseScheduleConfig, referenceDocuments } from "@powerhousedao/pieces-framework/workflow";
|
|
8
8
|
import { Cron } from "croner";
|
|
9
9
|
import { createCipheriv, createDecipheriv, createHash, createHmac, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -13592,9 +13592,8 @@ var WorkflowRuntimeService = class {
|
|
|
13592
13592
|
async operationInputFields(documentType, actionType) {
|
|
13593
13593
|
if (!documentType || !actionType) return [];
|
|
13594
13594
|
try {
|
|
13595
|
-
const
|
|
13596
|
-
|
|
13597
|
-
return [];
|
|
13595
|
+
const operation = operationForActionType(await this.host.reactorClient.getDocumentModelModule(documentType), actionType);
|
|
13596
|
+
return operation?.name && operation.schema ? fieldsFromSdl(operation.schema, { input: operation.name }) : [];
|
|
13598
13597
|
} catch {
|
|
13599
13598
|
return [];
|
|
13600
13599
|
}
|
|
@@ -15689,6 +15688,11 @@ function collectAttachmentRefs(value, found) {
|
|
|
15689
15688
|
else if (value instanceof Map) for (const entry of value.values()) collectAttachmentRefs(entry, found);
|
|
15690
15689
|
else if (typeof value === "object" && value !== null) for (const entry of Object.values(value)) collectAttachmentRefs(entry, found);
|
|
15691
15690
|
}
|
|
15691
|
+
function operationForActionType(module, actionType) {
|
|
15692
|
+
const structured = operationsByActionType(module);
|
|
15693
|
+
const storedName = structured.size === 0 ? actionType : structured.get(actionType)?.storedName;
|
|
15694
|
+
return module.documentModel.global.specifications.at(-1)?.modules.flatMap((specModule) => specModule.operations).find((operation) => operation.name === storedName);
|
|
15695
|
+
}
|
|
15692
15696
|
//#endregion
|
|
15693
15697
|
//#region src/reactor/singleton-lease.ts
|
|
15694
15698
|
const logger = childLogger([
|