yakuza0 2.20.4 → 2.20.8
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 +19 -10
- package/nuxt/build/index.js +4 -0
- package/nuxt/buildModules/logger.js +5 -0
- package/nuxt/buildModules/stylelint.js +57 -0
- package/nuxt/buildModules/utils.js +13 -0
- package/nuxt/store/index.js +7 -0
- package/nuxt/store/init.js +27 -0
- package/nuxt/style.js +13 -0
- package/package.json +16 -6
- package/server/proxy/csrf.js +146 -101
- package/server/proxy/tire.js +41 -18
- package/template/yk.plugin.js +1 -0
- package/utils/console.js +22 -12
- package/utils/gray.js +1 -1
- package/utils/inclusive.js +34 -17
- package/utils/secret.js +21 -3
- package/utils/verify.js +77 -2
package/cli/index.js
CHANGED
|
@@ -433,9 +433,10 @@ var run = exports.run = function () {
|
|
|
433
433
|
}, _callee9, undefined);
|
|
434
434
|
})));
|
|
435
435
|
|
|
436
|
-
_commander2.default.command('verify <cmd>').option('-
|
|
436
|
+
_commander2.default.command('verify <cmd>').option('-ed, --edit <envName>', 'commit file').option('-m, --msg <msg>', 'commit msg').option('-y0ba, --yk0-build-app <appName>', 'Building a specified application').option('-e, --env <envName>', 'yk server env').description('husky').action(function () {
|
|
437
437
|
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(cmd, _ref16) {
|
|
438
438
|
var edit = _ref16.edit,
|
|
439
|
+
msg = _ref16.msg,
|
|
439
440
|
yk0BuildApp = _ref16.yk0BuildApp,
|
|
440
441
|
env = _ref16.env;
|
|
441
442
|
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
@@ -452,7 +453,7 @@ var run = exports.run = function () {
|
|
|
452
453
|
|
|
453
454
|
case 3:
|
|
454
455
|
_context10.t0 = cmd;
|
|
455
|
-
_context10.next = _context10.t0 === "commit-init" ? 6 :
|
|
456
|
+
_context10.next = _context10.t0 === "commit-init" ? 6 : 9;
|
|
456
457
|
break;
|
|
457
458
|
|
|
458
459
|
case 6:
|
|
@@ -467,14 +468,12 @@ var run = exports.run = function () {
|
|
|
467
468
|
return (0, _verify.commitEsLint)({ edit: edit });
|
|
468
469
|
|
|
469
470
|
case 11:
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
case 12:
|
|
473
|
-
_context10.next = 14;
|
|
474
|
-
return (0, _verify.commitMsg)({ edit: edit });
|
|
471
|
+
_context10.next = 13;
|
|
472
|
+
return (0, _verify.commitStyleLint)({ edit: edit });
|
|
475
473
|
|
|
476
|
-
case
|
|
477
|
-
|
|
474
|
+
case 13:
|
|
475
|
+
_context10.next = 15;
|
|
476
|
+
return (0, _verify.commitMsg)({ edit: msg });
|
|
478
477
|
|
|
479
478
|
case 15:
|
|
480
479
|
case 'end':
|
|
@@ -487,7 +486,17 @@ var run = exports.run = function () {
|
|
|
487
486
|
return function (_x10, _x11) {
|
|
488
487
|
return _ref17.apply(this, arguments);
|
|
489
488
|
};
|
|
490
|
-
}()
|
|
489
|
+
}()
|
|
490
|
+
// case "commit-eslint":
|
|
491
|
+
// await commitEsLint({edit});
|
|
492
|
+
// break;
|
|
493
|
+
// case "commit-stylelint":
|
|
494
|
+
// await commitStyleLint({edit});
|
|
495
|
+
// break;
|
|
496
|
+
// case "commit-msg":
|
|
497
|
+
// await commitMsg({edit});
|
|
498
|
+
// break;
|
|
499
|
+
);
|
|
491
500
|
|
|
492
501
|
_commander2.default.command('server <cmd>').alias('s').option('-y0ba, --yk0-build-app <appName>', 'Building a specified application').option('-e, --env <envName>', 'yk server env').description('service control').action(function () {
|
|
493
502
|
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(cmd, _ref18) {
|
package/nuxt/build/index.js
CHANGED
|
@@ -186,6 +186,10 @@ exports.default = function (config) {
|
|
|
186
186
|
// console.log(p.constructor.name);
|
|
187
187
|
// });
|
|
188
188
|
// }
|
|
189
|
+
|
|
190
|
+
if (ctx.loaders && ctx.loaders.scss) {
|
|
191
|
+
ctx.loaders.scss.additionalData = '@use "sass:math";\n@use "sass:color";\n@use "sass:list";\n@use "sass:map";\n@use "sass:meta";\n@use "sass:selector";\n@use "sass:string";\n';
|
|
192
|
+
}
|
|
189
193
|
};
|
|
190
194
|
|
|
191
195
|
// config.build.vendor = ['babel-polyfill'];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
|
4
|
+
|
|
5
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
|
6
|
+
|
|
7
|
+
var _paths = require('../../config/paths');
|
|
8
|
+
|
|
9
|
+
var _paths2 = _interopRequireDefault(_paths);
|
|
10
|
+
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
|
|
13
|
+
// const { resolve } = require('path')
|
|
14
|
+
var _require = require('./utils'),
|
|
15
|
+
moduleExists = _require.moduleExists;
|
|
16
|
+
|
|
17
|
+
var logger = require('./logger');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
module.exports = function (moduleOptions) {
|
|
21
|
+
if (!moduleExists('stylelint')) {
|
|
22
|
+
logger.warn('The dependency `stylelint` not found.', 'Please run `pxnpm install stylelint --save-dev` or `npm install stylelint --save-dev`');
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var options = (0, _extends3.default)({
|
|
27
|
+
context: this.options.srcDir,
|
|
28
|
+
// configFile: paths.appDirectory + paths.sep + ".stylelintrc.js",
|
|
29
|
+
files: [this.options.dir.assets + '/**/*.{s?(a|c)ss,less,stylus}', '{components,' + this.options.dir.layouts + ',' + this.options.dir.pages + '}/**/*.vue']
|
|
30
|
+
}, this.options.stylelint, moduleOptions);
|
|
31
|
+
|
|
32
|
+
var filesToWatch = ['.stylelintignore', '.stylelintrc', '.stylelintrc.json', '.stylelintrc.yaml', '.stylelintrc.yml', '.stylelintrc.js', 'stylelint.config.js'];
|
|
33
|
+
|
|
34
|
+
filesToWatch.forEach(function (p) {
|
|
35
|
+
var v = _paths2.default.appDirectory + _paths2.default.sep + p;
|
|
36
|
+
if (_paths2.default.access(v)) {
|
|
37
|
+
options.configFile = v;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// this.options.watch.push(
|
|
42
|
+
// ...filesToWatch.map(p => (paths.appDirectory + paths.sep + p))
|
|
43
|
+
// )
|
|
44
|
+
|
|
45
|
+
this.extendBuild(function (config, _ref) {
|
|
46
|
+
var isDev = _ref.isDev,
|
|
47
|
+
isClient = _ref.isClient;
|
|
48
|
+
|
|
49
|
+
if (isDev && isClient) {
|
|
50
|
+
var StylelintPlugin = require('stylelint-webpack-plugin');
|
|
51
|
+
|
|
52
|
+
config.plugins.push(new StylelintPlugin(options));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// module.exports.meta = require('../package.json')
|
package/nuxt/store/index.js
CHANGED
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
var _yakuza = require('yakuza1');
|
|
4
4
|
|
|
5
|
+
var _init = require('yakuza0/nuxt/store/init');
|
|
6
|
+
|
|
7
|
+
var ykInit = _interopRequireWildcard(_init);
|
|
8
|
+
|
|
9
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
10
|
+
|
|
5
11
|
var commonStore = require.context('$common.store/', true, /\.js$/);
|
|
6
12
|
var store = require.context('~/store/', true, /\.js$/);
|
|
7
13
|
|
|
8
14
|
var storeObj = {};
|
|
15
|
+
storeObj['__yk_init__'] = ykInit;
|
|
9
16
|
|
|
10
17
|
var errStateFile = [];
|
|
11
18
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var namespaced = exports.namespaced = true;
|
|
7
|
+
var state = exports.state = function state() {
|
|
8
|
+
return {
|
|
9
|
+
gu: {
|
|
10
|
+
group: '',
|
|
11
|
+
name: '',
|
|
12
|
+
ver: ''
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
var mutations = exports.mutations = {
|
|
17
|
+
SET_GU: function SET_GU(state, gu) {
|
|
18
|
+
state.gu = gu;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
var actions = exports.actions = {
|
|
22
|
+
setGU: function setGU(_ref, gu) {
|
|
23
|
+
var commit = _ref.commit;
|
|
24
|
+
|
|
25
|
+
commit('SET_GU', gu);
|
|
26
|
+
}
|
|
27
|
+
};
|
package/nuxt/style.js
CHANGED
|
@@ -26,10 +26,23 @@ var _config = require('../config');
|
|
|
26
26
|
|
|
27
27
|
var _config2 = _interopRequireDefault(_config);
|
|
28
28
|
|
|
29
|
+
var _paths = require('../config/paths');
|
|
30
|
+
|
|
31
|
+
var _paths2 = _interopRequireDefault(_paths);
|
|
32
|
+
|
|
29
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
34
|
|
|
31
35
|
exports.default = function (config) {
|
|
36
|
+
var stylelint = _config2.default.extend.plugins.stylelint;
|
|
37
|
+
|
|
32
38
|
config.buildModules = ['@rdc/nuxtjs-style-resources'];
|
|
39
|
+
|
|
40
|
+
console.warn = function () {};
|
|
41
|
+
if (stylelint.enabled) {
|
|
42
|
+
var sm = ['yakuza0/nuxt/buildModules/stylelint', stylelint.options];
|
|
43
|
+
config.buildModules.push(sm);
|
|
44
|
+
}
|
|
45
|
+
|
|
33
46
|
var globalStyle = (0, _extends3.default)({
|
|
34
47
|
compile: [],
|
|
35
48
|
sass: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yakuza0",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.8",
|
|
4
4
|
"description": "yakuza0 with nuxt",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@commitlint/load": "^12.1.1",
|
|
28
28
|
"@commitlint/read": "^12.1.1",
|
|
29
29
|
"@nuxtjs/eslint-config": "^3.0.0",
|
|
30
|
-
"@nuxtjs/
|
|
30
|
+
"@nuxtjs/stylelint-module": "^4.0.0",
|
|
31
31
|
"@rdc/nuxt": "2.15.8-0",
|
|
32
32
|
"@rdc/nuxtjs-style-resources": "^1.0.0",
|
|
33
33
|
"address": "^1.0.3",
|
|
@@ -72,27 +72,37 @@
|
|
|
72
72
|
"less": "^3.10.3",
|
|
73
73
|
"less-loader": "^5.0.0",
|
|
74
74
|
"markdown-loader": "^6.0.0",
|
|
75
|
-
"node-sass": "^4.9.3",
|
|
76
75
|
"node-ssh": "5",
|
|
77
76
|
"path-match": "^1.2.4",
|
|
78
77
|
"pm2": "^4.2.0",
|
|
79
78
|
"react-dev-utils": "^11.0.4",
|
|
80
79
|
"require-from-string": "^2.0.2",
|
|
81
80
|
"rimraf": "^2.6.3",
|
|
82
|
-
"sass
|
|
81
|
+
"sass": "^1.43.4",
|
|
82
|
+
"sass-loader": "^10",
|
|
83
83
|
"semver": "^6.3.0",
|
|
84
84
|
"socket.io-client": "^2.2.0",
|
|
85
|
+
"stylelint": "^14.1.0",
|
|
86
|
+
"stylelint-config-prettier": "^9.0.3",
|
|
87
|
+
"stylelint-config-rational-order": "^0.1.2",
|
|
88
|
+
"stylelint-config-recommended-vue": "^1.0.0",
|
|
89
|
+
"stylelint-config-standard": "^24.0.0",
|
|
90
|
+
"stylelint-config-standard-scss": "^2.0.1",
|
|
91
|
+
"stylelint-declaration-block-no-ignored-properties": "^2.5.0",
|
|
92
|
+
"stylelint-order": "^5.0.0",
|
|
93
|
+
"stylelint-scss": "^4.0.0",
|
|
94
|
+
"stylelint-webpack-plugin": "^3.1.0",
|
|
85
95
|
"stylus": "^0.54.7",
|
|
86
96
|
"stylus-loader": "^3.0.2",
|
|
87
97
|
"tcp-port-used": "^1.0.1",
|
|
88
98
|
"ua-parser-js": "^0.7.20",
|
|
89
99
|
"v8-compile-cache": "^2.0.2",
|
|
90
|
-
"yakuza1": "2.6.
|
|
100
|
+
"yakuza1": "2.6.6"
|
|
91
101
|
},
|
|
92
102
|
"peerDependencies": {
|
|
93
103
|
"@rdc/nuxt": "2.15.8-0",
|
|
94
104
|
"core-js": "3.10.1",
|
|
95
105
|
"eslint": "7.2.0",
|
|
96
|
-
"yakuza1": "2.6.
|
|
106
|
+
"yakuza1": "2.6.6"
|
|
97
107
|
}
|
|
98
108
|
}
|