datafolder 1.0.41 → 1.0.43

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.
Files changed (56) hide show
  1. package/ChangeLog.md +4 -0
  2. package/package.json +1 -1
  3. package/scripts/airbnb_queries.js +1 -1
  4. package/src/QyAcl.js +78 -83
  5. package/src/QyAclSaver.js +11 -9
  6. package/src/QyAclSaver_Worker.d.ts +3 -3
  7. package/src/QyAclSaver_Worker.js +8 -8
  8. package/src/QyCache.d.ts +1 -1
  9. package/src/QyCache.js +69 -71
  10. package/src/QyDir.d.ts +3 -3
  11. package/src/QyDir.js +134 -129
  12. package/src/QyEmbeddings.d.ts +3 -2
  13. package/src/QyEmbeddings.js +56 -47
  14. package/src/QyExpire.d.ts +9 -5
  15. package/src/QyExpire.js +39 -32
  16. package/src/QyExpireProcessor.d.ts +4 -0
  17. package/src/QyExpireProcessor.js +22 -0
  18. package/src/QyExpireProcessor_Worker.d.ts +19 -0
  19. package/src/QyExpireProcessor_Worker.js +111 -0
  20. package/src/QyExpire_Worker.d.ts +5 -5
  21. package/src/QyExpire_Worker.js +21 -21
  22. package/src/QyFileLogger.d.ts +1 -1
  23. package/src/QyFileLogger.js +14 -14
  24. package/src/QyIndexPropTree.d.ts +0 -1
  25. package/src/QyIndexPropTree.js +45 -47
  26. package/src/QyIntersectNode.d.ts +1 -1
  27. package/src/QyIntersectNode.js +2 -2
  28. package/src/QyKVData.d.ts +2 -2
  29. package/src/QyKVData.js +81 -77
  30. package/src/QyKVDataCleaner.js +13 -11
  31. package/src/QyKVDataCleaner_Worker.d.ts +4 -0
  32. package/src/QyKVDataCleaner_Worker.js +55 -43
  33. package/src/QyKVDataSaver.js +14 -12
  34. package/src/QyKVDataSaver_Worker.d.ts +4 -4
  35. package/src/QyKVDataSaver_Worker.js +12 -12
  36. package/src/QyLogFileSaver.js +10 -12
  37. package/src/QyLogFileSaver_Worker.d.ts +2 -0
  38. package/src/QyLogFileSaver_Worker.js +12 -6
  39. package/src/QyMessageWorker.js +21 -28
  40. package/src/QyMessager.d.ts +2 -2
  41. package/src/QyMessager.js +59 -59
  42. package/src/QySnapshotCompactor.js +13 -15
  43. package/src/QySnapshotCompactor_Worker.d.ts +2 -0
  44. package/src/QySnapshotCompactor_Worker.js +10 -3
  45. package/src/QySnapshotSaver.js +12 -14
  46. package/src/QySnapshotSaver_Worker.d.ts +3 -3
  47. package/src/QySnapshotSaver_Worker.js +23 -23
  48. package/src/QySnapshots.js +170 -162
  49. package/src/QyTrigger.d.ts +2 -2
  50. package/src/QyTrigger.js +58 -64
  51. package/src/QyUnionNode.d.ts +7 -5
  52. package/src/QyUnionNode.js +52 -53
  53. package/src/QyUtils.d.ts +2 -1
  54. package/src/QyUtils.js +45 -27
  55. package/static/codemirror.bundle/editor.bundle.js +12 -3
  56. package/test/testQyGraphQL.js +7 -5
