palabra 1.9.4 → 1.10.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 +5 -0
- package/letras/rust/rust.json +1 -1
- package/lib/parser/parser.js +18 -5
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/letras/rust/rust.json
CHANGED
package/lib/parser/parser.js
CHANGED
|
@@ -20,6 +20,7 @@ export const parse = (letra) => {
|
|
|
20
20
|
url,
|
|
21
21
|
name,
|
|
22
22
|
bin = `/bin/${name}`,
|
|
23
|
+
hogar = name,
|
|
23
24
|
directorio,
|
|
24
25
|
} = letra;
|
|
25
26
|
|
|
@@ -33,6 +34,7 @@ export const parse = (letra) => {
|
|
|
33
34
|
|
|
34
35
|
commands.push(...createSymlinks({
|
|
35
36
|
directorio,
|
|
37
|
+
hogar,
|
|
36
38
|
name,
|
|
37
39
|
bin,
|
|
38
40
|
}));
|
|
@@ -43,9 +45,13 @@ export const parse = (letra) => {
|
|
|
43
45
|
return commands;
|
|
44
46
|
};
|
|
45
47
|
|
|
46
|
-
function createSymlinks({directorio,
|
|
48
|
+
function createSymlinks({name, directorio, hogar, bin}) {
|
|
47
49
|
const commands = [];
|
|
48
|
-
const parsedBin = parseBin(
|
|
50
|
+
const parsedBin = parseBin({
|
|
51
|
+
name,
|
|
52
|
+
hogar,
|
|
53
|
+
bin,
|
|
54
|
+
});
|
|
49
55
|
|
|
50
56
|
const binDir = join(directorio, '..', `bin`);
|
|
51
57
|
commands.push(`mkdir -p ${binDir}`);
|
|
@@ -59,11 +65,18 @@ function createSymlinks({directorio, name, bin}) {
|
|
|
59
65
|
return commands;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
|
-
function parseBin(name, bin) {
|
|
68
|
+
function parseBin({name, hogar, bin}) {
|
|
63
69
|
if (isString(bin))
|
|
64
70
|
return {
|
|
65
|
-
[name]:
|
|
71
|
+
[name]: join(name, bin),
|
|
66
72
|
};
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
const result = {};
|
|
75
|
+
|
|
76
|
+
for (const [currentName, binPath] of entries(bin)) {
|
|
77
|
+
result[currentName] = join(hogar, binPath);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return result;
|
|
69
81
|
}
|
|
82
|
+
|