palabra 1.10.2 → 1.11.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/ChangeLog +12 -0
- package/README.md +22 -0
- package/bin/palabra.js +6 -0
- package/letras/nvm/nvm.json +11 -0
- package/letras/rust/rust.json +0 -1
- package/lib/palabra.js +9 -2
- package/lib/parser/parser.js +5 -1
- package/package.json +1 -1
package/ChangeLog
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
2026.04.09, v1.11.1
|
|
2
|
+
|
|
3
|
+
fix:
|
|
4
|
+
- 6aaaf21 palabra: letra: rust: commands: rm update
|
|
5
|
+
|
|
6
|
+
2026.04.09, v1.11.0
|
|
7
|
+
|
|
8
|
+
feature:
|
|
9
|
+
- b29f4e3 palabra: add ability to pass version i interactive mode
|
|
10
|
+
- 05c8eac lista: add
|
|
11
|
+
- 5c6abb0 letras: nvm: add
|
|
12
|
+
|
|
1
13
|
2026.04.09, v1.10.2
|
|
2
14
|
|
|
3
15
|
fix:
|
package/README.md
CHANGED
|
@@ -48,6 +48,28 @@ You can also use interactive mode:
|
|
|
48
48
|
palabra i bun node deno rust go nvim fasm -d /usr/local/src
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
You can also pass version:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
palabra i nvim@0.11
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Default installation directory is `~/.local/src`.
|
|
58
|
+
|
|
59
|
+
### `l`
|
|
60
|
+
|
|
61
|
+
To list all packages that can be installed use `l`:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
palabra l
|
|
65
|
+
[
|
|
66
|
+
'bun', 'deno',
|
|
67
|
+
'fasm', 'go',
|
|
68
|
+
'nvim', 'nvm',
|
|
69
|
+
'rust'
|
|
70
|
+
]
|
|
71
|
+
```
|
|
72
|
+
|
|
51
73
|
That's it!
|
|
52
74
|
|
|
53
75
|
## License
|
package/bin/palabra.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import process from 'node:process';
|
|
4
|
+
import {readdir} from 'node:fs/promises';
|
|
4
5
|
import {execa} from 'execa';
|
|
5
6
|
import {tryToCatch} from 'try-to-catch';
|
|
6
7
|
import {parseArgs} from '../lib/cli/parse-args.js';
|
|
@@ -23,6 +24,10 @@ let cmd = '';
|
|
|
23
24
|
|
|
24
25
|
if (!instrucciones || instrucciones === 'i') {
|
|
25
26
|
cmd = await instalar(args._, args);
|
|
27
|
+
} else if (instrucciones === 'l') {
|
|
28
|
+
const list = await readdir(new URL('../letras', import.meta.url));
|
|
29
|
+
console.log(list);
|
|
30
|
+
process.exit(0);
|
|
26
31
|
} else {
|
|
27
32
|
console.error('palabra i [letra1, letra2, ..., letraN]');
|
|
28
33
|
process.exit(1);
|
|
@@ -41,3 +46,4 @@ const [error] = await tryToCatch(execa, cmd, {
|
|
|
41
46
|
|
|
42
47
|
if (error)
|
|
43
48
|
process.exitCode = error.exitCode;
|
|
49
|
+
|
package/letras/rust/rust.json
CHANGED
package/lib/palabra.js
CHANGED
|
@@ -25,8 +25,9 @@ export const createPalabra = (nombres, {letras, directorio}) => {
|
|
|
25
25
|
|
|
26
26
|
const newLetras = {};
|
|
27
27
|
|
|
28
|
-
for (const
|
|
29
|
-
|
|
28
|
+
for (const nombreDificil of nombres) {
|
|
29
|
+
const [nombre, version] = parseNombre(nombreDificil);
|
|
30
|
+
newLetras[nombre] = version;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
return {
|
|
@@ -34,3 +35,9 @@ export const createPalabra = (nombres, {letras, directorio}) => {
|
|
|
34
35
|
letras: newLetras,
|
|
35
36
|
};
|
|
36
37
|
};
|
|
38
|
+
|
|
39
|
+
function parseNombre(nombreDificil) {
|
|
40
|
+
const [nombre, version = '*'] = nombreDificil.split('@');
|
|
41
|
+
|
|
42
|
+
return [nombre, version];
|
|
43
|
+
}
|
package/lib/parser/parser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {extname, join} from 'node:path';
|
|
2
|
+
import {rendy} from 'rendy';
|
|
2
3
|
import {unpack} from './unpack.js';
|
|
3
4
|
import {execute} from './execute.js';
|
|
4
5
|
|
|
@@ -40,7 +41,9 @@ export const parse = (letra) => {
|
|
|
40
41
|
}));
|
|
41
42
|
|
|
42
43
|
if (letra.commands)
|
|
43
|
-
|
|
44
|
+
for (const command of letra.commands) {
|
|
45
|
+
commands.push(rendy(command, letra));
|
|
46
|
+
}
|
|
44
47
|
|
|
45
48
|
return commands;
|
|
46
49
|
};
|
|
@@ -54,6 +57,7 @@ function createSymlinks({name, directorio, hogar, bin}) {
|
|
|
54
57
|
});
|
|
55
58
|
|
|
56
59
|
const binDir = join(directorio, '..', `bin`);
|
|
60
|
+
|
|
57
61
|
commands.push(`mkdir -p ${binDir}`);
|
|
58
62
|
for (const [name, from] of entries(parsedBin)) {
|
|
59
63
|
const binFrom = join(directorio, from);
|