@@ -8,70 +8,68 @@ class o {
8
8
  name;
9
9
  parent;
10
10
  children;
11
- childCount = 0;
12
11
  constructor(e = void 0, i = void 0) {
13
12
  this.name = e, this.parent = i;
14
13
  }
15
14
  insertPropPath(e, i = void 0) {
16
- let t = this;
17
- for (var r of e) t = u(t, r);
18
- if (void 0 === t.indexPropPath) return t.indexPropPath = e, void 0 !== i && (t.indexPropDir = i.searchOrCreateSubdir(e)),
19
- t;
15
+ let r = this;
16
+ for (var t of e) r = P(r, t);
17
+ if (void 0 === r.indexPropPath) return r.indexPropPath = e, void 0 !== i && (r.indexPropDir = i.searchOrCreateSubdir(e)),
18
+ r;
20
19
  }
21
- insertQueryNode(e, i, t = void 0, r = void 0) {
22
- if (void 0 === (o = e) || l(o) || v(o) || P(o)) void 0 === this.indexPropPath && void 0 !== r && (this.indexPropPath = r.getRelativeNamePath(t),
23
- this.indexPropDir = r, i.push(this)); else {
20
+ insertQueryNode(e, i, r = void 0, t = void 0) {
21
+ if (void 0 === (o = e) || l(o) || v(o) || u(o)) void 0 === this.indexPropPath && void 0 !== t && (this.indexPropPath = t.getRelativeNamePath(r),
22
+ this.indexPropDir = t, i.push(this)); else {
24
23
  var o = e.$or || e.$and;
25
- if (void 0 !== o) if (s(o)) for (var n of o) this.insertQueryNode(n, i, t, r); else this.insertQueryNode(o, i, t, r); else for (var d in e) {
26
- var a = u(this, d), h = (r ?? t).getOrCreateSubdir(d);
27
- a.insertQueryNode(e[d], i, t, h);
24
+ if (void 0 !== o) if (s(o)) for (var n of o) this.insertQueryNode(n, i, r, t); else this.insertQueryNode(o, i, r, t); else for (var d in e) {
25
+ var a = P(this, d), h = (t ?? r).getOrCreateSubdir(d);
26
+ a.insertQueryNode(e[d], i, r, h);
28
27
  }
29
28
  }
30
29
  }
31
30
  removePropPath(e) {
32
- let r = this, i = !1, o = !1;
33
- for (var t of e) {
34
- void 0 !== r.indexPropPath && (i = !0);
35
- var n = r.children;
36
- if (void 0 === (r = void 0 !== n && n[t])) break;
31
+ let t = this, i = !1, o = !1;
32
+ for (var r of e) {
33
+ void 0 !== t.indexPropPath && (i = !0);
34
+ var n = t.children;
35
+ if (void 0 === (t = void 0 !== n && n.get(r))) break;
37
36
  }
38
- if (void 0 !== r) {
37
+ if (void 0 !== t) {
39
38
  let {
40
39
  parent: e,
41
40
  name: i,
42
- indexPropPath: t
43
- } = r;
44
- void 0 !== t && (o = !0, r.indexPropPath = void 0), e && d(r) && !function e(i, t) {
41
+ indexPropPath: r
42
+ } = t;
43
+ void 0 !== r && (o = !0, t.indexPropPath = void 0), e && d(t) && !function e(i, r) {
45
44
  let {
46
- children: r,
45
+ children: t,
47
46
  parent: o,
48
47
  name: n
49
48
  } = i;
50
- r[t] && (delete r[t], 0 == --i.childCount && (i.children = void 0),
51
- o) && d(i) && e(o, n);
49
+ t.delete(r) && (0 === t.size && (i.children = void 0), o) && d(i) && e(o, n);
52
50
  }(e, i);
53
51
  }
54
- return [ o, i, r ];
52
+ return [ o, i, t ];
55
53
  }
56
- getAllLeafNodes(e) {
54
+ getAllLeafNodes(i) {
57
55
  var {
58
- children: i,
59
- indexPropPath: t
56
+ children: e,
57
+ indexPropPath: r
60
58
  } = this;
61
- if (void 0 !== t) e.push(this); else if (void 0 !== i) for (var r in i) i[r].getAllLeafNodes(e);
59
+ void 0 !== r ? i.push(this) : void 0 !== e && e.values().forEach(e => e.getAllLeafNodes(i));
62
60
  }
63
61
  }
64
62
 
65
- function u(e, i) {
66
- let t = e.children, r = (t = void 0 === t ? e.children = {} : t)[i];
67
- return void 0 === r && (r = t[i] = new o(i, e), ++e.childCount), r;
63
+ function P(e, i) {
64
+ let r = e.children, t = (r = void 0 === r ? e.children = new Map() : r).get(i);
65
+ return void 0 === t && r.set(i, t = new o(i, e)), t;
68
66
  }
69
67
 
70
68
  function d(e) {
71
- return void 0 === e.indexPropPath && 0 === e.childCount;
69
+ return void 0 === e.indexPropPath && (void 0 === e.children || 0 === e.children.size);
72
70
  }
73
71
 
74
- function P(e) {
72
+ function u(e) {
75
73
  return void 0 !== e && void 0 !== (e.$gt ?? e.$lt ?? e.$gte ?? e.$lte);
76
74
  }
77
75
 
@@ -89,27 +87,27 @@ class e {
89
87
  if (0 < (e = s(e) ? e : [ e ]).length) {
90
88
  var {
91
89
  rootNode: i,
92
- _index_dir: t
93
- } = this, i = i.insertPropPath(e, t);
90
+ _index_dir: r
91
+ } = this, i = i.insertPropPath(e, r);
94
92
  if (void 0 !== i) return ++this.changeCount, i;
95
93
  }
96
94
  }
97
95
  insertPropPathList(e) {
98
- var i, t = this.nodeList;
99
- t.length = 0;
96
+ var i, r = this.nodeList;
97
+ r.length = 0;
100
98
  for (i of e) {
101
- var r = this.insertPropPath(i);
102
- void 0 !== r && t.push(r);
99
+ var t = this.insertPropPath(i);
100
+ void 0 !== t && r.push(t);
103
101
  }
104
- return t;
102
+ return r;
105
103
  }
106
104
  insertQueryObj(e) {
107
105
  var {
108
106
  nodeList: i,
109
- rootNode: t,
110
- _index_dir: r
107
+ rootNode: r,
108
+ _index_dir: t
111
109
  } = this;
112
- return i.length = 0, t.insertQueryNode(e, i, r), i;
110
+ return i.length = 0, r.insertQueryNode(e, i, t), i;
113
111
  }
114
112
  removePropPath(e) {
115
113
  s(e) || (e = [ e ]);
@@ -120,15 +118,15 @@ class e {
120
118
  var {
121
119
  _cachedChangeCount: e,
122
120
  _allLeafNodes: i,
123
- rootNode: t,
124
- changeCount: r
121
+ rootNode: r,
122
+ changeCount: t
125
123
  } = this;
126
- return e !== r && (i.length = 0, t.getAllLeafNodes(i), this._cachedChangeCount = r),
124
+ return e !== t && (i.length = 0, r.getAllLeafNodes(i), this._cachedChangeCount = t),
127
125
  i;
128
126
  }
129
127
  }
130
128
 
131
129
  export {
132
- P as isCmpObj,
130
+ u as isCmpObj,
133
131
  e as QyIndexPropTree
134
132
  };
@@ -3,6 +3,6 @@ export declare class QyIntersectNode extends QyQueryNode {
3
3
  sorted: boolean;
4
4
  constructor();
5
5
  containsFile(fileName: any): any;
6
- getFiles(queryCounter: any, resultMap?: {}): Generator<any, void, unknown>;
6
+ getFiles(queryCounter: any, resultSet?: Set<unknown>): Generator<any, void, unknown>;
7
7
  addNode(node: any): void;
8
8
  }
@@ -14,14 +14,14 @@ class i extends n {
14
14
  } = this;
15
15
  if (0 !== e && 0 !== t.length) return s(this), t[0].containsFile(n) && r(t, n);
16
16
  }
17
- *getFiles(n, t = {}) {
17
+ *getFiles(n, t = new Set()) {
18
18
  var {
19
19
  nodeList: e,
20
20
  indexCount: i
21
21
  } = this;
22
22
  if (0 !== i && 0 !== e.length) {
23
23
  s(this);
24
- for (var o of e[0].getFiles()) if (!(o in t) && r(e, o) && this.encounterOne(t, o, n) && (yield o,
24
+ for (var o of e[0].getFiles()) if (!t.has(o) && r(e, o) && this.encounterOne(t, o, n) && (yield o,
25
25
  n?.isFull)) return;
26
26
  }
27
27
  }
package/src/QyKVData.d.ts CHANGED
@@ -31,8 +31,8 @@ export declare class QyKVData {
31
31
  decreaseChangeId(): void;
32
32
  getValueSync(key: any): any;
33
33
  removeKey(key: any): true | undefined;
34
- onSnapshotSavedChangeId(snapshotSavedChangeId: any, pMOnlySnapshot?: any): void;
35
- onCompactUpdates(compactUpdates: any): void;
34
+ _on_snapshotSavedChangeId(snapshotSavedChangeId: any, pMOnlySnapshot: any): void;
35
+ _on_compactUpdates(compactUpdates: any): void;
36
36
  monitorContentExpire(file: any, flattedAbsTimeObj: any): void;
37
37
  unmonitorContentExpire(file: any, flattedDelObj: any): void;
38
38
  monitorItemExpire(item: any, expireTime: any): void;
package/src/QyKVData.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "node:path";
4
4
 
5
5
  import {
6
- open as f
6
+ open as y
7
7
  } from "node:fs/promises";
8
8
 
9
9
  import {
@@ -23,8 +23,8 @@ import {
23
23
  } from "./QyKVDataCleaner.js";
24
24
 
25
25
  import {
26
- readBufferAsync as y,
27
- sleep as d
26
+ readBufferAsync as S,
27
+ sleep as l
28
28
  } from "./QyUtils.js";
29
29
 
30
30
  import {
@@ -78,7 +78,7 @@ class t {
78
78
  } = o;
79
79
  return s.start(t, h, a, e), i.start(), r.start(), p.start(), this.maxChangeId = t,
80
80
  this.snapshotSavedChangeId = c, this.qySnapshots = o, this.aclKeyValueMap = e,
81
- this.compactInterval = setInterval(() => l(this), n.compactSnapshotsInterval),
81
+ this.compactInterval = setInterval(() => d(this), n.compactSnapshotsInterval),
82
82
  this.unloadInterval = setInterval(() => (async o => {
83
83
  if (!o.unloadingMemory) {
84
84
  o.unloadingMemory = !0;
@@ -91,7 +91,7 @@ class t {
91
91
  var s, i = n.maxFileCountToUnload, n = e.rootDir;
92
92
  a = m(o, n), t = a;
93
93
  for (s of n.allLoadedSubdirs()) if ((a += m(o, s)) > i && (t += a,
94
- a = 0, await d(0), o.isStopping)) break;
94
+ a = 0, await l(0), o.isStopping)) break;
95
95
  }
96
96
  t += a, global.gc && global.gc(), o.unloadingMemory = !1;
97
97
  }
@@ -102,37 +102,37 @@ class t {
102
102
  } = t;
103
103
  console.time("bgLoadPosMaps");
104
104
  for (a of Object.keys(o.numToSnapshotMap).sort((t, a) => a - t)) {
105
- if (await async function s(i, r, p = void 0, h = void 0, c = void 0, d = void 0) {
106
- if (i.isStopping) return void (d && d.close());
107
- let l = i.qySnapshots;
108
- let m = l.numToSnapshotMap;
109
- let v = m[r];
110
- if (void 0 === v) return void (d && d.close());
105
+ if (await async function s(i, r, p = void 0, h = void 0, c = void 0, l = void 0) {
106
+ if (i.isStopping) return void (l && l.close());
107
+ let d = i.qySnapshots;
108
+ let m = d.numToSnapshotMap;
109
+ let u = m[r];
110
+ if (void 0 === u) return void (l && l.close());
111
111
  let {
112
- info: u,
113
- prefixPM: S
114
- } = v;
115
- void 0 === p && (p = Object.keys(S).sort().reverse());
116
- if (0 === p.length) return void (d && d.close());
117
- if (void 0 === h || h !== u.pMVersion) return d && d.close(),
118
- c = l.getPMFilePath(v), s(i, r, p, u.pMVersion, c, await f(c));
112
+ info: v,
113
+ prefixPM: f
114
+ } = u;
115
+ void 0 === p && (p = Object.keys(f).sort().reverse());
116
+ if (0 === p.length) return void (l && l.close());
117
+ if (void 0 === h || h !== v.pMVersion) return l && l.close(),
118
+ c = d.getPMFilePath(u), s(i, r, p, v.pMVersion, c, await y(c));
119
119
  for (;0 < p.length; ) {
120
- let e = p.at(-1), n = S[e];
120
+ let e = p.at(-1), n = f[e];
121
121
  if (n) {
122
- let [ t, a ] = n, o = await y(c, d, t, a);
123
- if (i.isStopping || void 0 === m[r]) return void d.close();
124
- if (h !== u.pMVersion) return d.close(), s(i, r, p);
125
- e in S && l.loadPartialPosMapBuffer(v, e, o);
122
+ let [ t, a ] = n, o = await S(c, l, t, a);
123
+ if (i.isStopping || void 0 === m[r]) return void l.close();
124
+ if (h !== v.pMVersion) return l.close(), s(i, r, p);
125
+ e in f && d.loadPartialPosMapBuffer(u, e, o);
126
126
  }
127
127
  p.pop();
128
128
  }
129
- d.close();
129
+ l.close();
130
130
  C.info("bgLoadPosMap:" + r);
131
131
  }(t, a), t.isStopping) break;
132
- if (await d(0), t.isStopping) break;
132
+ if (await l(0), t.isStopping) break;
133
133
  }
134
- console.timeEnd("bgLoadPosMaps"), !t.isStopping && e.compactAtStart && l(t);
135
- })(this) : n.compactAtStart && l(this), this;
134
+ console.timeEnd("bgLoadPosMaps"), !t.isStopping && e.compactAtStart && d(t);
135
+ })(this) : n.compactAtStart && d(this), this;
136
136
  }
137
137
  async stop() {
138
138
  this.isStopping = !0;
@@ -145,13 +145,13 @@ class t {
145
145
  qyKVDataCleaner: s,
146
146
  qyExpire: i
147
147
  } = this;
148
- clearInterval(e), clearInterval(n), await i.stop(), this.onSnapshotSavedChangeId(await t.stop()),
148
+ clearInterval(e), clearInterval(n), await i.stop(), c(this, await t.stop()),
149
149
  o && o.closeAllFDs(), await a.stop(), await s.stop();
150
150
  }
151
151
  save(t, a, o, e) {
152
152
  var n = this.qyKVDataSaver;
153
- if (e) return n.callSave(t, a, o);
154
- n.castSave(t, a, o);
153
+ if (e) return n.call_save(t, a, o);
154
+ n.cast_save(t, a, o);
155
155
  }
156
156
  increaseChangeId() {
157
157
  return ++this.maxChangeId;
@@ -174,28 +174,14 @@ class t {
174
174
  if (!(t in o)) return a.removeKey(t);
175
175
  o[t] = void 0;
176
176
  }
177
- onSnapshotSavedChangeId(t, a = void 0) {
178
- this.snapshotSavedChangeId = t;
179
- var {
180
- compactState: o,
181
- compactMaxChangeId: e,
182
- qyKVDataSaver: n
183
- } = this;
184
- if (3 === o && e <= t && (x(this), this.compactState = 1), a) {
185
- var s, o = a, i = this.qySnapshots, r = i.keyToSnapshotMap;
186
- for (s in o.posMap) {
187
- var p = r[s];
188
- p && i.removeKeyFromSnapshot(p, s);
189
- }
190
- i.addMaxSnapshot(o), C.info("addPMOnlySnapshot: " + i.snapshotMaxChangeId),
191
- n.releaseSnapshot(a.snapshotNum);
192
- }
177
+ _on_snapshotSavedChangeId(t, a) {
178
+ c(this, t, a);
193
179
  }
194
- onCompactUpdates(t) {
180
+ _on_compactUpdates(t) {
195
181
  if (2 === this.compactState) {
196
- var d = this, [ t, l, m ] = t = t;
182
+ var l = this, [ t, d, m ] = t = t;
197
183
  if (t) {
198
- var a = t, o = d.qySnapshots.numToSnapshotMap;
184
+ var a = t, o = l.qySnapshots.numToSnapshotMap;
199
185
  for (s in a) {
200
186
  var e, n = a[s], s = o[s], {
201
187
  prefixPM: i,
@@ -212,52 +198,52 @@ class t {
212
198
  })(s);
213
199
  }
214
200
  }
215
- if (l) {
216
- var p = l, h = (t = d).qySnapshots.numToSnapshotMap;
217
- for (f in p) {
218
- var c, v, {
219
- posMap: u,
220
- prefixPM: S
221
- } = p[f], f = h[f], {
222
- posMap: y,
201
+ if (d) {
202
+ var p = d, h = (t = l).qySnapshots.numToSnapshotMap;
203
+ for (y in p) {
204
+ var c, u, {
205
+ posMap: v,
206
+ prefixPM: f
207
+ } = p[y], y = h[y], {
208
+ posMap: S,
223
209
  prefixPM: C,
224
210
  info: g
225
- } = f;
211
+ } = y;
226
212
  for (c in ++g.pMVersion, ++g.vLVersion, g.verList[0] = g.pMVersion + g.vLVersion,
227
- y) y[c] = u[c];
228
- for (v in C) C[v] = S[v];
229
- V(f);
213
+ S) S[c] = v[c];
214
+ for (u in C) C[u] = f[u];
215
+ x(y);
230
216
  }
231
217
  }
232
218
  if (m) {
233
- var M, l = m;
234
- let e = d.qySnapshots, {
219
+ var M, d = m;
220
+ let e = l.qySnapshots, {
235
221
  numToSnapshotMap: n,
236
222
  keyToSnapshotMap: s
237
223
  } = e, {
238
224
  snapshotNum: t,
239
225
  combinedSnapshotNumVerList: a,
240
226
  posMap: i
241
- } = l, r = n[t], {
227
+ } = d, r = n[t], {
242
228
  posMap: p,
243
229
  info: o
244
230
  } = r;
245
231
  for (M in ++o.pMVersion, ++o.vLVersion, o.verList[0] = o.pMVersion + o.vLVersion,
246
232
  p) p[M] = i[M];
247
- V(r);
233
+ x(r);
248
234
  let h = o.totalCount, c = r.outdatedCount;
249
235
  for (let [ o ] of a) {
250
- var q, I = n[o];
236
+ var q, V = n[o];
251
237
  let {
252
238
  posMap: t,
253
239
  info: a
254
- } = I;
240
+ } = V;
255
241
  for (q in t) p[q] = i[q], s[q] = r;
256
- V(I), h += a.totalCount, c += I.outdatedCount, e.delSnapshot(I);
242
+ x(V), h += a.totalCount, c += V.outdatedCount, e.delSnapshot(V);
257
243
  }
258
244
  o.totalCount = h, r.outdatedCount = c;
259
245
  }
260
- this.snapshotSavedChangeId >= this.compactMaxChangeId ? (x(this), this.compactState = 1) : this.compactState = 3;
246
+ this.snapshotSavedChangeId >= this.compactMaxChangeId ? (I(this), this.compactState = 1) : this.compactState = 3;
261
247
  }
262
248
  }
263
249
  monitorContentExpire(t, a) {
@@ -274,7 +260,25 @@ class t {
274
260
  }
275
261
  }
276
262
 
277
- function V(t) {
263
+ function c(t, a, o = void 0) {
264
+ t.snapshotSavedChangeId = a;
265
+ var {
266
+ compactState: e,
267
+ compactMaxChangeId: n,
268
+ qyKVDataSaver: s
269
+ } = t;
270
+ if (3 === e && n <= a && (I(t), t.compactState = 1), o) {
271
+ var i, e = o, r = t.qySnapshots, p = r.keyToSnapshotMap;
272
+ for (i in e.posMap) {
273
+ var h = p[i];
274
+ h && r.removeKeyFromSnapshot(h, i);
275
+ }
276
+ r.addMaxSnapshot(e), C.info("addPMOnlySnapshot: " + r.snapshotMaxChangeId),
277
+ s.cast_releaseSnapshot(o.snapshotNum);
278
+ }
279
+ }
280
+
281
+ function x(t) {
278
282
  var {
279
283
  info: a,
280
284
  compactOutedCount: o
@@ -283,7 +287,7 @@ function V(t) {
283
287
  t.compactOutedCount = 0;
284
288
  }
285
289
 
286
- function l(t) {
290
+ function d(t) {
287
291
  if (1 === t.compactState) {
288
292
  var {
289
293
  maxChangeId: a,
@@ -293,9 +297,9 @@ function l(t) {
293
297
  if (0 < n.length || 0 < s.length || 0 < i.length) {
294
298
  t.compactState = 2, t.compactMaxChangeId = a;
295
299
  for (var r of [ s, i, n ]) for (var p of r) p.compactOutedCount = p.outdatedCount;
296
- e.compactSnapshots(s, i, n);
300
+ e.cast_compactSnapshots(s, i, n);
297
301
  }
298
- 0 < o.length && (t.emptySnapshotNumVerList.push(...o), t.snapshotSavedChangeId >= a ? c(t) : 1 === t.compactState && (t.compactState = 3,
302
+ 0 < o.length && (t.emptySnapshotNumVerList.push(...o), t.snapshotSavedChangeId >= a ? u(t) : 1 === t.compactState && (t.compactState = 3,
299
303
  t.compactMaxChangeId = a));
300
304
  }
301
305
  }
@@ -307,16 +311,16 @@ function m(t, a) {
307
311
  return e;
308
312
  }
309
313
 
310
- function c(t) {
314
+ function u(t) {
311
315
  var {
312
316
  qyKVDataCleaner: t,
313
317
  emptySnapshotNumVerList: a
314
318
  } = t;
315
- 0 < a.length && (t.removeSnapshotsFiles(a), a.length = 0);
319
+ 0 < a.length && (t.cast_removeSnapshotsFiles(a), a.length = 0);
316
320
  }
317
321
 
318
- function x(t) {
319
- t.qySnapshotCompactor.saveSnapshotInfos(), c(t);
322
+ function I(t) {
323
+ t.qySnapshotCompactor.cast_saveSnapshotInfos(), u(t);
320
324
  }
321
325
 
322
326
  export {
@@ -3,21 +3,23 @@ import {
3
3
  } from "./QyMessager.js";
4
4
 
5
5
  import {
6
- getDefaultOptions as r
6
+ getDefaultOptions as o
7
7
  } from "./QyDefaultOptions.js";
8
8
 
9
- class s extends e {
10
- constructor(e, s, a) {
11
- super("QyKVDataCleaner_Worker", {
12
- kvFolder: s,
13
- options: a = {
14
- ...r("QyKVDataCleaner"),
15
- ...a
16
- }
17
- }, a, [], [ "cleanAclFiles", "cleanPMFiles", "cleanVLFiles", "removeSnapshotsFiles" ], e);
9
+ import t from "./QyKVDataCleaner_Worker.js";
10
+
11
+ class r extends e {
12
+ constructor(e, r, s) {
13
+ s = {
14
+ ...o("QyKVDataCleaner"),
15
+ ...s
16
+ }, super(t, {
17
+ kvFolder: r,
18
+ options: s
19
+ }, s, e);
18
20
  }
19
21
  }
20
22
 
21
23
  export {
22
- s as QyKVDataCleaner
24
+ r as QyKVDataCleaner
23
25
  };
@@ -10,6 +10,10 @@ export default class QyKVDataCleaner_Worker extends QyMessageWorker {
10
10
  kvFolder: any;
11
11
  options: any;
12
12
  });
13
+ cast_cleanAclFiles(maxSnapshotNum: any): void;
14
+ cast_cleanPMFiles(pMChangeList: any): void;
15
+ cast_cleanVLFiles(snapshotNum: any, vLVersion: any): void;
16
+ cast_removeSnapshotsFiles(snapshotNumVersionList: any): void;
13
17
  _op_start(): void;
14
18
  _op_stop(): void;
15
19
  _op_cleanAclFiles(maxSnapshotNum: any): Promise<void>;