claudekit-cli 3.34.1 → 3.34.3
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 +42 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45385,7 +45385,7 @@ var package_default;
|
|
|
45385
45385
|
var init_package = __esm(() => {
|
|
45386
45386
|
package_default = {
|
|
45387
45387
|
name: "claudekit-cli",
|
|
45388
|
-
version: "3.34.
|
|
45388
|
+
version: "3.34.3",
|
|
45389
45389
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
45390
45390
|
type: "module",
|
|
45391
45391
|
repository: {
|
|
@@ -76190,6 +76190,7 @@ class SettingsProcessor {
|
|
|
76190
76190
|
await this.trackInstalledSettings(sourceSettings);
|
|
76191
76191
|
return;
|
|
76192
76192
|
}
|
|
76193
|
+
this.migrateDeprecatedMatchers(destSettings, sourceSettings);
|
|
76193
76194
|
let installedSettings = { hooks: [], mcpServers: [] };
|
|
76194
76195
|
if (this.tracker) {
|
|
76195
76196
|
installedSettings = await this.tracker.loadInstalledSettings();
|
|
@@ -76224,6 +76225,46 @@ class SettingsProcessor {
|
|
|
76224
76225
|
await SettingsMerger.writeSettingsFile(destFile, mergeResult.merged);
|
|
76225
76226
|
logger.success("Merged settings.json (user customizations preserved)");
|
|
76226
76227
|
}
|
|
76228
|
+
migrateDeprecatedMatchers(destSettings, sourceSettings) {
|
|
76229
|
+
if (!destSettings.hooks || !sourceSettings.hooks)
|
|
76230
|
+
return;
|
|
76231
|
+
for (const [eventName, sourceEntries] of Object.entries(sourceSettings.hooks)) {
|
|
76232
|
+
const destEntries = destSettings.hooks[eventName];
|
|
76233
|
+
if (!destEntries)
|
|
76234
|
+
continue;
|
|
76235
|
+
for (const sourceEntry of sourceEntries) {
|
|
76236
|
+
if (!("matcher" in sourceEntry) || !sourceEntry.matcher)
|
|
76237
|
+
continue;
|
|
76238
|
+
if (!("hooks" in sourceEntry) || !sourceEntry.hooks)
|
|
76239
|
+
continue;
|
|
76240
|
+
const sourceCommands = new Set(sourceEntry.hooks.map((h2) => normalizeCommand(h2.command)).filter((c2) => c2.length > 0));
|
|
76241
|
+
if (sourceCommands.size === 0)
|
|
76242
|
+
continue;
|
|
76243
|
+
for (const destEntry of destEntries) {
|
|
76244
|
+
if (!("matcher" in destEntry))
|
|
76245
|
+
continue;
|
|
76246
|
+
if (destEntry.matcher === sourceEntry.matcher)
|
|
76247
|
+
continue;
|
|
76248
|
+
if (!("hooks" in destEntry) || !destEntry.hooks)
|
|
76249
|
+
continue;
|
|
76250
|
+
const destCommands = destEntry.hooks.map((h2) => normalizeCommand(h2.command)).filter((c2) => c2.length > 0);
|
|
76251
|
+
const hasOverlap = destCommands.some((cmd) => sourceCommands.has(cmd));
|
|
76252
|
+
if (!hasOverlap)
|
|
76253
|
+
continue;
|
|
76254
|
+
const oldMatcher = destEntry.matcher;
|
|
76255
|
+
destEntry.matcher = sourceEntry.matcher;
|
|
76256
|
+
for (const destHook of destEntry.hooks) {
|
|
76257
|
+
const normalizedDest = normalizeCommand(destHook.command);
|
|
76258
|
+
const matchingSource = sourceEntry.hooks.find((sh) => normalizeCommand(sh.command) === normalizedDest);
|
|
76259
|
+
if (matchingSource?.timeout !== undefined) {
|
|
76260
|
+
destHook.timeout = matchingSource.timeout;
|
|
76261
|
+
}
|
|
76262
|
+
}
|
|
76263
|
+
logger.info(`Migrated ${eventName} matcher: "${oldMatcher}" -> "${sourceEntry.matcher}"`);
|
|
76264
|
+
}
|
|
76265
|
+
}
|
|
76266
|
+
}
|
|
76267
|
+
}
|
|
76227
76268
|
async trackInstalledSettings(settings) {
|
|
76228
76269
|
if (!this.tracker)
|
|
76229
76270
|
return;
|