palabra 2.4.6 → 2.5.1
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/README.md +1 -2
- package/bin/palabra.js +0 -0
- package/letras/bun/bun.json +4 -0
- package/lib/parser/execute.js +14 -2
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -104,8 +104,7 @@ extracted and then copied to directory `$PALABRA_DIR` and made symlinks.
|
|
|
104
104
|
|
|
105
105
|
### Script
|
|
106
106
|
|
|
107
|
-
Provided url to script that should be downloaded and executed
|
|
108
|
-
|
|
107
|
+
Provided url to script that should be downloaded and executed
|
|
109
108
|
|
|
110
109
|
## License
|
|
111
110
|
|
package/bin/palabra.js
CHANGED
|
File without changes
|
package/letras/bun/bun.json
CHANGED
package/lib/parser/execute.js
CHANGED
|
@@ -20,7 +20,11 @@ export const isExecute = (letra) => {
|
|
|
20
20
|
|
|
21
21
|
export const execute = (letra) => {
|
|
22
22
|
const commands = [];
|
|
23
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
url,
|
|
25
|
+
confirmar,
|
|
26
|
+
args = [],
|
|
27
|
+
} = letra;
|
|
24
28
|
|
|
25
29
|
const envLine = parseEnv(letra);
|
|
26
30
|
const renderedURL = rendy(url, letra);
|
|
@@ -28,7 +32,15 @@ export const execute = (letra) => {
|
|
|
28
32
|
const arg = confirmar ? '' : ' -- -y';
|
|
29
33
|
const curl = `bash -c "$(curl -fsSL ${renderedURL})"${arg}`;
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
const argsLines = [];
|
|
36
|
+
|
|
37
|
+
for (const arg of args) {
|
|
38
|
+
argsLines.push(rendy(arg, letra));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const argsResult = !argsLines.length ? '' : ` _ ${argsLines.join(' ')}`;
|
|
42
|
+
|
|
43
|
+
commands.push(`${envLine}${curl}${argsResult}`);
|
|
32
44
|
|
|
33
45
|
return commands;
|
|
34
46
|
};
|