palabra 2.6.8 → 2.7.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,8 @@
1
+ 2026.04.26, v2.7.0
2
+
3
+ feature:
4
+ - e7228bc palabra: commands: remove
5
+
1
6
  2026.04.26, v2.6.8
2
7
 
3
8
  fix:
package/README.md CHANGED
@@ -72,6 +72,12 @@ palabra l
72
72
  ]
73
73
  ```
74
74
 
75
+ ### `remove`
76
+
77
+ ```
78
+ palabra r mwget
79
+ ```
80
+
75
81
  ## Env variables
76
82
 
77
83
  Use `PALABRA_DIR` or [`XDG_DATA_HOME`](https://specifications.freedesktop.org/basedir/latest/) to override default installation path `~/.local/share`.
package/bin/palabra.js CHANGED
@@ -9,6 +9,7 @@ import {instalar} from '../lib/cli/instalar.js';
9
9
  import info from '../package.json' with {
10
10
  type: 'json',
11
11
  };
12
+ import {borrar} from '../lib/cli/borrar.js';
12
13
 
13
14
  const argv = process.argv.slice(2);
14
15
  const args = parseArgs(argv);
@@ -30,6 +31,8 @@ let cmd = '';
30
31
 
31
32
  if (!instrucciones || /^i(nstall)?$/.test(instrucciones)) {
32
33
  cmd = await instalar(args._, args);
34
+ } else if (/^r(remove)?$/.test(instrucciones)) {
35
+ cmd = await borrar(args._, args);
33
36
  } else if (/^l(ist)?$/.test(instrucciones)) {
34
37
  const list = await readdir(new URL('../letras', import.meta.url));
35
38
  console.log(list.join(' '));
package/help.json CHANGED
@@ -1,4 +1,6 @@
1
1
  {
2
2
  "-h, --help ": "display this help and exit",
3
- "-v, --version ": "output version information and exit"
3
+ "-v, --version ": "output version information and exit",
4
+ "i[nstall] ": "install letra",
5
+ "r[remove] ": "remove letra"
4
6
  }
@@ -0,0 +1,16 @@
1
+ import {join} from 'node:path';
2
+
3
+ export const borrar = (nombres, {directorio}) => {
4
+ const commands = [];
5
+
6
+ for (const nombre of nombres) {
7
+ const dir = join(directorio, nombre);
8
+ const bin = join(directorio, '..', 'bin', nombre);
9
+
10
+ commands.push(`rm rf ${dir}`);
11
+ commands.push(`rm rf ${bin}`);
12
+ }
13
+
14
+ return commands;
15
+ };
16
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "2.6.8",
3
+ "version": "2.7.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",