@rocicorp/zero 0.19.2025041201 → 0.19.2025041402
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-XXFMSZJU.js → chunk-JYQA7DID.js} +2 -2
- package/out/{chunk-WXO6HY3X.js → chunk-KD57S54B.js} +1 -1
- package/out/{chunk-WXO6HY3X.js.map → chunk-KD57S54B.js.map} +2 -2
- package/out/{chunk-UYUOQPYD.js → chunk-QONNL5HY.js} +23 -17
- package/out/{chunk-UYUOQPYD.js.map → chunk-QONNL5HY.js.map} +2 -2
- package/out/{inspector-KHFMOHCD.js → inspector-2LIZBIYB.js} +3 -3
- package/out/react.js +1 -1
- package/out/solid.js +3 -3
- package/out/z2s/src/compiler.d.ts +14 -3
- package/out/z2s/src/compiler.d.ts.map +1 -1
- package/out/z2s/src/compiler.js +34 -23
- package/out/z2s/src/compiler.js.map +1 -1
- package/out/zero-cache/src/server/main.js +1 -1
- package/out/zero-cache/src/server/main.js.map +1 -1
- package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
- package/out/zero-cache/src/server/syncer.js +1 -3
- package/out/zero-cache/src/server/syncer.js.map +1 -1
- package/out/zero-cache/src/services/mutagen/pusher.d.ts +256 -14
- package/out/zero-cache/src/services/mutagen/pusher.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/pusher.js +105 -50
- package/out/zero-cache/src/services/mutagen/pusher.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.js +2 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +6 -2
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.js +5 -9
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.js +3 -6
- package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
- package/out/zero-cache/src/workers/connection.d.ts +3 -2
- package/out/zero-cache/src/workers/connection.d.ts.map +1 -1
- package/out/zero-cache/src/workers/connection.js +6 -2
- package/out/zero-cache/src/workers/connection.js.map +1 -1
- package/out/zero-cache/src/workers/syncer-ws-message-handler.d.ts +2 -2
- package/out/zero-cache/src/workers/syncer-ws-message-handler.d.ts.map +1 -1
- package/out/zero-cache/src/workers/syncer-ws-message-handler.js +39 -20
- package/out/zero-cache/src/workers/syncer-ws-message-handler.js.map +1 -1
- package/out/zero-cache/src/workers/syncer.d.ts +1 -1
- package/out/zero-cache/src/workers/syncer.d.ts.map +1 -1
- package/out/zero-cache/src/workers/syncer.js +2 -4
- package/out/zero-cache/src/workers/syncer.js.map +1 -1
- package/out/zero-client/src/client/mutation-tracker.d.ts +4 -0
- package/out/zero-client/src/client/mutation-tracker.d.ts.map +1 -1
- package/out/zero-client/src/client/options.d.ts +17 -1
- package/out/zero-client/src/client/options.d.ts.map +1 -1
- package/out/zero-client/src/client/zero.d.ts +1 -1
- package/out/zero-client/src/client/zero.d.ts.map +1 -1
- package/out/zero-pg/src/web.js +1 -1
- package/out/zero-pg/src/web.js.map +1 -1
- package/out/zero-protocol/src/connect.d.ts +10 -0
- package/out/zero-protocol/src/connect.d.ts.map +1 -1
- package/out/zero-protocol/src/connect.js +4 -0
- package/out/zero-protocol/src/connect.js.map +1 -1
- package/out/zero-protocol/src/protocol-version.d.ts +1 -1
- package/out/zero-protocol/src/protocol-version.d.ts.map +1 -1
- package/out/zero-protocol/src/protocol-version.js +2 -1
- package/out/zero-protocol/src/protocol-version.js.map +1 -1
- package/out/zero-protocol/src/up.d.ts +3 -0
- package/out/zero-protocol/src/up.d.ts.map +1 -1
- package/out/zero.js +3 -3
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/package.json +1 -1
- /package/out/{chunk-XXFMSZJU.js.map → chunk-JYQA7DID.js.map} +0 -0
- /package/out/{inspector-KHFMOHCD.js.map → inspector-2LIZBIYB.js.map} +0 -0
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
withRead,
|
|
85
85
|
withWrite,
|
|
86
86
|
withWriteNoImplicitCommit
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-JYQA7DID.js";
|
|
88
88
|
import {
|
|
89
89
|
AbstractQuery,
|
|
90
90
|
ExpressionBuilder,
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
transformFilters,
|
|
120
120
|
valita_exports,
|
|
121
121
|
wrapIterable
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-KD57S54B.js";
|
|
123
123
|
import {
|
|
124
124
|
assert,
|
|
125
125
|
assertArray,
|
|
@@ -6126,10 +6126,14 @@ var connectedMessageSchema = valita_exports.tuple([
|
|
|
6126
6126
|
valita_exports.literal("connected"),
|
|
6127
6127
|
connectedBodySchema
|
|
6128
6128
|
]);
|
|
6129
|
+
var userPushParamsSchema = valita_exports.object({
|
|
6130
|
+
url: valita_exports.string().optional()
|
|
6131
|
+
});
|
|
6129
6132
|
var initConnectionBodySchema = valita_exports.object({
|
|
6130
6133
|
desiredQueriesPatch: queriesPatchSchema,
|
|
6131
6134
|
clientSchema: clientSchemaSchema.optional(),
|
|
6132
|
-
deleted: deleteClientsBodySchema.optional()
|
|
6135
|
+
deleted: deleteClientsBodySchema.optional(),
|
|
6136
|
+
userPushParams: userPushParamsSchema.optional()
|
|
6133
6137
|
});
|
|
6134
6138
|
var initConnectionMessageSchema = valita_exports.tuple([
|
|
6135
6139
|
valita_exports.literal("initConnection"),
|
|
@@ -6485,7 +6489,7 @@ var downstreamSchema = valita_exports.union(
|
|
|
6485
6489
|
);
|
|
6486
6490
|
|
|
6487
6491
|
// ../zero-protocol/src/protocol-version.ts
|
|
6488
|
-
var PROTOCOL_VERSION =
|
|
6492
|
+
var PROTOCOL_VERSION = 15;
|
|
6489
6493
|
var MIN_SERVER_SUPPORTED_SYNC_PROTOCOL = 6;
|
|
6490
6494
|
assert(MIN_SERVER_SUPPORTED_SYNC_PROTOCOL < PROTOCOL_VERSION);
|
|
6491
6495
|
|
|
@@ -8411,7 +8415,7 @@ function makeMessage(message, context, logLevel) {
|
|
|
8411
8415
|
}
|
|
8412
8416
|
|
|
8413
8417
|
// ../zero-client/src/client/version.ts
|
|
8414
|
-
var version2 = "0.19.
|
|
8418
|
+
var version2 = "0.19.2025041402";
|
|
8415
8419
|
|
|
8416
8420
|
// ../zero-client/src/client/log-options.ts
|
|
8417
8421
|
var LevelFilterLogSink = class {
|
|
@@ -8749,13 +8753,14 @@ var MutationTracker = class {
|
|
|
8749
8753
|
this.#ephemeralIDsByMutationID.set(mutationID, id);
|
|
8750
8754
|
}
|
|
8751
8755
|
}
|
|
8756
|
+
/**
|
|
8757
|
+
* Reject the mutation due to an unhandled exception on the client.
|
|
8758
|
+
* The mutation must not have been persisted to the client store.
|
|
8759
|
+
*/
|
|
8752
8760
|
rejectMutation(id, e) {
|
|
8753
8761
|
const entry = this.#outstandingMutations.get(id);
|
|
8754
8762
|
if (entry) {
|
|
8755
|
-
this.#settleMutation(id, entry, "reject",
|
|
8756
|
-
error: "app",
|
|
8757
|
-
details: e instanceof Error ? e.message : String(e)
|
|
8758
|
-
});
|
|
8763
|
+
this.#settleMutation(id, entry, "reject", e);
|
|
8759
8764
|
}
|
|
8760
8765
|
}
|
|
8761
8766
|
processPushResponse(response) {
|
|
@@ -8839,7 +8844,7 @@ var MutationTracker = class {
|
|
|
8839
8844
|
);
|
|
8840
8845
|
const entry = this.#outstandingMutations.get(ephemeralID);
|
|
8841
8846
|
assert(entry && entry.mutationID === mid.id);
|
|
8842
|
-
this.#settleMutation(ephemeralID, entry, "
|
|
8847
|
+
this.#settleMutation(ephemeralID, entry, "resolve", error);
|
|
8843
8848
|
}
|
|
8844
8849
|
#processMutationOk(result, mid) {
|
|
8845
8850
|
assert(
|
|
@@ -8858,11 +8863,9 @@ var MutationTracker = class {
|
|
|
8858
8863
|
#settleMutation(ephemeralID, entry, type, result) {
|
|
8859
8864
|
switch (type) {
|
|
8860
8865
|
case "resolve":
|
|
8861
|
-
assert(!("error" in result));
|
|
8862
8866
|
entry.resolver.resolve(result);
|
|
8863
8867
|
break;
|
|
8864
8868
|
case "reject":
|
|
8865
|
-
assert("error" in result);
|
|
8866
8869
|
entry.resolver.reject(result);
|
|
8867
8870
|
break;
|
|
8868
8871
|
}
|
|
@@ -10289,7 +10292,8 @@ var Zero = class {
|
|
|
10289
10292
|
deleted: skipEmptyDeletedClients(this.#deletedClients),
|
|
10290
10293
|
// The clientSchema only needs to be sent for the very first request.
|
|
10291
10294
|
// Henceforth it is stored with the CVR and verified automatically.
|
|
10292
|
-
...this.#connectCookie === null ? { clientSchema } : {}
|
|
10295
|
+
...this.#connectCookie === null ? { clientSchema } : {},
|
|
10296
|
+
userPushParams: this.#options.pushURL ? { url: this.#options.pushURL } : void 0
|
|
10293
10297
|
}
|
|
10294
10298
|
]);
|
|
10295
10299
|
this.#deletedClients = void 0;
|
|
@@ -10364,6 +10368,7 @@ var Zero = class {
|
|
|
10364
10368
|
wsid,
|
|
10365
10369
|
this.#options.logLevel === "debug",
|
|
10366
10370
|
l,
|
|
10371
|
+
this.#options.pushURL,
|
|
10367
10372
|
this.#options.maxHeaderLength,
|
|
10368
10373
|
additionalConnectParams
|
|
10369
10374
|
);
|
|
@@ -10841,12 +10846,12 @@ var Zero = class {
|
|
|
10841
10846
|
*/
|
|
10842
10847
|
async inspect() {
|
|
10843
10848
|
BUNDLE_SIZE: {
|
|
10844
|
-
const m = await import("./inspector-
|
|
10849
|
+
const m = await import("./inspector-2LIZBIYB.js");
|
|
10845
10850
|
return m.newInspector(this.#rep, this.#schema, () => this.#socket);
|
|
10846
10851
|
}
|
|
10847
10852
|
}
|
|
10848
10853
|
};
|
|
10849
|
-
async function createSocket(rep, queryManager, deleteClientsManager, socketOrigin, baseCookie, clientID, clientGroupID, clientSchema, userID, auth, lmid, wsid, debugPerf, lc, maxHeaderLength = 1024 * 8, additionalConnectParams) {
|
|
10854
|
+
async function createSocket(rep, queryManager, deleteClientsManager, socketOrigin, baseCookie, clientID, clientGroupID, clientSchema, userID, auth, lmid, wsid, debugPerf, lc, pushURL, maxHeaderLength = 1024 * 8, additionalConnectParams) {
|
|
10850
10855
|
const url = new URL(
|
|
10851
10856
|
appendPath(socketOrigin, `/sync/v${PROTOCOL_VERSION}/connect`)
|
|
10852
10857
|
);
|
|
@@ -10883,7 +10888,8 @@ async function createSocket(rep, queryManager, deleteClientsManager, socketOrigi
|
|
|
10883
10888
|
deleted: skipEmptyDeletedClients(deletedClients),
|
|
10884
10889
|
// The clientSchema only needs to be sent for the very first request.
|
|
10885
10890
|
// Henceforth it is stored with the CVR and verified automatically.
|
|
10886
|
-
...baseCookie === null ? { clientSchema } : {}
|
|
10891
|
+
...baseCookie === null ? { clientSchema } : {},
|
|
10892
|
+
userPushParams: pushURL ? { url: pushURL } : void 0
|
|
10887
10893
|
}
|
|
10888
10894
|
],
|
|
10889
10895
|
auth
|
|
@@ -10960,4 +10966,4 @@ export {
|
|
|
10960
10966
|
escapeLike,
|
|
10961
10967
|
Zero
|
|
10962
10968
|
};
|
|
10963
|
-
//# sourceMappingURL=chunk-
|
|
10969
|
+
//# sourceMappingURL=chunk-QONNL5HY.js.map
|