@instantdb/solidjs 1.0.63-branch-codex-indexeddb-explicit-commit.31419272329.1 → 1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.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/.turbo/turbo-build.log +8 -8
- package/dist/standalone/index.js +107 -108
- package/dist/standalone/index.umd.cjs +2 -2
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.
|
|
2
|
+
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1 build /home/runner/work/instant/instant/client/packages/solidjs
|
|
3
3
|
> rm -rf dist; npm run build:tshy && npm run build:standalone && npm run check-exports
|
|
4
4
|
|
|
5
5
|
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
6
6
|
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
7
7
|
|
|
8
|
-
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.
|
|
8
|
+
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1 build:tshy
|
|
9
9
|
> tshy
|
|
10
10
|
|
|
11
11
|
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
12
12
|
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
13
13
|
|
|
14
|
-
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.
|
|
14
|
+
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1 build:standalone
|
|
15
15
|
> vite build
|
|
16
16
|
|
|
17
17
|
[36mvite v5.4.14 [32mbuilding for production...[36m[39m
|
|
@@ -19,17 +19,17 @@ transforming...
|
|
|
19
19
|
[32m✓[39m 72 modules transformed.
|
|
20
20
|
rendering chunks...
|
|
21
21
|
computing gzip size...
|
|
22
|
-
[2mdist/standalone/[22m[36mindex.umd.cjs [39m[1m[2m163.
|
|
23
|
-
[2mdist/standalone/[22m[36mindex.js [39m[1m[2m249.
|
|
24
|
-
[32m✓ built in 1.
|
|
22
|
+
[2mdist/standalone/[22m[36mindex.umd.cjs [39m[1m[2m163.07 kB[22m[1m[22m[2m │ gzip: 49.76 kB[22m
|
|
23
|
+
[2mdist/standalone/[22m[36mindex.js [39m[1m[2m249.32 kB[22m[1m[22m[2m │ gzip: 64.59 kB[22m
|
|
24
|
+
[32m✓ built in 1.73s[39m
|
|
25
25
|
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
26
26
|
npm warn Unknown user config "always-auth". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
|
|
27
27
|
|
|
28
|
-
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.
|
|
28
|
+
> @instantdb/solidjs@1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1 check-exports
|
|
29
29
|
> attw --pack .
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
@instantdb/solidjs v1.0.63-branch-codex-indexeddb-explicit-commit.
|
|
32
|
+
@instantdb/solidjs v1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1
|
|
33
33
|
|
|
34
34
|
Build tools:
|
|
35
35
|
- @arethetypeswrong/cli@^0.18.5
|
package/dist/standalone/index.js
CHANGED
|
@@ -937,7 +937,7 @@ const as = (n) => function e(t, r, s) {
|
|
|
937
937
|
} catch (T) {
|
|
938
938
|
throw jt(P(_)), T;
|
|
939
939
|
}
|
|
940
|
-
const
|
|
940
|
+
const O = (T) => {
|
|
941
941
|
const C = P(_);
|
|
942
942
|
if (!Te(T)) {
|
|
943
943
|
if (T !== void 0 && !ye(T, _) && (C != null && C.operated))
|
|
@@ -964,9 +964,9 @@ const as = (n) => function e(t, r, s) {
|
|
|
964
964
|
}
|
|
965
965
|
return w([T]);
|
|
966
966
|
};
|
|
967
|
-
return m instanceof Promise ? m.then(
|
|
967
|
+
return m instanceof Promise ? m.then(O, (T) => {
|
|
968
968
|
throw jt(P(_)), T;
|
|
969
|
-
}) :
|
|
969
|
+
}) : O(m);
|
|
970
970
|
}, ot = as();
|
|
971
971
|
Object.prototype.constructor.toString();
|
|
972
972
|
function nr(n, e) {
|
|
@@ -2195,11 +2195,11 @@ function Ai(n, e, t, { etype: r, level: s, form: i }, o) {
|
|
|
2195
2195
|
var b, g, _;
|
|
2196
2196
|
const p = !!(e.cardinalityInference && ((_ = (g = (b = t.linkIndex) == null ? void 0 : b[r]) == null ? void 0 : g[y]) != null && _.isSingular));
|
|
2197
2197
|
try {
|
|
2198
|
-
const [w, m,
|
|
2198
|
+
const [w, m, O] = vi(n, t, r, s, y, u), T = mr(e, t, {
|
|
2199
2199
|
etype: w,
|
|
2200
2200
|
level: m,
|
|
2201
2201
|
form: i[y],
|
|
2202
|
-
join:
|
|
2202
|
+
join: O
|
|
2203
2203
|
}), C = p ? T[0] : T;
|
|
2204
2204
|
return { [y]: C };
|
|
2205
2205
|
} catch (w) {
|
|
@@ -2278,8 +2278,8 @@ function $i(n, e, { etype: t, pageInfo: r, dq: s, form: i }) {
|
|
|
2278
2278
|
const _ = d["checked-data-type"] === "date", w = d.id;
|
|
2279
2279
|
u = u.map(([m]) => {
|
|
2280
2280
|
var T, C, I, k, N;
|
|
2281
|
-
let
|
|
2282
|
-
return _ && (
|
|
2281
|
+
let O = (N = (k = (I = (C = (T = n.eav.get(m)) == null ? void 0 : T.get(w)) == null ? void 0 : C.values()) == null ? void 0 : I.next()) == null ? void 0 : k.value) == null ? void 0 : N[2];
|
|
2282
|
+
return _ && (O = qt(O)), [m, O];
|
|
2283
2283
|
});
|
|
2284
2284
|
}
|
|
2285
2285
|
u.sort(c === "asc" ? function(w, m) {
|
|
@@ -2775,9 +2775,9 @@ function ho({ attrsStore: n, schema: e }, t) {
|
|
|
2775
2775
|
const w = g[0];
|
|
2776
2776
|
if (_) {
|
|
2777
2777
|
f(b, _);
|
|
2778
|
-
const m = o(b, _),
|
|
2779
|
-
u(m), u(
|
|
2780
|
-
const T = ((d = m == null ? void 0 : m["reverse-identity"]) == null ? void 0 : d[1]) || ((y =
|
|
2778
|
+
const m = o(b, _), O = a(b, _);
|
|
2779
|
+
u(m), u(O);
|
|
2780
|
+
const T = ((d = m == null ? void 0 : m["reverse-identity"]) == null ? void 0 : d[1]) || ((y = O == null ? void 0 : O["forward-identity"]) == null ? void 0 : y[1]) || _;
|
|
2781
2781
|
if (l(T, w))
|
|
2782
2782
|
f(T, Wt(w));
|
|
2783
2783
|
else {
|
|
@@ -2796,11 +2796,11 @@ function ho({ attrsStore: n, schema: e }, t) {
|
|
|
2796
2796
|
if (oo.has(b)) {
|
|
2797
2797
|
const m = o(g, "id");
|
|
2798
2798
|
u(m), m || c(Ge(e, g, "id", { "unique?": !0 }));
|
|
2799
|
-
for (const
|
|
2800
|
-
const T = o(g,
|
|
2801
|
-
if (u(T), co.has(b) && (T || c(Ge(e, g,
|
|
2802
|
-
const C = a(g,
|
|
2803
|
-
!T && !C && c(kn(e, g,
|
|
2799
|
+
for (const O of Object.keys(w)) {
|
|
2800
|
+
const T = o(g, O);
|
|
2801
|
+
if (u(T), co.has(b) && (T || c(Ge(e, g, O, O === "id" ? { "unique?": !0 } : null))), ao.has(b)) {
|
|
2802
|
+
const C = a(g, O);
|
|
2803
|
+
!T && !C && c(kn(e, g, O)), u(C);
|
|
2804
2804
|
}
|
|
2805
2805
|
}
|
|
2806
2806
|
}
|
|
@@ -3134,50 +3134,49 @@ async function Cn(n, e, t) {
|
|
|
3134
3134
|
});
|
|
3135
3135
|
}
|
|
3136
3136
|
async function So(n, e) {
|
|
3137
|
-
var f;
|
|
3138
3137
|
const t = await _o(`instant_${n}_5`);
|
|
3139
3138
|
if (!t)
|
|
3140
3139
|
return;
|
|
3141
|
-
const r = await new Promise((
|
|
3142
|
-
const
|
|
3143
|
-
|
|
3144
|
-
|
|
3140
|
+
const r = await new Promise((l, f) => {
|
|
3141
|
+
const p = t.transaction(["kv"], "readonly").objectStore("kv").openCursor();
|
|
3142
|
+
p.onerror = (g) => {
|
|
3143
|
+
f(g);
|
|
3145
3144
|
};
|
|
3146
|
-
const
|
|
3147
|
-
|
|
3148
|
-
const
|
|
3149
|
-
if (
|
|
3150
|
-
const
|
|
3151
|
-
|
|
3145
|
+
const b = [];
|
|
3146
|
+
p.onsuccess = () => {
|
|
3147
|
+
const g = p.result;
|
|
3148
|
+
if (g) {
|
|
3149
|
+
const _ = g.key, w = g.value;
|
|
3150
|
+
b.push([_, w]), g.continue();
|
|
3152
3151
|
} else
|
|
3153
|
-
|
|
3154
|
-
},
|
|
3155
|
-
|
|
3152
|
+
l(b);
|
|
3153
|
+
}, p.onerror = (g) => {
|
|
3154
|
+
f(g);
|
|
3156
3155
|
};
|
|
3157
|
-
}), s = e.transaction(["kv", "querySubs"], "readwrite"), i = s.objectStore("kv"), o = s.objectStore("querySubs"), a =
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
for (const [d, y] of r)
|
|
3161
|
-
switch (d) {
|
|
3156
|
+
}), s = e.transaction(["kv", "querySubs"], "readwrite"), i = s.objectStore("kv"), o = s.objectStore("querySubs"), a = [], c = { objects: {} };
|
|
3157
|
+
for (const [l, f] of r)
|
|
3158
|
+
switch (l) {
|
|
3162
3159
|
case "querySubs": {
|
|
3163
|
-
const
|
|
3164
|
-
|
|
3160
|
+
const d = mo(l, f, o);
|
|
3161
|
+
a.push(d);
|
|
3165
3162
|
break;
|
|
3166
3163
|
}
|
|
3167
3164
|
default: {
|
|
3168
|
-
const
|
|
3169
|
-
|
|
3170
|
-
const
|
|
3165
|
+
const d = Cn(l, f, i);
|
|
3166
|
+
a.push(d);
|
|
3167
|
+
const y = {
|
|
3171
3168
|
createdAt: Date.now(),
|
|
3172
3169
|
updatedAt: Date.now(),
|
|
3173
3170
|
size: 0
|
|
3174
3171
|
};
|
|
3175
|
-
|
|
3172
|
+
c.objects[l] = y;
|
|
3176
3173
|
break;
|
|
3177
3174
|
}
|
|
3178
3175
|
}
|
|
3179
|
-
const
|
|
3180
|
-
|
|
3176
|
+
const u = Cn(Me, c, i);
|
|
3177
|
+
a.push(u), await Promise.all(a), await new Promise((l, f) => {
|
|
3178
|
+
s.oncomplete = (d) => l(d), s.onerror = (d) => f(d), s.onabort = (d) => f(d);
|
|
3179
|
+
});
|
|
3181
3180
|
}
|
|
3182
3181
|
const En = /* @__PURE__ */ new Map();
|
|
3183
3182
|
class Ar extends yo {
|
|
@@ -3542,7 +3541,7 @@ function xn(n) {
|
|
|
3542
3541
|
}, e;
|
|
3543
3542
|
}, {});
|
|
3544
3543
|
}
|
|
3545
|
-
const ln = "v1.0.63-branch-codex-indexeddb-explicit-commit.
|
|
3544
|
+
const ln = "v1.0.63-branch-codex-indexeddb-explicit-commit.31419410889.1";
|
|
3546
3545
|
function Ro(n, e, t = console) {
|
|
3547
3546
|
return {
|
|
3548
3547
|
info: n ? (...r) => t.info(...r, e()) : () => {
|
|
@@ -4370,12 +4369,12 @@ class Zo {
|
|
|
4370
4369
|
const m = f[w];
|
|
4371
4370
|
if (Cs(m.store, g)) {
|
|
4372
4371
|
Kn(m.store, l.attrsStore, _);
|
|
4373
|
-
const
|
|
4374
|
-
|
|
4372
|
+
const O = It(s, m.store, l.attrsStore), T = Ho(m.store, l.attrsStore, _)[g];
|
|
4373
|
+
O ? (d.push({
|
|
4375
4374
|
oldEntity: m.entity,
|
|
4376
|
-
newEntity:
|
|
4375
|
+
newEntity: O,
|
|
4377
4376
|
changedFields: T || {}
|
|
4378
|
-
}), m.entity =
|
|
4377
|
+
}), m.entity = O) : c.push(w), delete u[g];
|
|
4379
4378
|
continue e;
|
|
4380
4379
|
}
|
|
4381
4380
|
}
|
|
@@ -4451,7 +4450,7 @@ function Xo({ WStream: n, opts: e, startStream: t, appendStream: r, registerStre
|
|
|
4451
4450
|
const d = [], y = [], p = [];
|
|
4452
4451
|
let b = !1, g = 0, _ = 0;
|
|
4453
4452
|
const w = [], m = new TextEncoder();
|
|
4454
|
-
function
|
|
4453
|
+
function O() {
|
|
4455
4454
|
f = !0;
|
|
4456
4455
|
for (const S of d)
|
|
4457
4456
|
S(a ?? void 0);
|
|
@@ -4503,7 +4502,7 @@ function Xo({ WStream: n, opts: e, startStream: t, appendStream: r, registerStre
|
|
|
4503
4502
|
R > 0 && (g += K, _ -= K, w.splice(0, R));
|
|
4504
4503
|
}
|
|
4505
4504
|
function U(S, v) {
|
|
4506
|
-
a = v,
|
|
4505
|
+
a = v, O(), S.error(v), I();
|
|
4507
4506
|
}
|
|
4508
4507
|
async function B() {
|
|
4509
4508
|
const S = await t({
|
|
@@ -4534,7 +4533,7 @@ function Xo({ WStream: n, opts: e, startStream: t, appendStream: r, registerStre
|
|
|
4534
4533
|
function q() {
|
|
4535
4534
|
j(), B();
|
|
4536
4535
|
}
|
|
4537
|
-
function
|
|
4536
|
+
function A({ offset: S, done: v }) {
|
|
4538
4537
|
L(S), v && (l = !0, I());
|
|
4539
4538
|
}
|
|
4540
4539
|
function M(S) {
|
|
@@ -4561,7 +4560,7 @@ function Xo({ WStream: n, opts: e, startStream: t, appendStream: r, registerStre
|
|
|
4561
4560
|
}
|
|
4562
4561
|
N(re), s(re, {
|
|
4563
4562
|
onDisconnect: j,
|
|
4564
|
-
onFlush:
|
|
4563
|
+
onFlush: A,
|
|
4565
4564
|
onConnectionReconnect: B,
|
|
4566
4565
|
onAppendFailed: q
|
|
4567
4566
|
}), b = !1;
|
|
@@ -4624,7 +4623,7 @@ function Xo({ WStream: n, opts: e, startStream: t, appendStream: r, registerStre
|
|
|
4624
4623
|
chunks: [],
|
|
4625
4624
|
offset: g + _,
|
|
4626
4625
|
isDone: !0
|
|
4627
|
-
}) : I(),
|
|
4626
|
+
}) : I(), O();
|
|
4628
4627
|
},
|
|
4629
4628
|
abort(S) {
|
|
4630
4629
|
o ? r({
|
|
@@ -4633,7 +4632,7 @@ function Xo({ WStream: n, opts: e, startStream: t, appendStream: r, registerStre
|
|
|
4633
4632
|
offset: g + _,
|
|
4634
4633
|
isDone: !0,
|
|
4635
4634
|
abortReason: S
|
|
4636
|
-
}) : I(),
|
|
4635
|
+
}) : I(), O();
|
|
4637
4636
|
}
|
|
4638
4637
|
}),
|
|
4639
4638
|
addCompleteCb: C,
|
|
@@ -4729,8 +4728,8 @@ function ta({ RStream: n, opts: e, startStream: t, cancelStream: r }) {
|
|
|
4729
4728
|
signal: U.signal
|
|
4730
4729
|
});
|
|
4731
4730
|
for (let q = 0; q < j.files.length; q++) {
|
|
4732
|
-
const
|
|
4733
|
-
if (
|
|
4731
|
+
const A = j.files[q + 1], E = await B;
|
|
4732
|
+
if (A && (B = fetch(A.url, { signal: U.signal })), !E.ok) {
|
|
4734
4733
|
if (w++, w > 10) {
|
|
4735
4734
|
_(k, new V("Unable to process stream."));
|
|
4736
4735
|
return;
|
|
@@ -4785,7 +4784,7 @@ function ta({ RStream: n, opts: e, startStream: t, cancelStream: r }) {
|
|
|
4785
4784
|
}
|
|
4786
4785
|
}
|
|
4787
4786
|
}
|
|
4788
|
-
async function
|
|
4787
|
+
async function O(I) {
|
|
4789
4788
|
let k = !0, N = 0;
|
|
4790
4789
|
for (; k; ) {
|
|
4791
4790
|
k = !1;
|
|
@@ -4822,7 +4821,7 @@ function ta({ RStream: n, opts: e, startStream: t, cancelStream: r }) {
|
|
|
4822
4821
|
return {
|
|
4823
4822
|
stream: new T({
|
|
4824
4823
|
start(I) {
|
|
4825
|
-
|
|
4824
|
+
O(I);
|
|
4826
4825
|
},
|
|
4827
4826
|
cancel(I) {
|
|
4828
4827
|
i = !0, c && r({ eventId: c }), p();
|
|
@@ -5481,7 +5480,7 @@ class ba {
|
|
|
5481
5480
|
const { q: p, result: b } = t, g = se(p);
|
|
5482
5481
|
if (!this._hasQueryListeners() && !this.querySubs.currentValue[g])
|
|
5483
5482
|
break;
|
|
5484
|
-
const _ = (u = (c = b == null ? void 0 : b[0]) == null ? void 0 : c.data) == null ? void 0 : u["page-info"], w = (f = (l = b == null ? void 0 : b[0]) == null ? void 0 : l.data) == null ? void 0 : f.aggregate, m = jn(b),
|
|
5483
|
+
const _ = (u = (c = b == null ? void 0 : b[0]) == null ? void 0 : c.data) == null ? void 0 : u["page-info"], w = (f = (l = b == null ? void 0 : b[0]) == null ? void 0 : l.data) == null ? void 0 : f.aggregate, m = jn(b), O = this.ensureAttrs(), T = Ne(O, m, r, this.config.useDateObjects);
|
|
5485
5484
|
this.querySubs.updateInPlace((C) => {
|
|
5486
5485
|
if (!C[g]) {
|
|
5487
5486
|
this._log.info("Missing value in querySubs", { hash: g, q: p });
|
|
@@ -5489,7 +5488,7 @@ class ba {
|
|
|
5489
5488
|
}
|
|
5490
5489
|
C[g].result = {
|
|
5491
5490
|
store: T,
|
|
5492
|
-
attrsStore:
|
|
5491
|
+
attrsStore: O,
|
|
5493
5492
|
pageInfo: _,
|
|
5494
5493
|
aggregate: w,
|
|
5495
5494
|
processedTxId: t["processed-tx-id"]
|
|
@@ -5533,12 +5532,12 @@ class ba {
|
|
|
5533
5532
|
const { computations: p, attrs: b } = t, g = t["processed-tx-id"];
|
|
5534
5533
|
b && this._setAttrs(b), this._cleanupPendingMutationsTimeout();
|
|
5535
5534
|
const _ = this._rewriteMutations(this.ensureAttrs(), this._pendingMutations(), g);
|
|
5536
|
-
_ !== this._pendingMutations() && this.kv.updateInPlace((
|
|
5537
|
-
|
|
5535
|
+
_ !== this._pendingMutations() && this.kv.updateInPlace((O) => {
|
|
5536
|
+
O.pendingMutations = _;
|
|
5538
5537
|
});
|
|
5539
|
-
const w = Pt(_.entries()), m = p.map((
|
|
5540
|
-
var
|
|
5541
|
-
const T =
|
|
5538
|
+
const w = Pt(_.entries()), m = p.map((O) => {
|
|
5539
|
+
var A, M, E, $;
|
|
5540
|
+
const T = O["instaql-query"], C = O["instaql-result"], I = se(T), k = jn(C), N = this.ensureAttrs(), j = Ne(N, k, r, this.config.useDateObjects), { store: L, attrsStore: U } = this._applyOptimisticUpdates(j, N, w, g), B = (M = (A = C == null ? void 0 : C[0]) == null ? void 0 : A.data) == null ? void 0 : M["page-info"], q = ($ = (E = C == null ? void 0 : C[0]) == null ? void 0 : E.data) == null ? void 0 : $.aggregate;
|
|
5542
5541
|
return {
|
|
5543
5542
|
q: T,
|
|
5544
5543
|
hash: I,
|
|
@@ -5548,13 +5547,13 @@ class ba {
|
|
|
5548
5547
|
aggregate: q
|
|
5549
5548
|
};
|
|
5550
5549
|
});
|
|
5551
|
-
m.forEach(({ hash:
|
|
5550
|
+
m.forEach(({ hash: O, q: T, store: C, attrsStore: I, pageInfo: k, aggregate: N }) => {
|
|
5552
5551
|
this.querySubs.updateInPlace((j) => {
|
|
5553
|
-
if (!j[
|
|
5554
|
-
this._log.error("Missing value in querySubs", { hash:
|
|
5552
|
+
if (!j[O]) {
|
|
5553
|
+
this._log.error("Missing value in querySubs", { hash: O, q: T });
|
|
5555
5554
|
return;
|
|
5556
5555
|
}
|
|
5557
|
-
j[
|
|
5556
|
+
j[O].result = {
|
|
5558
5557
|
store: C,
|
|
5559
5558
|
attrsStore: I,
|
|
5560
5559
|
pageInfo: k,
|
|
@@ -5562,8 +5561,8 @@ class ba {
|
|
|
5562
5561
|
processedTxId: g
|
|
5563
5562
|
};
|
|
5564
5563
|
});
|
|
5565
|
-
}), this._cleanupPendingMutationsQueries(), m.forEach(({ hash:
|
|
5566
|
-
this.notifyOne(
|
|
5564
|
+
}), this._cleanupPendingMutationsQueries(), m.forEach(({ hash: O }) => {
|
|
5565
|
+
this.notifyOne(O);
|
|
5567
5566
|
});
|
|
5568
5567
|
break;
|
|
5569
5568
|
}
|
|
@@ -5583,8 +5582,8 @@ class ba {
|
|
|
5583
5582
|
const w = [];
|
|
5584
5583
|
for (const m of _["tx-steps"])
|
|
5585
5584
|
if (m[0] === "add-attr") {
|
|
5586
|
-
const
|
|
5587
|
-
w.push(
|
|
5585
|
+
const O = m[1];
|
|
5586
|
+
w.push(O);
|
|
5588
5587
|
}
|
|
5589
5588
|
if (w.length) {
|
|
5590
5589
|
const m = Object.values(this.ensureAttrs().attrs);
|
|
@@ -6897,25 +6896,25 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
6897
6896
|
var L, U, B, q;
|
|
6898
6897
|
const { entityName: s, entityQuery: i } = Ur(e), o = ((L = i.$) == null ? void 0 : L.limit) || 10, a = s, c = Dr((U = i.$) == null ? void 0 : U.order), u = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
|
|
6899
6898
|
let d = !1, y = !0, p = null, b = null;
|
|
6900
|
-
const g = (
|
|
6901
|
-
t({ error:
|
|
6899
|
+
const g = (A) => {
|
|
6900
|
+
t({ error: A, data: void 0, canLoadNextPage: !1 });
|
|
6902
6901
|
}, _ = () => {
|
|
6903
6902
|
if (!y)
|
|
6904
6903
|
return;
|
|
6905
|
-
const { chunks:
|
|
6904
|
+
const { chunks: A, data: M } = Ua(u, l);
|
|
6906
6905
|
t({
|
|
6907
6906
|
data: { [a]: M },
|
|
6908
6907
|
// @ts-expect-error hidden debug variable
|
|
6909
|
-
chunks:
|
|
6908
|
+
chunks: A,
|
|
6910
6909
|
canLoadNextPage: Da(u)
|
|
6911
6910
|
});
|
|
6912
|
-
}, w = (
|
|
6913
|
-
u.set(Ke(
|
|
6914
|
-
}, m = (
|
|
6915
|
-
l.set(Ke(
|
|
6916
|
-
},
|
|
6911
|
+
}, w = (A, M) => {
|
|
6912
|
+
u.set(Ke(A, M.afterInclusive), M), _();
|
|
6913
|
+
}, m = (A, M) => {
|
|
6914
|
+
l.set(Ke(A), M), k(), _();
|
|
6915
|
+
}, O = (A, M) => {
|
|
6917
6916
|
var S, v;
|
|
6918
|
-
const { cursor: E } = Wn(
|
|
6917
|
+
const { cursor: E } = Wn(A), $ = f.get(Ie("reverse", E));
|
|
6919
6918
|
$ == null || $();
|
|
6920
6919
|
const x = n.subscribeQuery({
|
|
6921
6920
|
[a]: {
|
|
@@ -6941,14 +6940,14 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
6941
6940
|
});
|
|
6942
6941
|
}, r);
|
|
6943
6942
|
f.set(Ie("reverse", E), x);
|
|
6944
|
-
}, T = (
|
|
6943
|
+
}, T = (A) => {
|
|
6945
6944
|
var E, $;
|
|
6946
6945
|
const M = n.subscribeQuery({
|
|
6947
6946
|
[a]: {
|
|
6948
6947
|
...i,
|
|
6949
6948
|
$: {
|
|
6950
6949
|
limit: o,
|
|
6951
|
-
after:
|
|
6950
|
+
after: A,
|
|
6952
6951
|
where: (E = i.$) == null ? void 0 : E.where,
|
|
6953
6952
|
fields: ($ = i.$) == null ? void 0 : $.fields,
|
|
6954
6953
|
order: Qn(c)
|
|
@@ -6958,22 +6957,22 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
6958
6957
|
if (x.error)
|
|
6959
6958
|
return g(x.error);
|
|
6960
6959
|
const S = x.data[a], v = x.pageInfo[a];
|
|
6961
|
-
De(S && v, "Expected rows and pageInfo"), m(
|
|
6960
|
+
De(S && v, "Expected rows and pageInfo"), m(A, {
|
|
6962
6961
|
data: S,
|
|
6963
6962
|
status: "bootstrapping",
|
|
6964
6963
|
hasMore: v.hasNextPage,
|
|
6965
6964
|
endCursor: v.endCursor
|
|
6966
6965
|
});
|
|
6967
6966
|
}, r);
|
|
6968
|
-
f.set(Ie("reverse",
|
|
6969
|
-
}, C = (
|
|
6967
|
+
f.set(Ie("reverse", A), M);
|
|
6968
|
+
}, C = (A, M = !1) => {
|
|
6970
6969
|
var $, x;
|
|
6971
6970
|
const E = n.subscribeQuery({
|
|
6972
6971
|
[a]: {
|
|
6973
6972
|
...i,
|
|
6974
6973
|
$: {
|
|
6975
6974
|
limit: o,
|
|
6976
|
-
after:
|
|
6975
|
+
after: A,
|
|
6977
6976
|
afterInclusive: M,
|
|
6978
6977
|
where: ($ = i.$) == null ? void 0 : $.where,
|
|
6979
6978
|
fields: (x = i.$) == null ? void 0 : x.fields,
|
|
@@ -6984,7 +6983,7 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
6984
6983
|
if (S.error)
|
|
6985
6984
|
return g(S.error);
|
|
6986
6985
|
const v = S.data[a], R = S.pageInfo[a];
|
|
6987
|
-
De(v && R, "Page info and rows"), w(
|
|
6986
|
+
De(v && R, "Page info and rows"), w(A, {
|
|
6988
6987
|
data: v,
|
|
6989
6988
|
status: "bootstrapping",
|
|
6990
6989
|
hasMore: R.hasNextPage,
|
|
@@ -6992,10 +6991,10 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
6992
6991
|
afterInclusive: M
|
|
6993
6992
|
});
|
|
6994
6993
|
}, r);
|
|
6995
|
-
f.set(Ie("forward",
|
|
6996
|
-
}, I = (
|
|
6994
|
+
f.set(Ie("forward", A, M), E);
|
|
6995
|
+
}, I = (A, M = !1) => {
|
|
6997
6996
|
var v, R;
|
|
6998
|
-
const E = Ke(
|
|
6997
|
+
const E = Ke(A, M), $ = f.get(Ie("forward", A, M));
|
|
6999
6998
|
$ == null || $();
|
|
7000
6999
|
const x = u.get(E);
|
|
7001
7000
|
if (!(x != null && x.endCursor))
|
|
@@ -7004,7 +7003,7 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
7004
7003
|
[a]: {
|
|
7005
7004
|
...i,
|
|
7006
7005
|
$: {
|
|
7007
|
-
after:
|
|
7006
|
+
after: A,
|
|
7008
7007
|
afterInclusive: x.afterInclusive,
|
|
7009
7008
|
before: x.endCursor,
|
|
7010
7009
|
beforeInclusive: !0,
|
|
@@ -7017,7 +7016,7 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
7017
7016
|
if (K.error)
|
|
7018
7017
|
return g(K.error);
|
|
7019
7018
|
const Q = K.data[a], re = K.pageInfo[a];
|
|
7020
|
-
De(Q && re, "Expected rows and pageInfo"), w(
|
|
7019
|
+
De(Q && re, "Expected rows and pageInfo"), w(A, {
|
|
7021
7020
|
data: Q,
|
|
7022
7021
|
status: "frozen",
|
|
7023
7022
|
hasMore: re.hasNextPage,
|
|
@@ -7025,21 +7024,21 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
7025
7024
|
afterInclusive: x.afterInclusive
|
|
7026
7025
|
});
|
|
7027
7026
|
}, r);
|
|
7028
|
-
f.set(Ie("forward",
|
|
7027
|
+
f.set(Ie("forward", A, M), S);
|
|
7029
7028
|
}, k = () => {
|
|
7030
|
-
const
|
|
7031
|
-
if (!
|
|
7029
|
+
const A = Array.from(l.entries()).at(-1);
|
|
7030
|
+
if (!A)
|
|
7032
7031
|
return;
|
|
7033
|
-
const [M, E] =
|
|
7032
|
+
const [M, E] = A;
|
|
7034
7033
|
if (!(E != null && E.hasMore) || !Ra(E))
|
|
7035
7034
|
return;
|
|
7036
7035
|
const $ = `${M}:${xa(E.endCursor)}`;
|
|
7037
|
-
$ != p && (p = $,
|
|
7036
|
+
$ != p && (p = $, O(M, E), T(E.endCursor));
|
|
7038
7037
|
}, N = () => {
|
|
7039
|
-
const
|
|
7040
|
-
if (!
|
|
7038
|
+
const A = Array.from(u.entries()).at(-1);
|
|
7039
|
+
if (!A)
|
|
7041
7040
|
return;
|
|
7042
|
-
const [M, E] =
|
|
7041
|
+
const [M, E] = A;
|
|
7043
7042
|
if (!E.endCursor)
|
|
7044
7043
|
return;
|
|
7045
7044
|
const { cursor: $, afterInclusive: x } = Wn(M);
|
|
@@ -7055,13 +7054,13 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
7055
7054
|
order: c
|
|
7056
7055
|
}
|
|
7057
7056
|
}
|
|
7058
|
-
}, async (
|
|
7057
|
+
}, async (A) => {
|
|
7059
7058
|
var x;
|
|
7060
7059
|
if (d)
|
|
7061
7060
|
return;
|
|
7062
|
-
if (
|
|
7063
|
-
return g(
|
|
7064
|
-
const M =
|
|
7061
|
+
if (A.error)
|
|
7062
|
+
return g(A.error);
|
|
7063
|
+
const M = A.pageInfo[a], E = (x = A == null ? void 0 : A.data) == null ? void 0 : x[a];
|
|
7065
7064
|
if (De(E && M, "Expected rows and pageInfo"), E.length < o) {
|
|
7066
7065
|
w(Mt, {
|
|
7067
7066
|
data: E,
|
|
@@ -7082,8 +7081,8 @@ const xa = (n) => JSON.stringify(n), Ke = (n, e = !1) => JSON.stringify([n, e]),
|
|
|
7082
7081
|
unsubscribe: () => {
|
|
7083
7082
|
if (y) {
|
|
7084
7083
|
y = !1, b == null || b(), b = null;
|
|
7085
|
-
for (const
|
|
7086
|
-
|
|
7084
|
+
for (const A of f.values())
|
|
7085
|
+
A == null || A();
|
|
7087
7086
|
f.clear();
|
|
7088
7087
|
}
|
|
7089
7088
|
},
|