palabra 2.5.1 → 2.6.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.26, v2.6.0
2
+
3
+ feature:
4
+ - 86ba34b letras: gdu: add
5
+
6
+ 2026.04.20, v2.5.2
7
+
8
+ feature:
9
+ - 3fb9eac palabra: -h: add
10
+
1
11
  2026.04.20, v2.5.1
2
12
 
3
13
  fix:
package/bin/palabra.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import process from 'node:process';
3
+ import process, {exit} from 'node:process';
4
4
  import {readdir} from 'node:fs/promises';
5
5
  import {execa} from 'execa';
6
6
  import {tryToCatch} from 'try-to-catch';
@@ -18,6 +18,12 @@ if (args.version) {
18
18
  process.exit();
19
19
  }
20
20
 
21
+ if (args.help || !args._.length) {
22
+ const {help} = await import('../lib/help.js');
23
+ console.log(help());
24
+ exit();
25
+ }
26
+
21
27
  const instrucciones = args._.shift();
22
28
 
23
29
  let cmd = '';
@@ -46,3 +52,4 @@ const [error] = await tryToCatch(execa, cmd, {
46
52
 
47
53
  if (error)
48
54
  process.exitCode = error.exitCode;
55
+
package/help.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "-h, --help ": "display this help and exit",
3
+ "-v, --version ": "output version information and exit"
4
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "gdu",
3
+ "version": "5.35.0",
4
+ "url": "https://github.com/dundee/gdu/releases/download/v{{ version }}/gdu_linux_amd64.tgz",
5
+ "test": "gdu -v",
6
+ "executable": true
7
+ }
package/lib/escuchar.js CHANGED
@@ -5,7 +5,7 @@ const {entries} = Object;
5
5
  export const escuchar = async (palabras) => {
6
6
  const silabas = [];
7
7
  const {
8
- directorio = '~/.local/src',
8
+ directorio = '~/.local/share',
9
9
  letras = [],
10
10
  } = palabras;
11
11
 
package/lib/help.js ADDED
@@ -0,0 +1,18 @@
1
+ import helpJson from '../help.json' with {
2
+ type: 'json',
3
+ };
4
+
5
+ const {entries} = Object;
6
+
7
+ export const help = () => {
8
+ const result = [
9
+ 'Usage: palabra [command|options]',
10
+ 'Options:',
11
+ ];
12
+
13
+ for (const [name, description] of entries(helpJson)) {
14
+ result.push(` ${name} ${description}`);
15
+ }
16
+
17
+ return result.join('\n');
18
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",