@carbonorm/carbonreact 3.3.9 → 3.3.10

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.
@@ -51,13 +51,11 @@ for (var i = 2; i < process.argv.length; i++) {
51
51
  switch (arg) {
52
52
  case '--input':
53
53
  case '-i':
54
- args.inputDir = process.argv[i + 1];
55
- i++; // Skip the next argument since it's the value
54
+ args.inputDir = process.argv[++i];
56
55
  break;
57
56
  case '--output':
58
57
  case '-o':
59
- args.outputDir = process.argv[i + 1];
60
- i++; // Skip the next argument since it's the value
58
+ args.outputDir = process.argv[++i];
61
59
  break;
62
60
  case '--verbose':
63
61
  case '-v':
@@ -95,7 +93,7 @@ var fs = require('fs');
95
93
  if (file === ManifestFile) {
96
94
  return;
97
95
  }
98
- var resource = (0, fs_1.readFileSync)("".concat(args.outputDir).concat(file), 'utf8');
96
+ var resource = (0, fs_1.readFileSync)("".concat(args.inputDir).concat(file), 'utf8');
99
97
  var json = JSON.parse(resource);
100
98
  if (json === undefined) {
101
99
  console.error("Failed to parse ".concat(file, " as JSON"));
@@ -5,7 +5,7 @@ import {readFile, readFileSync} from "fs";
5
5
  const c = require('ansi-colors');
6
6
 
7
7
  // Create an object to store the parsed arguments
8
- const args = {
8
+ let args = {
9
9
  inputDir: './logs/rest/',
10
10
  outputDir: './logs/rest/',
11
11
  verbose: false,
@@ -20,13 +20,11 @@ for (let i = 2; i < process.argv.length; i++) {
20
20
  switch (arg) {
21
21
  case '--input':
22
22
  case '-i':
23
- args.inputDir = process.argv[i + 1];
24
- i++; // Skip the next argument since it's the value
23
+ args.inputDir = process.argv[++i];
25
24
  break;
26
25
  case '--output':
27
26
  case '-o':
28
- args.outputDir = process.argv[i + 1];
29
- i++; // Skip the next argument since it's the value
27
+ args.outputDir = process.argv[++i];
30
28
  break;
31
29
  case '--verbose':
32
30
  case '-v':
@@ -93,7 +91,7 @@ const fs = require('fs');
93
91
 
94
92
  }
95
93
 
96
- const resource = readFileSync(`${args.outputDir}${file}`, 'utf8');
94
+ const resource = readFileSync(`${args.inputDir}${file}`, 'utf8');
97
95
 
98
96
  const json = JSON.parse(resource)
99
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonorm/carbonreact",
3
- "version": "3.3.9",
3
+ "version": "3.3.10",
4
4
  "browser": "dist/index.umd.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "main": "dist/index.cjs.js",