@modern-js/dependence-generator 1.2.4 → 1.2.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/dist/js/node/main.js +105 -84
  2. package/package.json +2 -2
@@ -12391,7 +12391,7 @@ module.exports = {
12391
12391
  loadCountry: function loadCountry(usage, country, data) {
12392
12392
  var code = country.replace(/[^\w-]/g, '')
12393
12393
  if (!usage[code]) {
12394
- var compressed = __webpack_require__(20604)("./" + code + ".js")
12394
+ var compressed = __webpack_require__(3582)("./" + code + ".js")
12395
12395
  var usageData = region(compressed)
12396
12396
  normalizeUsageData(usageData, data)
12397
12397
  usage[country] = {}
@@ -12407,7 +12407,7 @@ module.exports = {
12407
12407
  name = name.replace(/[^\w-]/g, '')
12408
12408
  if (features[name]) return
12409
12409
 
12410
- var compressed = __webpack_require__(86099)("./" + name + ".js")
12410
+ var compressed = __webpack_require__(95197)("./" + name + ".js")
12411
12411
  var stats = feature(compressed).stats
12412
12412
  features[name] = {}
12413
12413
  for (var i in stats) {
@@ -12563,7 +12563,7 @@ module.exports = webpackEmptyContext;
12563
12563
 
12564
12564
  /***/ }),
12565
12565
 
12566
- /***/ 86099:
12566
+ /***/ 95197:
12567
12567
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
12568
12568
 
12569
12569
  var map = {
@@ -13138,11 +13138,11 @@ webpackContext.keys = function webpackContextKeys() {
13138
13138
  };
13139
13139
  webpackContext.resolve = webpackContextResolve;
13140
13140
  module.exports = webpackContext;
13141
- webpackContext.id = 86099;
13141
+ webpackContext.id = 95197;
13142
13142
 
13143
13143
  /***/ }),
13144
13144
 
13145
- /***/ 20604:
13145
+ /***/ 3582:
13146
13146
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
13147
13147
 
13148
13148
  var map = {
@@ -13407,7 +13407,7 @@ webpackContext.keys = function webpackContextKeys() {
13407
13407
  };
13408
13408
  webpackContext.resolve = webpackContextResolve;
13409
13409
  module.exports = webpackContext;
13410
- webpackContext.id = 20604;
13410
+ webpackContext.id = 3582;
13411
13411
 
13412
13412
  /***/ }),
13413
13413
 
@@ -47483,7 +47483,7 @@ exports["default"] = (message) => {
47483
47483
 
47484
47484
  /***/ }),
47485
47485
 
47486
- /***/ 50695:
47486
+ /***/ 89015:
47487
47487
  /***/ ((module) => {
47488
47488
 
47489
47489
  "use strict";
@@ -47514,13 +47514,13 @@ function clone (obj) {
47514
47514
 
47515
47515
  /***/ }),
47516
47516
 
47517
- /***/ 62204:
47517
+ /***/ 20109:
47518
47518
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
47519
47519
 
47520
47520
  var fs = __webpack_require__(57147)
47521
- var polyfills = __webpack_require__(79874)
47522
- var legacy = __webpack_require__(31563)
47523
- var clone = __webpack_require__(50695)
47521
+ var polyfills = __webpack_require__(82945)
47522
+ var legacy = __webpack_require__(25518)
47523
+ var clone = __webpack_require__(89015)
47524
47524
 
47525
47525
  var util = __webpack_require__(73837)
47526
47526
 
@@ -47710,16 +47710,35 @@ function patch (fs) {
47710
47710
 
47711
47711
  var fs$readdir = fs.readdir
47712
47712
  fs.readdir = readdir
47713
+ var noReaddirOptionVersions = /^v[0-5]\./
47713
47714
  function readdir (path, options, cb) {
47714
47715
  if (typeof options === 'function')
47715
47716
  cb = options, options = null
47716
47717
 
47718
+ var go$readdir = noReaddirOptionVersions.test(process.version)
47719
+ ? function go$readdir (path, options, cb, startTime) {
47720
+ return fs$readdir(path, fs$readdirCallback(
47721
+ path, options, cb, startTime
47722
+ ))
47723
+ }
47724
+ : function go$readdir (path, options, cb, startTime) {
47725
+ return fs$readdir(path, options, fs$readdirCallback(
47726
+ path, options, cb, startTime
47727
+ ))
47728
+ }
47729
+
47717
47730
  return go$readdir(path, options, cb)
47718
47731
 
47719
- function go$readdir (path, options, cb, startTime) {
47720
- return fs$readdir(path, options, function (err, files) {
47732
+ function fs$readdirCallback (path, options, cb, startTime) {
47733
+ return function (err, files) {
47721
47734
  if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
47722
- enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()])
47735
+ enqueue([
47736
+ go$readdir,
47737
+ [path, options, cb],
47738
+ err,
47739
+ startTime || Date.now(),
47740
+ Date.now()
47741
+ ])
47723
47742
  else {
47724
47743
  if (files && files.sort)
47725
47744
  files.sort()
@@ -47727,7 +47746,7 @@ function patch (fs) {
47727
47746
  if (typeof cb === 'function')
47728
47747
  cb.call(this, err, files)
47729
47748
  }
47730
- })
47749
+ }
47731
47750
  }
47732
47751
  }
47733
47752
 
@@ -47950,7 +47969,7 @@ function retry () {
47950
47969
 
47951
47970
  /***/ }),
47952
47971
 
47953
- /***/ 31563:
47972
+ /***/ 25518:
47954
47973
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
47955
47974
 
47956
47975
  var Stream = (__webpack_require__(12781).Stream)
@@ -48075,7 +48094,7 @@ function legacy (fs) {
48075
48094
 
48076
48095
  /***/ }),
