claude-cli-advanced-starter-pack 1.0.7 → 1.0.9
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
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -1607,7 +1607,58 @@ export async function runInit(options = {}) {
|
|
|
1607
1607
|
writeFileSync(settingsPath, generateSettingsJson(projectName), 'utf8');
|
|
1608
1608
|
console.log(chalk.green(' ✓ Created settings.json'));
|
|
1609
1609
|
} else {
|
|
1610
|
-
|
|
1610
|
+
// Merge update check hook into existing settings.json
|
|
1611
|
+
try {
|
|
1612
|
+
const existingSettings = JSON.parse(readFileSync(settingsPath, 'utf8'));
|
|
1613
|
+
let settingsUpdated = false;
|
|
1614
|
+
|
|
1615
|
+
// Ensure hooks object exists
|
|
1616
|
+
if (!existingSettings.hooks) {
|
|
1617
|
+
existingSettings.hooks = {};
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
// Add UserPromptSubmit hook for update checking if not present
|
|
1621
|
+
if (!existingSettings.hooks.UserPromptSubmit) {
|
|
1622
|
+
existingSettings.hooks.UserPromptSubmit = [
|
|
1623
|
+
{
|
|
1624
|
+
matcher: '',
|
|
1625
|
+
hooks: [
|
|
1626
|
+
{
|
|
1627
|
+
type: 'command',
|
|
1628
|
+
command: 'node .claude/hooks/ccasp-update-check.js',
|
|
1629
|
+
},
|
|
1630
|
+
],
|
|
1631
|
+
},
|
|
1632
|
+
];
|
|
1633
|
+
settingsUpdated = true;
|
|
1634
|
+
} else {
|
|
1635
|
+
// Check if update check hook already exists
|
|
1636
|
+
const hasUpdateHook = existingSettings.hooks.UserPromptSubmit.some(
|
|
1637
|
+
(h) => h.hooks?.some((hook) => hook.command?.includes('ccasp-update-check'))
|
|
1638
|
+
);
|
|
1639
|
+
if (!hasUpdateHook) {
|
|
1640
|
+
existingSettings.hooks.UserPromptSubmit.push({
|
|
1641
|
+
matcher: '',
|
|
1642
|
+
hooks: [
|
|
1643
|
+
{
|
|
1644
|
+
type: 'command',
|
|
1645
|
+
command: 'node .claude/hooks/ccasp-update-check.js',
|
|
1646
|
+
},
|
|
1647
|
+
],
|
|
1648
|
+
});
|
|
1649
|
+
settingsUpdated = true;
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
if (settingsUpdated) {
|
|
1654
|
+
writeFileSync(settingsPath, JSON.stringify(existingSettings, null, 2), 'utf8');
|
|
1655
|
+
console.log(chalk.green(' ✓ Updated settings.json (added update check hook)'));
|
|
1656
|
+
} else {
|
|
1657
|
+
console.log(chalk.blue(' ○ settings.json exists (preserved)'));
|
|
1658
|
+
}
|
|
1659
|
+
} catch (error) {
|
|
1660
|
+
console.log(chalk.blue(' ○ settings.json exists (preserved)'));
|
|
1661
|
+
}
|
|
1611
1662
|
}
|
|
1612
1663
|
|
|
1613
1664
|
if (!existsSync(settingsLocalPath)) {
|
package/src/data/releases.json
CHANGED
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"releases": [
|
|
3
3
|
{
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"date": "2026-01-30",
|
|
6
|
-
"summary": "
|
|
7
|
-
"highlights": [
|
|
6
|
+
"summary": "Fix: Windows compatibility for update check hook",
|
|
7
|
+
"highlights": [
|
|
8
|
+
"Fixed npm commands failing silently on Windows",
|
|
9
|
+
"Removed bash-specific syntax (2>/dev/null)"
|
|
10
|
+
],
|
|
11
|
+
"newFeatures": {
|
|
12
|
+
"commands": [],
|
|
13
|
+
"agents": [],
|
|
14
|
+
"skills": [],
|
|
15
|
+
"hooks": [],
|
|
16
|
+
"other": []
|
|
17
|
+
},
|
|
18
|
+
"breaking": [],
|
|
19
|
+
"deprecated": []
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"version": "1.0.8",
|
|
23
|
+
"date": "2026-01-30",
|
|
24
|
+
"summary": "Fix: settings.json hook merging for existing projects",
|
|
25
|
+
"highlights": [
|
|
26
|
+
"Init now merges update check hook into existing settings.json",
|
|
27
|
+
"Existing projects get automatic update notifications"
|
|
28
|
+
],
|
|
8
29
|
"newFeatures": {
|
|
9
30
|
"commands": [],
|
|
10
31
|
"agents": [],
|
|
@@ -15,6 +36,30 @@
|
|
|
15
36
|
"breaking": [],
|
|
16
37
|
"deprecated": []
|
|
17
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"version": "1.0.7",
|
|
41
|
+
"date": "2026-01-30",
|
|
42
|
+
"summary": "Automatic update notifications with startup hook",
|
|
43
|
+
"highlights": [
|
|
44
|
+
"Startup hook checks npm for updates automatically",
|
|
45
|
+
"Dynamic menu header with version and [NEW UPDATE] badge",
|
|
46
|
+
"One-key update with [N] in menu"
|
|
47
|
+
],
|
|
48
|
+
"newFeatures": {
|
|
49
|
+
"commands": [],
|
|
50
|
+
"agents": [],
|
|
51
|
+
"skills": [],
|
|
52
|
+
"hooks": [
|
|
53
|
+
{
|
|
54
|
+
"name": "ccasp-update-check",
|
|
55
|
+
"description": "Checks npm for updates on Claude startup"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"other": []
|
|
59
|
+
},
|
|
60
|
+
"breaking": [],
|
|
61
|
+
"deprecated": []
|
|
62
|
+
},
|
|
18
63
|
{
|
|
19
64
|
"version": "1.0.6",
|
|
20
65
|
"date": "2026-01-30",
|
|
@@ -61,10 +61,11 @@ function saveState(state) {
|
|
|
61
61
|
*/
|
|
62
62
|
function getCurrentVersion() {
|
|
63
63
|
try {
|
|
64
|
-
// Try global install first
|
|
65
|
-
const result = execSync(`npm list -g ${PACKAGE_NAME} --json
|
|
64
|
+
// Try global install first (Windows-compatible: use stdio to suppress stderr)
|
|
65
|
+
const result = execSync(`npm list -g ${PACKAGE_NAME} --json`, {
|
|
66
66
|
encoding: 'utf8',
|
|
67
67
|
timeout: 5000,
|
|
68
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
68
69
|
});
|
|
69
70
|
const data = JSON.parse(result);
|
|
70
71
|
return data.dependencies?.[PACKAGE_NAME]?.version || null;
|