cli4ai 0.9.0 → 0.9.1
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/commands/update.ts +22 -6
- package/src/lib/cli.ts +1 -1
package/package.json
CHANGED
package/src/commands/update.ts
CHANGED
|
@@ -99,14 +99,30 @@ export async function checkForUpdates(): Promise<{ hasUpdate: boolean; current:
|
|
|
99
99
|
*/
|
|
100
100
|
function getUpdateablePackages(): Array<{ name: string; npmName: string; version: string }> {
|
|
101
101
|
const packages: Array<{ name: string; npmName: string; version: string }> = [];
|
|
102
|
+
const seen = new Set<string>();
|
|
103
|
+
|
|
104
|
+
// Get packages from ~/.cli4ai/packages/ (where cli4ai add -g installs)
|
|
105
|
+
for (const pkg of getGlobalPackages()) {
|
|
106
|
+
if (!seen.has(pkg.name)) {
|
|
107
|
+
seen.add(pkg.name);
|
|
108
|
+
packages.push({
|
|
109
|
+
name: pkg.name,
|
|
110
|
+
npmName: `@cli4ai/${pkg.name}`,
|
|
111
|
+
version: pkg.version
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
102
115
|
|
|
103
|
-
//
|
|
116
|
+
// Also check npm global @cli4ai packages (for packages installed via npm directly)
|
|
104
117
|
for (const pkg of getNpmGlobalPackages()) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
118
|
+
if (!seen.has(pkg.name)) {
|
|
119
|
+
seen.add(pkg.name);
|
|
120
|
+
packages.push({
|
|
121
|
+
name: pkg.name,
|
|
122
|
+
npmName: `@cli4ai/${pkg.name}`,
|
|
123
|
+
version: pkg.version
|
|
124
|
+
});
|
|
125
|
+
}
|
|
110
126
|
}
|
|
111
127
|
|
|
112
128
|
return packages;
|
package/src/lib/cli.ts
CHANGED