@powerhousedao/reactor 6.2.3-dev.40 → 6.2.3-dev.41

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/entry.js CHANGED
@@ -1,5 +1,5 @@
1
- import { n as errorToInfo, t as createForwardingLogger, u as instrumentPgPool } from "./forwarding-logger-DMqDs9tE.js";
2
- import { n as defaultLoadFactory, t as buildWorkerExecutor } from "./build-worker-executor-B9IfcRij.js";
1
+ import { n as errorToInfo, t as createForwardingLogger, u as instrumentPgPool } from "./forwarding-logger-BKDP4JnD.js";
2
+ import { n as defaultLoadFactory, t as buildWorkerExecutor } from "./build-worker-executor-Bonu2jUB.js";
3
3
  import { ConsoleLogger } from "document-model";
4
4
  import { isMainThread, parentPort } from "node:worker_threads";
5
5
  //#region src/executor/worker/run-worker.ts
@@ -1232,6 +1232,19 @@ var ModuleNotFoundError = class extends Error {
1232
1232
  return Error.isError(error) && error.name === "ModuleNotFoundError";
1233
1233
  }
1234
1234
  };
1235
+ /** The host has the model only as a live module, which workers cannot import. */
1236
+ var ModelNotWorkerImportableError = class extends Error {
1237
+ documentType;
1238
+ constructor(documentType, version) {
1239
+ const versionSuffix = version !== void 0 ? ` version ${version}` : "";
1240
+ super(`Document model ${documentType}${versionSuffix} is registered on the host only as a live module, so executor workers cannot load it. Register it from a { filePath } or { packageName } source.`);
1241
+ this.name = "ModelNotWorkerImportableError";
1242
+ this.documentType = documentType;
1243
+ }
1244
+ static isError(error) {
1245
+ return Error.isError(error) && error.name === "ModelNotWorkerImportableError";
1246
+ }
1247
+ };
1235
1248
  /**
1236
1249
  * Error thrown when attempting to register a module that already exists.
1237
1250
  */
@@ -7437,6 +7450,9 @@ function toErrorInfo(err, depth = 0) {
7437
7450
  if (err.cause !== void 0) info.cause = toErrorInfo(err.cause, depth + 1);
7438
7451
  const documentId = err.documentId;
7439
7452
  if (typeof documentId === "string") info.documentId = documentId;
7453
+ const { documentType, requestedVersion } = err;
7454
+ if (typeof documentType === "string") info.documentType = documentType;
7455
+ if (typeof requestedVersion === "number") info.requestedVersion = requestedVersion;
7440
7456
  return info;
7441
7457
  }
7442
7458
  if (typeof err === "string") return {
@@ -7478,6 +7494,11 @@ function fromErrorInfo(info) {
7478
7494
  configurable: true,
7479
7495
  writable: true
7480
7496
  });
