@polka-codes/cli-shared 0.9.96 → 0.9.98
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/dist/index.js +0 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -67507,7 +67507,6 @@ class FileLock {
|
|
|
67507
67507
|
const dbBaseName = basename2(dbPath);
|
|
67508
67508
|
const files = await readdir(lockDir);
|
|
67509
67509
|
const now2 = Date.now();
|
|
67510
|
-
let cleanedCount = 0;
|
|
67511
67510
|
for (const file2 of files) {
|
|
67512
67511
|
if (!file2.startsWith(`${dbBaseName}.lock.`)) {
|
|
67513
67512
|
continue;
|
|
@@ -67522,7 +67521,6 @@ class FileLock {
|
|
|
67522
67521
|
if (age > maxAge) {
|
|
67523
67522
|
try {
|
|
67524
67523
|
await unlink2(filePath);
|
|
67525
|
-
cleanedCount++;
|
|
67526
67524
|
} catch (error48) {
|
|
67527
67525
|
const errorCode = error48?.code;
|
|
67528
67526
|
if (errorCode !== "ENOENT") {
|
|
@@ -67531,9 +67529,6 @@ class FileLock {
|
|
|
67531
67529
|
}
|
|
67532
67530
|
}
|
|
67533
67531
|
}
|
|
67534
|
-
if (cleanedCount > 0) {
|
|
67535
|
-
console.log(`[FileLock] Cleaned up ${cleanedCount} old lock file(s) (older than ${maxAge}ms)`);
|
|
67536
|
-
}
|
|
67537
67532
|
} catch (error48) {
|
|
67538
67533
|
console.debug(`[FileLock] Cleanup encountered an error: ${error48 instanceof Error ? error48.message : String(error48)}`);
|
|
67539
67534
|
}
|