crabatool 1.0.276 → 1.0.277

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tool/start.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crabatool",
3
- "version": "1.0.276",
3
+ "version": "1.0.277",
4
4
  "description": "crabatool",
5
5
  "main": "index.js",
6
6
  "bin": {
package/tool/start.js CHANGED
@@ -94,7 +94,8 @@ class Start {
94
94
  { name: '-Debug', type: 'boolean' },
95
95
  { name: '-checkgspx', type: 'boolean' },
96
96
  { name: '-checkutf8', type: 'boolean' },
97
- { name: '-proxy', type: 'json' }
97
+ { name: '-proxy', type: 'json' },
98
+ { name: '-proxySrc', type: '' }
98
99
  ];
99
100
 
100
101
  for (var i = 0; i < keys.length; i++) {
@@ -127,7 +128,11 @@ class Start {
127
128
  } else if (type == 'boolean') {
128
129
  value = value == 'false' || value == 0 ? false : true;
129
130
  } else if (type == 'json') {
131
+ value = value.replaceAll("'", '"');
130
132
  value = JSON.parse(value);
133
+ } else if (key == 'proxySrc') {
134
+ value = JSON.parse(File.readFileSync(value));
135
+ key = 'proxy';
131
136
  }
132
137
  config[key] = value;
133
138
  }