datafolder 1.0.7 → 1.0.9

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 (124) hide show
  1. package/README.md +4 -1
  2. package/index.js +1 -1
  3. package/internal.md +5 -3
  4. package/package.json +7 -5
  5. package/scripts/airbnb.js +77 -72
  6. package/scripts/airbnb2.js +78 -73
  7. package/scripts/airbnb2_queries.js +181 -229
  8. package/scripts/airbnb_queries.js +214 -265
  9. package/scripts/convertBinFiles.js +47 -49
  10. package/scripts/downloadFile.js +41 -40
  11. package/scripts/express.js +44 -48
  12. package/scripts/fastify.js +71 -80
  13. package/scripts/flights.js +71 -75
  14. package/scripts/flights2.js +78 -81
  15. package/scripts/flights2_queries.js +417 -455
  16. package/scripts/flights_queries.js +381 -407
  17. package/src/QyAcl.d.ts +17 -0
  18. package/src/QyAcl.js +113 -116
  19. package/src/QyAclSaver.d.ts +4 -0
  20. package/src/QyAclSaver.js +3 -3
  21. package/src/QyAclSaver_Worker.d.ts +9 -0
  22. package/src/QyAclSaver_Worker.js +2 -4
  23. package/src/QyAclWriter.d.ts +5 -0
  24. package/src/QyBatch.d.ts +42 -0
  25. package/src/QyBatch.js +8 -8
  26. package/src/QyBinWriter.d.ts +15 -0
  27. package/src/QyCD.d.ts +37 -0
  28. package/src/QyCD.js +8 -6
  29. package/src/QyCache.d.ts +44 -0
  30. package/src/QyCache.js +65 -59
  31. package/src/QyCompressor.d.ts +9 -0
  32. package/src/QyCompressor.js +29 -29
  33. package/src/QyCompressor_Worker.d.ts +1 -0
  34. package/src/QyDB.d.ts +42 -0
  35. package/src/QyDB.js +13 -11
  36. package/src/QyDefaultOptions.d.ts +1 -0
  37. package/src/QyDefaultOptions.js +3 -0
  38. package/src/QyDir.d.ts +48 -0
  39. package/src/QyDir.js +41 -41
  40. package/src/QyFetch.d.ts +7 -0
  41. package/src/QyFetch.js +2 -3
  42. package/src/QyFile.d.ts +19 -0
  43. package/src/QyFile.js +35 -34
  44. package/src/QyFileContentUtils.d.ts +13 -0
  45. package/src/QyFileContentUtils.js +126 -126
  46. package/src/QyFileLogger.d.ts +11 -0
  47. package/src/QyIndex.d.ts +6 -0
  48. package/src/QyIndex.js +73 -75
  49. package/src/QyIndexPropTree.d.ts +7 -0
  50. package/src/QyIndexPropTree.js +24 -24
  51. package/src/QyIntersectNode.d.ts +7 -0
  52. package/src/QyIntersectNode.js +15 -15
  53. package/src/QyItem.d.ts +30 -0
  54. package/src/QyItem.js +32 -28
  55. package/src/QyJsonSaver.d.ts +6 -0
  56. package/src/QyKVData.d.ts +12 -0
  57. package/src/QyKVData.js +11 -10
  58. package/src/QyKVDataCleaner.d.ts +4 -0
  59. package/src/QyKVDataCleaner.js +1 -1
  60. package/src/QyKVDataCleaner_Worker.d.ts +13 -0
  61. package/src/QyKVDataCleaner_Worker.js +2 -4
  62. package/src/QyKVDataLoader.d.ts +9 -0
  63. package/src/QyKVDataLoader.js +11 -11
  64. package/src/QyKVDataSaver.d.ts +4 -0
  65. package/src/QyKVDataSaver.js +6 -6
  66. package/src/QyKVDataSaver_Worker.d.ts +13 -0
  67. package/src/QyKVDataSaver_Worker.js +7 -9
  68. package/src/QyLogFileSaver.d.ts +4 -0
  69. package/src/QyLogFileSaver.js +1 -1
  70. package/src/QyLogFileSaver_Worker.d.ts +8 -0
  71. package/src/QyLogFileSaver_Worker.js +2 -4
  72. package/src/QyLogger.d.ts +10 -0
  73. package/src/QyLogger.js +40 -40
  74. package/src/QyMessageWorker.d.ts +5 -0
  75. package/src/QyMessageWorker.js +7 -7
  76. package/src/QyMessager.d.ts +7 -0
  77. package/src/QyMessager.js +30 -27
  78. package/src/QyMessager_Run.d.ts +1 -0
  79. package/src/QyMessager_Run.js +11 -6
  80. package/src/QyMod.d.ts +1 -0
  81. package/src/QyMod.js +6 -6
  82. package/src/QyOpRunner.d.ts +10 -0
  83. package/src/QyOpRunner.js +39 -39
  84. package/src/QyQueue.d.ts +11 -0
  85. package/src/QySaver.d.ts +10 -0
  86. package/src/QySnapshotCompactor.d.ts +4 -0
  87. package/src/QySnapshotCompactor.js +1 -1
  88. package/src/QySnapshotCompactor_Worker.d.ts +11 -0
  89. package/src/QySnapshotCompactor_Worker.js +2 -4
  90. package/src/QySnapshotSaver.d.ts +4 -0
  91. package/src/QySnapshotSaver.js +1 -1
  92. package/src/QySnapshotSaver_Worker.d.ts +16 -0
  93. package/src/QySnapshotSaver_Worker.js +17 -16
  94. package/src/QySnapshots.d.ts +27 -0
  95. package/src/QySnapshots.js +3 -3
  96. package/src/QyStructure.d.ts +1 -0
  97. package/src/QyStructure.js +18 -18
  98. package/src/QyTrigger.d.ts +9 -0
  99. package/src/QyTrigger.js +30 -30
  100. package/src/QyUnionNode.d.ts +17 -0
  101. package/src/QyUnionNode.js +2 -2
  102. package/src/QyUtils.d.ts +53 -0
  103. package/src/QyUtils.js +140 -117
  104. package/src/QyWorker.d.ts +5 -0
  105. package/src/QyWorker.js +18 -18
  106. package/src/hackernews.d.ts +1 -0
  107. package/src/hackernews.js +59 -47
  108. package/src/rpc/getRpcFiles.js +1 -0
  109. package/src/simulate.d.ts +1 -0
  110. package/src/simulate2.d.ts +1 -0
  111. package/src/soc_pokec.d.ts +1 -0
  112. package/static/codemirror.bundle/editor.bundle.js +399 -184
  113. package/static/datafolderui/QyStyledElement.js +2 -2
  114. package/static/datafolderui/QyUIFolderViewer.js +97 -77
  115. package/static/datafolderui/QyUIUtils.js +4 -4
  116. package/static/datafolderui/code-mirror.js +7 -7
  117. package/static/datafolderui/display-tree.js +13 -10
  118. package/static/datafolderui/hscrpt.js +26 -7
  119. package/static/datafolderui/json-view.js +27 -0
  120. package/static/datafolderui/main-page.js +65 -37
  121. package/static/datafolderui/query-editor.js +8 -8
  122. package/static/datafolderui/rpc-editor.js +31 -0
  123. package/static/datafolderui/trigger-editor.js +9 -6
  124. package/static/datafolderui/QyUIFolderTree.js +0 -188
