commit-agent-cli 0.2.0 → 0.2.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 +16 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -455,32 +455,30 @@ var packageJson = JSON.parse(
|
|
|
455
455
|
);
|
|
456
456
|
var notifier = updateNotifier({
|
|
457
457
|
pkg: packageJson,
|
|
458
|
-
updateCheckInterval:
|
|
459
|
-
//
|
|
458
|
+
updateCheckInterval: 0
|
|
459
|
+
// Always check for updates (no cache)
|
|
460
460
|
});
|
|
461
461
|
if (notifier.update && notifier.update.current !== notifier.update.latest) {
|
|
462
462
|
const currentVersion = notifier.update.current;
|
|
463
463
|
const latestVersion = notifier.update.latest;
|
|
464
|
-
const
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
464
|
+
const line1Text = `${packageJson.name} update available! ${currentVersion} \u2192 ${latestVersion}`;
|
|
465
|
+
const line2Text = `Run npm install -g ${packageJson.name}@latest to update.`;
|
|
466
|
+
const maxLength = Math.max(line1Text.length, line2Text.length);
|
|
467
|
+
const boxWidth = maxLength + 2;
|
|
468
|
+
const padLine = (text2, visibleLength) => {
|
|
469
|
+
const padding = boxWidth - visibleLength;
|
|
470
|
+
return text2 + " ".repeat(Math.max(0, padding));
|
|
469
471
|
};
|
|
472
|
+
const line1Colored = ` ${packageJson.name} update available! ${import_picocolors.default.cyan(currentVersion)} \u2192 ${import_picocolors.default.green(import_picocolors.default.bold(latestVersion))}`;
|
|
473
|
+
const line2Colored = ` Run ${import_picocolors.default.cyan(import_picocolors.default.bold(`npm install -g ${packageJson.name}@latest`))} to update.`;
|
|
474
|
+
const horizontalBorder = "\u2500".repeat(boxWidth);
|
|
470
475
|
console.log("");
|
|
471
|
-
console.log(import_picocolors.default.yellow("\u256D\
|
|
472
|
-
console.log(import_picocolors.default.yellow("\u2502") + padLine(
|
|
473
|
-
console.log(import_picocolors.default.yellow("\u2502") + padLine(
|
|
474
|
-
console.log(import_picocolors.default.yellow("\
|
|
475
|
-
console.log(import_picocolors.default.yellow("\u2502") + padLine(" Current: " + import_picocolors.default.dim(currentVersion) + " \u2192 Latest: " + import_picocolors.default.green(import_picocolors.default.bold(latestVersion)), boxWidth) + import_picocolors.default.yellow("\u2502"));
|
|
476
|
-
console.log(import_picocolors.default.yellow("\u2502") + padLine("", boxWidth) + import_picocolors.default.yellow("\u2502"));
|
|
477
|
-
console.log(import_picocolors.default.yellow("\u2502") + padLine(" " + import_picocolors.default.dim("Update after you finish by running:"), boxWidth) + import_picocolors.default.yellow("\u2502"));
|
|
478
|
-
console.log(import_picocolors.default.yellow("\u2502") + padLine(" " + import_picocolors.default.cyan(import_picocolors.default.bold(`npm install -g ${packageJson.name}@latest`)), boxWidth) + import_picocolors.default.yellow("\u2502"));
|
|
479
|
-
console.log(import_picocolors.default.yellow("\u2502") + padLine("", boxWidth) + import_picocolors.default.yellow("\u2502"));
|
|
480
|
-
console.log(import_picocolors.default.yellow("\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"));
|
|
476
|
+
console.log(import_picocolors.default.yellow("\u256D" + horizontalBorder + "\u256E"));
|
|
477
|
+
console.log(import_picocolors.default.yellow("\u2502") + padLine(line1Colored, line1Text.length + 1) + import_picocolors.default.yellow("\u2502"));
|
|
478
|
+
console.log(import_picocolors.default.yellow("\u2502") + padLine(line2Colored, line2Text.length + 1) + import_picocolors.default.yellow("\u2502"));
|
|
479
|
+
console.log(import_picocolors.default.yellow("\u2570" + horizontalBorder + "\u256F"));
|
|
481
480
|
console.log("");
|
|
482
481
|
}
|
|
483
|
-
notifier.notify({ defer: false, isGlobal: true });
|
|
484
482
|
var CONFIG_PATH = join2(homedir(), ".commit-cli.json");
|
|
485
483
|
var ANTHROPIC_MODELS = {
|
|
486
484
|
"claude-sonnet-4-20250514": "Claude Sonnet 4.5",
|