@kaynooo/cli-workspace 0.7.0 → 0.9.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/dist/audit-cli.js +19 -2
- package/dist/cli.js +28 -10
- package/dist/repos-cli.js +21 -3
- package/dist/sweep-cli.js +19 -2
- package/package.json +2 -2
package/dist/audit-cli.js
CHANGED
|
@@ -348,13 +348,13 @@ function userConfigReadPath(bin, legacy = [], where = {}) {
|
|
|
348
348
|
// ../kit/src/theme.ts
|
|
349
349
|
var DEFAULT = {
|
|
350
350
|
colors: { accent: "cyan", id: "yellow", path: "blue", label: "dim", value: "bold", ok: "green", warn: "yellow", problem: "red", note: "dim", passed: "green", failed: "red", running: "cyan", queued: "yellow", skipped: "dim" },
|
|
351
|
-
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501" },
|
|
351
|
+
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501", rule: "\u2500", corner: "\u256D" },
|
|
352
352
|
accents: ["cyan", "magenta", "green", "blue", "yellow", "redBright"],
|
|
353
353
|
bins: {}
|
|
354
354
|
};
|
|
355
355
|
var BRIGHT = { accent: "cyanBright", id: "yellowBright", path: "blueBright", label: "white", value: "bold whiteBright", ok: "greenBright", warn: "yellowBright", problem: "redBright", note: "white", passed: "greenBright", failed: "redBright", running: "cyanBright", queued: "yellowBright", skipped: "white" };
|
|
356
356
|
var MONO = { accent: "bold", id: "bold", path: "underline", label: "dim", value: "bold", ok: "bold", warn: "bold", problem: "bold", note: "dim", passed: "bold", failed: "bold", running: "bold", queued: "dim", skipped: "dim" };
|
|
357
|
-
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#" };
|
|
357
|
+
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#", rule: "-", corner: "+" };
|
|
358
358
|
var PRESETS = {
|
|
359
359
|
default: {},
|
|
360
360
|
"high-contrast": { colors: BRIGHT, accents: ["cyanBright", "magentaBright", "greenBright", "blueBright", "yellowBright", "redBright"] },
|
|
@@ -554,6 +554,21 @@ var STATUS_WORDS = {
|
|
|
554
554
|
skipped: ["skipped", "cancelled", "canceled", "manual"]
|
|
555
555
|
};
|
|
556
556
|
var STATUS_OF = new Map(Object.entries(STATUS_WORDS).flatMap(([status, words]) => words.map((word) => [word, status])));
|
|
557
|
+
function header(bin, context, stream, env = process6.env) {
|
|
558
|
+
if (!takesControlCodes(stream, env))
|
|
559
|
+
return "";
|
|
560
|
+
const colors = paint(stream, env);
|
|
561
|
+
const hash = [...bin].reduce((sum, char) => sum + char.charCodeAt(0), 0);
|
|
562
|
+
const { theme } = activeTheme();
|
|
563
|
+
const spec = theme.bins[bin] ?? theme.accents[hash % theme.accents.length];
|
|
564
|
+
const accent = tinted(typeof spec === "string" && spec.split(" ").includes("bold") ? colors : colors.bold, spec, env);
|
|
565
|
+
return `${accent(bin)}${context === undefined ? "" : colors.dim(` \u203A ${context}`)}`;
|
|
566
|
+
}
|
|
567
|
+
function printHeader(bin, context, stream = process6.stdout, env = process6.env) {
|
|
568
|
+
const line = header(bin, context, stream, env);
|
|
569
|
+
if (line !== "")
|
|
570
|
+
console.log(line);
|
|
571
|
+
}
|
|
557
572
|
|
|
558
573
|
// ../kit/src/format.ts
|
|
559
574
|
var UNITS = [["d", 86400], ["h", 3600], ["m", 60], ["s", 1]];
|
|
@@ -1437,6 +1452,8 @@ async function runMain({ name, version, run, redact, usage }, argv = process13.a
|
|
|
1437
1452
|
}
|
|
1438
1453
|
return code;
|
|
1439
1454
|
}
|
|
1455
|
+
// ../kit/src/folders.ts
|
|
1456
|
+
var SKIPPED_FOLDERS = new Set(["node_modules", "vendor", "dist", "build", "target", "coverage", "venv", "__pycache__"]);
|
|
1440
1457
|
// ../kit/src/pool.ts
|
|
1441
1458
|
async function pool(items, limit, task) {
|
|
1442
1459
|
const results = Array.from({ length: items.length });
|
package/dist/cli.js
CHANGED
|
@@ -348,13 +348,13 @@ function userConfigReadPath(bin, legacy = [], where = {}) {
|
|
|
348
348
|
// ../kit/src/theme.ts
|
|
349
349
|
var DEFAULT = {
|
|
350
350
|
colors: { accent: "cyan", id: "yellow", path: "blue", label: "dim", value: "bold", ok: "green", warn: "yellow", problem: "red", note: "dim", passed: "green", failed: "red", running: "cyan", queued: "yellow", skipped: "dim" },
|
|
351
|
-
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501" },
|
|
351
|
+
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501", rule: "\u2500", corner: "\u256D" },
|
|
352
352
|
accents: ["cyan", "magenta", "green", "blue", "yellow", "redBright"],
|
|
353
353
|
bins: {}
|
|
354
354
|
};
|
|
355
355
|
var BRIGHT = { accent: "cyanBright", id: "yellowBright", path: "blueBright", label: "white", value: "bold whiteBright", ok: "greenBright", warn: "yellowBright", problem: "redBright", note: "white", passed: "greenBright", failed: "redBright", running: "cyanBright", queued: "yellowBright", skipped: "white" };
|
|
356
356
|
var MONO = { accent: "bold", id: "bold", path: "underline", label: "dim", value: "bold", ok: "bold", warn: "bold", problem: "bold", note: "dim", passed: "bold", failed: "bold", running: "bold", queued: "dim", skipped: "dim" };
|
|
357
|
-
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#" };
|
|
357
|
+
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#", rule: "-", corner: "+" };
|
|
358
358
|
var PRESETS = {
|
|
359
359
|
default: {},
|
|
360
360
|
"high-contrast": { colors: BRIGHT, accents: ["cyanBright", "magentaBright", "greenBright", "blueBright", "yellowBright", "redBright"] },
|
|
@@ -554,6 +554,21 @@ var STATUS_WORDS = {
|
|
|
554
554
|
skipped: ["skipped", "cancelled", "canceled", "manual"]
|
|
555
555
|
};
|
|
556
556
|
var STATUS_OF = new Map(Object.entries(STATUS_WORDS).flatMap(([status, words]) => words.map((word) => [word, status])));
|
|
557
|
+
function header(bin, context, stream, env = process6.env) {
|
|
558
|
+
if (!takesControlCodes(stream, env))
|
|
559
|
+
return "";
|
|
560
|
+
const colors = paint(stream, env);
|
|
561
|
+
const hash = [...bin].reduce((sum, char) => sum + char.charCodeAt(0), 0);
|
|
562
|
+
const { theme } = activeTheme();
|
|
563
|
+
const spec = theme.bins[bin] ?? theme.accents[hash % theme.accents.length];
|
|
564
|
+
const accent = tinted(typeof spec === "string" && spec.split(" ").includes("bold") ? colors : colors.bold, spec, env);
|
|
565
|
+
return `${accent(bin)}${context === undefined ? "" : colors.dim(` \u203A ${context}`)}`;
|
|
566
|
+
}
|
|
567
|
+
function printHeader(bin, context, stream = process6.stdout, env = process6.env) {
|
|
568
|
+
const line = header(bin, context, stream, env);
|
|
569
|
+
if (line !== "")
|
|
570
|
+
console.log(line);
|
|
571
|
+
}
|
|
557
572
|
// ../../node_modules/.bun/@kaynooo+utils@2.31.2+d0769e28dc4dad16/node_modules/@kaynooo/utils/dist/chunk-hrsswv1w.js
|
|
558
573
|
function $e(t, e = false, i = 1) {
|
|
559
574
|
let n = typeof e === "object" ? e : { units: e ? "si" : "iec", dp: i }, { units: s = "iec", dp: u = 1 } = n, r = s === "si" ? 1000 : 1024;
|
|
@@ -1448,6 +1463,8 @@ async function runMain({ name, version, run, redact, usage }, argv = process13.a
|
|
|
1448
1463
|
}
|
|
1449
1464
|
return code;
|
|
1450
1465
|
}
|
|
1466
|
+
// ../kit/src/folders.ts
|
|
1467
|
+
var SKIPPED_FOLDERS = new Set(["node_modules", "vendor", "dist", "build", "target", "coverage", "venv", "__pycache__"]);
|
|
1451
1468
|
// ../kit/src/pool.ts
|
|
1452
1469
|
async function pool(items, limit, task) {
|
|
1453
1470
|
const results = Array.from({ length: items.length });
|
|
@@ -1828,7 +1845,7 @@ function show(audits, total) {
|
|
|
1828
1845
|
|
|
1829
1846
|
// src/repos.ts
|
|
1830
1847
|
import { existsSync as existsSync8, statSync as statSync3 } from "fs";
|
|
1831
|
-
import { relative as relative2 } from "path";
|
|
1848
|
+
import { basename as basename2, relative as relative2 } from "path";
|
|
1832
1849
|
import process19 from "process";
|
|
1833
1850
|
|
|
1834
1851
|
// src/repos-scan.ts
|
|
@@ -2078,6 +2095,7 @@ async function repos(args) {
|
|
|
2078
2095
|
return failedPulls > 0 ? 1 : 0;
|
|
2079
2096
|
}
|
|
2080
2097
|
const label = role("label", process19.stdout);
|
|
2098
|
+
printHeader("repos", `${basename2(root)} \xB7 ${states.length} ${states.length === 1 ? "repository" : "repositories"}`);
|
|
2081
2099
|
if (kept.length === 0) {
|
|
2082
2100
|
console.log(label(`nothing needs attention in ${states.length} repositories`));
|
|
2083
2101
|
return failedPulls > 0 ? 1 : 0;
|
|
@@ -2242,13 +2260,13 @@ async function ask(question, { hint, terminal = process20 }, render, press) {
|
|
|
2242
2260
|
// src/apply.ts
|
|
2243
2261
|
import { existsSync as existsSync10 } from "fs";
|
|
2244
2262
|
import { lstat as lstat3, rm } from "fs/promises";
|
|
2245
|
-
import { basename as
|
|
2263
|
+
import { basename as basename4, join as join12 } from "path";
|
|
2246
2264
|
|
|
2247
2265
|
// src/sweep-scan.ts
|
|
2248
2266
|
import { existsSync as existsSync9 } from "fs";
|
|
2249
2267
|
import { lstat as lstat2, readdir as readdir4, realpath } from "fs/promises";
|
|
2250
2268
|
import { homedir as homedir5 } from "os";
|
|
2251
|
-
import { basename as
|
|
2269
|
+
import { basename as basename3, dirname as dirname5, join as join11 } from "path";
|
|
2252
2270
|
|
|
2253
2271
|
// src/size.ts
|
|
2254
2272
|
import { lstat, readdir as readdir3 } from "fs/promises";
|
|
@@ -2329,7 +2347,7 @@ var MAX_DEPTH3 = 3;
|
|
|
2329
2347
|
var PROJECT_CACHE_NAMES = new Set([".turbo", ".nuxt", ".next", ".svelte-kit"]);
|
|
2330
2348
|
var GLOBAL_CACHES = [".bun/install/cache", ".npm/_cacache", ".cache/pip", ".cache/uv", ".cache/ms-playwright", ".cache/puppeteer", ".cache/go-build", ".cache/typescript", ".cargo/registry"];
|
|
2331
2349
|
function isCachePath(path, home = homedir5()) {
|
|
2332
|
-
return GLOBAL_CACHES.some((cache) => join11(home, cache) === path) ||
|
|
2350
|
+
return GLOBAL_CACHES.some((cache) => join11(home, cache) === path) || basename3(path) === ".cache" && basename3(dirname5(path)) === "node_modules";
|
|
2333
2351
|
}
|
|
2334
2352
|
async function listing(dir) {
|
|
2335
2353
|
try {
|
|
@@ -2358,7 +2376,7 @@ async function findCandidates(root, home = homedir5(), withGlobal = true) {
|
|
|
2358
2376
|
const path = join11(dir, entry.name);
|
|
2359
2377
|
if (entry.name === ".git")
|
|
2360
2378
|
continue;
|
|
2361
|
-
if (entry.name === ".worktrees" || entry.name === "worktrees" &&
|
|
2379
|
+
if (entry.name === ".worktrees" || entry.name === "worktrees" && basename3(dir) === ".claude") {
|
|
2362
2380
|
if (!entry.isDirectory()) {
|
|
2363
2381
|
found.skipped.push({ path, reason: "symlink" });
|
|
2364
2382
|
continue;
|
|
@@ -2453,7 +2471,7 @@ var worktreesOf = memo(async (repo) => {
|
|
|
2453
2471
|
});
|
|
2454
2472
|
async function judgeFolder(path, kind, inside) {
|
|
2455
2473
|
const parent = dirname5(path);
|
|
2456
|
-
const name =
|
|
2474
|
+
const name = basename3(path);
|
|
2457
2475
|
const located = await toplevelOf(parent);
|
|
2458
2476
|
if (located === "failed")
|
|
2459
2477
|
return { skip: "git failed" };
|
|
@@ -2490,7 +2508,7 @@ async function judgeWorktree(path) {
|
|
|
2490
2508
|
const changes = status.stdout.split("\x00").filter((line) => line !== "");
|
|
2491
2509
|
if (changes.some((line) => !line.startsWith("!! ")))
|
|
2492
2510
|
return keep("uncommitted changes");
|
|
2493
|
-
if (changes.some((line) => !line.endsWith("/") || !FOLDER_NAMES.has(
|
|
2511
|
+
if (changes.some((line) => !line.endsWith("/") || !FOLDER_NAMES.has(basename3(line.slice(3).replace(TRAILING_SLASH, "")))))
|
|
2494
2512
|
return keep("ignored files (.env, local data) that removing would delete");
|
|
2495
2513
|
const unique = await gitIn(path, ["log", "--format=%h", branch, "--not", "--remotes", `--exclude=${branch.replace(HEADS_PREFIX, "")}`, "--branches"]);
|
|
2496
2514
|
if (unique.code !== 0)
|
|
@@ -2523,7 +2541,7 @@ async function inspect2({ candidates, skipped }) {
|
|
|
2523
2541
|
async function removeFolder(entry) {
|
|
2524
2542
|
try {
|
|
2525
2543
|
const stat = await lstat3(entry.path);
|
|
2526
|
-
if (stat.isSymbolicLink() || !stat.isDirectory() || !(FOLDER_NAMES.has(
|
|
2544
|
+
if (stat.isSymbolicLink() || !stat.isDirectory() || !(FOLDER_NAMES.has(basename4(entry.path)) || entry.kind === "cache" && isCachePath(entry.path)))
|
|
2527
2545
|
return { path: entry.path, removed: false, error: "no longer a plain folder" };
|
|
2528
2546
|
if (existsSync10(join12(entry.path, ".git")))
|
|
2529
2547
|
return { path: entry.path, removed: false, error: "holds a git repository" };
|
package/dist/repos-cli.js
CHANGED
|
@@ -348,13 +348,13 @@ function userConfigReadPath(bin, legacy = [], where = {}) {
|
|
|
348
348
|
// ../kit/src/theme.ts
|
|
349
349
|
var DEFAULT = {
|
|
350
350
|
colors: { accent: "cyan", id: "yellow", path: "blue", label: "dim", value: "bold", ok: "green", warn: "yellow", problem: "red", note: "dim", passed: "green", failed: "red", running: "cyan", queued: "yellow", skipped: "dim" },
|
|
351
|
-
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501" },
|
|
351
|
+
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501", rule: "\u2500", corner: "\u256D" },
|
|
352
352
|
accents: ["cyan", "magenta", "green", "blue", "yellow", "redBright"],
|
|
353
353
|
bins: {}
|
|
354
354
|
};
|
|
355
355
|
var BRIGHT = { accent: "cyanBright", id: "yellowBright", path: "blueBright", label: "white", value: "bold whiteBright", ok: "greenBright", warn: "yellowBright", problem: "redBright", note: "white", passed: "greenBright", failed: "redBright", running: "cyanBright", queued: "yellowBright", skipped: "white" };
|
|
356
356
|
var MONO = { accent: "bold", id: "bold", path: "underline", label: "dim", value: "bold", ok: "bold", warn: "bold", problem: "bold", note: "dim", passed: "bold", failed: "bold", running: "bold", queued: "dim", skipped: "dim" };
|
|
357
|
-
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#" };
|
|
357
|
+
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#", rule: "-", corner: "+" };
|
|
358
358
|
var PRESETS = {
|
|
359
359
|
default: {},
|
|
360
360
|
"high-contrast": { colors: BRIGHT, accents: ["cyanBright", "magentaBright", "greenBright", "blueBright", "yellowBright", "redBright"] },
|
|
@@ -554,6 +554,21 @@ var STATUS_WORDS = {
|
|
|
554
554
|
skipped: ["skipped", "cancelled", "canceled", "manual"]
|
|
555
555
|
};
|
|
556
556
|
var STATUS_OF = new Map(Object.entries(STATUS_WORDS).flatMap(([status, words]) => words.map((word) => [word, status])));
|
|
557
|
+
function header(bin, context, stream, env = process6.env) {
|
|
558
|
+
if (!takesControlCodes(stream, env))
|
|
559
|
+
return "";
|
|
560
|
+
const colors = paint(stream, env);
|
|
561
|
+
const hash = [...bin].reduce((sum, char) => sum + char.charCodeAt(0), 0);
|
|
562
|
+
const { theme } = activeTheme();
|
|
563
|
+
const spec = theme.bins[bin] ?? theme.accents[hash % theme.accents.length];
|
|
564
|
+
const accent = tinted(typeof spec === "string" && spec.split(" ").includes("bold") ? colors : colors.bold, spec, env);
|
|
565
|
+
return `${accent(bin)}${context === undefined ? "" : colors.dim(` \u203A ${context}`)}`;
|
|
566
|
+
}
|
|
567
|
+
function printHeader(bin, context, stream = process6.stdout, env = process6.env) {
|
|
568
|
+
const line = header(bin, context, stream, env);
|
|
569
|
+
if (line !== "")
|
|
570
|
+
console.log(line);
|
|
571
|
+
}
|
|
557
572
|
|
|
558
573
|
// ../kit/src/format.ts
|
|
559
574
|
var UNITS = [["d", 86400], ["h", 3600], ["m", 60], ["s", 1]];
|
|
@@ -1437,6 +1452,8 @@ async function runMain({ name, version, run, redact, usage }, argv = process13.a
|
|
|
1437
1452
|
}
|
|
1438
1453
|
return code;
|
|
1439
1454
|
}
|
|
1455
|
+
// ../kit/src/folders.ts
|
|
1456
|
+
var SKIPPED_FOLDERS = new Set(["node_modules", "vendor", "dist", "build", "target", "coverage", "venv", "__pycache__"]);
|
|
1440
1457
|
// ../kit/src/pool.ts
|
|
1441
1458
|
async function pool(items, limit, task) {
|
|
1442
1459
|
const results = Array.from({ length: items.length });
|
|
@@ -1546,7 +1563,7 @@ function workspaceRoot({ given, env = process15.env, home = homedir4() } = {}) {
|
|
|
1546
1563
|
}
|
|
1547
1564
|
// src/repos.ts
|
|
1548
1565
|
import { existsSync as existsSync6, statSync as statSync2 } from "fs";
|
|
1549
|
-
import { relative } from "path";
|
|
1566
|
+
import { basename as basename2, relative } from "path";
|
|
1550
1567
|
import process18 from "process";
|
|
1551
1568
|
|
|
1552
1569
|
// src/repos-scan.ts
|
|
@@ -1796,6 +1813,7 @@ async function repos(args) {
|
|
|
1796
1813
|
return failedPulls > 0 ? 1 : 0;
|
|
1797
1814
|
}
|
|
1798
1815
|
const label = role("label", process18.stdout);
|
|
1816
|
+
printHeader("repos", `${basename2(root)} \xB7 ${states.length} ${states.length === 1 ? "repository" : "repositories"}`);
|
|
1799
1817
|
if (kept.length === 0) {
|
|
1800
1818
|
console.log(label(`nothing needs attention in ${states.length} repositories`));
|
|
1801
1819
|
return failedPulls > 0 ? 1 : 0;
|
package/dist/sweep-cli.js
CHANGED
|
@@ -348,13 +348,13 @@ function userConfigReadPath(bin, legacy = [], where = {}) {
|
|
|
348
348
|
// ../kit/src/theme.ts
|
|
349
349
|
var DEFAULT = {
|
|
350
350
|
colors: { accent: "cyan", id: "yellow", path: "blue", label: "dim", value: "bold", ok: "green", warn: "yellow", problem: "red", note: "dim", passed: "green", failed: "red", running: "cyan", queued: "yellow", skipped: "dim" },
|
|
351
|
-
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501" },
|
|
351
|
+
glyphs: { ok: "\u2713", warn: "\u25B2", problem: "\u2717", note: "\u203A", passed: "\u2713", failed: "\u2717", running: "\u25CF", queued: "\u25CB", skipped: "-", bar: "\u2501", rule: "\u2500", corner: "\u256D" },
|
|
352
352
|
accents: ["cyan", "magenta", "green", "blue", "yellow", "redBright"],
|
|
353
353
|
bins: {}
|
|
354
354
|
};
|
|
355
355
|
var BRIGHT = { accent: "cyanBright", id: "yellowBright", path: "blueBright", label: "white", value: "bold whiteBright", ok: "greenBright", warn: "yellowBright", problem: "redBright", note: "white", passed: "greenBright", failed: "redBright", running: "cyanBright", queued: "yellowBright", skipped: "white" };
|
|
356
356
|
var MONO = { accent: "bold", id: "bold", path: "underline", label: "dim", value: "bold", ok: "bold", warn: "bold", problem: "bold", note: "dim", passed: "bold", failed: "bold", running: "bold", queued: "dim", skipped: "dim" };
|
|
357
|
-
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#" };
|
|
357
|
+
var ASCII = { ok: "+", warn: "!", problem: "x", note: ">", passed: "+", failed: "x", running: "*", queued: "o", skipped: "-", bar: "#", rule: "-", corner: "+" };
|
|
358
358
|
var PRESETS = {
|
|
359
359
|
default: {},
|
|
360
360
|
"high-contrast": { colors: BRIGHT, accents: ["cyanBright", "magentaBright", "greenBright", "blueBright", "yellowBright", "redBright"] },
|
|
@@ -554,6 +554,21 @@ var STATUS_WORDS = {
|
|
|
554
554
|
skipped: ["skipped", "cancelled", "canceled", "manual"]
|
|
555
555
|
};
|
|
556
556
|
var STATUS_OF = new Map(Object.entries(STATUS_WORDS).flatMap(([status, words]) => words.map((word) => [word, status])));
|
|
557
|
+
function header(bin, context, stream, env = process6.env) {
|
|
558
|
+
if (!takesControlCodes(stream, env))
|
|
559
|
+
return "";
|
|
560
|
+
const colors = paint(stream, env);
|
|
561
|
+
const hash = [...bin].reduce((sum, char) => sum + char.charCodeAt(0), 0);
|
|
562
|
+
const { theme } = activeTheme();
|
|
563
|
+
const spec = theme.bins[bin] ?? theme.accents[hash % theme.accents.length];
|
|
564
|
+
const accent = tinted(typeof spec === "string" && spec.split(" ").includes("bold") ? colors : colors.bold, spec, env);
|
|
565
|
+
return `${accent(bin)}${context === undefined ? "" : colors.dim(` \u203A ${context}`)}`;
|
|
566
|
+
}
|
|
567
|
+
function printHeader(bin, context, stream = process6.stdout, env = process6.env) {
|
|
568
|
+
const line = header(bin, context, stream, env);
|
|
569
|
+
if (line !== "")
|
|
570
|
+
console.log(line);
|
|
571
|
+
}
|
|
557
572
|
// ../../node_modules/.bun/@kaynooo+utils@2.31.2+d0769e28dc4dad16/node_modules/@kaynooo/utils/dist/chunk-hrsswv1w.js
|
|
558
573
|
function $e(t, e = false, i = 1) {
|
|
559
574
|
let n = typeof e === "object" ? e : { units: e ? "si" : "iec", dp: i }, { units: s = "iec", dp: u = 1 } = n, r = s === "si" ? 1000 : 1024;
|
|
@@ -1448,6 +1463,8 @@ async function runMain({ name, version, run, redact, usage }, argv = process13.a
|
|
|
1448
1463
|
}
|
|
1449
1464
|
return code;
|
|
1450
1465
|
}
|
|
1466
|
+
// ../kit/src/folders.ts
|
|
1467
|
+
var SKIPPED_FOLDERS = new Set(["node_modules", "vendor", "dist", "build", "target", "coverage", "venv", "__pycache__"]);
|
|
1451
1468
|
// ../kit/src/pool.ts
|
|
1452
1469
|
async function pool(items, limit, task) {
|
|
1453
1470
|
const results = Array.from({ length: items.length });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaynooo/cli-workspace",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.9.0",
|
|
5
5
|
"description": "ws, repos, sweep, audit: the repositories of the workspace that need attention, the folders worth reclaiming and their known vulnerabilities.",
|
|
6
6
|
"author": "Kaynooo <contact@kaynooo.fr>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,6 +34,6 @@
|
|
|
34
34
|
"audit": "$npm_execpath src/audit-cli.ts"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@kaynooo/cli-kit": "0.
|
|
37
|
+
"@kaynooo/cli-kit": "0.29.0"
|
|
38
38
|
}
|
|
39
39
|
}
|