@zokugun/artifact 0.2.2 → 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
- const subcommandWithArgs = (0, lodash_1.last)(splittedSubcommand).split(' ');
12
- const subcommand = (0, lodash_1.head)(subcommandWithArgs).trim();
13
- const args = subcommandWithArgs.slice(1);
14
- const env = splittedSubcommand.slice(0, -1);
15
- const parsedSubcommand = {
16
- args: args.map(lodash_1.trim),
17
- env: env.map(lodash_1.trim),
18
- separator: splitted[i + 1],
19
- };
20
- if (result[subcommand]) {
21
- result[subcommand].push(parsedSubcommand);
22
- }
23
- else {
24
- result[subcommand] = [parsedSubcommand];
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
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zokugun/artifact",
3
3
  "description": "Boilerplate your project & keep your configurations up to date",
4
- "version": "0.2.2",
4
+ "version": "0.2.5",
5
5
  "author": {
6
6
  "name": "Baptiste Augrain",
7
7
  "email": "daiyam@zokugun.org"
@@ -44,10 +44,10 @@
44
44
  "lodash": "^4.17.21",
45
45
  "micromatch": "^4.0.4",
46
46
  "npm": "^7.23.0",
47
- "ora": "^6.1.0",
47
+ "ora": "^5.4.1",
48
48
  "pacote": "^13.0.5",
49
49
  "semver": "^7.3.5",
50
- "tempy": "^2.0.0",
50
+ "tempy": "^1.0.1",
51
51
  "yaml": "^1.10.2"
52
52
  },
53
53
  "devDependencies": {