elsabro 7.0.0 → 7.0.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/bin/install.js +20 -15
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -234,10 +234,10 @@ if (hasUpdate) {
|
|
|
234
234
|
console.log(` ${cyan}Verificando actualizaciones...${reset}\n`);
|
|
235
235
|
|
|
236
236
|
// Check if there's a newer version first to prevent infinite loops
|
|
237
|
-
checkLatestVersion().then((latestVersion) => {
|
|
237
|
+
checkLatestVersion().then(async (latestVersion) => {
|
|
238
238
|
if (!latestVersion) {
|
|
239
239
|
console.log(` ${yellow}⚠${reset} No se pudo verificar la última versión`);
|
|
240
|
-
console.log(` ${dim}
|
|
240
|
+
console.log(` ${dim}Reinstalando archivos locales...${reset}\n`);
|
|
241
241
|
} else if (latestVersion === pkg.version) {
|
|
242
242
|
console.log(` ${green}✓${reset} Versión actual: ${pkg.version} (ya es la última)`);
|
|
243
243
|
console.log(` ${dim}Reinstalando archivos locales...${reset}\n`);
|
|
@@ -247,27 +247,31 @@ if (hasUpdate) {
|
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
try {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
if (packageManager === 'pnpm') {
|
|
256
|
-
execFileSync(getExecutable('pnpm'), ['dlx', packageSpec, '--global'], { stdio: 'inherit' });
|
|
257
|
-
} else if (packageManager === 'bun') {
|
|
258
|
-
execFileSync(getExecutable('bunx'), [packageSpec, '--global'], { stdio: 'inherit' });
|
|
250
|
+
if (!latestVersion || latestVersion === pkg.version) {
|
|
251
|
+
// Already up to date — reinstall from local package directly
|
|
252
|
+
// (avoids npm CDN cache lag returning a stale version)
|
|
253
|
+
await install();
|
|
254
|
+
console.log(`\n ${green}✓${reset} ELSABRO reinstalado v${pkg.version}\n`);
|
|
259
255
|
} else {
|
|
260
|
-
//
|
|
261
|
-
|
|
256
|
+
// Newer version available — download from npm
|
|
257
|
+
const packageSpec = `elsabro@${latestVersion}`;
|
|
258
|
+
|
|
259
|
+
if (packageManager === 'pnpm') {
|
|
260
|
+
execFileSync(getExecutable('pnpm'), ['dlx', packageSpec, '--global'], { stdio: 'inherit' });
|
|
261
|
+
} else if (packageManager === 'bun') {
|
|
262
|
+
execFileSync(getExecutable('bunx'), [packageSpec, '--global'], { stdio: 'inherit' });
|
|
263
|
+
} else {
|
|
264
|
+
execFileSync(getExecutable('npm'), ['exec', '--yes', '--', packageSpec, '--global'], { stdio: 'inherit' });
|
|
265
|
+
}
|
|
266
|
+
console.log(`\n ${green}✓${reset} ELSABRO actualizado a v${latestVersion}\n`);
|
|
262
267
|
}
|
|
263
|
-
console.log(`\n ${green}✓${reset} ELSABRO actualizado a v${versionToInstall}\n`);
|
|
264
268
|
} catch (error) {
|
|
265
269
|
console.error(`\n ${red}✗${reset} Error al actualizar: ${error.message}\n`);
|
|
266
270
|
process.exit(1);
|
|
267
271
|
}
|
|
268
272
|
process.exit(0);
|
|
269
273
|
});
|
|
270
|
-
}
|
|
274
|
+
}
|
|
271
275
|
|
|
272
276
|
// Interactive prompt for location if not specified
|
|
273
277
|
async function promptLocation() {
|
|
@@ -502,6 +506,7 @@ async function uninstall() {
|
|
|
502
506
|
}
|
|
503
507
|
|
|
504
508
|
// Main (note: update handling is above with its own process.exit)
|
|
509
|
+
if (!hasUpdate) {
|
|
505
510
|
if (hasUninstall) {
|
|
506
511
|
uninstall().catch((error) => {
|
|
507
512
|
console.error(` ${red}✗${reset} Error: ${error.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elsabro",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Sistema de desarrollo AI-powered para Claude Code - BMAD Method Integration, Spec-Driven Development, Party Mode, Next Step Suggestions, Stitch UI Design, Agent Teams, blocking code review, orquestación avanzada con flows declarativos",
|
|
5
5
|
"bin": {
|
|
6
6
|
"elsabro": "bin/install.js",
|