@vercel/ruby 2.4.0 → 2.5.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.
Files changed (2) hide show
  1. package/dist/index.js +307 -480
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -48,7 +48,7 @@ var require_windows = __commonJS({
48
48
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module2) {
49
49
  module2.exports = isexe;
50
50
  isexe.sync = sync;
51
- var fs2 = require("fs");
51
+ var fs = require("fs");
52
52
  function checkPathExt(path, options) {
53
53
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
54
54
  if (!pathext) {
@@ -73,12 +73,12 @@ var require_windows = __commonJS({
73
73
  return checkPathExt(path, options);
74
74
  }
75
75
  function isexe(path, options, cb) {
76
- fs2.stat(path, function(er, stat) {
76
+ fs.stat(path, function(er, stat) {
77
77
  cb(er, er ? false : checkStat(stat, path, options));
78
78
  });
79
79
  }
80
80
  function sync(path, options) {
81
- return checkStat(fs2.statSync(path), path, options);
81
+ return checkStat(fs.statSync(path), path, options);
82
82
  }
83
83
  }
84
84
  });
@@ -88,14 +88,14 @@ var require_mode = __commonJS({
88
88
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module2) {
89
89
  module2.exports = isexe;
90
90
  isexe.sync = sync;
91
- var fs2 = require("fs");
91
+ var fs = require("fs");
92
92
  function isexe(path, options, cb) {
93
- fs2.stat(path, function(er, stat) {
93
+ fs.stat(path, function(er, stat) {
94
94
  cb(er, er ? false : checkStat(stat, options));
95
95
  });
96
96
  }
97
97
  function sync(path, options) {
98
- return checkStat(fs2.statSync(path), options);
98
+ return checkStat(fs.statSync(path), options);
99
99
  }
100
100
  function checkStat(stat, options) {
101
101
  return stat.isFile() && checkMode(stat, options);
@@ -119,7 +119,7 @@ var require_mode = __commonJS({
119
119
  // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
120
120
  var require_isexe = __commonJS({
121
121
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module2) {
122
- var fs2 = require("fs");
122
+ var fs = require("fs");
123
123
  var core;
124
124
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
125
125
  core = require_windows();
@@ -395,7 +395,7 @@ var require_shebang_command = __commonJS({
395
395
  var require_readShebang = __commonJS({
396
396
  "../../node_modules/.pnpm/cross-spawn@6.0.5/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module2) {
397
397
  "use strict";
398
- var fs2 = require("fs");
398
+ var fs = require("fs");
399
399
  var shebangCommand = require_shebang_command();
400
400
  function readShebang(command) {
401
401
  const size = 150;
@@ -408,9 +408,9 @@ var require_readShebang = __commonJS({
408
408
  }
409
409
  let fd;
410
410
  try {
411
- fd = fs2.openSync(command, "r");
412
- fs2.readSync(fd, buffer, 0, size, 0);
413
- fs2.closeSync(fd);
411
+ fd = fs.openSync(command, "r");
412
+ fs.readSync(fd, buffer, 0, size, 0);
413
+ fs.closeSync(fd);
414
414
  } catch (e) {
415
415
  }
416
416
  return shebangCommand(buffer.toString());
@@ -2371,28 +2371,28 @@ var require_end_of_stream = __commonJS({
2371
2371
  }
2372
2372
  });
2373
2373
 
2374
- // ../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js
2374
+ // ../../node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js
2375
2375
  var require_pump = __commonJS({
2376
- "../../node_modules/.pnpm/pump@3.0.2/node_modules/pump/index.js"(exports, module2) {
2376
+ "../../node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js"(exports, module2) {
2377
2377
  var once = require_once();
2378
2378
  var eos = require_end_of_stream();
2379
- var fs2;
2379
+ var fs;
2380
2380
  try {
2381
- fs2 = require("fs");
2381
+ fs = require("fs");
2382
2382
  } catch (e) {
2383
2383
  }
2384
2384
  var noop = function() {
2385
2385
  };
2386
- var ancient = /^v?\.0/.test(process.version);
2386
+ var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version);
2387
2387
  var isFn = function(fn) {
2388
2388
  return typeof fn === "function";
2389
2389
  };
2390
2390
  var isFS = function(stream) {
2391
2391
  if (!ancient)
2392
2392
  return false;
2393
- if (!fs2)
2393
+ if (!fs)
2394
2394
  return false;
2395
- return (stream instanceof (fs2.ReadStream || noop) || stream instanceof (fs2.WriteStream || noop)) && isFn(stream.close);
2395
+ return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close);
2396
2396
  };
2397
2397
  var isRequest = function(stream) {
2398
2398
  return stream.setHeader && isFn(stream.abort);
@@ -3028,56 +3028,56 @@ var require_polyfills = __commonJS({
3028
3028
  }
3029
3029
  var chdir;
3030
3030
  module2.exports = patch;
3031
- function patch(fs2) {
3031
+ function patch(fs) {
3032
3032
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
3033
- patchLchmod(fs2);
3034
- }
3035
- if (!fs2.lutimes) {
3036
- patchLutimes(fs2);
3037
- }
3038
- fs2.chown = chownFix(fs2.chown);
3039
- fs2.fchown = chownFix(fs2.fchown);
3040
- fs2.lchown = chownFix(fs2.lchown);
3041
- fs2.chmod = chmodFix(fs2.chmod);
3042
- fs2.fchmod = chmodFix(fs2.fchmod);
3043
- fs2.lchmod = chmodFix(fs2.lchmod);
3044
- fs2.chownSync = chownFixSync(fs2.chownSync);
3045
- fs2.fchownSync = chownFixSync(fs2.fchownSync);
3046
- fs2.lchownSync = chownFixSync(fs2.lchownSync);
3047
- fs2.chmodSync = chmodFixSync(fs2.chmodSync);
3048
- fs2.fchmodSync = chmodFixSync(fs2.fchmodSync);
3049
- fs2.lchmodSync = chmodFixSync(fs2.lchmodSync);
3050
- fs2.stat = statFix(fs2.stat);
3051
- fs2.fstat = statFix(fs2.fstat);
3052
- fs2.lstat = statFix(fs2.lstat);
3053
- fs2.statSync = statFixSync(fs2.statSync);
3054
- fs2.fstatSync = statFixSync(fs2.fstatSync);
3055
- fs2.lstatSync = statFixSync(fs2.lstatSync);
3056
- if (fs2.chmod && !fs2.lchmod) {
3057
- fs2.lchmod = function(path, mode, cb) {
3033
+ patchLchmod(fs);
3034
+ }
3035
+ if (!fs.lutimes) {
3036
+ patchLutimes(fs);
3037
+ }
3038
+ fs.chown = chownFix(fs.chown);
3039
+ fs.fchown = chownFix(fs.fchown);
3040
+ fs.lchown = chownFix(fs.lchown);
3041
+ fs.chmod = chmodFix(fs.chmod);
3042
+ fs.fchmod = chmodFix(fs.fchmod);
3043
+ fs.lchmod = chmodFix(fs.lchmod);
3044
+ fs.chownSync = chownFixSync(fs.chownSync);
3045
+ fs.fchownSync = chownFixSync(fs.fchownSync);
3046
+ fs.lchownSync = chownFixSync(fs.lchownSync);
3047
+ fs.chmodSync = chmodFixSync(fs.chmodSync);
3048
+ fs.fchmodSync = chmodFixSync(fs.fchmodSync);
3049
+ fs.lchmodSync = chmodFixSync(fs.lchmodSync);
3050
+ fs.stat = statFix(fs.stat);
3051
+ fs.fstat = statFix(fs.fstat);
3052
+ fs.lstat = statFix(fs.lstat);
3053
+ fs.statSync = statFixSync(fs.statSync);
3054
+ fs.fstatSync = statFixSync(fs.fstatSync);
3055
+ fs.lstatSync = statFixSync(fs.lstatSync);
3056
+ if (fs.chmod && !fs.lchmod) {
3057
+ fs.lchmod = function(path, mode, cb) {
3058
3058
  if (cb)
3059
3059
  process.nextTick(cb);
3060
3060
  };
3061
- fs2.lchmodSync = function() {
3061
+ fs.lchmodSync = function() {
3062
3062
  };
3063
3063
  }
3064
- if (fs2.chown && !fs2.lchown) {
3065
- fs2.lchown = function(path, uid, gid, cb) {
3064
+ if (fs.chown && !fs.lchown) {
3065
+ fs.lchown = function(path, uid, gid, cb) {
3066
3066
  if (cb)
3067
3067
  process.nextTick(cb);
3068
3068
  };
3069
- fs2.lchownSync = function() {
3069
+ fs.lchownSync = function() {
3070
3070
  };
3071
3071
  }
3072
3072
  if (platform === "win32") {
3073
- fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) {
3073
+ fs.rename = typeof fs.rename !== "function" ? fs.rename : function(fs$rename) {
3074
3074
  function rename(from, to, cb) {
3075
3075
  var start = Date.now();
3076
3076
  var backoff = 0;
3077
3077
  fs$rename(from, to, function CB(er) {
3078
3078
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
3079
3079
  setTimeout(function() {
3080
- fs2.stat(to, function(stater, st) {
3080
+ fs.stat(to, function(stater, st) {
3081
3081
  if (stater && stater.code === "ENOENT")
3082
3082
  fs$rename(from, to, CB);
3083
3083
  else
@@ -3095,9 +3095,9 @@ var require_polyfills = __commonJS({
3095
3095
  if (Object.setPrototypeOf)
3096
3096
  Object.setPrototypeOf(rename, fs$rename);
3097
3097
  return rename;
3098
- }(fs2.rename);
3098
+ }(fs.rename);
3099
3099
  }
3100
- fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) {
3100
+ fs.read = typeof fs.read !== "function" ? fs.read : function(fs$read) {
3101
3101
  function read(fd, buffer, offset, length, position, callback_) {
3102
3102
  var callback;
3103
3103
  if (callback_ && typeof callback_ === "function") {
@@ -3105,23 +3105,23 @@ var require_polyfills = __commonJS({
3105
3105
  callback = function(er, _, __) {
3106
3106
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
3107
3107
  eagCounter++;
3108
- return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
3108
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
3109
3109
  }
3110
3110
  callback_.apply(this, arguments);
3111
3111
  };
3112
3112
  }
3113
- return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
3113
+ return fs$read.call(fs, fd, buffer, offset, length, position, callback);
3114
3114
  }
3115
3115
  if (Object.setPrototypeOf)
3116
3116
  Object.setPrototypeOf(read, fs$read);
3117
3117
  return read;
3118
- }(fs2.read);
3119
- fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : function(fs$readSync) {
3118
+ }(fs.read);
3119
+ fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : function(fs$readSync) {
3120
3120
  return function(fd, buffer, offset, length, position) {
3121
3121
  var eagCounter = 0;
3122
3122
  while (true) {
3123
3123
  try {
3124
- return fs$readSync.call(fs2, fd, buffer, offset, length, position);
3124
+ return fs$readSync.call(fs, fd, buffer, offset, length, position);
3125
3125
  } catch (er) {
3126
3126
  if (er.code === "EAGAIN" && eagCounter < 10) {
3127
3127
  eagCounter++;
@@ -3131,10 +3131,10 @@ var require_polyfills = __commonJS({
3131
3131
  }
3132
3132
  }
3133
3133
  };
3134
- }(fs2.readSync);
3135
- function patchLchmod(fs3) {
3136
- fs3.lchmod = function(path, mode, callback) {
3137
- fs3.open(
3134
+ }(fs.readSync);
3135
+ function patchLchmod(fs2) {
3136
+ fs2.lchmod = function(path, mode, callback) {
3137
+ fs2.open(
3138
3138
  path,
3139
3139
  constants.O_WRONLY | constants.O_SYMLINK,
3140
3140
  mode,
@@ -3144,8 +3144,8 @@ var require_polyfills = __commonJS({
3144
3144
  callback(err);
3145
3145
  return;
3146
3146
  }
3147
- fs3.fchmod(fd, mode, function(err2) {
3148
- fs3.close(fd, function(err22) {
3147
+ fs2.fchmod(fd, mode, function(err2) {
3148
+ fs2.close(fd, function(err22) {
3149
3149
  if (callback)
3150
3150
  callback(err2 || err22);
3151
3151
  });
@@ -3153,68 +3153,68 @@ var require_polyfills = __commonJS({
3153
3153
  }
3154
3154
  );
3155
3155
  };
3156
- fs3.lchmodSync = function(path, mode) {
3157
- var fd = fs3.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
3156
+ fs2.lchmodSync = function(path, mode) {
3157
+ var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
3158
3158
  var threw = true;
3159
3159
  var ret;
3160
3160
  try {
3161
- ret = fs3.fchmodSync(fd, mode);
3161
+ ret = fs2.fchmodSync(fd, mode);
3162
3162
  threw = false;
3163
3163
  } finally {
3164
3164
  if (threw) {
3165
3165
  try {
3166
- fs3.closeSync(fd);
3166
+ fs2.closeSync(fd);
3167
3167
  } catch (er) {
3168
3168
  }
3169
3169
  } else {
3170
- fs3.closeSync(fd);
3170
+ fs2.closeSync(fd);
3171
3171
  }
3172
3172
  }
3173
3173
  return ret;
3174
3174
  };
3175
3175
  }
3176
- function patchLutimes(fs3) {
3177
- if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
3178
- fs3.lutimes = function(path, at, mt, cb) {
3179
- fs3.open(path, constants.O_SYMLINK, function(er, fd) {
3176
+ function patchLutimes(fs2) {
3177
+ if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
3178
+ fs2.lutimes = function(path, at, mt, cb) {
3179
+ fs2.open(path, constants.O_SYMLINK, function(er, fd) {
3180
3180
  if (er) {
3181
3181
  if (cb)
3182
3182
  cb(er);
3183
3183
  return;
3184
3184
  }
3185
- fs3.futimes(fd, at, mt, function(er2) {
3186
- fs3.close(fd, function(er22) {
3185
+ fs2.futimes(fd, at, mt, function(er2) {
3186
+ fs2.close(fd, function(er22) {
3187
3187
  if (cb)
3188
3188
  cb(er2 || er22);
3189
3189
  });
3190
3190
  });
3191
3191
  });
3192
3192
  };
3193
- fs3.lutimesSync = function(path, at, mt) {
3194
- var fd = fs3.openSync(path, constants.O_SYMLINK);
3193
+ fs2.lutimesSync = function(path, at, mt) {
3194
+ var fd = fs2.openSync(path, constants.O_SYMLINK);
3195
3195
  var ret;
3196
3196
  var threw = true;
3197
3197
  try {
3198
- ret = fs3.futimesSync(fd, at, mt);
3198
+ ret = fs2.futimesSync(fd, at, mt);
3199
3199
  threw = false;
3200
3200
  } finally {
3201
3201
  if (threw) {
3202
3202
  try {
3203
- fs3.closeSync(fd);
3203
+ fs2.closeSync(fd);
3204
3204
  } catch (er) {
3205
3205
  }
3206
3206
  } else {
3207
- fs3.closeSync(fd);
3207
+ fs2.closeSync(fd);
3208
3208
  }
3209
3209
  }
3210
3210
  return ret;
3211
3211
  };
3212
- } else if (fs3.futimes) {
3213
- fs3.lutimes = function(_a, _b, _c, cb) {
3212
+ } else if (fs2.futimes) {
3213
+ fs2.lutimes = function(_a, _b, _c, cb) {
3214
3214
  if (cb)
3215
3215
  process.nextTick(cb);
3216
3216
  };
3217
- fs3.lutimesSync = function() {
3217
+ fs2.lutimesSync = function() {
3218
3218
  };
3219
3219
  }
3220
3220
  }
@@ -3222,7 +3222,7 @@ var require_polyfills = __commonJS({
3222
3222
  if (!orig)
3223
3223
  return orig;
3224
3224
  return function(target, mode, cb) {
3225
- return orig.call(fs2, target, mode, function(er) {
3225
+ return orig.call(fs, target, mode, function(er) {
3226
3226
  if (chownErOk(er))
3227
3227
  er = null;
3228
3228
  if (cb)
@@ -3235,7 +3235,7 @@ var require_polyfills = __commonJS({
3235
3235
  return orig;
3236
3236
  return function(target, mode) {
3237
3237
  try {
3238
- return orig.call(fs2, target, mode);
3238
+ return orig.call(fs, target, mode);
3239
3239
  } catch (er) {
3240
3240
  if (!chownErOk(er))
3241
3241
  throw er;
@@ -3246,7 +3246,7 @@ var require_polyfills = __commonJS({
3246
3246
  if (!orig)
3247
3247
  return orig;
3248
3248
  return function(target, uid, gid, cb) {
3249
- return orig.call(fs2, target, uid, gid, function(er) {
3249
+ return orig.call(fs, target, uid, gid, function(er) {
3250
3250
  if (chownErOk(er))
3251
3251
  er = null;
3252
3252
  if (cb)
@@ -3259,7 +3259,7 @@ var require_polyfills = __commonJS({
3259
3259
  return orig;
3260
3260
  return function(target, uid, gid) {
3261
3261
  try {
3262
- return orig.call(fs2, target, uid, gid);
3262
+ return orig.call(fs, target, uid, gid);
3263
3263
  } catch (er) {
3264
3264
  if (!chownErOk(er))
3265
3265
  throw er;
@@ -3284,14 +3284,14 @@ var require_polyfills = __commonJS({
3284
3284
  if (cb)
3285
3285
  cb.apply(this, arguments);
3286
3286
  }
3287
- return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback);
3287
+ return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
3288
3288
  };
3289
3289
  }
3290
3290
  function statFixSync(orig) {
3291
3291
  if (!orig)
3292
3292
  return orig;
3293
3293
  return function(target, options) {
3294
- var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target);
3294
+ var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
3295
3295
  if (stats) {
3296
3296
  if (stats.uid < 0)
3297
3297
  stats.uid += 4294967296;
@@ -3322,7 +3322,7 @@ var require_legacy_streams = __commonJS({
3322
3322
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
3323
3323
  var Stream = require("stream").Stream;
3324
3324
  module2.exports = legacy;
3325
- function legacy(fs2) {
3325
+ function legacy(fs) {
3326
3326
  return {
3327
3327
  ReadStream,
3328
3328
  WriteStream
@@ -3367,7 +3367,7 @@ var require_legacy_streams = __commonJS({
3367
3367
  });
3368
3368
  return;
3369
3369
  }
3370
- fs2.open(this.path, this.flags, this.mode, function(err, fd) {
3370
+ fs.open(this.path, this.flags, this.mode, function(err, fd) {
3371
3371
  if (err) {
3372
3372
  self.emit("error", err);
3373
3373
  self.readable = false;
@@ -3407,7 +3407,7 @@ var require_legacy_streams = __commonJS({
3407
3407
  this.busy = false;
3408
3408
  this._queue = [];
3409
3409
  if (this.fd === null) {
3410
- this._open = fs2.open;
3410
+ this._open = fs.open;
3411
3411
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
3412
3412
  this.flush();
3413
3413
  }
@@ -3442,7 +3442,7 @@ var require_clone = __commonJS({
3442
3442
  // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
3443
3443
  var require_graceful_fs = __commonJS({
3444
3444
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
3445
- var fs2 = require("fs");
3445
+ var fs = require("fs");
3446
3446
  var polyfills = require_polyfills();
3447
3447
  var legacy = require_legacy_streams();
3448
3448
  var clone = require_clone();
@@ -3474,12 +3474,12 @@ var require_graceful_fs = __commonJS({
3474
3474
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
3475
3475
  console.error(m);
3476
3476
  };
3477
- if (!fs2[gracefulQueue]) {
3477
+ if (!fs[gracefulQueue]) {
3478
3478
  queue = global[gracefulQueue] || [];
3479
- publishQueue(fs2, queue);
3480
- fs2.close = function(fs$close) {
3479
+ publishQueue(fs, queue);
3480
+ fs.close = function(fs$close) {
3481
3481
  function close(fd, cb) {
3482
- return fs$close.call(fs2, fd, function(err) {
3482
+ return fs$close.call(fs, fd, function(err) {
3483
3483
  if (!err) {
3484
3484
  resetQueue();
3485
3485
  }
@@ -3491,40 +3491,40 @@ var require_graceful_fs = __commonJS({
3491
3491
  value: fs$close
3492
3492
  });
3493
3493
  return close;
3494
- }(fs2.close);
3495
- fs2.closeSync = function(fs$closeSync) {
3494
+ }(fs.close);
3495
+ fs.closeSync = function(fs$closeSync) {
3496
3496
  function closeSync(fd) {
3497
- fs$closeSync.apply(fs2, arguments);
3497
+ fs$closeSync.apply(fs, arguments);
3498
3498
  resetQueue();
3499
3499
  }
3500
3500
  Object.defineProperty(closeSync, previousSymbol, {
3501
3501
  value: fs$closeSync
3502
3502
  });
3503
3503
  return closeSync;
3504
- }(fs2.closeSync);
3504
+ }(fs.closeSync);
3505
3505
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
3506
3506
  process.on("exit", function() {
3507
- debug4(fs2[gracefulQueue]);
3508
- require("assert").equal(fs2[gracefulQueue].length, 0);
3507
+ debug4(fs[gracefulQueue]);
3508
+ require("assert").equal(fs[gracefulQueue].length, 0);
3509
3509
  });
3510
3510
  }
3511
3511
  }
3512
3512
  var queue;
3513
3513
  if (!global[gracefulQueue]) {
3514
- publishQueue(global, fs2[gracefulQueue]);
3515
- }
3516
- module2.exports = patch(clone(fs2));
3517
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) {
3518
- module2.exports = patch(fs2);
3519
- fs2.__patched = true;
3520
- }
3521
- function patch(fs3) {
3522
- polyfills(fs3);
3523
- fs3.gracefulify = patch;
3524
- fs3.createReadStream = createReadStream;
3525
- fs3.createWriteStream = createWriteStream;
3526
- var fs$readFile = fs3.readFile;
3527
- fs3.readFile = readFile2;
3514
+ publishQueue(global, fs[gracefulQueue]);
3515
+ }
3516
+ module2.exports = patch(clone(fs));
3517
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
3518
+ module2.exports = patch(fs);
3519
+ fs.__patched = true;
3520
+ }
3521
+ function patch(fs2) {
3522
+ polyfills(fs2);
3523
+ fs2.gracefulify = patch;
3524
+ fs2.createReadStream = createReadStream;
3525
+ fs2.createWriteStream = createWriteStream;
3526
+ var fs$readFile = fs2.readFile;
3527
+ fs2.readFile = readFile2;
3528
3528
  function readFile2(path, options, cb) {
3529
3529
  if (typeof options === "function")
3530
3530
  cb = options, options = null;
@@ -3540,8 +3540,8 @@ var require_graceful_fs = __commonJS({
3540
3540
  });
3541
3541
  }
3542
3542
  }
3543
- var fs$writeFile = fs3.writeFile;
3544
- fs3.writeFile = writeFile2;
3543
+ var fs$writeFile = fs2.writeFile;
3544
+ fs2.writeFile = writeFile2;
3545
3545
  function writeFile2(path, data, options, cb) {
3546
3546
  if (typeof options === "function")
3547
3547
  cb = options, options = null;
@@ -3557,9 +3557,9 @@ var require_graceful_fs = __commonJS({
3557
3557
  });
3558
3558
  }
3559
3559
  }
3560
- var fs$appendFile = fs3.appendFile;
3560
+ var fs$appendFile = fs2.appendFile;
3561
3561
  if (fs$appendFile)
3562
- fs3.appendFile = appendFile;
3562
+ fs2.appendFile = appendFile;
3563
3563
  function appendFile(path, data, options, cb) {
3564
3564
  if (typeof options === "function")
3565
3565
  cb = options, options = null;
@@ -3575,9 +3575,9 @@ var require_graceful_fs = __commonJS({
3575
3575
  });
3576
3576
  }
3577
3577
  }
3578
- var fs$copyFile = fs3.copyFile;
3578
+ var fs$copyFile = fs2.copyFile;
3579
3579
  if (fs$copyFile)
3580
- fs3.copyFile = copyFile;
3580
+ fs2.copyFile = copyFile;
3581
3581
  function copyFile(src, dest, flags, cb) {
3582
3582
  if (typeof flags === "function") {
3583
3583
  cb = flags;
@@ -3595,8 +3595,8 @@ var require_graceful_fs = __commonJS({
3595
3595
  });
3596
3596
  }
3597
3597
  }
3598
- var fs$readdir = fs3.readdir;
3599
- fs3.readdir = readdir;
3598
+ var fs$readdir = fs2.readdir;
3599
+ fs2.readdir = readdir;
3600
3600
  var noReaddirOptionVersions = /^v[0-5]\./;
3601
3601
  function readdir(path, options, cb) {
3602
3602
  if (typeof options === "function")
@@ -3637,21 +3637,21 @@ var require_graceful_fs = __commonJS({
3637
3637
  }
3638
3638
  }
3639
3639
  if (process.version.substr(0, 4) === "v0.8") {
3640
- var legStreams = legacy(fs3);
3640
+ var legStreams = legacy(fs2);
3641
3641
  ReadStream = legStreams.ReadStream;
3642
3642
  WriteStream = legStreams.WriteStream;
3643
3643
  }
3644
- var fs$ReadStream = fs3.ReadStream;
3644
+ var fs$ReadStream = fs2.ReadStream;
3645
3645
  if (fs$ReadStream) {
3646
3646
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
3647
3647
  ReadStream.prototype.open = ReadStream$open;
3648
3648
  }
3649
- var fs$WriteStream = fs3.WriteStream;
3649
+ var fs$WriteStream = fs2.WriteStream;
3650
3650
  if (fs$WriteStream) {
3651
3651
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
3652
3652
  WriteStream.prototype.open = WriteStream$open;
3653
3653
  }
3654
- Object.defineProperty(fs3, "ReadStream", {
3654
+ Object.defineProperty(fs2, "ReadStream", {
3655
3655
  get: function() {
3656
3656
  return ReadStream;
3657
3657
  },
@@ -3661,7 +3661,7 @@ var require_graceful_fs = __commonJS({
3661
3661
  enumerable: true,
3662
3662
  configurable: true
3663
3663
  });
3664
- Object.defineProperty(fs3, "WriteStream", {
3664
+ Object.defineProperty(fs2, "WriteStream", {
3665
3665
  get: function() {
3666
3666
  return WriteStream;
3667
3667
  },
@@ -3672,7 +3672,7 @@ var require_graceful_fs = __commonJS({
3672
3672
  configurable: true
3673
3673
  });
3674
3674
  var FileReadStream = ReadStream;
3675
- Object.defineProperty(fs3, "FileReadStream", {
3675
+ Object.defineProperty(fs2, "FileReadStream", {
3676
3676
  get: function() {
3677
3677
  return FileReadStream;
3678
3678
  },
@@ -3683,7 +3683,7 @@ var require_graceful_fs = __commonJS({
3683
3683
  configurable: true
3684
3684
  });
3685
3685
  var FileWriteStream = WriteStream;
3686
- Object.defineProperty(fs3, "FileWriteStream", {
3686
+ Object.defineProperty(fs2, "FileWriteStream", {
3687
3687
  get: function() {
3688
3688
  return FileWriteStream;
3689
3689
  },
@@ -3732,13 +3732,13 @@ var require_graceful_fs = __commonJS({
3732
3732
  });
3733
3733
  }
3734
3734
  function createReadStream(path, options) {
3735
- return new fs3.ReadStream(path, options);
3735
+ return new fs2.ReadStream(path, options);
3736
3736
  }
3737
3737
  function createWriteStream(path, options) {
3738
- return new fs3.WriteStream(path, options);
3738
+ return new fs2.WriteStream(path, options);
3739
3739
  }
3740
- var fs$open = fs3.open;
3741
- fs3.open = open;
3740
+ var fs$open = fs2.open;
3741
+ fs2.open = open;
3742
3742
  function open(path, flags, mode, cb) {
3743
3743
  if (typeof mode === "function")
3744
3744
  cb = mode, mode = null;
@@ -3754,20 +3754,20 @@ var require_graceful_fs = __commonJS({
3754
3754
  });
3755
3755
  }
3756
3756
  }
3757
- return fs3;
3757
+ return fs2;
3758
3758
  }
3759
3759
  function enqueue(elem) {
3760
3760
  debug4("ENQUEUE", elem[0].name, elem[1]);
3761
- fs2[gracefulQueue].push(elem);
3761
+ fs[gracefulQueue].push(elem);
3762
3762
  retry();
3763
3763
  }
3764
3764
  var retryTimer;
3765
3765
  function resetQueue() {
3766
3766
  var now = Date.now();
3767
- for (var i = 0; i < fs2[gracefulQueue].length; ++i) {
3768
- if (fs2[gracefulQueue][i].length > 2) {
3769
- fs2[gracefulQueue][i][3] = now;
3770
- fs2[gracefulQueue][i][4] = now;
3767
+ for (var i = 0; i < fs[gracefulQueue].length; ++i) {
3768
+ if (fs[gracefulQueue][i].length > 2) {
3769
+ fs[gracefulQueue][i][3] = now;
3770
+ fs[gracefulQueue][i][4] = now;
3771
3771
  }
3772
3772
  }
3773
3773
  retry();
@@ -3775,9 +3775,9 @@ var require_graceful_fs = __commonJS({
3775
3775
  function retry() {
3776
3776
  clearTimeout(retryTimer);
3777
3777
  retryTimer = void 0;
3778
- if (fs2[gracefulQueue].length === 0)
3778
+ if (fs[gracefulQueue].length === 0)
3779
3779
  return;
3780
- var elem = fs2[gracefulQueue].shift();
3780
+ var elem = fs[gracefulQueue].shift();
3781
3781
  var fn = elem[0];
3782
3782
  var args = elem[1];
3783
3783
  var err = elem[2];
@@ -3799,7 +3799,7 @@ var require_graceful_fs = __commonJS({
3799
3799
  debug4("RETRY", fn.name, args);
3800
3800
  fn.apply(null, args.concat([startTime]));
3801
3801
  } else {
3802
- fs2[gracefulQueue].push(elem);
3802
+ fs[gracefulQueue].push(elem);
3803
3803
  }
3804
3804
  }
3805
3805
  if (retryTimer === void 0) {
@@ -3814,7 +3814,7 @@ var require_fs = __commonJS({
3814
3814
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/fs/index.js"(exports) {
3815
3815
  "use strict";
3816
3816
  var u = require_universalify().fromCallback;
3817
- var fs2 = require_graceful_fs();
3817
+ var fs = require_graceful_fs();
3818
3818
  var api = [
3819
3819
  "access",
3820
3820
  "appendFile",
@@ -3849,31 +3849,31 @@ var require_fs = __commonJS({
3849
3849
  "utimes",
3850
3850
  "writeFile"
3851
3851
  ].filter((key) => {
3852
- return typeof fs2[key] === "function";
3852
+ return typeof fs[key] === "function";
3853
3853
  });
3854
- Object.keys(fs2).forEach((key) => {
3854
+ Object.keys(fs).forEach((key) => {
3855
3855
  if (key === "promises") {
3856
3856
  return;
3857
3857
  }
3858
- exports[key] = fs2[key];
3858
+ exports[key] = fs[key];
3859
3859
  });
3860
3860
  api.forEach((method) => {
3861
- exports[method] = u(fs2[method]);
3861
+ exports[method] = u(fs[method]);
3862
3862
  });
3863
3863
  exports.exists = function(filename, callback) {
3864
3864
  if (typeof callback === "function") {
3865
- return fs2.exists(filename, callback);
3865
+ return fs.exists(filename, callback);
3866
3866
  }
3867
3867
  return new Promise((resolve) => {
3868
- return fs2.exists(filename, resolve);
3868
+ return fs.exists(filename, resolve);
3869
3869
  });
3870
3870
  };
3871
3871
  exports.read = function(fd, buffer, offset, length, position, callback) {
3872
3872
  if (typeof callback === "function") {
3873
- return fs2.read(fd, buffer, offset, length, position, callback);
3873
+ return fs.read(fd, buffer, offset, length, position, callback);
3874
3874
  }
3875
3875
  return new Promise((resolve, reject) => {
3876
- fs2.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
3876
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
3877
3877
  if (err)
3878
3878
  return reject(err);
3879
3879
  resolve({ bytesRead, buffer: buffer2 });
@@ -3882,10 +3882,10 @@ var require_fs = __commonJS({
3882
3882
  };
3883
3883
  exports.write = function(fd, buffer, ...args) {
3884
3884
  if (typeof args[args.length - 1] === "function") {
3885
- return fs2.write(fd, buffer, ...args);
3885
+ return fs.write(fd, buffer, ...args);
3886
3886
  }
3887
3887
  return new Promise((resolve, reject) => {
3888
- fs2.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
3888
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
3889
3889
  if (err)
3890
3890
  return reject(err);
3891
3891
  resolve({ bytesWritten, buffer: buffer2 });
@@ -3923,7 +3923,7 @@ var require_win32 = __commonJS({
3923
3923
  var require_mkdirs = __commonJS({
3924
3924
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs.js"(exports, module2) {
3925
3925
  "use strict";
3926
- var fs2 = require_graceful_fs();
3926
+ var fs = require_graceful_fs();
3927
3927
  var path = require("path");
3928
3928
  var invalidWin32Path = require_win32().invalidWin32Path;
3929
3929
  var o777 = parseInt("0777", 8);
@@ -3940,7 +3940,7 @@ var require_mkdirs = __commonJS({
3940
3940
  return callback(errInval);
3941
3941
  }
3942
3942
  let mode = opts.mode;
3943
- const xfs = opts.fs || fs2;
3943
+ const xfs = opts.fs || fs;
3944
3944
  if (mode === void 0) {
3945
3945
  mode = o777 & ~process.umask();
3946
3946
  }
@@ -3984,7 +3984,7 @@ var require_mkdirs = __commonJS({
3984
3984
  var require_mkdirs_sync = __commonJS({
3985
3985
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js"(exports, module2) {
3986
3986
  "use strict";
3987
- var fs2 = require_graceful_fs();
3987
+ var fs = require_graceful_fs();
3988
3988
  var path = require("path");
3989
3989
  var invalidWin32Path = require_win32().invalidWin32Path;
3990
3990
  var o777 = parseInt("0777", 8);
@@ -3993,7 +3993,7 @@ var require_mkdirs_sync = __commonJS({
3993
3993
  opts = { mode: opts };
3994
3994
  }
3995
3995
  let mode = opts.mode;
3996
- const xfs = opts.fs || fs2;
3996
+ const xfs = opts.fs || fs;
3997
3997
  if (process.platform === "win32" && invalidWin32Path(p)) {
3998
3998
  const errInval = new Error(p + " contains invalid WIN32 path characters.");
3999
3999
  errInval.code = "EINVAL";
@@ -4054,36 +4054,36 @@ var require_mkdirs2 = __commonJS({
4054
4054
  var require_utimes = __commonJS({
4055
4055
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/util/utimes.js"(exports, module2) {
4056
4056
  "use strict";
4057
- var fs2 = require_graceful_fs();
4057
+ var fs = require_graceful_fs();
4058
4058
  var os = require("os");
4059
4059
  var path = require("path");
4060
4060
  function hasMillisResSync() {
4061
4061
  let tmpfile = path.join("millis-test-sync" + Date.now().toString() + Math.random().toString().slice(2));
4062
4062
  tmpfile = path.join(os.tmpdir(), tmpfile);
4063
4063
  const d = /* @__PURE__ */ new Date(1435410243862);
4064
- fs2.writeFileSync(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141");
4065
- const fd = fs2.openSync(tmpfile, "r+");
4066
- fs2.futimesSync(fd, d, d);
4067
- fs2.closeSync(fd);
4068
- return fs2.statSync(tmpfile).mtime > 1435410243e3;
4064
+ fs.writeFileSync(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141");
4065
+ const fd = fs.openSync(tmpfile, "r+");
4066
+ fs.futimesSync(fd, d, d);
4067
+ fs.closeSync(fd);
4068
+ return fs.statSync(tmpfile).mtime > 1435410243e3;
4069
4069
  }
4070
4070
  function hasMillisRes(callback) {
4071
4071
  let tmpfile = path.join("millis-test" + Date.now().toString() + Math.random().toString().slice(2));
4072
4072
  tmpfile = path.join(os.tmpdir(), tmpfile);
4073
4073
  const d = /* @__PURE__ */ new Date(1435410243862);
4074
- fs2.writeFile(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141", (err) => {
4074
+ fs.writeFile(tmpfile, "https://github.com/jprichardson/node-fs-extra/pull/141", (err) => {
4075
4075
  if (err)
4076
4076
  return callback(err);
4077
- fs2.open(tmpfile, "r+", (err2, fd) => {
4077
+ fs.open(tmpfile, "r+", (err2, fd) => {
4078
4078
  if (err2)
4079
4079
  return callback(err2);
4080
- fs2.futimes(fd, d, d, (err3) => {
4080
+ fs.futimes(fd, d, d, (err3) => {
4081
4081
  if (err3)
4082
4082
  return callback(err3);
4083
- fs2.close(fd, (err4) => {
4083
+ fs.close(fd, (err4) => {
4084
4084
  if (err4)
4085
4085
  return callback(err4);
4086
- fs2.stat(tmpfile, (err5, stats) => {
4086
+ fs.stat(tmpfile, (err5, stats) => {
4087
4087
  if (err5)
4088
4088
  return callback(err5);
4089
4089
  callback(null, stats.mtime > 1435410243e3);
@@ -4103,11 +4103,11 @@ var require_utimes = __commonJS({
4103
4103
  }
4104
4104
  }
4105
4105
  function utimesMillis(path2, atime, mtime, callback) {
4106
- fs2.open(path2, "r+", (err, fd) => {
4106
+ fs.open(path2, "r+", (err, fd) => {
4107
4107
  if (err)
4108
4108
  return callback(err);
4109
- fs2.futimes(fd, atime, mtime, (futimesErr) => {
4110
- fs2.close(fd, (closeErr) => {
4109
+ fs.futimes(fd, atime, mtime, (futimesErr) => {
4110
+ fs.close(fd, (closeErr) => {
4111
4111
  if (callback)
4112
4112
  callback(futimesErr || closeErr);
4113
4113
  });
@@ -4115,9 +4115,9 @@ var require_utimes = __commonJS({
4115
4115
  });
4116
4116
  }
4117
4117
  function utimesMillisSync(path2, atime, mtime) {
4118
- const fd = fs2.openSync(path2, "r+");
4119
- fs2.futimesSync(fd, atime, mtime);
4120
- return fs2.closeSync(fd);
4118
+ const fd = fs.openSync(path2, "r+");
4119
+ fs.futimesSync(fd, atime, mtime);
4120
+ return fs.closeSync(fd);
4121
4121
  }
4122
4122
  module2.exports = {
4123
4123
  hasMillisRes,
@@ -4150,7 +4150,7 @@ var require_buffer = __commonJS({
4150
4150
  var require_copy_sync = __commonJS({
4151
4151
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy-sync/copy-sync.js"(exports, module2) {
4152
4152
  "use strict";
4153
- var fs2 = require_graceful_fs();
4153
+ var fs = require_graceful_fs();
4154
4154
  var path = require("path");
4155
4155
  var mkdirpSync = require_mkdirs2().mkdirsSync;
4156
4156
  var utimesSync = require_utimes().utimesMillisSync;
@@ -4171,7 +4171,7 @@ var require_copy_sync = __commonJS({
4171
4171
  if (opts.filter && !opts.filter(src, dest))
4172
4172
  return;
4173
4173
  const destParent = path.dirname(dest);
4174
- if (!fs2.existsSync(destParent))
4174
+ if (!fs.existsSync(destParent))
4175
4175
  mkdirpSync(destParent);
4176
4176
  return startCopy(destStat, src, dest, opts);
4177
4177
  }
@@ -4181,7 +4181,7 @@ var require_copy_sync = __commonJS({
4181
4181
  return getStats(destStat, src, dest, opts);
4182
4182
  }
4183
4183
  function getStats(destStat, src, dest, opts) {
4184
- const statSync = opts.dereference ? fs2.statSync : fs2.lstatSync;
4184
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync;
4185
4185
  const srcStat = statSync(src);
4186
4186
  if (srcStat.isDirectory())
4187
4187
  return onDir(srcStat, destStat, src, dest, opts);
@@ -4197,16 +4197,16 @@ var require_copy_sync = __commonJS({
4197
4197
  }
4198
4198
  function mayCopyFile(srcStat, src, dest, opts) {
4199
4199
  if (opts.overwrite) {
4200
- fs2.unlinkSync(dest);
4200
+ fs.unlinkSync(dest);
4201
4201
  return copyFile(srcStat, src, dest, opts);
4202
4202
  } else if (opts.errorOnExist) {
4203
4203
  throw new Error(`'${dest}' already exists`);
4204
4204
  }
4205
4205
  }
4206
4206
  function copyFile(srcStat, src, dest, opts) {
4207
- if (typeof fs2.copyFileSync === "function") {
4208
- fs2.copyFileSync(src, dest);
4209
- fs2.chmodSync(dest, srcStat.mode);
4207
+ if (typeof fs.copyFileSync === "function") {
4208
+ fs.copyFileSync(src, dest);
4209
+ fs.chmodSync(dest, srcStat.mode);
4210
4210
  if (opts.preserveTimestamps) {
4211
4211
  return utimesSync(dest, srcStat.atime, srcStat.mtime);
4212
4212
  }
@@ -4217,18 +4217,18 @@ var require_copy_sync = __commonJS({
4217
4217
  function copyFileFallback(srcStat, src, dest, opts) {
4218
4218
  const BUF_LENGTH = 64 * 1024;
4219
4219
  const _buff = require_buffer()(BUF_LENGTH);
4220
- const fdr = fs2.openSync(src, "r");
4221
- const fdw = fs2.openSync(dest, "w", srcStat.mode);
4220
+ const fdr = fs.openSync(src, "r");
4221
+ const fdw = fs.openSync(dest, "w", srcStat.mode);
4222
4222
  let pos = 0;
4223
4223
  while (pos < srcStat.size) {
4224
- const bytesRead = fs2.readSync(fdr, _buff, 0, BUF_LENGTH, pos);
4225
- fs2.writeSync(fdw, _buff, 0, bytesRead);
4224
+ const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos);
4225
+ fs.writeSync(fdw, _buff, 0, bytesRead);
4226
4226
  pos += bytesRead;
4227
4227
  }
4228
4228
  if (opts.preserveTimestamps)
4229
- fs2.futimesSync(fdw, srcStat.atime, srcStat.mtime);
4230
- fs2.closeSync(fdr);
4231
- fs2.closeSync(fdw);
4229
+ fs.futimesSync(fdw, srcStat.atime, srcStat.mtime);
4230
+ fs.closeSync(fdr);
4231
+ fs.closeSync(fdw);
4232
4232
  }
4233
4233
  function onDir(srcStat, destStat, src, dest, opts) {
4234
4234
  if (destStat === notExist)
@@ -4239,12 +4239,12 @@ var require_copy_sync = __commonJS({
4239
4239
  return copyDir(src, dest, opts);
4240
4240
  }
4241
4241
  function mkDirAndCopy(srcStat, src, dest, opts) {
4242
- fs2.mkdirSync(dest);
4242
+ fs.mkdirSync(dest);
4243
4243
  copyDir(src, dest, opts);
4244
- return fs2.chmodSync(dest, srcStat.mode);
4244
+ return fs.chmodSync(dest, srcStat.mode);
4245
4245
  }
4246
4246
  function copyDir(src, dest, opts) {
4247
- fs2.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
4247
+ fs.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
4248
4248
  }
4249
4249
  function copyDirItem(item, src, dest, opts) {
4250
4250
  const srcItem = path.join(src, item);
@@ -4253,19 +4253,19 @@ var require_copy_sync = __commonJS({
4253
4253
  return startCopy(destStat, srcItem, destItem, opts);
4254
4254
  }
4255
4255
  function onLink(destStat, src, dest, opts) {
4256
- let resolvedSrc = fs2.readlinkSync(src);
4256
+ let resolvedSrc = fs.readlinkSync(src);
4257
4257
  if (opts.dereference) {
4258
4258
  resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
4259
4259
  }
4260
4260
  if (destStat === notExist) {
4261
- return fs2.symlinkSync(resolvedSrc, dest);
4261
+ return fs.symlinkSync(resolvedSrc, dest);
4262
4262
  } else {
4263
4263
  let resolvedDest;
4264
4264
  try {
4265
- resolvedDest = fs2.readlinkSync(dest);
4265
+ resolvedDest = fs.readlinkSync(dest);
4266
4266
  } catch (err) {
4267
4267
  if (err.code === "EINVAL" || err.code === "UNKNOWN")
4268
- return fs2.symlinkSync(resolvedSrc, dest);
4268
+ return fs.symlinkSync(resolvedSrc, dest);
4269
4269
  throw err;
4270
4270
  }
4271
4271
  if (opts.dereference) {
@@ -4274,15 +4274,15 @@ var require_copy_sync = __commonJS({
4274
4274
  if (isSrcSubdir(resolvedSrc, resolvedDest)) {
4275
4275
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
4276
4276
  }
4277
- if (fs2.statSync(dest).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) {
4277
+ if (fs.statSync(dest).isDirectory() && isSrcSubdir(resolvedDest, resolvedSrc)) {
4278
4278
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
4279
4279
  }
4280
4280
  return copyLink(resolvedSrc, dest);
4281
4281
  }
4282
4282
  }
4283
4283
  function copyLink(resolvedSrc, dest) {
4284
- fs2.unlinkSync(dest);
4285
- return fs2.symlinkSync(resolvedSrc, dest);
4284
+ fs.unlinkSync(dest);
4285
+ return fs.symlinkSync(resolvedSrc, dest);
4286
4286
  }
4287
4287
  function isSrcSubdir(src, dest) {
4288
4288
  const srcArray = path.resolve(src).split(path.sep);
@@ -4290,10 +4290,10 @@ var require_copy_sync = __commonJS({
4290
4290
  return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true);
4291
4291
  }
4292
4292
  function checkStats(src, dest) {
4293
- const srcStat = fs2.statSync(src);
4293
+ const srcStat = fs.statSync(src);
4294
4294
  let destStat;
4295
4295
  try {
4296
- destStat = fs2.statSync(dest);
4296
+ destStat = fs.statSync(dest);
4297
4297
  } catch (err) {
4298
4298
  if (err.code === "ENOENT")
4299
4299
  return { srcStat, destStat: notExist };
@@ -4330,13 +4330,13 @@ var require_path_exists = __commonJS({
4330
4330
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/path-exists/index.js"(exports, module2) {
4331
4331
  "use strict";
4332
4332
  var u = require_universalify().fromPromise;
4333
- var fs2 = require_fs();
4333
+ var fs = require_fs();
4334
4334
  function pathExists2(path) {
4335
- return fs2.access(path).then(() => true).catch(() => false);
4335
+ return fs.access(path).then(() => true).catch(() => false);
4336
4336
  }
4337
4337
  module2.exports = {
4338
4338
  pathExists: u(pathExists2),
4339
- pathExistsSync: fs2.existsSync
4339
+ pathExistsSync: fs.existsSync
4340
4340
  };
4341
4341
  }
4342
4342
  });
@@ -4345,7 +4345,7 @@ var require_path_exists = __commonJS({
4345
4345
  var require_copy = __commonJS({
4346
4346
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
4347
4347
  "use strict";
4348
- var fs2 = require_graceful_fs();
4348
+ var fs = require_graceful_fs();
4349
4349
  var path = require("path");
4350
4350
  var mkdirp = require_mkdirs2().mkdirs;
4351
4351
  var pathExists2 = require_path_exists().pathExists;
@@ -4406,7 +4406,7 @@ var require_copy = __commonJS({
4406
4406
  return getStats(destStat, src, dest, opts, cb);
4407
4407
  }
4408
4408
  function getStats(destStat, src, dest, opts, cb) {
4409
- const stat = opts.dereference ? fs2.stat : fs2.lstat;
4409
+ const stat = opts.dereference ? fs.stat : fs.lstat;
4410
4410
  stat(src, (err, srcStat) => {
4411
4411
  if (err)
4412
4412
  return cb(err);
@@ -4425,7 +4425,7 @@ var require_copy = __commonJS({
4425
4425
  }
4426
4426
  function mayCopyFile(srcStat, src, dest, opts, cb) {
4427
4427
  if (opts.overwrite) {
4428
- fs2.unlink(dest, (err) => {
4428
+ fs.unlink(dest, (err) => {
4429
4429
  if (err)
4430
4430
  return cb(err);
4431
4431
  return copyFile(srcStat, src, dest, opts, cb);
@@ -4436,8 +4436,8 @@ var require_copy = __commonJS({
4436
4436
  return cb();
4437
4437
  }
4438
4438
  function copyFile(srcStat, src, dest, opts, cb) {
4439
- if (typeof fs2.copyFile === "function") {
4440
- return fs2.copyFile(src, dest, (err) => {
4439
+ if (typeof fs.copyFile === "function") {
4440
+ return fs.copyFile(src, dest, (err) => {
4441
4441
  if (err)
4442
4442
  return cb(err);
4443
4443
  return setDestModeAndTimestamps(srcStat, dest, opts, cb);
@@ -4446,14 +4446,14 @@ var require_copy = __commonJS({
4446
4446
  return copyFileFallback(srcStat, src, dest, opts, cb);
4447
4447
  }
4448
4448
  function copyFileFallback(srcStat, src, dest, opts, cb) {
4449
- const rs = fs2.createReadStream(src);
4449
+ const rs = fs.createReadStream(src);
4450
4450
  rs.on("error", (err) => cb(err)).once("open", () => {
4451
- const ws = fs2.createWriteStream(dest, { mode: srcStat.mode });
4451
+ const ws = fs.createWriteStream(dest, { mode: srcStat.mode });
4452
4452
  ws.on("error", (err) => cb(err)).on("open", () => rs.pipe(ws)).once("close", () => setDestModeAndTimestamps(srcStat, dest, opts, cb));
4453
4453
  });
4454
4454
  }
4455
4455
  function setDestModeAndTimestamps(srcStat, dest, opts, cb) {
4456
- fs2.chmod(dest, srcStat.mode, (err) => {
4456
+ fs.chmod(dest, srcStat.mode, (err) => {
4457
4457
  if (err)
4458
4458
  return cb(err);
4459
4459
  if (opts.preserveTimestamps) {
@@ -4471,18 +4471,18 @@ var require_copy = __commonJS({
4471
4471
  return copyDir(src, dest, opts, cb);
4472
4472
  }
4473
4473
  function mkDirAndCopy(srcStat, src, dest, opts, cb) {
4474
- fs2.mkdir(dest, (err) => {
4474
+ fs.mkdir(dest, (err) => {
4475
4475
  if (err)
4476
4476
  return cb(err);
4477
4477
  copyDir(src, dest, opts, (err2) => {
4478
4478
  if (err2)
4479
4479
  return cb(err2);
4480
- return fs2.chmod(dest, srcStat.mode, cb);
4480
+ return fs.chmod(dest, srcStat.mode, cb);
4481
4481
  });
4482
4482
  });
4483
4483
  }
4484
4484
  function copyDir(src, dest, opts, cb) {
4485
- fs2.readdir(src, (err, items) => {
4485
+ fs.readdir(src, (err, items) => {
4486
4486
  if (err)
4487
4487
  return cb(err);
4488
4488
  return copyDirItems(items, src, dest, opts, cb);
@@ -4508,19 +4508,19 @@ var require_copy = __commonJS({
4508
4508
  });
4509
4509
  }
4510
4510
  function onLink(destStat, src, dest, opts, cb) {
4511
- fs2.readlink(src, (err, resolvedSrc) => {
4511
+ fs.readlink(src, (err, resolvedSrc) => {
4512
4512
  if (err)
4513
4513
  return cb(err);
4514
4514
  if (opts.dereference) {
4515
4515
  resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
4516
4516
  }
4517
4517
  if (destStat === notExist) {
4518
- return fs2.symlink(resolvedSrc, dest, cb);
4518
+ return fs.symlink(resolvedSrc, dest, cb);
4519
4519
  } else {
4520
- fs2.readlink(dest, (err2, resolvedDest) => {
4520
+ fs.readlink(dest, (err2, resolvedDest) => {
4521
4521
  if (err2) {
4522
4522
  if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
4523
- return fs2.symlink(resolvedSrc, dest, cb);
4523
+ return fs.symlink(resolvedSrc, dest, cb);
4524
4524
  return cb(err2);
4525
4525
  }
4526
4526
  if (opts.dereference) {
@@ -4538,10 +4538,10 @@ var require_copy = __commonJS({
4538
4538
  });
4539
4539
  }
4540
4540
  function copyLink(resolvedSrc, dest, cb) {
4541
- fs2.unlink(dest, (err) => {
4541
+ fs.unlink(dest, (err) => {
4542
4542
  if (err)
4543
4543
  return cb(err);
4544
- return fs2.symlink(resolvedSrc, dest, cb);
4544
+ return fs.symlink(resolvedSrc, dest, cb);
4545
4545
  });
4546
4546
  }
4547
4547
  function isSrcSubdir(src, dest) {
@@ -4550,10 +4550,10 @@ var require_copy = __commonJS({
4550
4550
  return srcArray.reduce((acc, current, i) => acc && destArray[i] === current, true);
4551
4551
  }
4552
4552
  function checkStats(src, dest, cb) {
4553
- fs2.stat(src, (err, srcStat) => {
4553
+ fs.stat(src, (err, srcStat) => {
4554
4554
  if (err)
4555
4555
  return cb(err);
4556
- fs2.stat(dest, (err2, destStat) => {
4556
+ fs.stat(dest, (err2, destStat) => {
4557
4557
  if (err2) {
4558
4558
  if (err2.code === "ENOENT")
4559
4559
  return cb(null, { srcStat, destStat: notExist });
@@ -4596,7 +4596,7 @@ var require_copy2 = __commonJS({
4596
4596
  var require_rimraf = __commonJS({
4597
4597
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/remove/rimraf.js"(exports, module2) {
4598
4598
  "use strict";
4599
- var fs2 = require_graceful_fs();
4599
+ var fs = require_graceful_fs();
4600
4600
  var path = require("path");
4601
4601
  var assert = require("assert");
4602
4602
  var isWindows = process.platform === "win32";
@@ -4610,9 +4610,9 @@ var require_rimraf = __commonJS({
4610
4610
  "readdir"
4611
4611
  ];
4612
4612
  methods.forEach((m) => {
4613
- options[m] = options[m] || fs2[m];
4613
+ options[m] = options[m] || fs[m];
4614
4614
  m = m + "Sync";
4615
- options[m] = options[m] || fs2[m];
4615
+ options[m] = options[m] || fs[m];
4616
4616
  });
4617
4617
  options.maxBusyTries = options.maxBusyTries || 3;
4618
4618
  }
@@ -4861,14 +4861,14 @@ var require_empty = __commonJS({
4861
4861
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/empty/index.js"(exports, module2) {
4862
4862
  "use strict";
4863
4863
  var u = require_universalify().fromCallback;
4864
- var fs2 = require("fs");
4864
+ var fs = require("fs");
4865
4865
  var path = require("path");
4866
4866
  var mkdir = require_mkdirs2();
4867
4867
  var remove2 = require_remove();
4868
4868
  var emptyDir = u(function emptyDir2(dir, callback) {
4869
4869
  callback = callback || function() {
4870
4870
  };
4871
- fs2.readdir(dir, (err, items) => {
4871
+ fs.readdir(dir, (err, items) => {
4872
4872
  if (err)
4873
4873
  return mkdir.mkdirs(dir, callback);
4874
4874
  items = items.map((item) => path.join(dir, item));
@@ -4888,7 +4888,7 @@ var require_empty = __commonJS({
4888
4888
  function emptyDirSync(dir) {
4889
4889
  let items;
4890
4890
  try {
4891
- items = fs2.readdirSync(dir);
4891
+ items = fs.readdirSync(dir);
4892
4892
  } catch (err) {
4893
4893
  return mkdir.mkdirsSync(dir);
4894
4894
  }
@@ -4912,18 +4912,18 @@ var require_file = __commonJS({
4912
4912
  "use strict";
4913
4913
  var u = require_universalify().fromCallback;
4914
4914
  var path = require("path");
4915
- var fs2 = require_graceful_fs();
4915
+ var fs = require_graceful_fs();
4916
4916
  var mkdir = require_mkdirs2();
4917
4917
  var pathExists2 = require_path_exists().pathExists;
4918
4918
  function createFile(file, callback) {
4919
4919
  function makeFile() {
4920
- fs2.writeFile(file, "", (err) => {
4920
+ fs.writeFile(file, "", (err) => {
4921
4921
  if (err)
4922
4922
  return callback(err);
4923
4923
  callback();
4924
4924
  });
4925
4925
  }
4926
- fs2.stat(file, (err, stats) => {
4926
+ fs.stat(file, (err, stats) => {
4927
4927
  if (!err && stats.isFile())
4928
4928
  return callback();
4929
4929
  const dir = path.dirname(file);
@@ -4943,16 +4943,16 @@ var require_file = __commonJS({
4943
4943
  function createFileSync(file) {
4944
4944
  let stats;
4945
4945
  try {
4946
- stats = fs2.statSync(file);
4946
+ stats = fs.statSync(file);
4947
4947
  } catch (e) {
4948
4948
  }
4949
4949
  if (stats && stats.isFile())
4950
4950
  return;
4951
4951
  const dir = path.dirname(file);
4952
- if (!fs2.existsSync(dir)) {
4952
+ if (!fs.existsSync(dir)) {
4953
4953
  mkdir.mkdirsSync(dir);
4954
4954
  }
4955
- fs2.writeFileSync(file, "");
4955
+ fs.writeFileSync(file, "");
4956
4956
  }
4957
4957
  module2.exports = {
4958
4958
  createFile: u(createFile),
@@ -4967,12 +4967,12 @@ var require_link = __commonJS({
4967
4967
  "use strict";
4968
4968
  var u = require_universalify().fromCallback;
4969
4969
  var path = require("path");
4970
- var fs2 = require_graceful_fs();
4970
+ var fs = require_graceful_fs();
4971
4971
  var mkdir = require_mkdirs2();
4972
4972
  var pathExists2 = require_path_exists().pathExists;
4973
4973
  function createLink(srcpath, dstpath, callback) {
4974
4974
  function makeLink(srcpath2, dstpath2) {
4975
- fs2.link(srcpath2, dstpath2, (err) => {
4975
+ fs.link(srcpath2, dstpath2, (err) => {
4976
4976
  if (err)
4977
4977
  return callback(err);
4978
4978
  callback(null);
@@ -4983,7 +4983,7 @@ var require_link = __commonJS({
4983
4983
  return callback(err);
4984
4984
  if (destinationExists)
4985
4985
  return callback(null);
4986
- fs2.lstat(srcpath, (err2) => {
4986
+ fs.lstat(srcpath, (err2) => {
4987
4987
  if (err2) {
4988
4988
  err2.message = err2.message.replace("lstat", "ensureLink");
4989
4989
  return callback(err2);
@@ -5004,21 +5004,21 @@ var require_link = __commonJS({
5004
5004
  });
5005
5005
  }
5006
5006
  function createLinkSync(srcpath, dstpath) {
5007
- const destinationExists = fs2.existsSync(dstpath);
5007
+ const destinationExists = fs.existsSync(dstpath);
5008
5008
  if (destinationExists)
5009
5009
  return void 0;
5010
5010
  try {
5011
- fs2.lstatSync(srcpath);
5011
+ fs.lstatSync(srcpath);
5012
5012
  } catch (err) {
5013
5013
  err.message = err.message.replace("lstat", "ensureLink");
5014
5014
  throw err;
5015
5015
  }
5016
5016
  const dir = path.dirname(dstpath);
5017
- const dirExists = fs2.existsSync(dir);
5017
+ const dirExists = fs.existsSync(dir);
5018
5018
  if (dirExists)
5019
- return fs2.linkSync(srcpath, dstpath);
5019
+ return fs.linkSync(srcpath, dstpath);
5020
5020
  mkdir.mkdirsSync(dir);
5021
- return fs2.linkSync(srcpath, dstpath);
5021
+ return fs.linkSync(srcpath, dstpath);
5022
5022
  }
5023
5023
  module2.exports = {
5024
5024
  createLink: u(createLink),
@@ -5032,11 +5032,11 @@ var require_symlink_paths = __commonJS({
5032
5032
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
5033
5033
  "use strict";
5034
5034
  var path = require("path");
5035
- var fs2 = require_graceful_fs();
5035
+ var fs = require_graceful_fs();
5036
5036
  var pathExists2 = require_path_exists().pathExists;
5037
5037
  function symlinkPaths(srcpath, dstpath, callback) {
5038
5038
  if (path.isAbsolute(srcpath)) {
5039
- return fs2.lstat(srcpath, (err) => {
5039
+ return fs.lstat(srcpath, (err) => {
5040
5040
  if (err) {
5041
5041
  err.message = err.message.replace("lstat", "ensureSymlink");
5042
5042
  return callback(err);
@@ -5058,7 +5058,7 @@ var require_symlink_paths = __commonJS({
5058
5058
  "toDst": srcpath
5059
5059
  });
5060
5060
  } else {
5061
- return fs2.lstat(srcpath, (err2) => {
5061
+ return fs.lstat(srcpath, (err2) => {
5062
5062
  if (err2) {
5063
5063
  err2.message = err2.message.replace("lstat", "ensureSymlink");
5064
5064
  return callback(err2);
@@ -5075,7 +5075,7 @@ var require_symlink_paths = __commonJS({
5075
5075
  function symlinkPathsSync(srcpath, dstpath) {
5076
5076
  let exists;
5077
5077
  if (path.isAbsolute(srcpath)) {
5078
- exists = fs2.existsSync(srcpath);
5078
+ exists = fs.existsSync(srcpath);
5079
5079
  if (!exists)
5080
5080
  throw new Error("absolute srcpath does not exist");
5081
5081
  return {
@@ -5085,14 +5085,14 @@ var require_symlink_paths = __commonJS({
5085
5085
  } else {
5086
5086
  const dstdir = path.dirname(dstpath);
5087
5087
  const relativeToDst = path.join(dstdir, srcpath);
5088
- exists = fs2.existsSync(relativeToDst);
5088
+ exists = fs.existsSync(relativeToDst);
5089
5089
  if (exists) {
5090
5090
  return {
5091
5091
  "toCwd": relativeToDst,
5092
5092
  "toDst": srcpath
5093
5093
  };
5094
5094
  } else {
5095
- exists = fs2.existsSync(srcpath);
5095
+ exists = fs.existsSync(srcpath);
5096
5096
  if (!exists)
5097
5097
  throw new Error("relative srcpath does not exist");
5098
5098
  return {
@@ -5113,13 +5113,13 @@ var require_symlink_paths = __commonJS({
5113
5113
  var require_symlink_type = __commonJS({
5114
5114
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
5115
5115
  "use strict";
5116
- var fs2 = require_graceful_fs();
5116
+ var fs = require_graceful_fs();
5117
5117
  function symlinkType(srcpath, type, callback) {
5118
5118
  callback = typeof type === "function" ? type : callback;
5119
5119
  type = typeof type === "function" ? false : type;
5120
5120
  if (type)
5121
5121
  return callback(null, type);
5122
- fs2.lstat(srcpath, (err, stats) => {
5122
+ fs.lstat(srcpath, (err, stats) => {
5123
5123
  if (err)
5124
5124
  return callback(null, "file");
5125
5125
  type = stats && stats.isDirectory() ? "dir" : "file";
@@ -5131,7 +5131,7 @@ var require_symlink_type = __commonJS({
5131
5131
  if (type)
5132
5132
  return type;
5133
5133
  try {
5134
- stats = fs2.lstatSync(srcpath);
5134
+ stats = fs.lstatSync(srcpath);
5135
5135
  } catch (e) {
5136
5136
  return "file";
5137
5137
  }
@@ -5150,7 +5150,7 @@ var require_symlink = __commonJS({
5150
5150
  "use strict";
5151
5151
  var u = require_universalify().fromCallback;
5152
5152
  var path = require("path");
5153
- var fs2 = require_graceful_fs();
5153
+ var fs = require_graceful_fs();
5154
5154
  var _mkdirs = require_mkdirs2();
5155
5155
  var mkdirs = _mkdirs.mkdirs;
5156
5156
  var mkdirsSync = _mkdirs.mkdirsSync;
@@ -5181,11 +5181,11 @@ var require_symlink = __commonJS({
5181
5181
  if (err4)
5182
5182
  return callback(err4);
5183
5183
  if (dirExists)
5184
- return fs2.symlink(srcpath, dstpath, type2, callback);
5184
+ return fs.symlink(srcpath, dstpath, type2, callback);
5185
5185
  mkdirs(dir, (err5) => {
5186
5186
  if (err5)
5187
5187
  return callback(err5);
5188
- fs2.symlink(srcpath, dstpath, type2, callback);
5188
+ fs.symlink(srcpath, dstpath, type2, callback);
5189
5189
  });
5190
5190
  });
5191
5191
  });
@@ -5193,18 +5193,18 @@ var require_symlink = __commonJS({
5193
5193
  });
5194
5194
  }
5195
5195
  function createSymlinkSync(srcpath, dstpath, type) {
5196
- const destinationExists = fs2.existsSync(dstpath);
5196
+ const destinationExists = fs.existsSync(dstpath);
5197
5197
  if (destinationExists)
5198
5198
  return void 0;
5199
5199
  const relative = symlinkPathsSync(srcpath, dstpath);
5200
5200
  srcpath = relative.toDst;
5201
5201
  type = symlinkTypeSync(relative.toCwd, type);
5202
5202
  const dir = path.dirname(dstpath);
5203
- const exists = fs2.existsSync(dir);
5203
+ const exists = fs.existsSync(dir);
5204
5204
  if (exists)
5205
- return fs2.symlinkSync(srcpath, dstpath, type);
5205
+ return fs.symlinkSync(srcpath, dstpath, type);
5206
5206
  mkdirsSync(dir);
5207
- return fs2.symlinkSync(srcpath, dstpath, type);
5207
+ return fs.symlinkSync(srcpath, dstpath, type);
5208
5208
  }
5209
5209
  module2.exports = {
5210
5210
  createSymlink: u(createSymlink),
@@ -5258,12 +5258,12 @@ var require_jsonfile = __commonJS({
5258
5258
  options = { encoding: options };
5259
5259
  }
5260
5260
  options = options || {};
5261
- var fs2 = options.fs || _fs;
5261
+ var fs = options.fs || _fs;
5262
5262
  var shouldThrow = true;
5263
5263
  if ("throws" in options) {
5264
5264
  shouldThrow = options.throws;
5265
5265
  }
5266
- fs2.readFile(file, options, function(err, data) {
5266
+ fs.readFile(file, options, function(err, data) {
5267
5267
  if (err)
5268
5268
  return callback(err);
5269
5269
  data = stripBom(data);
@@ -5286,13 +5286,13 @@ var require_jsonfile = __commonJS({
5286
5286
  if (typeof options === "string") {
5287
5287
  options = { encoding: options };
5288
5288
  }
5289
- var fs2 = options.fs || _fs;
5289
+ var fs = options.fs || _fs;
5290
5290
  var shouldThrow = true;
5291
5291
  if ("throws" in options) {
5292
5292
  shouldThrow = options.throws;
5293
5293
  }
5294
5294
  try {
5295
- var content = fs2.readFileSync(file, options);
5295
+ var content = fs.readFileSync(file, options);
5296
5296
  content = stripBom(content);
5297
5297
  return JSON.parse(content, options.reviver);
5298
5298
  } catch (err) {
@@ -5324,7 +5324,7 @@ var require_jsonfile = __commonJS({
5324
5324
  options = {};
5325
5325
  }
5326
5326
  options = options || {};
5327
- var fs2 = options.fs || _fs;
5327
+ var fs = options.fs || _fs;
5328
5328
  var str = "";
5329
5329
  try {
5330
5330
  str = stringify(obj, options);
@@ -5333,13 +5333,13 @@ var require_jsonfile = __commonJS({
5333
5333
  callback(err, null);
5334
5334
  return;
5335
5335
  }
5336
- fs2.writeFile(file, str, options, callback);
5336
+ fs.writeFile(file, str, options, callback);
5337
5337
  }
5338
5338
  function writeFileSync2(file, obj, options) {
5339
5339
  options = options || {};
5340
- var fs2 = options.fs || _fs;
5340
+ var fs = options.fs || _fs;
5341
5341
  var str = stringify(obj, options);
5342
- return fs2.writeFileSync(file, str, options);
5342
+ return fs.writeFileSync(file, str, options);
5343
5343
  }
5344
5344
  function stripBom(content) {
5345
5345
  if (Buffer.isBuffer(content))
@@ -5407,13 +5407,13 @@ var require_output_json = __commonJS({
5407
5407
  var require_output_json_sync = __commonJS({
5408
5408
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module2) {
5409
5409
  "use strict";
5410
- var fs2 = require_graceful_fs();
5410
+ var fs = require_graceful_fs();
5411
5411
  var path = require("path");
5412
5412
  var mkdir = require_mkdirs2();
5413
5413
  var jsonFile = require_jsonfile2();
5414
5414
  function outputJsonSync(file, data, options) {
5415
5415
  const dir = path.dirname(file);
5416
- if (!fs2.existsSync(dir)) {
5416
+ if (!fs.existsSync(dir)) {
5417
5417
  mkdir.mkdirsSync(dir);
5418
5418
  }
5419
5419
  jsonFile.writeJsonSync(file, data, options);
@@ -5444,7 +5444,7 @@ var require_json = __commonJS({
5444
5444
  var require_move_sync = __commonJS({
5445
5445
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/move-sync/index.js"(exports, module2) {
5446
5446
  "use strict";
5447
- var fs2 = require_graceful_fs();
5447
+ var fs = require_graceful_fs();
5448
5448
  var path = require("path");
5449
5449
  var copySync = require_copy_sync2().copySync;
5450
5450
  var removeSync = require_remove().removeSync;
@@ -5456,7 +5456,7 @@ var require_move_sync = __commonJS({
5456
5456
  src = path.resolve(src);
5457
5457
  dest = path.resolve(dest);
5458
5458
  if (src === dest)
5459
- return fs2.accessSync(src);
5459
+ return fs.accessSync(src);
5460
5460
  if (isSrcSubdir(src, dest))
5461
5461
  throw new Error(`Cannot move '${src}' into itself '${dest}'.`);
5462
5462
  mkdirpSync(path.dirname(dest));
@@ -5464,7 +5464,7 @@ var require_move_sync = __commonJS({
5464
5464
  function tryRenameSync() {
5465
5465
  if (overwrite) {
5466
5466
  try {
5467
- return fs2.renameSync(src, dest);
5467
+ return fs.renameSync(src, dest);
5468
5468
  } catch (err) {
5469
5469
  if (err.code === "ENOTEMPTY" || err.code === "EEXIST" || err.code === "EPERM") {
5470
5470
  removeSync(dest);
@@ -5477,8 +5477,8 @@ var require_move_sync = __commonJS({
5477
5477
  }
5478
5478
  } else {
5479
5479
  try {
5480
- fs2.linkSync(src, dest);
5481
- return fs2.unlinkSync(src);
5480
+ fs.linkSync(src, dest);
5481
+ return fs.unlinkSync(src);
5482
5482
  } catch (err) {
5483
5483
  if (err.code === "EXDEV" || err.code === "EISDIR" || err.code === "EPERM" || err.code === "ENOTSUP") {
5484
5484
  return moveSyncAcrossDevice(src, dest, overwrite);
@@ -5489,7 +5489,7 @@ var require_move_sync = __commonJS({
5489
5489
  }
5490
5490
  }
5491
5491
  function moveSyncAcrossDevice(src, dest, overwrite) {
5492
- const stat = fs2.statSync(src);
5492
+ const stat = fs.statSync(src);
5493
5493
  if (stat.isDirectory()) {
5494
5494
  return moveDirSyncAcrossDevice(src, dest, overwrite);
5495
5495
  } else {
@@ -5500,18 +5500,18 @@ var require_move_sync = __commonJS({
5500
5500
  const BUF_LENGTH = 64 * 1024;
5501
5501
  const _buff = buffer(BUF_LENGTH);
5502
5502
  const flags = overwrite ? "w" : "wx";
5503
- const fdr = fs2.openSync(src, "r");
5504
- const stat = fs2.fstatSync(fdr);
5505
- const fdw = fs2.openSync(dest, flags, stat.mode);
5503
+ const fdr = fs.openSync(src, "r");
5504
+ const stat = fs.fstatSync(fdr);
5505
+ const fdw = fs.openSync(dest, flags, stat.mode);
5506
5506
  let pos = 0;
5507
5507
  while (pos < stat.size) {
5508
- const bytesRead = fs2.readSync(fdr, _buff, 0, BUF_LENGTH, pos);
5509
- fs2.writeSync(fdw, _buff, 0, bytesRead);
5508
+ const bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos);
5509
+ fs.writeSync(fdw, _buff, 0, bytesRead);
5510
5510
  pos += bytesRead;
5511
5511
  }
5512
- fs2.closeSync(fdr);
5513
- fs2.closeSync(fdw);
5514
- return fs2.unlinkSync(src);
5512
+ fs.closeSync(fdr);
5513
+ fs.closeSync(fdw);
5514
+ return fs.unlinkSync(src);
5515
5515
  }
5516
5516
  function moveDirSyncAcrossDevice(src, dest, overwrite) {
5517
5517
  const options = {
@@ -5530,7 +5530,7 @@ var require_move_sync = __commonJS({
5530
5530
  }
5531
5531
  function isSrcSubdir(src, dest) {
5532
5532
  try {
5533
- return fs2.statSync(src).isDirectory() && src !== dest && dest.indexOf(src) > -1 && dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src);
5533
+ return fs.statSync(src).isDirectory() && src !== dest && dest.indexOf(src) > -1 && dest.split(path.dirname(src) + path.sep)[1].split(path.sep)[0] === path.basename(src);
5534
5534
  } catch (e) {
5535
5535
  return false;
5536
5536
  }
@@ -5546,7 +5546,7 @@ var require_move = __commonJS({
5546
5546
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/move/index.js"(exports, module2) {
5547
5547
  "use strict";
5548
5548
  var u = require_universalify().fromCallback;
5549
- var fs2 = require_graceful_fs();
5549
+ var fs = require_graceful_fs();
5550
5550
  var path = require("path");
5551
5551
  var copy = require_copy2().copy;
5552
5552
  var remove2 = require_remove().remove;
@@ -5561,8 +5561,8 @@ var require_move = __commonJS({
5561
5561
  src = path.resolve(src);
5562
5562
  dest = path.resolve(dest);
5563
5563
  if (src === dest)
5564
- return fs2.access(src, cb);
5565
- fs2.stat(src, (err, st) => {
5564
+ return fs.access(src, cb);
5565
+ fs.stat(src, (err, st) => {
5566
5566
  if (err)
5567
5567
  return cb(err);
5568
5568
  if (st.isDirectory() && isSrcSubdir(src, dest)) {
@@ -5592,7 +5592,7 @@ var require_move = __commonJS({
5592
5592
  });
5593
5593
  }
5594
5594
  function rename(src, dest, overwrite, cb) {
5595
- fs2.rename(src, dest, (err) => {
5595
+ fs.rename(src, dest, (err) => {
5596
5596
  if (!err)
5597
5597
  return cb();
5598
5598
  if (err.code !== "EXDEV")
@@ -5629,7 +5629,7 @@ var require_output = __commonJS({
5629
5629
  "../../node_modules/.pnpm/fs-extra@7.0.1/node_modules/fs-extra/lib/output/index.js"(exports, module2) {
5630
5630
  "use strict";
5631
5631
  var u = require_universalify().fromCallback;
5632
- var fs2 = require_graceful_fs();
5632
+ var fs = require_graceful_fs();
5633
5633
  var path = require("path");
5634
5634
  var mkdir = require_mkdirs2();
5635
5635
  var pathExists2 = require_path_exists().pathExists;
@@ -5643,21 +5643,21 @@ var require_output = __commonJS({
5643
5643
  if (err)
5644
5644
  return callback(err);
5645
5645
  if (itDoes)
5646
- return fs2.writeFile(file, data, encoding, callback);
5646
+ return fs.writeFile(file, data, encoding, callback);
5647
5647
  mkdir.mkdirs(dir, (err2) => {
5648
5648
  if (err2)
5649
5649
  return callback(err2);
5650
- fs2.writeFile(file, data, encoding, callback);
5650
+ fs.writeFile(file, data, encoding, callback);
5651
5651
  });
5652
5652
  });
5653
5653
  }
5654
5654
  function outputFileSync(file, ...args) {
5655
5655
  const dir = path.dirname(file);
5656
- if (fs2.existsSync(dir)) {
5657
- return fs2.writeFileSync(file, ...args);
5656
+ if (fs.existsSync(dir)) {
5657
+ return fs.writeFileSync(file, ...args);
5658
5658
  }
5659
5659
  mkdir.mkdirsSync(dir);
5660
- fs2.writeFileSync(file, ...args);
5660
+ fs.writeFileSync(file, ...args);
5661
5661
  }
5662
5662
  module2.exports = {
5663
5663
  outputFile: u(outputFile),
@@ -5687,11 +5687,11 @@ var require_lib = __commonJS({
5687
5687
  require_path_exists(),
5688
5688
  require_remove()
5689
5689
  );
5690
- var fs2 = require("fs");
5691
- if (Object.getOwnPropertyDescriptor(fs2, "promises")) {
5690
+ var fs = require("fs");
5691
+ if (Object.getOwnPropertyDescriptor(fs, "promises")) {
5692
5692
  Object.defineProperty(module2.exports, "promises", {
5693
5693
  get() {
5694
- return fs2.promises;
5694
+ return fs.promises;
5695
5695
  }
5696
5696
  });
5697
5697
  }
@@ -7158,185 +7158,12 @@ function isInstalled({ major, minor }) {
7158
7158
  }
7159
7159
 
7160
7160
  // src/diagnostics.ts
7161
- var import_fs = __toESM(require("fs"));
7162
7161
  var import_build_utils2 = require("@vercel/build-utils");
7163
- var GEM_SPEC_PATTERN = /^(\S+) \(([^)]+)\)$/;
7164
- var DEPENDENCY_PATTERN = /^([^\s!]+)(!?)(?:\s+\(([^)]+)\))?$/;
7165
- function parseGemfileLock(content) {
7166
- const gems = /* @__PURE__ */ new Map();
7167
- const pathGems = /* @__PURE__ */ new Set();
7168
- const directGems = /* @__PURE__ */ new Map();
7169
- let Section;
7170
- ((Section2) => {
7171
- Section2["GEM"] = "gem";
7172
- Section2["GIT"] = "git";
7173
- Section2["PATH"] = "path";
7174
- Section2["PLUGIN"] = "plugin";
7175
- Section2["DEPENDENCIES"] = "dependencies";
7176
- })(Section || (Section = {}));
7177
- let SubSection;
7178
- ((SubSection2) => {
7179
- SubSection2["SPECS"] = "specs";
7180
- })(SubSection || (SubSection = {}));
7181
- let section = null;
7182
- let subSection = null;
7183
- let currentRemote = "";
7184
- for (const rawLine of content.split("\n")) {
7185
- const line = rawLine.trimEnd();
7186
- if (!line)
7187
- continue;
7188
- if (!line.startsWith(" ")) {
7189
- currentRemote = "";
7190
- if (line === "GEM")
7191
- section = "gem" /* GEM */;
7192
- else if (line === "GIT")
7193
- section = "git" /* GIT */;
7194
- else if (line === "PATH")
7195
- section = "path" /* PATH */;
7196
- else if (line === "PLUGIN SOURCE")
7197
- section = "plugin" /* PLUGIN */;
7198
- else if (line === "DEPENDENCIES")
7199
- section = "dependencies" /* DEPENDENCIES */;
7200
- else
7201
- section = null;
7202
- subSection = null;
7203
- continue;
7204
- }
7205
- const indent = line.length - line.trimStart().length;
7206
- const text = line.trimStart();
7207
- if (section === "gem" /* GEM */ || section === "git" /* GIT */ || section === "plugin" /* PLUGIN */) {
7208
- if (indent === 2) {
7209
- if (text.startsWith("remote:")) {
7210
- currentRemote = text.slice("remote:".length).trim();
7211
- subSection = null;
7212
- } else if (text === "specs:") {
7213
- subSection = "specs" /* SPECS */;
7214
- }
7215
- } else if (indent === 4 && subSection === "specs" /* SPECS */) {
7216
- const m = text.match(GEM_SPEC_PATTERN);
7217
- if (!m)
7218
- continue;
7219
- const [, name, version2] = m;
7220
- let gem;
7221
- if (section === "git" /* GIT */) {
7222
- gem = { version: version2, source: "git" /* GIT */, sourceUrl: currentRemote };
7223
- } else if (section === "plugin" /* PLUGIN */) {
7224
- gem = { version: version2, source: "plugin" /* PLUGIN */, sourceUrl: currentRemote };
7225
- } else {
7226
- let sourceUrl = currentRemote;
7227
- try {
7228
- sourceUrl = new URL(currentRemote).origin;
7229
- } catch {
7230
- }
7231
- gem = { version: version2, source: "registry" /* REGISTRY */, sourceUrl };
7232
- }
7233
- if (gems.has(name)) {
7234
- const existing = gems.get(name);
7235
- const isPlatformVariant = /-[a-zA-Z]/.test(version2);
7236
- const existingIsPlatformVariant = /-[a-zA-Z]/.test(existing.version);
7237
- if (isPlatformVariant)
7238
- continue;
7239
- if (existing.source === gem.source && !existingIsPlatformVariant)
7240
- continue;
7241
- if (gem.source !== "registry" /* REGISTRY */)
7242
- continue;
7243
- }
7244
- gems.set(name, gem);
7245
- }
7246
- }
7247
- if (section === "path" /* PATH */) {
7248
- if (indent === 2 && text === "specs:") {
7249
- subSection = "specs" /* SPECS */;
7250
- } else if (indent === 4 && subSection === "specs" /* SPECS */) {
7251
- const m = text.match(GEM_SPEC_PATTERN);
7252
- if (!m)
7253
- continue;
7254
- const [, name] = m;
7255
- pathGems.add(name);
7256
- }
7257
- }
7258
- if (section === "dependencies" /* DEPENDENCIES */) {
7259
- if (indent === 2) {
7260
- const m = text.match(DEPENDENCY_PATTERN);
7261
- if (!m)
7262
- continue;
7263
- const [, name, , version2] = m;
7264
- directGems.set(name, version2);
7265
- }
7266
- }
7267
- }
7268
- for (const name of pathGems) {
7269
- directGems.delete(name);
7270
- }
7271
- return { gems, directGems };
7272
- }
7273
- async function generateProjectManifest({
7274
- workPath,
7275
- gemfileLockPath,
7276
- framework,
7277
- serviceType
7278
- }) {
7279
- try {
7280
- if (!gemfileLockPath)
7281
- return;
7282
- let content;
7283
- try {
7284
- content = await import_fs.default.promises.readFile(gemfileLockPath, "utf-8");
7285
- } catch {
7286
- return;
7287
- }
7288
- const { gems, directGems } = parseGemfileLock(content);
7289
- const directEntries = [];
7290
- const transitiveEntries = [];
7291
- for (const [name, version2] of directGems) {
7292
- const gem = gems.get(name);
7293
- const entry = {
7294
- name,
7295
- type: "direct",
7296
- scopes: ["prod"],
7297
- ...version2 ? { requested: version2 } : {},
7298
- resolved: gem?.version ?? ""
7299
- };
7300
- if (gem?.source)
7301
- entry.source = gem.source;
7302
- if (gem?.sourceUrl)
7303
- entry.sourceUrl = gem.sourceUrl;
7304
- directEntries.push(entry);
7305
- }
7306
- for (const [name, gem] of gems) {
7307
- if (directGems.has(name))
7308
- continue;
7309
- const entry = {
7310
- name,
7311
- type: "transitive",
7312
- scopes: ["prod"],
7313
- resolved: gem.version
7314
- };
7315
- if (gem.source)
7316
- entry.source = gem.source;
7317
- if (gem.sourceUrl)
7318
- entry.sourceUrl = gem.sourceUrl;
7319
- transitiveEntries.push(entry);
7320
- }
7321
- const manifest = {
7322
- version: import_build_utils2.MANIFEST_VERSION,
7323
- runtime: "ruby",
7324
- ...framework ? { framework } : {},
7325
- ...serviceType ? { serviceType } : {},
7326
- dependencies: [
7327
- ...directEntries.sort((a, b) => a.name.localeCompare(b.name)),
7328
- ...transitiveEntries.sort((a, b) => a.name.localeCompare(b.name))
7329
- ]
7330
- };
7331
- await (0, import_build_utils2.writeProjectManifest)(manifest, workPath, "ruby");
7332
- } catch {
7333
- }
7334
- }
7335
7162
  var diagnostics = (0, import_build_utils2.createDiagnostics)("ruby");
7336
7163
 
7337
7164
  // src/start-dev-server.ts
7338
7165
  var import_child_process2 = require("child_process");
7339
- var import_fs2 = require("fs");
7166
+ var import_fs = require("fs");
7340
7167
  var import_path2 = require("path");
7341
7168
  var import_which2 = __toESM(require_lib2());
7342
7169
  var import_build_utils3 = require("@vercel/build-utils");
@@ -7408,16 +7235,16 @@ function installGlobalCleanupHandlers() {
7408
7235
  function createDevRubyShim(workPath, entrypoint) {
7409
7236
  try {
7410
7237
  const vercelRubyDir = (0, import_path2.join)(workPath, ".vercel", "ruby");
7411
- (0, import_fs2.mkdirSync)(vercelRubyDir, { recursive: true });
7238
+ (0, import_fs.mkdirSync)(vercelRubyDir, { recursive: true });
7412
7239
  const shimPath = (0, import_path2.join)(vercelRubyDir, `vc_init_dev.rb`);
7413
7240
  const utilsPath = (0, import_path2.join)(vercelRubyDir, "vc__utils__ruby.rb");
7414
7241
  const templatePath = (0, import_path2.join)(__dirname, "..", "vc_init_dev.rb");
7415
7242
  const utilsTemplatePath = (0, import_path2.join)(__dirname, "..", "vc_utils.rb");
7416
- const template = (0, import_fs2.readFileSync)(templatePath, "utf8");
7417
- const utilsTemplate = (0, import_fs2.readFileSync)(utilsTemplatePath, "utf8");
7243
+ const template = (0, import_fs.readFileSync)(templatePath, "utf8");
7244
+ const utilsTemplate = (0, import_fs.readFileSync)(utilsTemplatePath, "utf8");
7418
7245
  const shimSource = template.replace(/__VC_DEV_ENTRYPOINT__/g, entrypoint);
7419
- (0, import_fs2.writeFileSync)(shimPath, shimSource, "utf8");
7420
- (0, import_fs2.writeFileSync)(utilsPath, utilsTemplate, "utf8");
7246
+ (0, import_fs.writeFileSync)(shimPath, shimSource, "utf8");
7247
+ (0, import_fs.writeFileSync)(utilsPath, utilsTemplate, "utf8");
7421
7248
  (0, import_build_utils3.debug)(`Prepared Ruby dev shim at ${shimPath}`);
7422
7249
  return shimPath;
7423
7250
  } catch (err) {
@@ -7428,10 +7255,10 @@ function createDevRubyShim(workPath, entrypoint) {
7428
7255
  function detectGemfile(workPath, entrypoint) {
7429
7256
  const entryDir = (0, import_path2.dirname)(entrypoint);
7430
7257
  const localGemfile = (0, import_path2.join)(workPath, entryDir, "Gemfile");
7431
- if ((0, import_fs2.existsSync)(localGemfile))
7258
+ if ((0, import_fs.existsSync)(localGemfile))
7432
7259
  return localGemfile;
7433
7260
  const rootGemfile = (0, import_path2.join)(workPath, "Gemfile");
7434
- if ((0, import_fs2.existsSync)(rootGemfile))
7261
+ if ((0, import_fs.existsSync)(rootGemfile))
7435
7262
  return rootGemfile;
7436
7263
  return null;
7437
7264
  }
@@ -7855,7 +7682,7 @@ var build = async ({
7855
7682
  environment: {}
7856
7683
  });
7857
7684
  try {
7858
- await generateProjectManifest({
7685
+ await (0, import_build_utils2.generateRubyProjectManifest)({
7859
7686
  workPath,
7860
7687
  gemfileLockPath: (0, import_path3.join)((0, import_path3.dirname)(gemfilePath), "Gemfile.lock"),
7861
7688
  framework: config?.framework ?? void 0,