yakuza0 2.22.1-beta.3 → 2.22.1
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/cli/index.js +13 -4
- package/package.json +1 -1
- package/server/proxy/tire.js +23 -25
- package/utils/inclusive.js +1 -1
package/cli/index.js
CHANGED
|
@@ -207,7 +207,7 @@ var run = exports.run = function () {
|
|
|
207
207
|
env = _ref4.env,
|
|
208
208
|
mode = _ref4.mode;
|
|
209
209
|
|
|
210
|
-
var _ref6, apps;
|
|
210
|
+
var _ref6, apps, bin;
|
|
211
211
|
|
|
212
212
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
213
213
|
while (1) {
|
|
@@ -222,21 +222,30 @@ var run = exports.run = function () {
|
|
|
222
222
|
case 4:
|
|
223
223
|
_ref6 = _context2.sent;
|
|
224
224
|
apps = _ref6.apps;
|
|
225
|
+
bin = "yk-dev";
|
|
226
|
+
_context2.t0 = _os2.default.type();
|
|
227
|
+
_context2.next = _context2.t0 === "Linux" ? 10 : 12;
|
|
228
|
+
break;
|
|
229
|
+
|
|
230
|
+
case 10:
|
|
231
|
+
bin = "yk";
|
|
232
|
+
return _context2.abrupt('break', 12);
|
|
225
233
|
|
|
234
|
+
case 12:
|
|
226
235
|
|
|
227
236
|
if (mode === "async") {
|
|
228
237
|
apps.forEach(function (key) {
|
|
229
|
-
spawn(
|
|
238
|
+
spawn(bin, ['serve', key], { shell: true, stdio: 'inherit' });
|
|
230
239
|
});
|
|
231
240
|
} else {
|
|
232
241
|
// await _.asyncMap(apps, async (key) => {
|
|
233
242
|
// spawn(`yk-dev`, ['serve', key], { shell: true, stdio: 'inherit' });
|
|
234
243
|
// // spawnSync(`yk-dev`, ['serve', key], { shell: true, stdio: 'inherit' });
|
|
235
244
|
// })
|
|
236
|
-
spawn(
|
|
245
|
+
spawn(bin, ['serve', apps.join(',')], { shell: true, stdio: 'inherit' });
|
|
237
246
|
}
|
|
238
247
|
|
|
239
|
-
case
|
|
248
|
+
case 13:
|
|
240
249
|
case 'end':
|
|
241
250
|
return _context2.stop();
|
|
242
251
|
}
|
package/package.json
CHANGED
package/server/proxy/tire.js
CHANGED
|
@@ -84,7 +84,7 @@ exports.default = function () {
|
|
|
84
84
|
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(_ref) {
|
|
85
85
|
var config = _ref.config;
|
|
86
86
|
|
|
87
|
-
var appConf, appName, server, pIp, pHost, timeout, commonHeaders,
|
|
87
|
+
var appConf, appName, server, pIp, pHost, timeout, commonHeaders, getHeader, isFastDfs, apiVer, getUc, build, baseConfig, app, _headers;
|
|
88
88
|
|
|
89
89
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
90
90
|
while (1) {
|
|
@@ -98,25 +98,23 @@ exports.default = function () {
|
|
|
98
98
|
timeout = _config2.default.server.infoTimeout + 5000;
|
|
99
99
|
commonHeaders = {};
|
|
100
100
|
|
|
101
|
-
// health-check ssl use
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
appHc.listen(_config2.default.server.hcPort);
|
|
119
|
-
}
|
|
101
|
+
// // health-check ssl use
|
|
102
|
+
// if (yConf.inImage) {
|
|
103
|
+
// const appHc = express();
|
|
104
|
+
// appHc.use((req, res, next) => {
|
|
105
|
+
// const method = req.method.toUpperCase();
|
|
106
|
+
// const path = req.url;
|
|
107
|
+
// if (method === "GET" && path === '/sys/health-check') {
|
|
108
|
+
// res.status(200).send({
|
|
109
|
+
// response_status: 200,
|
|
110
|
+
// data: 'alive',
|
|
111
|
+
// });
|
|
112
|
+
// } else {
|
|
113
|
+
// res.status(404).send("The page was not found ~~")
|
|
114
|
+
// }
|
|
115
|
+
// })
|
|
116
|
+
// appHc.listen(yConf.server.hcPort);
|
|
117
|
+
// }
|
|
120
118
|
|
|
121
119
|
getHeader = function getHeader(req) {
|
|
122
120
|
if (req && req.headers) {
|
|
@@ -128,7 +126,7 @@ exports.default = function () {
|
|
|
128
126
|
};
|
|
129
127
|
|
|
130
128
|
if (!server.generate.enabled) {
|
|
131
|
-
_context3.next =
|
|
129
|
+
_context3.next = 26;
|
|
132
130
|
break;
|
|
133
131
|
}
|
|
134
132
|
|
|
@@ -248,14 +246,14 @@ exports.default = function () {
|
|
|
248
246
|
}();
|
|
249
247
|
|
|
250
248
|
if (_config2.default.security.isTire) {
|
|
251
|
-
_context3.next =
|
|
249
|
+
_context3.next = 16;
|
|
252
250
|
break;
|
|
253
251
|
}
|
|
254
252
|
|
|
255
|
-
_context3.next =
|
|
253
|
+
_context3.next = 16;
|
|
256
254
|
return build();
|
|
257
255
|
|
|
258
|
-
case
|
|
256
|
+
case 16:
|
|
259
257
|
baseConfig = {
|
|
260
258
|
// changeOrigin: true,
|
|
261
259
|
secure: false,
|
|
@@ -571,7 +569,7 @@ exports.default = function () {
|
|
|
571
569
|
}, server.generate.maxAge * 1000);
|
|
572
570
|
}
|
|
573
571
|
|
|
574
|
-
case
|
|
572
|
+
case 26:
|
|
575
573
|
case "end":
|
|
576
574
|
return _context3.stop();
|
|
577
575
|
}
|
package/utils/inclusive.js
CHANGED
|
@@ -277,7 +277,7 @@ var render = function () {
|
|
|
277
277
|
host: processEnv.HOST || '127.0.0.1',
|
|
278
278
|
port: processEnv.PORT || 3000,
|
|
279
279
|
appPort: processEnv.PORT || 3100,
|
|
280
|
-
hcPort: 81,
|
|
280
|
+
// hcPort: 81,
|
|
281
281
|
orbHost: processEnv.ORBHOST || 'fe-dev.inner.px.nfjbill.ren',
|
|
282
282
|
orbPort: processEnv.ORBPORT || 5601,
|
|
283
283
|
orbHosts: processEnv.ORBHOSTS,
|