@@ -18,7 +18,11 @@ import {
18
18
  QyKVDataCleaner as p
19
19
  } from "./QyKVDataCleaner.js";
20
20
 
21
- class s extends a {
21
+ import {
22
+ logger as m
23
+ } from "./QyLogger.js";
24
+
25
+ export default class extends a {
22
26
  constructor({
23
27
  kvFolder: a,
24
28
  options: s
@@ -103,7 +107,7 @@ class s extends a {
103
107
  return e;
104
108
  })(this)).prefixPM, delete (u = {
105
109
  ...s
106
- }).keyValueMap, delete s.posMap, s.isOut = !0, logger.info("Sending snapshot " + s.snapshotNum)),
110
+ }).keyValueMap, delete s.posMap, s.isOut = !0, m.info("Sending snapshot " + s.snapshotNum)),
107
111
  this.castParent("onSnapshotSavedChangeId", t, u);
108
112
  }
109
113
  }
@@ -124,22 +128,22 @@ function h(a, s, e, t) {
124
128
  ...l
125
129
  };
126
130
  }
127
- let u = a.length, S;
131
+ let u = a.length, m;
128
132
  if (0 < u) {
129
- var m, d = e.keyToSnapshotMap, {
130
- keyValueMap: y,
133
+ var S, y = e.keyToSnapshotMap, {
134
+ keyValueMap: d,
131
135
  info: o,
132
136
  snapshotNum: v
133
- } = S = e.getMaxCombinedSnapshot(a);
134
- for (m of a) if (S != m) {
137
+ } = m = e.getMaxCombinedSnapshot(a);
138
+ for (S of a) if (m != S) {
135
139
  var g, {
136
140
  keyValueMap: M,
137
141
  snapshotNum: f
138
- } = m;
139
- for (g in M) y[g] = M[g], d[g] = S;
140
- e.delSnapshot(m), t.push(f);
142
+ } = S;
143
+ for (g in M) d[g] = M[g], y[g] = m;
144
+ e.delSnapshot(S), t.push(f);
141
145
  }
142
- p.push(e.saveKeyValueMap(S)), h.push([ v, o.pMVersion ]), r.push(v, o.vLVersion),
146
+ p.push(e.saveKeyValueMap(m)), h.push([ v, o.pMVersion ]), r.push(v, o.vLVersion),
143
147
  n[v] = {
144
148
  ...o
145
149
  };
@@ -166,8 +170,7 @@ function h(a, s, e, t) {
166
170
  snapshotNum: s,
167
171
  info: e
168
172
  } = s;
169
- return await a.saveSnapshotInfo(s, e), logger.log("Created snapshot " + s),
170
- {
173
+ return await a.saveSnapshotInfo(s, e), m.log("Created snapshot " + s), {
171
174
  snapshotNum: s,
172
175
  maxChangeId: e.maxChangeId
173
176
  };
@@ -176,6 +179,4 @@ function h(a, s, e, t) {
176
179
  saveMaxSnapshotInfoPromise: t,
177
180
  outdates: o
178
181
  };
179
- }
180
-
181
- export default s;
182
+ }
@@ -0,0 +1,27 @@
1
+ export declare class QySnapshots {
2
+ constructor(snapshotFolder: any, options: any);
3
+ loadSnapshotInfos(): Promise<void>;
4
+ closeAllFDs(): void;
5
+ saveKeyValueMap(snapshot: any): Promise<any>;
6
+ addMaxSnapshot(maxSnapshot: any): void;
7
+ removeKey(key: any): true | undefined;
8
+ applyCmdObj(cmdObj: any, aclKeyValueMap: any, syncList: any): void;
9
+ getValueSync(key: any): any;
10
+ loadPartialPosMapBuffer(snapshot: any, prefix: any, buffer: any): void;
11
+ delSnapshot(snapshot: any): void;
12
+ calOutdates(): {
13
+ emptySnapshotNumList: never[];
14
+ combiningSnapshotList: never[];
15
+ pMCompactSnapshotList: never[];
16
+ vLCompactSnapshotList: never[];
17
+ };
18
+ getMaxCombinedSnapshot(snapshotList: any): any;
19
+ getPMFilePath(snapshot: any): string;
20
+ getVLFilePath(snapshot: any): string;
21
+ saveSnapshotInfo(snapshotNum: any, info: any): any;
22
+ savePosMap(snapshot: any, sortedKeyList: any): Promise<any>;
23
+ isEmptySnapshot(snapshot: any): boolean;
24
+ removeKeyFromSnapshot(snapshot: any, key: any): void;
25
+ }
26
+ export declare function iterPMBuffer(buffer: any, fun: any): void;
27
+ export declare function loadPrefixPMFile(prefixPMFilePath: any): Promise<{}>;
@@ -224,7 +224,7 @@ class t {
224
224
  } = n;
