@ghl-ai/aw 0.1.14 → 0.1.15
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/commands/nuke.mjs +22 -6
- package/package.json +4 -1
package/commands/nuke.mjs
CHANGED
|
@@ -13,7 +13,7 @@ const HOME = homedir();
|
|
|
13
13
|
const GLOBAL_AW_DIR = join(HOME, '.aw_registry');
|
|
14
14
|
const MANIFEST_PATH = join(GLOBAL_AW_DIR, '.aw-manifest.json');
|
|
15
15
|
|
|
16
|
-
const IDE_DIRS = ['.claude', '.cursor', '.codex'];
|
|
16
|
+
const IDE_DIRS = ['.claude', '.cursor', '.codex', '.agents'];
|
|
17
17
|
const CONTENT_TYPES = ['agents', 'skills', 'commands', 'blueprints', 'evals'];
|
|
18
18
|
|
|
19
19
|
function loadManifest() {
|
|
@@ -72,6 +72,20 @@ function removeIdeSymlinks() {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
// Clean up empty IDE dirs (e.g. ~/.agents/ if it only had AW content)
|
|
76
|
+
for (const ide of IDE_DIRS) {
|
|
77
|
+
const ideDir = join(HOME, ide);
|
|
78
|
+
try {
|
|
79
|
+
// Remove empty subdirs first
|
|
80
|
+
for (const type of CONTENT_TYPES) {
|
|
81
|
+
const dir = join(ideDir, type);
|
|
82
|
+
if (existsSync(dir) && readdirSync(dir).length === 0) rmSync(dir);
|
|
83
|
+
}
|
|
84
|
+
// Remove IDE dir if now empty
|
|
85
|
+
if (existsSync(ideDir) && readdirSync(ideDir).length === 0) rmSync(ideDir);
|
|
86
|
+
} catch {}
|
|
87
|
+
}
|
|
88
|
+
|
|
75
89
|
if (removed > 0) fmt.logStep(`Removed ${removed} IDE symlink${removed > 1 ? 's' : ''}`);
|
|
76
90
|
}
|
|
77
91
|
|
|
@@ -225,11 +239,13 @@ export function nukeCommand(args) {
|
|
|
225
239
|
} catch { /* doesn't exist */ }
|
|
226
240
|
}
|
|
227
241
|
|
|
228
|
-
// 8. Uninstall npm global package
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
242
|
+
// 8. Uninstall npm global package (skip if already in npm uninstall lifecycle)
|
|
243
|
+
if (!process.env.npm_lifecycle_event) {
|
|
244
|
+
try {
|
|
245
|
+
execSync('npm uninstall -g @ghl-ai/aw', { stdio: 'pipe', timeout: 15000 });
|
|
246
|
+
fmt.logStep('Uninstalled @ghl-ai/aw globally');
|
|
247
|
+
} catch { /* not installed via npm or no permissions */ }
|
|
248
|
+
}
|
|
233
249
|
|
|
234
250
|
// 9. Remove ~/.aw_registry/ itself (source of truth — last!)
|
|
235
251
|
rmSync(GLOBAL_AW_DIR, { recursive: true, force: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ghl-ai/aw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Agentic Workspace CLI — pull, push & manage agents, skills and commands from the registry",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
],
|
|
37
37
|
"author": "GoHighLevel",
|
|
38
38
|
"license": "MIT",
|
|
39
|
+
"scripts": {
|
|
40
|
+
"preuninstall": "node bin.js nuke 2>/dev/null || true"
|
|
41
|
+
},
|
|
39
42
|
"publishConfig": {
|
|
40
43
|
"access": "public"
|
|
41
44
|
},
|