claudekit-cli 3.27.0 → 3.28.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/index.js +35 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18519,11 +18519,6 @@ class PathResolver {
|
|
|
18519
18519
|
if (!global2) {
|
|
18520
18520
|
return join(baseDir || process.cwd(), ".opencode");
|
|
18521
18521
|
}
|
|
18522
|
-
const os = platform();
|
|
18523
|
-
if (os === "win32") {
|
|
18524
|
-
const appData = process.env.APPDATA || join(homedir(), "AppData", "Roaming");
|
|
18525
|
-
return join(appData, "opencode");
|
|
18526
|
-
}
|
|
18527
18522
|
const xdgConfigHome = process.env.XDG_CONFIG_HOME;
|
|
18528
18523
|
if (xdgConfigHome) {
|
|
18529
18524
|
return join(xdgConfigHome, "opencode");
|
|
@@ -24843,6 +24838,16 @@ class PromptsManager {
|
|
|
24843
24838
|
note(message, title) {
|
|
24844
24839
|
note(message, title);
|
|
24845
24840
|
}
|
|
24841
|
+
async text(message, placeholder) {
|
|
24842
|
+
const result = await te({
|
|
24843
|
+
message,
|
|
24844
|
+
placeholder
|
|
24845
|
+
});
|
|
24846
|
+
if (lD(result)) {
|
|
24847
|
+
return;
|
|
24848
|
+
}
|
|
24849
|
+
return result;
|
|
24850
|
+
}
|
|
24846
24851
|
async promptPackageInstallations() {
|
|
24847
24852
|
log.step("Optional Package Installations");
|
|
24848
24853
|
const [openCodeInstalled, geminiInstalled] = await Promise.all([
|
|
@@ -24986,7 +24991,8 @@ Wait for it to complete or remove lock: ${lockPath}`);
|
|
|
24986
24991
|
|
|
24987
24992
|
// src/commands/init/init-command.ts
|
|
24988
24993
|
init_types2();
|
|
24989
|
-
|
|
24994
|
+
// src/commands/init/phases/api-key-handler.ts
|
|
24995
|
+
init_logger();
|
|
24990
24996
|
// src/commands/init/phases/conflict-handler.ts
|
|
24991
24997
|
init_logger();
|
|
24992
24998
|
import { join as join27 } from "node:path";
|
|
@@ -34667,15 +34673,24 @@ class SelectiveMerger {
|
|
|
34667
34673
|
conflictInfo: { ...conflictBase, winner: "existing", reason: "no-timestamps" }
|
|
34668
34674
|
};
|
|
34669
34675
|
}
|
|
34676
|
+
logger.debug(`Updating shared file (version fallback): ${relativePath} - incoming ${incomingVersion} > installed ${installedVersion}`);
|
|
34677
|
+
return {
|
|
34678
|
+
changed: true,
|
|
34679
|
+
reason: "shared-newer",
|
|
34680
|
+
sourceChecksum: manifestEntry.checksum,
|
|
34681
|
+
destChecksum: installed.checksum,
|
|
34682
|
+
sharedWithKit: installed.ownerKit,
|
|
34683
|
+
conflictInfo: { ...conflictBase, winner: "incoming", reason: "no-timestamps" }
|
|
34684
|
+
};
|
|
34670
34685
|
}
|
|
34671
|
-
logger.debug(`
|
|
34686
|
+
logger.debug(`Shared file version comparison skipped (non-semver): ${relativePath} - incoming ${incomingVersion}, installed ${installedVersion}`);
|
|
34672
34687
|
return {
|
|
34673
|
-
changed:
|
|
34674
|
-
reason: "shared-
|
|
34688
|
+
changed: false,
|
|
34689
|
+
reason: "shared-older",
|
|
34675
34690
|
sourceChecksum: manifestEntry.checksum,
|
|
34676
34691
|
destChecksum: installed.checksum,
|
|
34677
34692
|
sharedWithKit: installed.ownerKit,
|
|
34678
|
-
conflictInfo: { ...conflictBase, winner: "
|
|
34693
|
+
conflictInfo: { ...conflictBase, winner: "existing", reason: "no-timestamps" }
|
|
34679
34694
|
};
|
|
34680
34695
|
}
|
|
34681
34696
|
}
|
|
@@ -38339,9 +38354,10 @@ init_logger();
|
|
|
38339
38354
|
init_output_manager();
|
|
38340
38355
|
var import_fs_extra16 = __toESM(require_lib(), 1);
|
|
38341
38356
|
async function handleMerge(ctx) {
|
|
38342
|
-
if (ctx.cancelled || !ctx.extractDir || !ctx.resolvedDir || !ctx.claudeDir || !ctx.kit || !ctx.
|
|
38357
|
+
if (ctx.cancelled || !ctx.extractDir || !ctx.resolvedDir || !ctx.claudeDir || !ctx.kit || !ctx.kitType) {
|
|
38343
38358
|
return ctx;
|
|
38344
38359
|
}
|
|
38360
|
+
const installedVersion = ctx.release?.tag_name ?? "local";
|
|
38345
38361
|
let customClaudeFiles = [];
|
|
38346
38362
|
if (!ctx.options.fresh) {
|
|
38347
38363
|
logger.info("Scanning for custom .claude files...");
|
|
@@ -38393,7 +38409,7 @@ async function handleMerge(ctx) {
|
|
|
38393
38409
|
const legacyDetection = await LegacyMigration.detectLegacy(ctx.claudeDir);
|
|
38394
38410
|
if (legacyDetection.isLegacy && releaseManifest) {
|
|
38395
38411
|
logger.info("Legacy installation detected - migrating to ownership tracking...");
|
|
38396
|
-
await LegacyMigration.migrate(ctx.claudeDir, releaseManifest, ctx.kit.name,
|
|
38412
|
+
await LegacyMigration.migrate(ctx.claudeDir, releaseManifest, ctx.kit.name, installedVersion, !ctx.isNonInteractive);
|
|
38397
38413
|
logger.success("Migration complete");
|
|
38398
38414
|
}
|
|
38399
38415
|
}
|
|
@@ -38421,13 +38437,13 @@ async function handleMerge(ctx) {
|
|
|
38421
38437
|
installedFiles,
|
|
38422
38438
|
claudeDir: ctx.claudeDir,
|
|
38423
38439
|
releaseManifest,
|
|
38424
|
-
installedVersion
|
|
38440
|
+
installedVersion,
|
|
38425
38441
|
isGlobal: ctx.options.global
|
|
38426
38442
|
});
|
|
38427
38443
|
await trackFilesWithProgress(filesToTrack, {
|
|
38428
38444
|
claudeDir: ctx.claudeDir,
|
|
38429
38445
|
kitName: ctx.kit.name,
|
|
38430
|
-
releaseTag:
|
|
38446
|
+
releaseTag: installedVersion,
|
|
38431
38447
|
mode: ctx.options.global ? "global" : "local",
|
|
38432
38448
|
kitType: ctx.kitType
|
|
38433
38449
|
});
|
|
@@ -39674,7 +39690,7 @@ import { platform as platform10 } from "node:os";
|
|
|
39674
39690
|
import { extname as extname2, join as join59 } from "node:path";
|
|
39675
39691
|
var IS_WINDOWS3 = platform10() === "win32";
|
|
39676
39692
|
function getOpenCodeGlobalPath() {
|
|
39677
|
-
return
|
|
39693
|
+
return "$HOME/.config/opencode/";
|
|
39678
39694
|
}
|
|
39679
39695
|
var TRANSFORMABLE_EXTENSIONS2 = new Set([
|
|
39680
39696
|
".md",
|
|
@@ -40118,7 +40134,7 @@ var VALIDATION_PATTERNS = {
|
|
|
40118
40134
|
DISCORD_WEBHOOK_URL: /^https:\/\/discord\.com\/api\/webhooks\//,
|
|
40119
40135
|
TELEGRAM_BOT_TOKEN: /^\d+:[A-Za-z0-9_-]{35}$/
|
|
40120
40136
|
};
|
|
40121
|
-
function
|
|
40137
|
+
function validateApiKey2(value, pattern) {
|
|
40122
40138
|
return pattern.test(value);
|
|
40123
40139
|
}
|
|
40124
40140
|
|
|
@@ -40234,7 +40250,7 @@ async function runSetupWizard(options) {
|
|
|
40234
40250
|
if (!value && config.required) {
|
|
40235
40251
|
return "This field is required";
|
|
40236
40252
|
}
|
|
40237
|
-
if (value && config.validate && !
|
|
40253
|
+
if (value && config.validate && !validateApiKey2(value, config.validate)) {
|
|
40238
40254
|
return "Invalid format. Please check and try again.";
|
|
40239
40255
|
}
|
|
40240
40256
|
return;
|
|
@@ -40284,7 +40300,7 @@ async function promptForAdditionalGeminiKeys(primaryKey) {
|
|
|
40284
40300
|
const trimmed = value.trim();
|
|
40285
40301
|
if (!trimmed)
|
|
40286
40302
|
return;
|
|
40287
|
-
if (!
|
|
40303
|
+
if (!validateApiKey2(trimmed, VALIDATION_PATTERNS.GEMINI_API_KEY)) {
|
|
40288
40304
|
return "Invalid format. Gemini keys start with 'AIza' and are 39 characters.";
|
|
40289
40305
|
}
|
|
40290
40306
|
if (allKeys.has(trimmed)) {
|
|
@@ -42938,7 +42954,7 @@ var import_fs_extra36 = __toESM(require_lib(), 1);
|
|
|
42938
42954
|
// package.json
|
|
42939
42955
|
var package_default = {
|
|
42940
42956
|
name: "claudekit-cli",
|
|
42941
|
-
version: "3.
|
|
42957
|
+
version: "3.28.0",
|
|
42942
42958
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
42943
42959
|
type: "module",
|
|
42944
42960
|
repository: {
|