@modern-js/monorepo-generator 1.3.3 → 1.3.4

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.
@@ -36860,6 +36860,953 @@ function patch (fs) {
36860
36860
  }
36861
36861
 
36862
36862
 
36863
+ /***/ }),
36864
+
36865
+ /***/ 83584:
36866
+ /***/ ((module) => {
36867
+
36868
+ "use strict";
36869
+
36870
+
36871
+ module.exports = clone
36872
+
36873
+ var getPrototypeOf = Object.getPrototypeOf || function (obj) {
36874
+ return obj.__proto__
36875
+ }
36876
+
36877
+ function clone (obj) {
36878
+ if (obj === null || typeof obj !== 'object')
36879
+ return obj
36880
+
36881
+ if (obj instanceof Object)
36882
+ var copy = { __proto__: getPrototypeOf(obj) }
36883
+ else
36884
+ var copy = Object.create(null)
36885
+
36886
+ Object.getOwnPropertyNames(obj).forEach(function (key) {
36887
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))
36888
+ })
36889
+
36890
+ return copy
36891
+ }
36892
+
36893
+
36894
+ /***/ }),
36895
+
36896
+ /***/ 19677:
36897
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
36898
+
36899
+ var fs = __webpack_require__(57147)
36900
+ var polyfills = __webpack_require__(18187)
36901
+ var legacy = __webpack_require__(15601)
36902
+ var clone = __webpack_require__(83584)
36903
+
36904
+ var util = __webpack_require__(73837)
36905
+
36906
+ /* istanbul ignore next - node 0.x polyfill */
36907
+ var gracefulQueue
36908
+ var previousSymbol
36909
+
36910
+ /* istanbul ignore else - node 0.x polyfill */
36911
+ if (typeof Symbol === 'function' && typeof Symbol.for === 'function') {
36912
+ gracefulQueue = Symbol.for('graceful-fs.queue')
36913
+ // This is used in testing by future versions
36914
+ previousSymbol = Symbol.for('graceful-fs.previous')
36915
+ } else {
36916
+ gracefulQueue = '___graceful-fs.queue'
36917
+ previousSymbol = '___graceful-fs.previous'
36918
+ }
36919
+
36920
+ function noop () {}
36921
+
36922
+ function publishQueue(context, queue) {
36923
+ Object.defineProperty(context, gracefulQueue, {
36924
+ get: function() {
36925
+ return queue
36926
+ }
36927
+ })
36928
+ }
36929
+
36930
+ var debug = noop
36931
+ if (util.debuglog)
36932
+ debug = util.debuglog('gfs4')
36933
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ''))
36934
+ debug = function() {
36935
+ var m = util.format.apply(util, arguments)
36936
+ m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ')
36937
+ console.error(m)
36938
+ }
36939
+
36940
+ // Once time initialization
36941
+ if (!fs[gracefulQueue]) {
36942
+ // This queue can be shared by multiple loaded instances
36943
+ var queue = global[gracefulQueue] || []
36944
+ publishQueue(fs, queue)
36945
+
36946
+ // Patch fs.close/closeSync to shared queue version, because we need
36947
+ // to retry() whenever a close happens *anywhere* in the program.
36948
+ // This is essential when multiple graceful-fs instances are
36949
+ // in play at the same time.
36950
+ fs.close = (function (fs$close) {
36951
+ function close (fd, cb) {
36952
+ return fs$close.call(fs, fd, function (err) {
36953
+ // This function uses the graceful-fs shared queue
36954
+ if (!err) {
36955
+ resetQueue()
36956
+ }
36957
+
36958
+ if (typeof cb === 'function')
36959
+ cb.apply(this, arguments)
36960
+ })
36961
+ }
36962
+
36963
+ Object.defineProperty(close, previousSymbol, {
36964
+ value: fs$close
36965
+ })
36966
+ return close
36967
+ })(fs.close)
36968
+
36969
+ fs.closeSync = (function (fs$closeSync) {
36970
+ function closeSync (fd) {
36971
+ // This function uses the graceful-fs shared queue
36972
+ fs$closeSync.apply(fs, arguments)
36973
+ resetQueue()
36974
+ }
36975
+
36976
+ Object.defineProperty(closeSync, previousSymbol, {
36977
+ value: fs$closeSync
36978
+ })
36979
+ return closeSync
36980
+ })(fs.closeSync)
36981
+
36982
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) {
36983
+ process.on('exit', function() {
36984
+ debug(fs[gracefulQueue])
36985
+ __webpack_require__(39491).equal(fs[gracefulQueue].length, 0)
36986
+ })
36987
+ }
36988
+ }
36989
+
36990
+ if (!global[gracefulQueue]) {
36991
+ publishQueue(global, fs[gracefulQueue]);
36992
+ }
36993
+
36994
+ module.exports = patch(clone(fs))
36995
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
36996
+ module.exports = patch(fs)
36997
+ fs.__patched = true;
36998
+ }
36999
+
37000
+ function patch (fs) {
37001
+ // Everything that references the open() function needs to be in here
37002
+ polyfills(fs)
37003
+ fs.gracefulify = patch
37004
+
37005
+ fs.createReadStream = createReadStream
37006
+ fs.createWriteStream = createWriteStream
37007
+ var fs$readFile = fs.readFile
37008
+ fs.readFile = readFile
37009
+ function readFile (path, options, cb) {
37010
+ if (typeof options === 'function')
37011
+ cb = options, options = null
37012
+
37013
+ return go$readFile(path, options, cb)
37014
+
37015
+ function go$readFile (path, options, cb, startTime) {
37016
+ return fs$readFile(path, options, function (err) {
37017
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
37018
+ enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])
37019
+ else {
37020
+ if (typeof cb === 'function')
37021
+ cb.apply(this, arguments)
37022
+ }
37023
+ })
37024
+ }
37025
+ }
37026
+
37027
+ var fs$writeFile = fs.writeFile
37028
+ fs.writeFile = writeFile
37029
+ function writeFile (path, data, options, cb) {
37030
+ if (typeof options === 'function')
37031
+ cb = options, options = null
37032
+
37033
+ return go$writeFile(path, data, options, cb)
37034
+
37035
+ function go$writeFile (path, data, options, cb, startTime) {
37036
+ return fs$writeFile(path, data, options, function (err) {
37037
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
37038
+ enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
37039
+ else {
37040
+ if (typeof cb === 'function')
37041
+ cb.apply(this, arguments)
37042
+ }
37043
+ })
37044
+ }
37045
+ }
37046
+
37047
+ var fs$appendFile = fs.appendFile
37048
+ if (fs$appendFile)
37049
+ fs.appendFile = appendFile
37050
+ function appendFile (path, data, options, cb) {
37051
+ if (typeof options === 'function')
37052
+ cb = options, options = null
37053
+
37054
+ return go$appendFile(path, data, options, cb)
37055
+
37056
+ function go$appendFile (path, data, options, cb, startTime) {
37057
+ return fs$appendFile(path, data, options, function (err) {
37058
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
37059
+ enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])
37060
+ else {
37061
+ if (typeof cb === 'function')
37062
+ cb.apply(this, arguments)
37063
+ }
37064
+ })
37065
+ }
37066
+ }
37067
+
37068
+ var fs$copyFile = fs.copyFile
37069
+ if (fs$copyFile)
37070
+ fs.copyFile = copyFile
37071
+ function copyFile (src, dest, flags, cb) {
37072
+ if (typeof flags === 'function') {
37073
+ cb = flags
37074
+ flags = 0
37075
+ }
37076
+ return go$copyFile(src, dest, flags, cb)
37077
+
37078
+ function go$copyFile (src, dest, flags, cb, startTime) {
37079
+ return fs$copyFile(src, dest, flags, function (err) {
37080
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
37081
+ enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])
37082
+ else {
37083
+ if (typeof cb === 'function')
37084
+ cb.apply(this, arguments)
37085
+ }
37086
+ })
37087
+ }
37088
+ }
37089
+
37090
+ var fs$readdir = fs.readdir
37091
+ fs.readdir = readdir
37092
+ function readdir (path, options, cb) {
37093
+ if (typeof options === 'function')
37094
+ cb = options, options = null
37095
+
37096
+ return go$readdir(path, options, cb)
37097
+
37098
+ function go$readdir (path, options, cb, startTime) {
37099
+ return fs$readdir(path, options, function (err, files) {
37100
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
37101
+ enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()])
37102
+ else {
37103
+ if (files && files.sort)
37104
+ files.sort()
37105
+
37106
+ if (typeof cb === 'function')
37107
+ cb.call(this, err, files)
37108
+ }
37109
+ })
37110
+ }
37111
+ }
37112
+
37113
+ if (process.version.substr(0, 4) === 'v0.8') {
37114
+ var legStreams = legacy(fs)
37115
+ ReadStream = legStreams.ReadStream
37116
+ WriteStream = legStreams.WriteStream
37117
+ }
37118
+
37119
+ var fs$ReadStream = fs.ReadStream
37120
+ if (fs$ReadStream) {
37121
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype)
37122
+ ReadStream.prototype.open = ReadStream$open
37123
+ }
37124
+
37125
+ var fs$WriteStream = fs.WriteStream
37126
+ if (fs$WriteStream) {
37127
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype)
37128
+ WriteStream.prototype.open = WriteStream$open
37129
+ }
37130
+
37131
+ Object.defineProperty(fs, 'ReadStream', {
37132
+ get: function () {
37133
+ return ReadStream
37134
+ },
37135
+ set: function (val) {
37136
+ ReadStream = val
37137
+ },
37138
+ enumerable: true,
37139
+ configurable: true
37140
+ })
37141
+ Object.defineProperty(fs, 'WriteStream', {
37142
+ get: function () {
37143
+ return WriteStream
37144
+ },
37145
+ set: function (val) {
37146
+ WriteStream = val
37147
+ },
37148
+ enumerable: true,
37149
+ configurable: true
37150
+ })
37151
+
37152
+ // legacy names
37153
+ var FileReadStream = ReadStream
37154
+ Object.defineProperty(fs, 'FileReadStream', {
37155
+ get: function () {
37156
+ return FileReadStream
37157
+ },
37158
+ set: function (val) {
37159
+ FileReadStream = val
37160
+ },
37161
+ enumerable: true,
37162
+ configurable: true
37163
+ })
37164
+ var FileWriteStream = WriteStream
37165
+ Object.defineProperty(fs, 'FileWriteStream', {
37166
+ get: function () {
37167
+ return FileWriteStream
37168
+ },
37169
+ set: function (val) {
37170
+ FileWriteStream = val
37171
+ },
37172
+ enumerable: true,
37173
+ configurable: true
37174
+ })
37175
+
37176
+ function ReadStream (path, options) {
37177
+ if (this instanceof ReadStream)
37178
+ return fs$ReadStream.apply(this, arguments), this
37179
+ else
37180
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments)
37181
+ }
37182
+
37183
+ function ReadStream$open () {
37184
+ var that = this
37185
+ open(that.path, that.flags, that.mode, function (err, fd) {
37186
+ if (err) {
37187
+ if (that.autoClose)
37188
+ that.destroy()
37189
+
37190
+ that.emit('error', err)
37191
+ } else {
37192
+ that.fd = fd
37193
+ that.emit('open', fd)
37194
+ that.read()
37195
+ }
37196
+ })
37197
+ }
37198
+
37199
+ function WriteStream (path, options) {
37200
+ if (this instanceof WriteStream)
37201
+ return fs$WriteStream.apply(this, arguments), this
37202
+ else
37203
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments)
37204
+ }
37205
+
37206
+ function WriteStream$open () {
37207
+ var that = this
37208
+ open(that.path, that.flags, that.mode, function (err, fd) {
37209
+ if (err) {
37210
+ that.destroy()
37211
+ that.emit('error', err)
37212
+ } else {
37213
+ that.fd = fd
37214
+ that.emit('open', fd)
37215
+ }
37216
+ })
37217
+ }
37218
+
37219
+ function createReadStream (path, options) {
37220
+ return new fs.ReadStream(path, options)
37221
+ }
37222
+
37223
+ function createWriteStream (path, options) {
37224
+ return new fs.WriteStream(path, options)
37225
+ }
37226
+
37227
+ var fs$open = fs.open
37228
+ fs.open = open
37229
+ function open (path, flags, mode, cb) {
37230
+ if (typeof mode === 'function')
37231
+ cb = mode, mode = null
37232
+
37233
+ return go$open(path, flags, mode, cb)
37234
+
37235
+ function go$open (path, flags, mode, cb, startTime) {
37236
+ return fs$open(path, flags, mode, function (err, fd) {
37237
+ if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))
37238
+ enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])
37239
+ else {
37240
+ if (typeof cb === 'function')
37241
+ cb.apply(this, arguments)
37242
+ }
37243
+ })
37244
+ }
37245
+ }
37246
+
37247
+ return fs
37248
+ }
37249
+
37250
+ function enqueue (elem) {
37251
+ debug('ENQUEUE', elem[0].name, elem[1])
37252
+ fs[gracefulQueue].push(elem)
37253
+ retry()
37254
+ }
37255
+
37256
+ // keep track of the timeout between retry() calls
37257
+ var retryTimer
37258
+
37259
+ // reset the startTime and lastTime to now
37260
+ // this resets the start of the 60 second overall timeout as well as the
37261
+ // delay between attempts so that we'll retry these jobs sooner
37262
+ function resetQueue () {
37263
+ var now = Date.now()
37264
+ for (var i = 0; i < fs[gracefulQueue].length; ++i) {
37265
+ // entries that are only a length of 2 are from an older version, don't
37266
+ // bother modifying those since they'll be retried anyway.
37267
+ if (fs[gracefulQueue][i].length > 2) {
37268
+ fs[gracefulQueue][i][3] = now // startTime
37269
+ fs[gracefulQueue][i][4] = now // lastTime
37270
+ }
37271
+ }
37272
+ // call retry to make sure we're actively processing the queue
37273
+ retry()
37274
+ }
37275
+
37276
+ function retry () {
37277
+ // clear the timer and remove it to help prevent unintended concurrency
37278
+ clearTimeout(retryTimer)
37279
+ retryTimer = undefined
37280
+
37281
+ if (fs[gracefulQueue].length === 0)
37282
+ return
37283
+
37284
+ var elem = fs[gracefulQueue].shift()
37285
+ var fn = elem[0]
37286
+ var args = elem[1]
37287
+ // these items may be unset if they were added by an older graceful-fs
37288
+ var err = elem[2]
37289
+ var startTime = elem[3]
37290
+ var lastTime = elem[4]
37291
+
37292
+ // if we don't have a startTime we have no way of knowing if we've waited
37293
+ // long enough, so go ahead and retry this item now
37294
+ if (startTime === undefined) {
37295
+ debug('RETRY', fn.name, args)
37296
+ fn.apply(null, args)
37297
+ } else if (Date.now() - startTime >= 60000) {
37298
+ // it's been more than 60 seconds total, bail now
37299
+ debug('TIMEOUT', fn.name, args)
37300
+ var cb = args.pop()
37301
+ if (typeof cb === 'function')
37302
+ cb.call(null, err)
37303
+ } else {
37304
+ // the amount of time between the last attempt and right now
37305
+ var sinceAttempt = Date.now() - lastTime
37306
+ // the amount of time between when we first tried, and when we last tried
37307
+ // rounded up to at least 1
37308
+ var sinceStart = Math.max(lastTime - startTime, 1)
37309
+ // backoff. wait longer than the total time we've been retrying, but only
37310
+ // up to a maximum of 100ms
37311
+ var desiredDelay = Math.min(sinceStart * 1.2, 100)
37312
+ // it's been long enough since the last retry, do it again
37313
+ if (sinceAttempt >= desiredDelay) {
37314
+ debug('RETRY', fn.name, args)
37315
+ fn.apply(null, args.concat([startTime]))
37316
+ } else {
37317
+ // if we can't do this job yet, push it to the end of the queue
37318
+ // and let the next iteration check again
37319
+ fs[gracefulQueue].push(elem)
37320
+ }
37321
+ }
37322
+
37323
+ // schedule our next run if one isn't already scheduled
37324
+ if (retryTimer === undefined) {
37325
+ retryTimer = setTimeout(retry, 0)
37326
+ }
37327
+ }
37328
+
37329
+
37330
+ /***/ }),
37331
+
37332
+ /***/ 15601:
37333
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
37334
+
37335
+ var Stream = (__webpack_require__(12781).Stream)
37336
+
37337
+ module.exports = legacy
37338
+
37339
+ function legacy (fs) {
37340
+ return {
37341
+ ReadStream: ReadStream,
37342
+ WriteStream: WriteStream
37343
+ }
37344
+
37345
+ function ReadStream (path, options) {
37346
+ if (!(this instanceof ReadStream)) return new ReadStream(path, options);
37347
+
37348
+ Stream.call(this);
37349
+
37350
+ var self = this;
37351
+
37352
+ this.path = path;
37353
+ this.fd = null;
37354
+ this.readable = true;
37355
+ this.paused = false;
37356
+
37357
+ this.flags = 'r';
37358
+ this.mode = 438; /*=0666*/
37359
+ this.bufferSize = 64 * 1024;
37360
+
37361
+ options = options || {};
37362
+
37363
+ // Mixin options into this
37364
+ var keys = Object.keys(options);
37365
+ for (var index = 0, length = keys.length; index < length; index++) {
37366
+ var key = keys[index];
37367
+ this[key] = options[key];
37368
+ }
37369
+
37370
+ if (this.encoding) this.setEncoding(this.encoding);
37371
+
37372
+ if (this.start !== undefined) {
37373
+ if ('number' !== typeof this.start) {
37374
+ throw TypeError('start must be a Number');
37375
+ }
37376
+ if (this.end === undefined) {
37377
+ this.end = Infinity;
37378
+ } else if ('number' !== typeof this.end) {
37379
+ throw TypeError('end must be a Number');
37380
+ }
37381
+
37382
+ if (this.start > this.end) {
37383
+ throw new Error('start must be <= end');
37384
+ }
37385
+
37386
+ this.pos = this.start;
37387
+ }
37388
+
37389
+ if (this.fd !== null) {
37390
+ process.nextTick(function() {
37391
+ self._read();
37392
+ });
37393
+ return;
37394
+ }
37395
+
37396
+ fs.open(this.path, this.flags, this.mode, function (err, fd) {
37397
+ if (err) {
37398
+ self.emit('error', err);
37399
+ self.readable = false;
37400
+ return;
37401
+ }
37402
+
37403
+ self.fd = fd;
37404
+ self.emit('open', fd);
37405
+ self._read();
37406
+ })
37407
+ }
37408
+
37409
+ function WriteStream (path, options) {
37410
+ if (!(this instanceof WriteStream)) return new WriteStream(path, options);
37411
+
37412
+ Stream.call(this);
37413
+
37414
+ this.path = path;
37415
+ this.fd = null;
37416
+ this.writable = true;
37417
+
37418
+ this.flags = 'w';
37419
+ this.encoding = 'binary';
37420
+ this.mode = 438; /*=0666*/
37421
+ this.bytesWritten = 0;
37422
+
37423
+ options = options || {};
37424
+
37425
+ // Mixin options into this
37426
+ var keys = Object.keys(options);
37427
+ for (var index = 0, length = keys.length; index < length; index++) {
37428
+ var key = keys[index];
37429
+ this[key] = options[key];
37430
+ }
37431
+
37432
+ if (this.start !== undefined) {
37433
+ if ('number' !== typeof this.start) {
37434
+ throw TypeError('start must be a Number');
37435
+ }
37436
+ if (this.start < 0) {
37437
+ throw new Error('start must be >= zero');
37438
+ }
37439
+
37440
+ this.pos = this.start;
37441
+ }
37442
+
37443
+ this.busy = false;
37444
+ this._queue = [];
37445
+
37446
+ if (this.fd === null) {
37447
+ this._open = fs.open;
37448
+ this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
37449
+ this.flush();
37450
+ }
37451
+ }
37452
+ }
37453
+
37454
+
37455
+ /***/ }),
37456
+
37457
+ /***/ 18187:
37458
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
37459
+
37460
+ var constants = __webpack_require__(22057)
37461
+
37462
+ var origCwd = process.cwd
37463
+ var cwd = null
37464
+
37465
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform
37466
+
37467
+ process.cwd = function() {
37468
+ if (!cwd)
37469
+ cwd = origCwd.call(process)
37470
+ return cwd
37471
+ }
37472
+ try {
37473
+ process.cwd()
37474
+ } catch (er) {}
37475
+
37476
+ // This check is needed until node.js 12 is required
37477
+ if (typeof process.chdir === 'function') {
37478
+ var chdir = process.chdir
37479
+ process.chdir = function (d) {
37480
+ cwd = null
37481
+ chdir.call(process, d)
37482
+ }
37483
+ if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)
37484
+ }
37485
+
37486
+ module.exports = patch
37487
+
37488
+ function patch (fs) {
37489
+ // (re-)implement some things that are known busted or missing.
37490
+
37491
+ // lchmod, broken prior to 0.6.2
37492
+ // back-port the fix here.
37493
+ if (constants.hasOwnProperty('O_SYMLINK') &&
37494
+ process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
37495
+ patchLchmod(fs)
37496
+ }
37497
+
37498
+ // lutimes implementation, or no-op
37499
+ if (!fs.lutimes) {
37500
+ patchLutimes(fs)
37501
+ }
37502
+
37503
+ // https://github.com/isaacs/node-graceful-fs/issues/4
37504
+ // Chown should not fail on einval or eperm if non-root.
37505
+ // It should not fail on enosys ever, as this just indicates
37506
+ // that a fs doesn't support the intended operation.
37507
+
37508
+ fs.chown = chownFix(fs.chown)
37509
+ fs.fchown = chownFix(fs.fchown)
37510
+ fs.lchown = chownFix(fs.lchown)
37511
+
37512
+ fs.chmod = chmodFix(fs.chmod)
37513
+ fs.fchmod = chmodFix(fs.fchmod)
37514
+ fs.lchmod = chmodFix(fs.lchmod)
37515
+
37516
+ fs.chownSync = chownFixSync(fs.chownSync)
37517
+ fs.fchownSync = chownFixSync(fs.fchownSync)
37518
+ fs.lchownSync = chownFixSync(fs.lchownSync)
37519
+
37520
+ fs.chmodSync = chmodFixSync(fs.chmodSync)
37521
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync)
37522
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync)
37523
+
37524
+ fs.stat = statFix(fs.stat)
37525
+ fs.fstat = statFix(fs.fstat)
37526
+ fs.lstat = statFix(fs.lstat)
37527
+
37528
+ fs.statSync = statFixSync(fs.statSync)
37529
+ fs.fstatSync = statFixSync(fs.fstatSync)
37530
+ fs.lstatSync = statFixSync(fs.lstatSync)
37531
+
37532
+ // if lchmod/lchown do not exist, then make them no-ops
37533
+ if (!fs.lchmod) {
37534
+ fs.lchmod = function (path, mode, cb) {
37535
+ if (cb) process.nextTick(cb)
37536
+ }
37537
+ fs.lchmodSync = function () {}
37538
+ }
37539
+ if (!fs.lchown) {
37540
+ fs.lchown = function (path, uid, gid, cb) {
37541
+ if (cb) process.nextTick(cb)
37542
+ }
37543
+ fs.lchownSync = function () {}
37544
+ }
37545
+
37546
+ // on Windows, A/V software can lock the directory, causing this
37547
+ // to fail with an EACCES or EPERM if the directory contains newly
37548
+ // created files. Try again on failure, for up to 60 seconds.
37549
+
37550
+ // Set the timeout this long because some Windows Anti-Virus, such as Parity
37551
+ // bit9, may lock files for up to a minute, causing npm package install
37552
+ // failures. Also, take care to yield the scheduler. Windows scheduling gives
37553
+ // CPU to a busy looping process, which can cause the program causing the lock
37554
+ // contention to be starved of CPU by node, so the contention doesn't resolve.
37555
+ if (platform === "win32") {
37556
+ fs.rename = (function (fs$rename) { return function (from, to, cb) {
37557
+ var start = Date.now()
37558
+ var backoff = 0;
37559
+ fs$rename(from, to, function CB (er) {
37560
+ if (er
37561
+ && (er.code === "EACCES" || er.code === "EPERM")
37562
+ && Date.now() - start < 60000) {
37563
+ setTimeout(function() {
37564
+ fs.stat(to, function (stater, st) {
37565
+ if (stater && stater.code === "ENOENT")
37566
+ fs$rename(from, to, CB);
37567
+ else
37568
+ cb(er)
37569
+ })
37570
+ }, backoff)
37571
+ if (backoff < 100)
37572
+ backoff += 10;
37573
+ return;
37574
+ }
37575
+ if (cb) cb(er)
37576
+ })
37577
+ }})(fs.rename)
37578
+ }
37579
+
37580
+ // if read() returns EAGAIN, then just try it again.
37581
+ fs.read = (function (fs$read) {
37582
+ function read (fd, buffer, offset, length, position, callback_) {
37583
+ var callback
37584
+ if (callback_ && typeof callback_ === 'function') {
37585
+ var eagCounter = 0
37586
+ callback = function (er, _, __) {
37587
+ if (er && er.code === 'EAGAIN' && eagCounter < 10) {
37588
+ eagCounter ++
37589
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback)
37590
+ }
37591
+ callback_.apply(this, arguments)
37592
+ }
37593
+ }
37594
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback)
37595
+ }
37596
+
37597
+ // This ensures `util.promisify` works as it does for native `fs.read`.
37598
+ if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)
37599
+ return read
37600
+ })(fs.read)
37601
+
37602
+ fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) {
37603
+ var eagCounter = 0
37604
+ while (true) {
37605
+ try {
37606
+ return fs$readSync.call(fs, fd, buffer, offset, length, position)
37607
+ } catch (er) {
37608
+ if (er.code === 'EAGAIN' && eagCounter < 10) {
37609
+ eagCounter ++
37610
+ continue
37611
+ }
37612
+ throw er
37613
+ }
37614
+ }
37615
+ }})(fs.readSync)
37616
+
37617
+ function patchLchmod (fs) {
37618
+ fs.lchmod = function (path, mode, callback) {
37619
+ fs.open( path
37620
+ , constants.O_WRONLY | constants.O_SYMLINK
37621
+ , mode
37622
+ , function (err, fd) {
37623
+ if (err) {
37624
+ if (callback) callback(err)
37625
+ return
37626
+ }
37627
+ // prefer to return the chmod error, if one occurs,
37628
+ // but still try to close, and report closing errors if they occur.
37629
+ fs.fchmod(fd, mode, function (err) {
37630
+ fs.close(fd, function(err2) {
37631
+ if (callback) callback(err || err2)
37632
+ })
37633
+ })
37634
+ })
37635
+ }
37636
+
37637
+ fs.lchmodSync = function (path, mode) {
37638
+ var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
37639
+
37640
+ // prefer to return the chmod error, if one occurs,
37641
+ // but still try to close, and report closing errors if they occur.
37642
+ var threw = true
37643
+ var ret
37644
+ try {
37645
+ ret = fs.fchmodSync(fd, mode)
37646
+ threw = false
37647
+ } finally {
37648
+ if (threw) {
37649
+ try {
37650
+ fs.closeSync(fd)
37651
+ } catch (er) {}
37652
+ } else {
37653
+ fs.closeSync(fd)
37654
+ }
37655
+ }
37656
+ return ret
37657
+ }
37658
+ }
37659
+
37660
+ function patchLutimes (fs) {
37661
+ if (constants.hasOwnProperty("O_SYMLINK")) {
37662
+ fs.lutimes = function (path, at, mt, cb) {
37663
+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
37664
+ if (er) {
37665
+ if (cb) cb(er)
37666
+ return
37667
+ }
37668
+ fs.futimes(fd, at, mt, function (er) {
37669
+ fs.close(fd, function (er2) {
37670
+ if (cb) cb(er || er2)
37671
+ })
37672
+ })
37673
+ })
37674
+ }
37675
+
37676
+ fs.lutimesSync = function (path, at, mt) {
37677
+ var fd = fs.openSync(path, constants.O_SYMLINK)
37678
+ var ret
37679
+ var threw = true
37680
+ try {
37681
+ ret = fs.futimesSync(fd, at, mt)
37682
+ threw = false
37683
+ } finally {
37684
+ if (threw) {
37685
+ try {
37686
+ fs.closeSync(fd)
37687
+ } catch (er) {}
37688
+ } else {
37689
+ fs.closeSync(fd)
37690
+ }
37691
+ }
37692
+ return ret
37693
+ }
37694
+
37695
+ } else {
37696
+ fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }
37697
+ fs.lutimesSync = function () {}
37698
+ }
37699
+ }
37700
+
37701
+ function chmodFix (orig) {
37702
+ if (!orig) return orig
37703
+ return function (target, mode, cb) {
37704
+ return orig.call(fs, target, mode, function (er) {
37705
+ if (chownErOk(er)) er = null
37706
+ if (cb) cb.apply(this, arguments)
37707
+ })
37708
+ }
37709
+ }
37710
+
37711
+ function chmodFixSync (orig) {
37712
+ if (!orig) return orig
37713
+ return function (target, mode) {
37714
+ try {
37715
+ return orig.call(fs, target, mode)
37716
+ } catch (er) {
37717
+ if (!chownErOk(er)) throw er
37718
+ }
37719
+ }
37720
+ }
37721
+
37722
+
37723
+ function chownFix (orig) {
37724
+ if (!orig) return orig
37725
+ return function (target, uid, gid, cb) {
37726
+ return orig.call(fs, target, uid, gid, function (er) {
37727
+ if (chownErOk(er)) er = null
37728
+ if (cb) cb.apply(this, arguments)
37729
+ })
37730
+ }
37731
+ }
37732
+
37733
+ function chownFixSync (orig) {
37734
+ if (!orig) return orig
37735
+ return function (target, uid, gid) {
37736
+ try {
37737
+ return orig.call(fs, target, uid, gid)
37738
+ } catch (er) {
37739
+ if (!chownErOk(er)) throw er
37740
+ }
37741
+ }
37742
+ }
37743
+
37744
+ function statFix (orig) {
37745
+ if (!orig) return orig
37746
+ // Older versions of Node erroneously returned signed integers for
37747
+ // uid + gid.
37748
+ return function (target, options, cb) {
37749
+ if (typeof options === 'function') {
37750
+ cb = options
37751
+ options = null
37752
+ }
37753
+ function callback (er, stats) {
37754
+ if (stats) {
37755
+ if (stats.uid < 0) stats.uid += 0x100000000
37756
+ if (stats.gid < 0) stats.gid += 0x100000000
37757
+ }
37758
+ if (cb) cb.apply(this, arguments)
37759
+ }
37760
+ return options ? orig.call(fs, target, options, callback)
37761
+ : orig.call(fs, target, callback)
37762
+ }
37763
+ }
37764
+
37765
+ function statFixSync (orig) {
37766
+ if (!orig) return orig
37767
+ // Older versions of Node erroneously returned signed integers for
37768
+ // uid + gid.
37769
+ return function (target, options) {
37770
+ var stats = options ? orig.call(fs, target, options)
37771
+ : orig.call(fs, target)
37772
+ if (stats) {
37773
+ if (stats.uid < 0) stats.uid += 0x100000000
37774
+ if (stats.gid < 0) stats.gid += 0x100000000
37775
+ }
37776
+ return stats;
37777
+ }
37778
+ }
37779
+
37780
+ // ENOSYS means that the fs doesn't support the op. Just ignore
37781
+ // that, because it doesn't matter.
37782
+ //
37783
+ // if there's no getuid, or if getuid() is something other
37784
+ // than 0, and the error is EINVAL or EPERM, then just ignore
37785
+ // it.
37786
+ //
37787
+ // This specific case is a silent failure in cp, install, tar,
37788
+ // and most other unix tools that manage permissions.
37789
+ //
37790
+ // When running as root, or if other types of errors are
37791
+ // encountered, then it's strict.
37792
+ function chownErOk (er) {
37793
+ if (!er)
37794
+ return true
37795
+
37796
+ if (er.code === "ENOSYS")
37797
+ return true
37798
+
37799
+ var nonroot = !process.getuid || process.getuid() !== 0
37800
+ if (nonroot) {
37801
+ if (er.code === "EINVAL" || er.code === "EPERM")
37802
+ return true
37803
+ }
37804
+
37805
+ return false
37806
+ }
37807
+ }
37808
+
37809
+
36863
37810
  /***/ }),
