@axiomatic-labs/claudeflow 2.12.147 → 2.12.149
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/lib/install.js +61 -8
- package/package.json +1 -1
package/lib/install.js
CHANGED
|
@@ -270,29 +270,77 @@ async function run() {
|
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
function ensureGlobalCli(version) {
|
|
273
|
-
// Returns { available: boolean, autoInstalled: boolean, error?: string }
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
// Returns { available: boolean, autoInstalled: boolean, upgraded: boolean, fromVersion?: string, error?: string }
|
|
274
|
+
const present = commandExists('claudeflow');
|
|
275
|
+
const installedVersion = present ? readGlobalCliVersion() : null;
|
|
276
|
+
const needsUpgrade = present && installedVersion && installedVersion !== version;
|
|
277
|
+
|
|
278
|
+
if (present && !needsUpgrade) {
|
|
279
|
+
return { available: true, autoInstalled: false, upgraded: false };
|
|
276
280
|
}
|
|
277
281
|
|
|
278
282
|
if (process.env.CLAUDEFLOW_SKIP_GLOBAL_INSTALL === '1') {
|
|
279
|
-
return {
|
|
283
|
+
return {
|
|
284
|
+
available: present,
|
|
285
|
+
autoInstalled: false,
|
|
286
|
+
upgraded: false,
|
|
287
|
+
fromVersion: installedVersion || undefined,
|
|
288
|
+
error: 'skipped',
|
|
289
|
+
};
|
|
280
290
|
}
|
|
281
291
|
|
|
282
292
|
console.log('');
|
|
283
|
-
|
|
293
|
+
if (needsUpgrade) {
|
|
294
|
+
console.log(
|
|
295
|
+
` ${ui.DIM}Upgrading global claudeflow CLI from ${installedVersion} to ${version}...${ui.RESET}`
|
|
296
|
+
);
|
|
297
|
+
} else {
|
|
298
|
+
console.log(
|
|
299
|
+
` ${ui.DIM}Installing claudeflow CLI globally so it is available as a shell command...${ui.RESET}`
|
|
300
|
+
);
|
|
301
|
+
}
|
|
284
302
|
try {
|
|
285
303
|
execSync(`npm install -g @axiomatic-labs/claudeflow@${version}`, {
|
|
286
304
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
287
305
|
timeout: 120000,
|
|
288
306
|
});
|
|
289
307
|
if (commandExists('claudeflow')) {
|
|
290
|
-
return {
|
|
308
|
+
return {
|
|
309
|
+
available: true,
|
|
310
|
+
autoInstalled: !needsUpgrade,
|
|
311
|
+
upgraded: needsUpgrade,
|
|
312
|
+
fromVersion: installedVersion || undefined,
|
|
313
|
+
};
|
|
291
314
|
}
|
|
292
|
-
return {
|
|
315
|
+
return {
|
|
316
|
+
available: false,
|
|
317
|
+
autoInstalled: false,
|
|
318
|
+
upgraded: false,
|
|
319
|
+
error: 'installed but not on PATH',
|
|
320
|
+
};
|
|
293
321
|
} catch (err) {
|
|
294
322
|
const msg = err?.stderr?.toString?.() || err?.message || String(err);
|
|
295
|
-
return {
|
|
323
|
+
return {
|
|
324
|
+
available: present,
|
|
325
|
+
autoInstalled: false,
|
|
326
|
+
upgraded: false,
|
|
327
|
+
fromVersion: installedVersion || undefined,
|
|
328
|
+
error: msg.split('\n')[0],
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function readGlobalCliVersion() {
|
|
334
|
+
try {
|
|
335
|
+
const raw = execSync('npm ls -g --json --depth=0 @axiomatic-labs/claudeflow', {
|
|
336
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
337
|
+
timeout: 10000,
|
|
338
|
+
}).toString();
|
|
339
|
+
const parsed = JSON.parse(raw);
|
|
340
|
+
const v = parsed?.dependencies?.['@axiomatic-labs/claudeflow']?.version;
|
|
341
|
+
return typeof v === 'string' ? v : null;
|
|
342
|
+
} catch {
|
|
343
|
+
return null;
|
|
296
344
|
}
|
|
297
345
|
}
|
|
298
346
|
|
|
@@ -324,6 +372,11 @@ function showGettingStarted(cwd, cliStatus = { available: false, autoInstalled:
|
|
|
324
372
|
if (cliStatus.autoInstalled) {
|
|
325
373
|
console.log(` ${ui.DIM}✓ Installed ${ui.CYAN}claudeflow${ui.RESET}${ui.DIM} globally — available as a shell command.${ui.RESET}`);
|
|
326
374
|
console.log('');
|
|
375
|
+
} else if (cliStatus.upgraded) {
|
|
376
|
+
console.log(
|
|
377
|
+
` ${ui.DIM}✓ Upgraded global ${ui.CYAN}claudeflow${ui.RESET}${ui.DIM} CLI${cliStatus.fromVersion ? ` from ${cliStatus.fromVersion}` : ''}.${ui.RESET}`
|
|
378
|
+
);
|
|
379
|
+
console.log('');
|
|
327
380
|
} else if (!cliStatus.available) {
|
|
328
381
|
console.log(` ${ui.DIM}To get the ${ui.CYAN}claudeflow${ui.RESET}${ui.DIM} shell command, run:${ui.RESET}`);
|
|
329
382
|
console.log(` ${ui.CYAN}npm i -g @axiomatic-labs/claudeflow${ui.RESET}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiomatic-labs/claudeflow",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.149",
|
|
4
4
|
"description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claudeflow": "./bin/cli.js"
|