@kaitranntt/ccs 4.3.9 → 4.4.0
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 +16 -38
- package/VERSION +1 -1
- package/bin/ccs.js +64 -27
- package/bin/management/doctor.js +122 -0
- package/bin/management/instance-manager.js +3 -8
- package/bin/management/shared-manager.js +166 -49
- package/lib/ccs +9 -2
- package/lib/ccs.ps1 +14 -2
- package/package.json +1 -1
- package/scripts/postinstall.js +3 -0
- package/README.ja.md +0 -649
- package/README.vi.md +0 -649
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.
|
|
5
|
+
CCS_VERSION="4.4.0"
|
|
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.
|
|
15
|
+
$CcsVersion = "4.4.0"
|
|
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
|
}
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -97,6 +97,9 @@ function createConfigFiles() {
|
|
|
97
97
|
const sharedManager = new SharedManager();
|
|
98
98
|
sharedManager.migrateFromV311();
|
|
99
99
|
sharedManager.ensureSharedDirectories();
|
|
100
|
+
|
|
101
|
+
// Run v4.4 migration: Migrate instances to shared settings.json
|
|
102
|
+
sharedManager.migrateToSharedSettings();
|
|
100
103
|
} catch (err) {
|
|
101
104
|
console.warn('[!] Migration warning:', err.message);
|
|
102
105
|
console.warn(' Migration will retry on next run');
|