palabra 1.3.0 → 1.4.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,9 @@
1
+ 2026.04.07, v1.4.0
2
+
3
+ feature:
4
+ - d621d90 palabra: |bash -> bash -c
5
+ - dc6726a bun: add
6
+
1
7
  2026.04.06, v1.3.0
2
8
 
3
9
  feature:
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "bun",
3
+ "url": "https://bun.sh/install",
4
+ "env": {
5
+ "BUN_INSTALL": "{{ camino }}"
6
+ }
7
+ }
package/letras/deno.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "deno",
3
- "link": "https://deno.land/install.sh",
4
- "bin": "bin/deno",
3
+ "url": "https://deno.land/install.sh",
5
4
  "env": {
6
5
  "DENO_DIR": "{{ camino }}"
7
6
  }
package/letras/fasm.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fasm",
3
3
  "version": "1.73.32",
4
- "link": "https://flatassembler.net/fasm-{{ version }}.tgz",
4
+ "url": "https://flatassembler.net/fasm-{{ version }}.tgz",
5
5
  "dir": "fasm",
6
6
  "bin": "fasm.x64"
7
7
  }
@@ -5,7 +5,7 @@ const {entries} = Object;
5
5
  export const execute = (letra) => {
6
6
  const commands = [];
7
7
  const {
8
- link,
8
+ url,
9
9
  env = {},
10
10
  } = letra;
11
11
 
@@ -16,12 +16,14 @@ export const execute = (letra) => {
16
16
  envLine.push(`${name}=${envValue}`);
17
17
  }
18
18
 
19
+ const curl = `bash -c "$(curl -fsSL ${url})"`;
20
+
19
21
  if (!envLine.length) {
20
- commands.push(`curl -fsSL ${link} | sh`);
22
+ commands.push(curl);
21
23
  return commands;
22
24
  }
23
25
 
24
- commands.push(`${envLine.join(' ')} curl -fsSL ${link} | sh`);
26
+ commands.push(`${envLine.join(' ')} ${curl}`);
25
27
 
26
28
  return commands;
27
29
  };
@@ -1,25 +1,28 @@
1
- import {normalize} from 'node:path';
1
+ import {extname, join} from 'node:path';
2
2
  import {unpack} from './unpack.js';
3
3
  import {execute} from './execute.js';
4
4
 
5
5
  export const parse = (letra) => {
6
6
  const commands = [];
7
7
  const {
8
- link,
8
+ url,
9
9
  name,
10
- bin,
10
+ bin = `/bin/${name}`,
11
11
  camino,
12
12
  } = letra;
13
13
 
14
- const dirBin = normalize(`${camino}/../bin/${name}`);
14
+ const binTo = join(camino, '..', `bin/${name}`);
15
15
 
16
- if (link.endsWith('tgz'))
16
+ const ext = extname(url);
17
+
18
+ if (ext === '.tgz')
17
19
  commands.push(...unpack(letra));
18
20
 
19
- if (link.endsWith('sh'))
21
+ if (!ext || ext === '.sh')
20
22
  commands.push(...execute(letra));
21
23
 
22
- commands.push(`ln -fs ${camino}/${name}/${bin} ${dirBin}`);
24
+ const binFrom = join(camino, name, bin);
25
+ commands.push(`ln -fs ${binFrom} ${binTo}`);
23
26
 
24
27
  return commands;
25
28
  };
@@ -5,14 +5,14 @@ export const unpack = (letra) => {
5
5
  const commands = [];
6
6
  const {
7
7
  name,
8
- link,
8
+ url,
9
9
  camino,
10
10
  } = letra;
11
11
 
12
- const renderedLink = rendy(link, letra);
13
- const filename = basename(renderedLink);
12
+ const renderedurl = rendy(url, letra);
13
+ const filename = basename(renderedurl);
14
14
 
15
- commands.push(`wget ${renderedLink}`);
15
+ commands.push(`wget ${renderedurl}`);
16
16
  commands.push(`tar zxf ${filename}`);
17
17
  commands.push(`rm ${filename}`);
18
18
  commands.push(`mkdir -p ${camino}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",