@oxis-dev/tessra 2.19.6 → 2.19.7
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 +2 -2
- package/scripts/postinstall.js +34 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxis-dev/tessra",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.7",
|
|
4
4
|
"description": "MCP server for AI coding tools and agents. Provides semantic codebase context for Cursor, Claude Code, Codex, Copilot, Antigravity, and CLI workflows without requiring full file uploads.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": {
|
|
@@ -59,4 +59,4 @@
|
|
|
59
59
|
"LICENSE",
|
|
60
60
|
"README.md"
|
|
61
61
|
]
|
|
62
|
-
}
|
|
62
|
+
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -328,31 +328,51 @@ function repairLinuxShellPath(binDir) {
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
// En Linux con nvm/fnm, el bin de node solo está en PATH en shells interactivos.
|
|
331
|
-
//
|
|
332
|
-
//
|
|
333
|
-
function
|
|
331
|
+
// Copia el binario nativo en ~/.local/bin y agrega ese dir al PATH en los perfiles
|
|
332
|
+
// de shell para que tessra funcione en terminales nuevas sin pasos extra del usuario.
|
|
333
|
+
function installLinuxLocalBin(binaryPath) {
|
|
334
334
|
const home = process.env.HOME;
|
|
335
335
|
if (!home) return;
|
|
336
336
|
|
|
337
337
|
const localBin = path.join(home, '.local', 'bin');
|
|
338
|
-
const
|
|
338
|
+
const destPath = path.join(localBin, 'tessra');
|
|
339
339
|
|
|
340
|
+
// ── 1. Copiar el binario (no symlink — así no depende de la ruta de npm/nvm) ─
|
|
340
341
|
try {
|
|
341
342
|
if (!fs.existsSync(localBin)) {
|
|
342
343
|
fs.mkdirSync(localBin, { recursive: true });
|
|
343
344
|
}
|
|
344
345
|
|
|
346
|
+
fs.copyFileSync(binaryPath, destPath);
|
|
347
|
+
fs.chmodSync(destPath, 0o755);
|
|
348
|
+
console.log(`tessra: binario copiado en ${destPath}.`);
|
|
349
|
+
} catch (err) {
|
|
350
|
+
console.warn(`tessra: no se pudo copiar binario en ${destPath}: ${err.message}`);
|
|
351
|
+
return; // si no pudo copiar, no tiene sentido agregar al PATH
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
// ── 2. Agregar ~/.local/bin al PATH en .bashrc y .profile ────────────────────
|
|
355
|
+
const profilesToPatch = [
|
|
356
|
+
path.join(home, '.bashrc'),
|
|
357
|
+
path.join(home, '.profile'),
|
|
358
|
+
];
|
|
359
|
+
const shellName = path.basename(process.env.SHELL || '');
|
|
360
|
+
if (shellName === 'zsh') {
|
|
361
|
+
profilesToPatch.push(path.join(home, '.zshrc'));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const patched = [];
|
|
365
|
+
for (const profilePath of profilesToPatch) {
|
|
345
366
|
try {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
} catch (_) { /* no
|
|
367
|
+
const result = upsertLinuxProfilePath(profilePath, localBin);
|
|
368
|
+
if (result.changed) patched.push(path.basename(profilePath));
|
|
369
|
+
} catch (_) { /* no fatal */ }
|
|
370
|
+
}
|
|
349
371
|
|
|
350
|
-
|
|
351
|
-
console.log(`tessra:
|
|
352
|
-
} catch (err) {
|
|
353
|
-
// No fatal — tessra sigue disponible vía el bin de npm si nvm está activo
|
|
354
|
-
console.warn(`tessra: no se pudo crear symlink en ${symlinkPath}: ${err.message}`);
|
|
372
|
+
if (patched.length > 0) {
|
|
373
|
+
console.log(`tessra: ~/.local/bin agregado al PATH en: ${patched.join(', ')}.`);
|
|
355
374
|
}
|
|
375
|
+
console.log('tessra: abre una terminal nueva — ya deberia reconocer: tessra --version');
|
|
356
376
|
}
|
|
357
377
|
|
|
358
378
|
function ensureGlobalBinOnPath() {
|
|
@@ -450,9 +470,9 @@ async function main() {
|
|
|
450
470
|
// --version puede fallar si el binario requiere inicialización — no es fatal
|
|
451
471
|
}
|
|
452
472
|
|
|
453
|
-
// En Linux:
|
|
473
|
+
// En Linux: copiar binario en ~/.local/bin y parchear PATH en perfiles de shell
|
|
454
474
|
if (process.platform === 'linux') {
|
|
455
|
-
|
|
475
|
+
installLinuxLocalBin(dest);
|
|
456
476
|
}
|
|
457
477
|
|
|
458
478
|
ensureGlobalBinOnPath();
|