@powerhousedao/reactor-workflow 6.2.3-dev.78 → 6.2.3-dev.79
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,4 +1,4 @@
|
|
|
1
|
-
import { $ as rememberSecrets, A as AttachmentCache, B as SecretNotFoundError, C as blockLabel, D as describeBuiltinPiece, E as builtinPiece, F as shapeConnection, G as PieceWorkerPool, H as secretRefFromId, I as resolveStepInput, J as PieceWorkerError, K as PieceWorker, L as expressionsIn, N as declaredConnectionIds, O as CORE_PIECE_NAME, P as declaredReactorConnectionIds, Q as redactMessage, S as storeHandlers, T as blockPorts, U as stepBlock, V as parseSecretRef, W as triggerBlock, X as containsRedactedMarker, Y as PieceWorkerTimeoutError, Z as redact, _ as effectiveRetryPolicy, _t as npmRegistryBaseUrl, a as PieceRegistry, at as FileTooLargeError, b as isHostBound, bt as isIndeterminateError, c as packagePieces, ct as pieceModuleRef, d as runWorkflow, dt as UnsupportedPieceFeatureError, et as secretsFor, f as canonicalJson, ft as authMethodFor, g as checkDynamicProperties, h as DynamicPropertiesError, i as tracedSteps, it as extractDedupeKey, j as BoundConnectionResolver, k as CORE_PIECE_VERSION, lt as sourcedResolver, m as stepConfigHash, mt as unsupportedTrigger, n as WorkflowTelemetry, nt as isPrivateAddress, o as installedPiece, ot as maxFileBytes, p as hashOf, pt as unsupportedAuth, q as PieceWorkerDisposedError, r as tracedMethods, rt as parseAddress, s as installedPieces, st as bundleResolver, t as TELEMETRY_SCOPE, tt as DEFAULT_EGRESS_POLICY, u as errorNameOf, v as ActivepiecesBlockExecutor, vt as pieceRegistrySource, w as unpinnedNote, x as resolvedBlock, y as CompositeBlockExecutor, yt as setPieceRegistryUrl, z as SecretDeletedError } from "./telemetry-
|
|
1
|
+
import { $ as rememberSecrets, A as AttachmentCache, B as SecretNotFoundError, C as blockLabel, D as describeBuiltinPiece, E as builtinPiece, F as shapeConnection, G as PieceWorkerPool, H as secretRefFromId, I as resolveStepInput, J as PieceWorkerError, K as PieceWorker, L as expressionsIn, N as declaredConnectionIds, O as CORE_PIECE_NAME, P as declaredReactorConnectionIds, Q as redactMessage, S as storeHandlers, T as blockPorts, U as stepBlock, V as parseSecretRef, W as triggerBlock, X as containsRedactedMarker, Y as PieceWorkerTimeoutError, Z as redact, _ as effectiveRetryPolicy, _t as npmRegistryBaseUrl, a as PieceRegistry, at as FileTooLargeError, b as isHostBound, bt as isIndeterminateError, c as packagePieces, ct as pieceModuleRef, d as runWorkflow, dt as UnsupportedPieceFeatureError, et as secretsFor, f as canonicalJson, ft as authMethodFor, g as checkDynamicProperties, h as DynamicPropertiesError, i as tracedSteps, it as extractDedupeKey, j as BoundConnectionResolver, k as CORE_PIECE_VERSION, lt as sourcedResolver, m as stepConfigHash, mt as unsupportedTrigger, n as WorkflowTelemetry, nt as isPrivateAddress, o as installedPiece, ot as maxFileBytes, p as hashOf, pt as unsupportedAuth, q as PieceWorkerDisposedError, r as tracedMethods, rt as parseAddress, s as installedPieces, st as bundleResolver, t as TELEMETRY_SCOPE, tt as DEFAULT_EGRESS_POLICY, u as errorNameOf, v as ActivepiecesBlockExecutor, vt as pieceRegistrySource, w as unpinnedNote, x as resolvedBlock, y as CompositeBlockExecutor, yt as setPieceRegistryUrl, z as SecretDeletedError } from "./telemetry-CJd29LsN.js";
|
|
2
2
|
import { ReactorAccessDeniedError, ReactorAccessDeniedError as ReactorAccessDeniedError$1, ReactorActionsFailedError, ReactorJobFailedError, ReactorJobPendingError as ReactorJobPendingError$1, WebhookHandshakeStrategy } from "@powerhousedao/pieces-framework";
|
|
3
3
|
import { mkdirSync, openAsBlob, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { open, readdir, rm, stat } from "node:fs/promises";
|
|
@@ -19,7 +19,7 @@ import { actions as actions$1 } from "@powerhousedao/workflow/document-models/wo
|
|
|
19
19
|
import { Kind, parse } from "graphql";
|
|
20
20
|
import { ReactorHostServer } from "@powerhousedao/reactor/rpc";
|
|
21
21
|
import { SpanStatusCode, context } from "@opentelemetry/api";
|
|
22
|
-
import { BaseReadModel, JobStatus, PropagationMode, defaultReadModelIndexingConfig, deleteDocumentAction, isPurgeMarker } from "@powerhousedao/reactor";
|
|
22
|
+
import { BaseReadModel, JobStatus, PropagationMode, createEmptyDocument, defaultReadModelIndexingConfig, deleteDocumentAction, isPurgeMarker } from "@powerhousedao/reactor";
|
|
23
23
|
import { DOCUMENT_SCOPE_ACTION_TYPES, initializeAuth, normalizeDocumentModelVersion, withSignaturePolicy } from "@powerhousedao/shared/document-model";
|
|
24
24
|
import { performance as performance$1 } from "node:perf_hooks";
|
|
25
25
|
//#region src/pieces/activepieces/piece-versions.ts
|
|
@@ -2100,17 +2100,22 @@ var RunScopedReactorClient = class {
|
|
|
2100
2100
|
const parentId = parentIdentifier === void 0 ? void 0 : await this.resolveReference(parentIdentifier, "main", abort);
|
|
2101
2101
|
return this.createDocument(document, parentId, abort);
|
|
2102
2102
|
}
|
|
2103
|
+
async newDocument(documentModelType, options, signal) {
|
|
2104
|
+
this.assertWritable("newDocument");
|
|
2105
|
+
const abort = this.signal(signal);
|
|
2106
|
+
const module = await this.modelModule(documentModelType, options?.documentModelVersion, abort);
|
|
2107
|
+
const parentId = options?.parentIdentifier === void 0 ? void 0 : await this.resolveReference(options.parentIdentifier, "main", abort);
|
|
2108
|
+
const base = await this.inner.getCreateProtocolVersions({
|
|
2109
|
+
documentType: documentModelType,
|
|
2110
|
+
parentIdentifier: parentId
|
|
2111
|
+
}, abort);
|
|
2112
|
+
return createEmptyDocument(module, options, await this.inner.getCreateSignaturePolicy(), base);
|
|
2113
|
+
}
|
|
2103
2114
|
async createEmpty(documentModelType, options, signal) {
|
|
2104
2115
|
this.assertWritable("createEmpty");
|
|
2105
2116
|
const abort = this.signal(signal);
|
|
2106
|
-
const
|
|
2117
|
+
const document = await this.newDocument(documentModelType, options, abort);
|
|
2107
2118
|
const parentId = options?.parentIdentifier === void 0 ? void 0 : await this.resolveReference(options.parentIdentifier, "main", abort);
|
|
2108
|
-
const base = await this.inner.getCreateProtocolVersions(parentId, abort);
|
|
2109
|
-
const document = withSignaturePolicy(module.utils.createDocument(), await this.inner.getCreateSignaturePolicy(), { protocolVersions: {
|
|
2110
|
-
...base,
|
|
2111
|
-
...options?.protocolVersions
|
|
2112
|
-
} });
|
|
2113
|
-
document.state.document.version = normalizeDocumentModelVersion(module.version);
|
|
2114
2119
|
return this.createDocument(document, parentId, abort);
|
|
2115
2120
|
}
|
|
2116
2121
|
async execute(documentIdentifier, branch, actions, signal, subject) {
|
|
@@ -2383,6 +2388,7 @@ const SERVED = {
|
|
|
2383
2388
|
getIncomingRelationships: true,
|
|
2384
2389
|
getOutgoingRelationshipEdges: true,
|
|
2385
2390
|
getIncomingRelationshipEdges: true,
|
|
2391
|
+
newDocument: true,
|
|
2386
2392
|
create: true,
|
|
2387
2393
|
createEmpty: true,
|
|
2388
2394
|
execute: true,
|