@ebbjs/storage 0.3.0 → 1.1.0

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.
@@ -1,121 +1,125 @@
1
- import { unwrap as _, openDB as b } from "idb";
2
- import { m as k, a as O, i as T, c as v } from "../cursor-record-D39emd6R.js";
3
- import { c as N, l as P, f as R, a as C, b as B, j as M, k as H, n as F, q as G, s as L, M as j, m as K, p as I, r as U, i as Y } from "../replica-record-D3lkFACh.js";
4
- import { compare as V } from "@ebbjs/core";
5
- const z = 8, m = "actionPosition", A = "replica", Q = (t, e, a, n) => {
1
+ import { unwrap as D, openDB as O } from "idb";
2
+ import { c as T, l as N, f as R, a as b, b as C, e as k, o as P, p as B, z as M, B as F, C as H, M as x, m as L, A as j, r as G, i as K, u as I } from "../replica-record-BaptWabD.js";
3
+ import { m as U, a as V, i as Y, c as h } from "../cursor-record-D39emd6R.js";
4
+ import { componentModel as z, compare as X } from "@ebbjs/core";
5
+ const Q = 11, J = 9, W = 11, f = "actionPosition", A = "replica", Z = (t, e, o, a) => {
6
+ const s = [J, W], u = e > 0 && s.some((i) => e < i);
7
+ if (u)
8
+ for (const i of Array.from(t.objectStoreNames))
9
+ t.deleteObjectStore(i);
6
10
  if (t.objectStoreNames.contains("actions"))
7
- n.objectStore("actions").indexNames.contains("position") || n.objectStore("actions").createIndex("position", "position");
11
+ a.objectStore("actions").indexNames.contains("position") || a.objectStore("actions").createIndex("position", "position");
8
12
  else {
9
- const s = t.createObjectStore("actions", { keyPath: "id" });
10
- s.createIndex("subject_id", "subject_ids", { multiEntry: !0 }), s.createIndex("position", "position");
13
+ const i = t.createObjectStore("actions", { keyPath: "id" });
14
+ i.createIndex("subject_id", "subject_ids", { multiEntry: !0 }), i.createIndex("position", "position");
11
15
  }
12
16
  if (!t.objectStoreNames.contains("entities")) {
13
- const s = t.createObjectStore("entities", { keyPath: "id" });
14
- s.indexNames.contains("type") || s.createIndex("type", "type");
17
+ const i = t.createObjectStore("entities", { keyPath: "id" });
18
+ i.indexNames.contains("type") || i.createIndex("type", "type"), i.createIndex("components", "components", { multiEntry: !0 });
15
19
  }
16
20
  if (t.objectStoreNames.contains("relationships") || t.createObjectStore("relationships", { keyPath: "key" }), !t.objectStoreNames.contains("dirty")) {
17
- const s = t.createObjectStore("dirty", { keyPath: "entityId" });
18
- s.indexNames.contains("entityType") || s.createIndex("entityType", "entityType");
21
+ const i = t.createObjectStore("dirty", { keyPath: "entityId" });
22
+ i.indexNames.contains("entityType") || i.createIndex("entityType", "entityType");
19
23
  }
20
- t.objectStoreNames.contains("cursors") || t.createObjectStore("cursors", { keyPath: "groupId" }), t.objectStoreNames.contains("outbox") || t.createObjectStore("outbox", { keyPath: "action.id" }), t.objectStoreNames.contains("sequence") || t.createObjectStore("sequence", { keyPath: "id" }), t.objectStoreNames.contains("replica") || t.createObjectStore("replica", { keyPath: ["type", "id"] }), t.objectStoreNames.contains("replicaCursor") || t.createObjectStore("replicaCursor", { keyPath: "id" }), e < 8 && J(n);
21
- }, J = (t) => {
22
- const e = _(t.objectStore("actions")), a = t.objectStore("sequence");
23
- let n = 0;
24
+ t.objectStoreNames.contains("cursors") || t.createObjectStore("cursors", { keyPath: "groupId" }), t.objectStoreNames.contains("outbox") || t.createObjectStore("outbox", { keyPath: "action.id" }), t.objectStoreNames.contains("sequence") || t.createObjectStore("sequence", { keyPath: "id" }), t.objectStoreNames.contains("replica") || t.createObjectStore("replica", { keyPath: ["type", "id"] }), t.objectStoreNames.contains("replicaCursor") || t.createObjectStore("replicaCursor", { keyPath: "id" }), u ? a.objectStore("sequence").put({ id: f, value: 0 }) : e < 8 && $(a);
25
+ }, $ = (t) => {
26
+ const e = D(t.objectStore("actions")), o = t.objectStore("sequence");
27
+ let a = 0;
24
28
  const s = e.openCursor();
25
29
  s.onsuccess = () => {
26
- const c = s.result;
27
- if (c === null) {
28
- a.put({ id: m, value: n });
30
+ const u = s.result;
31
+ if (u === null) {
32
+ o.put({ id: f, value: a });
29
33
  return;
30
34
  }
31
- n += 1, c.update({ ...c.value, position: n }), c.continue();
35
+ a += 1, u.update({ ...u.value, position: a }), u.continue();
32
36
  };
33
- }, W = (t) => {
37
+ }, tt = (t) => {
34
38
  const e = /* @__PURE__ */ new Set();
35
- for (const a of t.updates)
36
- e.add(a.subject_id);
39
+ for (const o of t.updates)
40
+ e.add(o.subject_id);
37
41
  return Array.from(e);
38
- }, x = (t) => {
39
- const { subject_ids: e, position: a, ...n } = t;
40
- return n;
41
- }, h = async (t, e) => {
42
- const a = t.objectStore("actions"), n = await a.get(e.id), s = await t.objectStore("sequence").get(m), c = n === void 0, l = c ? (s?.value ?? 0) + 1 : n.position, p = n === void 0 ? e : { ...e, updates: k(n.updates, e.updates) }, y = O(n?.updates ?? [], e.updates);
43
- return await a.put({ ...p, position: l, subject_ids: W(p) }), c && await t.objectStore("sequence").put({ id: m, value: l }), { action: p, position: l, added: y };
44
- }, X = (t) => ({
42
+ }, g = (t) => {
43
+ const { subject_ids: e, position: o, ...a } = t;
44
+ return a;
45
+ }, E = async (t, e) => {
46
+ const o = t.objectStore("actions"), a = await o.get(e.id), s = await t.objectStore("sequence").get(f), u = a === void 0, i = u ? (s?.value ?? 0) + 1 : a.position, y = a === void 0 ? e : { ...e, updates: U(a.updates, e.updates) }, w = V(a?.updates ?? [], e.updates);
47
+ return await o.put({ ...y, position: i, subject_ids: tt(y) }), u && await t.objectStore("sequence").put({ id: f, value: i }), { action: y, position: i, added: w };
48
+ }, et = (t) => ({
45
49
  async append(e) {
46
- const a = t.transaction(["actions", "sequence"], "readwrite"), n = await h(a, e);
47
- return await a.done, n;
50
+ const o = t.transaction(["actions", "sequence"], "readwrite"), a = await E(o, e);
51
+ return await o.done, a;
48
52
  },
49
53
  async appendMany(e) {
50
- const a = t.transaction(["actions", "sequence"], "readwrite"), n = [];
54
+ const o = t.transaction(["actions", "sequence"], "readwrite"), a = [];
51
55
  for (const s of e)
52
- n.push(await h(a, s));
53
- return await a.done, n;
56
+ a.push(await E(o, s));
57
+ return await o.done, a;
54
58
  },
55
59
  async readTail(e) {
56
- const a = t.transaction("actions", "readonly"), n = await a.store.index("position").getAll(IDBKeyRange.lowerBound(e, !0));
57
- return await a.done, n.map((s) => ({
58
- action: x(s),
60
+ const o = t.transaction("actions", "readonly"), a = await o.store.index("position").getAll(IDBKeyRange.lowerBound(e, !0));
61
+ return await o.done, a.map((s) => ({
62
+ action: g(s),
59
63
  position: s.position,
60
64
  added: s.updates
61
65
  }));
62
66
  },
63
67
  async lastPosition() {
64
- return (await t.get("sequence", m))?.value ?? 0;
68
+ return (await t.get("sequence", f))?.value ?? 0;
65
69
  },
66
70
  async getAll() {
67
- return (await t.getAll("actions")).map(x);
71
+ return (await t.getAll("actions")).map(g);
68
72
  },
69
73
  async getForEntity(e) {
70
- const a = t.transaction("actions", "readonly"), n = await a.store.index("subject_id").getAll(e);
71
- return await a.done, n.map(x).sort((c, l) => c.gsn - l.gsn);
74
+ const o = t.transaction("actions", "readonly"), a = await o.store.index("subject_id").getAll(e);
75
+ return await o.done, a.map(g).sort((u, i) => u.gsn - i.gsn);
72
76
  },
73
77
  async clear() {
74
78
  const e = t.transaction(["actions", "sequence"], "readwrite");
75
- await e.objectStore("actions").clear(), await e.objectStore("sequence").put({ id: m, value: 0 }), await e.done;
79
+ await e.objectStore("actions").clear(), await e.objectStore("sequence").put({ id: f, value: 0 }), await e.done;
76
80
  }
77
- }), q = (t) => t === void 0 ? null : v(t), Z = (t) => {
78
- const e = async (a) => q(await t.get("cursors", a));
81
+ }), v = (t) => t === void 0 ? null : h(t), ot = (t) => {
82
+ const e = async (o) => v(await t.get("cursors", o));
79
83
  return {
80
- async get(a) {
81
- return (await t.get("cursors", a))?.cursor ?? null;
84
+ async get(o) {
85
+ return (await t.get("cursors", o))?.cursor ?? null;
82
86
  },
83
- async set(a, n) {
84
- const s = await e(a);
85
- await t.put("cursors", { groupId: a, ...s, cursor: n });
87
+ async set(o, a) {
88
+ const s = await e(o);
89
+ await t.put("cursors", { groupId: o, ...s, cursor: a });
86
90
  },
87
- async getRecord(a) {
88
- return e(a);
91
+ async getRecord(o) {
92
+ return e(o);
89
93
  },
90
- async setRecord(a, n) {
91
- if (T(n)) {
92
- await t.delete("cursors", a);
94
+ async setRecord(o, a) {
95
+ if (Y(a)) {
96
+ await t.delete("cursors", o);
93
97
  return;
94
98
  }
95
99
  await t.put("cursors", {
96
- groupId: a,
97
- ...v(n)
100
+ groupId: o,
101
+ ...h(a)
98
102
  });
99
103
  },
100
104
  async records() {
101
- const a = await t.getAll("cursors"), n = /* @__PURE__ */ new Map();
102
- for (const s of a)
103
- n.set(s.groupId, q(s) ?? {});
104
- return n;
105
+ const o = await t.getAll("cursors"), a = /* @__PURE__ */ new Map();
106
+ for (const s of o)
107
+ a.set(s.groupId, v(s) ?? {});
108
+ return a;
105
109
  },
106
110
  async clear() {
107
111
  await t.clear("cursors");
108
112
  }
109
113
  };
110
- }, $ = (t) => ({
111
- async mark(e, a) {
112
- await t.get("dirty", e) || await t.put("dirty", { entityId: e, entityType: a });
114
+ }, at = (t) => ({
115
+ async mark(e, o) {
116
+ await t.get("dirty", e) || await t.put("dirty", { entityId: e, entityType: o });
113
117
  },
114
118
  async isDirty(e) {
115
119
  return await t.get("dirty", e) !== void 0;
116
120
  },
117
121
  async getDirtyForType(e) {
118
- return (await t.getAllFromIndex("dirty", "entityType", e)).map((n) => n.entityId);
122
+ return (await t.getAllFromIndex("dirty", "entityType", e)).map((a) => a.entityId);
119
123
  },
120
124
  async clear(e) {
121
125
  await t.delete("dirty", e);
@@ -123,86 +127,99 @@ const z = 8, m = "actionPosition", A = "replica", Q = (t, e, a, n) => {
123
127
  async clearAll() {
124
128
  await t.clear("dirty");
125
129
  }
126
- }), tt = (t, e, a) => {
127
- const n = (o) => structuredClone(o), s = async (o, r) => {
128
- r === null ? await t.delete("relationships", o) : await t.put("relationships", { key: o, rows: r });
129
- }, c = async (o) => {
130
- const r = await t.get("relationships", o.key);
131
- await s(o.key, L(r?.rows, o));
132
- }, l = async (o) => {
133
- const r = await t.get("relationships", o.key);
134
- await s(o.key, G(r?.rows, o));
135
- }, p = async (o, r) => {
136
- for (const u of [M(o, r), H(o, r)])
137
- u.remove !== null && await l(u.remove), u.add !== null && await c(u.add);
138
- }, y = async (o) => {
139
- if (!await a.isDirty(o)) return;
140
- const u = await e.getForEntity(o);
141
- if (u.length === 0) return;
142
- let w = null;
143
- for (const g of u)
144
- for (const S of g.updates)
145
- S.subject_id === o && (w = F(w, S, g.gsn, g.hlc));
146
- if (w === null) return;
147
- const D = await t.get("entities", o);
148
- await t.put("entities", n(w)), await p(D, w), await a.clear(o);
149
- }, i = async (o) => {
150
- for (const r of await a.getDirtyForType(o))
151
- await y(r);
152
- }, d = async (o) => {
153
- const r = await t.get("relationships", o);
154
- return B(r?.rows);
130
+ }), nt = (t, e, o) => {
131
+ const a = (n) => ({
132
+ ...structuredClone(n),
133
+ components: k(n)
134
+ }), s = (n) => {
135
+ const { components: r, ...l } = n;
136
+ return l;
137
+ }, u = async (n) => {
138
+ const r = await t.get("entities", n);
139
+ return r === void 0 ? void 0 : s(r);
140
+ }, i = async (n, r) => {
141
+ r === null ? await t.delete("relationships", n) : await t.put("relationships", { key: n, rows: r });
142
+ }, y = async (n) => {
143
+ const r = await t.get("relationships", n.key);
144
+ await i(n.key, H(r?.rows, n));
145
+ }, w = async (n) => {
146
+ const r = await t.get("relationships", n.key);
147
+ await i(n.key, F(r?.rows, n));
148
+ }, c = async (n, r) => {
149
+ for (const l of [P(n, r), B(n, r)])
150
+ l.remove !== null && await w(l.remove), l.add !== null && await y(l.add);
151
+ }, p = async (n) => {
152
+ if (!await o.isDirty(n)) return;
153
+ const l = await e.getForEntity(n);
154
+ if (l.length === 0) return;
155
+ const S = M(l, n);
156
+ if (S === null) return;
157
+ const q = await u(n);
158
+ await t.put("entities", a(S)), await c(q, S), await o.clear(n);
159
+ }, d = async (n) => {
160
+ for (const r of await o.getDirtyForType(n))
161
+ await p(r);
162
+ }, m = async (n) => {
163
+ const r = await t.get("relationships", n);
164
+ return C(r?.rows);
155
165
  };
156
166
  return {
157
- async get(o) {
158
- await y(o);
159
- const r = await t.get("entities", o);
160
- return r ? n(r) : null;
167
+ async get(n) {
168
+ await p(n);
169
+ const r = await t.get("entities", n);
170
+ return r === void 0 ? null : s(r);
171
+ },
172
+ async set(n) {
173
+ const r = await u(n.id);
174
+ await t.put("entities", a(n)), await c(r, n);
161
175
  },
162
- async set(o) {
163
- const r = await t.get("entities", o.id);
164
- await t.put("entities", n(o)), await p(r, o);
176
+ async query(n) {
177
+ return await d(n), (await t.getAllFromIndex("entities", "type", n)).map(s);
165
178
  },
166
- async query(o) {
167
- return await i(o), (await t.getAllFromIndex("entities", "type", o)).map(n);
179
+ async queryByComponent(n) {
180
+ return await d(z(n)), (await t.getAllFromIndex("entities", "components", n)).filter((l) => l.deleted_hlc === null).map((l) => l.id).sort();
168
181
  },
169
182
  async queryByRelationship({
170
- as: o,
183
+ as: n,
171
184
  type: r,
172
- targetId: u
185
+ targetId: l
173
186
  }) {
174
- return await i(I), d(U(o, r, u));
187
+ return await d(j), m(G(n, r, l));
175
188
  },
176
189
  async queryByRelationshipSource({
177
- as: o,
190
+ as: n,
178
191
  type: r,
179
- sourceId: u
192
+ sourceId: l
180
193
  }) {
181
- await i(I);
182
- const w = await t.get("relationships", R(o, r, u));
183
- return C(w?.rows);
194
+ await d(j);
195
+ const S = await t.get("relationships", R(n, r, l));
196
+ return b(S?.rows);
184
197
  },
185
- async queryByMembership(o) {
186
- return await i(j), d(K(o));
198
+ async queryByMembership(n) {
199
+ return await d(x), m(L(n));
187
200
  },
188
- async queryByMembershipEntity(o) {
189
- await i(j);
190
- const r = await t.get("relationships", N(o));
191
- return P(r?.rows);
201
+ async queryByMembershipEntity(n) {
202
+ await d(x);
203
+ const r = await t.get("relationships", T(n));
204
+ return N(r?.rows);
192
205
  },
193
206
  async reset() {
194
207
  await t.clear("relationships"), await t.clear("entities");
195
208
  }
196
209
  };
197
- }, E = (t) => ({
210
+ }, st = (t) => ({
211
+ ...t,
212
+ scope: t.scope ?? "field",
213
+ remoteActions: t.remoteActions ?? []
214
+ }), _ = (t) => ({
198
215
  action: t.action,
199
216
  status: t.status,
200
217
  enqueuedAtHlc: t.enqueuedAtHlc,
201
218
  // A row predating the field reads as "always concurrent", never
202
219
  // silently dropped.
203
220
  basedOnGsn: t.basedOnGsn ?? 0,
204
- conflict: t.conflict
205
- }), et = (t) => ({
221
+ conflict: t.conflict === void 0 ? void 0 : st(t.conflict)
222
+ }), rt = (t) => ({
206
223
  async put(e) {
207
224
  await t.put("outbox", {
208
225
  action: e.action,
@@ -212,22 +229,22 @@ const z = 8, m = "actionPosition", A = "replica", Q = (t, e, a, n) => {
212
229
  conflict: e.conflict
213
230
  });
214
231
  },
215
- async putAndDelete(e, a) {
216
- const n = t.transaction("outbox", "readwrite");
217
- n.store.put({
232
+ async putAndDelete(e, o) {
233
+ const a = t.transaction("outbox", "readwrite");
234
+ a.store.put({
218
235
  action: e.action,
219
236
  status: e.status,
220
237
  enqueuedAtHlc: e.enqueuedAtHlc,
221
238
  basedOnGsn: e.basedOnGsn,
222
239
  conflict: e.conflict
223
- }), n.store.delete(a), await n.done;
240
+ }), a.store.delete(o), await a.done;
224
241
  },
225
242
  async list() {
226
- return (await t.getAll("outbox")).map(E).sort((a, n) => V(a.enqueuedAtHlc, n.enqueuedAtHlc));
243
+ return (await t.getAll("outbox")).map(_).sort((o, a) => X(o.enqueuedAtHlc, a.enqueuedAtHlc));
227
244
  },
228
245
  async get(e) {
229
- const a = await t.get("outbox", e);
230
- return a === void 0 ? null : E(a);
246
+ const o = await t.get("outbox", e);
247
+ return o === void 0 ? null : _(o);
231
248
  },
232
249
  async delete(e) {
233
250
  await t.delete("outbox", e);
@@ -235,101 +252,107 @@ const z = 8, m = "actionPosition", A = "replica", Q = (t, e, a, n) => {
235
252
  async clear() {
236
253
  await t.clear("outbox");
237
254
  }
238
- }), at = (t) => ({
255
+ }), it = (t) => ({
239
256
  async load() {
240
- const e = t.transaction(["replica", "replicaCursor"], "readonly"), a = await e.objectStore("replicaCursor").get(A);
241
- if (a === void 0)
257
+ const e = t.transaction(["replica", "replicaCursor"], "readonly"), o = await e.objectStore("replicaCursor").get(A);
258
+ if (o === void 0)
242
259
  return await e.done, null;
243
- const n = await e.objectStore("replica").getAll();
260
+ const a = await e.objectStore("replica").getAll();
244
261
  await e.done;
245
262
  const s = {
246
- format: a.format,
247
- position: a.position,
248
- revision: a.revision,
249
- entities: n
263
+ format: o.format,
264
+ position: o.position,
265
+ revision: o.revision,
266
+ entities: a
250
267
  };
251
- return Y(s) ? s : null;
268
+ return K(s) ? s : null;
252
269
  },
253
270
  async save(e) {
254
- const a = t.transaction(["replica", "replicaCursor"], "readwrite"), n = a.objectStore("replica");
255
- await n.clear();
271
+ const o = t.transaction(["replica", "replicaCursor"], "readwrite"), a = o.objectStore("replica");
272
+ await a.clear();
256
273
  for (const s of e.entities)
257
- await n.put(s);
258
- await a.objectStore("replicaCursor").put({
274
+ await a.put(s);
275
+ await o.objectStore("replicaCursor").put({
259
276
  id: A,
260
277
  format: e.format,
261
278
  position: e.position,
262
279
  revision: e.revision
263
- }), await a.done;
280
+ }), await o.done;
264
281
  },
265
282
  async clear() {
266
283
  const e = t.transaction(["replica", "replicaCursor"], "readwrite");
267
284
  await e.objectStore("replica").clear(), await e.objectStore("replicaCursor").clear(), await e.done;
268
285
  }
269
- }), it = async (t = {}) => {
270
- const e = t.dbName ?? "ebb-storage", a = await b(e, z, {
271
- upgrade: Q
272
- }), n = X(a), s = $(a), c = tt(a, n, s), l = Z(a), p = et(a), y = at(a);
286
+ }), yt = async (t = {}) => {
287
+ const e = t.dbName ?? "ebb-storage", o = await O(e, Q, {
288
+ upgrade: Z
289
+ }), a = et(o), s = at(o), u = nt(o, a, s), i = ot(o), y = rt(o), w = it(o);
273
290
  return {
274
291
  actions: {
275
- async append(i) {
276
- const d = await n.append(i);
277
- for (const f of i.updates)
278
- await s.mark(f.subject_id, f.subject_type);
279
- return d;
292
+ async append(c) {
293
+ const p = await a.append(c);
294
+ for (const d of c.updates)
295
+ await s.mark(
296
+ d.subject_id,
297
+ I(d, await u.get(d.subject_id))
298
+ );
299
+ return p;
280
300
  },
281
- async appendMany(i) {
282
- const d = await n.appendMany(i);
283
- for (const f of i)
284
- for (const o of f.updates)
285
- await s.mark(o.subject_id, o.subject_type);
286
- return d;
301
+ async appendMany(c) {
302
+ const p = await a.appendMany(c);
303
+ for (const d of c)
304
+ for (const m of d.updates)
305
+ await s.mark(
306
+ m.subject_id,
307
+ I(m, await u.get(m.subject_id))
308
+ );
309
+ return p;
287
310
  },
288
- async readTail(i) {
289
- return n.readTail(i);
311
+ async readTail(c) {
312
+ return a.readTail(c);
290
313
  },
291
314
  async lastPosition() {
292
- return n.lastPosition();
315
+ return a.lastPosition();
293
316
  },
294
317
  async getAll() {
295
- return n.getAll();
318
+ return a.getAll();
296
319
  },
297
- async getForEntity(i) {
298
- return n.getForEntity(i);
320
+ async getForEntity(c) {
321
+ return a.getForEntity(c);
299
322
  },
300
323
  async clear() {
301
- await n.clear(), await s.clearAll(), await c.reset(), await y.clear();
324
+ await a.clear(), await s.clearAll(), await u.reset(), await w.clear();
302
325
  }
303
326
  },
304
- entities: c,
327
+ entities: u,
305
328
  dirtyTracker: {
306
- async mark(i, d) {
307
- await s.mark(i, d);
329
+ async mark(c, p) {
330
+ await s.mark(c, p);
308
331
  },
309
- async isDirty(i) {
310
- return s.isDirty(i);
332
+ async isDirty(c) {
333
+ return s.isDirty(c);
311
334
  },
312
- async getDirtyForType(i) {
313
- return s.getDirtyForType(i);
335
+ async getDirtyForType(c) {
336
+ return s.getDirtyForType(c);
314
337
  },
315
- async clear(i) {
316
- await s.clear(i);
338
+ async clear(c) {
339
+ await s.clear(c);
317
340
  },
318
341
  async clearAll() {
319
342
  await s.clearAll();
320
343
  }
321
344
  },
322
- cursors: l,
323
- outbox: p,
324
- replica: y,
325
- async isDirty(i) {
326
- return s.isDirty(i);
345
+ cursors: i,
346
+ outbox: y,
347
+ replica: w,
348
+ async isDirty(c) {
349
+ return s.isDirty(c);
327
350
  },
328
351
  async reset() {
329
- await n.clear(), await s.clearAll(), await c.reset(), await y.clear(), await l.clear();
352
+ await a.clear(), await s.clearAll(), await u.reset(), await w.clear(), await i.clear();
330
353
  }
331
354
  };
332
355
  };
333
356
  export {
334
- it as createIndexedDBAdapter
357
+ yt as createIndexedDBAdapter
335
358
  };