palabra 2.16.0 → 2.16.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 +10 -0
- package/lib/parser/parser.js +2 -4
- package/lib/parser/prepare.js +11 -2
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/lib/parser/parser.js
CHANGED
|
@@ -9,12 +9,10 @@ import {download} from './download.js';
|
|
|
9
9
|
import {prepare} from './prepare.js';
|
|
10
10
|
|
|
11
11
|
const {isArray} = Array;
|
|
12
|
-
const maybeArray = (a) => isArray(a) ? a : [a];
|
|
13
|
-
|
|
14
|
-
const isBool = (a) => typeof a === 'boolean';
|
|
15
|
-
|
|
16
12
|
const {entries} = Object;
|
|
17
13
|
|
|
14
|
+
const maybeArray = (a) => isArray(a) ? a : [a];
|
|
15
|
+
const isBool = (a) => typeof a === 'boolean';
|
|
18
16
|
const isString = (a) => typeof a === 'string';
|
|
19
17
|
|
|
20
18
|
export const parse = (letra, overrides) => {
|
package/lib/parser/prepare.js
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
|
-
import process from 'node:process';
|
|
2
|
+
import process, {env} from 'node:process';
|
|
3
3
|
|
|
4
4
|
const isString = (a) => typeof a === 'string';
|
|
5
|
+
const prepareArch = () => {
|
|
6
|
+
const arch = env.ARCH || process.arch;
|
|
7
|
+
|
|
8
|
+
if (arch === 'x64')
|
|
9
|
+
return 'x86-64';
|
|
10
|
+
|
|
11
|
+
return arch;
|
|
12
|
+
};
|
|
5
13
|
|
|
6
14
|
export const prepare = (letra, overrides) => {
|
|
7
15
|
const {
|
|
@@ -11,12 +19,13 @@ export const prepare = (letra, overrides) => {
|
|
|
11
19
|
bin = parseBin(letra),
|
|
12
20
|
hogar = name,
|
|
13
21
|
afterInstall = [],
|
|
22
|
+
arch = prepareArch(),
|
|
14
23
|
} = letra;
|
|
15
24
|
|
|
16
25
|
const url = parseURL(letra, overrides);
|
|
17
26
|
|
|
18
27
|
return {
|
|
19
|
-
arch
|
|
28
|
+
arch,
|
|
20
29
|
...letra,
|
|
21
30
|
confirmar,
|
|
22
31
|
directorio,
|