yakuza0 2.20.9 → 2.20.12
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/nuxt/style.js +1 -1
- package/package.json +7 -2
- package/server/proxy/web.js +25 -2
- package/utils/inclusive.js +4 -2
package/nuxt/style.js
CHANGED
|
@@ -37,7 +37,7 @@ exports.default = function (config) {
|
|
|
37
37
|
|
|
38
38
|
config.buildModules = ['@rdc/nuxtjs-style-resources'];
|
|
39
39
|
|
|
40
|
-
console.warn =
|
|
40
|
+
// console.warn = () => {};
|
|
41
41
|
if (stylelint.enabled) {
|
|
42
42
|
var sm = ['yakuza0/nuxt/buildModules/stylelint', stylelint.options];
|
|
43
43
|
config.buildModules.push(sm);
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yakuza0",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.12",
|
|
4
4
|
"description": "yakuza0 with nuxt",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "babel --no-babelrc src -d . --presets=env --plugins=transform-runtime,transform-object-rest-spread,add-module-exports",
|
|
8
|
-
"pub:beta": "npm run build && npm version prerelease --preid=beta &&
|
|
8
|
+
"pub:beta": "npm run build && npm version prerelease --preid=beta && pxnpm publish --tag beta",
|
|
9
9
|
"pub": "npm run build && npm version patch && npm publish",
|
|
10
10
|
"postinstall": "yk verify commit-init",
|
|
11
11
|
"test": "jest"
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"compression": "^1.7.4",
|
|
49
49
|
"consola": "^2.10.1",
|
|
50
50
|
"core-js": "3.10.1",
|
|
51
|
+
"css-loader": "^5.2.7",
|
|
51
52
|
"download": "^7.1.0",
|
|
52
53
|
"eslint": "^7.2.0",
|
|
53
54
|
"eslint-friendly-formatter": "^3.0.0",
|
|
@@ -75,6 +76,10 @@
|
|
|
75
76
|
"node-ssh": "5",
|
|
76
77
|
"path-match": "^1.2.4",
|
|
77
78
|
"pm2": "^4.2.0",
|
|
79
|
+
"postcss": "^8.4.5",
|
|
80
|
+
"postcss-import": "^13.0.0",
|
|
81
|
+
"postcss-loader": "^4.3.0",
|
|
82
|
+
"postcss-url": "^10.1.3",
|
|
78
83
|
"react-dev-utils": "^11.0.4",
|
|
79
84
|
"require-from-string": "^2.0.2",
|
|
80
85
|
"rimraf": "^2.6.3",
|
package/server/proxy/web.js
CHANGED
|
@@ -4,6 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
+
var _keys = require('babel-runtime/core-js/object/keys');
|
|
8
|
+
|
|
9
|
+
var _keys2 = _interopRequireDefault(_keys);
|
|
10
|
+
|
|
7
11
|
var _regenerator = require('babel-runtime/regenerator');
|
|
8
12
|
|
|
9
13
|
var _regenerator2 = _interopRequireDefault(_regenerator);
|
|
@@ -101,7 +105,7 @@ exports.default = function () {
|
|
|
101
105
|
proxyConf = _ref.proxyConf,
|
|
102
106
|
nuxt = _ref.nuxt,
|
|
103
107
|
config = _ref.config;
|
|
104
|
-
var pKey, servers;
|
|
108
|
+
var pKey, servers, wsProxyKeys;
|
|
105
109
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
106
110
|
while (1) {
|
|
107
111
|
switch (_context3.prev = _context3.next) {
|
|
@@ -240,6 +244,10 @@ exports.default = function () {
|
|
|
240
244
|
}
|
|
241
245
|
});
|
|
242
246
|
|
|
247
|
+
if (_config2.default.security.isStupid) {
|
|
248
|
+
proxyReq.setHeader(_def.variable.adjoinIpHeader, (0, _server.getClientIP)(req, { stupid: true }));
|
|
249
|
+
}
|
|
250
|
+
|
|
243
251
|
// const keys = Object.keys(yConf.proxyServer.proxy).join('|')
|
|
244
252
|
// if (req.crossParams.originUrl.match(new RegExp(`^\/(${keys})\/`))) {
|
|
245
253
|
// _.forEach(yConf.proxyServer.proxyHeaders, dt => {
|
|
@@ -323,6 +331,8 @@ exports.default = function () {
|
|
|
323
331
|
}, getCert()), app.callback()).listen(config.appConf.appPort));
|
|
324
332
|
}
|
|
325
333
|
|
|
334
|
+
wsProxyKeys = (0, _keys2.default)(_config2.default.proxyServer.ws.proxy);
|
|
335
|
+
|
|
326
336
|
servers.forEach(function (ser) {
|
|
327
337
|
ser.on('upgrade', function (req, socket, head) {
|
|
328
338
|
if (_config2.default.server.om.enabled && _server.global.__cpm__ && (0, _om.isOmOpen)(req)) {
|
|
@@ -349,13 +359,26 @@ exports.default = function () {
|
|
|
349
359
|
headers: headers
|
|
350
360
|
}, defProxyOpt));
|
|
351
361
|
}
|
|
362
|
+
|
|
363
|
+
var wsProxyKey = '';
|
|
364
|
+
wsProxyKeys.forEach(function (key) {
|
|
365
|
+
if (req.url.indexOf(key) !== -1) {
|
|
366
|
+
wsProxyKey = key;
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
if (wsProxyKey && wsProxyKey.startsWith(_config2.default.proxyServer.ws.prefix)) {
|
|
370
|
+
req.url = req.url.replace('/' + wsProxyKey, '');
|
|
371
|
+
_mid.proxy.ws(req, socket, head, (0, _extends3.default)({
|
|
372
|
+
target: _config2.default.proxyServer.ws.proxy[wsProxyKey]
|
|
373
|
+
}, defProxyOpt));
|
|
374
|
+
}
|
|
352
375
|
}
|
|
353
376
|
|
|
354
377
|
socket.on('error', function (err) {});
|
|
355
378
|
});
|
|
356
379
|
});
|
|
357
380
|
|
|
358
|
-
case
|
|
381
|
+
case 8:
|
|
359
382
|
case 'end':
|
|
360
383
|
return _context3.stop();
|
|
361
384
|
}
|
package/utils/inclusive.js
CHANGED
|
@@ -466,7 +466,7 @@ var render = function () {
|
|
|
466
466
|
enabled: false,
|
|
467
467
|
eslint: {
|
|
468
468
|
enabled: true,
|
|
469
|
-
test: ['vue'
|
|
469
|
+
test: ['vue'],
|
|
470
470
|
include: [],
|
|
471
471
|
exclude: [],
|
|
472
472
|
autoFixes: false,
|
|
@@ -495,7 +495,9 @@ var render = function () {
|
|
|
495
495
|
baseUrl: {},
|
|
496
496
|
lp: false,
|
|
497
497
|
ws: {
|
|
498
|
-
key: 'api-ws'
|
|
498
|
+
key: 'api-ws',
|
|
499
|
+
prefix: 'proxy-ws-',
|
|
500
|
+
proxy: {}
|
|
499
501
|
},
|
|
500
502
|
app: {},
|
|
501
503
|
// ...(mainConf && mainConf.proxyServer ? mainConf.proxyServer : {}),
|