palabra 2.14.0 → 2.14.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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2026.06.03, v2.14.1
2
+
3
+ feature:
4
+ - 2283f2c palabra: letras: gh: rename: multiple
5
+
1
6
  2026.06.03, v2.14.0
2
7
 
3
8
  feature:
package/letras/gh/gh.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
- "name": "gh",
3
- "version": "2.93.0",
4
- "url": {
5
- "linux": "https://github.com/cli/cli/releases/download/v{{ version }}/gh_{{ version }}_linux_amd64.tar.gz",
6
- "darwin": "https://github.com/cli/cli/releases/download/v{{ version }}gh_{{ version }}_macOS_arm64.zip"
7
- },
8
- "test": "{{ name }} version"
9
- }
2
+ "name": "gh",
3
+ "version": "2.93.0",
4
+ "url": {
5
+ "linux": "https://github.com/cli/cli/releases/download/v{{ version }}/gh_{{ version }}_linux_amd64.tar.gz",
6
+ "darwin": "https://github.com/cli/cli/releases/download/v{{ version }}gh_{{ version }}_macOS_arm64.zip"
7
+ },
8
+ "test": "{{ name }} version",
9
+ "rename": [
10
+ "gh_{{ version }}_linux_amd64",
11
+ "gh_{{ version }}_macos_arm64"
12
+ ]
13
+ }
@@ -1,14 +1,20 @@
1
1
  import {join} from 'node:path';
2
2
  import {rendy} from 'rendy';
3
3
 
4
+ const {isArray} = Array;
5
+ const maybeArray = (a) => isArray(a) ? a : [a];
6
+
4
7
  export const rename = (letra) => {
5
8
  const {name, directorio} = letra;
6
9
  const commands = [];
7
- const renderedRename = rendy(letra.rename, letra);
8
- const from = join(directorio, renderedRename);
9
- const to = join(directorio, name);
10
10
 
11
- commands.push(`mv -T ${from} ${to}`);
11
+ for (const rawFrom of maybeArray(letra.rename)) {
12
+ const renderedRename = rendy(rawFrom, letra);
13
+ const from = join(directorio, renderedRename);
14
+ const to = join(directorio, name);
15
+
16
+ commands.push(`mv -T ${from} ${to}`);
17
+ }
12
18
 
13
19
  return commands;
14
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "2.14.0",
3
+ "version": "2.14.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",