@storm-software/testing-tools 1.12.10 → 1.13.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/index.js CHANGED
@@ -128645,9 +128645,9 @@ var require_run_tasks_in_serial = __commonJS({
128645
128645
  }
128646
128646
  });
128647
128647
 
128648
- // node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.js
128648
+ // node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js
128649
128649
  var require_ignore2 = __commonJS({
128650
- "node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.js"(exports, module) {
128650
+ "node_modules/.pnpm/ignore@5.3.0/node_modules/ignore/index.js"(exports, module) {
128651
128651
  "use strict";
128652
128652
  function makeArray(subject) {
128653
128653
  return Array.isArray(subject) ? subject : [subject];
@@ -140716,9 +140716,9 @@ var require_supports_color3 = __commonJS({
140716
140716
  }
140717
140717
  });
140718
140718
 
140719
- // node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/util.js
140719
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
140720
140720
  var require_util2 = __commonJS({
140721
- "node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/util.js"(exports, module) {
140721
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js"(exports, module) {
140722
140722
  "use strict";
140723
140723
  var stringReplaceAll3 = (string, substring, replacer) => {
140724
140724
  let index = string.indexOf(substring);
@@ -140755,9 +140755,9 @@ var require_util2 = __commonJS({
140755
140755
  }
140756
140756
  });
140757
140757
 
140758
- // node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/templates.js
140758
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js
140759
140759
  var require_templates3 = __commonJS({
140760
- "node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/templates.js"(exports, module) {
140760
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js"(exports, module) {
140761
140761
  "use strict";
140762
140762
  var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
140763
140763
  var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
@@ -140869,9 +140869,9 @@ var require_templates3 = __commonJS({
140869
140869
  }
140870
140870
  });
140871
140871
 
140872
- // node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/index.js
140872
+ // node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js
140873
140873
  var require_source = __commonJS({
140874
- "node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/index.js"(exports, module) {
140874
+ "node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module) {
140875
140875
  "use strict";
140876
140876
  var ansiStyles2 = require_ansi_styles3();
140877
140877
  var { stdout: stdoutColor2, stderr: stderrColor2 } = require_supports_color3();
@@ -330128,9 +330128,9 @@ var require_watch_for_single_file_changes = __commonJS({
330128
330128
  }
330129
330129
  });
330130
330130
 
330131
- // node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
330131
+ // node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
330132
330132
  var require_universalify = __commonJS({
330133
- "node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
330133
+ "node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
330134
330134
  "use strict";
330135
330135
  exports.fromCallback = function(fn6) {
330136
330136
  return Object.defineProperty(function(...args) {
@@ -330138,11 +330138,8 @@ var require_universalify = __commonJS({
330138
330138
  fn6.apply(this, args);
330139
330139
  else {
330140
330140
  return new Promise((resolve2, reject) => {
330141
- fn6.call(
330142
- this,
330143
- ...args,
330144
- (err, res) => err != null ? reject(err) : resolve2(res)
330145
- );
330141
+ args.push((err, res) => err != null ? reject(err) : resolve2(res));
330142
+ fn6.apply(this, args);
330146
330143
  });
330147
330144
  }
330148
330145
  }, "name", { value: fn6.name });
@@ -330152,8 +330149,10 @@ var require_universalify = __commonJS({
330152
330149
  const cb = args[args.length - 1];
330153
330150
  if (typeof cb !== "function")
330154
330151
  return fn6.apply(this, args);
330155
- else
330156
- fn6.apply(this, args.slice(0, -1)).then((r3) => cb(null, r3), cb);
330152
+ else {
330153
+ args.pop();
330154
+ fn6.apply(this, args).then((r3) => cb(null, r3), cb);
330155
+ }
330157
330156
  }, "name", { value: fn6.name });
330158
330157
  };
330159
330158
  }
@@ -330970,9 +330969,9 @@ var require_graceful_fs = __commonJS({
330970
330969
  }
330971
330970
  });
330972
330971
 
330973
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js
330972
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
330974
330973
  var require_fs6 = __commonJS({
330975
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports) {
330974
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
330976
330975
  "use strict";
330977
330976
  var u = require_universalify().fromCallback;
330978
330977
  var fs8 = require_graceful_fs();
@@ -331086,9 +331085,9 @@ var require_fs6 = __commonJS({
331086
331085
  }
331087
331086
  });
331088
331087
 
331089
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js
331088
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
331090
331089
  var require_utils6 = __commonJS({
331091
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
331090
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
331092
331091
  "use strict";
331093
331092
  var path9 = __require("path");
331094
331093
  module.exports.checkPath = function checkPath(pth) {
@@ -331104,9 +331103,9 @@ var require_utils6 = __commonJS({
331104
331103
  }
331105
331104
  });
331106
331105
 
331107
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js
331106
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
331108
331107
  var require_make_dir = __commonJS({
331109
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
331108
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
331110
331109
  "use strict";
331111
331110
  var fs8 = require_fs6();
331112
331111
  var { checkPath } = require_utils6();
@@ -331133,9 +331132,9 @@ var require_make_dir = __commonJS({
331133
331132
  }
331134
331133
  });
331135
331134
 
331136
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js
331135
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
331137
331136
  var require_mkdirs = __commonJS({
331138
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
331137
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
331139
331138
  "use strict";
331140
331139
  var u = require_universalify().fromPromise;
331141
331140
  var { makeDir: _makeDir, makeDirSync } = require_make_dir();
@@ -331152,9 +331151,9 @@ var require_mkdirs = __commonJS({
331152
331151
  }
331153
331152
  });
331154
331153
 
331155
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js
331154
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
331156
331155
  var require_path_exists = __commonJS({
331157
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
331156
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
331158
331157
  "use strict";
331159
331158
  var u = require_universalify().fromPromise;
331160
331159
  var fs8 = require_fs6();
@@ -331168,22 +331167,27 @@ var require_path_exists = __commonJS({
331168
331167
  }
331169
331168
  });
331170
331169
 
331171
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js
331170
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
331172
331171
  var require_utimes = __commonJS({
331173
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
331172
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
331174
331173
  "use strict";
331175
- var fs8 = require_graceful_fs();
331176
- function utimesMillis(path9, atime, mtime, callback) {
331177
- fs8.open(path9, "r+", (err, fd) => {
331178
- if (err)
331179
- return callback(err);
331180
- fs8.futimes(fd, atime, mtime, (futimesErr) => {
331181
- fs8.close(fd, (closeErr) => {
331182
- if (callback)
331183
- callback(futimesErr || closeErr);
331184
- });
331185
- });
331186
- });
331174
+ var fs8 = require_fs6();
331175
+ var u = require_universalify().fromPromise;
331176
+ async function utimesMillis(path9, atime, mtime) {
331177
+ const fd = await fs8.open(path9, "r+");
331178
+ let closeErr = null;
331179
+ try {
331180
+ await fs8.futimes(fd, atime, mtime);
331181
+ } finally {
331182
+ try {
331183
+ await fs8.close(fd);
331184
+ } catch (e3) {
331185
+ closeErr = e3;
331186
+ }
331187
+ }
331188
+ if (closeErr) {
331189
+ throw closeErr;
331190
+ }
331187
331191
  }
331188
331192
  function utimesMillisSync(path9, atime, mtime) {
331189
331193
  const fd = fs8.openSync(path9, "r+");
@@ -331191,19 +331195,19 @@ var require_utimes = __commonJS({
331191
331195
  return fs8.closeSync(fd);
331192
331196
  }
331193
331197
  module.exports = {
331194
- utimesMillis,
331198
+ utimesMillis: u(utimesMillis),
331195
331199
  utimesMillisSync
331196
331200
  };
331197
331201
  }
331198
331202
  });
331199
331203
 
331200
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js
331204
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
331201
331205
  var require_stat = __commonJS({
331202
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
331206
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
331203
331207
  "use strict";
331204
331208
  var fs8 = require_fs6();
331205
331209
  var path9 = __require("path");
331206
- var util = __require("util");
331210
+ var u = require_universalify().fromPromise;
331207
331211
  function getStats(src, dest, opts) {
331208
331212
  const statFunc = opts.dereference ? (file) => fs8.stat(file, { bigint: true }) : (file) => fs8.lstat(file, { bigint: true });
331209
331213
  return Promise.all([
@@ -331228,32 +331232,28 @@ var require_stat = __commonJS({
331228
331232
  }
331229
331233
  return { srcStat, destStat };
331230
331234
  }
331231
- function checkPaths(src, dest, funcName, opts, cb) {
331232
- util.callbackify(getStats)(src, dest, opts, (err, stats) => {
331233
- if (err)
331234
- return cb(err);
331235
- const { srcStat, destStat } = stats;
331236
- if (destStat) {
331237
- if (areIdentical(srcStat, destStat)) {
331238
- const srcBaseName = path9.basename(src);
331239
- const destBaseName = path9.basename(dest);
331240
- if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
331241
- return cb(null, { srcStat, destStat, isChangingCase: true });
331242
- }
331243
- return cb(new Error("Source and destination must not be the same."));
331244
- }
331245
- if (srcStat.isDirectory() && !destStat.isDirectory()) {
331246
- return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
331247
- }
331248
- if (!srcStat.isDirectory() && destStat.isDirectory()) {
331249
- return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
331235
+ async function checkPaths(src, dest, funcName, opts) {
331236
+ const { srcStat, destStat } = await getStats(src, dest, opts);
331237
+ if (destStat) {
331238
+ if (areIdentical(srcStat, destStat)) {
331239
+ const srcBaseName = path9.basename(src);
331240
+ const destBaseName = path9.basename(dest);
331241
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
331242
+ return { srcStat, destStat, isChangingCase: true };
331250
331243
  }
331244
+ throw new Error("Source and destination must not be the same.");
331245
+ }
331246
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
331247
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
331251
331248
  }
331252
- if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
331253
- return cb(new Error(errMsg(src, dest, funcName)));
331249
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
331250
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
331254
331251
  }
331255
- return cb(null, { srcStat, destStat });
331256
- });
331252
+ }
331253
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
331254
+ throw new Error(errMsg(src, dest, funcName));
331255
+ }
331256
+ return { srcStat, destStat };
331257
331257
  }
331258
331258
  function checkPathsSync(src, dest, funcName, opts) {
331259
331259
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
@@ -331278,22 +331278,23 @@ var require_stat = __commonJS({
331278
331278
  }
331279
331279
  return { srcStat, destStat };
331280
331280
  }
331281
- function checkParentPaths(src, srcStat, dest, funcName, cb) {
331281
+ async function checkParentPaths(src, srcStat, dest, funcName) {
331282
331282
  const srcParent = path9.resolve(path9.dirname(src));
331283
331283
  const destParent = path9.resolve(path9.dirname(dest));
331284
331284
  if (destParent === srcParent || destParent === path9.parse(destParent).root)
331285
- return cb();
331286
- fs8.stat(destParent, { bigint: true }, (err, destStat) => {
331287
- if (err) {
331288
- if (err.code === "ENOENT")
331289
- return cb();
331290
- return cb(err);
331291
- }
331292
- if (areIdentical(srcStat, destStat)) {
331293
- return cb(new Error(errMsg(src, dest, funcName)));
331294
- }
331295
- return checkParentPaths(src, srcStat, destParent, funcName, cb);
331296
- });
331285
+ return;
331286
+ let destStat;
331287
+ try {
331288
+ destStat = await fs8.stat(destParent, { bigint: true });
331289
+ } catch (err) {
331290
+ if (err.code === "ENOENT")
331291
+ return;
331292
+ throw err;
331293
+ }
331294
+ if (areIdentical(srcStat, destStat)) {
331295
+ throw new Error(errMsg(src, dest, funcName));
331296
+ }
331297
+ return checkParentPaths(src, srcStat, destParent, funcName);
331297
331298
  }
331298
331299
  function checkParentPathsSync(src, srcStat, dest, funcName) {
331299
331300
  const srcParent = path9.resolve(path9.dirname(src));
@@ -331319,42 +331320,39 @@ var require_stat = __commonJS({
331319
331320
  function isSrcSubdir(src, dest) {
331320
331321
  const srcArr = path9.resolve(src).split(path9.sep).filter((i) => i);
331321
331322
  const destArr = path9.resolve(dest).split(path9.sep).filter((i) => i);
331322
- return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
331323
+ return srcArr.every((cur, i) => destArr[i] === cur);
331323
331324
  }
331324
331325
  function errMsg(src, dest, funcName) {
331325
331326
  return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
331326
331327
  }
331327
331328
  module.exports = {
331328
- checkPaths,
331329
+ // checkPaths
331330
+ checkPaths: u(checkPaths),
331329
331331
  checkPathsSync,
331330
- checkParentPaths,
331332
+ // checkParent
331333
+ checkParentPaths: u(checkParentPaths),
331331
331334
  checkParentPathsSync,
331335
+ // Misc
331332
331336
  isSrcSubdir,
331333
331337
  areIdentical
331334
331338
  };
331335
331339
  }
331336
331340
  });
331337
331341
 
331338
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js
331342
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
331339
331343
  var require_copy = __commonJS({
331340
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
331344
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
331341
331345
  "use strict";
331342
- var fs8 = require_graceful_fs();
331346
+ var fs8 = require_fs6();
331343
331347
  var path9 = __require("path");
331344
- var mkdirs = require_mkdirs().mkdirs;
331345
- var pathExists = require_path_exists().pathExists;
331346
- var utimesMillis = require_utimes().utimesMillis;
331348
+ var { mkdirs } = require_mkdirs();
331349
+ var { pathExists } = require_path_exists();
331350
+ var { utimesMillis } = require_utimes();
331347
331351
  var stat = require_stat();
331348
- function copy(src, dest, opts, cb) {
331349
- if (typeof opts === "function" && !cb) {
331350
- cb = opts;
331351
- opts = {};
331352
- } else if (typeof opts === "function") {
331352
+ async function copy(src, dest, opts = {}) {
331353
+ if (typeof opts === "function") {
331353
331354
  opts = { filter: opts };
331354
331355
  }
331355
- cb = cb || function() {
331356
- };
331357
- opts = opts || {};
331358
331356
  opts.clobber = "clobber" in opts ? !!opts.clobber : true;
331359
331357
  opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
331360
331358
  if (opts.preserveTimestamps && process.arch === "ia32") {
@@ -331364,212 +331362,119 @@ var require_copy = __commonJS({
331364
331362
  "fs-extra-WARN0001"
331365
331363
  );
331366
331364
  }
331367
- stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
331368
- if (err)
331369
- return cb(err);
331370
- const { srcStat, destStat } = stats;
331371
- stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
331372
- if (err2)
331373
- return cb(err2);
331374
- runFilter(src, dest, opts, (err3, include) => {
331375
- if (err3)
331376
- return cb(err3);
331377
- if (!include)
331378
- return cb();
331379
- checkParentDir(destStat, src, dest, opts, cb);
331380
- });
331381
- });
331382
- });
331383
- }
331384
- function checkParentDir(destStat, src, dest, opts, cb) {
331365
+ const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
331366
+ await stat.checkParentPaths(src, srcStat, dest, "copy");
331367
+ const include = await runFilter(src, dest, opts);
331368
+ if (!include)
331369
+ return;
331385
331370
  const destParent = path9.dirname(dest);
331386
- pathExists(destParent, (err, dirExists) => {
331387
- if (err)
331388
- return cb(err);
331389
- if (dirExists)
331390
- return getStats(destStat, src, dest, opts, cb);
331391
- mkdirs(destParent, (err2) => {
331392
- if (err2)
331393
- return cb(err2);
331394
- return getStats(destStat, src, dest, opts, cb);
331395
- });
331396
- });
331371
+ const dirExists = await pathExists(destParent);
331372
+ if (!dirExists) {
331373
+ await mkdirs(destParent);
331374
+ }
331375
+ await getStatsAndPerformCopy(destStat, src, dest, opts);
331397
331376
  }
331398
- function runFilter(src, dest, opts, cb) {
331377
+ async function runFilter(src, dest, opts) {
331399
331378
  if (!opts.filter)
331400
- return cb(null, true);
331401
- Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
331379
+ return true;
331380
+ return opts.filter(src, dest);
331402
331381
  }
331403
- function getStats(destStat, src, dest, opts, cb) {
331404
- const stat2 = opts.dereference ? fs8.stat : fs8.lstat;
331405
- stat2(src, (err, srcStat) => {
331406
- if (err)
331407
- return cb(err);
331408
- if (srcStat.isDirectory())
331409
- return onDir(srcStat, destStat, src, dest, opts, cb);
331410
- else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
331411
- return onFile(srcStat, destStat, src, dest, opts, cb);
331412
- else if (srcStat.isSymbolicLink())
331413
- return onLink(destStat, src, dest, opts, cb);
331414
- else if (srcStat.isSocket())
331415
- return cb(new Error(`Cannot copy a socket file: ${src}`));
331416
- else if (srcStat.isFIFO())
331417
- return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
331418
- return cb(new Error(`Unknown file: ${src}`));
331419
- });
331382
+ async function getStatsAndPerformCopy(destStat, src, dest, opts) {
331383
+ const statFn = opts.dereference ? fs8.stat : fs8.lstat;
331384
+ const srcStat = await statFn(src);
331385
+ if (srcStat.isDirectory())
331386
+ return onDir(srcStat, destStat, src, dest, opts);
331387
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice())
331388
+ return onFile(srcStat, destStat, src, dest, opts);
331389
+ if (srcStat.isSymbolicLink())
331390
+ return onLink(destStat, src, dest, opts);
331391
+ if (srcStat.isSocket())
331392
+ throw new Error(`Cannot copy a socket file: ${src}`);
331393
+ if (srcStat.isFIFO())
331394
+ throw new Error(`Cannot copy a FIFO pipe: ${src}`);
331395
+ throw new Error(`Unknown file: ${src}`);
331420
331396
  }
331421
- function onFile(srcStat, destStat, src, dest, opts, cb) {
331397
+ async function onFile(srcStat, destStat, src, dest, opts) {
331422
331398
  if (!destStat)
331423
- return copyFile(srcStat, src, dest, opts, cb);
331424
- return mayCopyFile(srcStat, src, dest, opts, cb);
331425
- }
331426
- function mayCopyFile(srcStat, src, dest, opts, cb) {
331399
+ return copyFile(srcStat, src, dest, opts);
331427
331400
  if (opts.overwrite) {
331428
- fs8.unlink(dest, (err) => {
331429
- if (err)
331430
- return cb(err);
331431
- return copyFile(srcStat, src, dest, opts, cb);
331432
- });
331433
- } else if (opts.errorOnExist) {
331434
- return cb(new Error(`'${dest}' already exists`));
331435
- } else
331436
- return cb();
331437
- }
331438
- function copyFile(srcStat, src, dest, opts, cb) {
331439
- fs8.copyFile(src, dest, (err) => {
331440
- if (err)
331441
- return cb(err);
331442
- if (opts.preserveTimestamps)
331443
- return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
331444
- return setDestMode(dest, srcStat.mode, cb);
331445
- });
331401
+ await fs8.unlink(dest);
331402
+ return copyFile(srcStat, src, dest, opts);
331403
+ }
331404
+ if (opts.errorOnExist) {
331405
+ throw new Error(`'${dest}' already exists`);
331406
+ }
331446
331407
  }
331447
- function handleTimestampsAndMode(srcMode, src, dest, cb) {
331448
- if (fileIsNotWritable(srcMode)) {
331449
- return makeFileWritable(dest, srcMode, (err) => {
331450
- if (err)
331451
- return cb(err);
331452
- return setDestTimestampsAndMode(srcMode, src, dest, cb);
331453
- });
331408
+ async function copyFile(srcStat, src, dest, opts) {
331409
+ await fs8.copyFile(src, dest);
331410
+ if (opts.preserveTimestamps) {
331411
+ if (fileIsNotWritable(srcStat.mode)) {
331412
+ await makeFileWritable(dest, srcStat.mode);
331413
+ }
331414
+ const updatedSrcStat = await fs8.stat(src);
331415
+ await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
331454
331416
  }
331455
- return setDestTimestampsAndMode(srcMode, src, dest, cb);
331417
+ return fs8.chmod(dest, srcStat.mode);
331456
331418
  }
331457
331419
  function fileIsNotWritable(srcMode) {
331458
331420
  return (srcMode & 128) === 0;
331459
331421
  }
331460
- function makeFileWritable(dest, srcMode, cb) {
331461
- return setDestMode(dest, srcMode | 128, cb);
331462
- }
331463
- function setDestTimestampsAndMode(srcMode, src, dest, cb) {
331464
- setDestTimestamps(src, dest, (err) => {
331465
- if (err)
331466
- return cb(err);
331467
- return setDestMode(dest, srcMode, cb);
331468
- });
331469
- }
331470
- function setDestMode(dest, srcMode, cb) {
331471
- return fs8.chmod(dest, srcMode, cb);
331472
- }
331473
- function setDestTimestamps(src, dest, cb) {
331474
- fs8.stat(src, (err, updatedSrcStat) => {
331475
- if (err)
331476
- return cb(err);
331477
- return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
331478
- });
331479
- }
331480
- function onDir(srcStat, destStat, src, dest, opts, cb) {
331481
- if (!destStat)
331482
- return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
331483
- return copyDir(src, dest, opts, cb);
331484
- }
331485
- function mkDirAndCopy(srcMode, src, dest, opts, cb) {
331486
- fs8.mkdir(dest, (err) => {
331487
- if (err)
331488
- return cb(err);
331489
- copyDir(src, dest, opts, (err2) => {
331490
- if (err2)
331491
- return cb(err2);
331492
- return setDestMode(dest, srcMode, cb);
331493
- });
331494
- });
331495
- }
331496
- function copyDir(src, dest, opts, cb) {
331497
- fs8.readdir(src, (err, items) => {
331498
- if (err)
331499
- return cb(err);
331500
- return copyDirItems(items, src, dest, opts, cb);
331501
- });
331502
- }
331503
- function copyDirItems(items, src, dest, opts, cb) {
331504
- const item = items.pop();
331505
- if (!item)
331506
- return cb();
331507
- return copyDirItem(items, item, src, dest, opts, cb);
331422
+ function makeFileWritable(dest, srcMode) {
331423
+ return fs8.chmod(dest, srcMode | 128);
331508
331424
  }
331509
- function copyDirItem(items, item, src, dest, opts, cb) {
331510
- const srcItem = path9.join(src, item);
331511
- const destItem = path9.join(dest, item);
331512
- runFilter(srcItem, destItem, opts, (err, include) => {
331513
- if (err)
331514
- return cb(err);
331425
+ async function onDir(srcStat, destStat, src, dest, opts) {
331426
+ if (!destStat) {
331427
+ await fs8.mkdir(dest);
331428
+ }
331429
+ const items = await fs8.readdir(src);
331430
+ await Promise.all(items.map(async (item) => {
331431
+ const srcItem = path9.join(src, item);
331432
+ const destItem = path9.join(dest, item);
331433
+ const include = await runFilter(srcItem, destItem, opts);
331515
331434
  if (!include)
331516
- return copyDirItems(items, src, dest, opts, cb);
331517
- stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
331518
- if (err2)
331519
- return cb(err2);
331520
- const { destStat } = stats;
331521
- getStats(destStat, srcItem, destItem, opts, (err3) => {
331522
- if (err3)
331523
- return cb(err3);
331524
- return copyDirItems(items, src, dest, opts, cb);
331525
- });
331526
- });
331527
- });
331528
- }
331529
- function onLink(destStat, src, dest, opts, cb) {
331530
- fs8.readlink(src, (err, resolvedSrc) => {
331531
- if (err)
331532
- return cb(err);
331533
- if (opts.dereference) {
331534
- resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
331535
- }
331536
- if (!destStat) {
331537
- return fs8.symlink(resolvedSrc, dest, cb);
331538
- } else {
331539
- fs8.readlink(dest, (err2, resolvedDest) => {
331540
- if (err2) {
331541
- if (err2.code === "EINVAL" || err2.code === "UNKNOWN")
331542
- return fs8.symlink(resolvedSrc, dest, cb);
331543
- return cb(err2);
331544
- }
331545
- if (opts.dereference) {
331546
- resolvedDest = path9.resolve(process.cwd(), resolvedDest);
331547
- }
331548
- if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
331549
- return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
331550
- }
331551
- if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
331552
- return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
331553
- }
331554
- return copyLink(resolvedSrc, dest, cb);
331555
- });
331556
- }
331557
- });
331435
+ return;
331436
+ const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
331437
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
331438
+ }));
331439
+ if (!destStat) {
331440
+ await fs8.chmod(dest, srcStat.mode);
331441
+ }
331558
331442
  }
331559
- function copyLink(resolvedSrc, dest, cb) {
331560
- fs8.unlink(dest, (err) => {
331561
- if (err)
331562
- return cb(err);
331563
- return fs8.symlink(resolvedSrc, dest, cb);
331564
- });
331443
+ async function onLink(destStat, src, dest, opts) {
331444
+ let resolvedSrc = await fs8.readlink(src);
331445
+ if (opts.dereference) {
331446
+ resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
331447
+ }
331448
+ if (!destStat) {
331449
+ return fs8.symlink(resolvedSrc, dest);
331450
+ }
331451
+ let resolvedDest = null;
331452
+ try {
331453
+ resolvedDest = await fs8.readlink(dest);
331454
+ } catch (e3) {
331455
+ if (e3.code === "EINVAL" || e3.code === "UNKNOWN")
331456
+ return fs8.symlink(resolvedSrc, dest);
331457
+ throw e3;
331458
+ }
331459
+ if (opts.dereference) {
331460
+ resolvedDest = path9.resolve(process.cwd(), resolvedDest);
331461
+ }
331462
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
331463
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
331464
+ }
331465
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
331466
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
331467
+ }
331468
+ await fs8.unlink(dest);
331469
+ return fs8.symlink(resolvedSrc, dest);
331565
331470
  }
331566
331471
  module.exports = copy;
331567
331472
  }
331568
331473
  });
331569
331474
 
331570
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js
331475
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
331571
331476
  var require_copy_sync = __commonJS({
331572
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
331477
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
331573
331478
  "use strict";
331574
331479
  var fs8 = require_graceful_fs();
331575
331480
  var path9 = __require("path");
@@ -331708,11 +331613,11 @@ var require_copy_sync = __commonJS({
331708
331613
  }
331709
331614
  });
331710
331615
 
331711
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js
331616
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
331712
331617
  var require_copy2 = __commonJS({
331713
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports, module) {
331618
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module) {
331714
331619
  "use strict";
331715
- var u = require_universalify().fromCallback;
331620
+ var u = require_universalify().fromPromise;
331716
331621
  module.exports = {
331717
331622
  copy: u(require_copy()),
331718
331623
  copySync: require_copy_sync()
@@ -331720,9 +331625,9 @@ var require_copy2 = __commonJS({
331720
331625
  }
331721
331626
  });
331722
331627
 
331723
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js
331628
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
331724
331629
  var require_remove = __commonJS({
331725
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
331630
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
331726
331631
  "use strict";
331727
331632
  var fs8 = require_graceful_fs();
331728
331633
  var u = require_universalify().fromCallback;
@@ -331739,9 +331644,9 @@ var require_remove = __commonJS({
331739
331644
  }
331740
331645
  });
331741
331646
 
331742
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js
331647
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
331743
331648
  var require_empty2 = __commonJS({
331744
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
331649
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
331745
331650
  "use strict";
331746
331651
  var u = require_universalify().fromPromise;
331747
331652
  var fs8 = require_fs6();
@@ -331778,47 +331683,40 @@ var require_empty2 = __commonJS({
331778
331683
  }
331779
331684
  });
331780
331685
 
331781
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js
331686
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
331782
331687
  var require_file = __commonJS({
331783
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
331688
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
331784
331689
  "use strict";
331785
- var u = require_universalify().fromCallback;
331690
+ var u = require_universalify().fromPromise;
331786
331691
  var path9 = __require("path");
331787
- var fs8 = require_graceful_fs();
331692
+ var fs8 = require_fs6();
331788
331693
  var mkdir = require_mkdirs();
331789
- function createFile(file, callback) {
331790
- function makeFile() {
331791
- fs8.writeFile(file, "", (err) => {
331792
- if (err)
331793
- return callback(err);
331794
- callback();
331795
- });
331694
+ async function createFile(file) {
331695
+ let stats;
331696
+ try {
331697
+ stats = await fs8.stat(file);
331698
+ } catch {
331699
+ }
331700
+ if (stats && stats.isFile())
331701
+ return;
331702
+ const dir = path9.dirname(file);
331703
+ let dirStats = null;
331704
+ try {
331705
+ dirStats = await fs8.stat(dir);
331706
+ } catch (err) {
331707
+ if (err.code === "ENOENT") {
331708
+ await mkdir.mkdirs(dir);
331709
+ await fs8.writeFile(file, "");
331710
+ return;
331711
+ } else {
331712
+ throw err;
331713
+ }
331714
+ }
331715
+ if (dirStats.isDirectory()) {
331716
+ await fs8.writeFile(file, "");
331717
+ } else {
331718
+ await fs8.readdir(dir);
331796
331719
  }
331797
- fs8.stat(file, (err, stats) => {
331798
- if (!err && stats.isFile())
331799
- return callback();
331800
- const dir = path9.dirname(file);
331801
- fs8.stat(dir, (err2, stats2) => {
331802
- if (err2) {
331803
- if (err2.code === "ENOENT") {
331804
- return mkdir.mkdirs(dir, (err3) => {
331805
- if (err3)
331806
- return callback(err3);
331807
- makeFile();
331808
- });
331809
- }
331810
- return callback(err2);
331811
- }
331812
- if (stats2.isDirectory())
331813
- makeFile();
331814
- else {
331815
- fs8.readdir(dir, (err3) => {
331816
- if (err3)
331817
- return callback(err3);
331818
- });
331819
- }
331820
- });
331821
- });
331822
331720
  }
331823
331721
  function createFileSync(file) {
331824
331722
  let stats;
@@ -331848,46 +331746,37 @@ var require_file = __commonJS({
331848
331746
  }
331849
331747
  });
331850
331748
 
331851
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js
331749
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
331852
331750
  var require_link = __commonJS({
331853
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
331751
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
331854
331752
  "use strict";
331855
- var u = require_universalify().fromCallback;
331753
+ var u = require_universalify().fromPromise;
331856
331754
  var path9 = __require("path");
331857
- var fs8 = require_graceful_fs();
331755
+ var fs8 = require_fs6();
331858
331756
  var mkdir = require_mkdirs();
331859
- var pathExists = require_path_exists().pathExists;
331757
+ var { pathExists } = require_path_exists();
331860
331758
  var { areIdentical } = require_stat();
331861
- function createLink(srcpath, dstpath, callback) {
331862
- function makeLink(srcpath2, dstpath2) {
331863
- fs8.link(srcpath2, dstpath2, (err) => {
331864
- if (err)
331865
- return callback(err);
331866
- callback(null);
331867
- });
331759
+ async function createLink(srcpath, dstpath) {
331760
+ let dstStat;
331761
+ try {
331762
+ dstStat = await fs8.lstat(dstpath);
331763
+ } catch {
331868
331764
  }
331869
- fs8.lstat(dstpath, (_6, dstStat) => {
331870
- fs8.lstat(srcpath, (err, srcStat) => {
331871
- if (err) {
331872
- err.message = err.message.replace("lstat", "ensureLink");
331873
- return callback(err);
331874
- }
331875
- if (dstStat && areIdentical(srcStat, dstStat))
331876
- return callback(null);
331877
- const dir = path9.dirname(dstpath);
331878
- pathExists(dir, (err2, dirExists) => {
331879
- if (err2)
331880
- return callback(err2);
331881
- if (dirExists)
331882
- return makeLink(srcpath, dstpath);
331883
- mkdir.mkdirs(dir, (err3) => {
331884
- if (err3)
331885
- return callback(err3);
331886
- makeLink(srcpath, dstpath);
331887
- });
331888
- });
331889
- });
331890
- });
331765
+ let srcStat;
331766
+ try {
331767
+ srcStat = await fs8.lstat(srcpath);
331768
+ } catch (err) {
331769
+ err.message = err.message.replace("lstat", "ensureLink");
331770
+ throw err;
331771
+ }
331772
+ if (dstStat && areIdentical(srcStat, dstStat))
331773
+ return;
331774
+ const dir = path9.dirname(dstpath);
331775
+ const dirExists = await pathExists(dir);
331776
+ if (!dirExists) {
331777
+ await mkdir.mkdirs(dir);
331778
+ }
331779
+ await fs8.link(srcpath, dstpath);
331891
331780
  }
331892
331781
  function createLinkSync(srcpath, dstpath) {
331893
331782
  let dstStat;
@@ -331917,109 +331806,102 @@ var require_link = __commonJS({
331917
331806
  }
331918
331807
  });
331919
331808
 
331920
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js
331809
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
331921
331810
  var require_symlink_paths = __commonJS({
331922
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
331811
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
331923
331812
  "use strict";
331924
331813
  var path9 = __require("path");
331925
- var fs8 = require_graceful_fs();
331926
- var pathExists = require_path_exists().pathExists;
331927
- function symlinkPaths(srcpath, dstpath, callback) {
331814
+ var fs8 = require_fs6();
331815
+ var { pathExists } = require_path_exists();
331816
+ var u = require_universalify().fromPromise;
331817
+ async function symlinkPaths(srcpath, dstpath) {
331928
331818
  if (path9.isAbsolute(srcpath)) {
331929
- return fs8.lstat(srcpath, (err) => {
331930
- if (err) {
331931
- err.message = err.message.replace("lstat", "ensureSymlink");
331932
- return callback(err);
331933
- }
331934
- return callback(null, {
331935
- toCwd: srcpath,
331936
- toDst: srcpath
331937
- });
331938
- });
331939
- } else {
331940
- const dstdir = path9.dirname(dstpath);
331941
- const relativeToDst = path9.join(dstdir, srcpath);
331942
- return pathExists(relativeToDst, (err, exists) => {
331943
- if (err)
331944
- return callback(err);
331945
- if (exists) {
331946
- return callback(null, {
331947
- toCwd: relativeToDst,
331948
- toDst: srcpath
331949
- });
331950
- } else {
331951
- return fs8.lstat(srcpath, (err2) => {
331952
- if (err2) {
331953
- err2.message = err2.message.replace("lstat", "ensureSymlink");
331954
- return callback(err2);
331955
- }
331956
- return callback(null, {
331957
- toCwd: srcpath,
331958
- toDst: path9.relative(dstdir, srcpath)
331959
- });
331960
- });
331961
- }
331962
- });
331819
+ try {
331820
+ await fs8.lstat(srcpath);
331821
+ } catch (err) {
331822
+ err.message = err.message.replace("lstat", "ensureSymlink");
331823
+ throw err;
331824
+ }
331825
+ return {
331826
+ toCwd: srcpath,
331827
+ toDst: srcpath
331828
+ };
331829
+ }
331830
+ const dstdir = path9.dirname(dstpath);
331831
+ const relativeToDst = path9.join(dstdir, srcpath);
331832
+ const exists = await pathExists(relativeToDst);
331833
+ if (exists) {
331834
+ return {
331835
+ toCwd: relativeToDst,
331836
+ toDst: srcpath
331837
+ };
331838
+ }
331839
+ try {
331840
+ await fs8.lstat(srcpath);
331841
+ } catch (err) {
331842
+ err.message = err.message.replace("lstat", "ensureSymlink");
331843
+ throw err;
331963
331844
  }
331845
+ return {
331846
+ toCwd: srcpath,
331847
+ toDst: path9.relative(dstdir, srcpath)
331848
+ };
331964
331849
  }
331965
331850
  function symlinkPathsSync(srcpath, dstpath) {
331966
- let exists;
331967
331851
  if (path9.isAbsolute(srcpath)) {
331968
- exists = fs8.existsSync(srcpath);
331969
- if (!exists)
331852
+ const exists2 = fs8.existsSync(srcpath);
331853
+ if (!exists2)
331970
331854
  throw new Error("absolute srcpath does not exist");
331971
331855
  return {
331972
331856
  toCwd: srcpath,
331973
331857
  toDst: srcpath
331974
331858
  };
331975
- } else {
331976
- const dstdir = path9.dirname(dstpath);
331977
- const relativeToDst = path9.join(dstdir, srcpath);
331978
- exists = fs8.existsSync(relativeToDst);
331979
- if (exists) {
331980
- return {
331981
- toCwd: relativeToDst,
331982
- toDst: srcpath
331983
- };
331984
- } else {
331985
- exists = fs8.existsSync(srcpath);
331986
- if (!exists)
331987
- throw new Error("relative srcpath does not exist");
331988
- return {
331989
- toCwd: srcpath,
331990
- toDst: path9.relative(dstdir, srcpath)
331991
- };
331992
- }
331993
331859
  }
331860
+ const dstdir = path9.dirname(dstpath);
331861
+ const relativeToDst = path9.join(dstdir, srcpath);
331862
+ const exists = fs8.existsSync(relativeToDst);
331863
+ if (exists) {
331864
+ return {
331865
+ toCwd: relativeToDst,
331866
+ toDst: srcpath
331867
+ };
331868
+ }
331869
+ const srcExists = fs8.existsSync(srcpath);
331870
+ if (!srcExists)
331871
+ throw new Error("relative srcpath does not exist");
331872
+ return {
331873
+ toCwd: srcpath,
331874
+ toDst: path9.relative(dstdir, srcpath)
331875
+ };
331994
331876
  }
331995
331877
  module.exports = {
331996
- symlinkPaths,
331878
+ symlinkPaths: u(symlinkPaths),
331997
331879
  symlinkPathsSync
331998
331880
  };
331999
331881
  }
332000
331882
  });
332001
331883
 
332002
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js
331884
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
332003
331885
  var require_symlink_type = __commonJS({
332004
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
331886
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
332005
331887
  "use strict";
332006
- var fs8 = require_graceful_fs();
332007
- function symlinkType(srcpath, type, callback) {
332008
- callback = typeof type === "function" ? type : callback;
332009
- type = typeof type === "function" ? false : type;
331888
+ var fs8 = require_fs6();
331889
+ var u = require_universalify().fromPromise;
331890
+ async function symlinkType(srcpath, type) {
332010
331891
  if (type)
332011
- return callback(null, type);
332012
- fs8.lstat(srcpath, (err, stats) => {
332013
- if (err)
332014
- return callback(null, "file");
332015
- type = stats && stats.isDirectory() ? "dir" : "file";
332016
- callback(null, type);
332017
- });
331892
+ return type;
331893
+ let stats;
331894
+ try {
331895
+ stats = await fs8.lstat(srcpath);
331896
+ } catch {
331897
+ return "file";
331898
+ }
331899
+ return stats && stats.isDirectory() ? "dir" : "file";
332018
331900
  }
332019
331901
  function symlinkTypeSync(srcpath, type) {
332020
- let stats;
332021
331902
  if (type)
332022
331903
  return type;
331904
+ let stats;
332023
331905
  try {
332024
331906
  stats = fs8.lstatSync(srcpath);
332025
331907
  } catch {
@@ -332028,69 +331910,46 @@ var require_symlink_type = __commonJS({
332028
331910
  return stats && stats.isDirectory() ? "dir" : "file";
332029
331911
  }
332030
331912
  module.exports = {
332031
- symlinkType,
331913
+ symlinkType: u(symlinkType),
332032
331914
  symlinkTypeSync
332033
331915
  };
332034
331916
  }
332035
331917
  });
332036
331918
 
332037
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js
331919
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
332038
331920
  var require_symlink = __commonJS({
332039
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
331921
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
332040
331922
  "use strict";
332041
- var u = require_universalify().fromCallback;
331923
+ var u = require_universalify().fromPromise;
332042
331924
  var path9 = __require("path");
332043
331925
  var fs8 = require_fs6();
332044
- var _mkdirs = require_mkdirs();
332045
- var mkdirs = _mkdirs.mkdirs;
332046
- var mkdirsSync = _mkdirs.mkdirsSync;
332047
- var _symlinkPaths = require_symlink_paths();
332048
- var symlinkPaths = _symlinkPaths.symlinkPaths;
332049
- var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
332050
- var _symlinkType = require_symlink_type();
332051
- var symlinkType = _symlinkType.symlinkType;
332052
- var symlinkTypeSync = _symlinkType.symlinkTypeSync;
332053
- var pathExists = require_path_exists().pathExists;
331926
+ var { mkdirs, mkdirsSync } = require_mkdirs();
331927
+ var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
331928
+ var { symlinkType, symlinkTypeSync } = require_symlink_type();
331929
+ var { pathExists } = require_path_exists();
332054
331930
  var { areIdentical } = require_stat();
332055
- function createSymlink(srcpath, dstpath, type, callback) {
332056
- callback = typeof type === "function" ? type : callback;
332057
- type = typeof type === "function" ? false : type;
332058
- fs8.lstat(dstpath, (err, stats) => {
332059
- if (!err && stats.isSymbolicLink()) {
332060
- Promise.all([
332061
- fs8.stat(srcpath),
332062
- fs8.stat(dstpath)
332063
- ]).then(([srcStat, dstStat]) => {
332064
- if (areIdentical(srcStat, dstStat))
332065
- return callback(null);
332066
- _createSymlink(srcpath, dstpath, type, callback);
332067
- });
332068
- } else
332069
- _createSymlink(srcpath, dstpath, type, callback);
332070
- });
332071
- }
332072
- function _createSymlink(srcpath, dstpath, type, callback) {
332073
- symlinkPaths(srcpath, dstpath, (err, relative) => {
332074
- if (err)
332075
- return callback(err);
332076
- srcpath = relative.toDst;
332077
- symlinkType(relative.toCwd, type, (err2, type2) => {
332078
- if (err2)
332079
- return callback(err2);
332080
- const dir = path9.dirname(dstpath);
332081
- pathExists(dir, (err3, dirExists) => {
332082
- if (err3)
332083
- return callback(err3);
332084
- if (dirExists)
332085
- return fs8.symlink(srcpath, dstpath, type2, callback);
332086
- mkdirs(dir, (err4) => {
332087
- if (err4)
332088
- return callback(err4);
332089
- fs8.symlink(srcpath, dstpath, type2, callback);
332090
- });
332091
- });
332092
- });
332093
- });
331931
+ async function createSymlink(srcpath, dstpath, type) {
331932
+ let stats;
331933
+ try {
331934
+ stats = await fs8.lstat(dstpath);
331935
+ } catch {
331936
+ }
331937
+ if (stats && stats.isSymbolicLink()) {
331938
+ const [srcStat, dstStat] = await Promise.all([
331939
+ fs8.stat(srcpath),
331940
+ fs8.stat(dstpath)
331941
+ ]);
331942
+ if (areIdentical(srcStat, dstStat))
331943
+ return;
331944
+ }
331945
+ const relative = await symlinkPaths(srcpath, dstpath);
331946
+ srcpath = relative.toDst;
331947
+ const toType = await symlinkType(relative.toCwd, type);
331948
+ const dir = path9.dirname(dstpath);
331949
+ if (!await pathExists(dir)) {
331950
+ await mkdirs(dir);
331951
+ }
331952
+ return fs8.symlink(srcpath, dstpath, toType);
332094
331953
  }
332095
331954
  function createSymlinkSync(srcpath, dstpath, type) {
332096
331955
  let stats;
@@ -332121,9 +331980,9 @@ var require_symlink = __commonJS({
332121
331980
  }
332122
331981
  });
332123
331982
 
332124
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js
331983
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
332125
331984
  var require_ensure = __commonJS({
332126
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
331985
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
332127
331986
  "use strict";
332128
331987
  var { createFile, createFileSync } = require_file();
332129
331988
  var { createLink, createLinkSync } = require_link();
@@ -332148,6 +332007,37 @@ var require_ensure = __commonJS({
332148
332007
  }
332149
332008
  });
332150
332009
 
332010
+ // node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
332011
+ var require_universalify2 = __commonJS({
332012
+ "node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports) {
332013
+ "use strict";
332014
+ exports.fromCallback = function(fn6) {
332015
+ return Object.defineProperty(function(...args) {
332016
+ if (typeof args[args.length - 1] === "function")
332017
+ fn6.apply(this, args);
332018
+ else {
332019
+ return new Promise((resolve2, reject) => {
332020
+ fn6.call(
332021
+ this,
332022
+ ...args,
332023
+ (err, res) => err != null ? reject(err) : resolve2(res)
332024
+ );
332025
+ });
332026
+ }
332027
+ }, "name", { value: fn6.name });
332028
+ };
332029
+ exports.fromPromise = function(fn6) {
332030
+ return Object.defineProperty(function(...args) {
332031
+ const cb = args[args.length - 1];
332032
+ if (typeof cb !== "function")
332033
+ return fn6.apply(this, args);
332034
+ else
332035
+ fn6.apply(this, args.slice(0, -1)).then((r3) => cb(null, r3), cb);
332036
+ }, "name", { value: fn6.name });
332037
+ };
332038
+ }
332039
+ });
332040
+
332151
332041
  // node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
332152
332042
  var require_utils7 = __commonJS({
332153
332043
  "node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module) {
@@ -332176,7 +332066,7 @@ var require_jsonfile = __commonJS({
332176
332066
  } catch (_6) {
332177
332067
  _fs = __require("fs");
332178
332068
  }
332179
- var universalify = require_universalify();
332069
+ var universalify = require_universalify2();
332180
332070
  var { stringify, stripBom } = require_utils7();
332181
332071
  async function _readFile(file, options8 = {}) {
332182
332072
  if (typeof options8 === "string") {
@@ -332240,9 +332130,9 @@ var require_jsonfile = __commonJS({
332240
332130
  }
332241
332131
  });
332242
332132
 
332243
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js
332133
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
332244
332134
  var require_jsonfile2 = __commonJS({
332245
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
332135
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
332246
332136
  "use strict";
332247
332137
  var jsonFile = require_jsonfile();
332248
332138
  module.exports = {
@@ -332255,39 +332145,27 @@ var require_jsonfile2 = __commonJS({
332255
332145
  }
332256
332146
  });
332257
332147
 
332258
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js
332148
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
332259
332149
  var require_output_file = __commonJS({
332260
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
332150
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
332261
332151
  "use strict";
332262
- var u = require_universalify().fromCallback;
332263
- var fs8 = require_graceful_fs();
332152
+ var u = require_universalify().fromPromise;
332153
+ var fs8 = require_fs6();
332264
332154
  var path9 = __require("path");
332265
332155
  var mkdir = require_mkdirs();
332266
332156
  var pathExists = require_path_exists().pathExists;
332267
- function outputFile(file, data, encoding, callback) {
332268
- if (typeof encoding === "function") {
332269
- callback = encoding;
332270
- encoding = "utf8";
332271
- }
332157
+ async function outputFile(file, data, encoding = "utf-8") {
332272
332158
  const dir = path9.dirname(file);
332273
- pathExists(dir, (err, itDoes) => {
332274
- if (err)
332275
- return callback(err);
332276
- if (itDoes)
332277
- return fs8.writeFile(file, data, encoding, callback);
332278
- mkdir.mkdirs(dir, (err2) => {
332279
- if (err2)
332280
- return callback(err2);
332281
- fs8.writeFile(file, data, encoding, callback);
332282
- });
332283
- });
332159
+ if (!await pathExists(dir)) {
332160
+ await mkdir.mkdirs(dir);
332161
+ }
332162
+ return fs8.writeFile(file, data, encoding);
332284
332163
  }
332285
332164
  function outputFileSync(file, ...args) {
332286
332165
  const dir = path9.dirname(file);
332287
- if (fs8.existsSync(dir)) {
332288
- return fs8.writeFileSync(file, ...args);
332166
+ if (!fs8.existsSync(dir)) {
332167
+ mkdir.mkdirsSync(dir);
332289
332168
  }
332290
- mkdir.mkdirsSync(dir);
332291
332169
  fs8.writeFileSync(file, ...args);
332292
332170
  }
332293
332171
  module.exports = {
@@ -332297,9 +332175,9 @@ var require_output_file = __commonJS({
332297
332175
  }
332298
332176
  });
332299
332177
 
332300
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js
332178
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
332301
332179
  var require_output_json = __commonJS({
332302
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
332180
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
332303
332181
  "use strict";
332304
332182
  var { stringify } = require_utils7();
332305
332183
  var { outputFile } = require_output_file();
@@ -332311,9 +332189,9 @@ var require_output_json = __commonJS({
332311
332189
  }
332312
332190
  });
332313
332191
 
332314
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js
332192
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
332315
332193
  var require_output_json_sync = __commonJS({
332316
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
332194
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
332317
332195
  "use strict";
332318
332196
  var { stringify } = require_utils7();
332319
332197
  var { outputFileSync } = require_output_file();
@@ -332325,9 +332203,9 @@ var require_output_json_sync = __commonJS({
332325
332203
  }
332326
332204
  });
332327
332205
 
332328
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js
332206
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
332329
332207
  var require_json2 = __commonJS({
332330
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports, module) {
332208
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module) {
332331
332209
  "use strict";
332332
332210
  var u = require_universalify().fromPromise;
332333
332211
  var jsonFile = require_jsonfile2();
@@ -332343,92 +332221,61 @@ var require_json2 = __commonJS({
332343
332221
  }
332344
332222
  });
332345
332223
 
332346
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js
332224
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
332347
332225
  var require_move = __commonJS({
332348
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports, module) {
332226
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
332349
332227
  "use strict";
332350
- var fs8 = require_graceful_fs();
332228
+ var fs8 = require_fs6();
332351
332229
  var path9 = __require("path");
332352
- var copy = require_copy2().copy;
332353
- var remove = require_remove().remove;
332354
- var mkdirp = require_mkdirs().mkdirp;
332355
- var pathExists = require_path_exists().pathExists;
332230
+ var { copy } = require_copy2();
332231
+ var { remove } = require_remove();
332232
+ var { mkdirp } = require_mkdirs();
332233
+ var { pathExists } = require_path_exists();
332356
332234
  var stat = require_stat();
332357
- function move(src, dest, opts, cb) {
332358
- if (typeof opts === "function") {
332359
- cb = opts;
332360
- opts = {};
332361
- }
332362
- opts = opts || {};
332235
+ async function move(src, dest, opts = {}) {
332363
332236
  const overwrite = opts.overwrite || opts.clobber || false;
332364
- stat.checkPaths(src, dest, "move", opts, (err, stats) => {
332365
- if (err)
332366
- return cb(err);
332367
- const { srcStat, isChangingCase = false } = stats;
332368
- stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
332369
- if (err2)
332370
- return cb(err2);
332371
- if (isParentRoot(dest))
332372
- return doRename(src, dest, overwrite, isChangingCase, cb);
332373
- mkdirp(path9.dirname(dest), (err3) => {
332374
- if (err3)
332375
- return cb(err3);
332376
- return doRename(src, dest, overwrite, isChangingCase, cb);
332377
- });
332378
- });
332379
- });
332380
- }
332381
- function isParentRoot(dest) {
332382
- const parent = path9.dirname(dest);
332383
- const parsedPath = path9.parse(parent);
332384
- return parsedPath.root === parent;
332385
- }
332386
- function doRename(src, dest, overwrite, isChangingCase, cb) {
332387
- if (isChangingCase)
332388
- return rename(src, dest, overwrite, cb);
332389
- if (overwrite) {
332390
- return remove(dest, (err) => {
332391
- if (err)
332392
- return cb(err);
332393
- return rename(src, dest, overwrite, cb);
332394
- });
332237
+ const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
332238
+ await stat.checkParentPaths(src, srcStat, dest, "move");
332239
+ const destParent = path9.dirname(dest);
332240
+ const parsedParentPath = path9.parse(destParent);
332241
+ if (parsedParentPath.root !== destParent) {
332242
+ await mkdirp(destParent);
332395
332243
  }
332396
- pathExists(dest, (err, destExists) => {
332397
- if (err)
332398
- return cb(err);
332399
- if (destExists)
332400
- return cb(new Error("dest already exists."));
332401
- return rename(src, dest, overwrite, cb);
332402
- });
332244
+ return doRename(src, dest, overwrite, isChangingCase);
332403
332245
  }
332404
- function rename(src, dest, overwrite, cb) {
332405
- fs8.rename(src, dest, (err) => {
332406
- if (!err)
332407
- return cb();
332408
- if (err.code !== "EXDEV")
332409
- return cb(err);
332410
- return moveAcrossDevice(src, dest, overwrite, cb);
332411
- });
332246
+ async function doRename(src, dest, overwrite, isChangingCase) {
332247
+ if (!isChangingCase) {
332248
+ if (overwrite) {
332249
+ await remove(dest);
332250
+ } else if (await pathExists(dest)) {
332251
+ throw new Error("dest already exists.");
332252
+ }
332253
+ }
332254
+ try {
332255
+ await fs8.rename(src, dest);
332256
+ } catch (err) {
332257
+ if (err.code !== "EXDEV") {
332258
+ throw err;
332259
+ }
332260
+ await moveAcrossDevice(src, dest, overwrite);
332261
+ }
332412
332262
  }
332413
- function moveAcrossDevice(src, dest, overwrite, cb) {
332263
+ async function moveAcrossDevice(src, dest, overwrite) {
332414
332264
  const opts = {
332415
332265
  overwrite,
332416
332266
  errorOnExist: true,
332417
332267
  preserveTimestamps: true
332418
332268
  };
332419
- copy(src, dest, opts, (err) => {
332420
- if (err)
332421
- return cb(err);
332422
- return remove(src, cb);
332423
- });
332269
+ await copy(src, dest, opts);
332270
+ return remove(src);
332424
332271
  }
332425
332272
  module.exports = move;
332426
332273
  }
332427
332274
  });
332428
332275
 
332429
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js
332276
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
332430
332277
  var require_move_sync = __commonJS({
332431
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
332278
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
332432
332279
  "use strict";
332433
332280
  var fs8 = require_graceful_fs();
332434
332281
  var path9 = __require("path");
@@ -332483,11 +332330,11 @@ var require_move_sync = __commonJS({
332483
332330
  }
332484
332331
  });
332485
332332
 
332486
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js
332333
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
332487
332334
  var require_move2 = __commonJS({
332488
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports, module) {
332335
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module) {
332489
332336
  "use strict";
332490
- var u = require_universalify().fromCallback;
332337
+ var u = require_universalify().fromPromise;
332491
332338
  module.exports = {
332492
332339
  move: u(require_move()),
332493
332340
  moveSync: require_move_sync()
@@ -332495,9 +332342,9 @@ var require_move2 = __commonJS({
332495
332342
  }
332496
332343
  });
332497
332344
 
332498
- // node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js
332345
+ // node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
332499
332346
  var require_lib5 = __commonJS({
332500
- "node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports, module) {
332347
+ "node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module) {
332501
332348
  "use strict";
332502
332349
  module.exports = {
332503
332350
  // Export promiseified graceful-fs: