yakuza0 2.21.1-beta.2 → 2.21.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 CHANGED
@@ -87,13 +87,14 @@ var gi = function () {
87
87
  var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee() {
88
88
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
89
89
 
90
- var app, ykServerEnv, enabledAll, appsNoneExit, apps, _ref2, conf;
90
+ var app, dkyMode, ykServerEnv, enabledAll, appsNoneExit, apps, _ref2, conf;
91
91
 
92
92
  return _regenerator2.default.wrap(function _callee$(_context) {
93
93
  while (1) {
94
94
  switch (_context.prev = _context.next) {
95
95
  case 0:
96
96
  app = options.app || process.env.npm_config_yk0_build_app || process.env.npm_config_y0ba;
97
+ dkyMode = process.env.NODE_ENV === 'development' ? 'dev' : 'normal';
97
98
  ykServerEnv = process.env.YK_SERVER_ENV || options.ykServerEnv || 'local';
98
99
  enabledAll = process.env.YK_MACHINE_TYPE === 'workstation';
99
100
  appsNoneExit = typeof options.appsNoneExit === 'boolean' ? options.appsNoneExit : true;
@@ -116,15 +117,16 @@ var gi = function () {
116
117
  _rimraf2.default.sync(p);
117
118
  });
118
119
 
119
- _context.next = 10;
120
+ _context.next = 11;
120
121
  return (0, _inclusive2.default)({
121
122
  apps: apps,
122
123
  enabledAll: enabledAll,
123
124
  ykServerEnv: ykServerEnv,
124
- pkg: _package2.default
125
+ pkg: _package2.default,
126
+ dkyMode: dkyMode
125
127
  });
126
128
 
127
- case 10:
129
+ case 11:
128
130
  _ref2 = _context.sent;
129
131
  conf = _ref2.conf;
130
132
 
@@ -136,7 +138,8 @@ var gi = function () {
136
138
  apps: apps,
137
139
  enabledAll: enabledAll,
138
140
  ykServerEnv: ykServerEnv,
139
- pkg: _package2.default
141
+ pkg: _package2.default,
142
+ dkyMode: 'dev'
140
143
  }).then();
141
144
  }, { event: "change" });
142
145
  }
@@ -155,7 +158,7 @@ var gi = function () {
155
158
  }
156
159
  return _context.abrupt('return', { conf: conf, apps: apps });
157
160
 
158
- case 16:
161
+ case 17:
159
162
  case 'end':
160
163
  return _context.stop();
161
164
  }
