@feigi/fleet-ctl 3.110.1 → 3.110.2
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
|
@@ -396,7 +396,7 @@ export function parseTsv(text) {
|
|
|
396
396
|
});
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
import { writeFileSync, existsSync, renameSync } from "node:fs";
|
|
399
|
+
import { writeFileSync, existsSync, mkdirSync, renameSync } from "node:fs";
|
|
400
400
|
import { isCLI } from "./is-cli.mjs";
|
|
401
401
|
import { makeDie, isFlagLike } from "./arg.mjs";
|
|
402
402
|
|
|
@@ -499,6 +499,7 @@ if (isCLI(import.meta.url)) {
|
|
|
499
499
|
// Write-then-rename: writeFileSync truncates before it writes, so an interrupt
|
|
500
500
|
// over the committed corpus left a torn file that the NEXT scrape read, merged
|
|
501
501
|
// and rewrote — losing every other session's rows for good.
|
|
502
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
502
503
|
writeFileSync(file + ".tmp", (header ? header + "\n" : "") + formatTsv(merged));
|
|
503
504
|
renameSync(file + ".tmp", file);
|
|
504
505
|
// Report the SCRAPE, not just the file. `merged.length` is the whole corpus,
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
// verdict flags is derived when its evidence is still in scratch, and
|
|
114
114
|
// otherwise refused with the flags to give.
|
|
115
115
|
|
|
116
|
-
import { appendFileSync, existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
116
|
+
import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
117
117
|
import { execFileSync } from "node:child_process";
|
|
118
118
|
import { dirname, join } from "node:path";
|
|
119
119
|
import { fileURLToPath } from "node:url";
|
|
@@ -889,8 +889,10 @@ function append(pr, paths) {
|
|
|
889
889
|
}
|
|
890
890
|
|
|
891
891
|
const line = formatRow({ ...fields, run_date: today(), pr, ticket, tier: resolved.tier });
|
|
892
|
-
if (text === null)
|
|
893
|
-
|
|
892
|
+
if (text === null) {
|
|
893
|
+
mkdirSync(dirname(paths.file), { recursive: true });
|
|
894
|
+
writeFileSync(paths.file, `# ${COLUMNS.join("\t")}\n${line}\n`);
|
|
895
|
+
} else appendFileSync(paths.file, `${text === "" || text.endsWith("\n") ? "" : "\n"}${line}\n`);
|
|
894
896
|
console.log(line);
|
|
895
897
|
}
|
|
896
898
|
|