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 CHANGED
@@ -1,3 +1,13 @@
1
+ 2026.06.03, v2.13.0
2
+
3
+ feature:
4
+ - 381ddac add instapods
5
+
6
+ 2026.06.02, v2.12.0
7
+
8
+ feature:
9
+ - a3d454a letras: typos: add platform
10
+
1
11
  2026.06.01, v2.11.0
2
12
 
3
13
  feature:
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "instapods",
3
+ "url": "https://instapods.com/install.sh",
4
+ "env": {
5
+ "INSTAPODS_INSTALL": "{{ directorio }}/instapods"
6
+ },
7
+ "test": [
8
+ "instapods version"
9
+ ]
10
+ }
@@ -1,8 +1,8 @@
1
1
  {
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
- }
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
+ }
@@ -1,8 +1,11 @@
1
1
  {
2
- "name": "typos",
3
- "version": "1.47.0",
4
- "url": "https://github.com/crate-ci/typos/releases/download/v{{ version }}/typos-v1.47.0-x86_64-unknown-linux-musl.tar.gz",
5
- "bin": "{{ name }}",
6
- "extractDirectory": "{{ directorio }}/{{ name }}",
7
- "test": "{{ name }} --version"
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
+ }
@@ -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 {
@@ -1,21 +1,20 @@
1
- const parseBin = ({name, type}) => {
2
- if (type === 'root-archive')
3
- return '';
4
-
5
- return `/bin/${name}`;
6
- };
1
+ import os from 'node:os';
2
+ import process from 'node:process';
7
3
 
8
- export const prepare = (letra) => {
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
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "2.11.0",
3
+ "version": "2.13.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",