7497
+ for (const key of ["documentType", "requestedVersion"]) if (info[key] !== void 0) Object.defineProperty(err, key, {
7498
+ value: info[key],
7499
+ configurable: true,
7500
+ writable: true
7501
+ });
7481
7502
  if (info.cause !== void 0) Object.defineProperty(err, "cause", {
7482
7503
  value: fromErrorInfo(info.cause),
7483
7504
  configurable: true,
@@ -7567,6 +7588,6 @@ function createForwardingLogger(post, level = "info", tags = []) {
7567
7588
  };
7568
7589
  }
7569
7590
  //#endregion
7570
- export { selectDecisionModel as $, ProbeSettler as A, matchesScope as At, JobExecutorEventTypes as B, KyselyWriteCache as C, RelationshipNotFoundError as Ct, acquirePurgeLocks as D, UpgradePreconditionFailedError as Dt, PURGE_NS as E, UnsupportedStoredProtocolError as Et, snapshotFunctionsFor as F, GATED_DOCUMENT_ACTIONS as G, DuplicateModuleError as H, DocumentMetaCache as I, createEmptyConsistencyToken as J, createConsistencyToken as K, CollectionMembershipCache as L, createKyselyWatermarkProbe as M, throwIfAborted as Mt, describeWaitingSessions as N, yieldToMain as Nt, findPurged as O, EventBusAggregateError as Ot, parseSnapshot as P, __exportAll as Pt, decideAtHead as Q, DEFAULT_DEFERRED_JOB_TTL_MS as R, EventBus as S, PurgeTooLargeError as St, PURGE_LOCK_BUCKETS as T, UnsupportedProtocolVersionError as Tt, InvalidModuleError as U, DuplicateManifestError as V, ModuleNotFoundError as W, summarizeSubmittedActions as X, submittedActionIds as Y, targetDocumentId as Z, KyselyExecutionScope as _, DocumentPurgedError as _t, DEFAULT_DRIVE_CONTAINER_TYPES as a, AppendConditionFailedError as at, appliedDelete as b, InvalidOperationTimestampError as bt, runMigrations as c, DuplicateOperationError as ct, KyselyOperationStore as d, AuthEnforcementDisabledError as dt, documentDecisionModel as et, KyselyKeyframeStore as f, AuthTimestampNotMonotonicError as ft, PassthroughSigner as g, DocumentNotFoundError as gt, verifyActionSignature as h, DocumentNotDeletedError as ht, fromErrorInfo as i, APPEND_CONDITION_FAILED_PREFIX as it, SettledWatermark as j, parsePagingOptions as jt, listPurged as k, ReactorEventTypes as kt, createForwardingPoolInstrumentation as l, OptimisticLockError as lt, SimpleJobExecutor as m, DocumentDeletedError as mt, errorToInfo as n, buildDecisionModel as nt, REACTOR_SCHEMA as o, DocumentAlreadyExistsError as ot, DocumentModelRegistry as p, AuthorizationDeniedError as pt, createDocumentFromAction as q, sanitizeArg as r, DriveCollectionId as rt, getMigrationStatus as s, DocumentExistence as st, createForwardingLogger as t, authDecisionModel as tt, instrumentPgPool as u, RevisionMismatchError as ut, DEFAULT_PURGE_DELETE_BATCH as v, ExcessiveReshuffleError as vt, KyselyOperationIndex as w, ReservedActionError as wt, resolveFeatureFlags as x, InvalidSignatureError as xt, KyselyDocumentPurger as y, GroupInUseError as yt, DEFAULT_MAX_PURGE_OPERATIONS as z };
7591
+ export { decideAtHead as $, ProbeSettler as A, ReactorEventTypes as At, JobExecutorEventTypes as B, KyselyWriteCache as C, PurgeTooLargeError as Ct, acquirePurgeLocks as D, UnsupportedStoredProtocolError as Dt, PURGE_NS as E, UnsupportedProtocolVersionError as Et, snapshotFunctionsFor as F, __exportAll as Ft, ModuleNotFoundError as G, DuplicateModuleError as H, DocumentMetaCache as I, createDocumentFromAction as J, GATED_DOCUMENT_ACTIONS as K, CollectionMembershipCache as L, createKyselyWatermarkProbe as M, parsePagingOptions as Mt, describeWaitingSessions as N, throwIfAborted as Nt, findPurged as O, UpgradePreconditionFailedError as Ot, parseSnapshot as P, yieldToMain as Pt, targetDocumentId as Q, DEFAULT_DEFERRED_JOB_TTL_MS as R, EventBus as S, InvalidSignatureError as St, PURGE_LOCK_BUCKETS as T, ReservedActionError as Tt, InvalidModuleError as U, DuplicateManifestError as V, ModelNotWorkerImportableError as W, submittedActionIds as X, createEmptyConsistencyToken as Y, summarizeSubmittedActions as Z, KyselyExecutionScope as _, DocumentNotFoundError as _t, DEFAULT_DRIVE_CONTAINER_TYPES as a, APPEND_CONDITION_FAILED_PREFIX as at, appliedDelete as b, GroupInUseError as bt, runMigrations as c, DocumentExistence as ct, KyselyOperationStore as d, RevisionMismatchError as dt, selectDecisionModel as et, KyselyKeyframeStore as f, AuthEnforcementDisabledError as ft, PassthroughSigner as g, DocumentNotDeletedError as gt, verifyActionSignature as h, DocumentDeletedError as ht, fromErrorInfo as i, DriveCollectionId as it, SettledWatermark as j, matchesScope as jt, listPurged as k, EventBusAggregateError as kt, createForwardingPoolInstrumentation as l, DuplicateOperationError as lt, SimpleJobExecutor as m, AuthorizationDeniedError as mt, errorToInfo as n, authDecisionModel as nt, REACTOR_SCHEMA as o, AppendConditionFailedError as ot, DocumentModelRegistry as p, AuthTimestampNotMonotonicError as pt, createConsistencyToken as q, sanitizeArg as r, buildDecisionModel as rt, getMigrationStatus as s, DocumentAlreadyExistsError as st, createForwardingLogger as t, documentDecisionModel as tt, instrumentPgPool as u, OptimisticLockError as ut, DEFAULT_PURGE_DELETE_BATCH as v, DocumentPurgedError as vt, KyselyOperationIndex as w, RelationshipNotFoundError as wt, resolveFeatureFlags as x, InvalidOperationTimestampError as xt, KyselyDocumentPurger as y, ExcessiveReshuffleError as yt, DEFAULT_MAX_PURGE_OPERATIONS as z };
7571
7592
 
7572
- //# sourceMappingURL=forwarding-logger-DMqDs9tE.js.map
7593
+ //# sourceMappingURL=forwarding-logger-BKDP4JnD.js.map