36864
37811
 
36865
37812
  /***/ 76157:
@@ -51043,7 +51990,7 @@ exports.parse = function (s) {
51043
51990
 
51044
51991
  let _fs
51045
51992
  try {
51046
- _fs = __webpack_require__(62204)
51993
+ _fs = __webpack_require__(19677)
51047
51994
  } catch (_) {
51048
51995
  _fs = __webpack_require__(57147)
51049
51996
  }
@@ -91045,7 +91992,7 @@ const PackageManagerSchema = {
91045
91992
  label: () => _locale.i18n.t(_locale.localeKeys.packageManager.self),
91046
91993
  mutualExclusion: true,
91047
91994
  when: (_values, extra) => !(extra !== null && extra !== void 0 && extra.isMonorepoSubProject),
91048
- items: (_values, extra) => Object.values(PackageManager).filter(packageManager => extra !== null && extra !== void 0 && extra.isMonorepo ? packageManager !== PackageManager.Npm : true).map(packageManager => ({
91995
+ items: Object.values(PackageManager).map(packageManager => ({
91049
91996
  key: packageManager,
91050
91997
  label: PackageManagerName[packageManager]
91051
91998
  }))
@@ -91959,7 +92906,17 @@ exports.MonorepoSchemas = exports.MonorepoSchema = exports.MonorepoDefaultConfig
91959
92906
 
91960
92907
  var _common = __webpack_require__(25523);
91961
92908
 
91962
- const MonorepoSchemas = [_common.PackageManagerSchema];
92909
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
92910
+
92911
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
92912
+
92913
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
92914
+
92915
+ const MonorepoPackageManagerSchema = _objectSpread(_objectSpread({}, _common.PackageManagerSchema), {}, {
92916
+ items: _common.PackageManagerSchema.items.filter(item => item.key !== _common.PackageManager.Npm)
92917
+ });
92918
+
92919
+ const MonorepoSchemas = [MonorepoPackageManagerSchema];
91963
92920
  exports.MonorepoSchemas = MonorepoSchemas;
91964
92921
  const MonorepoSchema = {
91965
92922
  key: 'monorepo',
@@ -92155,10 +93112,10 @@ const FrameworkSchema = {
92155
93112
  };
92156
93113
  exports.FrameworkSchema = FrameworkSchema;
92157
93114
  const FrameworkAppendTypeContent = {
92158
- [Framework.Express]: `/// <reference types='@modern-js/plugin-express/types' />`,
92159
- [Framework.Koa]: `/// <reference types='@modern-js/plugin-koa/types' />`,
92160
- [Framework.Egg]: `/// <reference types='@modern-js/plugin-egg/types' />`,
92161
- [Framework.Nest]: `/// <reference types='@modern-js/plugin-nest/types' />`
93115
+ [Framework.Express]: `/// <reference types='@modern-js/plugin-express/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`,
93116
+ [Framework.Koa]: `/// <reference types='@modern-js/plugin-koa/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`,
93117
+ [Framework.Egg]: `/// <reference types='@modern-js/plugin-egg/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`,
93118
+ [Framework.Nest]: `/// <reference types='@modern-js/plugin-nest/types' />\n/// <reference types='@modern-js/plugin-bff/types' />`
92162
93119
  };
92163
93120
  exports.FrameworkAppendTypeContent = FrameworkAppendTypeContent;
92164
93121
 
@@ -92643,7 +93600,7 @@ Object.keys(_monorepo).forEach(function (key) {
92643
93600
  Object.defineProperty(exports, "__esModule", ({
92644
93601
  value: true
92645
93602
  }));
92646
- exports.ModuleSpecialSchemaMap = exports.ModuleNewActionSchema = exports.ModuleNewActionGenerators = exports.ModuleActionTypesMap = exports.ModuleActionTypes = exports.ModuleActionFunctionsPeerDependencies = exports.ModuleActionFunctionsDevDependencies = exports.ModuleActionFunctionsDependencies = exports.ModuleActionFunctions = void 0;
93603
+ exports.ModuleSpecialSchemaMap = exports.ModuleNewActionSchema = exports.ModuleNewActionGenerators = exports.ModuleActionTypesMap = exports.ModuleActionTypes = exports.ModuleActionFunctionsPeerDependencies = exports.ModuleActionFunctionsDevDependencies = exports.ModuleActionFunctionsDependencies = exports.ModuleActionFunctionsAppendTypeContent = exports.ModuleActionFunctions = void 0;
92647
93604
 
92648
93605
  var _common = __webpack_require__(78353);
92649
93606
 
@@ -92701,9 +93658,13 @@ const ModuleActionFunctionsDependencies = {
92701
93658
  [_common.ActionFunction.Sass]: '@modern-js/plugin-sass'
92702
93659
  };
92703
93660
  exports.ModuleActionFunctionsDependencies = ModuleActionFunctionsDependencies;
93661
+ const ModuleActionFunctionsAppendTypeContent = {
93662
+ [_common.ActionFunction.TailwindCSS]: `/// <reference types='@modern-js/plugin-tailwindcss/types' />`
93663
+ };
93664
+ exports.ModuleActionFunctionsAppendTypeContent = ModuleActionFunctionsAppendTypeContent;
92704
93665
  const ModuleNewActionGenerators = {
92705
93666
  [_common.ActionType.Function]: {
92706
- [_common.ActionFunction.TailwindCSS]: '@modern-js/dependence-generator',
93667
+ [_common.ActionFunction.TailwindCSS]: '@modern-js/tailwindcss-generator',
92707
93668
  [_common.ActionFunction.Less]: '@modern-js/dependence-generator',
92708
93669
  [_common.ActionFunction.Sass]: '@modern-js/dependence-generator',
92709
93670
  [_common.ActionFunction.I18n]: '@modern-js/dependence-generator',
@@ -92837,12 +93798,14 @@ const MWAActionFunctionsDependencies = {
92837
93798
  [_common.ActionFunction.MicroFrontend]: '@modern-js/plugin-garfish',
92838
93799
  [_common.ActionFunction.I18n]: '@modern-js/plugin-i18n',
92839
93800
  [_common.ActionFunction.SSG]: '@modern-js/plugin-ssg',
92840
- [_common.ActionFunction.Polyfill]: '@modern-js/plugin-polyfill'
93801
+ [_common.ActionFunction.Polyfill]: '@modern-js/plugin-polyfill',
93802
+ [_common.ActionFunction.TailwindCSS]: 'tailwindcss'
92841
93803
  };
92842
93804
  exports.MWAActionFunctionsDependencies = MWAActionFunctionsDependencies;
92843
93805
  const MWAActionFunctionsAppendTypeContent = {
92844
93806
  [_common.ActionFunction.Test]: `/// <reference types='@modern-js/plugin-testing/type' />`,
92845
- [_common.ActionFunction.MicroFrontend]: `/// <reference types='@modern-js/plugin-garfish/type' />`
93807
+ [_common.ActionFunction.MicroFrontend]: `/// <reference types='@modern-js/plugin-garfish/type' />`,
93808
+ [_common.ActionFunction.TailwindCSS]: `/// <reference types='@modern-js/plugin-tailwindcss/types' />`
92846
93809
  };
92847
93810
  exports.MWAActionFunctionsAppendTypeContent = MWAActionFunctionsAppendTypeContent;
92848
93811
  const MWANewActionGenerators = {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.3.3",
14
+ "version": "1.3.4",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/js/node/main.js",
17
17
  "files": [
@@ -20,14 +20,14 @@
20
20
  ],
21
21
  "devDependencies": {
22
22
  "@babel/runtime": "^7",
23
- "@modern-js/base-generator": "^1.3.2",
23
+ "@modern-js/base-generator": "^1.3.3",
24
24
  "@modern-js/changeset-generator": "^1.2.2",
25
25
  "@modern-js/plugin-i18n": "^1.2.1",
26
26
  "@modern-js/codesmith": "^1.0.8",
27
27
  "@modern-js/codesmith-api-app": "^1.0.8",
28
28
  "@modern-js/codesmith-tools": "^1.0.9",
29
29
  "@modern-js/codesmith-api-json": "^1.0.7",
30
- "@modern-js/generator-common": "^1.4.3",
30
+ "@modern-js/generator-common": "^1.4.4",
31
31
  "@modern-js/generator-utils": "^1.2.1",
32
32
  "@scripts/build": "0.0.0",
33
33
  "@types/jest": "^26",
@@ -61,23 +61,21 @@
61
61
  //
62
62
  "cSpell.diagnosticLevel": "Hint",
63
63
  "[javascript]": {
64
- "editor.defaultFormatter": "dbaeumer.vscode-eslint"
64
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
65
65
  },
66
66
  "[javascriptreact]": {
67
- "editor.defaultFormatter": "dbaeumer.vscode-eslint"
67
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
68
68
  },
69
69
  "[typescript]": {
70
- "editor.defaultFormatter": "dbaeumer.vscode-eslint"
70
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
71
71
  },
72
72
  "[typescriptreact]": {
73
- "editor.defaultFormatter": "dbaeumer.vscode-eslint"
73
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
74
74
  },
75
75
  "[vue]": {
76
- "editor.defaultFormatter": "dbaeumer.vscode-eslint"
76
+ "editor.defaultFormatter": "esbenp.prettier-vscode"
77
77
  },
78
78
  "eslint.alwaysShowStatus": true,
79
- // "eslint.nodePath": "./node_modules",
80
- // "eslint.packageManager": "yarn",
81
79
  "eslint.run": "onType",
82
80
  "eslint.options": {
83
81
  "rules": {
@@ -154,4 +152,4 @@
154
152
  "typescript.tsdk": "node_modules/typescript/lib",
155
153
  "deno.enable": false
156
154
  }
157
- }
155
+ }
@@ -48,7 +48,6 @@
48
48
  ]
49
49
  },
50
50
  "devDependencies": {
51
- "@modern-js/core": "^1.0.0",
52
51
  "@modern-js/monorepo-tools": "^1.2.0",
53
52
  "@modern-js/plugin-jarvis": "^1.1.1"
54
53
  },