@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.
- package/compileValidSQL.cjs +3 -5
- package/compileValidSQL.tsx +4 -6
- package/package.json +1 -1
package/compileValidSQL.cjs
CHANGED
|
@@ -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
|
|
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
|
|
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.
|
|
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"));
|
package/compileValidSQL.tsx
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
|
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.
|
|
94
|
+
const resource = readFileSync(`${args.inputDir}${file}`, 'utf8');
|
|
97
95
|
|
|
98
96
|
const json = JSON.parse(resource)
|
|
99
97
|
|