crabatool 1.0.437 → 1.0.440
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/lib/server.js +1 -1
- package/package.json +1 -1
- package/tool/checkgspx.js +12 -3
- package/tool/start.js +3 -1
package/lib/server.js
CHANGED
package/package.json
CHANGED
package/tool/checkgspx.js
CHANGED
|
@@ -143,15 +143,24 @@ function readGspxToJSON(fileName, data) {
|
|
|
143
143
|
return rootNode;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
function addBiz(bizList, bizName, fileName) {
|
|
146
|
+
function addBiz(bizList, bizName, fileName, check) {
|
|
147
147
|
if (!bizName) return;
|
|
148
|
+
|
|
148
149
|
try {
|
|
149
150
|
var s = bizName.replaceAll("'", '"');
|
|
150
151
|
var bizData = JSON.parse(s);
|
|
151
152
|
bizName = bizData.Name;
|
|
152
|
-
} catch (ex) {
|
|
153
|
+
} catch (ex) {
|
|
154
|
+
if (!check) {
|
|
155
|
+
if (bizName.trim().startsWith('{')) { // jxc.{'Name':'btypeNew','PassEvent':true,'bcategory':${bcategory},'btypetype':'nofreight'}
|
|
156
|
+
var s = bizName.split(',')[0];
|
|
157
|
+
s += '}';
|
|
158
|
+
return addBiz(bizList, bizName, fileName, true);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
153
162
|
|
|
154
|
-
if (bizName.indexOf('.') < 0) {
|
|
163
|
+
if (bizName.indexOf('.') < 0 && bizName.indexOf('$') < 0) {
|
|
155
164
|
bizName = config.modName + '.' + bizName;
|
|
156
165
|
}
|
|
157
166
|
if (!bizList[bizName]) {
|
package/tool/start.js
CHANGED
|
@@ -76,7 +76,7 @@ class Start {
|
|
|
76
76
|
initArgs() {
|
|
77
77
|
var keys = [
|
|
78
78
|
{ name: '-webPath', type: '' }, // 网站路径
|
|
79
|
-
{ name: '-port', type: '' }, // 网站端口
|
|
79
|
+
{ name: '-port', type: 'number' }, // 网站端口
|
|
80
80
|
{ name: '-modName', type: '' }, // ngp的服务、模块名称
|
|
81
81
|
{ name: '-virtualName', type: '' }, // 虚拟路径名
|
|
82
82
|
{ name: '-webhooks', type: '' }, // 检测报告推送的地址
|
|
@@ -151,6 +151,8 @@ class Start {
|
|
|
151
151
|
} else if (key == 'proxySrc') {
|
|
152
152
|
value = JSON.parse(File.readFileSync(value));
|
|
153
153
|
key = 'proxy';
|
|
154
|
+
} else if (type == 'number') {
|
|
155
|
+
value = Number(value);
|
|
154
156
|
}
|
|
155
157
|
// 特殊处理大小写问题
|
|
156
158
|
if (key == 'ignorecompress') {
|