48077
48096
 
48078
- /***/ 79874:
48097
+ /***/ 82945:
48079
48098
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
48080
48099
 
48081
48100
  var constants = __webpack_require__(22057)
@@ -48151,13 +48170,13 @@ function patch (fs) {
48151
48170
  fs.lstatSync = statFixSync(fs.lstatSync)
48152
48171
 
48153
48172
  // if lchmod/lchown do not exist, then make them no-ops
48154
- if (!fs.lchmod) {
48173
+ if (fs.chmod && !fs.lchmod) {
48155
48174
  fs.lchmod = function (path, mode, cb) {
48156
48175
  if (cb) process.nextTick(cb)
48157
48176
  }
48158
48177
  fs.lchmodSync = function () {}
48159
48178
  }
48160
- if (!fs.lchown) {
48179
+ if (fs.chown && !fs.lchown) {
48161
48180
  fs.lchown = function (path, uid, gid, cb) {
48162
48181
  if (cb) process.nextTick(cb)
48163
48182
  }
@@ -48174,32 +48193,38 @@ function patch (fs) {
48174
48193
  // CPU to a busy looping process, which can cause the program causing the lock
48175
48194
  // contention to be starved of CPU by node, so the contention doesn't resolve.
48176
48195
  if (platform === "win32") {
48177
- fs.rename = (function (fs$rename) { return function (from, to, cb) {
48178
- var start = Date.now()
48179
- var backoff = 0;
48180
- fs$rename(from, to, function CB (er) {
48181
- if (er
48182
- && (er.code === "EACCES" || er.code === "EPERM")
48183
- && Date.now() - start < 60000) {
48184
- setTimeout(function() {
48185
- fs.stat(to, function (stater, st) {
48186
- if (stater && stater.code === "ENOENT")
48187
- fs$rename(from, to, CB);
48188
- else
48189
- cb(er)
48190
- })
48191
- }, backoff)
48192
- if (backoff < 100)
48193
- backoff += 10;
48194
- return;
48195
- }
48196
- if (cb) cb(er)
48197
- })
48198
- }})(fs.rename)
48196
+ fs.rename = typeof fs.rename !== 'function' ? fs.rename
48197
+ : (function (fs$rename) {
48198
+ function rename (from, to, cb) {
48199
+ var start = Date.now()
48200
+ var backoff = 0;
48201
+ fs$rename(from, to, function CB (er) {
48202
+ if (er
48203
+ && (er.code === "EACCES" || er.code === "EPERM")
48204
+ && Date.now() - start < 60000) {
48205
+ setTimeout(function() {
48206
+ fs.stat(to, function (stater, st) {
48207
+ if (stater && stater.code === "ENOENT")
48208
+ fs$rename(from, to, CB);
48209
+ else
48210
+ cb(er)
48211
+ })
48212
+ }, backoff)
48213
+ if (backoff < 100)
48214
+ backoff += 10;
48215
+ return;
48216
+ }
48217
+ if (cb) cb(er)
48218
+ })
48219
+ }
48220
+ if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)
48221
+ return rename
48222
+ })(fs.rename)
48199
48223
  }
48200
48224
 
48201
48225
  // if read() returns EAGAIN, then just try it again.
48202
- fs.read = (function (fs$read) {
48226
+ fs.read = typeof fs.read !== 'function' ? fs.read
48227
+ : (function (fs$read) {
48203
48228
  function read (fd, buffer, offset, length, position, callback_) {
48204
48229
  var callback
48205
48230
  if (callback_ && typeof callback_ === 'function') {
@@ -48220,7 +48245,8 @@ function patch (fs) {
48220
48245
  return read
48221
48246
  })(fs.read)
48222
48247
 
48223
- fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
48248
+ fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync
48249
+ : (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
48224
48250
  var eagCounter = 0
48225
48251
  while (true) {
48226
48252
  try {
@@ -48279,7 +48305,7 @@ function patch (fs) {
48279
48305
  }
48280
48306
 
48281
48307
  function patchLutimes (fs) {
48282
- if (constants.hasOwnProperty("O_SYMLINK")) {
48308
+ if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) {
48283
48309
  fs.lutimes = function (path, at, mt, cb) {
48284
48310
  fs.open(path, constants.O_SYMLINK, function (er, fd) {
48285
48311
  if (er) {
@@ -48313,7 +48339,7 @@ function patch (fs) {
48313
48339
  return ret
48314
48340
  }
48315
48341
 
48316
- } else {
48342
+ } else if (fs.futimes) {
48317
48343
  fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
48318
48344
  fs.lutimesSync = function () {}
48319
48345
  }
@@ -48390,8 +48416,10 @@ function patch (fs) {
48390
48416
  return function (target, options) {
48391
48417
  var stats = options ? orig.call(fs, target, options)
48392
48418
  : orig.call(fs, target)
48393
- if (stats.uid < 0) stats.uid += 0x100000000
48394
- if (stats.gid < 0) stats.gid += 0x100000000
48419
+ if (stats) {
48420
+ if (stats.uid < 0) stats.uid += 0x100000000
48421
+ if (stats.gid < 0) stats.gid += 0x100000000
48422
+ }
48395
48423
  return stats;
48396
48424
  }
48397
48425
  }
@@ -48428,7 +48456,7 @@ function patch (fs) {
48428
48456
 
48429
48457
  /***/ }),
48430
48458
 
48431
- /***/ 83584:
48459
+ /***/ 50695:
48432
48460
  /***/ ((module) => {
48433
48461
 
48434
48462
  "use strict";
@@ -48459,13 +48487,13 @@ function clone (obj) {
48459
48487
 
48460
48488
  /***/ }),
48461
48489
 
48462
- /***/ 19677:
48490
+ /***/ 62204:
48463
48491
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
48464
48492
 
48465
48493
  var fs = __webpack_require__(57147)
48466
- var polyfills = __webpack_require__(18187)
48467
- var legacy = __webpack_require__(15601)
48468
- var clone = __webpack_require__(83584)
48494
+ var polyfills = __webpack_require__(79874)
48495
+ var legacy = __webpack_require__(31563)
48496
+ var clone = __webpack_require__(50695)
48469
48497
 
48470
48498
  var util = __webpack_require__(73837)
48471
48499
 
@@ -48895,7 +48923,7 @@ function retry () {
48895
48923
 
48896
48924
  /***/ }),
48897
48925
 
48898
- /***/ 15601:
48926
+ /***/ 31563:
48899
48927
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
48900
48928
 
48901
48929
  var Stream = (__webpack_require__(12781).Stream)
@@ -49020,7 +49048,7 @@ function legacy (fs) {
49020
49048
 
49021
49049
  /***/ }),
49022
49050
 
49023
- /***/ 18187:
49051
+ /***/ 79874:
49024
49052
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
49025
49053
 
49026
49054
  var constants = __webpack_require__(22057)
@@ -49335,10 +49363,8 @@ function patch (fs) {
49335
49363
  return function (target, options) {
49336
49364
  var stats = options ? orig.call(fs, target, options)
49337
49365
  : orig.call(fs, target)
49338
- if (stats) {
49339
- if (stats.uid < 0) stats.uid += 0x100000000
49340
- if (stats.gid < 0) stats.gid += 0x100000000
49341
- }
49366
+ if (stats.uid < 0) stats.uid += 0x100000000
49367
+ if (stats.gid < 0) stats.gid += 0x100000000
49342
49368
  return stats;
49343
49369
  }
49344
49370
  }
@@ -63657,7 +63683,7 @@ exports.parse = function (s) {
63657
63683
 
63658
63684
  let _fs
63659
63685
  try {
63660
- _fs = __webpack_require__(19677)
63686
+ _fs = __webpack_require__(20109)
63661
63687
  } catch (_) {
63662
63688
  _fs = __webpack_require__(57147)
63663
63689
  }
@@ -273224,10 +273250,10 @@ const FrameworkSchema = {
273224
273250
  };
273225
273251
  exports.FrameworkSchema = FrameworkSchema;
273226
273252
  const FrameworkAppendTypeContent = {
273227
- [Framework.Express]: `/// <reference types='@modern-js/plugin-express/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`,
273228
- [Framework.Koa]: `/// <reference types='@modern-js/plugin-koa/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`,
273229
- [Framework.Egg]: `/// <reference types='@modern-js/plugin-egg/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`,
273230
- [Framework.Nest]: `/// <reference types='@modern-js/plugin-nest/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`
273253
+ [Framework.Express]: `/// <reference types='@modern-js/plugin-express/types' />`,
273254
+ [Framework.Koa]: `/// <reference types='@modern-js/plugin-koa/types' />`,
273255
+ [Framework.Egg]: `/// <reference types='@modern-js/plugin-egg/types' />`,
273256
+ [Framework.Nest]: `/// <reference types='@modern-js/plugin-nest/types' />`
273231
273257
  };
273232
273258
  exports.FrameworkAppendTypeContent = FrameworkAppendTypeContent;
273233
273259
 
@@ -273712,7 +273738,7 @@ Object.keys(_monorepo).forEach(function (key) {
273712
273738
  Object.defineProperty(exports, "__esModule", ({
273713
273739
  value: true
273714
273740
  }));
273715
- exports.ModuleSpecialSchemaMap = exports.ModuleNewActionSchema = exports.ModuleNewActionGenerators = exports.ModuleActionTypesMap = exports.ModuleActionTypes = exports.ModuleActionFunctionsPeerDependencies = exports.ModuleActionFunctionsDevDependencies = exports.ModuleActionFunctionsDependencies = exports.ModuleActionFunctionsAppendTypeContent = exports.ModuleActionFunctions = void 0;
273741
+ exports.ModuleSpecialSchemaMap = exports.ModuleNewActionSchema = exports.ModuleNewActionGenerators = exports.ModuleActionTypesMap = exports.ModuleActionTypes = exports.ModuleActionFunctionsPeerDependencies = exports.ModuleActionFunctionsDevDependencies = exports.ModuleActionFunctionsDependencies = exports.ModuleActionFunctions = void 0;
273716
273742
 
273717
273743
  var _common = __webpack_require__(78353);
273718
273744
 
@@ -273770,10 +273796,6 @@ const ModuleActionFunctionsDependencies = {
273770
273796
  [_common.ActionFunction.Sass]: '@modern-js/plugin-sass'
273771
273797
  };
273772
273798
  exports.ModuleActionFunctionsDependencies = ModuleActionFunctionsDependencies;
273773
- const ModuleActionFunctionsAppendTypeContent = {
273774
- [_common.ActionFunction.TailwindCSS]: `/// <reference types='@modern-js/plugin-tailwindcss/types' />`
273775
- };
273776
- exports.ModuleActionFunctionsAppendTypeContent = ModuleActionFunctionsAppendTypeContent;
273777
273799
  const ModuleNewActionGenerators = {
273778
273800
  [_common.ActionType.Function]: {
273779
273801
  [_common.ActionFunction.TailwindCSS]: '@modern-js/tailwindcss-generator',
@@ -273915,9 +273937,7 @@ const MWAActionFunctionsDependencies = {
273915
273937
  };
273916
273938
  exports.MWAActionFunctionsDependencies = MWAActionFunctionsDependencies;
273917
273939
  const MWAActionFunctionsAppendTypeContent = {
273918
- [_common.ActionFunction.Test]: `/// <reference types='@modern-js/plugin-testing/type' />`,
273919
- [_common.ActionFunction.MicroFrontend]: `/// <reference types='@modern-js/plugin-garfish/type' />`,
273920
- [_common.ActionFunction.TailwindCSS]: `/// <reference types='@modern-js/plugin-tailwindcss/types' />`
273940
+ [_common.ActionFunction.MicroFrontend]: `/// <reference types='@modern-js/plugin-garfish/types' />`
273921
273941
  };
273922
273942
  exports.MWAActionFunctionsAppendTypeContent = MWAActionFunctionsAppendTypeContent;
273923
273943
  const MWANewActionGenerators = {
@@ -275105,12 +275125,7 @@ const PLUGIN_SCHEMAS = {
275105
275125
  }
275106
275126
  }],
275107
275127
  '@modern-js/plugin-unbundle': [{
275108
- target: 'source.disableAutoImportStyle',
275109
- schema: {
275110
- type: 'boolean'
275111
- }
275112
- }, {
275113
- target: 'server.https',
275128
+ target: 'output.disableAutoImportStyle',
275114
275129
  schema: {
275115
275130
  type: 'boolean'
275116
275131
  }
@@ -275124,6 +275139,15 @@ const PLUGIN_SCHEMAS = {
275124
275139
  items: {
275125
275140
  type: 'string'
275126
275141
  }
275142
+ },
275143
+ ignoreModuleCache: {
275144
+ type: 'boolean'
275145
+ },
275146
+ clearPdnCache: {
275147
+ type: 'boolean'
275148
+ },
275149
+ pdnHost: {
275150
+ type: 'string'
275127
275151
  }
275128
275152
  }
275129
275153
  }
@@ -276493,27 +276517,24 @@ function isUndefined(obj) {
276493
276517
  }
276494
276518
 
276495
276519
  function isArray(obj) {
276496
- return Object.prototype.toString.call(obj) === '[object Array]';
276520
+ return Array.isArray(obj);
276497
276521
  } // eslint-disable-next-line @typescript-eslint/ban-types
276498
276522
 
276499
276523
 
276500
276524
  function isFunction(func) {
276501
276525
  return typeof func === 'function';
276502
- } // eslint-disable-next-line @typescript-eslint/ban-types
276503
-
276526
+ }
276504
276527
 
276505
276528
  function isObject(obj) {
276506
- return typeof obj === 'object';
276529
+ return obj !== null && typeof obj === 'object';
276507
276530
  }
276508
276531
 
276509
276532
  function isPlainObject(obj) {
276510
- return obj && typeof obj === 'object' && Object.prototype.toString.call(obj) === '[object Object]';
276533
+ return isObject(obj) && Object.prototype.toString.call(obj) === '[object Object]';
276511
276534
  }
276512
276535
 
276513
276536
  function isPromise(obj) {
276514
- /* eslint-disable promise/prefer-await-to-then */
276515
276537
  return Boolean(obj) && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
276516
- /* eslint-enable promise/prefer-await-to-then */
276517
276538
  }
276518
276539
 
276519
276540
  function isRegExp(obj) {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.4",
14
+ "version": "1.2.5",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/js/node/main.js",
17
17
  "files": [
@@ -24,7 +24,7 @@
24
24
  "@modern-js/codesmith-api-app": "^1.0.8",
25
25
  "@modern-js/codesmith-api-json": "^1.0.7",
26
26
  "@modern-js/codesmith-tools": "^1.0.9",
27
- "@modern-js/generator-common": "^1.4.4",
27
+ "@modern-js/generator-common": "^1.4.8",
28
28
  "@modern-js/generator-utils": "^1.2.1",
29
29
  "@types/jest": "^26",
30
30
  "@types/lodash": "^4.14.168",