@zokugun/artifact 0.2.4 → 0.2.5
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.
|
@@ -20,10 +20,13 @@ function mergeTextFiles({ targetPath, textFiles, mergedTextFiles, onMissing, onU
|
|
|
20
20
|
var _a;
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
for (const file of textFiles) {
|
|
23
|
+
if (options.verbose) {
|
|
24
|
+
console.log(`${file.name} is going to be merged`);
|
|
25
|
+
}
|
|
23
26
|
const journey = (_a = routes(file.name)) !== null && _a !== void 0 ? _a : (0, journeys_1.getJourney)(file.name);
|
|
24
27
|
if (!journey) {
|
|
25
28
|
if (options.verbose) {
|
|
26
|
-
console.log(`${file.name}, no merger found`);
|
|
29
|
+
console.log(`${file.name}, no merger has been found`);
|
|
27
30
|
}
|
|
28
31
|
try {
|
|
29
32
|
yield fs_extra_1.default.access(path_1.default.join(targetPath, file.name));
|
|
@@ -39,6 +42,9 @@ function mergeTextFiles({ targetPath, textFiles, mergedTextFiles, onMissing, onU
|
|
|
39
42
|
mergedTextFiles.push(file);
|
|
40
43
|
continue;
|
|
41
44
|
}
|
|
45
|
+
if (options.verbose) {
|
|
46
|
+
console.log(`${file.name}, a merger has been found`);
|
|
47
|
+
}
|
|
42
48
|
const name = journey.alias ? path_1.default.join(path_1.default.dirname(file.name), journey.alias) : file.name;
|
|
43
49
|
let currentData;
|
|
44
50
|
try {
|
|
@@ -8,20 +8,22 @@ function splitCommand(command) {
|
|
|
8
8
|
for (let i = 0; i < splitted.length; i++) {
|
|
9
9
|
const command = splitted[i];
|
|
10
10
|
const splittedSubcommand = command.split(/([\w-]+=\S+)\s/).filter(lodash_1.identity);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
result[subcommand]
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
if (splittedSubcommand.length > 0) {
|
|
12
|
+
const subcommandWithArgs = (0, lodash_1.last)(splittedSubcommand).split(' ');
|
|
13
|
+
const subcommand = (0, lodash_1.head)(subcommandWithArgs).trim();
|
|
14
|
+
const args = subcommandWithArgs.slice(1);
|
|
15
|
+
const env = splittedSubcommand.slice(0, -1);
|
|
16
|
+
const parsedSubcommand = {
|
|
17
|
+
args: args.map(lodash_1.trim),
|
|
18
|
+
env: env.map(lodash_1.trim),
|
|
19
|
+
separator: splitted[i + 1],
|
|
20
|
+
};
|
|
21
|
+
if (result[subcommand]) {
|
|
22
|
+
result[subcommand].push(parsedSubcommand);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
result[subcommand] = [parsedSubcommand];
|
|
26
|
+
}
|
|
25
27
|
}
|
|
26
28
|
i++;
|
|
27
29
|
}
|