claudekit-cli 3.9.0 → 3.9.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/dist/index.js +24 -28
- 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) {
|
|
@@ -12816,11 +12802,7 @@ async function installSkillsDependencies(skillsDir) {
|
|
|
12816
12802
|
NON_INTERACTIVE: "1"
|
|
12817
12803
|
};
|
|
12818
12804
|
if (platform9 === "win32") {
|
|
12819
|
-
|
|
12820
|
-
logger.info(" If the script fails, you may need to set execution policy:");
|
|
12821
|
-
logger.info(" Set-ExecutionPolicy RemoteSigned -Scope CurrentUser");
|
|
12822
|
-
logger.info("");
|
|
12823
|
-
await executeInteractiveScript("powershell", ["-File", scriptPath, "-Y"], {
|
|
12805
|
+
await executeInteractiveScript("powershell.exe", ["-NoLogo", "-ExecutionPolicy", "Bypass", "-File", scriptPath, "-Y"], {
|
|
12824
12806
|
timeout: 600000,
|
|
12825
12807
|
cwd: skillsDir,
|
|
12826
12808
|
env: scriptEnv
|
|
@@ -14465,7 +14447,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
14465
14447
|
// package.json
|
|
14466
14448
|
var package_default = {
|
|
14467
14449
|
name: "claudekit-cli",
|
|
14468
|
-
version: "3.9.
|
|
14450
|
+
version: "3.9.2",
|
|
14469
14451
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
14470
14452
|
type: "module",
|
|
14471
14453
|
repository: {
|
|
@@ -31183,7 +31165,8 @@ class VersionSelector {
|
|
|
31183
31165
|
limit = 10,
|
|
31184
31166
|
defaultValue,
|
|
31185
31167
|
allowManualEntry = false,
|
|
31186
|
-
forceRefresh = false
|
|
31168
|
+
forceRefresh = false,
|
|
31169
|
+
currentVersion = null
|
|
31187
31170
|
} = options;
|
|
31188
31171
|
try {
|
|
31189
31172
|
const loadingSpinner = de();
|
|
@@ -31199,7 +31182,7 @@ class VersionSelector {
|
|
|
31199
31182
|
}
|
|
31200
31183
|
const choices = VersionDisplayFormatter.formatReleasesToChoices(releases, false, limit);
|
|
31201
31184
|
const defaultIndex = this.getDefaultIndex(choices, defaultValue);
|
|
31202
|
-
return await this.createVersionPrompt(kit, choices, defaultIndex, allowManualEntry, releases);
|
|
31185
|
+
return await this.createVersionPrompt(kit, choices, defaultIndex, allowManualEntry, releases, currentVersion);
|
|
31203
31186
|
} catch (error) {
|
|
31204
31187
|
logger.error(`Version selection failed for ${kit.name}: ${error.message}`);
|
|
31205
31188
|
return this.handleError(error, kit, allowManualEntry);
|
|
@@ -31242,7 +31225,7 @@ This could be due to:
|
|
|
31242
31225
|
const trimmed = version.trim();
|
|
31243
31226
|
return trimmed.startsWith("v") ? trimmed : `v${trimmed}`;
|
|
31244
31227
|
}
|
|
31245
|
-
async createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry, releases) {
|
|
31228
|
+
async createVersionPrompt(kit, choices, _defaultIndex, allowManualEntry, releases, currentVersion = null) {
|
|
31246
31229
|
const clackChoices = [];
|
|
31247
31230
|
const latestStable = releases.find((r2) => r2.isLatestStable && !r2.prerelease);
|
|
31248
31231
|
if (latestStable) {
|
|
@@ -31265,14 +31248,17 @@ This could be due to:
|
|
|
31265
31248
|
});
|
|
31266
31249
|
const versionChoices = choices.filter((choice) => choice.value !== "separator" && choice.value !== "cancel");
|
|
31267
31250
|
for (const choice of versionChoices) {
|
|
31251
|
+
const isCurrentlyInstalled = currentVersion && (choice.value === currentVersion || choice.value === `v${currentVersion}`);
|
|
31252
|
+
const installedMarker = isCurrentlyInstalled ? import_picocolors11.default.cyan(" (installed)") : "";
|
|
31268
31253
|
clackChoices.push({
|
|
31269
31254
|
value: choice.value,
|
|
31270
|
-
label: choice.label
|
|
31255
|
+
label: `${choice.label}${installedMarker}`,
|
|
31271
31256
|
hint: choice.hint
|
|
31272
31257
|
});
|
|
31273
31258
|
}
|
|
31259
|
+
const currentVersionHint = currentVersion ? import_picocolors11.default.dim(` (current: ${currentVersion})`) : "";
|
|
31274
31260
|
const selected = await ie({
|
|
31275
|
-
message: `Select version for ${import_picocolors11.default.bold(kit.name)}:`,
|
|
31261
|
+
message: `Select version for ${import_picocolors11.default.bold(kit.name)}${currentVersionHint}:`,
|
|
31276
31262
|
options: clackChoices,
|
|
31277
31263
|
initialValue: latestStable?.tag_name
|
|
31278
31264
|
});
|
|
@@ -32493,13 +32479,23 @@ async function initCommand(options) {
|
|
|
32493
32479
|
}
|
|
32494
32480
|
if (!selectedVersion && !isNonInteractive2) {
|
|
32495
32481
|
logger.info("Fetching available versions...");
|
|
32482
|
+
let currentVersion = null;
|
|
32483
|
+
try {
|
|
32484
|
+
const metadataPath = validOptions.global ? join30(PathResolver.getGlobalKitDir(), "metadata.json") : join30(resolvedDir, ".claude", "metadata.json");
|
|
32485
|
+
const metadata = await readClaudeKitMetadata(metadataPath);
|
|
32486
|
+
currentVersion = metadata?.version || null;
|
|
32487
|
+
if (currentVersion) {
|
|
32488
|
+
logger.debug(`Current installed version: ${currentVersion}`);
|
|
32489
|
+
}
|
|
32490
|
+
} catch {}
|
|
32496
32491
|
try {
|
|
32497
32492
|
const versionResult = await prompts.selectVersionEnhanced({
|
|
32498
32493
|
kit: kitConfig,
|
|
32499
32494
|
includePrereleases: validOptions.beta,
|
|
32500
32495
|
limit: 10,
|
|
32501
32496
|
allowManualEntry: true,
|
|
32502
|
-
forceRefresh: validOptions.refresh
|
|
32497
|
+
forceRefresh: validOptions.refresh,
|
|
32498
|
+
currentVersion
|
|
32503
32499
|
});
|
|
32504
32500
|
if (!versionResult) {
|
|
32505
32501
|
logger.warning("Version selection cancelled by user");
|
|
@@ -33409,7 +33405,7 @@ var import_compare_versions2 = __toESM(require_umd(), 1);
|
|
|
33409
33405
|
// package.json
|
|
33410
33406
|
var package_default2 = {
|
|
33411
33407
|
name: "claudekit-cli",
|
|
33412
|
-
version: "3.9.
|
|
33408
|
+
version: "3.9.2",
|
|
33413
33409
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
33414
33410
|
type: "module",
|
|
33415
33411
|
repository: {
|