datafolder 1.0.33 → 1.0.35

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/src/QyFile.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  import {
6
6
  SpecialOperators as t,
7
7
  SpecialFilePaths as i,
8
- getContentKey as r,
9
- isNotNullObj as l,
8
+ getContentKey as n,
9
+ isNotNullObj as a,
10
10
  isSimpleType as h,
11
- isEmptyObj as n,
11
+ isEmptyObj as r,
12
12
  getNowTime as s,
13
13
  isArray as u
14
14
  } from "./QyUtils.js";
@@ -18,35 +18,35 @@ import {
18
18
  } from "./QyFileContentUtils.js";
19
19
 
20
20
  import {
21
- QyIndexPropTree as a
21
+ QyIndexPropTree as l
22
22
  } from "./QyIndexPropTree.js";
23
23
 
24
24
  import {
25
- handleExpiredProps as f
25
+ handleExpiredProps as d
26
26
  } from "./QyExpire.js";
27
27
 
28
- let d = i.IndexPropPathsFileName, {
29
- $raw: p,
30
- $clone: C
28
+ let f = i.IndexPropPathsFileName, {
29
+ $raw: C,
30
+ $clone: p
31
31
  } = t;
32
32
 
33
- class c extends e {
33
+ class v extends e {
34
34
  _fileContentKey;
35
35
  _fileContent;
36
36
  cChangeId = 0;
37
37
  constructor(e, t = !1, i) {
38
- super(e, t, i), t && i && (++i._fileCount, ++i.fileMapChangeCount);
38
+ super(e, t, i), t && void 0 !== i && (++i._fileCount, ++i.fileMapChangeCount);
39
39
  }
40
40
  get created() {
41
41
  return this._created;
42
42
  }
43
43
  set created(e) {
44
44
  var t;
45
- this._created !== (e = !!e) && (this._created = e, t = this.parentDir, t) && (t._fileCount += e ? 1 : -1,
45
+ this._created !== e && (this._created = e, t = this.parentDir, void 0 !== t) && (t._fileCount += e ? 1 : -1,
46
46
  ++t.fileMapChangeCount);
47
47
  }
48
48
  get fileContentKey() {
49
- return this._fileContentKey || (this._fileContentKey = r(this.fullPathHash));
49
+ return this._fileContentKey || (this._fileContentKey = n(this.fullPathHash));
50
50
  }
51
51
  get fileContent() {
52
52
  return this.ensureLoaded(), this.visited = !0, this._fileContent;
@@ -59,12 +59,12 @@ class c extends e {
59
59
  created: e,
60
60
  name: t,
61
61
  fileContent: i,
62
- underHiddenFolder: r,
63
- parentDir: n
62
+ underHiddenFolder: n,
63
+ parentDir: r
64
64
  } = this;
65
- if (e && r && t === d) {
65
+ if (e && n && t === f) {
66
66
  let e = this._qyIndexPropTree;
67
- if (void 0 === e) for (var o in e = this._qyIndexPropTree = new a(n),
67
+ if (void 0 === e) for (var o in e = this._qyIndexPropTree = new l(r),
68
68
  i) e.insertPropPath(JSON.parse(o));
69
69
  return e;
70
70
  }
@@ -74,39 +74,49 @@ class c extends e {
74
74
  }
75
75
  get contentAsText() {
76
76
  var e = this.fileContent;
77
- return void 0 === e ? "" : l(e) ? JSON.stringify(e) : e.toString();
77
+ return void 0 === e ? "" : a(e) ? JSON.stringify(e) : e.toString();
78
78
  }
79
79
  get clonedContent() {
80
80
  return structuredClone(this.fileContent);
81
81
  }
82
- view(e = C, t) {
82
+ get indexCount() {
83
+ var {
84
+ _indexCount: e,
85
+ fileContent: t
86
+ } = this;
87
+ return void 0 !== e ? e : this._indexCount = null == t ? 0 : Object.keys(t).length;
88
+ }
89
+ set indexCount(e) {
90
+ this._indexCount = 0 <= e ? e : 0;
91
+ }
92
+ view(e = p, t) {
83
93
  var i = this.fileContent;
84
- return void 0 === i || h(i) ? i : function t(i, r, n, o) {
85
- if (n === p) return r;
86
- if (void 0 === n) return;
87
- if (h(n)) return n ? o ? r : structuredClone(r) : void 0;
88
- let e = n.$link;
89
- if (void 0 !== e) return y(i, r, e, n.$spec);
90
- if (h(r)) return r;
91
- u(n) && (n = Object.fromEntries(n.filter(e => e).map(e => [ e, 1 ])));
92
- let s = u(r) ? [] : {};
94
+ return void 0 === i || h(i) ? i : function t(i, n, r, o) {
95
+ if (r === C) return n;
96
+ if (void 0 === r) return;
97
+ if (h(r)) return r ? o ? n : structuredClone(n) : void 0;
98
+ let e = r.$link;
99
+ if (void 0 !== e) return y(i, n, e, r.$spec);
100
+ if (h(n)) return n;
101
+ u(r) && (r = Object.fromEntries(r.filter(e => e).map(e => [ e, 1 ])));
102
+ let s = u(n) ? [] : {};
93
103
  let {
94
- $all: a,
95
- "**": l
96
- } = n;
97
- if (a || l) for (var f in r) {
98
- let e = n[f] ?? a ?? l;
99
- e && (s[f] = t(i, r[f], e, o));
100
- } else for (var d in n) {
101
- let e = n[d];
102
- e && (s[d] = t(i, r[d], e, o));
104
+ $all: l,
105
+ "**": a
106
+ } = r;
107
+ if (void 0 !== l || void 0 !== a) for (var d in n) {
108
+ let e = r[d] ?? l ?? a;
109
+ e && (s[d] = t(i, n[d], e, o));
110
+ } else for (var f in r) {
111
+ let e = r[f];
112
+ e && (s[f] = t(i, n[f], e, o));
103
113
  }
104
114
  return s;
105
115
  }(this, i, e, t);
106
116
  }
107
- prop(e, t = C, i) {
108
- var r;
109
- if (t) return e = o(this.fileContent, u(e) ? e : [ e ]), r = t.$link, void 0 !== r ? y(this, e, r, t.$spec, i) : i || t === p ? e : structuredClone(e);
117
+ prop(e, t = p, i) {
118
+ var n;
119
+ if (t) return e = o(this.fileContent, u(e) ? e : [ e ]), n = t.$link, void 0 !== n ? y(this, e, n, t.$spec, i) : i || t === C ? e : structuredClone(e);
110
120
  }
111
121
  unloadFileContent() {
112
122
  this.created && this.fileContentLoaded && void 0 !== this._fileContent && (this._fileContent = void 0,
@@ -116,49 +126,42 @@ class c extends e {
116
126
  if (this.created && void 0 === this._fileContent && !this.fileContentLoaded) {
117
127
  this.fileContentLoaded = !0;
118
128
  var e = this.qyCache;
119
- if (void 0 === e) return;
120
- if (this._fileContent = e.qyKVData.getValueSync(this.fileContentKey),
121
- !this.underHiddenFolder) {
122
- var t, i, r = this;
123
- !r.cExpireChecked && (r.cExpireChecked = !0, t = e.getExpireInfoFile(r.fullPathHash, "c")) && ({
124
- expiredProps: t,
125
- remainingExpireInfoObj: i
126
- } = ((e, t = s()) => {
127
- let i, r = {};
128
- for (var n in e) {
129
- var o = e[n];
130
- o <= t ? void 0 === i ? i = [ n ] : i.push(n) : r[n] = o;
129
+ if (void 0 !== e && (this._fileContent = e.qyKVData.getValueSync(this.fileContentKey),
130
+ !this.underHiddenFolder)) {
131
+ var t, i, n = this;
132
+ !n.cExpireChecked && (n.cExpireChecked = !0, t = e.getExpireInfoFile(n.fullPathHash, "c")) && ([ t, i ] = ((e, t = s()) => {
133
+ let i, n = {};
134
+ for (var r in e) {
135
+ var o = e[r];
136
+ o <= t ? void 0 === i ? i = [ r ] : i.push(r) : n[r] = o;
131
137
  }
132
- return {
133
- expiredProps: i,
134
- remainingExpireInfoObj: r
135
- };
136
- })(t.fileContent), t && f(e.qyDB, r, t), n(i) || e.monitorContentExpire(r, i));
138
+ return [ i, n ];
139
+ })(t.fileContent), t && d(e.qyDB, n, t), r(i) || e.monitorContentExpire(n, i));
137
140
  }
138
141
  }
139
142
  return this;
140
143
  }
141
144
  }
142
145
 
143
- function v(e, t, i, r) {
144
- if (e) {
146
+ function c(e, t, i, n) {
147
+ if (void 0 !== e) {
145
148
  e = e.getFile(t);
146
- if (e) return e.view(i, r);
149
+ if (void 0 !== e) return e.view(i, n);
147
150
  }
148
151
  return t;
149
152
  }
150
153
 
151
- function y(e, t, i, r, n = !1) {
154
+ function y(e, t, i, n, r = !1) {
152
155
  let o = e.qyCache.getDir(i);
153
- if (u(t)) return t.map(e => v(o, e, r, n));
154
- if (l(t)) {
155
- var s, a = {};
156
- for (s in t) a[s] = v(o, s, r, n);
157
- return a;
156
+ if (u(t)) return t.map(e => c(o, e, n, r));
157
+ if (a(t)) {
158
+ var s, l = {};
159
+ for (s in t) l[s] = c(o, s, n, r);
160
+ return l;
158
161
  }
159
- return v(o, t, r, n);
162
+ return c(o, t, n, r);
160
163
  }
161
164
 
162
165
  export {
163
- c as QyFile
166
+ v as QyFile
164
167
  };
@@ -1,50 +1,52 @@
1
1
  import {
2
- QyQueryNode as t
2
+ QyQueryNode as n
3
3
  } from "./QyUnionNode.js";
4
4
 
5
- class n extends t {
5
+ class i extends n {
6
6
  sorted = !1;
7
7
  constructor() {
8
- super(), this.fileCount = -1;
8
+ super(), this.indexCount = -1;
9
9
  }
10
- containsFile(t) {
10
+ containsFile(n) {
11
11
  var {
12
- nodeList: e,
13
- fileCount: i
12
+ nodeList: t,
13
+ indexCount: e
14
14
  } = this;
15
- if (0 !== i && 0 !== e.length) return s(this), e[0].containsFile(t) && r(e, t);
15
+ if (0 !== e && 0 !== t.length) return s(this), t[0].containsFile(n) && r(t, n);
16
16
  }
17
- *getFiles(t, e = {}) {
17
+ *getFiles(n, t = {}) {
18
18
  var {
19
- nodeList: i,
20
- fileCount: n
19
+ nodeList: e,
20
+ indexCount: i
21
21
  } = this;
22
- if (0 !== n && 0 !== i.length) {
22
+ if (0 !== i && 0 !== e.length) {
23
23
  s(this);
24
- for (var o of i[0].getFiles()) if (!(o in e) && r(i, o) && this.encounterOne(e, o, t) && (yield o,
25
- t?.isFull)) return;
24
+ for (var o of e[0].getFiles()) if (!(o in t) && r(e, o) && this.encounterOne(t, o, n) && (yield o,
25
+ n?.isFull)) return;
26
26
  }
27
27
  }
28
- addNode(t) {
29
- var e, i;
30
- void 0 === t || -1 === t.fileCount || ({
31
- fileCount: e,
32
- nodeList: i
33
- } = this, 0 === e && 0 < i.length) || (t instanceof n ? (i.push(...t.nodeList),
34
- this.sorted = !1) : i.push(t), (-1 === e || e > t.fileCount) && (this.fileCount = t.fileCount));
28
+ addNode(n) {
29
+ var t, e;
30
+ void 0 === n || -1 === n.indexCount || ({
31
+ indexCount: t,
32
+ nodeList: e
33
+ } = this, 0 === t && 0 < e.length) || (n instanceof i ? e.push(...n.nodeList) : e.push(n),
34
+ this.sorted = !1, (-1 === t || t > n.indexCount) && (this.indexCount = n.indexCount));
35
35
  }
36
36
  }
37
37
 
38
- function s(t) {
39
- t.sorted || (t.nodeList.sort((t, e) => t.fileCount - e.fileCount), t.sorted = !0);
38
+ function s(n) {
39
+ var t;
40
+ n.sorted || (t = n.nodeList, 1 < t.length && t.sort((n, t) => n.indexCount - t.indexCount),
41
+ n.sorted = !0);
40
42
  }
41
43
 
42
- function r(e, i) {
43
- var n = e.length;
44
- for (let t = 1; t < n; ++t) if (!e[t].containsFile(i)) return !1;
44
+ function r(t, e) {
45
+ var i = t.length;
46
+ for (let n = 1; n < i; ++n) if (!t[n].containsFile(e)) return !1;
45
47
  return !0;
46
48
  }
47
49
 
48
50
  export {
49
- n as QyIntersectNode
51
+ i as QyIntersectNode
50
52
  };
package/src/QyItem.js CHANGED
@@ -1,69 +1,70 @@
1
1
  import {
2
- calHash as i,
2
+ calHash as a,
3
3
  SpecialFilePaths as t
4
4
  } from "./QyUtils.js";
5
5
 
6
- let a = t.HiddenFolderName;
6
+ let i = t.HiddenFolderName;
7
7
 
8
8
  class e {
9
9
  name;
10
10
  parentDir;
11
11
  flagInt;
12
- constructor(t, e = !1, i) {
13
- this.name = t.toString(), this.parentDir = i, this.flagInt = 0, this._created = e,
14
- (t === a || i && (i.name === a || i.underHiddenFolder)) && s(this, 2, !0);
12
+ constructor(t, e = !1, a) {
13
+ this.name = t.toString(), this.parentDir = a, this.flagInt = 0, this._created = e,
14
+ t !== i && (void 0 === a || a.name !== i && !a.underHiddenFolder) || (this.flagInt |= 2);
15
15
  }
16
16
  get qyCache() {
17
- var t = this.parentDir;
18
- return t ? t.qyCache : this._qyCache;
17
+ let t = this;
18
+ for (var e; void 0 !== (e = t.parentDir); ) t = e;
19
+ return t._qyCache;
19
20
  }
20
21
  get _created() {
21
- return r(this, 1);
22
+ return 0 != (1 & this.flagInt);
22
23
  }
23
24
  set _created(t) {
24
- s(this, 1, t);
25
+ t ? this.flagInt |= 1 : this.flagInt &= -2;
25
26
  }
26
27
  get subdirMapLoaded() {
27
- return r(this, 4);
28
+ return 0 != (4 & this.flagInt);
28
29
  }
29
30
  set subdirMapLoaded(t) {
30
- s(this, 4, t);
31
+ t ? this.flagInt |= 4 : this.flagInt &= -5;
31
32
  }
32
33
  get fileMapLoaded() {
33
- return r(this, 8);
34
+ return 0 != (8 & this.flagInt);
34
35
  }
35
36
  set fileMapLoaded(t) {
36
- s(this, 8, t);
37
+ t ? this.flagInt |= 8 : this.flagInt &= -9;
37
38
  }
38
39
  get fileContentLoaded() {
39
- return r(this, 16);
40
+ return 0 != (16 & this.flagInt);
40
41
  }
41
42
  set fileContentLoaded(t) {
42
- s(this, 16, t);
43
+ t ? this.flagInt |= 16 : this.flagInt &= -17;
43
44
  }
44
45
  get dExpireChecked() {
45
- return r(this, 64);
46
+ return 0 != (64 & this.flagInt);
46
47
  }
47
48
  set dExpireChecked(t) {
48
- s(this, 64, t);
49
+ t ? this.flagInt |= 64 : this.flagInt &= -65;
49
50
  }
50
51
  get fExpireChecked() {
51
- return r(this, 128);
52
+ return 0 != (128 & this.flagInt);
52
53
  }
53
54
  set fExpireChecked(t) {
54
- s(this, 128, t);
55
+ t ? this.flagInt |= 128 : this.flagInt &= -129;
55
56
  }
56
57
  get cExpireChecked() {
57
- return r(this, 256);
58
+ return 0 != (256 & this.flagInt);
58
59
  }
59
60
  set cExpireChecked(t) {
60
- s(this, 256, t);
61
+ t ? this.flagInt |= 256 : this.flagInt &= -257;
61
62
  }
62
63
  get visited() {
63
- return r(this, 32);
64
+ return 0 != (32 & this.flagInt);
64
65
  }
65
66
  set visited(t) {
66
- s(this, 32, t);
67
+ t ? this.flagInt |= 32 : this.flagInt &= -33;
67
68
  }
68
69
  get nameNum() {
69
70
  var t = this._nameNum;
@@ -80,27 +81,28 @@ class e {
80
81
  return void 0 === this._fullPath && ({
81
82
  parentDir: t,
82
83
  name: e
83
- } = this, this._fullPath = t ? t.fullPath + "/" + e : e), this._fullPath;
84
+ } = this, this._fullPath = void 0 !== t ? t.fullPath + "/" + e : e), this._fullPath;
84
85
  }
85
86
  get fullPathHash() {
86
87
  var t, e;
87
88
  return void 0 === this._fullPathHash && ({
88
89
  parentDir: t,
89
90
  name: e
90
- } = this, this._fullPathHash = i(t ? t.fullPathHash + e : e)), this._fullPathHash;
91
+ } = this, this._fullPathHash = a(void 0 !== t ? t.fullPathHash + e : e)),
92
+ this._fullPathHash;
91
93
  }
92
94
  get isItem() {
93
95
  return !0;
94
96
  }
95
97
  get underHiddenFolder() {
96
- return r(this, 2);
98
+ return 0 != (2 & this.flagInt);
97
99
  }
98
100
  get parentList() {
99
101
  if (void 0 === this._parentList) {
100
102
  var e = this._parentList = [];
101
103
  let t = this.parentDir;
102
104
  if (void 0 !== t) {
103
- for (;t.parentDir; ) e.push(t), t = t.parentDir;
105
+ for (;void 0 !== t.parentDir; ) e.push(t), t = t.parentDir;
104
106
  e.reverse();
105
107
  }
106
108
  }
@@ -116,20 +118,12 @@ class e {
116
118
  }
117
119
  getRelativeNamePath(t = void 0) {
118
120
  var e = [ this.name ];
119
- let i = this.parentDir;
120
- for (;void 0 !== i && i !== t; ) e.push(i.name), i = i.parentDir;
121
- if (i === t) return e.reverse();
121
+ let a = this.parentDir;
122
+ for (;void 0 !== a && a !== t; ) e.push(a.name), a = a.parentDir;
123
+ if (a === t) return e.reverse();
122
124
  }
123
125
  }
124
126
 
125
- function r(t, e) {
126
- return 0 != (t.flagInt & e);
127
- }
128
-
129
- function s(t, e, i) {
130
- i ? t.flagInt |= e : t.flagInt &= ~e;
131
- }
132
-
133
127
  export {
134
128
  e as QyItem
135
129
  };
package/src/QyKVData.js CHANGED
@@ -81,7 +81,7 @@ class t {
81
81
  } = this, {
82
82
  maxSnapshotNum: h,
83
83
  snapshotMaxChangeId: c
84
- } = o, s = (s.start(t, h, a, e), i.start(), r.start(), p.start(), setInterval(() => m(this), n.compactSnapshotsInterval)), h = setInterval(() => (async o => {
84
+ } = o, s = (s.start(t, h, a, e), i.start(), r.start(), p.start(), setInterval(() => l(this), n.compactSnapshotsInterval)), h = setInterval(() => (async o => {
85
85
  if (!o.unloadingMemory) {
86
86
  o.unloadingMemory = !0;
87
87
  var {
@@ -91,8 +91,8 @@ class t {
91
91
  let t = 0, a = 0;
92
92
  if (e) {
93
93
  var s, i = n.maxFileCountToUnload, n = e.rootDir;
94
- a = l(o, n), t = a;
95
- for (s of n.allLoadedSubdirs()) if ((a += l(o, s)) > i && (t += a,
94
+ a = m(o, n), t = a;
95
+ for (s of n.allLoadedSubdirs()) if ((a += m(o, s)) > i && (t += a,
96
96
  a = 0, await d(0), o.isStopping)) break;
97
97
  }
98
98
  t += a, global.gc && global.gc(), o.unloadingMemory = !1;
@@ -114,9 +114,9 @@ class t {
114
114
  for (a of Object.keys(o.numToSnapshotMap).sort((t, a) => a - t)) {
115
115
  if (await async function s(i, r, p = void 0, h = void 0, c = void 0, d = void 0) {
116
116
  if (i.isStopping) return void (d && d.close());
117
- let m = i.qySnapshots;
118
- let l = m.numToSnapshotMap;
119
- let v = l[r];
117
+ let l = i.qySnapshots;
118
+ let m = l.numToSnapshotMap;
119
+ let v = m[r];
120
120
  if (void 0 === v) return void (d && d.close());
121
121
  let {
122
122
  info: u,
@@ -125,14 +125,14 @@ class t {
125
125
  void 0 === p && (p = Object.keys(S).sort().reverse());
126
126
  if (0 === p.length) return void (d && d.close());
127
127
  if (void 0 === h || h !== u.pMVersion) return d && d.close(),
128
- c = m.getPMFilePath(v), s(i, r, p, u.pMVersion, c, await f(c));
128
+ c = l.getPMFilePath(v), s(i, r, p, u.pMVersion, c, await f(c));
129
129
  for (;0 < p.length; ) {
130
130
  let e = p.at(-1), n = S[e];
131
131
  if (n) {
132
132
  let [ t, a ] = n, o = await y(c, d, t, a);
133
- if (i.isStopping || void 0 === l[r]) return void d.close();
133
+ if (i.isStopping || void 0 === m[r]) return void d.close();
134
134
  if (h !== u.pMVersion) return d.close(), s(i, r, p);
135
- e in S && m.loadPartialPosMapBuffer(v, e, o);
135
+ e in S && l.loadPartialPosMapBuffer(v, e, o);
136
136
  }
137
137
  p.pop();
138
138
  }
@@ -141,8 +141,8 @@ class t {
141
141
  }(t, a), t.isStopping) break;
142
142
  if (await d(0), t.isStopping) break;
143
143
  }
144
- console.timeEnd("bgLoadPosMaps"), !t.isStopping && e.compactAtStart && m(t);
145
- })(this) : n.compactAtStart && m(this), this;
144
+ console.timeEnd("bgLoadPosMaps"), !t.isStopping && e.compactAtStart && l(t);
145
+ })(this) : n.compactAtStart && l(this), this;
146
146
  }
147
147
  async stop() {
148
148
  this.isStopping = !0;
@@ -205,8 +205,8 @@ class t {
205
205
  if (2 === this.compactState) {
206
206
  var d = this, {
207
207
  pMUpdates: t,
208
- vLUpdates: m,
209
- combinationUpdate: l
208
+ vLUpdates: l,
209
+ combinationUpdate: m
210
210
  } = t = t;
211
211
  if (t) {
212
212
  var a = t, o = d.qySnapshots.numToSnapshotMap;
@@ -226,8 +226,8 @@ class t {
226
226
  })(s);
227
227
  }
228
228
  }
229
- if (m) {
230
- var p = m, h = (t = d).qySnapshots.numToSnapshotMap;
229
+ if (l) {
230
+ var p = l, h = (t = d).qySnapshots.numToSnapshotMap;
231
231
  for (f in p) {
232
232
  var c, v, {
233
233
  posMap: u,
@@ -240,11 +240,11 @@ class t {
240
240
  for (c in ++g.pMVersion, ++g.vLVersion, g.verList[0] = g.pMVersion + g.vLVersion,
241
241
  y) y[c] = u[c];
242
242
  for (v in C) C[v] = S[v];
243
- I(f);
243
+ V(f);
244
244
  }
245
245
  }
246
- if (l) {
247
- var M, m = l;
246
+ if (m) {
247
+ var M, l = m;
248
248
  let e = d.qySnapshots, {
249
249
  numToSnapshotMap: n,
250
250
  keyToSnapshotMap: s
@@ -252,22 +252,22 @@ class t {
252
252
  snapshotNum: t,
253
253
  combinedSnapshotNumVerList: a,
254
254
  posMap: i
255
- } = m, r = n[t], {
255
+ } = l, r = n[t], {
256
256
  posMap: p,
257
257
  info: o
258
258
  } = r;
259
259
  for (M in ++o.pMVersion, ++o.vLVersion, o.verList[0] = o.pMVersion + o.vLVersion,
260
260
  p) p[M] = i[M];
261
- I(r);
261
+ V(r);
262
262
  let h = o.totalCount, c = r.outdatedCount;
263
263
  for (let [ o ] of a) {
264
- var q, V = n[o];
264
+ var q, I = n[o];
265
265
  let {
266
266
  posMap: t,
267
267
  info: a
268
- } = V;
268
+ } = I;
269
269
  for (q in t) p[q] = i[q], s[q] = r;
270
- I(V), h += a.totalCount, c += V.outdatedCount, e.delSnapshot(V);
270
+ V(I), h += a.totalCount, c += I.outdatedCount, e.delSnapshot(I);
271
271
  }
272
272
  o.totalCount = h, r.outdatedCount = c;
273
273
  }
@@ -288,7 +288,7 @@ class t {
288
288
  }
289
289
  }
290
290
 
291
- function I(t) {
291
+ function V(t) {
292
292
  var {
293
293
  info: a,
294
294
  compactOutedCount: o
@@ -297,29 +297,24 @@ function I(t) {
297
297
  t.compactOutedCount = 0;
298
298
  }
299
299
 
300
- function m(t) {
300
+ function l(t) {
301
301
  if (1 === t.compactState) {
302
302
  var {
303
303
  maxChangeId: a,
304
304
  qySnapshots: o,
305
305
  qySnapshotCompactor: e
306
- } = t, {
307
- emptySnapshotNumVerList: o,
308
- pMCompactSnapshotList: n,
309
- vLCompactSnapshotList: s,
310
- combiningSnapshotList: i
311
- } = o.calOutdates();
312
- if (0 < i.length || 0 < n.length || 0 < s.length) {
306
+ } = t, [ o, n, s, i ] = o.calOutdates();
307
+ if (0 < n.length || 0 < s.length || 0 < i.length) {
313
308
  t.compactState = 2, t.compactMaxChangeId = a;
314
- for (var r of [ n, s, i ]) for (var p of r) p.compactOutedCount = p.outdatedCount;
315
- e.compactSnapshots(n, s, i);
309
+ for (var r of [ s, i, n ]) for (var p of r) p.compactOutedCount = p.outdatedCount;
310
+ e.compactSnapshots(s, i, n);
316
311
  }
317
312
  0 < o.length && (t.emptySnapshotNumVerList.push(...o), t.snapshotSavedChangeId >= a ? c(t) : 1 === t.compactState && (t.compactState = 3,
318
313
  t.compactMaxChangeId = a));
319
314
  }
320
315
  }
321
316
 
322
- function l(t, a) {
317
+ function m(t, a) {
323
318
  var o = t.qySnapshots.snapshotMaxChangeId;
324
319
  let e = 0;
325
320
  if (a.fileMapLoaded) for (var n of a.fileList) ++e, n.cChangeId <= o && (n.visited ? n.visited = !1 : n.unloadFileContent());
@@ -8,10 +8,5 @@ export declare class QyKVDataLoader {
8
8
  aclKeyValueMap: any;
9
9
  maxChangeId: number;
10
10
  constructor(kvFolder: any, options?: any);
11
- load(): Promise<{
12
- maxChangeId: number;
13
- loadedMaxAclNum: number;
14
- qySnapshots: any;
15
- aclKeyValueMap: any;
16
- }>;
11
+ load(): Promise<any[]>;
17
12
  }