fix(skills): remove checkpoint helper dead code
This commit is contained in:
@@ -184,13 +184,12 @@ async function readExisting(io, target) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function openUniqueTemp(io, target) {
|
async function openUniqueTemp(io, target) {
|
||||||
const directory = dirname(target);
|
|
||||||
for (let attempt = 0; attempt < MAX_TEMP_NAME_ATTEMPTS; attempt += 1) {
|
for (let attempt = 0; attempt < MAX_TEMP_NAME_ATTEMPTS; attempt += 1) {
|
||||||
const id = io.randomUUID();
|
const id = io.randomUUID();
|
||||||
const path = `${target}.tmp-${process.pid}-${id}`;
|
const path = `${target}.tmp-${process.pid}-${id}`;
|
||||||
try {
|
try {
|
||||||
const handle = await io.open(path, "wx", FILE_MODE);
|
const handle = await io.open(path, "wx", FILE_MODE);
|
||||||
return { path, handle, directory };
|
return { path, handle };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// A collision is not stale-file cleanup. Leave the old file alone and try a new name.
|
// A collision is not stale-file cleanup. Leave the old file alone and try a new name.
|
||||||
if (isAlreadyExists(error)) continue;
|
if (isAlreadyExists(error)) continue;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import {
|
|||||||
checkpointRecord,
|
checkpointRecord,
|
||||||
defaultIo,
|
defaultIo,
|
||||||
REQUIRED_SECTIONS,
|
REQUIRED_SECTIONS,
|
||||||
validateRecord,
|
|
||||||
} from "../scripts/checkpoint-record.mjs";
|
} from "../scripts/checkpoint-record.mjs";
|
||||||
|
|
||||||
const scriptPath = fileURLToPath(new URL("../scripts/checkpoint-record.mjs", import.meta.url));
|
const scriptPath = fileURLToPath(new URL("../scripts/checkpoint-record.mjs", import.meta.url));
|
||||||
|
|||||||
Reference in New Issue
Block a user