package/nuxt/style.js CHANGED
@@ -37,7 +37,8 @@ exports.default = function (config) {
37
37
 
38
38
  config.buildModules = ['@rdc/nuxtjs-style-resources'];
39
39
 
40
- // console.warn = () => {};
40
+ // postcss
41
+ console.warn = function () {};
41
42
  if (stylelint.enabled) {
42
43
  var sm = ['yakuza0/nuxt/buildModules/stylelint', stylelint.options];
43
44
  config.buildModules.push(sm);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.21.1-beta.2",
3
+ "version": "2.21.1",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -185,7 +185,8 @@ var render = function () {
185
185
  var apps = _ref.apps,
186
186
  enabledAll = _ref.enabledAll,
187
187
  ykServerEnv = _ref.ykServerEnv,
188
- ykPkg = _ref.pkg;
188
+ ykPkg = _ref.pkg,
189
+ dkyMode = _ref.dkyMode;
189
190
 
190
191
  var _ykConfig, ykConf, processEnv, aliasDir, conf, cspLoop, setConfValue, setConfCSP, setConf, hostname, port, ykServer, orbAddr, directives, tip;
191
192
 
@@ -202,7 +203,7 @@ var render = function () {
202
203
  ak: 'ak_TjfAV7I',
203
204
  name: pkg.name,
204
205
  group: '',
205
- dev: processEnv.NODE_ENV === 'development',
206
+ dev: dkyMode === 'dev',
206
207
  cmd: process.env.NODE_CMD,
207
208
  processKey: '.' + (0, _yakuza.md5)(appDirectory).substring(2, 18),
208
209
  imageKey: (0, _yakuza.md5)((processEnv.YK_DOCKERNAME || '').toString()),
@@ -214,7 +215,7 @@ var render = function () {
214
215
  fe: 'none',
215
216
  standAlone: false,
216
217
  mode: 'ssr',
217
- dkyMode: "dev",
218
+ dkyMode: dkyMode || "normal",
218
219
  backgroundTest: false,
219
220
  https: false,
220
221
  variable: _def.variable,
@@ -689,7 +690,7 @@ var render = function () {
689
690
  });
690
691
 
691
692
  _context2.t0 = conf.dkyMode;
692
- _context2.next = _context2.t0 === "dev" ? 16 : _context2.t0 === "prod" ? 18 : _context2.t0 === "stupid" ? 23 : _context2.t0 === "tire" ? 30 : 35;
693
+ _context2.next = _context2.t0 === "dev" ? 16 : _context2.t0 === "normal" ? 19 : _context2.t0 === "prod" ? 22 : _context2.t0 === "stupid" ? 28 : _context2.t0 === "tire" ? 36 : 42;
693
694
  break;
694
695
 
695
696
  case 16:
@@ -698,17 +699,28 @@ var render = function () {
698
699
  // conf.security.helmet = true;
699
700
  // conf.server.f5Offline = false;
700
701
  conf.security.isDev = true;
701
- return _context2.abrupt('break', 35);
702
+ conf.dev = true;
703
+ return _context2.abrupt('break', 42);
702
704
 
703
- case 18:
705
+ case 19:
706
+ // conf.security.encrypt = "none";
707
+ // conf.security.stupid = false;
708
+ // conf.security.helmet = true;
709
+ // conf.server.f5Offline = false;
710
+ conf.security.isNormal = true;
711
+ conf.dev = false;
712
+ return _context2.abrupt('break', 42);
713
+
714
+ case 22:
704
715
  conf.security.encrypt = "sm";
705
716
  conf.security.stupid = false;
706
717
  conf.security.helmet = true;
707
718
  // conf.server.f5Offline = false;
708
719
  conf.security.isProd = true;
709
- return _context2.abrupt('break', 35);
720
+ conf.dev = false;
721
+ return _context2.abrupt('break', 42);
710
722
 
711
- case 23:
723
+ case 28:
712
724
  conf.security.encrypt = "sm";
713
725
  conf.security.stupid = true;
714
726
  conf.security.helmet = true;
@@ -716,17 +728,19 @@ var render = function () {
716
728
  conf.security.isStupid = true;
717
729
  conf.server.csp.enabled = true;
718
730
  conf.server.sri.enabled = true;
719
- return _context2.abrupt('break', 35);
731
+ conf.dev = false;
732
+ return _context2.abrupt('break', 42);
720
733
 
721
- case 30:
734
+ case 36:
722
735
  conf.security.encrypt = "none";
723
736
  conf.security.stupid = false;
724
737
  conf.security.helmet = false;
725
738
  // conf.server.f5Offline = false;
726
739
  conf.security.isTire = true;
727
- return _context2.abrupt('break', 35);
740
+ conf.dev = false;
741
+ return _context2.abrupt('break', 42);
728
742
 
729
- case 35:
743
+ case 42:
730
744
 
731
745
  // conf.router.config['app.examples'].enabled = true;
732
746
  if (conf.server.yk4Addr) {
@@ -826,7 +840,7 @@ var render = function () {
826
840
  conf.server.csp.directives = directives;
827
841
 
828
842
  // const appPortUsed = [];
829
- _context2.next = 56;
843
+ _context2.next = 63;
830
844
  return _yakuza._.asyncMap(conf.router.config, function () {
831
845
  var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(v, key) {
832
846
  var name, arr, length, num;
@@ -1008,7 +1022,7 @@ var render = function () {
1008
1022
  };
1009
1023
  }());
1010
1024
 
1011
- case 56:
1025
+ case 63:
1012
1026
  // console.log(conf.router.config);
1013
1027
 
1014
1028
  conf.shareRule.app = conf.shareRule.app.map(function (ap) {
@@ -1108,7 +1122,7 @@ var render = function () {
1108
1122
 
1109
1123
  return _context2.abrupt('return', { conf: conf });
1110
1124
 
1111
- case 63:
1125
+ case 70:
1112
1126
  case 'end':
1113
1127
  return _context2.stop();
1114
1128
  }