@modern-js/monorepo-generator 1.2.2 → 1.2.3-rc.0

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.
@@ -28518,7 +28518,7 @@ module.exports.wrap = wrap;
28518
28518
  "use strict";
28519
28519
 
28520
28520
 
28521
- const fs = __webpack_require__(62204)
28521
+ const fs = __webpack_require__(19677)
28522
28522
  const path = __webpack_require__(71017)
28523
28523
  const mkdirsSync = (__webpack_require__(17433).mkdirsSync)
28524
28524
  const utimesMillisSync = (__webpack_require__(16333).utimesMillisSync)
@@ -28705,7 +28705,7 @@ module.exports = {
28705
28705
  "use strict";
28706
28706
 
28707
28707
 
28708
- const fs = __webpack_require__(62204)
28708
+ const fs = __webpack_require__(19677)
28709
28709
  const path = __webpack_require__(71017)
28710
28710
  const mkdirs = (__webpack_require__(17433).mkdirs)
28711
28711
  const pathExists = (__webpack_require__(84906).pathExists)
@@ -29008,7 +29008,7 @@ module.exports = {
29008
29008
 
29009
29009
  const u = (__webpack_require__(84357).fromCallback)
29010
29010
  const path = __webpack_require__(71017)
29011
- const fs = __webpack_require__(62204)
29011
+ const fs = __webpack_require__(19677)
29012
29012
  const mkdir = __webpack_require__(17433)
29013
29013
 
29014
29014
  function createFile (file, callback) {
@@ -29116,7 +29116,7 @@ module.exports = {
29116
29116
 
29117
29117
  const u = (__webpack_require__(84357).fromCallback)
29118
29118
  const path = __webpack_require__(71017)
29119
- const fs = __webpack_require__(62204)
29119
+ const fs = __webpack_require__(19677)
29120
29120
  const mkdir = __webpack_require__(17433)
29121
29121
  const pathExists = (__webpack_require__(84906).pathExists)
29122
29122
  const { areIdentical } = __webpack_require__(31197)
@@ -29187,7 +29187,7 @@ module.exports = {
29187
29187
 
29188
29188
 
29189
29189
  const path = __webpack_require__(71017)
29190
- const fs = __webpack_require__(62204)
29190
+ const fs = __webpack_require__(19677)
29191
29191
  const pathExists = (__webpack_require__(84906).pathExists)
29192
29192
 
29193
29193
  /**
@@ -29293,7 +29293,7 @@ module.exports = {
29293
29293
  "use strict";
29294
29294
 
29295
29295
 
29296
- const fs = __webpack_require__(62204)
29296
+ const fs = __webpack_require__(19677)
29297
29297
 
29298
29298
  function symlinkType (srcpath, type, callback) {
29299
29299
  callback = (typeof type === 'function') ? type : callback
@@ -29424,7 +29424,7 @@ module.exports = {
29424
29424
  // This is adapted from https://github.com/normalize/mz
29425
29425
  // Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
29426
29426
  const u = (__webpack_require__(84357).fromCallback)
29427
- const fs = __webpack_require__(62204)
29427
+ const fs = __webpack_require__(19677)
29428
29428
 
29429
29429
  const api = [
29430
29430
  'access',
@@ -29757,7 +29757,7 @@ module.exports = {
29757
29757
  "use strict";
29758
29758
 
29759
29759
 
29760
- const fs = __webpack_require__(62204)
29760
+ const fs = __webpack_require__(19677)
29761
29761
  const path = __webpack_require__(71017)
29762
29762
  const copySync = (__webpack_require__(55391).copySync)
29763
29763
  const removeSync = (__webpack_require__(13490).removeSync)
@@ -29833,7 +29833,7 @@ module.exports = {
29833
29833
  "use strict";
29834
29834
 
29835
29835
 
29836
- const fs = __webpack_require__(62204)
29836
+ const fs = __webpack_require__(19677)
29837
29837
  const path = __webpack_require__(71017)
29838
29838
  const copy = (__webpack_require__(97969).copy)
29839
29839
  const remove = (__webpack_require__(13490).remove)
@@ -29915,7 +29915,7 @@ module.exports = move
29915
29915
 
29916
29916
 
29917
29917
  const u = (__webpack_require__(84357).fromCallback)
29918
- const fs = __webpack_require__(62204)
29918
+ const fs = __webpack_require__(19677)
29919
29919
  const path = __webpack_require__(71017)
29920
29920
  const mkdir = __webpack_require__(17433)
29921
29921
  const pathExists = (__webpack_require__(84906).pathExists)
@@ -29982,7 +29982,7 @@ module.exports = {
29982
29982
  "use strict";
29983
29983
 
29984
29984
 
29985
- const fs = __webpack_require__(62204)
29985
+ const fs = __webpack_require__(19677)
29986
29986
  const u = (__webpack_require__(84357).fromCallback)
29987
29987
  const rimraf = __webpack_require__(94392)
29988
29988
 
@@ -30012,7 +30012,7 @@ module.exports = {
30012
30012
  "use strict";
30013
30013
 
30014
30014
 
30015
- const fs = __webpack_require__(62204)
30015
+ const fs = __webpack_require__(19677)
30016
30016
  const path = __webpack_require__(71017)
30017
30017
  const assert = __webpack_require__(39491)
30018
30018
 
@@ -30484,7 +30484,7 @@ module.exports = {
30484
30484
  "use strict";
30485
30485
 
30486
30486
 
30487
- const fs = __webpack_require__(62204)
30487
+ const fs = __webpack_require__(19677)
30488
30488
 
30489
30489
  function utimesMillis (path, atime, mtime, callback) {
30490
30490
  // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
@@ -35935,7 +35935,7 @@ exports["default"] = (message) => {
35935
35935
 
35936
35936
  /***/ }),
35937
35937
 
35938
- /***/ 50695:
35938
+ /***/ 83584:
35939
35939
  /***/ ((module) => {
35940
35940
 
35941
35941
  "use strict";
@@ -35966,13 +35966,13 @@ function clone (obj) {
35966
35966
 
35967
35967
  /***/ }),
35968
35968
 
35969
- /***/ 62204:
35969
+ /***/ 19677:
35970
35970
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
35971
35971
 
35972
35972
  var fs = __webpack_require__(57147)
35973
- var polyfills = __webpack_require__(79874)
35974
- var legacy = __webpack_require__(31563)
35975
- var clone = __webpack_require__(50695)
35973
+ var polyfills = __webpack_require__(18187)
35974
+ var legacy = __webpack_require__(15601)
35975
+ var clone = __webpack_require__(83584)
35976
35976
 
35977
35977
  var util = __webpack_require__(73837)
35978
35978
 
@@ -36402,7 +36402,7 @@ function retry () {
36402
36402
 
36403
36403
  /***/ }),
36404
36404
 
36405
- /***/ 31563:
36405
+ /***/ 15601:
36406
36406
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
36407
36407
 
36408
36408
  var Stream = (__webpack_require__(12781).Stream)
@@ -36527,7 +36527,7 @@ function legacy (fs) {
36527
36527
 
36528
36528
  /***/ }),
36529
36529
 
36530
- /***/ 79874:
36530
+ /***/ 18187:
36531
36531
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
36532
36532
 
36533
36533
  var constants = __webpack_require__(22057)
@@ -36842,8 +36842,10 @@ function patch (fs) {
36842
36842
  return function (target, options) {
36843
36843
  var stats = options ? orig.call(fs, target, options)
36844
36844
  : orig.call(fs, target)
36845
- if (stats.uid < 0) stats.uid += 0x100000000
36846
- if (stats.gid < 0) stats.gid += 0x100000000
36845
+ if (stats) {
36846
+ if (stats.uid < 0) stats.uid += 0x100000000
36847
+ if (stats.gid < 0) stats.gid += 0x100000000
36848
+ }
36847
36849
  return stats;
36848
36850
  }
36849
36851
  }
@@ -51061,7 +51063,7 @@ exports.parse = function (s) {
51061
51063
 
51062
51064
  let _fs
51063
51065
  try {
51064
- _fs = __webpack_require__(62204)
51066
+ _fs = __webpack_require__(19677)
51065
51067
  } catch (_) {
51066
51068
  _fs = __webpack_require__(57147)
51067
51069
  }
@@ -64062,7 +64064,7 @@ Object.defineProperty(Duplex.prototype, 'destroyed', {
64062
64064
 
64063
64065
  module.exports = PassThrough;
64064
64066
 
64065
- var Transform = __webpack_require__(65977);
64067
+ var Transform = __webpack_require__(31563);
64066
64068
 
64067
64069
  __webpack_require__(57337)(PassThrough, Transform);
64068
64070
 
@@ -65208,7 +65210,7 @@ function indexOf(xs, x) {
65208
65210
 
65209
65211
  /***/ }),
65210
65212
 
65211
- /***/ 65977:
65213
+ /***/ 31563:
65212
65214
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
65213
65215
 
65214
65216
  "use strict";
@@ -67005,7 +67007,7 @@ if (process.env.READABLE_STREAM === 'disable' && Stream) {
67005
67007
  exports.Readable = exports;
67006
67008
  exports.Writable = __webpack_require__(72437);
67007
67009
  exports.Duplex = __webpack_require__(91008);
67008
- exports.Transform = __webpack_require__(65977);
67010
+ exports.Transform = __webpack_require__(31563);
67009
67011
  exports.PassThrough = __webpack_require__(61417);
67010
67012
  exports.finished = __webpack_require__(97648);
67011
67013
  exports.pipeline = __webpack_require__(20721);
@@ -90684,10 +90686,18 @@ class I18n {
90684
90686
  }
90685
90687
 
90686
90688
  getMessage(lang, key, vars, fallbackText) {
90687
- const model = this.languageMap[lang];
90689
+ // 判断语言当前语料库是否存在,不存在使用 en 作为默认语言
90690
+ const languages = Object.keys(this.languageMap);
90691
+ const resultLang = languages.find(l => l === lang);
90692
+
90693
+ if (!resultLang && languages.length === 0) {
90694
+ return fallbackText || key;
90695
+ }
90696
+
90697
+ const model = this.languageMap[resultLang || 'en' || 0];
90688
90698
 
90689
90699
  if (!model) {
90690
- throw new Error(`current ${lang} language is not exisit`);
90700
+ return fallbackText || key;
90691
90701
  }
90692
90702
 
90693
90703
  const message = (0, _get2.default)(model, key);
@@ -91295,7 +91305,7 @@ const SubSolutionSchema = {
91295
91305
  if (data.solution && data.solution !== 'custom') {
91296
91306
  items.push({
91297
91307
  key: data.solution,
91298
- label: `${SolutionText[data.solution]()}(${_locale.i18n.t(_locale.localeKeys.solution.default)})`
91308
+ label: `${SubSolutionText[data.solution]()}(${_locale.i18n.t(_locale.localeKeys.solution.default)})`
91299
91309
  });
91300
91310
  }
91301
91311
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.2",
14
+ "version": "1.2.3-rc.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/js/node/main.js",
17
17
  "files": [
@@ -20,16 +20,16 @@
20
20
  ],
21
21
  "devDependencies": {
22
22
  "@babel/runtime": "^7",
23
- "@modern-js/base-generator": "^1.2.2",
24
- "@modern-js/changeset-generator": "^1.1.5",
23
+ "@modern-js/base-generator": "^1.2.3-rc.0",
24
+ "@modern-js/changeset-generator": "^1.1.6-rc.0",
25
25
  "@modern-js/codesmith": "^1.0.7",
26
26
  "@modern-js/codesmith-api-app": "^1.0.7",
27
27
  "@modern-js/codesmith-tools": "^1.0.8",
28
28
  "@modern-js/codesmith-api-json": "^1.0.7",
29
- "@modern-js/generator-common": "^1.2.1",
30
- "@modern-js/generator-utils": "^1.1.1",
31
- "@modern-js/module-tools": "^1.1.3",
32
- "@modern-js/plugin-testing": "^1.2.1",
29
+ "@modern-js/generator-common": "^1.2.3-rc.0",
30
+ "@modern-js/generator-utils": "^1.1.2-rc.0",
31
+ "@modern-js/module-tools": "^1.1.4",
32
+ "@modern-js/plugin-testing": "^1.2.2",
33
33
  "@types/jest": "^26",
34
34
  "@types/node": "^14",
35
35
  "typescript": "^4"