@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/{build-worker-executor-B9IfcRij.js → build-worker-executor-Bonu2jUB.js} +2 -2
- package/dist/{build-worker-executor-B9IfcRij.js.map → build-worker-executor-Bonu2jUB.js.map} +1 -1
- package/dist/{document-indexer-CZqIpdz2.js → document-indexer-B3yKal-y.js} +2 -2
- package/dist/{document-indexer-CZqIpdz2.js.map → document-indexer-B3yKal-y.js.map} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{forwarding-logger-DMqDs9tE.js → forwarding-logger-BKDP4JnD.js} +23 -2
- package/dist/forwarding-logger-BKDP4JnD.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -17
- package/dist/index.js.map +1 -1
- package/dist/projection-entry.js +3 -3
- package/dist/{projection-shard-manager-BSK-GEyP.js → projection-shard-manager-BZPCQK-4.js} +2 -2
- package/dist/{projection-shard-manager-BSK-GEyP.js.map → projection-shard-manager-BZPCQK-4.js.map} +1 -1
- package/dist/{worker-handle-D-19Jmpz.js → worker-handle-CefOwokd.js} +2 -2
- package/dist/{worker-handle-D-19Jmpz.js.map → worker-handle-CefOwokd.js.map} +1 -1
- package/package.json +4 -4
- package/dist/forwarding-logger-DMqDs9tE.js.map +0 -1
package/dist/entry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as errorToInfo, t as createForwardingLogger, u as instrumentPgPool } from "./forwarding-logger-
|
|
2
|
-
import { n as defaultLoadFactory, t as buildWorkerExecutor } from "./build-worker-executor-
|
|
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 {
|
|
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-
|
|
7593
|
+
//# sourceMappingURL=forwarding-logger-BKDP4JnD.js.map
|