@rocicorp/zero 0.23.2025090402 → 0.24.2025090402
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-Q2AQC47T.js → chunk-4NLQ25GZ.js} +2 -2
- package/out/{chunk-2IK4AWFW.js → chunk-P6JME3HC.js} +18 -27
- package/out/chunk-P6JME3HC.js.map +7 -0
- package/out/react.js +1 -1
- package/out/solid.js +2 -2
- package/out/zero/package.json +1 -1
- package/out/zero-cache/src/custom/fetch.d.ts +2 -1
- package/out/zero-cache/src/custom/fetch.d.ts.map +1 -1
- package/out/zero-cache/src/custom/fetch.js +8 -6
- package/out/zero-cache/src/custom/fetch.js.map +1 -1
- package/out/zero-cache/src/custom-queries/transform-query.d.ts +3 -2
- package/out/zero-cache/src/custom-queries/transform-query.d.ts.map +1 -1
- package/out/zero-cache/src/custom-queries/transform-query.js +6 -3
- package/out/zero-cache/src/custom-queries/transform-query.js.map +1 -1
- package/out/zero-cache/src/services/mutagen/pusher.d.ts +2 -3
- package/out/zero-cache/src/services/mutagen/pusher.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/pusher.js +25 -6
- package/out/zero-cache/src/services/mutagen/pusher.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +1 -0
- 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 +20 -3
- package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
- package/out/zero-cache/src/workers/syncer-ws-message-handler.js +1 -1
- package/out/zero-cache/src/workers/syncer-ws-message-handler.js.map +1 -1
- package/out/zero-client/src/client/options.d.ts +8 -12
- package/out/zero-client/src/client/options.d.ts.map +1 -1
- package/out/zero-client/src/client/zero.d.ts +1 -2
- package/out/zero-client/src/client/zero.d.ts.map +1 -1
- package/out/zero-protocol/src/connect.d.ts +4 -32
- package/out/zero-protocol/src/connect.d.ts.map +1 -1
- package/out/zero-protocol/src/connect.js +2 -17
- package/out/zero-protocol/src/connect.js.map +1 -1
- package/out/zero-protocol/src/up.d.ts +2 -8
- package/out/zero-protocol/src/up.d.ts.map +1 -1
- package/out/zero.js +2 -2
- package/package.json +1 -1
- package/out/chunk-2IK4AWFW.js.map +0 -7
- /package/out/{chunk-Q2AQC47T.js.map → chunk-4NLQ25GZ.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clientToServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-P6JME3HC.js";
|
|
4
4
|
import {
|
|
5
5
|
AbstractQuery,
|
|
6
6
|
ExpressionBuilder,
|
|
@@ -346,4 +346,4 @@ export {
|
|
|
346
346
|
withValidation,
|
|
347
347
|
createBuilder
|
|
348
348
|
};
|
|
349
|
-
//# sourceMappingURL=chunk-
|
|
349
|
+
//# sourceMappingURL=chunk-4NLQ25GZ.js.map
|
|
@@ -5982,29 +5982,14 @@ var connectedMessageSchema = valita_exports.tuple([
|
|
|
5982
5982
|
valita_exports.literal("connected"),
|
|
5983
5983
|
connectedBodySchema
|
|
5984
5984
|
]);
|
|
5985
|
-
var userQueryMutateParamsSchema = valita_exports.object({
|
|
5986
|
-
/**
|
|
5987
|
-
* A client driven URL to send queries or mutations to.
|
|
5988
|
-
* This URL must match one of the URLs set in the zero config.
|
|
5989
|
-
*
|
|
5990
|
-
* E.g., Given the following environment variable:
|
|
5991
|
-
* ZERO_GET_QUERIES_URL=[https://*.example.com/query]
|
|
5992
|
-
*
|
|
5993
|
-
* Then this URL could be:
|
|
5994
|
-
* https://myapp.example.com/query
|
|
5995
|
-
*/
|
|
5996
|
-
url: valita_exports.string().optional(),
|
|
5997
|
-
// The query string to use for query or mutation calls.
|
|
5998
|
-
queryParams: valita_exports.record(valita_exports.string()).optional()
|
|
5999
|
-
});
|
|
6000
5985
|
var initConnectionBodySchema = valita_exports.object({
|
|
6001
5986
|
desiredQueriesPatch: upQueriesPatchSchema,
|
|
6002
5987
|
clientSchema: clientSchemaSchema.optional(),
|
|
6003
5988
|
deleted: deleteClientsBodySchema.optional(),
|
|
6004
5989
|
// parameters to configure the mutate endpoint
|
|
6005
|
-
|
|
5990
|
+
userPushURL: valita_exports.string().optional(),
|
|
6006
5991
|
// parameters to configure the query endpoint
|
|
6007
|
-
|
|
5992
|
+
userQueryURL: valita_exports.string().optional(),
|
|
6008
5993
|
/**
|
|
6009
5994
|
* `activeClients` is an optional array of client IDs that are currently active
|
|
6010
5995
|
* in the client group. This is used to inform the server about the clients
|
|
@@ -8680,7 +8665,7 @@ function makeMessage(message, context, logLevel) {
|
|
|
8680
8665
|
}
|
|
8681
8666
|
|
|
8682
8667
|
// ../zero-client/src/client/version.ts
|
|
8683
|
-
var version2 = "0.
|
|
8668
|
+
var version2 = "0.24.2025090402";
|
|
8684
8669
|
|
|
8685
8670
|
// ../zero-client/src/client/log-options.ts
|
|
8686
8671
|
var LevelFilterLogSink = class {
|
|
@@ -10371,6 +10356,12 @@ var Zero = class _Zero {
|
|
|
10371
10356
|
this.#schema = schema;
|
|
10372
10357
|
const { clientSchema, hash } = clientSchemaFrom(schema);
|
|
10373
10358
|
this.#clientSchema = clientSchema;
|
|
10359
|
+
const nameKey = JSON.stringify({
|
|
10360
|
+
storageKey: this.storageKey,
|
|
10361
|
+
mutateUrl: options.mutateURL ?? "",
|
|
10362
|
+
queryUrl: options.getQueriesURL ?? ""
|
|
10363
|
+
});
|
|
10364
|
+
const hashedKey = h64(nameKey).toString(36);
|
|
10374
10365
|
const replicacheOptions = {
|
|
10375
10366
|
// The schema stored in IDB is dependent upon both the ClientSchema
|
|
10376
10367
|
// and the AST schema (i.e. PROTOCOL_VERSION).
|
|
@@ -10378,7 +10369,7 @@ var Zero = class _Zero {
|
|
|
10378
10369
|
logLevel: logOptions.logLevel,
|
|
10379
10370
|
logSinks: [logOptions.logSink],
|
|
10380
10371
|
mutators: replicacheMutators,
|
|
10381
|
-
name: `zero-${userID}-${
|
|
10372
|
+
name: `zero-${userID}-${hashedKey}`,
|
|
10382
10373
|
pusher: (req, reqID) => this.#pusher(req, reqID),
|
|
10383
10374
|
puller: (req, reqID) => this.#puller(req, reqID),
|
|
10384
10375
|
pushDelay: 0,
|
|
@@ -10895,8 +10886,8 @@ var Zero = class _Zero {
|
|
|
10895
10886
|
// The clientSchema only needs to be sent for the very first request.
|
|
10896
10887
|
// Henceforth it is stored with the CVR and verified automatically.
|
|
10897
10888
|
...this.#connectCookie === null ? { clientSchema } : {},
|
|
10898
|
-
|
|
10899
|
-
|
|
10889
|
+
userPushURL: this.#options.mutateURL,
|
|
10890
|
+
userQueryURL: this.#options.getQueriesURL
|
|
10900
10891
|
}
|
|
10901
10892
|
]);
|
|
10902
10893
|
this.#deletedClients = void 0;
|
|
@@ -10972,8 +10963,8 @@ var Zero = class _Zero {
|
|
|
10972
10963
|
wsid,
|
|
10973
10964
|
this.#options.logLevel === "debug",
|
|
10974
10965
|
lc,
|
|
10975
|
-
this.#options.
|
|
10976
|
-
this.#options.
|
|
10966
|
+
this.#options.mutateURL,
|
|
10967
|
+
this.#options.getQueriesURL,
|
|
10977
10968
|
this.#options.maxHeaderLength,
|
|
10978
10969
|
additionalConnectParams,
|
|
10979
10970
|
await this.#activeClientsManager
|
|
@@ -11488,7 +11479,7 @@ var OnlineManager = class extends Subscribable {
|
|
|
11488
11479
|
return this.#online;
|
|
11489
11480
|
}
|
|
11490
11481
|
};
|
|
11491
|
-
async function createSocket(rep, queryManager, deleteClientsManager, socketOrigin, baseCookie, clientID, clientGroupID, clientSchema, userID, auth, lmid, wsid, debugPerf, lc,
|
|
11482
|
+
async function createSocket(rep, queryManager, deleteClientsManager, socketOrigin, baseCookie, clientID, clientGroupID, clientSchema, userID, auth, lmid, wsid, debugPerf, lc, userPushURL, userQueryURL, maxHeaderLength = 1024 * 8, additionalConnectParams, activeClientsManager) {
|
|
11492
11483
|
const url = new URL(
|
|
11493
11484
|
appendPath(socketOrigin, `/sync/v${PROTOCOL_VERSION}/connect`)
|
|
11494
11485
|
);
|
|
@@ -11527,8 +11518,8 @@ async function createSocket(rep, queryManager, deleteClientsManager, socketOrigi
|
|
|
11527
11518
|
// The clientSchema only needs to be sent for the very first request.
|
|
11528
11519
|
// Henceforth it is stored with the CVR and verified automatically.
|
|
11529
11520
|
...baseCookie === null ? { clientSchema } : {},
|
|
11530
|
-
|
|
11531
|
-
|
|
11521
|
+
userPushURL,
|
|
11522
|
+
userQueryURL,
|
|
11532
11523
|
activeClients: [...activeClients]
|
|
11533
11524
|
}
|
|
11534
11525
|
],
|
|
@@ -11621,4 +11612,4 @@ export {
|
|
|
11621
11612
|
update_needed_reason_type_enum_exports,
|
|
11622
11613
|
Zero
|
|
11623
11614
|
};
|
|
11624
|
-
//# sourceMappingURL=chunk-
|
|
11615
|
+
//# sourceMappingURL=chunk-P6JME3HC.js.map
|