@rocicorp/zero 0.19.2025050200 → 0.19.2025050201
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/out/{chunk-O6HWBJKG.js → chunk-54ZZCBOP.js} +2 -2
- package/out/{chunk-CS2KC2W3.js → chunk-KOXC55U7.js} +4 -3
- package/out/chunk-KOXC55U7.js.map +7 -0
- package/out/{chunk-ZJUS7BHH.js → chunk-SNYLPVLH.js} +18 -85
- package/out/{chunk-ZJUS7BHH.js.map → chunk-SNYLPVLH.js.map} +4 -4
- package/out/{inspector-2LQODK6W.js → inspector-Z55GQ5JV.js} +3 -3
- package/out/react.js +1 -1
- package/out/solid.js +3 -3
- package/out/zero-cache/src/config/zero-config.d.ts +4 -8
- package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
- package/out/zero-cache/src/config/zero-config.js +10 -16
- package/out/zero-cache/src/config/zero-config.js.map +1 -1
- package/out/zero-cache/src/server/runner/config.d.ts +4 -8
- package/out/zero-cache/src/server/runner/config.d.ts.map +1 -1
- package/out/zero-cache/src/server/runner/run-worker.js +2 -2
- package/out/zero-cache/src/server/runner/run-worker.js.map +1 -1
- package/out/zero-client/src/client/metrics.d.ts.map +1 -1
- package/out/zero-client/src/client/mutation-tracker.d.ts.map +1 -1
- package/out/zero-client/src/client/on-error.d.ts +12 -6
- package/out/zero-client/src/client/on-error.d.ts.map +1 -1
- package/out/zero-client/src/client/options.d.ts +3 -7
- package/out/zero-client/src/client/options.d.ts.map +1 -1
- package/out/zero-client/src/client/reload-error-handler.d.ts.map +1 -1
- package/out/zero-client/src/client/zero-log-context.d.ts +1 -1
- package/out/zero-client/src/client/zero-poke-handler.d.ts.map +1 -1
- package/out/zero-client/src/client/zero.d.ts.map +1 -1
- package/out/zero-client/src/mod.d.ts +0 -1
- package/out/zero-client/src/mod.d.ts.map +1 -1
- package/out/zero.js +3 -5
- package/out/zql/src/query/assert-no-not-exists.d.ts.map +1 -1
- package/out/zql/src/query/assert-no-not-exists.js +1 -1
- package/out/zql/src/query/assert-no-not-exists.js.map +1 -1
- package/out/zql/src/query/query-impl.d.ts +0 -1
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js +0 -1
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/package.json +1 -1
- package/out/chunk-CS2KC2W3.js.map +0 -7
- package/out/zero-client/src/client/on-error-kind-enum.d.ts +0 -17
- package/out/zero-client/src/client/on-error-kind-enum.d.ts.map +0 -1
- package/out/zero-client/src/client/on-error-kind.d.ts +0 -5
- package/out/zero-client/src/client/on-error-kind.d.ts.map +0 -1
- /package/out/{chunk-O6HWBJKG.js.map → chunk-54ZZCBOP.js.map} +0 -0
- /package/out/{inspector-2LQODK6W.js.map → inspector-Z55GQ5JV.js.map} +0 -0
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
withRead,
|
|
85
85
|
withWrite,
|
|
86
86
|
withWriteNoImplicitCommit
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-54ZZCBOP.js";
|
|
88
88
|
import {
|
|
89
89
|
AbstractQuery,
|
|
90
90
|
ExpressionBuilder,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
transformFilters,
|
|
121
121
|
valita_exports,
|
|
122
122
|
wrapIterable
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-KOXC55U7.js";
|
|
124
124
|
import {
|
|
125
125
|
__export,
|
|
126
126
|
assert,
|
|
@@ -6127,36 +6127,6 @@ function escapeLike(val) {
|
|
|
6127
6127
|
return val.replace(/[%_]/g, "\\$&");
|
|
6128
6128
|
}
|
|
6129
6129
|
|
|
6130
|
-
// ../zero-client/src/client/on-error-kind-enum.ts
|
|
6131
|
-
var on_error_kind_enum_exports = {};
|
|
6132
|
-
__export(on_error_kind_enum_exports, {
|
|
6133
|
-
AuthInvalidated: () => AuthInvalidated,
|
|
6134
|
-
ClientNotFound: () => ClientNotFound,
|
|
6135
|
-
Internal: () => Internal,
|
|
6136
|
-
InvalidConnectionRequest: () => InvalidConnectionRequest,
|
|
6137
|
-
InvalidConnectionRequestBaseCookie: () => InvalidConnectionRequestBaseCookie,
|
|
6138
|
-
InvalidConnectionRequestClientDeleted: () => InvalidConnectionRequestClientDeleted,
|
|
6139
|
-
InvalidConnectionRequestLastMutationID: () => InvalidConnectionRequestLastMutationID,
|
|
6140
|
-
InvalidMessage: () => InvalidMessage,
|
|
6141
|
-
InvalidPush: () => InvalidPush,
|
|
6142
|
-
InvalidState: () => InvalidState,
|
|
6143
|
-
Metrics: () => Metrics,
|
|
6144
|
-
Mutation: () => Mutation,
|
|
6145
|
-
MutationFailed: () => MutationFailed,
|
|
6146
|
-
MutationRateLimited: () => MutationRateLimited,
|
|
6147
|
-
Network: () => Network,
|
|
6148
|
-
NewClientGroup: () => NewClientGroup,
|
|
6149
|
-
Poke: () => Poke,
|
|
6150
|
-
Push: () => Push,
|
|
6151
|
-
Rebalance: () => Rebalance,
|
|
6152
|
-
Rehome: () => Rehome,
|
|
6153
|
-
SchemaVersionNotSupported: () => SchemaVersionNotSupported2,
|
|
6154
|
-
ServerOverloaded: () => ServerOverloaded,
|
|
6155
|
-
Unauthorized: () => Unauthorized,
|
|
6156
|
-
Unknown: () => Unknown,
|
|
6157
|
-
VersionNotSupported: () => VersionNotSupported2
|
|
6158
|
-
});
|
|
6159
|
-
|
|
6160
6130
|
// ../zero-client/src/client/update-needed-reason-type-enum.ts
|
|
6161
6131
|
var update_needed_reason_type_enum_exports = {};
|
|
6162
6132
|
__export(update_needed_reason_type_enum_exports, {
|
|
@@ -6168,15 +6138,6 @@ var NewClientGroup = "NewClientGroup";
|
|
|
6168
6138
|
var VersionNotSupported2 = "VersionNotSupported";
|
|
6169
6139
|
var SchemaVersionNotSupported2 = "SchemaVersionNotSupported";
|
|
6170
6140
|
|
|
6171
|
-
// ../zero-client/src/client/on-error-kind-enum.ts
|
|
6172
|
-
var Poke = "Poke";
|
|
6173
|
-
var Mutation = "Mutation";
|
|
6174
|
-
var Push = "Push";
|
|
6175
|
-
var Metrics = "Metrics";
|
|
6176
|
-
var Unknown = "Unknown";
|
|
6177
|
-
var InvalidState = "InvalidState";
|
|
6178
|
-
var Network = "Network";
|
|
6179
|
-
|
|
6180
6141
|
// ../zero-client/src/client/zero.ts
|
|
6181
6142
|
import "@rocicorp/logger";
|
|
6182
6143
|
import { resolver as resolver8 } from "@rocicorp/resolver";
|
|
@@ -8502,7 +8463,7 @@ function makeMessage(message, context, logLevel) {
|
|
|
8502
8463
|
}
|
|
8503
8464
|
|
|
8504
8465
|
// ../zero-client/src/client/version.ts
|
|
8505
|
-
var version2 = "0.19.
|
|
8466
|
+
var version2 = "0.19.2025050201";
|
|
8506
8467
|
|
|
8507
8468
|
// ../zero-client/src/client/log-options.ts
|
|
8508
8469
|
var LevelFilterLogSink = class {
|
|
@@ -8699,10 +8660,7 @@ var MetricManager = class {
|
|
|
8699
8660
|
async flush() {
|
|
8700
8661
|
const lc = this.#lc;
|
|
8701
8662
|
if (this.#timerID === null) {
|
|
8702
|
-
lc.error?.(
|
|
8703
|
-
on_error_kind_enum_exports.InvalidState,
|
|
8704
|
-
"MetricManager.flush() called but already stopped"
|
|
8705
|
-
);
|
|
8663
|
+
lc.error?.("MetricManager.flush() called but already stopped");
|
|
8706
8664
|
return;
|
|
8707
8665
|
}
|
|
8708
8666
|
const allSeries = [];
|
|
@@ -8723,15 +8681,12 @@ var MetricManager = class {
|
|
|
8723
8681
|
try {
|
|
8724
8682
|
await this.#reporter(allSeries);
|
|
8725
8683
|
} catch (e) {
|
|
8726
|
-
lc?.error?.(
|
|
8684
|
+
lc?.error?.("Error reporting metrics", e);
|
|
8727
8685
|
}
|
|
8728
8686
|
}
|
|
8729
8687
|
stop() {
|
|
8730
8688
|
if (this.#timerID === null) {
|
|
8731
|
-
this.#lc.error?.(
|
|
8732
|
-
on_error_kind_enum_exports.InvalidState,
|
|
8733
|
-
"MetricManager.stop() called but already stopped"
|
|
8734
|
-
);
|
|
8689
|
+
this.#lc.error?.("MetricManager.stop() called but already stopped");
|
|
8735
8690
|
return;
|
|
8736
8691
|
}
|
|
8737
8692
|
clearInterval(this.#timerID);
|
|
@@ -8859,7 +8814,6 @@ var MutationTracker = class {
|
|
|
8859
8814
|
processPushResponse(response) {
|
|
8860
8815
|
if ("error" in response) {
|
|
8861
8816
|
this.#lc.error?.(
|
|
8862
|
-
on_error_kind_enum_exports.Push,
|
|
8863
8817
|
"Received an error response when pushing mutations",
|
|
8864
8818
|
response
|
|
8865
8819
|
);
|
|
@@ -8930,11 +8884,7 @@ var MutationTracker = class {
|
|
|
8930
8884
|
mid.clientID === this.#clientID,
|
|
8931
8885
|
"received mutation for the wrong client"
|
|
8932
8886
|
);
|
|
8933
|
-
this.#lc.error?.(
|
|
8934
|
-
on_error_kind_enum_exports.Mutation,
|
|
8935
|
-
`Mutation ${mid.id} returned an error`,
|
|
8936
|
-
error
|
|
8937
|
-
);
|
|
8887
|
+
this.#lc.error?.(`Mutation ${mid.id} returned an error`, error);
|
|
8938
8888
|
const ephemeralID = this.#ephemeralIDsByMutationID.get(mid.id);
|
|
8939
8889
|
if (!ephemeralID && error.error === "alreadyProcessed") {
|
|
8940
8890
|
return;
|
|
@@ -9247,7 +9197,7 @@ function reportReloadReason(lc) {
|
|
|
9247
9197
|
const [reasonType, message] = parse(parsed, reloadReasonSchema);
|
|
9248
9198
|
lc.error?.(reasonType, "Zero reloaded the page.", message);
|
|
9249
9199
|
} catch (e) {
|
|
9250
|
-
lc.error?.(
|
|
9200
|
+
lc.error?.("Zero reloaded the page.", e);
|
|
9251
9201
|
return;
|
|
9252
9202
|
}
|
|
9253
9203
|
}
|
|
@@ -9517,11 +9467,7 @@ var PokeHandler = class {
|
|
|
9517
9467
|
if (String(e).includes("unexpected base cookie for poke")) {
|
|
9518
9468
|
this.#lc.debug?.("clearing due to", e);
|
|
9519
9469
|
} else {
|
|
9520
|
-
this.#lc.error?.(
|
|
9521
|
-
on_error_kind_enum_exports.Poke,
|
|
9522
|
-
"clearing due to unexpected poke error",
|
|
9523
|
-
e
|
|
9524
|
-
);
|
|
9470
|
+
this.#lc.error?.("clearing due to unexpected poke error", e);
|
|
9525
9471
|
}
|
|
9526
9472
|
this.#clear();
|
|
9527
9473
|
this.#onPokeError();
|
|
@@ -10318,10 +10264,7 @@ var Zero = class {
|
|
|
10318
10264
|
#onOpen = () => {
|
|
10319
10265
|
const l = addWebSocketIDFromSocketToLogContext(this.#socket, this.#lc);
|
|
10320
10266
|
if (this.#connectStart === void 0) {
|
|
10321
|
-
l.error?.(
|
|
10322
|
-
on_error_kind_enum_exports.InvalidState,
|
|
10323
|
-
"Got open event but connect start time is undefined."
|
|
10324
|
-
);
|
|
10267
|
+
l.error?.("Got open event but connect start time is undefined.");
|
|
10325
10268
|
} else {
|
|
10326
10269
|
const now = Date.now();
|
|
10327
10270
|
const timeToOpenMs = now - this.#connectStart;
|
|
@@ -10337,7 +10280,7 @@ var Zero = class {
|
|
|
10337
10280
|
if (code <= 1001) {
|
|
10338
10281
|
lc.info?.("Got socket close event", { code, reason, wasClean });
|
|
10339
10282
|
} else {
|
|
10340
|
-
lc.error?.(
|
|
10283
|
+
lc.error?.("Got unexpected socket close event", {
|
|
10341
10284
|
code,
|
|
10342
10285
|
reason,
|
|
10343
10286
|
wasClean
|
|
@@ -10391,10 +10334,7 @@ var Zero = class {
|
|
|
10391
10334
|
let timeToConnectMs;
|
|
10392
10335
|
let connectMsgLatencyMs;
|
|
10393
10336
|
if (this.#connectStart === void 0) {
|
|
10394
|
-
lc.error?.(
|
|
10395
|
-
on_error_kind_enum_exports.InvalidState,
|
|
10396
|
-
"Got connected message but connect start time is undefined."
|
|
10397
|
-
);
|
|
10337
|
+
lc.error?.("Got connected message but connect start time is undefined.");
|
|
10398
10338
|
} else {
|
|
10399
10339
|
timeToConnectMs = now - this.#connectStart;
|
|
10400
10340
|
this.#metrics.timeToConnectMs.set(timeToConnectMs);
|
|
@@ -10404,7 +10344,6 @@ var Zero = class {
|
|
|
10404
10344
|
let totalTimeToConnectMs;
|
|
10405
10345
|
if (this.#totalToConnectStart === void 0) {
|
|
10406
10346
|
lc.error?.(
|
|
10407
|
-
on_error_kind_enum_exports.InvalidState,
|
|
10408
10347
|
"Got connected message but total to connect start time is undefined."
|
|
10409
10348
|
);
|
|
10410
10349
|
} else {
|
|
@@ -10577,7 +10516,6 @@ var Zero = class {
|
|
|
10577
10516
|
case Connected: {
|
|
10578
10517
|
if (this.#connectStart !== void 0) {
|
|
10579
10518
|
lc.error?.(
|
|
10580
|
-
on_error_kind_enum_exports.InvalidState,
|
|
10581
10519
|
"disconnect() called while connected but connect start time is defined."
|
|
10582
10520
|
);
|
|
10583
10521
|
}
|
|
@@ -10594,17 +10532,13 @@ var Zero = class {
|
|
|
10594
10532
|
}
|
|
10595
10533
|
if (this.#connectStart === void 0) {
|
|
10596
10534
|
lc.error?.(
|
|
10597
|
-
on_error_kind_enum_exports.InvalidState,
|
|
10598
10535
|
"disconnect() called while connecting but connect start time is undefined."
|
|
10599
10536
|
);
|
|
10600
10537
|
}
|
|
10601
10538
|
break;
|
|
10602
10539
|
}
|
|
10603
10540
|
case Disconnected:
|
|
10604
|
-
lc.error?.(
|
|
10605
|
-
on_error_kind_enum_exports.InvalidState,
|
|
10606
|
-
"disconnect() called while disconnected"
|
|
10607
|
-
);
|
|
10541
|
+
lc.error?.("disconnect() called while disconnected");
|
|
10608
10542
|
break;
|
|
10609
10543
|
}
|
|
10610
10544
|
this.#socketResolver = resolver8();
|
|
@@ -10786,7 +10720,7 @@ var Zero = class {
|
|
|
10786
10720
|
break;
|
|
10787
10721
|
}
|
|
10788
10722
|
case Connecting:
|
|
10789
|
-
lc.error?.(
|
|
10723
|
+
lc.error?.("unreachable");
|
|
10790
10724
|
gotError = true;
|
|
10791
10725
|
break;
|
|
10792
10726
|
case Connected: {
|
|
@@ -10834,8 +10768,8 @@ var Zero = class {
|
|
|
10834
10768
|
} catch (ex) {
|
|
10835
10769
|
if (this.#connectionState !== Connected) {
|
|
10836
10770
|
const level = isAuthError(ex) ? "warn" : "error";
|
|
10837
|
-
const kind = isServerError(ex) ? ex.kind :
|
|
10838
|
-
lc[level]?.(
|
|
10771
|
+
const kind = isServerError(ex) ? ex.kind : "Unknown Error";
|
|
10772
|
+
lc[level]?.("Failed to connect", ex, kind, {
|
|
10839
10773
|
lmid: this.#lastMutationIDReceived,
|
|
10840
10774
|
baseCookie: this.#connectCookie
|
|
10841
10775
|
});
|
|
@@ -11010,7 +10944,7 @@ var Zero = class {
|
|
|
11010
10944
|
*/
|
|
11011
10945
|
async inspect() {
|
|
11012
10946
|
BUNDLE_SIZE: {
|
|
11013
|
-
const m = await import("./inspector-
|
|
10947
|
+
const m = await import("./inspector-Z55GQ5JV.js");
|
|
11014
10948
|
return m.newInspector(this.#rep, this.#schema, async () => {
|
|
11015
10949
|
await this.#connectResolver.promise;
|
|
11016
10950
|
return this.#socket;
|
|
@@ -11135,7 +11069,6 @@ export {
|
|
|
11135
11069
|
definePermissions,
|
|
11136
11070
|
escapeLike,
|
|
11137
11071
|
update_needed_reason_type_enum_exports,
|
|
11138
|
-
on_error_kind_enum_exports,
|
|
11139
11072
|
Zero
|
|
11140
11073
|
};
|
|
11141
|
-
//# sourceMappingURL=chunk-
|
|
11074
|
+
//# sourceMappingURL=chunk-SNYLPVLH.js.map
|