@aws-cdk/integ-runner 2.200.2 → 2.201.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.
package/lib/index.js CHANGED
@@ -850,17 +850,17 @@ var require_conversions = __commonJS({
850
850
  return [0, 0, args[0]];
851
851
  };
852
852
  convert.gray.hsv = convert.gray.hsl;
853
- convert.gray.hwb = function(gray3) {
854
- return [0, 100, gray3[0]];
853
+ convert.gray.hwb = function(gray) {
854
+ return [0, 100, gray[0]];
855
855
  };
856
- convert.gray.cmyk = function(gray3) {
857
- return [0, 0, 0, gray3[0]];
856
+ convert.gray.cmyk = function(gray) {
857
+ return [0, 0, 0, gray[0]];
858
858
  };
859
- convert.gray.lab = function(gray3) {
860
- return [gray3[0], 0, 0];
859
+ convert.gray.lab = function(gray) {
860
+ return [gray[0], 0, 0];
861
861
  };
862
- convert.gray.hex = function(gray3) {
863
- const val = Math.round(gray3[0] / 100 * 255) & 255;
862
+ convert.gray.hex = function(gray) {
863
+ const val = Math.round(gray[0] / 100 * 255) & 255;
864
864
  const integer = (val << 16) + (val << 8) + val;
865
865
  const string = integer.toString(16).toUpperCase();
866
866
  return "000000".substring(string.length) + string;
@@ -917,15 +917,15 @@ var require_route = __commonJS({
917
917
  }
918
918
  __name(link, "link");
919
919
  function wrapConversion(toModel, graph) {
920
- const path3 = [graph[toModel].parent, toModel];
920
+ const path4 = [graph[toModel].parent, toModel];
921
921
  let fn = conversions[graph[toModel].parent][toModel];
922
922
  let cur = graph[toModel].parent;
923
923
  while (graph[cur].parent) {
924
- path3.unshift(graph[cur].parent);
924
+ path4.unshift(graph[cur].parent);
925
925
  fn = link(conversions[graph[cur].parent][cur], fn);
926
926
  cur = graph[cur].parent;
927
927
  }
928
- fn.conversion = path3;
928
+ fn.conversion = path4;
929
929
  return fn;
930
930
  }
931
931
  __name(wrapConversion, "wrapConversion");
@@ -2681,12 +2681,12 @@ var require_src = __commonJS({
2681
2681
  });
2682
2682
 
2683
2683
  // lib/logger.ts
2684
- var util, chalk, stderr, logger, print, error, warning, success, highlight, trace;
2684
+ var util, import_chalk, stderr, logger, print, error, warning, success, highlight, trace;
2685
2685
  var init_logger = __esm({
2686
2686
  "lib/logger.ts"() {
2687
2687
  "use strict";
2688
2688
  util = __toESM(require("util"));
2689
- chalk = __toESM(require_source());
2689
+ import_chalk = __toESM(require_source());
2690
2690
  ({ stderr } = process);
2691
2691
  logger = /* @__PURE__ */ __name((stream, styles) => (fmt, ...args) => {
2692
2692
  let str = util.format(fmt, ...args);
@@ -2696,11 +2696,11 @@ var init_logger = __esm({
2696
2696
  stream.write(str + "\n");
2697
2697
  }, "logger");
2698
2698
  print = logger(stderr);
2699
- error = logger(stderr, [chalk.red]);
2700
- warning = logger(stderr, [chalk.yellow]);
2701
- success = logger(stderr, [chalk.green]);
2702
- highlight = logger(stderr, [chalk.bold]);
2703
- trace = logger(stderr, [chalk.gray]);
2699
+ error = logger(stderr, [import_chalk.default.red]);
2700
+ warning = logger(stderr, [import_chalk.default.yellow]);
2701
+ success = logger(stderr, [import_chalk.default.green]);
2702
+ highlight = logger(stderr, [import_chalk.default.bold]);
2703
+ trace = logger(stderr, [import_chalk.default.gray]);
2704
2704
  }
2705
2705
  });
2706
2706
 
@@ -2758,54 +2758,54 @@ var require_polyfills = __commonJS({
2758
2758
  }
2759
2759
  var chdir;
2760
2760
  module2.exports = patch;
2761
- function patch(fs3) {
2761
+ function patch(fs4) {
2762
2762
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
2763
- patchLchmod(fs3);
2764
- }
2765
- if (!fs3.lutimes) {
2766
- patchLutimes(fs3);
2767
- }
2768
- fs3.chown = chownFix(fs3.chown);
2769
- fs3.fchown = chownFix(fs3.fchown);
2770
- fs3.lchown = chownFix(fs3.lchown);
2771
- fs3.chmod = chmodFix(fs3.chmod);
2772
- fs3.fchmod = chmodFix(fs3.fchmod);
2773
- fs3.lchmod = chmodFix(fs3.lchmod);
2774
- fs3.chownSync = chownFixSync(fs3.chownSync);
2775
- fs3.fchownSync = chownFixSync(fs3.fchownSync);
2776
- fs3.lchownSync = chownFixSync(fs3.lchownSync);
2777
- fs3.chmodSync = chmodFixSync(fs3.chmodSync);
2778
- fs3.fchmodSync = chmodFixSync(fs3.fchmodSync);
2779
- fs3.lchmodSync = chmodFixSync(fs3.lchmodSync);
2780
- fs3.stat = statFix(fs3.stat);
2781
- fs3.fstat = statFix(fs3.fstat);
2782
- fs3.lstat = statFix(fs3.lstat);
2783
- fs3.statSync = statFixSync(fs3.statSync);
2784
- fs3.fstatSync = statFixSync(fs3.fstatSync);
2785
- fs3.lstatSync = statFixSync(fs3.lstatSync);
2786
- if (fs3.chmod && !fs3.lchmod) {
2787
- fs3.lchmod = function(path3, mode, cb) {
2763
+ patchLchmod(fs4);
2764
+ }
2765
+ if (!fs4.lutimes) {
2766
+ patchLutimes(fs4);
2767
+ }
2768
+ fs4.chown = chownFix(fs4.chown);
2769
+ fs4.fchown = chownFix(fs4.fchown);
2770
+ fs4.lchown = chownFix(fs4.lchown);
2771
+ fs4.chmod = chmodFix(fs4.chmod);
2772
+ fs4.fchmod = chmodFix(fs4.fchmod);
2773
+ fs4.lchmod = chmodFix(fs4.lchmod);
2774
+ fs4.chownSync = chownFixSync(fs4.chownSync);
2775
+ fs4.fchownSync = chownFixSync(fs4.fchownSync);
2776
+ fs4.lchownSync = chownFixSync(fs4.lchownSync);
2777
+ fs4.chmodSync = chmodFixSync(fs4.chmodSync);
2778
+ fs4.fchmodSync = chmodFixSync(fs4.fchmodSync);
2779
+ fs4.lchmodSync = chmodFixSync(fs4.lchmodSync);
2780
+ fs4.stat = statFix(fs4.stat);
2781
+ fs4.fstat = statFix(fs4.fstat);
2782
+ fs4.lstat = statFix(fs4.lstat);
2783
+ fs4.statSync = statFixSync(fs4.statSync);
2784
+ fs4.fstatSync = statFixSync(fs4.fstatSync);
2785
+ fs4.lstatSync = statFixSync(fs4.lstatSync);
2786
+ if (fs4.chmod && !fs4.lchmod) {
2787
+ fs4.lchmod = function(path4, mode, cb) {
2788
2788
  if (cb) process.nextTick(cb);
2789
2789
  };
2790
- fs3.lchmodSync = function() {
2790
+ fs4.lchmodSync = function() {
2791
2791
  };
2792
2792
  }
2793
- if (fs3.chown && !fs3.lchown) {
2794
- fs3.lchown = function(path3, uid, gid, cb) {
2793
+ if (fs4.chown && !fs4.lchown) {
2794
+ fs4.lchown = function(path4, uid, gid, cb) {
2795
2795
  if (cb) process.nextTick(cb);
2796
2796
  };
2797
- fs3.lchownSync = function() {
2797
+ fs4.lchownSync = function() {
2798
2798
  };
2799
2799
  }
2800
2800
  if (platform === "win32") {
2801
- fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) {
2801
+ fs4.rename = typeof fs4.rename !== "function" ? fs4.rename : (function(fs$rename) {
2802
2802
  function rename(from, to, cb) {
2803
2803
  var start = Date.now();
2804
2804
  var backoff = 0;
2805
2805
  fs$rename(from, to, /* @__PURE__ */ __name(function CB(er) {
2806
2806
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
2807
2807
  setTimeout(function() {
2808
- fs3.stat(to, function(stater, st) {
2808
+ fs4.stat(to, function(stater, st) {
2809
2809
  if (stater && stater.code === "ENOENT")
2810
2810
  fs$rename(from, to, CB);
2811
2811
  else
@@ -2822,9 +2822,9 @@ var require_polyfills = __commonJS({
2822
2822
  __name(rename, "rename");
2823
2823
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
2824
2824
  return rename;
2825
- })(fs3.rename);
2825
+ })(fs4.rename);
2826
2826
  }
2827
- fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) {
2827
+ fs4.read = typeof fs4.read !== "function" ? fs4.read : (function(fs$read) {
2828
2828
  function read(fd, buffer, offset, length, position, callback_) {
2829
2829
  var callback;
2830
2830
  if (callback_ && typeof callback_ === "function") {
@@ -2832,23 +2832,23 @@ var require_polyfills = __commonJS({
2832
2832
  callback = /* @__PURE__ */ __name(function(er, _, __) {
2833
2833
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
2834
2834
  eagCounter++;
2835
- return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
2835
+ return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
2836
2836
  }
2837
2837
  callback_.apply(this, arguments);
2838
2838
  }, "callback");
2839
2839
  }
2840
- return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
2840
+ return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
2841
2841
  }
2842
2842
  __name(read, "read");
2843
2843
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
2844
2844
  return read;
2845
- })(fs3.read);
2846
- fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) {
2845
+ })(fs4.read);
2846
+ fs4.readSync = typeof fs4.readSync !== "function" ? fs4.readSync : /* @__PURE__ */ (function(fs$readSync) {
2847
2847
  return function(fd, buffer, offset, length, position) {
2848
2848
  var eagCounter = 0;
2849
2849
  while (true) {
2850
2850
  try {
2851
- return fs$readSync.call(fs3, fd, buffer, offset, length, position);
2851
+ return fs$readSync.call(fs4, fd, buffer, offset, length, position);
2852
2852
  } catch (er) {
2853
2853
  if (er.code === "EAGAIN" && eagCounter < 10) {
2854
2854
  eagCounter++;
@@ -2858,11 +2858,11 @@ var require_polyfills = __commonJS({
2858
2858
  }
2859
2859
  }
2860
2860
  };
2861
- })(fs3.readSync);
2862
- function patchLchmod(fs4) {
2863
- fs4.lchmod = function(path3, mode, callback) {
2864
- fs4.open(
2865
- path3,
2861
+ })(fs4.readSync);
2862
+ function patchLchmod(fs5) {
2863
+ fs5.lchmod = function(path4, mode, callback) {
2864
+ fs5.open(
2865
+ path4,
2866
2866
  constants.O_WRONLY | constants.O_SYMLINK,
2867
2867
  mode,
2868
2868
  function(err, fd) {
@@ -2870,74 +2870,74 @@ var require_polyfills = __commonJS({
2870
2870
  if (callback) callback(err);
2871
2871
  return;
2872
2872
  }
2873
- fs4.fchmod(fd, mode, function(err2) {
2874
- fs4.close(fd, function(err22) {
2873
+ fs5.fchmod(fd, mode, function(err2) {
2874
+ fs5.close(fd, function(err22) {
2875
2875
  if (callback) callback(err2 || err22);
2876
2876
  });
2877
2877
  });
2878
2878
  }
2879
2879
  );
2880
2880
  };
2881
- fs4.lchmodSync = function(path3, mode) {
2882
- var fd = fs4.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
2881
+ fs5.lchmodSync = function(path4, mode) {
2882
+ var fd = fs5.openSync(path4, constants.O_WRONLY | constants.O_SYMLINK, mode);
2883
2883
  var threw = true;
2884
2884
  var ret;
2885
2885
  try {
2886
- ret = fs4.fchmodSync(fd, mode);
2886
+ ret = fs5.fchmodSync(fd, mode);
2887
2887
  threw = false;
2888
2888
  } finally {
2889
2889
  if (threw) {
2890
2890
  try {
2891
- fs4.closeSync(fd);
2891
+ fs5.closeSync(fd);
2892
2892
  } catch (er) {
2893
2893
  }
2894
2894
  } else {
2895
- fs4.closeSync(fd);
2895
+ fs5.closeSync(fd);
2896
2896
  }
2897
2897
  }
2898
2898
  return ret;
2899
2899
  };
2900
2900
  }
2901
2901
  __name(patchLchmod, "patchLchmod");
2902
- function patchLutimes(fs4) {
2903
- if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
2904
- fs4.lutimes = function(path3, at, mt, cb) {
2905
- fs4.open(path3, constants.O_SYMLINK, function(er, fd) {
2902
+ function patchLutimes(fs5) {
2903
+ if (constants.hasOwnProperty("O_SYMLINK") && fs5.futimes) {
2904
+ fs5.lutimes = function(path4, at, mt, cb) {
2905
+ fs5.open(path4, constants.O_SYMLINK, function(er, fd) {
2906
2906
  if (er) {
2907
2907
  if (cb) cb(er);
2908
2908
  return;
2909
2909
  }
2910
- fs4.futimes(fd, at, mt, function(er2) {
2911
- fs4.close(fd, function(er22) {
2910
+ fs5.futimes(fd, at, mt, function(er2) {
2911
+ fs5.close(fd, function(er22) {
2912
2912
  if (cb) cb(er2 || er22);
2913
2913
  });
2914
2914
  });
2915
2915
  });
2916
2916
  };
2917
- fs4.lutimesSync = function(path3, at, mt) {
2918
- var fd = fs4.openSync(path3, constants.O_SYMLINK);
2917
+ fs5.lutimesSync = function(path4, at, mt) {
2918
+ var fd = fs5.openSync(path4, constants.O_SYMLINK);
2919
2919
  var ret;
2920
2920
  var threw = true;
2921
2921
  try {
2922
- ret = fs4.futimesSync(fd, at, mt);
2922
+ ret = fs5.futimesSync(fd, at, mt);
2923
2923
  threw = false;
2924
2924
  } finally {
2925
2925
  if (threw) {
2926
2926
  try {
2927
- fs4.closeSync(fd);
2927
+ fs5.closeSync(fd);
2928
2928
  } catch (er) {
2929
2929
  }
2930
2930
  } else {
2931
- fs4.closeSync(fd);
2931
+ fs5.closeSync(fd);
2932
2932
  }
2933
2933
  }
2934
2934
  return ret;
2935
2935
  };
2936
- } else if (fs4.futimes) {
2937
- fs4.lutimes = function(_a, _b, _c, cb) {
2936
+ } else if (fs5.futimes) {
2937
+ fs5.lutimes = function(_a, _b, _c, cb) {
2938
2938
  if (cb) process.nextTick(cb);
2939
2939
  };
2940
- fs4.lutimesSync = function() {
2940
+ fs5.lutimesSync = function() {
2941
2941
  };
2942
2942
  }
2943
2943
  }
@@ -2945,7 +2945,7 @@ var require_polyfills = __commonJS({
2945
2945
  function chmodFix(orig) {
2946
2946
  if (!orig) return orig;
2947
2947
  return function(target, mode, cb) {
2948
- return orig.call(fs3, target, mode, function(er) {
2948
+ return orig.call(fs4, target, mode, function(er) {
2949
2949
  if (chownErOk(er)) er = null;
2950
2950
  if (cb) cb.apply(this, arguments);
2951
2951
  });
@@ -2956,7 +2956,7 @@ var require_polyfills = __commonJS({
2956
2956
  if (!orig) return orig;
2957
2957
  return function(target, mode) {
2958
2958
  try {
2959
- return orig.call(fs3, target, mode);
2959
+ return orig.call(fs4, target, mode);
2960
2960
  } catch (er) {
2961
2961
  if (!chownErOk(er)) throw er;
2962
2962
  }
@@ -2966,7 +2966,7 @@ var require_polyfills = __commonJS({
2966
2966
  function chownFix(orig) {
2967
2967
  if (!orig) return orig;
2968
2968
  return function(target, uid, gid, cb) {
2969
- return orig.call(fs3, target, uid, gid, function(er) {
2969
+ return orig.call(fs4, target, uid, gid, function(er) {
2970
2970
  if (chownErOk(er)) er = null;
2971
2971
  if (cb) cb.apply(this, arguments);
2972
2972
  });
@@ -2977,7 +2977,7 @@ var require_polyfills = __commonJS({
2977
2977
  if (!orig) return orig;
2978
2978
  return function(target, uid, gid) {
2979
2979
  try {
2980
- return orig.call(fs3, target, uid, gid);
2980
+ return orig.call(fs4, target, uid, gid);
2981
2981
  } catch (er) {
2982
2982
  if (!chownErOk(er)) throw er;
2983
2983
  }
@@ -2999,14 +2999,14 @@ var require_polyfills = __commonJS({
2999
2999
  if (cb) cb.apply(this, arguments);
3000
3000
  }
3001
3001
  __name(callback, "callback");
3002
- return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback);
3002
+ return options ? orig.call(fs4, target, options, callback) : orig.call(fs4, target, callback);
3003
3003
  };
3004
3004
  }
3005
3005
  __name(statFix, "statFix");
3006
3006
  function statFixSync(orig) {
3007
3007
  if (!orig) return orig;
3008
3008
  return function(target, options) {
3009
- var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target);
3009
+ var stats = options ? orig.call(fs4, target, options) : orig.call(fs4, target);
3010
3010
  if (stats) {
3011
3011
  if (stats.uid < 0) stats.uid += 4294967296;
3012
3012
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -3038,16 +3038,16 @@ var require_legacy_streams = __commonJS({
3038
3038
  "../../../node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
3039
3039
  var Stream = require("stream").Stream;
3040
3040
  module2.exports = legacy;
3041
- function legacy(fs3) {
3041
+ function legacy(fs4) {
3042
3042
  return {
3043
3043
  ReadStream,
3044
3044
  WriteStream
3045
3045
  };
3046
- function ReadStream(path3, options) {
3047
- if (!(this instanceof ReadStream)) return new ReadStream(path3, options);
3046
+ function ReadStream(path4, options) {
3047
+ if (!(this instanceof ReadStream)) return new ReadStream(path4, options);
3048
3048
  Stream.call(this);
3049
3049
  var self2 = this;
3050
- this.path = path3;
3050
+ this.path = path4;
3051
3051
  this.fd = null;
3052
3052
  this.readable = true;
3053
3053
  this.paused = false;
@@ -3081,7 +3081,7 @@ var require_legacy_streams = __commonJS({
3081
3081
  });
3082
3082
  return;
3083
3083
  }
3084
- fs3.open(this.path, this.flags, this.mode, function(err, fd) {
3084
+ fs4.open(this.path, this.flags, this.mode, function(err, fd) {
3085
3085
  if (err) {
3086
3086
  self2.emit("error", err);
3087
3087
  self2.readable = false;
@@ -3093,10 +3093,10 @@ var require_legacy_streams = __commonJS({
3093
3093
  });
3094
3094
  }
3095
3095
  __name(ReadStream, "ReadStream");
3096
- function WriteStream(path3, options) {
3097
- if (!(this instanceof WriteStream)) return new WriteStream(path3, options);
3096
+ function WriteStream(path4, options) {
3097
+ if (!(this instanceof WriteStream)) return new WriteStream(path4, options);
3098
3098
  Stream.call(this);
3099
- this.path = path3;
3099
+ this.path = path4;
3100
3100
  this.fd = null;
3101
3101
  this.writable = true;
3102
3102
  this.flags = "w";
@@ -3121,7 +3121,7 @@ var require_legacy_streams = __commonJS({
3121
3121
  this.busy = false;
3122
3122
  this._queue = [];
3123
3123
  if (this.fd === null) {
3124
- this._open = fs3.open;
3124
+ this._open = fs4.open;
3125
3125
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
3126
3126
  this.flush();
3127
3127
  }
@@ -3159,7 +3159,7 @@ var require_clone = __commonJS({
3159
3159
  // ../../../node_modules/graceful-fs/graceful-fs.js
3160
3160
  var require_graceful_fs = __commonJS({
3161
3161
  "../../../node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
3162
- var fs3 = require("fs");
3162
+ var fs4 = require("fs");
3163
3163
  var polyfills = require_polyfills();
3164
3164
  var legacy = require_legacy_streams();
3165
3165
  var clone = require_clone();
@@ -3193,12 +3193,12 @@ var require_graceful_fs = __commonJS({
3193
3193
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
3194
3194
  console.error(m);
3195
3195
  }, "debug");
3196
- if (!fs3[gracefulQueue]) {
3196
+ if (!fs4[gracefulQueue]) {
3197
3197
  queue = global[gracefulQueue] || [];
3198
- publishQueue(fs3, queue);
3199
- fs3.close = (function(fs$close) {
3198
+ publishQueue(fs4, queue);
3199
+ fs4.close = (function(fs$close) {
3200
3200
  function close(fd, cb) {
3201
- return fs$close.call(fs3, fd, function(err) {
3201
+ return fs$close.call(fs4, fd, function(err) {
3202
3202
  if (!err) {
3203
3203
  resetQueue();
3204
3204
  }
@@ -3211,10 +3211,10 @@ var require_graceful_fs = __commonJS({
3211
3211
  value: fs$close
3212
3212
  });
3213
3213
  return close;
3214
- })(fs3.close);
3215
- fs3.closeSync = (function(fs$closeSync) {
3214
+ })(fs4.close);
3215
+ fs4.closeSync = (function(fs$closeSync) {
3216
3216
  function closeSync(fd) {
3217
- fs$closeSync.apply(fs3, arguments);
3217
+ fs$closeSync.apply(fs4, arguments);
3218
3218
  resetQueue();
3219
3219
  }
3220
3220
  __name(closeSync, "closeSync");
@@ -3222,38 +3222,38 @@ var require_graceful_fs = __commonJS({
3222
3222
  value: fs$closeSync
3223
3223
  });
3224
3224
  return closeSync;
3225
- })(fs3.closeSync);
3225
+ })(fs4.closeSync);
3226
3226
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
3227
3227
  process.on("exit", function() {
3228
- debug(fs3[gracefulQueue]);
3229
- require("assert").equal(fs3[gracefulQueue].length, 0);
3228
+ debug(fs4[gracefulQueue]);
3229
+ require("assert").equal(fs4[gracefulQueue].length, 0);
3230
3230
  });
3231
3231
  }
3232
3232
  }
3233
3233
  var queue;
3234
3234
  if (!global[gracefulQueue]) {
3235
- publishQueue(global, fs3[gracefulQueue]);
3236
- }
3237
- module2.exports = patch(clone(fs3));
3238
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) {
3239
- module2.exports = patch(fs3);
3240
- fs3.__patched = true;
3241
- }
3242
- function patch(fs4) {
3243
- polyfills(fs4);
3244
- fs4.gracefulify = patch;
3245
- fs4.createReadStream = createReadStream;
3246
- fs4.createWriteStream = createWriteStream;
3247
- var fs$readFile = fs4.readFile;
3248
- fs4.readFile = readFile;
3249
- function readFile(path3, options, cb) {
3235
+ publishQueue(global, fs4[gracefulQueue]);
3236
+ }
3237
+ module2.exports = patch(clone(fs4));
3238
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs4.__patched) {
3239
+ module2.exports = patch(fs4);
3240
+ fs4.__patched = true;
3241
+ }
3242
+ function patch(fs5) {
3243
+ polyfills(fs5);
3244
+ fs5.gracefulify = patch;
3245
+ fs5.createReadStream = createReadStream;
3246
+ fs5.createWriteStream = createWriteStream;
3247
+ var fs$readFile = fs5.readFile;
3248
+ fs5.readFile = readFile2;
3249
+ function readFile2(path4, options, cb) {
3250
3250
  if (typeof options === "function")
3251
3251
  cb = options, options = null;
3252
- return go$readFile(path3, options, cb);
3253
- function go$readFile(path4, options2, cb2, startTime) {
3254
- return fs$readFile(path4, options2, function(err) {
3252
+ return go$readFile(path4, options, cb);
3253
+ function go$readFile(path5, options2, cb2, startTime) {
3254
+ return fs$readFile(path5, options2, function(err) {
3255
3255
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
3256
- enqueue([go$readFile, [path4, options2, cb2], err, startTime || Date.now(), Date.now()]);
3256
+ enqueue([go$readFile, [path5, options2, cb2], err, startTime || Date.now(), Date.now()]);
3257
3257
  else {
3258
3258
  if (typeof cb2 === "function")
3259
3259
  cb2.apply(this, arguments);
@@ -3262,17 +3262,17 @@ var require_graceful_fs = __commonJS({
3262
3262
  }
3263
3263
  __name(go$readFile, "go$readFile");
3264
3264
  }
3265
- __name(readFile, "readFile");
3266
- var fs$writeFile = fs4.writeFile;
3267
- fs4.writeFile = writeFile;
3268
- function writeFile(path3, data, options, cb) {
3265
+ __name(readFile2, "readFile");
3266
+ var fs$writeFile = fs5.writeFile;
3267
+ fs5.writeFile = writeFile;
3268
+ function writeFile(path4, data, options, cb) {
3269
3269
  if (typeof options === "function")
3270
3270
  cb = options, options = null;
3271
- return go$writeFile(path3, data, options, cb);
3272
- function go$writeFile(path4, data2, options2, cb2, startTime) {
3273
- return fs$writeFile(path4, data2, options2, function(err) {
3271
+ return go$writeFile(path4, data, options, cb);
3272
+ function go$writeFile(path5, data2, options2, cb2, startTime) {
3273
+ return fs$writeFile(path5, data2, options2, function(err) {
3274
3274
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
3275
- enqueue([go$writeFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
3275
+ enqueue([go$writeFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
3276
3276
  else {
3277
3277
  if (typeof cb2 === "function")
3278
3278
  cb2.apply(this, arguments);
@@ -3282,17 +3282,17 @@ var require_graceful_fs = __commonJS({
3282
3282
  __name(go$writeFile, "go$writeFile");
3283
3283
  }
3284
3284
  __name(writeFile, "writeFile");
3285
- var fs$appendFile = fs4.appendFile;
3285
+ var fs$appendFile = fs5.appendFile;
3286
3286
  if (fs$appendFile)
3287
- fs4.appendFile = appendFile;
3288
- function appendFile(path3, data, options, cb) {
3287
+ fs5.appendFile = appendFile;
3288
+ function appendFile(path4, data, options, cb) {
3289
3289
  if (typeof options === "function")
3290
3290
  cb = options, options = null;
3291
- return go$appendFile(path3, data, options, cb);
3292
- function go$appendFile(path4, data2, options2, cb2, startTime) {
3293
- return fs$appendFile(path4, data2, options2, function(err) {
3291
+ return go$appendFile(path4, data, options, cb);
3292
+ function go$appendFile(path5, data2, options2, cb2, startTime) {
3293
+ return fs$appendFile(path5, data2, options2, function(err) {
3294
3294
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
3295
- enqueue([go$appendFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
3295
+ enqueue([go$appendFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
3296
3296
  else {
3297
3297
  if (typeof cb2 === "function")
3298
3298
  cb2.apply(this, arguments);
@@ -3302,9 +3302,9 @@ var require_graceful_fs = __commonJS({
3302
3302
  __name(go$appendFile, "go$appendFile");
3303
3303
  }
3304
3304
  __name(appendFile, "appendFile");
3305
- var fs$copyFile = fs4.copyFile;
3305
+ var fs$copyFile = fs5.copyFile;
3306
3306
  if (fs$copyFile)
3307
- fs4.copyFile = copyFile;
3307
+ fs5.copyFile = copyFile;
3308
3308
  function copyFile(src, dest, flags, cb) {
3309
3309
  if (typeof flags === "function") {
3310
3310
  cb = flags;
@@ -3324,34 +3324,34 @@ var require_graceful_fs = __commonJS({
3324
3324
  __name(go$copyFile, "go$copyFile");
3325
3325
  }
3326
3326
  __name(copyFile, "copyFile");
3327
- var fs$readdir = fs4.readdir;
3328
- fs4.readdir = readdir2;
3327
+ var fs$readdir = fs5.readdir;
3328
+ fs5.readdir = readdir2;
3329
3329
  var noReaddirOptionVersions = /^v[0-5]\./;
3330
- function readdir2(path3, options, cb) {
3330
+ function readdir2(path4, options, cb) {
3331
3331
  if (typeof options === "function")
3332
3332
  cb = options, options = null;
3333
- var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(path4, options2, cb2, startTime) {
3334
- return fs$readdir(path4, fs$readdirCallback(
3335
- path4,
3333
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? /* @__PURE__ */ __name(function go$readdir2(path5, options2, cb2, startTime) {
3334
+ return fs$readdir(path5, fs$readdirCallback(
3335
+ path5,
3336
3336
  options2,
3337
3337
  cb2,
3338
3338
  startTime
3339
3339
  ));
3340
- }, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(path4, options2, cb2, startTime) {
3341
- return fs$readdir(path4, options2, fs$readdirCallback(
3342
- path4,
3340
+ }, "go$readdir") : /* @__PURE__ */ __name(function go$readdir2(path5, options2, cb2, startTime) {
3341
+ return fs$readdir(path5, options2, fs$readdirCallback(
3342
+ path5,
3343
3343
  options2,
3344
3344
  cb2,
3345
3345
  startTime
3346
3346
  ));
3347
3347
  }, "go$readdir");
3348
- return go$readdir(path3, options, cb);
3349
- function fs$readdirCallback(path4, options2, cb2, startTime) {
3348
+ return go$readdir(path4, options, cb);
3349
+ function fs$readdirCallback(path5, options2, cb2, startTime) {
3350
3350
  return function(err, files) {
3351
3351
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
3352
3352
  enqueue([
3353
3353
  go$readdir,
3354
- [path4, options2, cb2],
3354
+ [path5, options2, cb2],
3355
3355
  err,
3356
3356
  startTime || Date.now(),
3357
3357
  Date.now()
@@ -3368,21 +3368,21 @@ var require_graceful_fs = __commonJS({
3368
3368
  }
3369
3369
  __name(readdir2, "readdir");
3370
3370
  if (process.version.substr(0, 4) === "v0.8") {
3371
- var legStreams = legacy(fs4);
3371
+ var legStreams = legacy(fs5);
3372
3372
  ReadStream = legStreams.ReadStream;
3373
3373
  WriteStream = legStreams.WriteStream;
3374
3374
  }
3375
- var fs$ReadStream = fs4.ReadStream;
3375
+ var fs$ReadStream = fs5.ReadStream;
3376
3376
  if (fs$ReadStream) {
3377
3377
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
3378
3378
  ReadStream.prototype.open = ReadStream$open;
3379
3379
  }
3380
- var fs$WriteStream = fs4.WriteStream;
3380
+ var fs$WriteStream = fs5.WriteStream;
3381
3381
  if (fs$WriteStream) {
3382
3382
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
3383
3383
  WriteStream.prototype.open = WriteStream$open;
3384
3384
  }
3385
- Object.defineProperty(fs4, "ReadStream", {
3385
+ Object.defineProperty(fs5, "ReadStream", {
3386
3386
  get: /* @__PURE__ */ __name(function() {
3387
3387
  return ReadStream;
3388
3388
  }, "get"),
@@ -3392,7 +3392,7 @@ var require_graceful_fs = __commonJS({
3392
3392
  enumerable: true,
3393
3393
  configurable: true
3394
3394
  });
3395
- Object.defineProperty(fs4, "WriteStream", {
3395
+ Object.defineProperty(fs5, "WriteStream", {
3396
3396
  get: /* @__PURE__ */ __name(function() {
3397
3397
  return WriteStream;
3398
3398
  }, "get"),
@@ -3403,7 +3403,7 @@ var require_graceful_fs = __commonJS({
3403
3403
  configurable: true
3404
3404
  });
3405
3405
  var FileReadStream = ReadStream;
3406
- Object.defineProperty(fs4, "FileReadStream", {
3406
+ Object.defineProperty(fs5, "FileReadStream", {
3407
3407
  get: /* @__PURE__ */ __name(function() {
3408
3408
  return FileReadStream;
3409
3409
  }, "get"),
@@ -3414,7 +3414,7 @@ var require_graceful_fs = __commonJS({
3414
3414
  configurable: true
3415
3415
  });
3416
3416
  var FileWriteStream = WriteStream;
3417
- Object.defineProperty(fs4, "FileWriteStream", {
3417
+ Object.defineProperty(fs5, "FileWriteStream", {
3418
3418
  get: /* @__PURE__ */ __name(function() {
3419
3419
  return FileWriteStream;
3420
3420
  }, "get"),
@@ -3424,7 +3424,7 @@ var require_graceful_fs = __commonJS({
3424
3424
  enumerable: true,
3425
3425
  configurable: true
3426
3426
  });
3427
- function ReadStream(path3, options) {
3427
+ function ReadStream(path4, options) {
3428
3428
  if (this instanceof ReadStream)
3429
3429
  return fs$ReadStream.apply(this, arguments), this;
3430
3430
  else
@@ -3446,7 +3446,7 @@ var require_graceful_fs = __commonJS({
3446
3446
  });
3447
3447
  }
3448
3448
  __name(ReadStream$open, "ReadStream$open");
3449
- function WriteStream(path3, options) {
3449
+ function WriteStream(path4, options) {
3450
3450
  if (this instanceof WriteStream)
3451
3451
  return fs$WriteStream.apply(this, arguments), this;
3452
3452
  else
@@ -3466,24 +3466,24 @@ var require_graceful_fs = __commonJS({
3466
3466
  });
3467
3467
  }
3468
3468
  __name(WriteStream$open, "WriteStream$open");
3469
- function createReadStream(path3, options) {
3470
- return new fs4.ReadStream(path3, options);
3469
+ function createReadStream(path4, options) {
3470
+ return new fs5.ReadStream(path4, options);
3471
3471
  }
3472
3472
  __name(createReadStream, "createReadStream");
3473
- function createWriteStream(path3, options) {
3474
- return new fs4.WriteStream(path3, options);
3473
+ function createWriteStream(path4, options) {
3474
+ return new fs5.WriteStream(path4, options);
3475
3475
  }
3476
3476
  __name(createWriteStream, "createWriteStream");
3477
- var fs$open = fs4.open;
3478
- fs4.open = open;
3479
- function open(path3, flags, mode, cb) {
3477
+ var fs$open = fs5.open;
3478
+ fs5.open = open;
3479
+ function open(path4, flags, mode, cb) {
3480
3480
  if (typeof mode === "function")
3481
3481
  cb = mode, mode = null;
3482
- return go$open(path3, flags, mode, cb);
3483
- function go$open(path4, flags2, mode2, cb2, startTime) {
3484
- return fs$open(path4, flags2, mode2, function(err, fd) {
3482
+ return go$open(path4, flags, mode, cb);
3483
+ function go$open(path5, flags2, mode2, cb2, startTime) {
3484
+ return fs$open(path5, flags2, mode2, function(err, fd) {
3485
3485
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
3486
- enqueue([go$open, [path4, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
3486
+ enqueue([go$open, [path5, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
3487
3487
  else {
3488
3488
  if (typeof cb2 === "function")
3489
3489
  cb2.apply(this, arguments);
@@ -3493,22 +3493,22 @@ var require_graceful_fs = __commonJS({
3493
3493
  __name(go$open, "go$open");
3494
3494
  }
3495
3495
  __name(open, "open");
3496
- return fs4;
3496
+ return fs5;
3497
3497
  }
3498
3498
  __name(patch, "patch");
3499
3499
  function enqueue(elem) {
3500
3500
  debug("ENQUEUE", elem[0].name, elem[1]);
3501
- fs3[gracefulQueue].push(elem);
3501
+ fs4[gracefulQueue].push(elem);
3502
3502
  retry();
3503
3503
  }
3504
3504
  __name(enqueue, "enqueue");
3505
3505
  var retryTimer;
3506
3506
  function resetQueue() {
3507
3507
  var now = Date.now();
3508
- for (var i = 0; i < fs3[gracefulQueue].length; ++i) {
3509
- if (fs3[gracefulQueue][i].length > 2) {
3510
- fs3[gracefulQueue][i][3] = now;
3511
- fs3[gracefulQueue][i][4] = now;
3508
+ for (var i = 0; i < fs4[gracefulQueue].length; ++i) {
3509
+ if (fs4[gracefulQueue][i].length > 2) {
3510
+ fs4[gracefulQueue][i][3] = now;
3511
+ fs4[gracefulQueue][i][4] = now;
3512
3512
  }
3513
3513
  }
3514
3514
  retry();
@@ -3517,9 +3517,9 @@ var require_graceful_fs = __commonJS({
3517
3517
  function retry() {
3518
3518
  clearTimeout(retryTimer);
3519
3519
  retryTimer = void 0;
3520
- if (fs3[gracefulQueue].length === 0)
3520
+ if (fs4[gracefulQueue].length === 0)
3521
3521
  return;
3522
- var elem = fs3[gracefulQueue].shift();
3522
+ var elem = fs4[gracefulQueue].shift();
3523
3523
  var fn = elem[0];
3524
3524
  var args = elem[1];
3525
3525
  var err = elem[2];
@@ -3541,7 +3541,7 @@ var require_graceful_fs = __commonJS({
3541
3541
  debug("RETRY", fn.name, args);
3542
3542
  fn.apply(null, args.concat([startTime]));
3543
3543
  } else {
3544
- fs3[gracefulQueue].push(elem);
3544
+ fs4[gracefulQueue].push(elem);
3545
3545
  }
3546
3546
  }
3547
3547
  if (retryTimer === void 0) {
@@ -3557,7 +3557,7 @@ var require_fs = __commonJS({
3557
3557
  "../../../node_modules/fs-extra/lib/fs/index.js"(exports2) {
3558
3558
  "use strict";
3559
3559
  var u = require_universalify().fromCallback;
3560
- var fs3 = require_graceful_fs();
3560
+ var fs4 = require_graceful_fs();
3561
3561
  var api = [
3562
3562
  "access",
3563
3563
  "appendFile",
@@ -3598,26 +3598,26 @@ var require_fs = __commonJS({
3598
3598
  "utimes",
3599
3599
  "writeFile"
3600
3600
  ].filter((key) => {
3601
- return typeof fs3[key] === "function";
3601
+ return typeof fs4[key] === "function";
3602
3602
  });
3603
- Object.assign(exports2, fs3);
3603
+ Object.assign(exports2, fs4);
3604
3604
  api.forEach((method) => {
3605
- exports2[method] = u(fs3[method]);
3605
+ exports2[method] = u(fs4[method]);
3606
3606
  });
3607
3607
  exports2.exists = function(filename, callback) {
3608
3608
  if (typeof callback === "function") {
3609
- return fs3.exists(filename, callback);
3609
+ return fs4.exists(filename, callback);
3610
3610
  }
3611
3611
  return new Promise((resolve3) => {
3612
- return fs3.exists(filename, resolve3);
3612
+ return fs4.exists(filename, resolve3);
3613
3613
  });
3614
3614
  };
3615
3615
  exports2.read = function(fd, buffer, offset, length, position, callback) {
3616
3616
  if (typeof callback === "function") {
3617
- return fs3.read(fd, buffer, offset, length, position, callback);
3617
+ return fs4.read(fd, buffer, offset, length, position, callback);
3618
3618
  }
3619
3619
  return new Promise((resolve3, reject) => {
3620
- fs3.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
3620
+ fs4.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
3621
3621
  if (err) return reject(err);
3622
3622
  resolve3({ bytesRead, buffer: buffer2 });
3623
3623
  });
@@ -3625,10 +3625,10 @@ var require_fs = __commonJS({
3625
3625
  };
3626
3626
  exports2.write = function(fd, buffer, ...args) {
3627
3627
  if (typeof args[args.length - 1] === "function") {
3628
- return fs3.write(fd, buffer, ...args);
3628
+ return fs4.write(fd, buffer, ...args);
3629
3629
  }
3630
3630
  return new Promise((resolve3, reject) => {
3631
- fs3.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
3631
+ fs4.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
3632
3632
  if (err) return reject(err);
3633
3633
  resolve3({ bytesWritten, buffer: buffer2 });
3634
3634
  });
@@ -3636,10 +3636,10 @@ var require_fs = __commonJS({
3636
3636
  };
3637
3637
  exports2.readv = function(fd, buffers, ...args) {
3638
3638
  if (typeof args[args.length - 1] === "function") {
3639
- return fs3.readv(fd, buffers, ...args);
3639
+ return fs4.readv(fd, buffers, ...args);
3640
3640
  }
3641
3641
  return new Promise((resolve3, reject) => {
3642
- fs3.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
3642
+ fs4.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
3643
3643
  if (err) return reject(err);
3644
3644
  resolve3({ bytesRead, buffers: buffers2 });
3645
3645
  });
@@ -3647,17 +3647,17 @@ var require_fs = __commonJS({
3647
3647
  };
3648
3648
  exports2.writev = function(fd, buffers, ...args) {
3649
3649
  if (typeof args[args.length - 1] === "function") {
3650
- return fs3.writev(fd, buffers, ...args);
3650
+ return fs4.writev(fd, buffers, ...args);
3651
3651
  }
3652
3652
  return new Promise((resolve3, reject) => {
3653
- fs3.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
3653
+ fs4.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
3654
3654
  if (err) return reject(err);
3655
3655
  resolve3({ bytesWritten, buffers: buffers2 });
3656
3656
  });
3657
3657
  });
3658
3658
  };
3659
- if (typeof fs3.realpath.native === "function") {
3660
- exports2.realpath.native = u(fs3.realpath.native);
3659
+ if (typeof fs4.realpath.native === "function") {
3660
+ exports2.realpath.native = u(fs4.realpath.native);
3661
3661
  } else {
3662
3662
  process.emitWarning(
3663
3663
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -3672,10 +3672,10 @@ var require_fs = __commonJS({
3672
3672
  var require_utils = __commonJS({
3673
3673
  "../../../node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
3674
3674
  "use strict";
3675
- var path3 = require("path");
3675
+ var path4 = require("path");
3676
3676
  module2.exports.checkPath = /* @__PURE__ */ __name(function checkPath(pth) {
3677
3677
  if (process.platform === "win32") {
3678
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path3.parse(pth).root, ""));
3678
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path4.parse(pth).root, ""));
3679
3679
  if (pathHasInvalidWinCharacters) {
3680
3680
  const error2 = new Error(`Path contains invalid characters: ${pth}`);
3681
3681
  error2.code = "EINVAL";
@@ -3690,7 +3690,7 @@ var require_utils = __commonJS({
3690
3690
  var require_make_dir = __commonJS({
3691
3691
  "../../../node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
3692
3692
  "use strict";
3693
- var fs3 = require_fs();
3693
+ var fs4 = require_fs();
3694
3694
  var { checkPath } = require_utils();
3695
3695
  var getMode = /* @__PURE__ */ __name((options) => {
3696
3696
  const defaults = { mode: 511 };
@@ -3699,14 +3699,14 @@ var require_make_dir = __commonJS({
3699
3699
  }, "getMode");
3700
3700
  module2.exports.makeDir = async (dir, options) => {
3701
3701
  checkPath(dir);
3702
- return fs3.mkdir(dir, {
3702
+ return fs4.mkdir(dir, {
3703
3703
  mode: getMode(options),
3704
3704
  recursive: true
3705
3705
  });
3706
3706
  };
3707
3707
  module2.exports.makeDirSync = (dir, options) => {
3708
3708
  checkPath(dir);
3709
- return fs3.mkdirSync(dir, {
3709
+ return fs4.mkdirSync(dir, {
3710
3710
  mode: getMode(options),
3711
3711
  recursive: true
3712
3712
  });
@@ -3738,14 +3738,14 @@ var require_path_exists = __commonJS({
3738
3738
  "../../../node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
3739
3739
  "use strict";
3740
3740
  var u = require_universalify().fromPromise;
3741
- var fs3 = require_fs();
3742
- function pathExists(path3) {
3743
- return fs3.access(path3).then(() => true).catch(() => false);
3741
+ var fs4 = require_fs();
3742
+ function pathExists(path4) {
3743
+ return fs4.access(path4).then(() => true).catch(() => false);
3744
3744
  }
3745
3745
  __name(pathExists, "pathExists");
3746
3746
  module2.exports = {
3747
3747
  pathExists: u(pathExists),
3748
- pathExistsSync: fs3.existsSync
3748
+ pathExistsSync: fs4.existsSync
3749
3749
  };
3750
3750
  }
3751
3751
  });
@@ -3754,16 +3754,16 @@ var require_path_exists = __commonJS({
3754
3754
  var require_utimes = __commonJS({
3755
3755
  "../../../node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
3756
3756
  "use strict";
3757
- var fs3 = require_fs();
3757
+ var fs4 = require_fs();
3758
3758
  var u = require_universalify().fromPromise;
3759
- async function utimesMillis(path3, atime, mtime) {
3760
- const fd = await fs3.open(path3, "r+");
3759
+ async function utimesMillis(path4, atime, mtime) {
3760
+ const fd = await fs4.open(path4, "r+");
3761
3761
  let closeErr = null;
3762
3762
  try {
3763
- await fs3.futimes(fd, atime, mtime);
3763
+ await fs4.futimes(fd, atime, mtime);
3764
3764
  } finally {
3765
3765
  try {
3766
- await fs3.close(fd);
3766
+ await fs4.close(fd);
3767
3767
  } catch (e) {
3768
3768
  closeErr = e;
3769
3769
  }
@@ -3773,10 +3773,10 @@ var require_utimes = __commonJS({
3773
3773
  }
3774
3774
  }
3775
3775
  __name(utimesMillis, "utimesMillis");
3776
- function utimesMillisSync(path3, atime, mtime) {
3777
- const fd = fs3.openSync(path3, "r+");
3778
- fs3.futimesSync(fd, atime, mtime);
3779
- return fs3.closeSync(fd);
3776
+ function utimesMillisSync(path4, atime, mtime) {
3777
+ const fd = fs4.openSync(path4, "r+");
3778
+ fs4.futimesSync(fd, atime, mtime);
3779
+ return fs4.closeSync(fd);
3780
3780
  }
3781
3781
  __name(utimesMillisSync, "utimesMillisSync");
3782
3782
  module2.exports = {
@@ -3790,11 +3790,11 @@ var require_utimes = __commonJS({
3790
3790
  var require_stat = __commonJS({
3791
3791
  "../../../node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
3792
3792
  "use strict";
3793
- var fs3 = require_fs();
3794
- var path3 = require("path");
3793
+ var fs4 = require_fs();
3794
+ var path4 = require("path");
3795
3795
  var u = require_universalify().fromPromise;
3796
3796
  function getStats(src, dest, opts) {
3797
- const statFunc = opts.dereference ? (file) => fs3.stat(file, { bigint: true }) : (file) => fs3.lstat(file, { bigint: true });
3797
+ const statFunc = opts.dereference ? (file) => fs4.stat(file, { bigint: true }) : (file) => fs4.lstat(file, { bigint: true });
3798
3798
  return Promise.all([
3799
3799
  statFunc(src),
3800
3800
  statFunc(dest).catch((err) => {
@@ -3806,7 +3806,7 @@ var require_stat = __commonJS({
3806
3806
  __name(getStats, "getStats");
3807
3807
  function getStatsSync(src, dest, opts) {
3808
3808
  let destStat;
3809
- const statFunc = opts.dereference ? (file) => fs3.statSync(file, { bigint: true }) : (file) => fs3.lstatSync(file, { bigint: true });
3809
+ const statFunc = opts.dereference ? (file) => fs4.statSync(file, { bigint: true }) : (file) => fs4.lstatSync(file, { bigint: true });
3810
3810
  const srcStat = statFunc(src);
3811
3811
  try {
3812
3812
  destStat = statFunc(dest);
@@ -3821,8 +3821,8 @@ var require_stat = __commonJS({
3821
3821
  const { srcStat, destStat } = await getStats(src, dest, opts);
3822
3822
  if (destStat) {
3823
3823
  if (areIdentical(srcStat, destStat)) {
3824
- const srcBaseName = path3.basename(src);
3825
- const destBaseName = path3.basename(dest);
3824
+ const srcBaseName = path4.basename(src);
3825
+ const destBaseName = path4.basename(dest);
3826
3826
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
3827
3827
  return { srcStat, destStat, isChangingCase: true };
3828
3828
  }
@@ -3845,8 +3845,8 @@ var require_stat = __commonJS({
3845
3845
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
3846
3846
  if (destStat) {
3847
3847
  if (areIdentical(srcStat, destStat)) {
3848
- const srcBaseName = path3.basename(src);
3849
- const destBaseName = path3.basename(dest);
3848
+ const srcBaseName = path4.basename(src);
3849
+ const destBaseName = path4.basename(dest);
3850
3850
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
3851
3851
  return { srcStat, destStat, isChangingCase: true };
3852
3852
  }
@@ -3866,12 +3866,12 @@ var require_stat = __commonJS({
3866
3866
  }
3867
3867
  __name(checkPathsSync, "checkPathsSync");
3868
3868
  async function checkParentPaths(src, srcStat, dest, funcName) {
3869
- const srcParent = path3.resolve(path3.dirname(src));
3870
- const destParent = path3.resolve(path3.dirname(dest));
3871
- if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
3869
+ const srcParent = path4.resolve(path4.dirname(src));
3870
+ const destParent = path4.resolve(path4.dirname(dest));
3871
+ if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
3872
3872
  let destStat;
3873
3873
  try {
3874
- destStat = await fs3.stat(destParent, { bigint: true });
3874
+ destStat = await fs4.stat(destParent, { bigint: true });
3875
3875
  } catch (err) {
3876
3876
  if (err.code === "ENOENT") return;
3877
3877
  throw err;
@@ -3883,12 +3883,12 @@ var require_stat = __commonJS({
3883
3883
  }
3884
3884
  __name(checkParentPaths, "checkParentPaths");
3885
3885
  function checkParentPathsSync(src, srcStat, dest, funcName) {
3886
- const srcParent = path3.resolve(path3.dirname(src));
3887
- const destParent = path3.resolve(path3.dirname(dest));
3888
- if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
3886
+ const srcParent = path4.resolve(path4.dirname(src));
3887
+ const destParent = path4.resolve(path4.dirname(dest));
3888
+ if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
3889
3889
  let destStat;
3890
3890
  try {
3891
- destStat = fs3.statSync(destParent, { bigint: true });
3891
+ destStat = fs4.statSync(destParent, { bigint: true });
3892
3892
  } catch (err) {
3893
3893
  if (err.code === "ENOENT") return;
3894
3894
  throw err;
@@ -3904,8 +3904,8 @@ var require_stat = __commonJS({
3904
3904
  }
3905
3905
  __name(areIdentical, "areIdentical");
3906
3906
  function isSrcSubdir(src, dest) {
3907
- const srcArr = path3.resolve(src).split(path3.sep).filter((i) => i);
3908
- const destArr = path3.resolve(dest).split(path3.sep).filter((i) => i);
3907
+ const srcArr = path4.resolve(src).split(path4.sep).filter((i) => i);
3908
+ const destArr = path4.resolve(dest).split(path4.sep).filter((i) => i);
3909
3909
  return srcArr.every((cur, i) => destArr[i] === cur);
3910
3910
  }
3911
3911
  __name(isSrcSubdir, "isSrcSubdir");
@@ -3960,8 +3960,8 @@ var require_async = __commonJS({
3960
3960
  var require_copy = __commonJS({
3961
3961
  "../../../node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
3962
3962
  "use strict";
3963
- var fs3 = require_fs();
3964
- var path3 = require("path");
3963
+ var fs4 = require_fs();
3964
+ var path4 = require("path");
3965
3965
  var { mkdirs } = require_mkdirs();
3966
3966
  var { pathExists } = require_path_exists();
3967
3967
  var { utimesMillis } = require_utimes();
@@ -3984,7 +3984,7 @@ var require_copy = __commonJS({
3984
3984
  await stat2.checkParentPaths(src, srcStat, dest, "copy");
3985
3985
  const include = await runFilter(src, dest, opts);
3986
3986
  if (!include) return;
3987
- const destParent = path3.dirname(dest);
3987
+ const destParent = path4.dirname(dest);
3988
3988
  const dirExists = await pathExists(destParent);
3989
3989
  if (!dirExists) {
3990
3990
  await mkdirs(destParent);
@@ -3998,7 +3998,7 @@ var require_copy = __commonJS({
3998
3998
  }
3999
3999
  __name(runFilter, "runFilter");
4000
4000
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
4001
- const statFn = opts.dereference ? fs3.stat : fs3.lstat;
4001
+ const statFn = opts.dereference ? fs4.stat : fs4.lstat;
4002
4002
  const srcStat = await statFn(src);
4003
4003
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
4004
4004
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -4011,7 +4011,7 @@ var require_copy = __commonJS({
4011
4011
  async function onFile(srcStat, destStat, src, dest, opts) {
4012
4012
  if (!destStat) return copyFile(srcStat, src, dest, opts);
4013
4013
  if (opts.overwrite) {
4014
- await fs3.unlink(dest);
4014
+ await fs4.unlink(dest);
4015
4015
  return copyFile(srcStat, src, dest, opts);
4016
4016
  }
4017
4017
  if (opts.errorOnExist) {
@@ -4020,15 +4020,15 @@ var require_copy = __commonJS({
4020
4020
  }
4021
4021
  __name(onFile, "onFile");
4022
4022
  async function copyFile(srcStat, src, dest, opts) {
4023
- await fs3.copyFile(src, dest);
4023
+ await fs4.copyFile(src, dest);
4024
4024
  if (opts.preserveTimestamps) {
4025
4025
  if (fileIsNotWritable(srcStat.mode)) {
4026
4026
  await makeFileWritable(dest, srcStat.mode);
4027
4027
  }
4028
- const updatedSrcStat = await fs3.stat(src);
4028
+ const updatedSrcStat = await fs4.stat(src);
4029
4029
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
4030
4030
  }
4031
- return fs3.chmod(dest, srcStat.mode);
4031
+ return fs4.chmod(dest, srcStat.mode);
4032
4032
  }
4033
4033
  __name(copyFile, "copyFile");
4034
4034
  function fileIsNotWritable(srcMode) {
@@ -4036,16 +4036,16 @@ var require_copy = __commonJS({
4036
4036
  }
4037
4037
  __name(fileIsNotWritable, "fileIsNotWritable");
4038
4038
  function makeFileWritable(dest, srcMode) {
4039
- return fs3.chmod(dest, srcMode | 128);
4039
+ return fs4.chmod(dest, srcMode | 128);
4040
4040
  }
4041
4041
  __name(makeFileWritable, "makeFileWritable");
4042
4042
  async function onDir(srcStat, destStat, src, dest, opts) {
4043
4043
  if (!destStat) {
4044
- await fs3.mkdir(dest);
4044
+ await fs4.mkdir(dest);
4045
4045
  }
4046
- await asyncIteratorConcurrentProcess(await fs3.opendir(src), async (item) => {
4047
- const srcItem = path3.join(src, item.name);
4048
- const destItem = path3.join(dest, item.name);
4046
+ await asyncIteratorConcurrentProcess(await fs4.opendir(src), async (item) => {
4047
+ const srcItem = path4.join(src, item.name);
4048
+ const destItem = path4.join(dest, item.name);
4049
4049
  const include = await runFilter(srcItem, destItem, opts);
4050
4050
  if (include) {
4051
4051
  const { destStat: destStat2 } = await stat2.checkPaths(srcItem, destItem, "copy", opts);
@@ -4053,27 +4053,27 @@ var require_copy = __commonJS({
4053
4053
  }
4054
4054
  });
4055
4055
  if (!destStat) {
4056
- await fs3.chmod(dest, srcStat.mode);
4056
+ await fs4.chmod(dest, srcStat.mode);
4057
4057
  }
4058
4058
  }
4059
4059
  __name(onDir, "onDir");
4060
4060
  async function onLink(destStat, src, dest, opts) {
4061
- let resolvedSrc = await fs3.readlink(src);
4061
+ let resolvedSrc = await fs4.readlink(src);
4062
4062
  if (opts.dereference) {
4063
- resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
4063
+ resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
4064
4064
  }
4065
4065
  if (!destStat) {
4066
- return fs3.symlink(resolvedSrc, dest);
4066
+ return fs4.symlink(resolvedSrc, dest);
4067
4067
  }
4068
4068
  let resolvedDest = null;
4069
4069
  try {
4070
- resolvedDest = await fs3.readlink(dest);
4070
+ resolvedDest = await fs4.readlink(dest);
4071
4071
  } catch (e) {
4072
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs3.symlink(resolvedSrc, dest);
4072
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs4.symlink(resolvedSrc, dest);
4073
4073
  throw e;
4074
4074
  }
4075
4075
  if (opts.dereference) {
4076
- resolvedDest = path3.resolve(process.cwd(), resolvedDest);
4076
+ resolvedDest = path4.resolve(process.cwd(), resolvedDest);
4077
4077
  }
4078
4078
  if (resolvedSrc !== resolvedDest) {
4079
4079
  if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -4083,8 +4083,8 @@ var require_copy = __commonJS({
4083
4083
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
4084
4084
  }
4085
4085
  }
4086
- await fs3.unlink(dest);
4087
- return fs3.symlink(resolvedSrc, dest);
4086
+ await fs4.unlink(dest);
4087
+ return fs4.symlink(resolvedSrc, dest);
4088
4088
  }
4089
4089
  __name(onLink, "onLink");
4090
4090
  module2.exports = copy;
@@ -4095,8 +4095,8 @@ var require_copy = __commonJS({
4095
4095
  var require_copy_sync = __commonJS({
4096
4096
  "../../../node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
4097
4097
  "use strict";
4098
- var fs3 = require_graceful_fs();
4099
- var path3 = require("path");
4098
+ var fs4 = require_graceful_fs();
4099
+ var path4 = require("path");
4100
4100
  var mkdirsSync = require_mkdirs().mkdirsSync;
4101
4101
  var utimesMillisSync = require_utimes().utimesMillisSync;
4102
4102
  var stat2 = require_stat();
@@ -4117,13 +4117,13 @@ var require_copy_sync = __commonJS({
4117
4117
  const { srcStat, destStat } = stat2.checkPathsSync(src, dest, "copy", opts);
4118
4118
  stat2.checkParentPathsSync(src, srcStat, dest, "copy");
4119
4119
  if (opts.filter && !opts.filter(src, dest)) return;
4120
- const destParent = path3.dirname(dest);
4121
- if (!fs3.existsSync(destParent)) mkdirsSync(destParent);
4120
+ const destParent = path4.dirname(dest);
4121
+ if (!fs4.existsSync(destParent)) mkdirsSync(destParent);
4122
4122
  return getStats(destStat, src, dest, opts);
4123
4123
  }
4124
4124
  __name(copySync, "copySync");
4125
4125
  function getStats(destStat, src, dest, opts) {
4126
- const statSync = opts.dereference ? fs3.statSync : fs3.lstatSync;
4126
+ const statSync = opts.dereference ? fs4.statSync : fs4.lstatSync;
4127
4127
  const srcStat = statSync(src);
4128
4128
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
4129
4129
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -4140,7 +4140,7 @@ var require_copy_sync = __commonJS({
4140
4140
  __name(onFile, "onFile");
4141
4141
  function mayCopyFile(srcStat, src, dest, opts) {
4142
4142
  if (opts.overwrite) {
4143
- fs3.unlinkSync(dest);
4143
+ fs4.unlinkSync(dest);
4144
4144
  return copyFile(srcStat, src, dest, opts);
4145
4145
  } else if (opts.errorOnExist) {
4146
4146
  throw new Error(`'${dest}' already exists`);
@@ -4148,7 +4148,7 @@ var require_copy_sync = __commonJS({
4148
4148
  }
4149
4149
  __name(mayCopyFile, "mayCopyFile");
4150
4150
  function copyFile(srcStat, src, dest, opts) {
4151
- fs3.copyFileSync(src, dest);
4151
+ fs4.copyFileSync(src, dest);
4152
4152
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
4153
4153
  return setDestMode(dest, srcStat.mode);
4154
4154
  }
@@ -4167,11 +4167,11 @@ var require_copy_sync = __commonJS({
4167
4167
  }
4168
4168
  __name(makeFileWritable, "makeFileWritable");
4169
4169
  function setDestMode(dest, srcMode) {
4170
- return fs3.chmodSync(dest, srcMode);
4170
+ return fs4.chmodSync(dest, srcMode);
4171
4171
  }
4172
4172
  __name(setDestMode, "setDestMode");
4173
4173
  function setDestTimestamps(src, dest) {
4174
- const updatedSrcStat = fs3.statSync(src);
4174
+ const updatedSrcStat = fs4.statSync(src);
4175
4175
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
4176
4176
  }
4177
4177
  __name(setDestTimestamps, "setDestTimestamps");
@@ -4181,13 +4181,13 @@ var require_copy_sync = __commonJS({
4181
4181
  }
4182
4182
  __name(onDir, "onDir");
4183
4183
  function mkDirAndCopy(srcMode, src, dest, opts) {
4184
- fs3.mkdirSync(dest);
4184
+ fs4.mkdirSync(dest);
4185
4185
  copyDir(src, dest, opts);
4186
4186
  return setDestMode(dest, srcMode);
4187
4187
  }
4188
4188
  __name(mkDirAndCopy, "mkDirAndCopy");
4189
4189
  function copyDir(src, dest, opts) {
4190
- const dir = fs3.opendirSync(src);
4190
+ const dir = fs4.opendirSync(src);
4191
4191
  try {
4192
4192
  let dirent;
4193
4193
  while ((dirent = dir.readSync()) !== null) {
@@ -4199,30 +4199,30 @@ var require_copy_sync = __commonJS({
4199
4199
  }
4200
4200
  __name(copyDir, "copyDir");
4201
4201
  function copyDirItem(item, src, dest, opts) {
4202
- const srcItem = path3.join(src, item);
4203
- const destItem = path3.join(dest, item);
4202
+ const srcItem = path4.join(src, item);
4203
+ const destItem = path4.join(dest, item);
4204
4204
  if (opts.filter && !opts.filter(srcItem, destItem)) return;
4205
4205
  const { destStat } = stat2.checkPathsSync(srcItem, destItem, "copy", opts);
4206
4206
  return getStats(destStat, srcItem, destItem, opts);
4207
4207
  }
4208
4208
  __name(copyDirItem, "copyDirItem");
4209
4209
  function onLink(destStat, src, dest, opts) {
4210
- let resolvedSrc = fs3.readlinkSync(src);
4210
+ let resolvedSrc = fs4.readlinkSync(src);
4211
4211
  if (opts.dereference) {
4212
- resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
4212
+ resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
4213
4213
  }
4214
4214
  if (!destStat) {
4215
- return fs3.symlinkSync(resolvedSrc, dest);
4215
+ return fs4.symlinkSync(resolvedSrc, dest);
4216
4216
  } else {
4217
4217
  let resolvedDest;
4218
4218
  try {
4219
- resolvedDest = fs3.readlinkSync(dest);
4219
+ resolvedDest = fs4.readlinkSync(dest);
4220
4220
  } catch (err) {
4221
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs3.symlinkSync(resolvedSrc, dest);
4221
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs4.symlinkSync(resolvedSrc, dest);
4222
4222
  throw err;
4223
4223
  }
4224
4224
  if (opts.dereference) {
4225
- resolvedDest = path3.resolve(process.cwd(), resolvedDest);
4225
+ resolvedDest = path4.resolve(process.cwd(), resolvedDest);
4226
4226
  }
4227
4227
  if (resolvedSrc !== resolvedDest) {
4228
4228
  if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -4237,8 +4237,8 @@ var require_copy_sync = __commonJS({
4237
4237
  }
4238
4238
  __name(onLink, "onLink");
4239
4239
  function copyLink(resolvedSrc, dest) {
4240
- fs3.unlinkSync(dest);
4241
- return fs3.symlinkSync(resolvedSrc, dest);
4240
+ fs4.unlinkSync(dest);
4241
+ return fs4.symlinkSync(resolvedSrc, dest);
4242
4242
  }
4243
4243
  __name(copyLink, "copyLink");
4244
4244
  module2.exports = copySync;
@@ -4261,14 +4261,14 @@ var require_copy2 = __commonJS({
4261
4261
  var require_remove = __commonJS({
4262
4262
  "../../../node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
4263
4263
  "use strict";
4264
- var fs3 = require_graceful_fs();
4264
+ var fs4 = require_graceful_fs();
4265
4265
  var u = require_universalify().fromCallback;
4266
- function remove(path3, callback) {
4267
- fs3.rm(path3, { recursive: true, force: true }, callback);
4266
+ function remove(path4, callback) {
4267
+ fs4.rm(path4, { recursive: true, force: true }, callback);
4268
4268
  }
4269
4269
  __name(remove, "remove");
4270
- function removeSync(path3) {
4271
- fs3.rmSync(path3, { recursive: true, force: true });
4270
+ function removeSync(path4) {
4271
+ fs4.rmSync(path4, { recursive: true, force: true });
4272
4272
  }
4273
4273
  __name(removeSync, "removeSync");
4274
4274
  module2.exports = {
@@ -4283,28 +4283,28 @@ var require_empty = __commonJS({
4283
4283
  "../../../node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
4284
4284
  "use strict";
4285
4285
  var u = require_universalify().fromPromise;
4286
- var fs3 = require_fs();
4287
- var path3 = require("path");
4286
+ var fs4 = require_fs();
4287
+ var path4 = require("path");
4288
4288
  var mkdir = require_mkdirs();
4289
4289
  var remove = require_remove();
4290
4290
  var emptyDir = u(/* @__PURE__ */ __name(async function emptyDir2(dir) {
4291
4291
  let items;
4292
4292
  try {
4293
- items = await fs3.readdir(dir);
4293
+ items = await fs4.readdir(dir);
4294
4294
  } catch {
4295
4295
  return mkdir.mkdirs(dir);
4296
4296
  }
4297
- return Promise.all(items.map((item) => remove.remove(path3.join(dir, item))));
4297
+ return Promise.all(items.map((item) => remove.remove(path4.join(dir, item))));
4298
4298
  }, "emptyDir"));
4299
4299
  function emptyDirSync(dir) {
4300
4300
  let items;
4301
4301
  try {
4302
- items = fs3.readdirSync(dir);
4302
+ items = fs4.readdirSync(dir);
4303
4303
  } catch {
4304
4304
  return mkdir.mkdirsSync(dir);
4305
4305
  }
4306
4306
  items.forEach((item) => {
4307
- item = path3.join(dir, item);
4307
+ item = path4.join(dir, item);
4308
4308
  remove.removeSync(item);
4309
4309
  });
4310
4310
  }
@@ -4323,53 +4323,53 @@ var require_file = __commonJS({
4323
4323
  "../../../node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
4324
4324
  "use strict";
4325
4325
  var u = require_universalify().fromPromise;
4326
- var path3 = require("path");
4327
- var fs3 = require_fs();
4326
+ var path4 = require("path");
4327
+ var fs4 = require_fs();
4328
4328
  var mkdir = require_mkdirs();
4329
4329
  async function createFile(file) {
4330
4330
  let stats;
4331
4331
  try {
4332
- stats = await fs3.stat(file);
4332
+ stats = await fs4.stat(file);
4333
4333
  } catch {
4334
4334
  }
4335
4335
  if (stats && stats.isFile()) return;
4336
- const dir = path3.dirname(file);
4336
+ const dir = path4.dirname(file);
4337
4337
  let dirStats = null;
4338
4338
  try {
4339
- dirStats = await fs3.stat(dir);
4339
+ dirStats = await fs4.stat(dir);
4340
4340
  } catch (err) {
4341
4341
  if (err.code === "ENOENT") {
4342
4342
  await mkdir.mkdirs(dir);
4343
- await fs3.writeFile(file, "");
4343
+ await fs4.writeFile(file, "");
4344
4344
  return;
4345
4345
  } else {
4346
4346
  throw err;
4347
4347
  }
4348
4348
  }
4349
4349
  if (dirStats.isDirectory()) {
4350
- await fs3.writeFile(file, "");
4350
+ await fs4.writeFile(file, "");
4351
4351
  } else {
4352
- await fs3.readdir(dir);
4352
+ await fs4.readdir(dir);
4353
4353
  }
4354
4354
  }
4355
4355
  __name(createFile, "createFile");
4356
4356
  function createFileSync(file) {
4357
4357
  let stats;
4358
4358
  try {
4359
- stats = fs3.statSync(file);
4359
+ stats = fs4.statSync(file);
4360
4360
  } catch {
4361
4361
  }
4362
4362
  if (stats && stats.isFile()) return;
4363
- const dir = path3.dirname(file);
4363
+ const dir = path4.dirname(file);
4364
4364
  try {
4365
- if (!fs3.statSync(dir).isDirectory()) {
4366
- fs3.readdirSync(dir);
4365
+ if (!fs4.statSync(dir).isDirectory()) {
4366
+ fs4.readdirSync(dir);
4367
4367
  }
4368
4368
  } catch (err) {
4369
4369
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
4370
4370
  else throw err;
4371
4371
  }
4372
- fs3.writeFileSync(file, "");
4372
+ fs4.writeFileSync(file, "");
4373
4373
  }
4374
4374
  __name(createFileSync, "createFileSync");
4375
4375
  module2.exports = {
@@ -4384,51 +4384,51 @@ var require_link = __commonJS({
4384
4384
  "../../../node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
4385
4385
  "use strict";
4386
4386
  var u = require_universalify().fromPromise;
4387
- var path3 = require("path");
4388
- var fs3 = require_fs();
4387
+ var path4 = require("path");
4388
+ var fs4 = require_fs();
4389
4389
  var mkdir = require_mkdirs();
4390
4390
  var { pathExists } = require_path_exists();
4391
4391
  var { areIdentical } = require_stat();
4392
4392
  async function createLink(srcpath, dstpath) {
4393
4393
  let dstStat;
4394
4394
  try {
4395
- dstStat = await fs3.lstat(dstpath);
4395
+ dstStat = await fs4.lstat(dstpath);
4396
4396
  } catch {
4397
4397
  }
4398
4398
  let srcStat;
4399
4399
  try {
4400
- srcStat = await fs3.lstat(srcpath);
4400
+ srcStat = await fs4.lstat(srcpath);
4401
4401
  } catch (err) {
4402
4402
  err.message = err.message.replace("lstat", "ensureLink");
4403
4403
  throw err;
4404
4404
  }
4405
4405
  if (dstStat && areIdentical(srcStat, dstStat)) return;
4406
- const dir = path3.dirname(dstpath);
4406
+ const dir = path4.dirname(dstpath);
4407
4407
  const dirExists = await pathExists(dir);
4408
4408
  if (!dirExists) {
4409
4409
  await mkdir.mkdirs(dir);
4410
4410
  }
4411
- await fs3.link(srcpath, dstpath);
4411
+ await fs4.link(srcpath, dstpath);
4412
4412
  }
4413
4413
  __name(createLink, "createLink");
4414
4414
  function createLinkSync(srcpath, dstpath) {
4415
4415
  let dstStat;
4416
4416
  try {
4417
- dstStat = fs3.lstatSync(dstpath);
4417
+ dstStat = fs4.lstatSync(dstpath);
4418
4418
  } catch {
4419
4419
  }
4420
4420
  try {
4421
- const srcStat = fs3.lstatSync(srcpath);
4421
+ const srcStat = fs4.lstatSync(srcpath);
4422
4422
  if (dstStat && areIdentical(srcStat, dstStat)) return;
4423
4423
  } catch (err) {
4424
4424
  err.message = err.message.replace("lstat", "ensureLink");
4425
4425
  throw err;
4426
4426
  }
4427
- const dir = path3.dirname(dstpath);
4428
- const dirExists = fs3.existsSync(dir);
4429
- if (dirExists) return fs3.linkSync(srcpath, dstpath);
4427
+ const dir = path4.dirname(dstpath);
4428
+ const dirExists = fs4.existsSync(dir);
4429
+ if (dirExists) return fs4.linkSync(srcpath, dstpath);
4430
4430
  mkdir.mkdirsSync(dir);
4431
- return fs3.linkSync(srcpath, dstpath);
4431
+ return fs4.linkSync(srcpath, dstpath);
4432
4432
  }
4433
4433
  __name(createLinkSync, "createLinkSync");
4434
4434
  module2.exports = {
@@ -4442,14 +4442,14 @@ var require_link = __commonJS({
4442
4442
  var require_symlink_paths = __commonJS({
4443
4443
  "../../../node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
4444
4444
  "use strict";
4445
- var path3 = require("path");
4446
- var fs3 = require_fs();
4445
+ var path4 = require("path");
4446
+ var fs4 = require_fs();
4447
4447
  var { pathExists } = require_path_exists();
4448
4448
  var u = require_universalify().fromPromise;
4449
4449
  async function symlinkPaths(srcpath, dstpath) {
4450
- if (path3.isAbsolute(srcpath)) {
4450
+ if (path4.isAbsolute(srcpath)) {
4451
4451
  try {
4452
- await fs3.lstat(srcpath);
4452
+ await fs4.lstat(srcpath);
4453
4453
  } catch (err) {
4454
4454
  err.message = err.message.replace("lstat", "ensureSymlink");
4455
4455
  throw err;
@@ -4459,8 +4459,8 @@ var require_symlink_paths = __commonJS({
4459
4459
  toDst: srcpath
4460
4460
  };
4461
4461
  }
4462
- const dstdir = path3.dirname(dstpath);
4463
- const relativeToDst = path3.join(dstdir, srcpath);
4462
+ const dstdir = path4.dirname(dstpath);
4463
+ const relativeToDst = path4.join(dstdir, srcpath);
4464
4464
  const exists = await pathExists(relativeToDst);
4465
4465
  if (exists) {
4466
4466
  return {
@@ -4469,40 +4469,40 @@ var require_symlink_paths = __commonJS({
4469
4469
  };
4470
4470
  }
4471
4471
  try {
4472
- await fs3.lstat(srcpath);
4472
+ await fs4.lstat(srcpath);
4473
4473
  } catch (err) {
4474
4474
  err.message = err.message.replace("lstat", "ensureSymlink");
4475
4475
  throw err;
4476
4476
  }
4477
4477
  return {
4478
4478
  toCwd: srcpath,
4479
- toDst: path3.relative(dstdir, srcpath)
4479
+ toDst: path4.relative(dstdir, srcpath)
4480
4480
  };
4481
4481
  }
4482
4482
  __name(symlinkPaths, "symlinkPaths");
4483
4483
  function symlinkPathsSync(srcpath, dstpath) {
4484
- if (path3.isAbsolute(srcpath)) {
4485
- const exists2 = fs3.existsSync(srcpath);
4484
+ if (path4.isAbsolute(srcpath)) {
4485
+ const exists2 = fs4.existsSync(srcpath);
4486
4486
  if (!exists2) throw new Error("absolute srcpath does not exist");
4487
4487
  return {
4488
4488
  toCwd: srcpath,
4489
4489
  toDst: srcpath
4490
4490
  };
4491
4491
  }
4492
- const dstdir = path3.dirname(dstpath);
4493
- const relativeToDst = path3.join(dstdir, srcpath);
4494
- const exists = fs3.existsSync(relativeToDst);
4492
+ const dstdir = path4.dirname(dstpath);
4493
+ const relativeToDst = path4.join(dstdir, srcpath);
4494
+ const exists = fs4.existsSync(relativeToDst);
4495
4495
  if (exists) {
4496
4496
  return {
4497
4497
  toCwd: relativeToDst,
4498
4498
  toDst: srcpath
4499
4499
  };
4500
4500
  }
4501
- const srcExists = fs3.existsSync(srcpath);
4501
+ const srcExists = fs4.existsSync(srcpath);
4502
4502
  if (!srcExists) throw new Error("relative srcpath does not exist");
4503
4503
  return {
4504
4504
  toCwd: srcpath,
4505
- toDst: path3.relative(dstdir, srcpath)
4505
+ toDst: path4.relative(dstdir, srcpath)
4506
4506
  };
4507
4507
  }
4508
4508
  __name(symlinkPathsSync, "symlinkPathsSync");
@@ -4517,13 +4517,13 @@ var require_symlink_paths = __commonJS({
4517
4517
  var require_symlink_type = __commonJS({
4518
4518
  "../../../node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
4519
4519
  "use strict";
4520
- var fs3 = require_fs();
4520
+ var fs4 = require_fs();
4521
4521
  var u = require_universalify().fromPromise;
4522
4522
  async function symlinkType(srcpath, type) {
4523
4523
  if (type) return type;
4524
4524
  let stats;
4525
4525
  try {
4526
- stats = await fs3.lstat(srcpath);
4526
+ stats = await fs4.lstat(srcpath);
4527
4527
  } catch {
4528
4528
  return "file";
4529
4529
  }
@@ -4534,7 +4534,7 @@ var require_symlink_type = __commonJS({
4534
4534
  if (type) return type;
4535
4535
  let stats;
4536
4536
  try {
4537
- stats = fs3.lstatSync(srcpath);
4537
+ stats = fs4.lstatSync(srcpath);
4538
4538
  } catch {
4539
4539
  return "file";
4540
4540
  }
@@ -4553,8 +4553,8 @@ var require_symlink = __commonJS({
4553
4553
  "../../../node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
4554
4554
  "use strict";
4555
4555
  var u = require_universalify().fromPromise;
4556
- var path3 = require("path");
4557
- var fs3 = require_fs();
4556
+ var path4 = require("path");
4557
+ var fs4 = require_fs();
4558
4558
  var { mkdirs, mkdirsSync } = require_mkdirs();
4559
4559
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
4560
4560
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -4563,65 +4563,65 @@ var require_symlink = __commonJS({
4563
4563
  async function createSymlink(srcpath, dstpath, type) {
4564
4564
  let stats;
4565
4565
  try {
4566
- stats = await fs3.lstat(dstpath);
4566
+ stats = await fs4.lstat(dstpath);
4567
4567
  } catch {
4568
4568
  }
4569
4569
  if (stats && stats.isSymbolicLink()) {
4570
4570
  let srcStat;
4571
- if (path3.isAbsolute(srcpath)) {
4572
- srcStat = await fs3.stat(srcpath);
4571
+ if (path4.isAbsolute(srcpath)) {
4572
+ srcStat = await fs4.stat(srcpath);
4573
4573
  } else {
4574
- const dstdir = path3.dirname(dstpath);
4575
- const relativeToDst = path3.join(dstdir, srcpath);
4574
+ const dstdir = path4.dirname(dstpath);
4575
+ const relativeToDst = path4.join(dstdir, srcpath);
4576
4576
  try {
4577
- srcStat = await fs3.stat(relativeToDst);
4577
+ srcStat = await fs4.stat(relativeToDst);
4578
4578
  } catch {
4579
- srcStat = await fs3.stat(srcpath);
4579
+ srcStat = await fs4.stat(srcpath);
4580
4580
  }
4581
4581
  }
4582
- const dstStat = await fs3.stat(dstpath);
4582
+ const dstStat = await fs4.stat(dstpath);
4583
4583
  if (areIdentical(srcStat, dstStat)) return;
4584
4584
  }
4585
4585
  const relative2 = await symlinkPaths(srcpath, dstpath);
4586
4586
  srcpath = relative2.toDst;
4587
4587
  const toType = await symlinkType(relative2.toCwd, type);
4588
- const dir = path3.dirname(dstpath);
4588
+ const dir = path4.dirname(dstpath);
4589
4589
  if (!await pathExists(dir)) {
4590
4590
  await mkdirs(dir);
4591
4591
  }
4592
- return fs3.symlink(srcpath, dstpath, toType);
4592
+ return fs4.symlink(srcpath, dstpath, toType);
4593
4593
  }
4594
4594
  __name(createSymlink, "createSymlink");
4595
4595
  function createSymlinkSync(srcpath, dstpath, type) {
4596
4596
  let stats;
4597
4597
  try {
4598
- stats = fs3.lstatSync(dstpath);
4598
+ stats = fs4.lstatSync(dstpath);
4599
4599
  } catch {
4600
4600
  }
4601
4601
  if (stats && stats.isSymbolicLink()) {
4602
4602
  let srcStat;
4603
- if (path3.isAbsolute(srcpath)) {
4604
- srcStat = fs3.statSync(srcpath);
4603
+ if (path4.isAbsolute(srcpath)) {
4604
+ srcStat = fs4.statSync(srcpath);
4605
4605
  } else {
4606
- const dstdir = path3.dirname(dstpath);
4607
- const relativeToDst = path3.join(dstdir, srcpath);
4606
+ const dstdir = path4.dirname(dstpath);
4607
+ const relativeToDst = path4.join(dstdir, srcpath);
4608
4608
  try {
4609
- srcStat = fs3.statSync(relativeToDst);
4609
+ srcStat = fs4.statSync(relativeToDst);
4610
4610
  } catch {
4611
- srcStat = fs3.statSync(srcpath);
4611
+ srcStat = fs4.statSync(srcpath);
4612
4612
  }
4613
4613
  }
4614
- const dstStat = fs3.statSync(dstpath);
4614
+ const dstStat = fs4.statSync(dstpath);
4615
4615
  if (areIdentical(srcStat, dstStat)) return;
4616
4616
  }
4617
4617
  const relative2 = symlinkPathsSync(srcpath, dstpath);
4618
4618
  srcpath = relative2.toDst;
4619
4619
  type = symlinkTypeSync(relative2.toCwd, type);
4620
- const dir = path3.dirname(dstpath);
4621
- const exists = fs3.existsSync(dir);
4622
- if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
4620
+ const dir = path4.dirname(dstpath);
4621
+ const exists = fs4.existsSync(dir);
4622
+ if (exists) return fs4.symlinkSync(srcpath, dstpath, type);
4623
4623
  mkdirsSync(dir);
4624
- return fs3.symlinkSync(srcpath, dstpath, type);
4624
+ return fs4.symlinkSync(srcpath, dstpath, type);
4625
4625
  }
4626
4626
  __name(createSymlinkSync, "createSymlinkSync");
4627
4627
  module2.exports = {
@@ -4691,9 +4691,9 @@ var require_jsonfile = __commonJS({
4691
4691
  if (typeof options === "string") {
4692
4692
  options = { encoding: options };
4693
4693
  }
4694
- const fs3 = options.fs || _fs;
4694
+ const fs4 = options.fs || _fs;
4695
4695
  const shouldThrow = "throws" in options ? options.throws : true;
4696
- let data = await universalify.fromCallback(fs3.readFile)(file, options);
4696
+ let data = await universalify.fromCallback(fs4.readFile)(file, options);
4697
4697
  data = stripBom(data);
4698
4698
  let obj;
4699
4699
  try {
@@ -4709,15 +4709,15 @@ var require_jsonfile = __commonJS({
4709
4709
  return obj;
4710
4710
  }
4711
4711
  __name(_readFile, "_readFile");
4712
- var readFile = universalify.fromPromise(_readFile);
4712
+ var readFile2 = universalify.fromPromise(_readFile);
4713
4713
  function readFileSync2(file, options = {}) {
4714
4714
  if (typeof options === "string") {
4715
4715
  options = { encoding: options };
4716
4716
  }
4717
- const fs3 = options.fs || _fs;
4717
+ const fs4 = options.fs || _fs;
4718
4718
  const shouldThrow = "throws" in options ? options.throws : true;
4719
4719
  try {
4720
- let content = fs3.readFileSync(file, options);
4720
+ let content = fs4.readFileSync(file, options);
4721
4721
  content = stripBom(content);
4722
4722
  return JSON.parse(content, options.reviver);
4723
4723
  } catch (err) {
@@ -4731,20 +4731,20 @@ var require_jsonfile = __commonJS({
4731
4731
  }
4732
4732
  __name(readFileSync2, "readFileSync");
4733
4733
  async function _writeFile(file, obj, options = {}) {
4734
- const fs3 = options.fs || _fs;
4734
+ const fs4 = options.fs || _fs;
4735
4735
  const str = stringify(obj, options);
4736
- await universalify.fromCallback(fs3.writeFile)(file, str, options);
4736
+ await universalify.fromCallback(fs4.writeFile)(file, str, options);
4737
4737
  }
4738
4738
  __name(_writeFile, "_writeFile");
4739
4739
  var writeFile = universalify.fromPromise(_writeFile);
4740
4740
  function writeFileSync(file, obj, options = {}) {
4741
- const fs3 = options.fs || _fs;
4741
+ const fs4 = options.fs || _fs;
4742
4742
  const str = stringify(obj, options);
4743
- return fs3.writeFileSync(file, str, options);
4743
+ return fs4.writeFileSync(file, str, options);
4744
4744
  }
4745
4745
  __name(writeFileSync, "writeFileSync");
4746
4746
  module2.exports = {
4747
- readFile,
4747
+ readFile: readFile2,
4748
4748
  readFileSync: readFileSync2,
4749
4749
  writeFile,
4750
4750
  writeFileSync
@@ -4772,24 +4772,24 @@ var require_output_file = __commonJS({
4772
4772
  "../../../node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
4773
4773
  "use strict";
4774
4774
  var u = require_universalify().fromPromise;
4775
- var fs3 = require_fs();
4776
- var path3 = require("path");
4775
+ var fs4 = require_fs();
4776
+ var path4 = require("path");
4777
4777
  var mkdir = require_mkdirs();
4778
4778
  var pathExists = require_path_exists().pathExists;
4779
4779
  async function outputFile(file, data, encoding = "utf-8") {
4780
- const dir = path3.dirname(file);
4780
+ const dir = path4.dirname(file);
4781
4781
  if (!await pathExists(dir)) {
4782
4782
  await mkdir.mkdirs(dir);
4783
4783
  }
4784
- return fs3.writeFile(file, data, encoding);
4784
+ return fs4.writeFile(file, data, encoding);
4785
4785
  }
4786
4786
  __name(outputFile, "outputFile");
4787
4787
  function outputFileSync(file, ...args) {
4788
- const dir = path3.dirname(file);
4789
- if (!fs3.existsSync(dir)) {
4788
+ const dir = path4.dirname(file);
4789
+ if (!fs4.existsSync(dir)) {
4790
4790
  mkdir.mkdirsSync(dir);
4791
4791
  }
4792
- fs3.writeFileSync(file, ...args);
4792
+ fs4.writeFileSync(file, ...args);
4793
4793
  }
4794
4794
  __name(outputFileSync, "outputFileSync");
4795
4795
  module2.exports = {
@@ -4851,8 +4851,8 @@ var require_json = __commonJS({
4851
4851
  var require_move = __commonJS({
4852
4852
  "../../../node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
4853
4853
  "use strict";
4854
- var fs3 = require_fs();
4855
- var path3 = require("path");
4854
+ var fs4 = require_fs();
4855
+ var path4 = require("path");
4856
4856
  var { copy } = require_copy2();
4857
4857
  var { remove } = require_remove();
4858
4858
  var { mkdirp } = require_mkdirs();
@@ -4862,8 +4862,8 @@ var require_move = __commonJS({
4862
4862
  const overwrite = opts.overwrite || opts.clobber || false;
4863
4863
  const { srcStat, isChangingCase = false } = await stat2.checkPaths(src, dest, "move", opts);
4864
4864
  await stat2.checkParentPaths(src, srcStat, dest, "move");
4865
- const destParent = path3.dirname(dest);
4866
- const parsedParentPath = path3.parse(destParent);
4865
+ const destParent = path4.dirname(dest);
4866
+ const parsedParentPath = path4.parse(destParent);
4867
4867
  if (parsedParentPath.root !== destParent) {
4868
4868
  await mkdirp(destParent);
4869
4869
  }
@@ -4879,7 +4879,7 @@ var require_move = __commonJS({
4879
4879
  }
4880
4880
  }
4881
4881
  try {
4882
- await fs3.rename(src, dest);
4882
+ await fs4.rename(src, dest);
4883
4883
  } catch (err) {
4884
4884
  if (err.code !== "EXDEV") {
4885
4885
  throw err;
@@ -4906,8 +4906,8 @@ var require_move = __commonJS({
4906
4906
  var require_move_sync = __commonJS({
4907
4907
  "../../../node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
4908
4908
  "use strict";
4909
- var fs3 = require_graceful_fs();
4910
- var path3 = require("path");
4909
+ var fs4 = require_graceful_fs();
4910
+ var path4 = require("path");
4911
4911
  var copySync = require_copy2().copySync;
4912
4912
  var removeSync = require_remove().removeSync;
4913
4913
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -4917,13 +4917,13 @@ var require_move_sync = __commonJS({
4917
4917
  const overwrite = opts.overwrite || opts.clobber || false;
4918
4918
  const { srcStat, isChangingCase = false } = stat2.checkPathsSync(src, dest, "move", opts);
4919
4919
  stat2.checkParentPathsSync(src, srcStat, dest, "move");
4920
- if (!isParentRoot(dest)) mkdirpSync(path3.dirname(dest));
4920
+ if (!isParentRoot(dest)) mkdirpSync(path4.dirname(dest));
4921
4921
  return doRename(src, dest, overwrite, isChangingCase);
4922
4922
  }
4923
4923
  __name(moveSync, "moveSync");
4924
4924
  function isParentRoot(dest) {
4925
- const parent = path3.dirname(dest);
4926
- const parsedPath = path3.parse(parent);
4925
+ const parent = path4.dirname(dest);
4926
+ const parsedPath = path4.parse(parent);
4927
4927
  return parsedPath.root === parent;
4928
4928
  }
4929
4929
  __name(isParentRoot, "isParentRoot");
@@ -4933,13 +4933,13 @@ var require_move_sync = __commonJS({
4933
4933
  removeSync(dest);
4934
4934
  return rename(src, dest, overwrite);
4935
4935
  }
4936
- if (fs3.existsSync(dest)) throw new Error("dest already exists.");
4936
+ if (fs4.existsSync(dest)) throw new Error("dest already exists.");
4937
4937
  return rename(src, dest, overwrite);
4938
4938
  }
4939
4939
  __name(doRename, "doRename");
4940
4940
  function rename(src, dest, overwrite) {
4941
4941
  try {
4942
- fs3.renameSync(src, dest);
4942
+ fs4.renameSync(src, dest);
4943
4943
  } catch (err) {
4944
4944
  if (err.code !== "EXDEV") throw err;
4945
4945
  return moveAcrossDevice(src, dest, overwrite);
@@ -4993,6 +4993,56 @@ var require_lib = __commonJS({
4993
4993
  }
4994
4994
  });
4995
4995
 
4996
+ // lib/runner/private/test-specific-context.ts
4997
+ async function findTestSpecificContext(directory) {
4998
+ const existing = CONTEXT_CACHE.get(directory);
4999
+ if (existing) {
5000
+ return existing;
5001
+ }
5002
+ let maybeContext;
5003
+ if (maybeContext === void 0) {
5004
+ const contextFile = path.join(directory, INTEG_CONTEXT_JSON_FILE);
5005
+ maybeContext = await tryReadJsonFile(contextFile);
5006
+ }
5007
+ if (maybeContext === void 0) {
5008
+ const cdkJsonFile = path.join(directory, CDK_JSON_FILE);
5009
+ let maybeCdkJson = await tryReadJsonFile(cdkJsonFile);
5010
+ maybeContext = maybeCdkJson?.context;
5011
+ }
5012
+ if (maybeContext === void 0) {
5013
+ const parentDir = path.dirname(directory);
5014
+ if (parentDir !== directory) {
5015
+ maybeContext = await findTestSpecificContext(parentDir);
5016
+ }
5017
+ }
5018
+ CONTEXT_CACHE.set(directory, maybeContext);
5019
+ return maybeContext;
5020
+ }
5021
+ async function tryReadJsonFile(filePath) {
5022
+ try {
5023
+ const content = await fs.readFile(filePath, { encoding: "utf-8" });
5024
+ return JSON.parse(content);
5025
+ } catch (e) {
5026
+ if (e.code === "ENOENT" || e.code === "ENOTDIR") {
5027
+ return void 0;
5028
+ }
5029
+ throw e;
5030
+ }
5031
+ }
5032
+ var fs, path, INTEG_CONTEXT_JSON_FILE, CDK_JSON_FILE, CONTEXT_CACHE;
5033
+ var init_test_specific_context = __esm({
5034
+ "lib/runner/private/test-specific-context.ts"() {
5035
+ "use strict";
5036
+ fs = __toESM(require("fs/promises"));
5037
+ path = __toESM(require("path"));
5038
+ INTEG_CONTEXT_JSON_FILE = "integ.context.json";
5039
+ CDK_JSON_FILE = "cdk.json";
5040
+ CONTEXT_CACHE = /* @__PURE__ */ new Map();
5041
+ __name(findTestSpecificContext, "findTestSpecificContext");
5042
+ __name(tryReadJsonFile, "tryReadJsonFile");
5043
+ }
5044
+ });
5045
+
4996
5046
  // lib/runner/integration-tests.ts
4997
5047
  function pythonExecutable() {
4998
5048
  let python = "python3";
@@ -5001,26 +5051,27 @@ function pythonExecutable() {
5001
5051
  }
5002
5052
  return python;
5003
5053
  }
5004
- var path, fs, CDK_OUTDIR_PREFIX, IntegTest, IntegrationTests;
5054
+ var path2, fs2, CDK_OUTDIR_PREFIX, IntegTest, IntegrationTests;
5005
5055
  var init_integration_tests = __esm({
5006
5056
  "lib/runner/integration-tests.ts"() {
5007
5057
  "use strict";
5008
- path = __toESM(require("path"));
5009
- fs = __toESM(require_lib());
5058
+ path2 = __toESM(require("path"));
5059
+ fs2 = __toESM(require_lib());
5060
+ init_test_specific_context();
5010
5061
  CDK_OUTDIR_PREFIX = "cdk-integ.out";
5011
5062
  IntegTest = class {
5012
5063
  constructor(info) {
5013
5064
  this.info = info;
5014
5065
  this.appCommand = info.appCommand ?? "node {filePath}";
5015
5066
  this.directory = process.cwd();
5016
- this.absoluteFileName = path.resolve(info.fileName);
5017
- this.fileName = path.relative(this.directory, info.fileName);
5018
- this.discoveryRelativeFileName = path.relative(info.discoveryRoot, info.fileName);
5019
- const parsed = path.parse(this.fileName);
5020
- this.testName = path.join(path.relative(this.info.discoveryRoot, parsed.dir), parsed.name);
5067
+ this.absoluteFileName = path2.resolve(info.fileName);
5068
+ this.fileName = path2.relative(this.directory, info.fileName);
5069
+ this.discoveryRelativeFileName = path2.relative(info.discoveryRoot, info.fileName);
5070
+ const parsed = path2.parse(this.fileName);
5071
+ this.testName = path2.join(path2.relative(this.info.discoveryRoot, parsed.dir), parsed.name);
5021
5072
  this.normalizedTestName = parsed.name;
5022
- this.snapshotDir = path.join(parsed.dir, `${parsed.base}.snapshot`);
5023
- this.temporaryOutputDir = path.join(parsed.dir, `${CDK_OUTDIR_PREFIX}.${parsed.base}.snapshot`);
5073
+ this.snapshotDir = path2.join(parsed.dir, `${parsed.base}.snapshot`);
5074
+ this.temporaryOutputDir = path2.join(parsed.dir, `${CDK_OUTDIR_PREFIX}.${parsed.base}.snapshot`);
5024
5075
  }
5025
5076
  info;
5026
5077
  static {
@@ -5093,6 +5144,16 @@ var init_integration_tests = __esm({
5093
5144
  this.absoluteFileName
5094
5145
  ].includes(name);
5095
5146
  }
5147
+ /**
5148
+ * Search for a test-specific context file and return its contents if it exists.
5149
+ *
5150
+ * If `undefined`, no test-specific context could be found. Test-specific context
5151
+ * will be taken from either `integ.context.json` if found, or otherwise
5152
+ * `cdk.json#context` if not found, upstream from the test.
5153
+ */
5154
+ async testSpecificContext() {
5155
+ return findTestSpecificContext(this.fileName);
5156
+ }
5096
5157
  };
5097
5158
  __name(pythonExecutable, "pythonExecutable");
5098
5159
  IntegrationTests = class {
@@ -5203,7 +5264,7 @@ var init_integration_tests = __esm({
5203
5264
  const testCases = Object.entries(options.testCases).flatMap(
5204
5265
  ([appCommand, patterns]) => files.filter((fileName) => patterns.some((pattern) => {
5205
5266
  const regex = new RegExp(pattern);
5206
- return regex.test(fileName) || regex.test(path.basename(fileName));
5267
+ return regex.test(fileName) || regex.test(path2.basename(fileName));
5207
5268
  })).map((fileName) => new IntegTest({
5208
5269
  discoveryRoot: this.directory,
5209
5270
  fileName,
@@ -5225,10 +5286,10 @@ var init_integration_tests = __esm({
5225
5286
  async readTree() {
5226
5287
  const ret = new Array();
5227
5288
  async function recurse(dir) {
5228
- const files = await fs.readdir(dir);
5289
+ const files = await fs2.readdir(dir);
5229
5290
  for (const file of files) {
5230
- const fullPath = path.join(dir, file);
5231
- const statf = await fs.stat(fullPath);
5291
+ const fullPath = path2.join(dir, file);
5292
+ const statf = await fs2.stat(fullPath);
5232
5293
  if (statf.isFile()) {
5233
5294
  ret.push(fullPath);
5234
5295
  }
@@ -5304,37 +5365,37 @@ var init_unstable_features = __esm({
5304
5365
  // lib/workers/common.ts
5305
5366
  function printSummary(total, failed) {
5306
5367
  if (failed > 0) {
5307
- print("%s: %s %s, %s total", chalk2.bold("Tests"), chalk2.red(failed), chalk2.red("failed"), total);
5368
+ print("%s: %s %s, %s total", import_chalk2.default.bold("Tests"), import_chalk2.default.red(failed), import_chalk2.default.red("failed"), total);
5308
5369
  } else {
5309
- print("%s: %s %s, %s total", chalk2.bold("Tests"), chalk2.green(total), chalk2.green("passed"), total);
5370
+ print("%s: %s %s, %s total", import_chalk2.default.bold("Tests"), import_chalk2.default.green(total), import_chalk2.default.green("passed"), total);
5310
5371
  }
5311
5372
  }
5312
5373
  function printResults(diagnostic) {
5313
5374
  switch (diagnostic.reason) {
5314
5375
  case "SNAPSHOT_SUCCESS" /* SNAPSHOT_SUCCESS */:
5315
- success(" UNCHANGED %s %s", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`));
5376
+ success(" UNCHANGED %s %s", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`));
5316
5377
  break;
5317
5378
  case "TEST_SUCCESS" /* TEST_SUCCESS */:
5318
- success(" SUCCESS %s %s\n ", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`));
5379
+ success(" SUCCESS %s %s\n ", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`));
5319
5380
  break;
5320
5381
  case "NO_SNAPSHOT" /* NO_SNAPSHOT */:
5321
- error(" NEW %s %s", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`));
5382
+ error(" NEW %s %s", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`));
5322
5383
  break;
5323
5384
  case "SNAPSHOT_FAILED" /* SNAPSHOT_FAILED */:
5324
- error(" CHANGED %s %s\n%s", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5385
+ error(" CHANGED %s %s\n%s", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5325
5386
  break;
5326
5387
  case "TEST_WARNING" /* TEST_WARNING */:
5327
- warning(" WARN %s %s\n%s", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5388
+ warning(" WARN %s %s\n%s", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5328
5389
  break;
5329
5390
  case "SNAPSHOT_ERROR" /* SNAPSHOT_ERROR */:
5330
5391
  case "TEST_ERROR" /* TEST_ERROR */:
5331
- error(" ERROR %s %s\n%s", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5392
+ error(" ERROR %s %s\n%s", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5332
5393
  break;
5333
5394
  case "TEST_FAILED" /* TEST_FAILED */:
5334
- error(" FAILED %s %s\n%s", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5395
+ error(" FAILED %s %s\n%s", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5335
5396
  break;
5336
5397
  case "ASSERTION_FAILED" /* ASSERTION_FAILED */:
5337
- error(" ASSERT %s %s\n%s", diagnostic.testName, chalk2.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5398
+ error(" ASSERT %s %s\n%s", diagnostic.testName, import_chalk2.default.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
5338
5399
  break;
5339
5400
  }
5340
5401
  for (const addl of diagnostic.additionalMessages ?? []) {
@@ -5350,13 +5411,13 @@ function printLaggards(testNames) {
5350
5411
  `Waiting for ${testNames.size} more`,
5351
5412
  testNames.size < 10 ? ["(", Array.from(testNames).join(", "), ")"].join("") : ""
5352
5413
  ];
5353
- print(chalk2.grey(parts.filter((x) => x).join(" ")));
5414
+ print(import_chalk2.default.grey(parts.filter((x) => x).join(" ")));
5354
5415
  }
5355
- var chalk2;
5416
+ var import_chalk2;
5356
5417
  var init_common = __esm({
5357
5418
  "lib/workers/common.ts"() {
5358
5419
  "use strict";
5359
- chalk2 = __toESM(require_source());
5420
+ import_chalk2 = __toESM(require_source());
5360
5421
  init_logger();
5361
5422
  __name(printSummary, "printSummary");
5362
5423
  __name(printResults, "printResults");
@@ -5574,9 +5635,9 @@ var init_integ_watch_worker = __esm({
5574
5635
  var require_build = __commonJS({
5575
5636
  "../../../node_modules/y18n/build/index.cjs"(exports2, module2) {
5576
5637
  "use strict";
5577
- var fs3 = require("fs");
5638
+ var fs4 = require("fs");
5578
5639
  var util2 = require("util");
5579
- var path3 = require("path");
5640
+ var path4 = require("path");
5580
5641
  var shim;
5581
5642
  var Y18N = class {
5582
5643
  static {
@@ -5742,14 +5803,14 @@ var require_build = __commonJS({
5742
5803
  __name(y18n$1, "y18n$1");
5743
5804
  var nodePlatformShim = {
5744
5805
  fs: {
5745
- readFileSync: fs3.readFileSync,
5746
- writeFile: fs3.writeFile
5806
+ readFileSync: fs4.readFileSync,
5807
+ writeFile: fs4.writeFile
5747
5808
  },
5748
5809
  format: util2.format,
5749
- resolve: path3.resolve,
5810
+ resolve: path4.resolve,
5750
5811
  exists: /* @__PURE__ */ __name((file) => {
5751
5812
  try {
5752
- return fs3.statSync(file).isFile();
5813
+ return fs4.statSync(file).isFile();
5753
5814
  } catch (err) {
5754
5815
  return false;
5755
5816
  }
@@ -5767,8 +5828,8 @@ var require_build2 = __commonJS({
5767
5828
  "node_modules/yargs-parser/build/index.cjs"(exports2, module2) {
5768
5829
  "use strict";
5769
5830
  var util2 = require("util");
5770
- var fs3 = require("fs");
5771
- var path3 = require("path");
5831
+ var fs4 = require("fs");
5832
+ var path4 = require("path");
5772
5833
  function camelCase(str) {
5773
5834
  const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
5774
5835
  if (!isCamelCase) {
@@ -6741,13 +6802,13 @@ var require_build2 = __commonJS({
6741
6802
  return env;
6742
6803
  }, "env"),
6743
6804
  format: util2.format,
6744
- normalize: path3.normalize,
6745
- resolve: path3.resolve,
6746
- require: /* @__PURE__ */ __name((path4) => {
6805
+ normalize: path4.normalize,
6806
+ resolve: path4.resolve,
6807
+ require: /* @__PURE__ */ __name((path5) => {
6747
6808
  if (typeof require !== "undefined") {
6748
- return require(path4);
6749
- } else if (path4.match(/\.json$/)) {
6750
- return fs3.readFileSync(path4, "utf8");
6809
+ return require(path5);
6810
+ } else if (path5.match(/\.json$/)) {
6811
+ return fs4.readFileSync(path5, "utf8");
6751
6812
  } else {
6752
6813
  throw Error("only .json config files are supported in ESM");
6753
6814
  }
@@ -7314,18 +7375,18 @@ var require_build3 = __commonJS({
7314
7375
  // ../../../node_modules/escalade/sync/index.js
7315
7376
  var require_sync = __commonJS({
7316
7377
  "../../../node_modules/escalade/sync/index.js"(exports2, module2) {
7317
- var { dirname, resolve: resolve3 } = require("path");
7378
+ var { dirname: dirname2, resolve: resolve3 } = require("path");
7318
7379
  var { readdirSync, statSync } = require("fs");
7319
7380
  module2.exports = function(start, callback) {
7320
7381
  let dir = resolve3(".", start);
7321
7382
  let tmp, stats = statSync(dir);
7322
7383
  if (!stats.isDirectory()) {
7323
- dir = dirname(dir);
7384
+ dir = dirname2(dir);
7324
7385
  }
7325
7386
  while (true) {
7326
7387
  tmp = callback(dir, readdirSync(dir));
7327
7388
  if (tmp) return resolve3(dir, tmp);
7328
- dir = dirname(tmp = dir);
7389
+ dir = dirname2(tmp = dir);
7329
7390
  if (tmp === dir) break;
7330
7391
  }
7331
7392
  };
@@ -7360,10 +7421,10 @@ var require_get_caller_file = __commonJS({
7360
7421
  var require_require_directory = __commonJS({
7361
7422
  "../../../node_modules/require-directory/index.js"(exports2, module2) {
7362
7423
  "use strict";
7363
- var fs3 = require("fs");
7364
- var join3 = require("path").join;
7424
+ var fs4 = require("fs");
7425
+ var join4 = require("path").join;
7365
7426
  var resolve3 = require("path").resolve;
7366
- var dirname = require("path").dirname;
7427
+ var dirname2 = require("path").dirname;
7367
7428
  var defaultOptions = {
7368
7429
  extensions: ["js", "json", "coffee"],
7369
7430
  recurse: true,
@@ -7374,22 +7435,22 @@ var require_require_directory = __commonJS({
7374
7435
  return obj;
7375
7436
  }, "visit")
7376
7437
  };
7377
- function checkFileInclusion(path3, filename, options) {
7438
+ function checkFileInclusion(path4, filename, options) {
7378
7439
  return (
7379
7440
  // verify file has valid extension
7380
7441
  new RegExp("\\.(" + options.extensions.join("|") + ")$", "i").test(filename) && // if options.include is a RegExp, evaluate it and make sure the path passes
7381
- !(options.include && options.include instanceof RegExp && !options.include.test(path3)) && // if options.include is a function, evaluate it and make sure the path passes
7382
- !(options.include && typeof options.include === "function" && !options.include(path3, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
7383
- !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path3)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
7384
- !(options.exclude && typeof options.exclude === "function" && options.exclude(path3, filename))
7442
+ !(options.include && options.include instanceof RegExp && !options.include.test(path4)) && // if options.include is a function, evaluate it and make sure the path passes
7443
+ !(options.include && typeof options.include === "function" && !options.include(path4, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
7444
+ !(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path4)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
7445
+ !(options.exclude && typeof options.exclude === "function" && options.exclude(path4, filename))
7385
7446
  );
7386
7447
  }
7387
7448
  __name(checkFileInclusion, "checkFileInclusion");
7388
- function requireDirectory(m, path3, options) {
7449
+ function requireDirectory(m, path4, options) {
7389
7450
  var retval = {};
7390
- if (path3 && !options && typeof path3 !== "string") {
7391
- options = path3;
7392
- path3 = null;
7451
+ if (path4 && !options && typeof path4 !== "string") {
7452
+ options = path4;
7453
+ path4 = null;
7393
7454
  }
7394
7455
  options = options || {};
7395
7456
  for (var prop in defaultOptions) {
@@ -7397,10 +7458,10 @@ var require_require_directory = __commonJS({
7397
7458
  options[prop] = defaultOptions[prop];
7398
7459
  }
7399
7460
  }
7400
- path3 = !path3 ? dirname(m.filename) : resolve3(dirname(m.filename), path3);
7401
- fs3.readdirSync(path3).forEach(function(filename) {
7402
- var joined = join3(path3, filename), files, key, obj;
7403
- if (fs3.statSync(joined).isDirectory() && options.recurse) {
7461
+ path4 = !path4 ? dirname2(m.filename) : resolve3(dirname2(m.filename), path4);
7462
+ fs4.readdirSync(path4).forEach(function(filename) {
7463
+ var joined = join4(path4, filename), files, key, obj;
7464
+ if (fs4.statSync(joined).isDirectory() && options.recurse) {
7404
7465
  files = requireDirectory(m, joined, options);
7405
7466
  if (Object.keys(files).length) {
7406
7467
  retval[options.rename(filename, joined, filename)] = files;
@@ -10280,7 +10341,7 @@ function parseCliArgs(args = []) {
10280
10341
  if (argv.strict && argv.exclude) {
10281
10342
  throw new Error("Cannot use --strict with --exclude");
10282
10343
  }
10283
- const requestedTests = fromFile ? fs2.readFileSync(fromFile, { encoding: "utf8" }).split("\n").filter((x) => x).filter((x) => !x.startsWith("#")) : tests.length > 0 ? tests : void 0;
10344
+ const requestedTests = fromFile ? fs3.readFileSync(fromFile, { encoding: "utf8" }).split("\n").filter((x) => x).filter((x) => !x.startsWith("#")) : tests.length > 0 ? tests : void 0;
10284
10345
  if (argv["disable-update-workflow"] !== void 0 && argv["update-workflow"] !== void 0) {
10285
10346
  throw new Error("--disable-update-workflow and --[no-]update-workflow cannot be used together");
10286
10347
  }
@@ -10334,12 +10395,12 @@ async function run(options) {
10334
10395
  if (options.updateFromTags) {
10335
10396
  options.force = true;
10336
10397
  }
10337
- const testsFromArgs = await new IntegrationTests(path2.resolve(options.directory)).fromCliOptions(options);
10398
+ const testsFromArgs = await new IntegrationTests(path3.resolve(options.directory)).fromCliOptions(options);
10338
10399
  if (options.list) {
10339
10400
  process.stdout.write(testsFromArgs.map((t) => t.discoveryRelativeFileName).join("\n") + "\n");
10340
10401
  return;
10341
10402
  }
10342
- const pool2 = workerpool.pool(path2.join(__dirname, "..", "lib", "workers", "extract", "index.js"), {
10403
+ const pool2 = workerpool.pool(path3.join(__dirname, "..", "lib", "workers", "extract", "index.js"), {
10343
10404
  maxWorkers: options.watch ? 1 : options.maxWorkers
10344
10405
  });
10345
10406
  const testsToRun = [];
@@ -10440,7 +10501,7 @@ function validateWatchArgs(args) {
10440
10501
  }
10441
10502
  function printDestructiveChanges(changes) {
10442
10503
  if (changes.length > 0) {
10443
- warning("!!! This test contains %s !!!", chalk3.bold("destructive changes"));
10504
+ warning("!!! This test contains %s !!!", import_chalk3.default.bold("destructive changes"));
10444
10505
  changes.forEach((change) => {
10445
10506
  warning(" Stack: %s - Resource: %s - Impact: %s", change.stackName, change.logicalId, change.impact);
10446
10507
  });
@@ -10478,7 +10539,7 @@ function configFromFile(fileName) {
10478
10539
  return {};
10479
10540
  }
10480
10541
  try {
10481
- return JSON.parse(fs2.readFileSync(fileName, { encoding: "utf-8" }));
10542
+ return JSON.parse(fs3.readFileSync(fileName, { encoding: "utf-8" }));
10482
10543
  } catch {
10483
10544
  return {};
10484
10545
  }
@@ -10486,13 +10547,13 @@ function configFromFile(fileName) {
10486
10547
  function splitByComma(xs) {
10487
10548
  return xs.flatMap((x) => x.split(",")).map((x) => x.trim());
10488
10549
  }
10489
- var fs2, path2, chalk3, workerpool, yargs;
10550
+ var fs3, path3, import_chalk3, workerpool, yargs;
10490
10551
  var init_cli = __esm({
10491
10552
  "lib/cli.ts"() {
10492
10553
  "use strict";
10493
- fs2 = __toESM(require("fs"));
10494
- path2 = __toESM(require("path"));
10495
- chalk3 = __toESM(require_source());
10554
+ fs3 = __toESM(require("fs"));
10555
+ path3 = __toESM(require("path"));
10556
+ import_chalk3 = __toESM(require_source());
10496
10557
  workerpool = __toESM(require_src());
10497
10558
  init_logger();
10498
10559
  init_integration_tests();