palabra 1.0.2 → 1.2.0

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 CHANGED
@@ -1,3 +1,13 @@
1
+ 2026.04.06, v1.2.0
2
+
3
+ feature:
4
+ - b14dbe6 palabra: camino: add
5
+
6
+ 2026.04.06, v1.1.0
7
+
8
+ feature:
9
+ - b1f1b35 letras: fasm: improve
10
+
1
11
  2026.04.06, v1.0.2
2
12
 
3
13
  fix:
package/README.md CHANGED
@@ -25,6 +25,7 @@ First thing you should do is:
25
25
 
26
26
  ```json
27
27
  {
28
+ "camino": "~/.local/src",
28
29
  "letras": {
29
30
  "fasm": "*"
30
31
  }
package/bin/palabra.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  import {join} from 'node:path';
3
4
  import process from 'node:process';
4
5
  import {execa} from 'execa';
package/letras/fasm.json CHANGED
@@ -2,5 +2,6 @@
2
2
  "name": "fasm",
3
3
  "version": "1.73.32",
4
4
  "link": "https://flatassembler.net/fasm-{{ version }}.tgz",
5
- "bin": "./fasm/fasm.x64"
5
+ "dir": "fasm",
6
+ "bin": "fasm.x64"
6
7
  }
package/lib/buscar.js CHANGED
@@ -10,11 +10,13 @@ export const buscar = async (name, values = {}) => {
10
10
  };
11
11
 
12
12
  const version = values.version || data.version;
13
+ const {camino} = values;
13
14
 
14
15
  return {
15
16
  encontro: true,
16
17
  ...data,
17
18
  version,
19
+ camino,
18
20
  };
19
21
  };
20
22
 
package/lib/escuchar.js CHANGED
@@ -4,12 +4,17 @@ const {entries} = Object;
4
4
 
5
5
  export const escuchar = async (palabras) => {
6
6
  const silabas = [];
7
- const {letras = []} = palabras;
7
+ const {
8
+ camino = '~/.local/src',
9
+ letras = [],
10
+ } = palabras;
8
11
 
9
12
  for (const [name, version] of entries(letras)) {
10
- silabas.push(buscar(name, version));
13
+ silabas.push(buscar(name, {
14
+ version,
15
+ camino,
16
+ }));
11
17
  }
12
18
 
13
19
  return await Promise.all(silabas);
14
20
  };
15
-
package/lib/hablar.js CHANGED
@@ -18,4 +18,3 @@ export const hablar = (silabas) => {
18
18
 
19
19
  return commands;
20
20
  };
21
-
package/lib/palabra.js CHANGED
@@ -7,4 +7,3 @@ export const create = async (palabras) => {
7
7
 
8
8
  return commands.join(' && ');
9
9
  };
10
-
@@ -1,14 +1,26 @@
1
- import {basename} from 'node:path';
1
+ import {basename, normalize} from 'node:path';
2
2
  import {rendy} from 'rendy';
3
3
 
4
4
  export const parse = (letra) => {
5
5
  const commands = [];
6
- const {link} = letra;
6
+ const {
7
+ link,
8
+ name,
9
+ bin,
10
+ camino,
11
+ } = letra;
12
+
7
13
  const renderedLink = rendy(link, letra);
14
+ const filename = basename(renderedLink);
15
+ const dirBin = normalize(`${camino}/../bin/${name}`);
8
16
 
9
17
  commands.push(`wget ${renderedLink}`);
10
- commands.push(`tar zxf ${basename(renderedLink)}`);
18
+ commands.push(`tar zxf ${filename}`);
19
+ commands.push(`rm ${filename}`);
20
+ commands.push(`mkdir -p ${camino}`);
21
+ commands.push(`rm -rf ${camino}/${name}`);
22
+ commands.push(`mv -f ${name} ${camino}/${name}`);
23
+ commands.push(`ln -fs ${camino}/${name}/${bin} ${dirBin}`);
11
24
 
12
25
  return commands;
13
26
  };
14
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",