datafolder 1.0.32 → 1.0.33

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/ChangeLog.md CHANGED
@@ -1,3 +1,5 @@
1
+ 1.0.33 Buffer messages before file saver started and send to file saver after it started.
2
+
1
3
  1.0.32 Query performance improvement.
2
4
 
3
5
  1.0.30 Change to use === and !=== instead of == and !=.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datafolder",
3
- "version": "1.0.32",
3
+ "version": "1.0.33",
4
4
  "author": {
5
5
  "name": "lysh",
6
6
  "email": "datafolderdev@outlook.com"
package/src/QyBatch.d.ts CHANGED
@@ -50,7 +50,7 @@ export declare class QyBatch extends QyCD {
50
50
  _action_insertEmbedding(action: any): boolean;
51
51
  _action_delEmbedding(action: any): true | undefined;
52
52
  _action_put(action: any): boolean;
53
- _setProp(file: any, propName: any, value: any): any;
53
+ _action_setProp(file: any, propName: any, value: any): any;
54
54
  _action_insert(action: any): boolean;
55
55
  _action_createFile(action: any): boolean;
56
56
  _action_createDir(action: any): boolean;
package/src/QyBatch.js CHANGED
@@ -12,19 +12,18 @@ import {
12
12
  isString as h,
13
13
  getSuffix as g,
14
14
  SpecialFilePaths as e,
15
- toSingleName as f,
16
15
  isSimpleType as d,
17
16
  isEmptyObj as l,
18
17
  isNumber as r,
19
18
  getNowRounded as m,
20
19
  isDate as a,
21
20
  isArray as u,
22
- isFloat32Array as p
21
+ isFloat32Array as f
23
22
  } from "./QyUtils.js";
24
23
 
25
24
  import {
26
25
  QyAclCmdGenerator as t,
27
- CmdNames as C
26
+ CmdNames as p
28
27
  } from "./QyAcl.js";
29
28
 
30
29
  import {
@@ -40,17 +39,17 @@ import {
40
39
  } from "./QyCD.js";
41
40
 
42
41
  import {
43
- logger as y
42
+ logger as C
44
43
  } from "./QyLogger.js";
45
44
 
46
- let x = e.IndexPropPathsFileName, D = {
45
+ let y = e.IndexPropPathsFileName, x = {
47
46
  none: 0,
48
47
  basic: 1,
49
48
  delta: 2,
50
49
  all: 3
51
50
  };
52
51
 
53
- class F extends v {
52
+ class D extends v {
54
53
  fileLogLevel;
55
54
  changeId;
56
55
  actionQueue = [];
@@ -65,26 +64,26 @@ class F extends v {
65
64
  ...i("QyBatch"),
66
65
  ...t
67
66
  };
68
- e = D[t.fileLogLevel.toLowerCase()];
69
- this.options = t, this.fileLogLevel = e ?? 1, this.qyCmdObjHistory = new b(t.maxHistoryCmdObjCount);
67
+ e = x[t.fileLogLevel.toLowerCase()];
68
+ this.options = t, this.fileLogLevel = e ?? 1, this.qyCmdObjHistory = new L(t.maxHistoryCmdObjCount);
70
69
  }
71
70
  createDir(e, t = this.currentDir) {
72
- return h(e) && (e = o(e)), O(this, this._action_createDir, {
71
+ return h(e) && (e = o(e)), F(this, this._action_createDir, {
73
72
  item: this.qyCache.getOrCreateDir(e, t)
74
73
  });
75
74
  }
76
75
  delDir(e, t = this.currentDir) {
77
- return h(e) && (e = o(e)), O(this, this._action_delDir, {
76
+ return h(e) && (e = o(e)), F(this, this._action_delDir, {
78
77
  item: this.qyCache.getOrCreateDir(e, t).ensureAllLoaded()
79
78
  });
80
79
  }
81
80
  createFile(e, t = this.currentDir) {
82
- return h(e) && (e = o(e)), O(this, this._action_createFile, {
81
+ return h(e) && (e = o(e)), F(this, this._action_createFile, {
83
82
  item: this.qyCache.getOrCreateFile(e, t).ensureLoaded()
84
83
  });
85
84
  }
86
85
  delFile(e, t = this.currentDir) {
87
- return h(e) && (e = o(e)), O(this, this._action_delFile, {
86
+ return h(e) && (e = o(e)), F(this, this._action_delFile, {
88
87
  item: this.qyCache.getOrCreateFile(e, t).ensureLoaded()
89
88
  });
90
89
  }
@@ -92,18 +91,18 @@ class F extends v {
92
91
  return this.expireFileM(e, 1e3 * t, i);
93
92
  }
94
93
  expireFileM(e, t, i = this.currentDir) {
95
- return j(this, e, t, "f", i);
94
+ return E(this, e, t, "f", i);
96
95
  }
97
96
  expireDir(e, t, i = this.currentDir) {
98
97
  return this.expireDirM(e, 1e3 * t, i);
99
98
  }
100
99
  expireDirM(e, t, i = this.currentDir) {
101
- return j(this, e, t, "d", i);
100
+ return E(this, e, t, "d", i);
102
101
  }
103
102
  expireContent(e, t, i, r = this.currentDir) {
104
103
  h(e) && (e = o(e));
105
104
  e = this.qyCache.getOrCreateFile(e, r).ensureLoaded();
106
- return O(this, this._action_expireContent, {
105
+ return F(this, this._action_expireContent, {
107
106
  item: e,
108
107
  expireInfoObj: t,
109
108
  isMilliSecond: i
@@ -113,15 +112,15 @@ class F extends v {
113
112
  return this.expireContent(e, t, !0, i);
114
113
  }
115
114
  removeFileExpire(e, t = !1, i = this.currentDir) {
116
- return T(this, e, "f", t, i);
115
+ return j(this, e, "f", t, i);
117
116
  }
118
117
  removeDirExpire(e, t = !1, i = this.currentDir) {
119
- return T(this, e, "d", t, i);
118
+ return j(this, e, "d", t, i);
120
119
  }
121
120
  removeContentExpire(e, t, i = !1, r = this.currentDir) {
122
121
  h(e) && (e = o(e));
123
122
  e = this.qyCache.getOrCreateFile(e, r).ensureLoaded();
124
- return O(this, this._action_removeContentExpire, {
123
+ return F(this, this._action_removeContentExpire, {
125
124
  item: e,
126
125
  expireInfoObj: t,
127
126
  infoFileOnly: i
@@ -130,7 +129,7 @@ class F extends v {
130
129
  createIndex(e, t, i = this.currentDir) {
131
130
  h(e) && (e = o(e)), u(t) || (t = [ t ]);
132
131
  e = this.qyCache.getOrCreateDir(e, i);
133
- return O(this, this._action_createIndex, {
132
+ return F(this, this._action_createIndex, {
134
133
  item: e,
135
134
  indexPropPathList: t
136
135
  });
@@ -138,7 +137,7 @@ class F extends v {
138
137
  createIndexFromQuery(e, t, i = this.currentDir) {
139
138
  h(e) && (e = o(e));
140
139
  e = this.qyCache.getOrCreateDir(e, i);
141
- return O(this, this._action_createIndex, {
140
+ return F(this, this._action_createIndex, {
142
141
  item: e,
143
142
  queryObj: t
144
143
  });
@@ -146,7 +145,7 @@ class F extends v {
146
145
  delIndex(e, t, i = this.currentDir) {
147
146
  h(e) && (e = o(e));
148
147
  e = this.qyCache.getOrCreateDir(e, i);
149
- return O(this, this._action_delIndex, {
148
+ return F(this, this._action_delIndex, {
150
149
  item: e,
151
150
  indexPropPath: t
152
151
  });
@@ -154,23 +153,23 @@ class F extends v {
154
153
  insert(e, t, i = !0, r = !1, n = this.currentDir) {
155
154
  h(e) && (e = o(e));
156
155
  e = this.qyCache.getOrCreateFile(e, n).ensureLoaded();
157
- return t = i || d(t) ? t : structuredClone(t), O(this, this._action_insert, {
156
+ return t = i || d(t) ? t : structuredClone(t), F(this, this._action_insert, {
158
157
  item: e,
159
158
  content: t,
160
159
  noCreate: r
161
160
  });
162
161
  }
163
162
  insertEmbedding(e, t, i = this.currentDir) {
164
- var r = this.qyCache, r = (p(t) || (t = new Float32Array(t)), h(e) && (e = o(e)),
163
+ var r = this.qyCache, r = (f(t) || (t = new Float32Array(t)), h(e) && (e = o(e)),
165
164
  r.getOrCreateFile(e, i));
166
- return O(this, this._action_insertEmbedding, {
165
+ return F(this, this._action_insertEmbedding, {
167
166
  item: r,
168
167
  embedding: t
169
168
  });
170
169
  }
171
170
  delEmbedding(e, t = this.currentDir) {
172
171
  var i = this.qyCache, i = (h(e) && (e = o(e)), i.getOrCreateFile(e, t));
173
- return O(this, this._action_delEmbedding, {
172
+ return F(this, this._action_delEmbedding, {
174
173
  item: i
175
174
  });
176
175
  }
@@ -180,14 +179,14 @@ class F extends v {
180
179
  delContent(e, t = this.currentDir) {
181
180
  h(e) && (e = o(e));
182
181
  e = this.qyCache.getOrCreateFile(e, t).ensureLoaded();
183
- return O(this, this._action_delContent, {
182
+ return F(this, this._action_delContent, {
184
183
  item: e
185
184
  });
186
185
  }
187
186
  insertTrigger(e, t, i, r) {
188
187
  h(t) && (t = o(t)), i = n(i);
189
188
  e = this.qyCache.getOrCreateTriggerFile(e);
190
- return O(this, this._action_insertTrigger, {
189
+ return F(this, this._action_insertTrigger, {
191
190
  item: e,
192
191
  fileNamePath: t,
193
192
  propNamePathList: i,
@@ -195,19 +194,19 @@ class F extends v {
195
194
  });
196
195
  }
197
196
  removeTrigger(e) {
198
- return O(this, this._action_removeTrigger, {
197
+ return F(this, this._action_removeTrigger, {
199
198
  item: this.qyCache.getOrCreateTriggerFile(e)
200
199
  });
201
200
  }
202
201
  insertRpc(e, t) {
203
202
  e = this.qyCache.getOrCreateRpcFile(e);
204
- return O(this, this._action_insertRpc, {
203
+ return F(this, this._action_insertRpc, {
205
204
  item: e,
206
205
  modCode: t
207
206
  });
208
207
  }
209
208
  removeRpc(e) {
210
- return O(this, this._action_removeRpc, {
209
+ return F(this, this._action_removeRpc, {
211
210
  item: this.qyCache.getOrCreateRpcFile(e)
212
211
  });
213
212
  }
@@ -310,13 +309,13 @@ ${r}
310
309
  item: t,
311
310
  indexPropPathList: e,
312
311
  queryObj: i
313
- } = t, r = this.qyCache.getOrCreateIndexDir(t), r = r.getOrCreateFile(x), n = (r.created || this._action_createFile({
312
+ } = t, r = this.qyCache.getOrCreateIndexDir(t), r = r.getOrCreateFile(y), n = (r.created || this._action_createFile({
314
313
  item: r
315
314
  }), r).qyIndexPropTree, i = void 0 !== i ? n.insertFromQueryObj(i) : n.insertPropPathList(e);
316
315
  if (0 !== i.length) {
317
316
  var a, o = {};
318
- for (a of i) o[f(a.indexPropPath)] = 1;
319
- y.log(`Creating index ${JSON.stringify(o)} for ` + t.fullPath), this._action_insert({
317
+ for (a of i) o[JSON.stringify(a.indexPropPath)] = 1;
318
+ C.log(`Creating index ${JSON.stringify(o)} for ` + t.fullPath), this._action_insert({
320
319
  item: r,
321
320
  content: o
322
321
  });
@@ -346,16 +345,16 @@ ${r}
346
345
  }
347
346
  _action_delIndex(e) {
348
347
  e.actionName = "delIndex";
349
- var t, i, {
348
+ var t, {
350
349
  item: e,
351
- indexPropPath: r
350
+ indexPropPath: i
352
351
  } = e, e = this.qyCache.getIndexDir(e);
353
- void 0 !== e && ((i = e.getFile(x)) ? (t = i.qyIndexPropTree, [ i, t, r ] = (this._setProp(i, f(r), null),
354
- t.remove(r)), i && !t && void 0 !== r && (i = r.indexPropDir, void 0 !== i) && this._action_delDir({
355
- item: i
356
- })) : this._action_delDir({
352
+ void 0 !== e && (void 0 === (t = e.getFile(y)) ? this._action_delDir({
357
353
  item: e
358
- }));
354
+ }) : (e = t.qyIndexPropTree, [ t, e, i ] = (this._action_setProp(t, JSON.stringify(i), null),
355
+ e.removePropPath(i)), t && !e && void 0 !== i && (t = i.indexPropDir, void 0 !== t) && this._action_delDir({
356
+ item: t
357
+ })));
359
358
  }
360
359
  _action_delFile(e, t = !1) {
361
360
  e.actionName = "delFile";
@@ -368,7 +367,7 @@ ${r}
368
367
  parentDir: r,
369
368
  name: n
370
369
  } = i;
371
- return i.created = !1, P(this, e), t || q(this, r, C.R, r.fileMapKey, n),
370
+ return i.created = !1, O(this, e), t || P(this, r, p.R, r.fileMapKey, n),
372
371
  !0;
373
372
  }
374
373
  _action_delDir(e) {
@@ -384,13 +383,13 @@ ${r}
384
383
  fileMapKey: s
385
384
  } = t;
386
385
  if (a) {
387
- q(this, t, C.D, s);
386
+ P(this, t, p.D, s);
388
387
  for (var h of t.fileList) this._action_delFile({
389
388
  item: h
390
389
  }, !0);
391
390
  }
392
391
  if (n) {
393
- q(this, t, C.D, o);
392
+ P(this, t, p.D, o);
394
393
  for (var d of t.allSubdirs()) {
395
394
  let {
396
395
  subdirMap: e,
@@ -398,26 +397,26 @@ ${r}
398
397
  subdirMapKey: i,
399
398
  fileMapKey: r
400
399
  } = d;
401
- if (e && q(this, d, C.D, i), t) {
402
- q(this, d, C.D, r);
400
+ if (e && P(this, d, p.D, i), t) {
401
+ P(this, d, p.D, r);
403
402
  for (var c of d.fileList) this._action_delFile({
404
403
  item: c
405
404
  }, !0);
406
405
  }
407
- P(this, {
406
+ O(this, {
408
407
  actionName: "delDir",
409
408
  item: d
410
409
  }), d.created = !1;
411
410
  }
412
411
  }
413
- return void 0 !== i && (t.created = !1, P(this, e), q(this, i, C.R, i.subdirMapKey, r),
412
+ return void 0 !== i && (t.created = !1, O(this, e), P(this, i, p.R, i.subdirMapKey, r),
414
413
  !0);
415
414
  }
416
415
  _action_delContent(e) {
417
416
  e.actionName = "delContent";
418
417
  var t = e.item, i = t.fileContent;
419
418
  return void 0 !== i && (t.fileContent = void 0, e.content = i, e.delta = [ i, null ],
420
- P(this, e), q(this, t, C.D, t.fileContentKey), L(this, t, i), !0);
419
+ O(this, e), P(this, t, p.D, t.fileContentKey), q(this, t, i), !0);
421
420
  }
422
421
  _action_insertEmbedding(e) {
423
422
  e.actionName = "insertEmbedding";
@@ -427,7 +426,7 @@ ${r}
427
426
  } = e, s = o.length, r = r.getOrCreateInfoFile(a), h = r.fileContent;
428
427
  let d = !1;
429
428
  return r.created && h.length === s ? (t = a.fullPathHash, h = h.idx, i = n.getEmbedding(t, s, h),
430
- c(o, i) || ((i = n.updateEmbedding(t, o, h)) !== h && this._setProp(r, "idx", i),
429
+ c(o, i) || ((i = n.updateEmbedding(t, o, h)) !== h && this._action_setProp(r, "idx", i),
431
430
  d = !0)) : ({
432
431
  fullPathHash: t,
433
432
  namePath: h
@@ -438,7 +437,7 @@ ${r}
438
437
  idx: i,
439
438
  namePath: r.created ? void 0 : h
440
439
  }
441
- }), d = !0), d && P(this, e), d;
440
+ }), d = !0), d && O(this, e), d;
442
441
  }
443
442
  _action_delEmbedding(e) {
444
443
  e.actionName = "delEmbedding";
@@ -448,7 +447,7 @@ ${r}
448
447
  if (t && (o = t.fileContent, o) && (n = o.length, a = o.idx), i.delEmbedding(r.fullPathHash, n, a),
449
448
  t) return this._action_delFile({
450
449
  item: t
451
- }), P(this, e), !0;
450
+ }), O(this, e), !0;
452
451
  }
453
452
  _action_put(e) {
454
453
  e.actionName = "put";
@@ -456,16 +455,16 @@ ${r}
456
455
  item: t,
457
456
  content: i
458
457
  } = e;
459
- if (void 0 === i) return y.warn(`Saving undefined to ${t.fullPath}. Not making any change.`),
458
+ if (void 0 === i) return C.warn(`Saving undefined to ${t.fullPath}. Not making any change.`),
460
459
  !1;
461
460
  t.created || this._action_createFile({
462
461
  item: t
463
462
  });
464
463
  var r = t.fileContentKey;
465
- return i.$rpl = 1, q(this, t, C.M, r, i), P(this, e), t.fileContent = i,
464
+ return i.$rpl = 1, P(this, t, p.M, r, i), O(this, e), t.fileContent = i,
466
465
  !0;
467
466
  }
468
- _setProp(e, t, i) {
467
+ _action_setProp(e, t, i) {
469
468
  var {
470
469
  created: r,
471
470
  fileContentKey: n,
@@ -475,7 +474,7 @@ ${r}
475
474
  }), a ? a[t] : void 0);
476
475
  return null === i ? void 0 !== a && delete a[t] : void 0 !== a ? a[t] = i : e.fileContent = {
477
476
  [t]: i
478
- }, q(this, e, C.M, n, t, i), r;
477
+ }, P(this, e, p.M, n, t, i), r;
479
478
  }
480
479
  _action_insert(e) {
481
480
  e.actionName = "insert";
@@ -488,7 +487,7 @@ ${r}
488
487
  merged: a,
489
488
  delta: o
490
489
  } = e;
491
- if (void 0 === o && void 0 === r) return y.warn(`Saving undefined to ${i.fullPath}. Not making any change.`),
490
+ if (void 0 === o && void 0 === r) return C.warn(`Saving undefined to ${i.fullPath}. Not making any change.`),
492
491
  !1;
493
492
  if (!i.created) {
494
493
  if (n) return !1;
@@ -497,8 +496,8 @@ ${r}
497
496
  });
498
497
  }
499
498
  return void 0 === a && void 0 === o && ([ a, o ] = s(i.fileContent, r)),
500
- void 0 !== o && ([ n, r ] = o, t = i.fileContentKey, void 0 === a ? q(this, i, C.D, t) : q(this, i, C.M, t, r),
501
- e.merged = a, e.delta = o, P(this, e), i.fileContent = a, L(this, i, n, r, a),
499
+ void 0 !== o && ([ n, r ] = o, t = i.fileContentKey, void 0 === a ? P(this, i, p.D, t) : P(this, i, p.M, t, r),
500
+ e.merged = a, e.delta = o, O(this, e), i.fileContent = a, q(this, i, n, r, a),
502
501
  !0);
503
502
  }
504
503
  _action_createFile(e) {
@@ -506,7 +505,7 @@ ${r}
506
505
  var t, i = e.item;
507
506
  return !i.created && (t = i.parentDir, this._action_createDir({
508
507
  item: t
509
- }), i.created = !0, i.fileContentLoaded = !0, P(this, e), q(this, t, C.A, t.fileMapKey, i.name),
508
+ }), i.created = !0, i.fileContentLoaded = !0, O(this, e), P(this, t, p.A, t.fileMapKey, i.name),
510
509
  !0);
511
510
  }
512
511
  _action_createDir(e) {
@@ -515,12 +514,12 @@ ${r}
515
514
  if (t.created) return !1;
516
515
  for (var i = []; !t.created; ) i.push(t), t = t.parentDir;
517
516
  for (let e of i.reverse()) {
518
- e.created = !0, e.subdirMapLoaded = !0, e.fileMapLoaded = !0, P(this, {
517
+ e.created = !0, e.subdirMapLoaded = !0, e.fileMapLoaded = !0, O(this, {
519
518
  actionName: "createDir",
520
519
  item: e
521
520
  });
522
521
  var r = e.parentDir;
523
- q(this, r, C.A, r.subdirMapKey, e.name);
522
+ P(this, r, p.A, r.subdirMapKey, e.name);
524
523
  }
525
524
  return !0;
526
525
  }
@@ -533,7 +532,7 @@ ${r}
533
532
  parentDir: r,
534
533
  name: n
535
534
  } = e;
536
- return void 0 !== r && void 0 !== (i = E(i, !0, m())) && (t = this.qyCache,
535
+ return void 0 !== r && void 0 !== (i = I(i, !0, m())) && (t = this.qyCache,
537
536
  r = t.getOrCreateExpireInfoFile(r.fullPathHash, e.isFile ? "f" : "d"), (r = this._action_insert({
538
537
  item: r,
539
538
  content: {
@@ -566,7 +565,7 @@ ${r}
566
565
  expireInfoObj: i,
567
566
  isMilliSecond: r
568
567
  } = e, n = m();
569
- var e = I(i, e => E(e, r, n)), a = this.qyCache, o = a.getOrCreateExpireInfoFile(t.fullPathHash, "c"), o = this._action_insert({
568
+ var e = b(i, e => I(e, r, n)), a = this.qyCache, o = a.getOrCreateExpireInfoFile(t.fullPathHash, "c"), o = this._action_insert({
570
569
  item: o,
571
570
  content: {
572
571
  ...e
@@ -581,7 +580,7 @@ ${r}
581
580
  expireInfoObj: i,
582
581
  infoFileOnly: r
583
582
  } = e, n = this.qyCache, a = n.getExpireInfoFile(e.fullPathHash, "c");
584
- return void 0 !== a && (i = u(i) ? Object.fromEntries(i.map(e => [ e, null ])) : I(i, e => e ? null : void 0),
583
+ return void 0 !== a && (i = u(i) ? Object.fromEntries(i.map(e => [ e, null ])) : b(i, e => e ? null : void 0),
585
584
  (t = this._action_insert({
586
585
  item: a,
587
586
  content: i
@@ -591,12 +590,12 @@ ${r}
591
590
  }
592
591
  }
593
592
 
594
- function O(e, t, i) {
593
+ function F(e, t, i) {
595
594
  return e.running ? t.call(e, i) : (i.actionFun = t, e.actionQueue.push(i)),
596
595
  e;
597
596
  }
598
597
 
599
- function P(e, t) {
598
+ function O(e, t) {
600
599
  var {
601
600
  changeList: e,
602
601
  fileLogLevel: i
@@ -617,7 +616,7 @@ function P(e, t) {
617
616
  })(t, i)), e.push(t);
618
617
  }
619
618
 
620
- function q(e, t, i, r, n = void 0, a = void 0) {
619
+ function P(e, t, i, r, n = void 0, a = void 0) {
621
620
  var {
622
621
  qyAclCmdGenerator: e,
623
622
  qyCache: o,
@@ -628,11 +627,11 @@ function q(e, t, i, r, n = void 0, a = void 0) {
628
627
  o && o.qyKVData.removeKey(r) && s.push(r, t);
629
628
  }
630
629
 
631
- function L(e, t, i, r = void 0, n = void 0) {
630
+ function q(e, t, i, r = void 0, n = void 0) {
632
631
  if (!t.underHiddenFolder) {
633
632
  var a = e.qyCache.getIndexDir(t.parentDir);
634
633
  if (void 0 !== a) {
635
- a = a.getFile(x);
634
+ a = a.getFile(y);
636
635
  if (void 0 !== a) {
637
636
  var o, s, h = t.name;
638
637
  for ({
@@ -649,7 +648,7 @@ function N(t, e, i, r, n, a, o = void 0) {
649
648
  if (void 0 !== e) {
650
649
  var s, h, [ i, n ] = e;
651
650
  for (s of i) {
652
- t._setProp(s, r, null);
651
+ t._action_setProp(s, r, null);
653
652
  var d = s.fileContent;
654
653
  if (void 0 === d || l(d)) {
655
654
  t._action_delFile({
@@ -661,11 +660,11 @@ function N(t, e, i, r, n, a, o = void 0) {
661
660
  }), e = e.parentDir;
662
661
  }
663
662
  }
664
- for (h of n) t._setProp(h, r, 1);
663
+ for (h of n) t._action_setProp(h, r, 1);
665
664
  }
666
665
  }
667
666
 
668
- class b {
667
+ class L {
669
668
  maxLength;
670
669
  actionQueue;
671
670
  nextPos;
@@ -693,37 +692,37 @@ class b {
693
692
  }
694
693
  }
695
694
 
696
- function I(e, t = void 0, i = [], r = {}) {
695
+ function b(e, t = void 0, i = [], r = {}) {
697
696
  if (d(e)) {
698
697
  var n = t ? t(e) : e;
699
698
  void 0 !== n && (r[JSON.stringify(i)] = n);
700
699
  } else {
701
700
  var a, o = i.length;
702
- for (a in e) i.push(a), I(e[a], t, i, r), i.length = o;
701
+ for (a in e) i.push(a), b(e[a], t, i, r), i.length = o;
703
702
  }
704
703
  return r;
705
704
  }
706
705
 
707
- function E(e, t, i) {
706
+ function I(e, t, i) {
708
707
  return r(e) ? (t ? e : 1e3 * e) + i : h(e) ? (t = new Date(e).getTime(), isNaN(t) || t <= i ? void 0 : t) : !a(e) || (t = e.getTime()) <= i ? void 0 : t;
709
708
  }
710
709
 
711
- function j(e, t, i, r, n) {
710
+ function E(e, t, i, r, n) {
712
711
  var a = e.qyCache, r = (h(t) && (t = o(t)), "f" === r ? a.getOrCreateFile(t, n) : a.getOrCreateDir(t, n));
713
- return O(e, e._action_expireItem, {
712
+ return F(e, e._action_expireItem, {
714
713
  item: r,
715
714
  milliSecond: i
716
715
  });
717
716
  }
718
717
 
719
- function T(e, t, i, r, n) {
718
+ function j(e, t, i, r, n) {
720
719
  var a = e.qyCache, i = (h(t) && (t = o(t)), "f" === i ? a.getOrCreateFile(t, n) : a.getOrCreateDir(t, n));
721
- return O(e, e._action_removeItemExpire, {
720
+ return F(e, e._action_removeItemExpire, {
722
721
  item: i,
723
722
  infoFileOnly: r
724
723
  });
725
724
  }
726
725
 
727
726
  export {
728
- F as QyBatch
727
+ D as QyBatch
729
728
  };
package/src/QyCache.js CHANGED
@@ -126,16 +126,16 @@ class i extends r {
126
126
  rootDir: s,
127
127
  qyEmbeddings: n
128
128
  } = this;
129
- P.log(`Starting at ${r}...`);
129
+ P.log("Starting at " + r);
130
130
  try {
131
- await q(e), o.start();
131
+ await q(e);
132
132
  var [ {
133
133
  maxChangeId: l,
134
134
  loadedMaxAclNum: g,
135
135
  qySnapshots: h,
136
136
  aclKeyValueMap: d
137
137
  } ] = await Promise.all([ ((r, e) => (r = new b(r, e)).load())(e, t), x(a) ]);
138
- i.start(l, g, h, d), await n.start();
138
+ o.start(), i.start(l, g, h, d), await n.start();
139
139
  } catch (r) {
140
140
  throw o.stop(), n.stop(), r;
141
141
  }