palabra 1.13.0 → 1.13.2

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.10, v1.13.2
2
+
3
+ fix:
4
+ - 6a90941 palabra: letras: nvm: preinstall
5
+
6
+ 2026.04.10, v1.13.1
7
+
8
+ fix:
9
+ - af18567 palabra: letra: amber: hogar
10
+
1
11
  2026.04.10, v1.13.0
2
12
 
3
13
  feature:
@@ -1,5 +1,9 @@
1
1
  {
2
2
  "name": "amber",
3
3
  "version": "0.5.1-alpha",
4
+ "bin": {
5
+ "amber": "amber"
6
+ },
7
+ "hogar": "",
4
8
  "url": "https://github.com/amber-lang/amber/releases/download/{{ version }}/amber-linux-gnu-x86_64.tar.xz"
5
9
  }
@@ -5,8 +5,10 @@
5
5
  "env": {
6
6
  "NVM_DIR": "{{ directorio }}/nvm"
7
7
  },
8
- "commands": [
9
- "mkdir $NVM_DIR",
8
+ "preinstall": [
9
+ "mkdir $NVM_DIR"
10
+ ],
11
+ "postinstall": [
10
12
  "sed -i.bak 's/nvm_die_on_prefix() {/nvm_die_on_prefix() { return;/' $NVM_DIR/nvm.sh",
11
13
  "rm $NVM_DIR/nvm.sh.bak",
12
14
  "source \"$NVM_DIR/nvm.sh\""
@@ -3,6 +3,7 @@ import {rendy} from 'rendy';
3
3
  import {extract, isArchive} from './extract.js';
4
4
  import {execute} from './execute.js';
5
5
  import {parseEnv} from './parse-env.js';
6
+ import {run} from './run.js';
6
7
 
7
8
  const {entries} = Object;
8
9
 
@@ -16,6 +17,7 @@ const addDefaults = (letra) => ({
16
17
 
17
18
  export const parse = (letra) => {
18
19
  letra = addDefaults(letra);
20
+ const envLine = parseEnv(letra);
19
21
 
20
22
  const commands = [];
21
23
  const {
@@ -24,8 +26,17 @@ export const parse = (letra) => {
24
26
  bin = `/bin/${name}`,
25
27
  hogar = name,
26
28
  directorio,
29
+ preinstall,
30
+ postinstall,
27
31
  } = letra;
28
32
 
33
+ if (preinstall)
34
+ commands.push(...run({
35
+ letra,
36
+ commands: preinstall,
37
+ envLine,
38
+ }));
39
+
29
40
  const ext = extname(new URL(url).pathname);
30
41
 
31
42
  if (isArchive(ext))
@@ -41,12 +52,19 @@ export const parse = (letra) => {
41
52
  bin,
42
53
  }));
43
54
 
44
- const envLine = parseEnv(letra);
45
-
46
55
  if (letra.commands)
47
- for (const command of letra.commands) {
48
- commands.push(`${envLine}${rendy(command, letra)}`);
49
- }
56
+ commands.push(...run({
57
+ letra,
58
+ commands: letra.commands,
59
+ envLine,
60
+ }));
61
+
62
+ if (postinstall)
63
+ commands.push(...run({
64
+ letra,
65
+ commands: postinstall,
66
+ envLine,
67
+ }));
50
68
 
51
69
  return commands;
52
70
  };
@@ -0,0 +1,11 @@
1
+ import {rendy} from 'rendy';
2
+
3
+ export function run({letra, envLine, commands}) {
4
+ const result = [];
5
+
6
+ for (const command of commands) {
7
+ result.push(`${envLine}${rendy(command, letra)}`);
8
+ }
9
+
10
+ return result;
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",