querysub 0.3.0 → 0.4.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.
package/package.json
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
import { getStorageDir, getSubFolder } from "../fs";
|
|
2
2
|
import { Archives } from "./archives";
|
|
3
|
-
import { diskEscapeFileName, getArchivesLocal } from "./archivesDisk";
|
|
4
3
|
import fs from "fs";
|
|
5
4
|
|
|
6
|
-
import
|
|
7
|
-
import { binarySearchBasic, binarySearchIndex, list, nextId, sort, timeInHour, timeInMinute } from "socket-function/src/misc";
|
|
5
|
+
import { list, nextId, timeInHour, timeInMinute } from "socket-function/src/misc";
|
|
8
6
|
import { cache, lazy } from "socket-function/src/caching";
|
|
9
|
-
import {
|
|
7
|
+
import { runInSerial, runInfinitePoll } from "socket-function/src/batching";
|
|
10
8
|
import { sha256 } from "js-sha256";
|
|
11
|
-
import { devDebugbreak } from "../config";
|
|
12
9
|
import child_process from "child_process";
|
|
13
|
-
import os from "os";
|
|
14
|
-
import fsext, { flock } from "fs-ext";
|
|
15
|
-
import debugbreak from "debugbreak";
|
|
16
|
-
import readline from "readline";
|
|
17
10
|
import { getPPID } from "../misc/getParentProcessId";
|
|
18
11
|
import { Args } from "socket-function/src/types";
|
|
19
12
|
import { getArchivesBackblaze } from "./archivesBackBlaze";
|
|
20
|
-
import {
|
|
21
|
-
import { formatNumber, formatTime } from "socket-function/src/formatting/format";
|
|
13
|
+
import { formatNumber } from "socket-function/src/formatting/format";
|
|
22
14
|
import { SizeLimiter } from "../diagnostics/SizeLimiter";
|
|
23
15
|
|
|
24
16
|
const SIZE_LIMIT = new SizeLimiter({
|
|
@@ -702,6 +694,7 @@ async function isLocked(path: string, operation?: {
|
|
|
702
694
|
return await lockRetryLoop(async function isLocked() {
|
|
703
695
|
let handle = await getHandle(lockPath);
|
|
704
696
|
try {
|
|
697
|
+
const { flock } = await import("fs-ext");
|
|
705
698
|
await new Promise<void>((r, e) => flock(handle.fd, "ex", err => err ? e(err) : r()));
|
|
706
699
|
let contents = (await handle.readFile()).toString();
|
|
707
700
|
let locks = contents.toString().replaceAll("\0", "").trim().split("\n").filter(x => x);
|