palabra 1.0.1 → 1.1.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/bin/palabra.js +7 -3
- package/letras/fasm.json +5 -4
- package/lib/parser/parser.js +9 -3
- package/package.json +1 -1
- /package/lib/{palabras.js → palabra.js} +0 -0
package/ChangeLog
CHANGED
package/bin/palabra.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
import {join} from 'node:path';
|
|
2
3
|
import process from 'node:process';
|
|
3
4
|
import {execa} from 'execa';
|
|
4
5
|
import {tryToCatch} from 'try-to-catch';
|
|
5
|
-
import {create} from '../lib/
|
|
6
|
+
import {create} from '../lib/palabra.js';
|
|
6
7
|
|
|
7
8
|
const [arg] = process.argv.slice(2);
|
|
8
|
-
const name = join(process.cwd(), '.
|
|
9
|
+
const name = join(process.cwd(), '.palabra.json');
|
|
9
10
|
|
|
10
11
|
const {default: palabras} = await import(name, {
|
|
11
12
|
with: {
|
|
@@ -18,7 +19,10 @@ const cmd = await create(palabras);
|
|
|
18
19
|
if (arg !== '-q')
|
|
19
20
|
console.log(`> ${cmd}`);
|
|
20
21
|
|
|
21
|
-
const [error] = await tryToCatch(execa, cmd, {
|
|
22
|
+
const [error] = await tryToCatch(execa, cmd, {
|
|
23
|
+
shell: '/bin/bash',
|
|
24
|
+
stdio: 'inherit',
|
|
25
|
+
});
|
|
22
26
|
|
|
23
27
|
if (error)
|
|
24
28
|
process.exitCode = error.exitCode;
|
package/letras/fasm.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"name": "fasm",
|
|
3
|
+
"version": "1.73.32",
|
|
4
|
+
"link": "https://flatassembler.net/fasm-{{ version }}.tgz",
|
|
5
|
+
"dir": "fasm",
|
|
6
|
+
"bin": "fasm.x64"
|
|
6
7
|
}
|
package/lib/parser/parser.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import {basename} from 'node:path';
|
|
1
|
+
import {basename, extname} from 'node:path';
|
|
2
2
|
import {rendy} from 'rendy';
|
|
3
3
|
|
|
4
4
|
export const parse = (letra) => {
|
|
5
5
|
const commands = [];
|
|
6
|
-
const {link} = letra;
|
|
6
|
+
const {link, name, bin} = letra;
|
|
7
7
|
const renderedLink = rendy(link, letra);
|
|
8
|
+
const filename = basename(renderedLink);
|
|
8
9
|
|
|
9
10
|
commands.push(`wget ${renderedLink}`);
|
|
10
|
-
commands.push(`tar zxf ${
|
|
11
|
+
commands.push(`tar zxf ${filename}`);
|
|
12
|
+
commands.push(`rm ${filename}`);
|
|
13
|
+
commands.push(`mkdir -p ~/.local/src`);
|
|
14
|
+
commands.push(`rm -rf ~/.local/src/${name}`);
|
|
15
|
+
commands.push(`mv -f ${name} ~/.local/src/${name}`);
|
|
16
|
+
commands.push(`ln -fs ~/.local/src/${name}/${bin} ~/.local/bin/${name}`);
|
|
11
17
|
|
|
12
18
|
return commands;
|
|
13
19
|
};
|
package/package.json
CHANGED
|
File without changes
|