cc-x10ded 3.0.15 → 3.0.16
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/package.json +1 -1
- package/src/index.ts +16 -10
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -22,8 +22,8 @@ cli
|
|
|
22
22
|
|
|
23
23
|
cli
|
|
24
24
|
.command("update", "Update ccx to the latest version")
|
|
25
|
-
.option("--
|
|
26
|
-
.action(async (options: {
|
|
25
|
+
.option("--skip-aliases", "Skip alias installation")
|
|
26
|
+
.action(async (options: { skipAliases?: boolean }) => {
|
|
27
27
|
const { spawn } = await import("bun");
|
|
28
28
|
const { ShellIntegrator } = await import("./core/shell");
|
|
29
29
|
const pc = await import("picocolors");
|
|
@@ -43,15 +43,21 @@ cli
|
|
|
43
43
|
|
|
44
44
|
console.log(pc.default.green("✅ ccx updated!"));
|
|
45
45
|
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
// Always reinstall aliases (unless skipped)
|
|
47
|
+
if (!options.skipAliases) {
|
|
48
|
+
const shellInt = new ShellIntegrator();
|
|
49
|
+
const shell = shellInt.detectShell();
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
if (shell !== "unknown") {
|
|
52
|
+
// Ensure bun bin is in PATH
|
|
53
|
+
await shellInt.ensureBunBinInPath(shell);
|
|
54
|
+
|
|
55
|
+
// Install/update aliases
|
|
56
|
+
const success = await shellInt.installAliases(shell);
|
|
57
|
+
if (success) {
|
|
58
|
+
console.log(pc.default.green("✅ Aliases updated!"));
|
|
59
|
+
console.log(pc.default.dim(` Run: source ~/.${shell}rc (or restart your terminal)`));
|
|
60
|
+
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
57
63
|
|