palabra 1.5.0 → 1.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 +10 -0
- package/letras/{bun.json → bun/bun.json} +1 -1
- package/letras/{deno.json → deno/deno.json} +1 -1
- package/letras/nvim/fixture/nvim-v1-0-0.json +8 -0
- package/letras/nvim/fixture/nvim.json +8 -0
- package/letras/nvim/nvim.json +5 -0
- package/letras/rust/rust.json +9 -0
- package/lib/buscar.js +2 -1
- package/lib/parser/execute.js +5 -1
- package/lib/parser/parser.js +9 -1
- package/package.json +5 -1
- /package/letras/{fasm.json → fasm/fasm.json} +0 -0
- /package/letras/{go.json → go/go.json} +0 -0
package/ChangeLog
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
[
|
|
2
|
+
"wget https://github.com/neovim/neovim/releases/download/v1.0.0/nvim-linux-x86_64.tar.gz",
|
|
3
|
+
"rm -rf ~/.local/src/nvim",
|
|
4
|
+
"mkdir -p ~/.local/src/nvim",
|
|
5
|
+
"tar zxf nvim-linux-x86_64.tar.gz -C ~/.local/src/nvim",
|
|
6
|
+
"rm nvim-linux-x86_64.tar.gz",
|
|
7
|
+
"ln -fs ~/.local/src/nvim/bin/nvim ~/.local/bin/nvim"
|
|
8
|
+
]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
[
|
|
2
|
+
"wget https://github.com/neovim/neovim/releases/download/v*/nvim-linux-x86_64.tar.gz",
|
|
3
|
+
"rm -rf ~/.local/src/nvim",
|
|
4
|
+
"mkdir -p ~/.local/src/nvim",
|
|
5
|
+
"tar zxf nvim-linux-x86_64.tar.gz -C ~/.local/src/nvim",
|
|
6
|
+
"rm nvim-linux-x86_64.tar.gz",
|
|
7
|
+
"ln -fs ~/.local/src/nvim/bin/nvim ~/.local/bin/nvim"
|
|
8
|
+
]
|
package/lib/buscar.js
CHANGED
|
@@ -14,6 +14,7 @@ export const buscar = async (name, values = {}) => {
|
|
|
14
14
|
|
|
15
15
|
return {
|
|
16
16
|
encontro: true,
|
|
17
|
+
confirmar: true,
|
|
17
18
|
...data,
|
|
18
19
|
version,
|
|
19
20
|
camino,
|
|
@@ -21,7 +22,7 @@ export const buscar = async (name, values = {}) => {
|
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
async function importPalabra(name) {
|
|
24
|
-
const {default: letra} = await import(`../letras/${name}.json`, {
|
|
25
|
+
const {default: letra} = await import(`../letras/${name}/${name}.json`, {
|
|
25
26
|
with: {
|
|
26
27
|
type: 'json',
|
|
27
28
|
},
|
package/lib/parser/execute.js
CHANGED
|
@@ -5,18 +5,22 @@ const {entries} = Object;
|
|
|
5
5
|
export const execute = (letra) => {
|
|
6
6
|
const commands = [];
|
|
7
7
|
const {
|
|
8
|
+
|
|
8
9
|
url,
|
|
9
10
|
env = {},
|
|
11
|
+
confirmar,
|
|
10
12
|
} = letra;
|
|
11
13
|
|
|
12
14
|
const envLine = [];
|
|
13
15
|
|
|
14
16
|
for (const [name, value] of entries(env)) {
|
|
15
17
|
const envValue = rendy(value, letra);
|
|
18
|
+
|
|
16
19
|
envLine.push(`${name}=${envValue}`);
|
|
17
20
|
}
|
|
18
21
|
|
|
19
|
-
const
|
|
22
|
+
const arg = confirmar ? '' : ' -- -y';
|
|
23
|
+
const curl = `bash -c "$(curl -fsSL ${url})"${arg}`;
|
|
20
24
|
|
|
21
25
|
if (!envLine.length) {
|
|
22
26
|
commands.push(curl);
|
package/lib/parser/parser.js
CHANGED
|
@@ -6,7 +6,15 @@ const {entries} = Object;
|
|
|
6
6
|
|
|
7
7
|
const isString = (a) => typeof a === 'string';
|
|
8
8
|
|
|
9
|
+
const addDefaults = (letra) => ({
|
|
10
|
+
confirmar: true,
|
|
11
|
+
camino: '~/.local/src',
|
|
12
|
+
...letra,
|
|
13
|
+
});
|
|
14
|
+
|
|
9
15
|
export const parse = (letra) => {
|
|
16
|
+
letra = addDefaults(letra);
|
|
17
|
+
|
|
10
18
|
const commands = [];
|
|
11
19
|
const {
|
|
12
20
|
url,
|
|
@@ -15,7 +23,7 @@ export const parse = (letra) => {
|
|
|
15
23
|
camino,
|
|
16
24
|
} = letra;
|
|
17
25
|
|
|
18
|
-
const ext = extname(url);
|
|
26
|
+
const ext = extname(new URL(url).pathname);
|
|
19
27
|
|
|
20
28
|
if (ext === '.tgz' || ext === '.gz')
|
|
21
29
|
commands.push(...unpack(letra));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "palabra",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "Palabra software installer",
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"bin": {
|
|
10
10
|
"palabra": "bin/palabra.js"
|
|
11
11
|
},
|
|
12
|
+
"imports": {
|
|
13
|
+
"#test": "./test/create-test.js"
|
|
14
|
+
},
|
|
12
15
|
"repository": {
|
|
13
16
|
"type": "git",
|
|
14
17
|
"url": "git+https://github.com/coderaiser/palabra.git"
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
"@putout/test": "^15.0.0",
|
|
40
43
|
"eslint": "^10.0.0",
|
|
41
44
|
"eslint-plugin-putout": "^31.0.0",
|
|
45
|
+
"just-kebab-case": "^4.2.0",
|
|
42
46
|
"madrun": "^13.0.0",
|
|
43
47
|
"nodemon": "^3.0.1",
|
|
44
48
|
"redlint": "^6.0.0",
|
|
File without changes
|
|
File without changes
|