@rocicorp/zero 0.20.2025050500 → 0.20.2025050600
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/analyze-query/src/bin-analyze.js +10 -3
- package/out/analyze-query/src/bin-analyze.js.map +1 -1
- package/out/{chunk-KOXC55U7.js → chunk-EBZYAQDK.js} +14 -5
- package/out/chunk-EBZYAQDK.js.map +7 -0
- package/out/{chunk-54ZZCBOP.js → chunk-N44AEZOH.js} +2 -2
- package/out/{chunk-XU2TYSET.js → chunk-VA2YVVTK.js} +58 -9
- package/out/{chunk-XU2TYSET.js.map → chunk-VA2YVVTK.js.map} +2 -2
- package/out/{inspector-Z55GQ5JV.js → inspector-GCX7QH7K.js} +3 -3
- package/out/react.js +1 -1
- package/out/solid.js +3 -3
- package/out/z2s/src/compiler.d.ts.map +1 -1
- package/out/z2s/src/compiler.js +5 -1
- package/out/z2s/src/compiler.js.map +1 -1
- package/out/zero-cache/src/config/network.d.ts +5 -0
- package/out/zero-cache/src/config/network.d.ts.map +1 -0
- package/out/zero-cache/src/config/network.js +47 -0
- package/out/zero-cache/src/config/network.js.map +1 -0
- package/out/zero-cache/src/config/normalize.d.ts +29 -0
- package/out/zero-cache/src/config/normalize.d.ts.map +1 -0
- package/out/zero-cache/src/config/normalize.js +73 -0
- package/out/zero-cache/src/config/normalize.js.map +1 -0
- package/out/zero-cache/src/config/zero-config.d.ts +258 -100
- package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
- package/out/zero-cache/src/config/zero-config.js +60 -32
- package/out/zero-cache/src/config/zero-config.js.map +1 -1
- package/out/zero-cache/src/server/change-streamer.d.ts.map +1 -1
- package/out/zero-cache/src/server/change-streamer.js +19 -4
- package/out/zero-cache/src/server/change-streamer.js.map +1 -1
- package/out/zero-cache/src/server/main.d.ts.map +1 -1
- package/out/zero-cache/src/server/main.js +8 -7
- package/out/zero-cache/src/server/main.js.map +1 -1
- package/out/zero-cache/src/server/replicator.d.ts.map +1 -1
- package/out/zero-cache/src/server/replicator.js +15 -4
- package/out/zero-cache/src/server/replicator.js.map +1 -1
- package/out/zero-cache/src/server/runner/run-worker.d.ts.map +1 -1
- package/out/zero-cache/src/server/runner/run-worker.js +6 -8
- package/out/zero-cache/src/server/runner/run-worker.js.map +1 -1
- package/out/zero-cache/src/server/runner/runtime.d.ts.map +1 -1
- package/out/zero-cache/src/server/runner/runtime.js +12 -1
- package/out/zero-cache/src/server/runner/runtime.js.map +1 -1
- package/out/zero-cache/src/server/runner/zero-dispatcher.d.ts +2 -2
- package/out/zero-cache/src/server/runner/zero-dispatcher.d.ts.map +1 -1
- package/out/zero-cache/src/server/runner/zero-dispatcher.js.map +1 -1
- package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
- package/out/zero-cache/src/server/syncer.js +4 -2
- package/out/zero-cache/src/server/syncer.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts +6 -2
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.js +29 -14
- package/out/zero-cache/src/services/change-streamer/change-streamer-http.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-service.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/change-streamer-service.js +4 -15
- package/out/zero-cache/src/services/change-streamer/change-streamer-service.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/schema/init.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/schema/init.js +8 -0
- package/out/zero-cache/src/services/change-streamer/schema/init.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts +2 -1
- package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/schema/tables.js +19 -13
- package/out/zero-cache/src/services/change-streamer/schema/tables.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/storer.d.ts +1 -1
- package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/storer.js +6 -2
- package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
- package/out/zero-cache/src/services/http-service.d.ts +4 -0
- package/out/zero-cache/src/services/http-service.d.ts.map +1 -1
- package/out/zero-cache/src/services/http-service.js +26 -5
- package/out/zero-cache/src/services/http-service.js.map +1 -1
- package/out/zero-cache/src/services/statz.d.ts +1 -1
- package/out/zero-cache/src/services/statz.d.ts.map +1 -1
- package/out/zero-cache/src/services/statz.js +6 -7
- package/out/zero-cache/src/services/statz.js.map +1 -1
- package/out/zero-protocol/src/ast.d.ts +2 -2
- package/out/zero-protocol/src/ast.d.ts.map +1 -1
- package/out/zero-protocol/src/ast.js +3 -1
- package/out/zero-protocol/src/ast.js.map +1 -1
- package/out/zero.js +3 -3
- package/out/zql/src/ivm/constraint.d.ts +24 -0
- package/out/zql/src/ivm/constraint.d.ts.map +1 -1
- package/out/zql/src/ivm/constraint.js +65 -0
- package/out/zql/src/ivm/constraint.js.map +1 -1
- package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
- package/out/zql/src/ivm/memory-source.js +10 -5
- package/out/zql/src/ivm/memory-source.js.map +1 -1
- package/out/zql/src/query/query-impl.d.ts +1 -1
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js +5 -3
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/package.json +1 -1
- package/out/chunk-KOXC55U7.js.map +0 -7
- package/out/zero-cache/src/types/timeout.d.ts +0 -11
- package/out/zero-cache/src/types/timeout.d.ts.map +0 -1
- package/out/zero-cache/src/types/timeout.js +0 -23
- package/out/zero-cache/src/types/timeout.js.map +0 -1
- /package/out/{chunk-54ZZCBOP.js.map → chunk-N44AEZOH.js.map} +0 -0
- /package/out/{inspector-Z55GQ5JV.js.map → inspector-GCX7QH7K.js.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
readonlyObject,
|
|
15
15
|
readonlyRecord,
|
|
16
16
|
valita_exports
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EBZYAQDK.js";
|
|
18
18
|
import {
|
|
19
19
|
assert,
|
|
20
20
|
assertArray,
|
|
@@ -2840,4 +2840,4 @@ export {
|
|
|
2840
2840
|
toPrimaryKeyString,
|
|
2841
2841
|
sourceNameFromKey
|
|
2842
2842
|
};
|
|
2843
|
-
//# sourceMappingURL=chunk-
|
|
2843
|
+
//# sourceMappingURL=chunk-N44AEZOH.js.map
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
withRead,
|
|
85
85
|
withWrite,
|
|
86
86
|
withWriteNoImplicitCommit
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-N44AEZOH.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-EBZYAQDK.js";
|
|
124
124
|
import {
|
|
125
125
|
__export,
|
|
126
126
|
assert,
|
|
@@ -7104,6 +7104,50 @@ function constraintMatchesPrimaryKey(constraint, primary) {
|
|
|
7104
7104
|
}
|
|
7105
7105
|
return true;
|
|
7106
7106
|
}
|
|
7107
|
+
function pullSimpleAndComponents(condition) {
|
|
7108
|
+
if (condition.type === "and") {
|
|
7109
|
+
return condition.conditions.flatMap(pullSimpleAndComponents);
|
|
7110
|
+
}
|
|
7111
|
+
if (condition.type === "simple") {
|
|
7112
|
+
return [condition];
|
|
7113
|
+
}
|
|
7114
|
+
if (condition.type === "or" && condition.conditions.length === 1) {
|
|
7115
|
+
return pullSimpleAndComponents(condition.conditions[0]);
|
|
7116
|
+
}
|
|
7117
|
+
return [];
|
|
7118
|
+
}
|
|
7119
|
+
function primaryKeyConstraintFromFilters(condition, primary) {
|
|
7120
|
+
if (condition === void 0) {
|
|
7121
|
+
return void 0;
|
|
7122
|
+
}
|
|
7123
|
+
const conditions = pullSimpleAndComponents(condition);
|
|
7124
|
+
if (conditions.length === 0) {
|
|
7125
|
+
return void 0;
|
|
7126
|
+
}
|
|
7127
|
+
const ret = {};
|
|
7128
|
+
for (const subCondition of conditions) {
|
|
7129
|
+
if (subCondition.op === "=") {
|
|
7130
|
+
const column = extractColumn(subCondition);
|
|
7131
|
+
if (column !== void 0) {
|
|
7132
|
+
if (!primary.includes(column.name)) {
|
|
7133
|
+
continue;
|
|
7134
|
+
}
|
|
7135
|
+
ret[column.name] = column.value;
|
|
7136
|
+
}
|
|
7137
|
+
}
|
|
7138
|
+
}
|
|
7139
|
+
if (Object.keys(ret).length !== primary.length) {
|
|
7140
|
+
return void 0;
|
|
7141
|
+
}
|
|
7142
|
+
return ret;
|
|
7143
|
+
}
|
|
7144
|
+
function extractColumn(condition) {
|
|
7145
|
+
if (condition.left.type === "column") {
|
|
7146
|
+
assert(condition.right.type === "literal");
|
|
7147
|
+
return { name: condition.left.name, value: condition.right.value };
|
|
7148
|
+
}
|
|
7149
|
+
return void 0;
|
|
7150
|
+
}
|
|
7107
7151
|
|
|
7108
7152
|
// ../zql/src/ivm/memory-source.ts
|
|
7109
7153
|
var MemorySource = class _MemorySource {
|
|
@@ -7231,7 +7275,11 @@ var MemorySource = class _MemorySource {
|
|
|
7231
7275
|
indexSort.push([key, "asc"]);
|
|
7232
7276
|
}
|
|
7233
7277
|
}
|
|
7234
|
-
|
|
7278
|
+
const pkConstraint = primaryKeyConstraintFromFilters(
|
|
7279
|
+
conn.filters?.condition,
|
|
7280
|
+
this.#primaryKey
|
|
7281
|
+
);
|
|
7282
|
+
if (this.#primaryKey.length > 1 || !req.constraint || !constraintMatchesPrimaryKey(req.constraint, this.#primaryKey) && !pkConstraint) {
|
|
7235
7283
|
indexSort.push(...requestedSort);
|
|
7236
7284
|
}
|
|
7237
7285
|
const index = this.#getOrCreateIndex(indexSort, from);
|
|
@@ -7239,11 +7287,12 @@ var MemorySource = class _MemorySource {
|
|
|
7239
7287
|
const comparator2 = (r1, r2) => compare(r1, r2) * (req.reverse ? -1 : 1);
|
|
7240
7288
|
const startAt = req.start?.row;
|
|
7241
7289
|
let scanStart;
|
|
7242
|
-
|
|
7290
|
+
const constraint = pkConstraint ?? req.constraint;
|
|
7291
|
+
if (constraint) {
|
|
7243
7292
|
scanStart = {};
|
|
7244
7293
|
for (const [key, dir] of indexSort) {
|
|
7245
|
-
if (hasOwn(
|
|
7246
|
-
scanStart[key] =
|
|
7294
|
+
if (hasOwn(constraint, key)) {
|
|
7295
|
+
scanStart[key] = constraint[key];
|
|
7247
7296
|
} else {
|
|
7248
7297
|
if (req.reverse) {
|
|
7249
7298
|
scanStart[key] = dir === "asc" ? maxValue : minValue;
|
|
@@ -8472,7 +8521,7 @@ function makeMessage(message, context, logLevel) {
|
|
|
8472
8521
|
}
|
|
8473
8522
|
|
|
8474
8523
|
// ../zero-client/src/client/version.ts
|
|
8475
|
-
var version2 = "0.20.
|
|
8524
|
+
var version2 = "0.20.2025050600";
|
|
8476
8525
|
|
|
8477
8526
|
// ../zero-client/src/client/log-options.ts
|
|
8478
8527
|
var LevelFilterLogSink = class {
|
|
@@ -10953,7 +11002,7 @@ var Zero = class {
|
|
|
10953
11002
|
*/
|
|
10954
11003
|
async inspect() {
|
|
10955
11004
|
BUNDLE_SIZE: {
|
|
10956
|
-
const m = await import("./inspector-
|
|
11005
|
+
const m = await import("./inspector-GCX7QH7K.js");
|
|
10957
11006
|
return m.newInspector(this.#rep, this.#schema, async () => {
|
|
10958
11007
|
await this.#connectResolver.promise;
|
|
10959
11008
|
return this.#socket;
|
|
@@ -11080,4 +11129,4 @@ export {
|
|
|
11080
11129
|
update_needed_reason_type_enum_exports,
|
|
11081
11130
|
Zero
|
|
11082
11131
|
};
|
|
11083
|
-
//# sourceMappingURL=chunk-
|
|
11132
|
+
//# sourceMappingURL=chunk-VA2YVVTK.js.map
|