225
225
  for (t in r) {
226
226
  var u, f = r[t];
227
- f.isOut || (100 == (u = D(f)) ? (this.delSnapshot(f), a.push(t)) : p < u ? (B(f) ? o : s).push(f) : Math.round(f.outdatedCount / f.info.totalCount * 100) > i ? e.push(f) : (u = this,
227
+ f.isOut || (100 == (u = D(f)) ? (this.delSnapshot(f), a.push(t)) : p < u ? (B(f) ? o : s).push(f) : Math.floor(f.outdatedCount / f.info.totalCount * 100) > i ? e.push(f) : (u = this,
228
228
  f.info.totalCount < u.options.minSnapshotKeyCount && B(f) && o.push(f)));
229
229
  }
230
230
  return 1 == o.length && D(o[0]) < p && (o.length = 0), 0 < e.length && P.log("pMCompacts:" + e.map(t => t.snapshotNum)),
@@ -263,7 +263,7 @@ class t {
263
263
  outdatedCount: o,
264
264
  totalCount: e
265
265
  } = a;
266
- return a.outdated = Math.round(100 * o / e) + "%", P.log("Saving snapshotInfo:" + t),
266
+ return a.outdated = Math.floor(100 * o / e) + "%", P.log("Saving snapshotInfo:" + t),
267
267
  this.qyJsonSaver.saveToFile(a, t + ".json", !0);
268
268
  }
269
269
  savePosMap(t, a) {
@@ -376,7 +376,7 @@ function D(t) {
376
376
  outdatedCount: t,
377
377
  info: a
378
378
  } = t, o = a.totalCount, t = t + a.outdatedCount;
379
- return t == o ? 100 : Math.round(t / o * 100);
379
+ return t == o ? 100 : Math.floor(t / o * 100);
380
380
  }
381
381
 
382
382
  export {
@@ -0,0 +1 @@
1
+ export declare function dumpStructure(parentFolderPath: any, dir: any): Promise<void>;
@@ -14,39 +14,39 @@ import {
14
14
  } from "./QyUtils.js";
15
15
 
16
16
  async function P(e, r) {
17
- let t = {};
18
- for (var i of r.subdirList) {
19
- let e = i.name;
17
+ let i = {};
18
+ for (var o of r.subdirList) {
19
+ let e = o.name;
20
20
  for (;r.getFile(e); ) e += "_d";
21
- e = _(e), t[e] = {
22
- x: i,
21
+ e = _(e), i[e] = {
22
+ x: o,
23
23
  count: 0
24
24
  };
25
25
  }
26
26
  await y(e);
27
- var o, a = [], s = [];
27
+ var t, a = [], s = [];
28
28
  let n = {};
29
- for (o of await w(e, {
29
+ for (t of await w(e, {
30
30
  withFileTypes: !0
31
31
  })) {
32
- var u = o.name;
33
- o.isFile() ? a.push(u) : (s.push(u), n[u] = 1);
32
+ var f = t.name;
33
+ t.isFile() ? a.push(f) : (s.push(f), n[f] = 1);
34
34
  }
35
- var f, l, p, m, c, h = [];
36
- for (f of s) t[f] || ((l = d((l = f) + "_d") || d(l.replace(/_d$/, ""))) ? (h.push(F(x(e, f), x(e, l))),
37
- t[l].count = 1) : h.push(v(x(e, f), {
35
+ var l, u, p, m, h, c = [];
36
+ for (l of s) i[l] || ((u = d((u = l) + "_d") || d(u.replace(/_d$/, ""))) ? (c.push(F(x(e, l), x(e, u))),
37
+ i[u].count = 1) : c.push(v(x(e, l), {
38
38
  recursive: !0
39
39
  })));
40
- for (p of a) r.getFile(p) || h.push(v(x(e, p)));
41
- await Promise.all(h), h.length = 0;
42
- for (m of r.fileList) h.push(g(x(e, _(m.name)), m.contentAsText, {
40
+ for (p of a) r.getFile(p) || c.push(v(x(e, p)));
41
+ await Promise.all(c), c.length = 0;
42
+ for (m of r.fileList) c.push(g(x(e, _(m.name)), m.contentAsText, {
43
43
  flush: !0
44
44
  }));
45
- for (c in await Promise.all(h), h.length = 0, t) h.push(P(x(e, c), t[c].x));
45
+ for (h in await Promise.all(c), c.length = 0, i) c.push(P(x(e, h), i[h].x));
46
46
  function d(e) {
47
- return e && 0 == t[e]?.count && !n[e] ? e : void 0;
47
+ return e && 0 == i[e]?.count && !n[e] ? e : void 0;
48
48
  }
49
- await Promise.all(h);
49
+ await Promise.all(c);
50
50
  }
51
51
 
52
52
  function _(e) {
@@ -0,0 +1,9 @@
1
+ export declare class QyTriggerNode {
2
+ constructor(name: any, parent: any);
3
+ insertTrigger(triggerName: any, fileNamePath: any, propNamePathList: any, fun: any): void;
4
+ removeTrigger(triggerName: any, fileNamePath: any): boolean;
5
+ get isEmpty(): boolean;
6
+ removeEmptyNodes(): void;
7
+ checkTrigger(file: any, delta: any): void;
8
+ }
9
+ export declare function updateTriggerNodes(rootDir: any, fileNamePath: any): void;
package/src/QyTrigger.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import {
2
- isDeepStrictEqual as p
2
+ isDeepStrictEqual as c
3
3
  } from "node:util";
4
4
 
5
5
  import {
6
- getValByNamePath as c,
6
+ getValByNamePath as p,
7
7
  setValByNamePath as u
8
8
  } from "./QyFileContentUtils.js";
9
9
 
10
10
  import {
11
11
  isEmptyObj as e,
12
- isMatchName as l,
12
+ isMatchName as g,
13
13
  getMatchParam as d,
14
14
  arrayLast as f,
15
- propNameJoin as N
15
+ propNameJoin as v
16
16
  } from "./QyUtils.js";
17
17
 
18
- let v = Array.isArray;
18
+ let N = Array.isArray;
19
19
 
20
20
  class h {
21
21
  constructor(e, r) {
@@ -29,21 +29,21 @@ class h {
29
29
  insertTrigger(e, r, t, a) {
30
30
  let i = this;
31
31
  for (var s of r) {
32
- l(s) && (s = "*");
33
- var o = i.children;
34
- i = o[s] || (o[s] = new h(s, i));
32
+ g(s) && (s = "*");
33
+ var n = i.children;
34
+ i = n[s] || (n[s] = new h(s, i));
35
35
  }
36
- var n = i.triggerMap, g = n[e];
37
- g ? Object.assign(g, {
36
+ var o = i.triggerMap, l = o[e];
37
+ l ? Object.assign(l, {
38
38
  triggerName: e,
39
39
  fileNamePath: r,
40
40
  propNamePathList: t,
41
41
  fun: a
42
- }) : n[e] = new m(e, r, t, a);
42
+ }) : o[e] = new m(e, r, t, a);
43
43
  }
44
44
  removeTrigger(e, r) {
45
45
  let t = this;
46
- for (var a of r) if (l(a) && (a = "*"), !(t = t.children[a])) return !1;
46
+ for (var a of r) if (g(a) && (a = "*"), !(t = t.children[a])) return !1;
47
47
  r = t.triggerMap;
48
48
  return !!r[e] && (delete r[e], t.isEmpty && t.removeEmptyNodes(), !0);
49
49
  }
@@ -82,32 +82,32 @@ class m {
82
82
  triggerName: a,
83
83
  fileNamePath: i,
84
84
  propNamePathList: s,
85
- fun: o
86
- } = this, n = e.fileContent;
87
- let g;
85
+ fun: n
86
+ } = this, o = e.fileContent;
87
+ let l;
88
88
  for (t of s) {
89
- var l = c(r.oldValue, t), f = c(r.newValue, t);
90
- p(l, f) || (l = {
91
- oldValue: l,
89
+ var g = p(r.oldValue, t), f = p(r.newValue, t);
90
+ c(g, f) || (g = {
91
+ oldValue: g,
92
92
  newValue: f
93
- }, (v(f) || v(c(n, t))) && (l.isArrayDelta = !0), (g = g || {
93
+ }, (N(f) || N(p(o, t))) && (g.isArrayDelta = !0), (l = l || {
94
94
  _file: e,
95
- _fileContent: n
96
- })[N(t)] = l, u(g, t, l));
95
+ _fileContent: o
96
+ })[v(t)] = g, u(l, t, g));
97
97
  }
98
- if (g) {
98
+ if (l) {
99
99
  var {
100
100
  namePath: h,
101
101
  qyCache: s
102
102
  } = e;
103
103
  for (let e = 0; e < h.length; ++e) {
104
104
  var m = d(i[e]);
105
- m && (g[m] = h[e]);
105
+ m && (l[m] = h[e]);
106
106
  }
107
107
  try {
108
- o && o(g), s.emit(a, g);
108
+ n && n(l), s.emit(a, l);
109
109
  } catch (e) {
110
- logger.error(`Running trigger ${a} failed:`, g, e);
110
+ logger.error(`Running trigger ${a} failed:`, l, e);
111
111
  }
112
112
  }
113
113
  }
@@ -116,7 +116,7 @@ class m {
116
116
  let t = [];
117
117
 
118
118
  function y(e, r) {
119
- return e ? l(r) ? Object.values(e) : (e = e[r]) ? [ e ] : t : t;
119
+ return e ? g(r) ? Object.values(e) : (e = e[r]) ? [ e ] : t : t;
120
120
  }
121
121
 
122
122
  function r(e, a) {
@@ -124,13 +124,13 @@ function r(e, a) {
124
124
  let r = [ e ], t = [];
125
125
  for (let e = 0; e < a.length - 1; ++e) {
126
126
  var i, s = a[e];
127
- for (i of r) for (var o of y(i.subdirMap, s)) i.setChildTriggerNodes(o),
128
- t.push(o);
127
+ for (i of r) for (var n of y(i.subdirMap, s)) i.setChildTriggerNodes(n),
128
+ t.push(n);
129
129
  if (0 == t.length) return;
130
130
  [ r, t ] = [ t, r ], t.length = 0;
131
131
  }
132
- var n, g = f(a);
133
- for (n of r) for (var l of y(n.fileMap, g)) n.setChildTriggerNodes(l);
132
+ var o, l = f(a);
133
+ for (o of r) for (var g of y(o.fileMap, l)) o.setChildTriggerNodes(g);
134
134
  }
135
135
  }
136
136
 
@@ -0,0 +1,17 @@
1
+ export declare class QueryCounter {
2
+ constructor(limit: any, cursor?: number);
3
+ get isFull(): boolean;
4
+ encounterOne(fileName: any): true | undefined;
5
+ countOne(): true | undefined;
6
+ }
7
+ export declare class QyQueryNode {
8
+ constructor();
9
+ encounterOne(resultMap: any, fileName: any, queryCounter: any): true | undefined;
10
+ }
11
+ export declare class QyUnionNode extends QyQueryNode {
12
+ constructor(dir: any);
13
+ containsFile(fileName: any): boolean;
14
+ getFiles(queryCounter: any, resultMap?: {}): Generator<any, void, any>;
15
+ addNode(node: any): void;
16
+ addDir(dir: any): void;
17
+ }
@@ -97,7 +97,7 @@ class o extends e {
97
97
  }
98
98
 
99
99
  export {
100
- o as QyUnionNode,
100
+ i as QueryCounter,
101
101
  e as QyQueryNode,
102
- i as QueryCounter
102
+ o as QyUnionNode
103
103
  };
@@ -0,0 +1,53 @@
1
+ export declare const __dirname: string;
2
+ export declare const SpecialOperators: {
3
+ [k: string]: string;
4
+ };
5
+ export declare const SpecialFilePaths: {
6
+ HiddenFolderName: string;
7
+ TriggerDirPath: string[];
8
+ RpcDirPath: string[];
9
+ IndexDirPath: string[];
10
+ IndexPropPathsFileName: string;
11
+ };
12
+ export declare function isMatchName(name: any): any;
13
+ export declare function getMatchParam(name: any): any;
14
+ export declare function getSizeStr(size: number): string;
15
+ export declare function calHash(str: any, len?: number): string;
16
+ export declare const Hash_Key_Length: number;
17
+ export declare function getSubdirMapKey(fullPathHash: any): string;
18
+ export declare function getFileMapKey(fullPathHash: any): string;
19
+ export declare function getContentKey(fullPathHash: any): string;
20
+ export declare function getRandomStr(byteCount?: number): string;
21
+ export declare function arrayLast(array: any): any;
22
+ export declare function isEmptyObj(obj: any): boolean;
23
+ export declare function isNotNullObj(item: any): boolean;
24
+ export declare function isString(item: any): item is string;
25
+ export declare function isNumber(item: any): item is number;
26
+ export declare function isBoolean(item: any): item is boolean;
27
+ export declare function isFunction(item: any): boolean;
28
+ export declare function isSimpleType(item: any): boolean;
29
+ export declare function trimArrayTail(arr: any): any;
30
+ export declare function setPromise(operation: any): any;
31
+ export declare function toBuffer(data: any): Buffer<any>;
32
+ export declare function getSuffix(num: any): "s" | "";
33
+ export declare function ensureDir(dirPath: any): Promise<string | undefined>;
34
+ export declare function ensureParentDir(filePath: any): Promise<string | undefined>;
35
+ export declare function getSize(filePath: any): Promise<number | false>;
36
+ export declare function folderOrFileExists(folderPath: any): Promise<boolean>;
37
+ export declare function sleep(seconds: any, signal: any): Promise<boolean>;
38
+ export declare function lockExclusiveFilePath(exclusiveFilePath: any): Promise<void>;
39
+ export declare function unlockExclusiveFilePath(exclusiveFilePath: any): void;
40
+ export declare function fromSingleName(name: any): any;
41
+ export declare function toSingleName(list: any): any;
42
+ export declare function pathSplit(itemPath: any): any;
43
+ export declare function propNameSplit(propNameStr: any): any;
44
+ export declare function propNameJoin(propName: any): any;
45
+ export declare function randomInt(max: any, min?: number): number;
46
+ export declare function listToMap(list: any): {};
47
+ export declare function readBufferAsync(filePath: any, fileHandle: any, start: any, length: any): Promise<Buffer<ArrayBuffer> | undefined>;
48
+ export declare function memoryPercent(): number;
49
+ export declare function loadFileList(fileList: any, preloadCount?: number): AsyncGenerator<{
50
+ filePath: any;
51
+ bin: any;
52
+ }, void, unknown>;
53
+ export * as default from "./QyUtils.ts";