yakuza0 2.21.4 → 2.21.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils/inclusive.js +21 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yakuza0",
3
- "version": "2.21.4",
3
+ "version": "2.21.5",
4
4
  "description": "yakuza0 with nuxt",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -188,7 +188,7 @@ var render = function () {
188
188
  ykPkg = _ref.pkg,
189
189
  dkyModeDef = _ref.dkyModeDef;
190
190
 
191
- var _ykConfig, ykConf, processEnv, aliasDir, conf, cspLoop, setConfValue, setConfCSP, setConf, hostname, port, ykServer, orbAddr, directives, tip, serverConfStr;
191
+ var _ykConfig, ykConf, processEnv, imageKeyOrigin, aliasDir, conf, cspLoop, setConfValue, setConfCSP, setConf, hostname, port, ykServer, orbAddr, directives, tip, serverConfStr;
192
192
 
193
193
  return _regenerator2.default.wrap(function _callee2$(_context2) {
194
194
  while (1) {
@@ -197,6 +197,7 @@ var render = function () {
197
197
  // const mainConf = mainConfFn() || {};
198
198
  _ykConfig = ykConfig(pkg), ykConf = _ykConfig.ykconfig;
199
199
  processEnv = process && process.env || {};
200
+ imageKeyOrigin = (0, _yakuza.md5)((processEnv.YK_DOCKERNAME || '').toString());
200
201
  aliasDir = aliasFn();
201
202
  conf = {
202
203
  version: ykPkg.version,
@@ -206,7 +207,8 @@ var render = function () {
206
207
  dev: dkyModeDef === 'dev',
207
208
  cmd: process.env.NODE_CMD,
208
209
  processKey: '.' + (0, _yakuza.md5)(appDirectory).substring(2, 18),
209
- imageKey: (0, _yakuza.md5)((processEnv.YK_DOCKERNAME || '').toString()),
210
+ imageKeyOrigin: imageKeyOrigin,
211
+ imageKey: imageKeyOrigin,
210
212
  versionSha: (0, _yakuza.md5)((processEnv.YK_VERSIONSHA || new Date().getTime()).toString()),
211
213
  childKey: (0, _yakuza.md5)(appDirectory + pkg.name).substring(0, 6),
212
214
  scKey: '',
@@ -693,37 +695,37 @@ var render = function () {
693
695
  });
694
696
 
695
697
  _context2.t0 = conf.dkyMode;
696
- _context2.next = _context2.t0 === "dev" ? 16 : _context2.t0 === "normal" ? 19 : _context2.t0 === "prod" ? 22 : _context2.t0 === "stupid" ? 28 : _context2.t0 === "tire" ? 36 : 42;
698
+ _context2.next = _context2.t0 === "dev" ? 17 : _context2.t0 === "normal" ? 20 : _context2.t0 === "prod" ? 23 : _context2.t0 === "stupid" ? 29 : _context2.t0 === "tire" ? 37 : 43;
697
699
  break;
698
700
 
699
- case 16:
701
+ case 17:
700
702
  // conf.security.encrypt = "none";
701
703
  // conf.security.stupid = false;
702
704
  // conf.security.helmet = true;
703
705
  // conf.server.f5Offline = false;
704
706
  conf.security.isDev = true;
705
707
  conf.dev = true;
706
- return _context2.abrupt('break', 42);
708
+ return _context2.abrupt('break', 43);
707
709
 
708
- case 19:
710
+ case 20:
709
711
  // conf.security.encrypt = "none";
710
712
  // conf.security.stupid = false;
711
713
  // conf.security.helmet = true;
712
714
  // conf.server.f5Offline = false;
713
715
  conf.security.isNormal = true;
714
716
  conf.dev = false;
715
- return _context2.abrupt('break', 42);
717
+ return _context2.abrupt('break', 43);
716
718
 
717
- case 22:
719
+ case 23:
718
720
  conf.security.encrypt = "sm";
719
721
  conf.security.stupid = false;
720
722
  conf.security.helmet = true;
721
723
  // conf.server.f5Offline = false;
722
724
  conf.security.isProd = true;
723
725
  conf.dev = false;
724
- return _context2.abrupt('break', 42);
726
+ return _context2.abrupt('break', 43);
725
727
 
726
- case 28:
728
+ case 29:
727
729
  conf.security.encrypt = "sm";
728
730
  conf.security.stupid = true;
729
731
  conf.security.helmet = true;
@@ -732,18 +734,18 @@ var render = function () {
732
734
  conf.server.csp.enabled = true;
733
735
  conf.server.sri.enabled = true;
734
736
  conf.dev = false;
735
- return _context2.abrupt('break', 42);
737
+ return _context2.abrupt('break', 43);
736
738
 
737
- case 36:
739
+ case 37:
738
740
  conf.security.encrypt = "none";
739
741
  conf.security.stupid = false;
740
742
  conf.security.helmet = false;
741
743
  // conf.server.f5Offline = false;
742
744
  conf.security.isTire = true;
743
745
  conf.dev = false;
744
- return _context2.abrupt('break', 42);
746
+ return _context2.abrupt('break', 43);
745
747
 
746
- case 42:
748
+ case 43:
747
749
 
748
750
  // conf.router.config['app.examples'].enabled = true;
749
751
  if (conf.server.yk4Addr) {
@@ -843,7 +845,7 @@ var render = function () {
843
845
  conf.server.csp.directives = directives;
844
846
 
845
847
  // const appPortUsed = [];
846
- _context2.next = 63;
848
+ _context2.next = 64;
847
849
  return _yakuza._.asyncMap(conf.router.config, function () {
848
850
  var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(v, key) {
849
851
  var name, arr, length, num;
@@ -1025,7 +1027,7 @@ var render = function () {
1025
1027
  };
1026
1028
  }());
1027
1029
 
1028
- case 63:
1030
+ case 64:
1029
1031
  // console.log(conf.router.config);
1030
1032
 
1031
1033
  conf.shareRule.app = conf.shareRule.app.map(function (ap) {
@@ -1090,9 +1092,9 @@ var render = function () {
1090
1092
  if (v.enabled) {
1091
1093
  conf.proxyServer = v.proxyServer;
1092
1094
  conf.server = v.server;
1093
- var scKeyStr = confStr + conf.childKey;
1095
+ var scKeyStr = (0, _stringify2.default)(conf) + conf.childKey;
1094
1096
  if (conf.inImage) {
1095
- scKeyStr = k + conf.imageKey;
1097
+ scKeyStr = k + conf.imageKeyOrigin;
1096
1098
  }
1097
1099
  var scKey = (0, _yakuza.md5)(scKeyStr).substring(2, 8);
1098
1100
  conf.scKey = scKey;
@@ -1134,7 +1136,7 @@ var render = function () {
1134
1136
 
1135
1137
  return _context2.abrupt('return', { conf: conf });
1136
1138
 
1137
- case 73:
1139
+ case 74:
1138
1140
  case 'end':
1139
1141
  return _context2.stop();
1140
1142
  }