claudekit-cli 3.9.0 → 3.9.1
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 +23 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12383,22 +12383,11 @@ import { join as join25, resolve as resolve3 } from "node:path";
|
|
|
12383
12383
|
import { promisify as promisify5 } from "node:util";
|
|
12384
12384
|
function executeInteractiveScript(command, args, options) {
|
|
12385
12385
|
return new Promise((resolve4, reject) => {
|
|
12386
|
-
const useInherit = logger.isVerbose();
|
|
12387
12386
|
const child = spawn(command, args, {
|
|
12388
|
-
stdio:
|
|
12387
|
+
stdio: ["ignore", "inherit", "inherit"],
|
|
12389
12388
|
cwd: options?.cwd,
|
|
12390
12389
|
env: options?.env || process.env
|
|
12391
12390
|
});
|
|
12392
|
-
let stdout = "";
|
|
12393
|
-
let stderr = "";
|
|
12394
|
-
if (!useInherit) {
|
|
12395
|
-
child.stdout?.on("data", (data) => {
|
|
12396
|
-
stdout += data.toString();
|
|
12397
|
-
});
|
|
12398
|
-
child.stderr?.on("data", (data) => {
|
|
12399
|
-
stderr += data.toString();
|
|
12400
|
-
});
|
|
12401
|
-
}
|
|
12402
12391
|
let timeoutId;
|
|
12403
12392
|
if (options?.timeout) {
|
|
12404
12393
|
timeoutId = setTimeout(() => {
|
|
@@ -12409,9 +12398,6 @@ function executeInteractiveScript(command, args, options) {
|
|
|
12409
12398
|
child.on("exit", (code2, signal) => {
|
|
12410
12399
|
if (timeoutId)
|
|
12411
12400
|
clearTimeout(timeoutId);
|
|
12412
|
-
if (!useInherit && stderr && code2 !== 0) {
|
|
12413
|
-
console.error(stderr);
|
|
12414
|
-
}
|
|
12415
12401
|
if (signal) {
|
|
12416
12402
|
reject(new Error(`Command terminated by signal ${signal}`));
|
|
12417
12403
|
} else if (code2 !== 0) {
|
|
@@ -14465,7 +14451,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
14465
14451
|
// package.json
|
|
14466
14452
|
var package_default = {
|
|
14467
14453
|
name: "claudekit-cli",
|
|
14468
|
-
version: "3.9.
|
|
14454
|
+
version: "3.9.1",
|
|
14469
14455
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
14470
14456
|
type: "module",
|
|
14471
14457
|
repository: {
|
|
@@ -31183,7 +31169,8 @@ class VersionSelector {
|
|
|
31183
31169
|
limit = 10,
|
|
31184
31170
|
defaultValue,
|
|
31185
31171
|
allowManualEntry = false,
|
|
31186
|
-
forceRefresh = false
|
|
31172
|
+
forceRefresh = false,
|
|
31173
|
+
currentVersion = null
|
|
31187
31174
|
} = options;
|
|
31188
31175
|
try {
|
|
31189
31176
|
const loadingSpinner = de();
|
|
@@ -31199,7 +31186,7 @@ class VersionSelector {
|
|
|
31199
31186
|
}
|
|
31200
31187
|
const choices = VersionDisplayFormatter.formatReleasesToChoices(releases, false, limit);
|
|
31201
31188
|
const defaultIndex = this.getDefaultIndex(choices, defaultValue);
|
|
31202
|
-
return await this.createVersionPrompt(kit, choices, defaultIndex, allowManualEntry, releases);
|
|
31189
|
+
return await this.createVersionPrompt(kit, choices, defaultIndex, allowManualEntry, releases, currentVersion);
|
|
31203
31190
|
} catch (error) {
|
|
31204
31191
|
logger.error(`Version selection failed for ${kit.name}: ${error.message}`);
|
|
31205
31192
|
return this.handleError(error, kit, allowManualEntry);
|
|
@@ -31242,7 +31229,7 @@ This could be due to:
|
|
|
31242
31229
|
const trimmed = version.trim();
|
|
31243
31230
|
return trimmed.startsWith("v") ? trimmed : `v${trimmed}`;
|
|
31244
31231
|
}
|
|
31245
|
-
async createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry, releases) {
|
|
31232
|
+
async createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry, releases, currentVersion = null) {
|
|
31246
31233
|
const clackChoices = [];
|
|
31247
31234
|
const latestStable = releases.find((r2) => r2.isLatestStable && !r2.prerelease);
|
|
31248
31235
|
if (latestStable) {
|
|
@@ -31265,14 +31252,17 @@ This could be due to:
|
|
|
31265
31252
|
});
|
|
31266
31253
|
const versionChoices = choices.filter((choice) => choice.value !== "separator" && choice.value !== "cancel");
|
|
31267
31254
|
for (const choice of versionChoices) {
|
|
31255
|
+
const isCurrentlyInstalled = currentVersion && (choice.value === currentVersion || choice.value === `v${currentVersion}`);
|
|
31256
|
+
const installedMarker = isCurrentlyInstalled ? import_picocolors11.default.cyan(" (installed)") : "";
|
|
31268
31257
|
clackChoices.push({
|
|
31269
31258
|
value: choice.value,
|
|
31270
|
-
label: choice.label
|
|
31259
|
+
label: `${choice.label}${installedMarker}`,
|
|
31271
31260
|
hint: choice.hint
|
|
31272
31261
|
});
|
|
31273
31262
|
}
|
|
31263
|
+
const currentVersionHint = currentVersion ? import_picocolors11.default.dim(` (current: ${currentVersion})`) : "";
|
|
31274
31264
|
const selected = await ie({
|
|
31275
|
-
message: `Select version for ${import_picocolors11.default.bold(kit.name)}:`,
|
|
31265
|
+
message: `Select version for ${import_picocolors11.default.bold(kit.name)}${currentVersionHint}:`,
|
|
31276
31266
|
options: clackChoices,
|
|
31277
31267
|
initialValue: latestStable?.tag_name
|
|
31278
31268
|
});
|
|
@@ -32493,13 +32483,23 @@ async function initCommand(options) {
|
|
|
32493
32483
|
}
|
|
32494
32484
|
if (!selectedVersion && !isNonInteractive2) {
|
|
32495
32485
|
logger.info("Fetching available versions...");
|
|
32486
|
+
let currentVersion = null;
|
|
32487
|
+
try {
|
|
32488
|
+
const metadataPath = validOptions.global ? join30(PathResolver.getGlobalKitDir(), "metadata.json") : join30(resolvedDir, ".claude", "metadata.json");
|
|
32489
|
+
const metadata = await readClaudeKitMetadata(metadataPath);
|
|
32490
|
+
currentVersion = metadata?.version || null;
|
|
32491
|
+
if (currentVersion) {
|
|
32492
|
+
logger.debug(`Current installed version: ${currentVersion}`);
|
|
32493
|
+
}
|
|
32494
|
+
} catch {}
|
|
32496
32495
|
try {
|
|
32497
32496
|
const versionResult = await prompts.selectVersionEnhanced({
|
|
32498
32497
|
kit: kitConfig,
|
|
32499
32498
|
includePrereleases: validOptions.beta,
|
|
32500
32499
|
limit: 10,
|
|
32501
32500
|
allowManualEntry: true,
|
|
32502
|
-
forceRefresh: validOptions.refresh
|
|
32501
|
+
forceRefresh: validOptions.refresh,
|
|
32502
|
+
currentVersion
|
|
32503
32503
|
});
|
|
32504
32504
|
if (!versionResult) {
|
|
32505
32505
|
logger.warning("Version selection cancelled by user");
|
|
@@ -33409,7 +33409,7 @@ var import_compare_versions2 = __toESM(require_umd(), 1);
|
|
|
33409
33409
|
// package.json
|
|
33410
33410
|
var package_default2 = {
|
|
33411
33411
|
name: "claudekit-cli",
|
|
33412
|
-
version: "3.9.
|
|
33412
|
+
version: "3.9.1",
|
|
33413
33413
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
33414
33414
|
type: "module",
|
|
33415
33415
|
repository: {
|