palabra 2.1.0 → 2.3.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.14, v2.3.0
2
+
3
+ feature:
4
+ - 40b5930 palabra: rename: add
5
+
6
+ 2026.04.13, v2.2.0
7
+
8
+ feature:
9
+ - 19b98a8 palabra: letras: mwget: add
10
+
1
11
  2026.04.13, v2.1.0
2
12
 
3
13
  feature:
package/README.md CHANGED
@@ -72,7 +72,7 @@ palabra l
72
72
 
73
73
  ## Env variables
74
74
 
75
- Use `PALABRA_DIR` or `XDG_DATA_HOME` to override default installation path `~/.local/share`.
75
+ Use `PALABRA_DIR` or [`XDG_DATA_HOME`](https://specifications.freedesktop.org/basedir/latest/) to override default installation path `~/.local/share`.
76
76
 
77
77
  That's it!
78
78
 
@@ -20,5 +20,8 @@
20
20
  "ghc --version",
21
21
  "stack --version"
22
22
  ],
23
- "commands": ["mv ~/.ghcup {{ directorio }}/ghcup", "ln -fs {{ directorio }}/ghcup/ghc/{{ version }}/lib/ghc-{{ version }}/bin/ghc {{ directorio }}/../bin/ghc"]
24
- }
23
+ "commands": [
24
+ "mv ~/.ghcup {{ directorio }}/ghcup",
25
+ "ln -fs {{ directorio }}/ghcup/ghc/{{ version }}/lib/ghc-{{ version }}/bin/ghc {{ directorio }}/../bin/ghc"
26
+ ]
27
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "mwget",
3
+ "version": "1.2.0",
4
+ "url": "https://github.com/rayylee/mwget/releases/download/v{{ version }}/mwget-linux-x64.tar.gz",
5
+ "test": "{{ name }} --version",
6
+ "bin": "{{ name }}",
7
+ "rename": "{{ name }}-linux-x64"
8
+ }
@@ -10,8 +10,5 @@
10
10
  "yara --version",
11
11
  "yr --version"
12
12
  ],
13
- "commands": [
14
- "mkdir -p {{ directorio }}/yara",
15
- "mv -f {{ directorio }}/yr {{ directorio }}/yara/"
16
- ]
13
+ "rename": "yr"
17
14
  }
@@ -1,5 +1,6 @@
1
1
  import {join} from 'node:path';
2
2
  import {rendy} from 'rendy';
3
+ import {rename} from './rename.js';
3
4
  import {extract, isArchive} from './extract.js';
4
5
  import {execute, isExecute} from './execute.js';
5
6
  import {parseEnv} from './parse-env.js';
@@ -63,6 +64,9 @@ export const parse = (letra) => {
63
64
  bin,
64
65
  }));
65
66
 
67
+ if (letra.rename)
68
+ commands.push(...rename(letra));
69
+
66
70
  if (letra.commands)
67
71
  commands.push(...run({
68
72
  letra,
@@ -92,8 +96,16 @@ export const parse = (letra) => {
92
96
  return commands;
93
97
  };
94
98
 
95
- function createSymlinks({name, directorio, hogar, bin}) {
99
+ function createSymlinks(letra) {
100
+ const {
101
+ name,
102
+ directorio,
103
+ hogar,
104
+ bin,
105
+ } = letra;
106
+
96
107
  const commands = [];
108
+
97
109
  const parsedBin = parseBin({
98
110
  name,
99
111
  hogar,
@@ -103,7 +115,7 @@ function createSymlinks({name, directorio, hogar, bin}) {
103
115
  const binDir = join(directorio, '..', `bin`);
104
116
 
105
117
  for (const [name, from] of entries(parsedBin)) {
106
- const binFrom = join(directorio, from);
118
+ const binFrom = rendy(join(directorio, from), letra);
107
119
  const binTo = join(binDir, name);
108
120
 
109
121
  commands.push(`ln -fs ${binFrom} ${binTo}`);
@@ -0,0 +1,15 @@
1
+ import {join} from 'node:path';
2
+ import {rendy} from 'rendy';
3
+
4
+ export const rename = (letra) => {
5
+ const {name, directorio} = letra;
6
+ const commands = [];
7
+ const renderedRename = rendy(letra.rename, letra);
8
+ const from = join(directorio, renderedRename);
9
+ const to = join(directorio, name);
10
+
11
+ commands.push(`mv -f ${from} ${to}`);
12
+
13
+ return commands;
14
+ };
15
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "2.1.0",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",