palabra 2.11.0 → 2.13.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 +10 -0
- package/letras/instapods/instapods.json +10 -0
- package/letras/shellcheck/shellcheck.json +7 -7
- package/letras/typos/typos.json +10 -7
- package/lib/parser/parser.js +2 -2
- package/lib/parser/prepare.js +31 -8
- package/package.json +1 -1
package/ChangeLog
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
"name": "shellcheck",
|
|
3
|
+
"version": "0.11.0",
|
|
4
|
+
"url": "https://github.com/koalaman/shellcheck/releases/download/v{{ version }}/shellcheck-v{{ version }}.linux.x86_64.tar.xz",
|
|
5
|
+
"bin": "{{ name }}",
|
|
6
|
+
"test": "{{ name }} --version",
|
|
7
|
+
"rename": "shellcheck-v{{ version }}"
|
|
8
|
+
}
|
package/letras/typos/typos.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
"name": "typos",
|
|
3
|
+
"version": "1.47.0",
|
|
4
|
+
"url": {
|
|
5
|
+
"darwin": "https://github.com/crate-ci/typos/releases/download/v{{ version }}/typos-v1.47.0-aarch64-apple-darwin.tar.gz",
|
|
6
|
+
"linux": "https://github.com/crate-ci/typos/releases/download/v{{ version }}/typos-v1.47.0-x86_64-unknown-linux-musl.tar.gz"
|
|
7
|
+
},
|
|
8
|
+
"bin": "{{ name }}",
|
|
9
|
+
"extractDirectory": "{{ directorio }}/{{ name }}",
|
|
10
|
+
"test": "{{ name }} --version"
|
|
11
|
+
}
|
package/lib/parser/parser.js
CHANGED
|
@@ -17,8 +17,8 @@ const {entries} = Object;
|
|
|
17
17
|
|
|
18
18
|
const isString = (a) => typeof a === 'string';
|
|
19
19
|
|
|
20
|
-
export const parse = (letra) => {
|
|
21
|
-
const tinta = prepare(letra);
|
|
20
|
+
export const parse = (letra, overrides) => {
|
|
21
|
+
const tinta = prepare(letra, overrides);
|
|
22
22
|
const commands = [];
|
|
23
23
|
|
|
24
24
|
const {
|
package/lib/parser/prepare.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return '';
|
|
4
|
-
|
|
5
|
-
return `/bin/${name}`;
|
|
6
|
-
};
|
|
1
|
+
import os from 'node:os';
|
|
2
|
+
import process from 'node:process';
|
|
7
3
|
|
|
8
|
-
|
|
4
|
+
const isString = (a) => typeof a === 'string';
|
|
5
|
+
|
|
6
|
+
export const prepare = (letra, overrides) => {
|
|
9
7
|
const {
|
|
10
8
|
confirmar = true,
|
|
11
9
|
directorio = '~/.local/share',
|
|
12
|
-
url,
|
|
13
10
|
name,
|
|
14
11
|
bin = parseBin(letra),
|
|
15
12
|
hogar = name,
|
|
16
13
|
afterInstall = [],
|
|
17
14
|
} = letra;
|
|
18
15
|
|
|
16
|
+
const url = parseURL(letra, overrides);
|
|
17
|
+
|
|
19
18
|
return {
|
|
20
19
|
...letra,
|
|
21
20
|
confirmar,
|
|
@@ -27,3 +26,27 @@ export const prepare = (letra) => {
|
|
|
27
26
|
afterInstall,
|
|
28
27
|
};
|
|
29
28
|
};
|
|
29
|
+
|
|
30
|
+
const parseBin = ({name, type}) => {
|
|
31
|
+
if (type === 'root-archive')
|
|
32
|
+
return '';
|
|
33
|
+
|
|
34
|
+
return `/bin/${name}`;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const parseURL = ({url}, overrides = {}) => {
|
|
38
|
+
const {
|
|
39
|
+
env = process.env,
|
|
40
|
+
platform = os.platform,
|
|
41
|
+
} = overrides;
|
|
42
|
+
|
|
43
|
+
if (!url)
|
|
44
|
+
return url;
|
|
45
|
+
|
|
46
|
+
if (isString(url))
|
|
47
|
+
return url;
|
|
48
|
+
|
|
49
|
+
const currentPlatform = env.PLATFORM || platform();
|
|
50
|
+
|
|
51
|
+
return url[currentPlatform];
|
|
52
|
+
};
|