claudekit-cli 3.30.2 → 3.30.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/README.md +5 -1
- package/dist/index.js +50 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -216,6 +216,9 @@ ck versions --all
|
|
|
216
216
|
# Full health check (default)
|
|
217
217
|
ck doctor
|
|
218
218
|
|
|
219
|
+
# Verbose mode with execution timing and command details
|
|
220
|
+
ck doctor --verbose
|
|
221
|
+
|
|
219
222
|
# Generate shareable diagnostic report (prompts for gist upload)
|
|
220
223
|
ck doctor --report
|
|
221
224
|
|
|
@@ -229,7 +232,8 @@ ck doctor --check-only
|
|
|
229
232
|
ck doctor --json
|
|
230
233
|
|
|
231
234
|
# Combine flags
|
|
232
|
-
ck doctor --check-only --json
|
|
235
|
+
ck doctor --verbose --check-only --json
|
|
236
|
+
ck doctor --verbose --fix
|
|
233
237
|
```
|
|
234
238
|
|
|
235
239
|
**Health Checks:**
|
package/dist/index.js
CHANGED
|
@@ -9258,6 +9258,7 @@ __export(exports_github_api_checker, {
|
|
|
9258
9258
|
import { spawnSync } from "node:child_process";
|
|
9259
9259
|
async function checkRateLimit() {
|
|
9260
9260
|
if (false) {}
|
|
9261
|
+
const apiEndpoint = "api.github.com/rate_limit";
|
|
9261
9262
|
try {
|
|
9262
9263
|
const { token } = await AuthManager.getToken();
|
|
9263
9264
|
const response = await fetch("https://api.github.com/rate_limit", {
|
|
@@ -9274,7 +9275,8 @@ async function checkRateLimit() {
|
|
|
9274
9275
|
status: "warn",
|
|
9275
9276
|
message: "Failed to check rate limit",
|
|
9276
9277
|
details: `HTTP ${response.status}`,
|
|
9277
|
-
autoFixable: false
|
|
9278
|
+
autoFixable: false,
|
|
9279
|
+
command: apiEndpoint
|
|
9278
9280
|
};
|
|
9279
9281
|
}
|
|
9280
9282
|
const data = await response.json();
|
|
@@ -9286,7 +9288,8 @@ async function checkRateLimit() {
|
|
|
9286
9288
|
group: "auth",
|
|
9287
9289
|
status: "warn",
|
|
9288
9290
|
message: "Rate limit data not available",
|
|
9289
|
-
autoFixable: false
|
|
9291
|
+
autoFixable: false,
|
|
9292
|
+
command: apiEndpoint
|
|
9290
9293
|
};
|
|
9291
9294
|
}
|
|
9292
9295
|
const remaining = core.remaining ?? 0;
|
|
@@ -9304,7 +9307,8 @@ async function checkRateLimit() {
|
|
|
9304
9307
|
message: "Rate limit exhausted",
|
|
9305
9308
|
details: `Resets in ${resetInMinutes} minutes`,
|
|
9306
9309
|
suggestion: "Wait for rate limit reset or use a different GitHub token",
|
|
9307
|
-
autoFixable: false
|
|
9310
|
+
autoFixable: false,
|
|
9311
|
+
command: apiEndpoint
|
|
9308
9312
|
};
|
|
9309
9313
|
}
|
|
9310
9314
|
if (remaining < RATE_LIMIT_WARNING_THRESHOLD) {
|
|
@@ -9315,7 +9319,8 @@ async function checkRateLimit() {
|
|
|
9315
9319
|
status: "warn",
|
|
9316
9320
|
message: `${remaining}/${total} requests remaining (${percentUsed}% used)`,
|
|
9317
9321
|
details: `Resets in ${resetInMinutes} minutes`,
|
|
9318
|
-
autoFixable: false
|
|
9322
|
+
autoFixable: false,
|
|
9323
|
+
command: apiEndpoint
|
|
9319
9324
|
};
|
|
9320
9325
|
}
|
|
9321
9326
|
return {
|
|
@@ -9325,7 +9330,8 @@ async function checkRateLimit() {
|
|
|
9325
9330
|
status: "pass",
|
|
9326
9331
|
message: `${remaining}/${total} requests remaining`,
|
|
9327
9332
|
details: `Resets in ${resetInMinutes} minutes`,
|
|
9328
|
-
autoFixable: false
|
|
9333
|
+
autoFixable: false,
|
|
9334
|
+
command: apiEndpoint
|
|
9329
9335
|
};
|
|
9330
9336
|
} catch (error) {
|
|
9331
9337
|
return {
|
|
@@ -9335,12 +9341,14 @@ async function checkRateLimit() {
|
|
|
9335
9341
|
status: "warn",
|
|
9336
9342
|
message: "Unable to check rate limit",
|
|
9337
9343
|
details: error instanceof Error ? error.message : "Unknown error",
|
|
9338
|
-
autoFixable: false
|
|
9344
|
+
autoFixable: false,
|
|
9345
|
+
command: apiEndpoint
|
|
9339
9346
|
};
|
|
9340
9347
|
}
|
|
9341
9348
|
}
|
|
9342
9349
|
async function checkTokenScopes() {
|
|
9343
9350
|
if (false) {}
|
|
9351
|
+
const checkCommand = "gh auth status -h github.com";
|
|
9344
9352
|
try {
|
|
9345
9353
|
const result = spawnSync("gh", ["auth", "status", "-h", "github.com"], {
|
|
9346
9354
|
encoding: "utf8",
|
|
@@ -9352,7 +9360,7 @@ async function checkTokenScopes() {
|
|
|
9352
9360
|
}
|
|
9353
9361
|
const scopeMatch = output2.match(/Token scopes:\s*([^\n]+)/i);
|
|
9354
9362
|
const scopesStr = scopeMatch?.[1]?.trim() || "";
|
|
9355
|
-
const scopes = scopesStr.split(",").map((s) => s.trim()).filter((s) => s.length > 0);
|
|
9363
|
+
const scopes = scopesStr.split(",").map((s) => s.trim().replace(/'/g, "")).filter((s) => s.length > 0);
|
|
9356
9364
|
const hasRepoScope = scopes.includes("repo");
|
|
9357
9365
|
if (!hasRepoScope) {
|
|
9358
9366
|
return {
|
|
@@ -9363,7 +9371,8 @@ async function checkTokenScopes() {
|
|
|
9363
9371
|
message: "Missing 'repo' scope",
|
|
9364
9372
|
details: `Current scopes: ${scopes.join(", ") || "none"}`,
|
|
9365
9373
|
suggestion: "Re-authenticate: gh auth login -h github.com (select 'Login with a web browser')",
|
|
9366
|
-
autoFixable: false
|
|
9374
|
+
autoFixable: false,
|
|
9375
|
+
command: checkCommand
|
|
9367
9376
|
};
|
|
9368
9377
|
}
|
|
9369
9378
|
const details = scopes.length > 0 ? `Scopes: ${scopes.join(", ")}` : "No scopes found";
|
|
@@ -9374,7 +9383,8 @@ async function checkTokenScopes() {
|
|
|
9374
9383
|
status: "pass",
|
|
9375
9384
|
message: "Token has required scopes",
|
|
9376
9385
|
details,
|
|
9377
|
-
autoFixable: false
|
|
9386
|
+
autoFixable: false,
|
|
9387
|
+
command: checkCommand
|
|
9378
9388
|
};
|
|
9379
9389
|
} catch (error) {
|
|
9380
9390
|
return {
|
|
@@ -9385,7 +9395,8 @@ async function checkTokenScopes() {
|
|
|
9385
9395
|
message: "Unable to check token scopes",
|
|
9386
9396
|
details: error instanceof Error ? error.message : "Unknown error",
|
|
9387
9397
|
suggestion: "Run: gh auth status -h github.com",
|
|
9388
|
-
autoFixable: false
|
|
9398
|
+
autoFixable: false,
|
|
9399
|
+
command: checkCommand
|
|
9389
9400
|
};
|
|
9390
9401
|
}
|
|
9391
9402
|
}
|
|
@@ -19094,7 +19105,9 @@ var CheckResultSchema = exports_external.object({
|
|
|
19094
19105
|
suggestion: exports_external.string().optional(),
|
|
19095
19106
|
autoFixable: exports_external.boolean(),
|
|
19096
19107
|
fixed: exports_external.boolean().optional(),
|
|
19097
|
-
fixError: exports_external.string().optional()
|
|
19108
|
+
fixError: exports_external.string().optional(),
|
|
19109
|
+
duration: exports_external.number().nonnegative().optional(),
|
|
19110
|
+
command: exports_external.string().optional()
|
|
19098
19111
|
});
|
|
19099
19112
|
var CheckRunnerOptionsSchema = exports_external.object({
|
|
19100
19113
|
fix: exports_external.boolean().optional(),
|
|
@@ -19178,9 +19191,16 @@ class CheckRunner {
|
|
|
19178
19191
|
async executeCheckersInParallel(checkers) {
|
|
19179
19192
|
const resultsArrays = await Promise.all(checkers.map(async (checker) => {
|
|
19180
19193
|
logger.verbose(`Starting checker: ${checker.group}`);
|
|
19194
|
+
const startTime = Date.now();
|
|
19181
19195
|
const results = await checker.run();
|
|
19196
|
+
const totalDuration = Date.now() - startTime;
|
|
19197
|
+
const perCheckDuration = results.length > 0 ? Math.round(totalDuration / results.length) : totalDuration;
|
|
19198
|
+
for (const result of results) {
|
|
19199
|
+
result.duration = perCheckDuration;
|
|
19200
|
+
}
|
|
19182
19201
|
logger.verbose(`Completed checker: ${checker.group}`, {
|
|
19183
|
-
checkCount: results.length
|
|
19202
|
+
checkCount: results.length,
|
|
19203
|
+
duration: totalDuration
|
|
19184
19204
|
});
|
|
19185
19205
|
return results;
|
|
19186
19206
|
}));
|
|
@@ -22581,6 +22601,10 @@ var import_picocolors6 = __toESM(require_picocolors(), 1);
|
|
|
22581
22601
|
|
|
22582
22602
|
class DoctorUIRenderer {
|
|
22583
22603
|
symbols = getStatusSymbols();
|
|
22604
|
+
verbose;
|
|
22605
|
+
constructor(options = {}) {
|
|
22606
|
+
this.verbose = options.verbose ?? false;
|
|
22607
|
+
}
|
|
22584
22608
|
renderResults(summary) {
|
|
22585
22609
|
const groups = this.groupChecks(summary.checks);
|
|
22586
22610
|
for (const [groupName, checks] of groups) {
|
|
@@ -22601,11 +22625,22 @@ class DoctorUIRenderer {
|
|
|
22601
22625
|
const name = import_picocolors6.default.bold(check.name.padEnd(maxNameLen));
|
|
22602
22626
|
const paddedMsg = check.message.padEnd(maxMsgLen);
|
|
22603
22627
|
const value = this.colorizeValue(check.status, paddedMsg);
|
|
22628
|
+
if (this.verbose && check.command) {
|
|
22629
|
+
console.log(`│ ${import_picocolors6.default.dim(`Running: ${check.command}`)}`);
|
|
22630
|
+
}
|
|
22604
22631
|
let line = `│ ${symbol} ${name} ${value}`;
|
|
22632
|
+
if (this.verbose && check.duration !== undefined) {
|
|
22633
|
+
line += ` ${import_picocolors6.default.dim(`(${check.duration}ms)`)}`;
|
|
22634
|
+
}
|
|
22605
22635
|
if (check.details) {
|
|
22606
|
-
|
|
22636
|
+
const displayPath = this.verbose ? check.details : this.shortenPath(check.details);
|
|
22637
|
+
line += ` ${import_picocolors6.default.dim(displayPath)}`;
|
|
22607
22638
|
}
|
|
22608
22639
|
console.log(line);
|
|
22640
|
+
if (this.verbose && check.status === "pass" && check.suggestion) {
|
|
22641
|
+
const indent = " ".repeat(maxNameLen + 5);
|
|
22642
|
+
console.log(`│ ${indent}${import_picocolors6.default.dim(`→ ${check.suggestion}`)}`);
|
|
22643
|
+
}
|
|
22609
22644
|
if (check.status !== "pass" && check.suggestion) {
|
|
22610
22645
|
const indent = " ".repeat(maxNameLen + 5);
|
|
22611
22646
|
console.log(`│ ${indent}${import_picocolors6.default.dim(`→ ${check.suggestion}`)}`);
|
|
@@ -22806,7 +22841,7 @@ async function doctorCommand(options = {}) {
|
|
|
22806
22841
|
}
|
|
22807
22842
|
return;
|
|
22808
22843
|
}
|
|
22809
|
-
const renderer = new DoctorUIRenderer;
|
|
22844
|
+
const renderer = new DoctorUIRenderer({ verbose: runnerOptions.verbose });
|
|
22810
22845
|
renderer.renderResults(summary);
|
|
22811
22846
|
if (fix) {
|
|
22812
22847
|
const healer = new AutoHealer;
|
|
@@ -43516,7 +43551,7 @@ var import_fs_extra36 = __toESM(require_lib(), 1);
|
|
|
43516
43551
|
// package.json
|
|
43517
43552
|
var package_default = {
|
|
43518
43553
|
name: "claudekit-cli",
|
|
43519
|
-
version: "3.30.
|
|
43554
|
+
version: "3.30.3",
|
|
43520
43555
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
43521
43556
|
type: "module",
|
|
43522
43557
|
repository: {
|