@cleocode/cleo 2026.5.14 → 2026.5.15
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/cli/index.js +25 -7
- package/dist/cli/index.js.map +2 -2
- package/package.json +9 -9
package/dist/cli/index.js
CHANGED
|
@@ -2389,6 +2389,21 @@ function renderNexusProjectsClean(data, quiet) {
|
|
|
2389
2389
|
}
|
|
2390
2390
|
return `[nexus] Purged ${purged} project(s). ${remaining} project(s) remaining in registry.`;
|
|
2391
2391
|
}
|
|
2392
|
+
function renderNexusProjectsCleanPreview(data, _quiet) {
|
|
2393
|
+
const matched = Number(data["matched"] ?? 0);
|
|
2394
|
+
const totalCount = Number(data["totalCount"] ?? 0);
|
|
2395
|
+
const samplePaths = data["sample"] ?? [];
|
|
2396
|
+
const lines = [
|
|
2397
|
+
`[nexus] Clean preview \u2014 ${matched} project(s) of ${totalCount} total match criteria:`
|
|
2398
|
+
];
|
|
2399
|
+
if (matched === 0) {
|
|
2400
|
+
lines.push(" (no matches)");
|
|
2401
|
+
} else {
|
|
2402
|
+
for (const p of samplePaths) lines.push(` ${p}`);
|
|
2403
|
+
if (matched > 10) lines.push(` ... and ${matched - 10} more`);
|
|
2404
|
+
}
|
|
2405
|
+
return lines.join("\n");
|
|
2406
|
+
}
|
|
2392
2407
|
function renderNexusRefreshBridge(data, quiet) {
|
|
2393
2408
|
if (quiet) return "";
|
|
2394
2409
|
if (data["written"]) {
|
|
@@ -3111,7 +3126,7 @@ function cliOutput(data, opts) {
|
|
|
3111
3126
|
process.exit(4);
|
|
3112
3127
|
}
|
|
3113
3128
|
if (typeof extracted !== "object" || extracted === null) {
|
|
3114
|
-
|
|
3129
|
+
process.stdout.write(String(extracted) + "\n");
|
|
3115
3130
|
return;
|
|
3116
3131
|
}
|
|
3117
3132
|
if (Array.isArray(extracted)) {
|
|
@@ -3125,7 +3140,7 @@ function cliOutput(data, opts) {
|
|
|
3125
3140
|
const renderer = fieldExtracted ? renderGeneric : renderers[opts.command] ?? renderGeneric;
|
|
3126
3141
|
const text = renderer(normalized, ctx.quiet);
|
|
3127
3142
|
if (text) {
|
|
3128
|
-
|
|
3143
|
+
process.stdout.write(text + "\n");
|
|
3129
3144
|
}
|
|
3130
3145
|
return;
|
|
3131
3146
|
}
|
|
@@ -3193,14 +3208,16 @@ function cliOutput(data, opts) {
|
|
|
3193
3208
|
}
|
|
3194
3209
|
}
|
|
3195
3210
|
}
|
|
3196
|
-
|
|
3211
|
+
process.stdout.write(envelopeString + "\n");
|
|
3197
3212
|
}
|
|
3198
3213
|
function cliError(message, code, details, meta) {
|
|
3199
3214
|
const ctx = getFormatContext();
|
|
3200
3215
|
if (ctx.format === "human") {
|
|
3201
|
-
|
|
3216
|
+
process.stderr.write(`Error: ${message}${code ? ` (${code})` : ""}
|
|
3217
|
+
`);
|
|
3202
3218
|
if (typeof details?.fix === "string") {
|
|
3203
|
-
|
|
3219
|
+
process.stderr.write(`Fix: ${details.fix}
|
|
3220
|
+
`);
|
|
3204
3221
|
}
|
|
3205
3222
|
return;
|
|
3206
3223
|
}
|
|
@@ -3224,7 +3241,7 @@ function cliError(message, code, details, meta) {
|
|
|
3224
3241
|
error: errorObj,
|
|
3225
3242
|
meta: errorMeta
|
|
3226
3243
|
};
|
|
3227
|
-
|
|
3244
|
+
process.stdout.write(JSON.stringify(envelope) + "\n");
|
|
3228
3245
|
}
|
|
3229
3246
|
var renderers;
|
|
3230
3247
|
var init_renderers = __esm({
|
|
@@ -3296,6 +3313,7 @@ var init_renderers = __esm({
|
|
|
3296
3313
|
"nexus-projects-remove": renderNexusProjectsRemove,
|
|
3297
3314
|
"nexus-projects-scan": renderNexusProjectsScan,
|
|
3298
3315
|
"nexus-projects-clean": renderNexusProjectsClean,
|
|
3316
|
+
"nexus-projects-clean-preview": renderNexusProjectsCleanPreview,
|
|
3299
3317
|
"nexus-refresh-bridge": renderNexusRefreshBridge,
|
|
3300
3318
|
"nexus-diff": renderNexusDiff,
|
|
3301
3319
|
"nexus-query": renderNexusQuery,
|
|
@@ -43161,7 +43179,7 @@ var projectsCleanCommand = defineCommand({
|
|
|
43161
43179
|
if (ctx.format !== "json") {
|
|
43162
43180
|
cliOutput(
|
|
43163
43181
|
{ matched: matchCount, totalCount, sample: samplePaths },
|
|
43164
|
-
{ command: "nexus-projects-clean", operation: "nexus.projects.clean" }
|
|
43182
|
+
{ command: "nexus-projects-clean-preview", operation: "nexus.projects.clean" }
|
|
43165
43183
|
);
|
|
43166
43184
|
}
|
|
43167
43185
|
if (matchCount === 0 || dryRun) {
|