@kaitranntt/ccs 4.3.8 → 4.3.10
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/VERSION +1 -1
- package/bin/ccs.js +64 -27
- package/bin/utils/claude-symlink-manager.js +1 -0
- package/lib/ccs +9 -2
- package/lib/ccs.ps1 +14 -2
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.3.
|
|
1
|
+
4.3.10
|
package/bin/ccs.js
CHANGED
|
@@ -533,65 +533,102 @@ async function handleUpdateCommand() {
|
|
|
533
533
|
if (isNpmInstall) {
|
|
534
534
|
// npm installation - detect package manager and update
|
|
535
535
|
const packageManager = detectPackageManager();
|
|
536
|
-
let updateCommand, updateArgs;
|
|
536
|
+
let updateCommand, updateArgs, cacheCommand, cacheArgs;
|
|
537
537
|
|
|
538
538
|
switch (packageManager) {
|
|
539
539
|
case 'npm':
|
|
540
540
|
updateCommand = 'npm';
|
|
541
541
|
updateArgs = ['install', '-g', '@kaitranntt/ccs@latest'];
|
|
542
|
+
cacheCommand = 'npm';
|
|
543
|
+
cacheArgs = ['cache', 'clean', '--force'];
|
|
542
544
|
break;
|
|
543
545
|
case 'yarn':
|
|
544
546
|
updateCommand = 'yarn';
|
|
545
547
|
updateArgs = ['global', 'add', '@kaitranntt/ccs@latest'];
|
|
548
|
+
cacheCommand = 'yarn';
|
|
549
|
+
cacheArgs = ['cache', 'clean'];
|
|
546
550
|
break;
|
|
547
551
|
case 'pnpm':
|
|
548
552
|
updateCommand = 'pnpm';
|
|
549
553
|
updateArgs = ['add', '-g', '@kaitranntt/ccs@latest'];
|
|
554
|
+
cacheCommand = 'pnpm';
|
|
555
|
+
cacheArgs = ['store', 'prune'];
|
|
550
556
|
break;
|
|
551
557
|
case 'bun':
|
|
552
558
|
updateCommand = 'bun';
|
|
553
559
|
updateArgs = ['add', '-g', '@kaitranntt/ccs@latest'];
|
|
560
|
+
cacheCommand = null; // bun doesn't need explicit cache clearing
|
|
561
|
+
cacheArgs = null;
|
|
554
562
|
break;
|
|
555
563
|
default:
|
|
556
564
|
updateCommand = 'npm';
|
|
557
565
|
updateArgs = ['install', '-g', '@kaitranntt/ccs@latest'];
|
|
566
|
+
cacheCommand = 'npm';
|
|
567
|
+
cacheArgs = ['cache', 'clean', '--force'];
|
|
558
568
|
}
|
|
559
569
|
|
|
560
570
|
console.log(colored(`Updating via ${packageManager}...`, 'cyan'));
|
|
561
571
|
console.log('');
|
|
562
572
|
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
573
|
+
// Clear package manager cache first to ensure fresh download
|
|
574
|
+
if (cacheCommand) {
|
|
575
|
+
console.log(colored('Clearing package cache...', 'cyan'));
|
|
576
|
+
const cacheChild = spawn(cacheCommand, cacheArgs, {
|
|
577
|
+
stdio: 'inherit'
|
|
578
|
+
});
|
|
567
579
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
580
|
+
cacheChild.on('exit', (code) => {
|
|
581
|
+
if (code !== 0) {
|
|
582
|
+
console.log(colored('[!] Cache clearing failed, proceeding anyway...', 'yellow'));
|
|
583
|
+
}
|
|
584
|
+
// Continue with update regardless of cache clearing result
|
|
585
|
+
performUpdate();
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
cacheChild.on('error', (err) => {
|
|
589
|
+
console.log(colored('[!] Cache clearing failed, proceeding anyway...', 'yellow'));
|
|
590
|
+
// Continue with update regardless of cache clearing result
|
|
591
|
+
performUpdate();
|
|
592
|
+
});
|
|
593
|
+
} else {
|
|
594
|
+
// No cache clearing needed, proceed directly
|
|
595
|
+
performUpdate();
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
function performUpdate() {
|
|
599
|
+
const child = spawn(updateCommand, updateArgs, {
|
|
600
|
+
stdio: 'inherit'
|
|
601
|
+
// No shell needed for direct commands
|
|
602
|
+
});
|
|
603
|
+
|
|
604
|
+
child.on('exit', (code) => {
|
|
605
|
+
if (code === 0) {
|
|
606
|
+
console.log('');
|
|
607
|
+
console.log(colored('[OK] Update successful!', 'green'));
|
|
608
|
+
console.log('');
|
|
609
|
+
console.log(`Run ${colored('ccs --version', 'yellow')} to verify`);
|
|
610
|
+
console.log('');
|
|
611
|
+
} else {
|
|
612
|
+
console.log('');
|
|
613
|
+
console.log(colored('[X] Update failed', 'red'));
|
|
614
|
+
console.log('');
|
|
615
|
+
console.log('Try manually:');
|
|
616
|
+
console.log(colored(` ${updateCommand} ${updateArgs.join(' ')}`, 'yellow'));
|
|
617
|
+
console.log('');
|
|
618
|
+
}
|
|
619
|
+
process.exit(code || 0);
|
|
620
|
+
});
|
|
621
|
+
|
|
622
|
+
child.on('error', (err) => {
|
|
576
623
|
console.log('');
|
|
577
|
-
console.log(colored(
|
|
624
|
+
console.log(colored(`[X] Failed to run ${packageManager} update`, 'red'));
|
|
578
625
|
console.log('');
|
|
579
626
|
console.log('Try manually:');
|
|
580
627
|
console.log(colored(` ${updateCommand} ${updateArgs.join(' ')}`, 'yellow'));
|
|
581
628
|
console.log('');
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
child.on('error', (err) => {
|
|
587
|
-
console.log('');
|
|
588
|
-
console.log(colored(`[X] Failed to run ${packageManager} update`, 'red'));
|
|
589
|
-
console.log('');
|
|
590
|
-
console.log('Try manually:');
|
|
591
|
-
console.log(colored(` ${updateCommand} ${updateArgs.join(' ')}`, 'yellow'));
|
|
592
|
-
console.log('');
|
|
593
|
-
process.exit(1);
|
|
594
|
-
});
|
|
629
|
+
process.exit(1);
|
|
630
|
+
});
|
|
631
|
+
}
|
|
595
632
|
} else {
|
|
596
633
|
// Direct installation - re-run installer
|
|
597
634
|
console.log(colored('Updating via installer...', 'cyan'));
|
|
@@ -48,6 +48,7 @@ class ClaudeSymlinkManager {
|
|
|
48
48
|
|
|
49
49
|
// CCS items to symlink (selective, item-level)
|
|
50
50
|
this.ccsItems = [
|
|
51
|
+
{ source: 'commands/ccs.md', target: 'commands/ccs.md', type: 'file' },
|
|
51
52
|
{ source: 'commands/ccs', target: 'commands/ccs', type: 'directory' },
|
|
52
53
|
{ source: 'skills/ccs-delegation', target: 'skills/ccs-delegation', type: 'directory' }
|
|
53
54
|
];
|
package/lib/ccs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
4
|
# Version (updated by scripts/bump-version.sh)
|
|
5
|
-
CCS_VERSION="4.3.
|
|
5
|
+
CCS_VERSION="4.3.10"
|
|
6
6
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
7
|
readonly CONFIG_FILE="${CCS_CONFIG:-$HOME/.ccs/config.json}"
|
|
8
8
|
readonly PROFILES_JSON="$HOME/.ccs/profiles.json"
|
|
@@ -674,6 +674,13 @@ update_run() {
|
|
|
674
674
|
echo -e "${CYAN}Updating via npm...${RESET}"
|
|
675
675
|
echo ""
|
|
676
676
|
|
|
677
|
+
# Clear npm cache to ensure fresh download
|
|
678
|
+
echo -e "${CYAN}Clearing package cache...${RESET}"
|
|
679
|
+
if ! npm cache clean --force 2>/dev/null; then
|
|
680
|
+
echo -e "${YELLOW}[!] Cache clearing failed, proceeding anyway...${RESET}"
|
|
681
|
+
fi
|
|
682
|
+
echo ""
|
|
683
|
+
|
|
677
684
|
if npm install -g @kaitranntt/ccs@latest; then
|
|
678
685
|
echo ""
|
|
679
686
|
echo -e "${GREEN}[OK] Update successful!${RESET}"
|
|
@@ -686,7 +693,7 @@ update_run() {
|
|
|
686
693
|
echo -e "${RED}[X] Update failed${RESET}"
|
|
687
694
|
echo ""
|
|
688
695
|
echo "Try manually:"
|
|
689
|
-
echo -e " ${YELLOW}npm install -g @kaitranntt/ccs@latest${RESET}"
|
|
696
|
+
echo -e " ${YELLOW}npm cache clean --force && npm install -g @kaitranntt/ccs@latest${RESET}"
|
|
690
697
|
echo ""
|
|
691
698
|
exit 1
|
|
692
699
|
fi
|
package/lib/ccs.ps1
CHANGED
|
@@ -12,7 +12,7 @@ param(
|
|
|
12
12
|
$ErrorActionPreference = "Stop"
|
|
13
13
|
|
|
14
14
|
# Version (updated by scripts/bump-version.sh)
|
|
15
|
-
$CcsVersion = "4.3.
|
|
15
|
+
$CcsVersion = "4.3.10"
|
|
16
16
|
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
17
17
|
$ConfigFile = if ($env:CCS_CONFIG) { $env:CCS_CONFIG } else { "$env:USERPROFILE\.ccs\config.json" }
|
|
18
18
|
$ProfilesJson = "$env:USERPROFILE\.ccs\profiles.json"
|
|
@@ -1122,6 +1122,18 @@ function Update-Run {
|
|
|
1122
1122
|
Write-Host "Updating via npm..." -ForegroundColor Cyan
|
|
1123
1123
|
Write-Host ""
|
|
1124
1124
|
|
|
1125
|
+
# Clear npm cache to ensure fresh download
|
|
1126
|
+
Write-Host "Clearing package cache..." -ForegroundColor Cyan
|
|
1127
|
+
try {
|
|
1128
|
+
npm cache clean --force 2>$null
|
|
1129
|
+
if ($LASTEXITCODE -ne 0) {
|
|
1130
|
+
Write-Host "[!] Cache clearing failed, proceeding anyway..." -ForegroundColor Yellow
|
|
1131
|
+
}
|
|
1132
|
+
} catch {
|
|
1133
|
+
Write-Host "[!] Cache clearing failed, proceeding anyway..." -ForegroundColor Yellow
|
|
1134
|
+
}
|
|
1135
|
+
Write-Host ""
|
|
1136
|
+
|
|
1125
1137
|
try {
|
|
1126
1138
|
npm install -g @kaitranntt/ccs@latest
|
|
1127
1139
|
if ($LASTEXITCODE -eq 0) {
|
|
@@ -1139,7 +1151,7 @@ function Update-Run {
|
|
|
1139
1151
|
Write-Host "[X] Update failed" -ForegroundColor Red
|
|
1140
1152
|
Write-Host ""
|
|
1141
1153
|
Write-Host "Try manually:"
|
|
1142
|
-
Write-Host " npm install -g @kaitranntt/ccs@latest" -ForegroundColor Yellow
|
|
1154
|
+
Write-Host " npm cache clean --force; npm install -g @kaitranntt/ccs@latest" -ForegroundColor Yellow
|
|
1143
1155
|
Write-Host ""
|
|
1144
1156
|
exit 1
|
|
1145
1157
|
}
|