@xyo-network/event-kit-node 2.2.0 → 2.2.1
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/node/index.mjs +4 -4
- package/dist/node/index.mjs.map +2 -2
- package/dist/node/runtime.mjs +2 -2
- package/dist/node/runtime.mjs.map +2 -2
- package/package.json +24 -24
package/dist/node/index.mjs
CHANGED
|
@@ -520,7 +520,7 @@ function validateQueueState(row) {
|
|
|
520
520
|
if (row.body !== null || row.lease_token !== null || row.terminal_operation !== "ack" || row.terminal_token === null || !/^[0-9a-f]{32}$/u.test(row.terminal_token)) throw new Error("Invalid persisted completion state");
|
|
521
521
|
return;
|
|
522
522
|
}
|
|
523
|
-
if (typeof row.body !== "string") throw new
|
|
523
|
+
if (typeof row.body !== "string") throw new TypeError("Active receiver work has no bounded body");
|
|
524
524
|
if (row.state === "pending" && row.lease_token === null) return;
|
|
525
525
|
if (row.state === "inflight" && row.lease_token !== null && /^[0-9a-f]{32}$/u.test(row.lease_token)) return;
|
|
526
526
|
throw new Error("Invalid persisted lease state");
|
|
@@ -709,7 +709,7 @@ function openReceiverAuthority(path) {
|
|
|
709
709
|
for (; ; ) {
|
|
710
710
|
const row = pending.get();
|
|
711
711
|
if (row === void 0) return void 0;
|
|
712
|
-
if (typeof row.body !== "string") throw new
|
|
712
|
+
if (typeof row.body !== "string") throw new TypeError("Pending receiver work has no body");
|
|
713
713
|
const wake = await parseAdmittedWake(JSON.parse(row.body));
|
|
714
714
|
validateAssociation(row, wake);
|
|
715
715
|
await validate?.(row);
|
|
@@ -3259,7 +3259,7 @@ function createBoundedPublisherFetch(options = {}) {
|
|
|
3259
3259
|
if (chunk.done)
|
|
3260
3260
|
break;
|
|
3261
3261
|
const bytes = chunk.value;
|
|
3262
|
-
if (!(bytes instanceof Uint8Array)) throw new
|
|
3262
|
+
if (!(bytes instanceof Uint8Array)) throw new TypeError("Publisher HTTP body returned a non-byte chunk");
|
|
3263
3263
|
size += bytes.byteLength;
|
|
3264
3264
|
if (size > maximum) {
|
|
3265
3265
|
await reader.cancel();
|
|
@@ -4696,7 +4696,7 @@ async function openSqlitePublisherState(options) {
|
|
|
4696
4696
|
try {
|
|
4697
4697
|
const result = work();
|
|
4698
4698
|
if (result instanceof Promise)
|
|
4699
|
-
throw new
|
|
4699
|
+
throw new TypeError("Publisher state transactions must be synchronous");
|
|
4700
4700
|
database.exec("COMMIT");
|
|
4701
4701
|
return result;
|
|
4702
4702
|
} catch (error) {
|