@qawolf/cli 1.7.4 → 1.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +661 -583
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -3285,7 +3285,7 @@ var require_atomic_sleep = __commonJS((exports, module) => {
3285
3285
 
3286
3286
  // node_modules/sonic-boom/index.js
3287
3287
  var require_sonic_boom = __commonJS((exports, module) => {
3288
- var fs2 = __require("fs");
3288
+ var fs3 = __require("fs");
3289
3289
  var EventEmitter = __require("events");
3290
3290
  var inherits = __require("util").inherits;
3291
3291
  var path2 = __require("path");
@@ -3343,21 +3343,21 @@ var require_sonic_boom = __commonJS((exports, module) => {
3343
3343
  if (sonic.sync) {
3344
3344
  try {
3345
3345
  if (sonic.mkdir)
3346
- fs2.mkdirSync(path2.dirname(file2), { recursive: true });
3347
- const fd = fs2.openSync(file2, flags, mode);
3346
+ fs3.mkdirSync(path2.dirname(file2), { recursive: true });
3347
+ const fd = fs3.openSync(file2, flags, mode);
3348
3348
  fileOpened(null, fd);
3349
3349
  } catch (err) {
3350
3350
  fileOpened(err);
3351
3351
  throw err;
3352
3352
  }
3353
3353
  } else if (sonic.mkdir) {
3354
- fs2.mkdir(path2.dirname(file2), { recursive: true }, (err) => {
3354
+ fs3.mkdir(path2.dirname(file2), { recursive: true }, (err) => {
3355
3355
  if (err)
3356
3356
  return fileOpened(err);
3357
- fs2.open(file2, flags, mode, fileOpened);
3357
+ fs3.open(file2, flags, mode, fileOpened);
3358
3358
  });
3359
3359
  } else {
3360
- fs2.open(file2, flags, mode, fileOpened);
3360
+ fs3.open(file2, flags, mode, fileOpened);
3361
3361
  }
3362
3362
  }
3363
3363
  function SonicBoom(opts) {
@@ -3398,8 +3398,8 @@ var require_sonic_boom = __commonJS((exports, module) => {
3398
3398
  this.flush = flushBuffer;
3399
3399
  this.flushSync = flushBufferSync;
3400
3400
  this._actualWrite = actualWriteBuffer;
3401
- fsWriteSync = () => fs2.writeSync(this.fd, this._writingBuf);
3402
- fsWrite = () => fs2.write(this.fd, this._writingBuf, this.release);
3401
+ fsWriteSync = () => fs3.writeSync(this.fd, this._writingBuf);
3402
+ fsWrite = () => fs3.write(this.fd, this._writingBuf, this.release);
3403
3403
  } else if (contentMode === undefined || contentMode === kContentModeUtf8) {
3404
3404
  this._writingBuf = "";
3405
3405
  this.write = write;
@@ -3408,15 +3408,15 @@ var require_sonic_boom = __commonJS((exports, module) => {
3408
3408
  this._actualWrite = actualWrite;
3409
3409
  fsWriteSync = () => {
3410
3410
  if (Buffer.isBuffer(this._writingBuf)) {
3411
- return fs2.writeSync(this.fd, this._writingBuf);
3411
+ return fs3.writeSync(this.fd, this._writingBuf);
3412
3412
  }
3413
- return fs2.writeSync(this.fd, this._writingBuf, "utf8");
3413
+ return fs3.writeSync(this.fd, this._writingBuf, "utf8");
3414
3414
  };
3415
3415
  fsWrite = () => {
3416
3416
  if (Buffer.isBuffer(this._writingBuf)) {
3417
- return fs2.write(this.fd, this._writingBuf, this.release);
3417
+ return fs3.write(this.fd, this._writingBuf, this.release);
3418
3418
  }
3419
- return fs2.write(this.fd, this._writingBuf, "utf8", this.release);
3419
+ return fs3.write(this.fd, this._writingBuf, "utf8", this.release);
3420
3420
  };
3421
3421
  } else {
3422
3422
  throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
@@ -3473,7 +3473,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3473
3473
  }
3474
3474
  }
3475
3475
  if (this._fsync) {
3476
- fs2.fsyncSync(this.fd);
3476
+ fs3.fsyncSync(this.fd);
3477
3477
  }
3478
3478
  const len = this._len;
3479
3479
  if (this._reopening) {
@@ -3588,7 +3588,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3588
3588
  const onDrain = () => {
3589
3589
  if (!this._fsync) {
3590
3590
  try {
3591
- fs2.fsync(this.fd, (err) => {
3591
+ fs3.fsync(this.fd, (err) => {
3592
3592
  this._flushPending = false;
3593
3593
  cb(err);
3594
3594
  });
@@ -3690,7 +3690,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3690
3690
  const fd = this.fd;
3691
3691
  this.once("ready", () => {
3692
3692
  if (fd !== this.fd) {
3693
- fs2.close(fd, (err) => {
3693
+ fs3.close(fd, (err) => {
3694
3694
  if (err) {
3695
3695
  return this.emit("error", err);
3696
3696
  }
@@ -3739,7 +3739,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3739
3739
  buf = this._bufs[0];
3740
3740
  }
3741
3741
  try {
3742
- const n = Buffer.isBuffer(buf) ? fs2.writeSync(this.fd, buf) : fs2.writeSync(this.fd, buf, "utf8");
3742
+ const n = Buffer.isBuffer(buf) ? fs3.writeSync(this.fd, buf) : fs3.writeSync(this.fd, buf, "utf8");
3743
3743
  const releasedBufObj = releaseWritingBuf(buf, this._len, n);
3744
3744
  buf = releasedBufObj.writingBuf;
3745
3745
  this._len = releasedBufObj.len;
@@ -3755,7 +3755,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3755
3755
  }
3756
3756
  }
3757
3757
  try {
3758
- fs2.fsyncSync(this.fd);
3758
+ fs3.fsyncSync(this.fd);
3759
3759
  } catch {}
3760
3760
  }
3761
3761
  function flushBufferSync() {
@@ -3775,7 +3775,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3775
3775
  buf = mergeBuf(this._bufs[0], this._lens[0]);
3776
3776
  }
3777
3777
  try {
3778
- const n = fs2.writeSync(this.fd, buf);
3778
+ const n = fs3.writeSync(this.fd, buf);
3779
3779
  buf = buf.subarray(n);
3780
3780
  this._len = Math.max(this._len - n, 0);
3781
3781
  if (buf.length <= 0) {
@@ -3803,13 +3803,13 @@ var require_sonic_boom = __commonJS((exports, module) => {
3803
3803
  this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
3804
3804
  if (this.sync) {
3805
3805
  try {
3806
- const written = Buffer.isBuffer(this._writingBuf) ? fs2.writeSync(this.fd, this._writingBuf) : fs2.writeSync(this.fd, this._writingBuf, "utf8");
3806
+ const written = Buffer.isBuffer(this._writingBuf) ? fs3.writeSync(this.fd, this._writingBuf) : fs3.writeSync(this.fd, this._writingBuf, "utf8");
3807
3807
  release(null, written);
3808
3808
  } catch (err) {
3809
3809
  release(err);
3810
3810
  }
3811
3811
  } else {
3812
- fs2.write(this.fd, this._writingBuf, release);
3812
+ fs3.write(this.fd, this._writingBuf, release);
3813
3813
  }
3814
3814
  }
3815
3815
  function actualWriteBuffer() {
@@ -3818,7 +3818,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3818
3818
  this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
3819
3819
  if (this.sync) {
3820
3820
  try {
3821
- const written = fs2.writeSync(this.fd, this._writingBuf);
3821
+ const written = fs3.writeSync(this.fd, this._writingBuf);
3822
3822
  release(null, written);
3823
3823
  } catch (err) {
3824
3824
  release(err);
@@ -3827,7 +3827,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
3827
3827
  if (kCopyBuffer) {
3828
3828
  this._writingBuf = Buffer.from(this._writingBuf);
3829
3829
  }
3830
- fs2.write(this.fd, this._writingBuf, release);
3830
+ fs3.write(this.fd, this._writingBuf, release);
3831
3831
  }
3832
3832
  }
3833
3833
  function actualClose(sonic) {
@@ -3843,11 +3843,11 @@ var require_sonic_boom = __commonJS((exports, module) => {
3843
3843
  sonic._lens = [];
3844
3844
  assert2(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
3845
3845
  try {
3846
- fs2.fsync(sonic.fd, closeWrapped);
3846
+ fs3.fsync(sonic.fd, closeWrapped);
3847
3847
  } catch {}
3848
3848
  function closeWrapped() {
3849
3849
  if (sonic.fd !== 1 && sonic.fd !== 2) {
3850
- fs2.close(sonic.fd, done);
3850
+ fs3.close(sonic.fd, done);
3851
3851
  } else {
3852
3852
  done();
3853
3853
  }
@@ -17258,14 +17258,14 @@ var require_load = __commonJS((exports, module) => {
17258
17258
  zipEntries.load(data2);
17259
17259
  return zipEntries;
17260
17260
  }).then(function checkCRC32(zipEntries) {
17261
- var promises2 = [external2.Promise.resolve(zipEntries)];
17261
+ var promises3 = [external2.Promise.resolve(zipEntries)];
17262
17262
  var files = zipEntries.files;
17263
17263
  if (options.checkCRC32) {
17264
17264
  for (var i2 = 0;i2 < files.length; i2++) {
17265
- promises2.push(checkEntryCRC32(files[i2]));
17265
+ promises3.push(checkEntryCRC32(files[i2]));
17266
17266
  }
17267
17267
  }
17268
- return external2.Promise.all(promises2);
17268
+ return external2.Promise.all(promises3);
17269
17269
  }).then(function addFiles(results) {
17270
17270
  var zipEntries = results.shift();
17271
17271
  var files = zipEntries.files;
@@ -18963,7 +18963,7 @@ var init_strip_ansi = __esm(() => {
18963
18963
  });
18964
18964
 
18965
18965
  // node_modules/@wdio/logger/build/index.js
18966
- import fs3 from "node:fs";
18966
+ import fs4 from "node:fs";
18967
18967
  import util from "node:util";
18968
18968
  function getLogger(name) {
18969
18969
  if (loggers[name]) {
@@ -19042,7 +19042,7 @@ var import_safe_regex2, import_loglevel, import_loglevel_plugin_prefix, SENSITIV
19042
19042
  const rawMethod = originalFactory(methodName, logLevel, loggerName);
19043
19043
  return (...args) => {
19044
19044
  if (!logFile && process.env.WDIO_LOG_PATH) {
19045
- logFile = fs3.createWriteStream(process.env.WDIO_LOG_PATH);
19045
+ logFile = fs4.createWriteStream(process.env.WDIO_LOG_PATH);
19046
19046
  }
19047
19047
  const match = Object.values(matches).filter((x) => args[0].endsWith(`: ${x}`))[0];
19048
19048
  if (match) {
@@ -20043,13 +20043,13 @@ var require_minimatch = __commonJS((exports, module) => {
20043
20043
  // node_modules/readdir-glob/index.js
20044
20044
  var require_readdir_glob = __commonJS((exports, module) => {
20045
20045
  module.exports = readdirGlob;
20046
- var fs4 = __require("fs");
20046
+ var fs5 = __require("fs");
20047
20047
  var { EventEmitter } = __require("events");
20048
20048
  var { Minimatch } = require_minimatch();
20049
20049
  var { resolve: resolve10 } = __require("path");
20050
20050
  function readdir3(dir, strict) {
20051
20051
  return new Promise((resolve11, reject) => {
20052
- fs4.readdir(dir, { withFileTypes: true }, (err, files) => {
20052
+ fs5.readdir(dir, { withFileTypes: true }, (err, files) => {
20053
20053
  if (err) {
20054
20054
  switch (err.code) {
20055
20055
  case "ENOTDIR":
@@ -20078,7 +20078,7 @@ var require_readdir_glob = __commonJS((exports, module) => {
20078
20078
  }
20079
20079
  function stat2(file2, followSymlinks) {
20080
20080
  return new Promise((resolve11, reject) => {
20081
- const statFunc = followSymlinks ? fs4.stat : fs4.lstat;
20081
+ const statFunc = followSymlinks ? fs5.stat : fs5.lstat;
20082
20082
  statFunc(file2, (err, stats) => {
20083
20083
  if (err) {
20084
20084
  switch (err.code) {
@@ -22202,54 +22202,54 @@ var require_polyfills = __commonJS((exports, module) => {
22202
22202
  }
22203
22203
  var chdir;
22204
22204
  module.exports = patch;
22205
- function patch(fs4) {
22205
+ function patch(fs5) {
22206
22206
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
22207
- patchLchmod(fs4);
22208
- }
22209
- if (!fs4.lutimes) {
22210
- patchLutimes(fs4);
22211
- }
22212
- fs4.chown = chownFix(fs4.chown);
22213
- fs4.fchown = chownFix(fs4.fchown);
22214
- fs4.lchown = chownFix(fs4.lchown);
22215
- fs4.chmod = chmodFix(fs4.chmod);
22216
- fs4.fchmod = chmodFix(fs4.fchmod);
22217
- fs4.lchmod = chmodFix(fs4.lchmod);
22218
- fs4.chownSync = chownFixSync(fs4.chownSync);
22219
- fs4.fchownSync = chownFixSync(fs4.fchownSync);
22220
- fs4.lchownSync = chownFixSync(fs4.lchownSync);
22221
- fs4.chmodSync = chmodFixSync(fs4.chmodSync);
22222
- fs4.fchmodSync = chmodFixSync(fs4.fchmodSync);
22223
- fs4.lchmodSync = chmodFixSync(fs4.lchmodSync);
22224
- fs4.stat = statFix(fs4.stat);
22225
- fs4.fstat = statFix(fs4.fstat);
22226
- fs4.lstat = statFix(fs4.lstat);
22227
- fs4.statSync = statFixSync(fs4.statSync);
22228
- fs4.fstatSync = statFixSync(fs4.fstatSync);
22229
- fs4.lstatSync = statFixSync(fs4.lstatSync);
22230
- if (fs4.chmod && !fs4.lchmod) {
22231
- fs4.lchmod = function(path3, mode, cb) {
22207
+ patchLchmod(fs5);
22208
+ }
22209
+ if (!fs5.lutimes) {
22210
+ patchLutimes(fs5);
22211
+ }
22212
+ fs5.chown = chownFix(fs5.chown);
22213
+ fs5.fchown = chownFix(fs5.fchown);
22214
+ fs5.lchown = chownFix(fs5.lchown);
22215
+ fs5.chmod = chmodFix(fs5.chmod);
22216
+ fs5.fchmod = chmodFix(fs5.fchmod);
22217
+ fs5.lchmod = chmodFix(fs5.lchmod);
22218
+ fs5.chownSync = chownFixSync(fs5.chownSync);
22219
+ fs5.fchownSync = chownFixSync(fs5.fchownSync);
22220
+ fs5.lchownSync = chownFixSync(fs5.lchownSync);
22221
+ fs5.chmodSync = chmodFixSync(fs5.chmodSync);
22222
+ fs5.fchmodSync = chmodFixSync(fs5.fchmodSync);
22223
+ fs5.lchmodSync = chmodFixSync(fs5.lchmodSync);
22224
+ fs5.stat = statFix(fs5.stat);
22225
+ fs5.fstat = statFix(fs5.fstat);
22226
+ fs5.lstat = statFix(fs5.lstat);
22227
+ fs5.statSync = statFixSync(fs5.statSync);
22228
+ fs5.fstatSync = statFixSync(fs5.fstatSync);
22229
+ fs5.lstatSync = statFixSync(fs5.lstatSync);
22230
+ if (fs5.chmod && !fs5.lchmod) {
22231
+ fs5.lchmod = function(path3, mode, cb) {
22232
22232
  if (cb)
22233
22233
  process.nextTick(cb);
22234
22234
  };
22235
- fs4.lchmodSync = function() {};
22235
+ fs5.lchmodSync = function() {};
22236
22236
  }
22237
- if (fs4.chown && !fs4.lchown) {
22238
- fs4.lchown = function(path3, uid, gid, cb) {
22237
+ if (fs5.chown && !fs5.lchown) {
22238
+ fs5.lchown = function(path3, uid, gid, cb) {
22239
22239
  if (cb)
22240
22240
  process.nextTick(cb);
22241
22241
  };
22242
- fs4.lchownSync = function() {};
22242
+ fs5.lchownSync = function() {};
22243
22243
  }
22244
22244
  if (platform === "win32") {
22245
- fs4.rename = typeof fs4.rename !== "function" ? fs4.rename : function(fs$rename) {
22245
+ fs5.rename = typeof fs5.rename !== "function" ? fs5.rename : function(fs$rename) {
22246
22246
  function rename(from, to2, cb) {
22247
22247
  var start = Date.now();
22248
22248
  var backoff = 0;
22249
22249
  fs$rename(from, to2, function CB(er2) {
22250
22250
  if (er2 && (er2.code === "EACCES" || er2.code === "EPERM" || er2.code === "EBUSY") && Date.now() - start < 60000) {
22251
22251
  setTimeout(function() {
22252
- fs4.stat(to2, function(stater, st2) {
22252
+ fs5.stat(to2, function(stater, st2) {
22253
22253
  if (stater && stater.code === "ENOENT")
22254
22254
  fs$rename(from, to2, CB);
22255
22255
  else
@@ -22267,9 +22267,9 @@ var require_polyfills = __commonJS((exports, module) => {
22267
22267
  if (Object.setPrototypeOf)
22268
22268
  Object.setPrototypeOf(rename, fs$rename);
22269
22269
  return rename;
22270
- }(fs4.rename);
22270
+ }(fs5.rename);
22271
22271
  }
22272
- fs4.read = typeof fs4.read !== "function" ? fs4.read : function(fs$read) {
22272
+ fs5.read = typeof fs5.read !== "function" ? fs5.read : function(fs$read) {
22273
22273
  function read(fd, buffer, offset, length, position, callback_) {
22274
22274
  var callback2;
22275
22275
  if (callback_ && typeof callback_ === "function") {
@@ -22277,23 +22277,23 @@ var require_polyfills = __commonJS((exports, module) => {
22277
22277
  callback2 = function(er2, _4, __) {
22278
22278
  if (er2 && er2.code === "EAGAIN" && eagCounter < 10) {
22279
22279
  eagCounter++;
22280
- return fs$read.call(fs4, fd, buffer, offset, length, position, callback2);
22280
+ return fs$read.call(fs5, fd, buffer, offset, length, position, callback2);
22281
22281
  }
22282
22282
  callback_.apply(this, arguments);
22283
22283
  };
22284
22284
  }
22285
- return fs$read.call(fs4, fd, buffer, offset, length, position, callback2);
22285
+ return fs$read.call(fs5, fd, buffer, offset, length, position, callback2);
22286
22286
  }
22287
22287
  if (Object.setPrototypeOf)
22288
22288
  Object.setPrototypeOf(read, fs$read);
22289
22289
  return read;
22290
- }(fs4.read);
22291
- fs4.readSync = typeof fs4.readSync !== "function" ? fs4.readSync : function(fs$readSync) {
22290
+ }(fs5.read);
22291
+ fs5.readSync = typeof fs5.readSync !== "function" ? fs5.readSync : function(fs$readSync) {
22292
22292
  return function(fd, buffer, offset, length, position) {
22293
22293
  var eagCounter = 0;
22294
22294
  while (true) {
22295
22295
  try {
22296
- return fs$readSync.call(fs4, fd, buffer, offset, length, position);
22296
+ return fs$readSync.call(fs5, fd, buffer, offset, length, position);
22297
22297
  } catch (er2) {
22298
22298
  if (er2.code === "EAGAIN" && eagCounter < 10) {
22299
22299
  eagCounter++;
@@ -22303,90 +22303,90 @@ var require_polyfills = __commonJS((exports, module) => {
22303
22303
  }
22304
22304
  }
22305
22305
  };
22306
- }(fs4.readSync);
22307
- function patchLchmod(fs5) {
22308
- fs5.lchmod = function(path3, mode, callback2) {
22309
- fs5.open(path3, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
22306
+ }(fs5.readSync);
22307
+ function patchLchmod(fs6) {
22308
+ fs6.lchmod = function(path3, mode, callback2) {
22309
+ fs6.open(path3, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
22310
22310
  if (err) {
22311
22311
  if (callback2)
22312
22312
  callback2(err);
22313
22313
  return;
22314
22314
  }
22315
- fs5.fchmod(fd, mode, function(err2) {
22316
- fs5.close(fd, function(err22) {
22315
+ fs6.fchmod(fd, mode, function(err2) {
22316
+ fs6.close(fd, function(err22) {
22317
22317
  if (callback2)
22318
22318
  callback2(err2 || err22);
22319
22319
  });
22320
22320
  });
22321
22321
  });
22322
22322
  };
22323
- fs5.lchmodSync = function(path3, mode) {
22324
- var fd = fs5.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
22323
+ fs6.lchmodSync = function(path3, mode) {
22324
+ var fd = fs6.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
22325
22325
  var threw = true;
22326
22326
  var ret;
22327
22327
  try {
22328
- ret = fs5.fchmodSync(fd, mode);
22328
+ ret = fs6.fchmodSync(fd, mode);
22329
22329
  threw = false;
22330
22330
  } finally {
22331
22331
  if (threw) {
22332
22332
  try {
22333
- fs5.closeSync(fd);
22333
+ fs6.closeSync(fd);
22334
22334
  } catch (er2) {}
22335
22335
  } else {
22336
- fs5.closeSync(fd);
22336
+ fs6.closeSync(fd);
22337
22337
  }
22338
22338
  }
22339
22339
  return ret;
22340
22340
  };
22341
22341
  }
22342
- function patchLutimes(fs5) {
22343
- if (constants.hasOwnProperty("O_SYMLINK") && fs5.futimes) {
22344
- fs5.lutimes = function(path3, at2, mt2, cb) {
22345
- fs5.open(path3, constants.O_SYMLINK, function(er2, fd) {
22342
+ function patchLutimes(fs6) {
22343
+ if (constants.hasOwnProperty("O_SYMLINK") && fs6.futimes) {
22344
+ fs6.lutimes = function(path3, at2, mt2, cb) {
22345
+ fs6.open(path3, constants.O_SYMLINK, function(er2, fd) {
22346
22346
  if (er2) {
22347
22347
  if (cb)
22348
22348
  cb(er2);
22349
22349
  return;
22350
22350
  }
22351
- fs5.futimes(fd, at2, mt2, function(er3) {
22352
- fs5.close(fd, function(er22) {
22351
+ fs6.futimes(fd, at2, mt2, function(er3) {
22352
+ fs6.close(fd, function(er22) {
22353
22353
  if (cb)
22354
22354
  cb(er3 || er22);
22355
22355
  });
22356
22356
  });
22357
22357
  });
22358
22358
  };
22359
- fs5.lutimesSync = function(path3, at2, mt2) {
22360
- var fd = fs5.openSync(path3, constants.O_SYMLINK);
22359
+ fs6.lutimesSync = function(path3, at2, mt2) {
22360
+ var fd = fs6.openSync(path3, constants.O_SYMLINK);
22361
22361
  var ret;
22362
22362
  var threw = true;
22363
22363
  try {
22364
- ret = fs5.futimesSync(fd, at2, mt2);
22364
+ ret = fs6.futimesSync(fd, at2, mt2);
22365
22365
  threw = false;
22366
22366
  } finally {
22367
22367
  if (threw) {
22368
22368
  try {
22369
- fs5.closeSync(fd);
22369
+ fs6.closeSync(fd);
22370
22370
  } catch (er2) {}
22371
22371
  } else {
22372
- fs5.closeSync(fd);
22372
+ fs6.closeSync(fd);
22373
22373
  }
22374
22374
  }
22375
22375
  return ret;
22376
22376
  };
22377
- } else if (fs5.futimes) {
22378
- fs5.lutimes = function(_a3, _b, _c, cb) {
22377
+ } else if (fs6.futimes) {
22378
+ fs6.lutimes = function(_a3, _b, _c, cb) {
22379
22379
  if (cb)
22380
22380
  process.nextTick(cb);
22381
22381
  };
22382
- fs5.lutimesSync = function() {};
22382
+ fs6.lutimesSync = function() {};
22383
22383
  }
22384
22384
  }
22385
22385
  function chmodFix(orig) {
22386
22386
  if (!orig)
22387
22387
  return orig;
22388
22388
  return function(target, mode, cb) {
22389
- return orig.call(fs4, target, mode, function(er2) {
22389
+ return orig.call(fs5, target, mode, function(er2) {
22390
22390
  if (chownErOk(er2))
22391
22391
  er2 = null;
22392
22392
  if (cb)
@@ -22399,7 +22399,7 @@ var require_polyfills = __commonJS((exports, module) => {
22399
22399
  return orig;
22400
22400
  return function(target, mode) {
22401
22401
  try {
22402
- return orig.call(fs4, target, mode);
22402
+ return orig.call(fs5, target, mode);
22403
22403
  } catch (er2) {
22404
22404
  if (!chownErOk(er2))
22405
22405
  throw er2;
@@ -22410,7 +22410,7 @@ var require_polyfills = __commonJS((exports, module) => {
22410
22410
  if (!orig)
22411
22411
  return orig;
22412
22412
  return function(target, uid, gid, cb) {
22413
- return orig.call(fs4, target, uid, gid, function(er2) {
22413
+ return orig.call(fs5, target, uid, gid, function(er2) {
22414
22414
  if (chownErOk(er2))
22415
22415
  er2 = null;
22416
22416
  if (cb)
@@ -22423,7 +22423,7 @@ var require_polyfills = __commonJS((exports, module) => {
22423
22423
  return orig;
22424
22424
  return function(target, uid, gid) {
22425
22425
  try {
22426
- return orig.call(fs4, target, uid, gid);
22426
+ return orig.call(fs5, target, uid, gid);
22427
22427
  } catch (er2) {
22428
22428
  if (!chownErOk(er2))
22429
22429
  throw er2;
@@ -22448,14 +22448,14 @@ var require_polyfills = __commonJS((exports, module) => {
22448
22448
  if (cb)
22449
22449
  cb.apply(this, arguments);
22450
22450
  }
22451
- return options ? orig.call(fs4, target, options, callback2) : orig.call(fs4, target, callback2);
22451
+ return options ? orig.call(fs5, target, options, callback2) : orig.call(fs5, target, callback2);
22452
22452
  };
22453
22453
  }
22454
22454
  function statFixSync(orig) {
22455
22455
  if (!orig)
22456
22456
  return orig;
22457
22457
  return function(target, options) {
22458
- var stats = options ? orig.call(fs4, target, options) : orig.call(fs4, target);
22458
+ var stats = options ? orig.call(fs5, target, options) : orig.call(fs5, target);
22459
22459
  if (stats) {
22460
22460
  if (stats.uid < 0)
22461
22461
  stats.uid += 4294967296;
@@ -22484,7 +22484,7 @@ var require_polyfills = __commonJS((exports, module) => {
22484
22484
  var require_legacy_streams = __commonJS((exports, module) => {
22485
22485
  var Stream = __require("stream").Stream;
22486
22486
  module.exports = legacy;
22487
- function legacy(fs4) {
22487
+ function legacy(fs5) {
22488
22488
  return {
22489
22489
  ReadStream: ReadStream2,
22490
22490
  WriteStream
@@ -22529,7 +22529,7 @@ var require_legacy_streams = __commonJS((exports, module) => {
22529
22529
  });
22530
22530
  return;
22531
22531
  }
22532
- fs4.open(this.path, this.flags, this.mode, function(err, fd) {
22532
+ fs5.open(this.path, this.flags, this.mode, function(err, fd) {
22533
22533
  if (err) {
22534
22534
  self2.emit("error", err);
22535
22535
  self2.readable = false;
@@ -22569,7 +22569,7 @@ var require_legacy_streams = __commonJS((exports, module) => {
22569
22569
  this.busy = false;
22570
22570
  this._queue = [];
22571
22571
  if (this.fd === null) {
22572
- this._open = fs4.open;
22572
+ this._open = fs5.open;
22573
22573
  this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);
22574
22574
  this.flush();
22575
22575
  }
@@ -22599,7 +22599,7 @@ var require_clone = __commonJS((exports, module) => {
22599
22599
 
22600
22600
  // node_modules/graceful-fs/graceful-fs.js
22601
22601
  var require_graceful_fs = __commonJS((exports, module) => {
22602
- var fs4 = __require("fs");
22602
+ var fs5 = __require("fs");
22603
22603
  var polyfills = require_polyfills();
22604
22604
  var legacy = require_legacy_streams();
22605
22605
  var clone2 = require_clone();
@@ -22631,12 +22631,12 @@ var require_graceful_fs = __commonJS((exports, module) => {
22631
22631
  GFS4: `);
22632
22632
  console.error(m4);
22633
22633
  };
22634
- if (!fs4[gracefulQueue]) {
22634
+ if (!fs5[gracefulQueue]) {
22635
22635
  queue = global[gracefulQueue] || [];
22636
- publishQueue(fs4, queue);
22637
- fs4.close = function(fs$close) {
22636
+ publishQueue(fs5, queue);
22637
+ fs5.close = function(fs$close) {
22638
22638
  function close(fd, cb) {
22639
- return fs$close.call(fs4, fd, function(err) {
22639
+ return fs$close.call(fs5, fd, function(err) {
22640
22640
  if (!err) {
22641
22641
  resetQueue();
22642
22642
  }
@@ -22648,40 +22648,40 @@ GFS4: `);
22648
22648
  value: fs$close
22649
22649
  });
22650
22650
  return close;
22651
- }(fs4.close);
22652
- fs4.closeSync = function(fs$closeSync) {
22651
+ }(fs5.close);
22652
+ fs5.closeSync = function(fs$closeSync) {
22653
22653
  function closeSync(fd) {
22654
- fs$closeSync.apply(fs4, arguments);
22654
+ fs$closeSync.apply(fs5, arguments);
22655
22655
  resetQueue();
22656
22656
  }
22657
22657
  Object.defineProperty(closeSync, previousSymbol, {
22658
22658
  value: fs$closeSync
22659
22659
  });
22660
22660
  return closeSync;
22661
- }(fs4.closeSync);
22661
+ }(fs5.closeSync);
22662
22662
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
22663
22663
  process.on("exit", function() {
22664
- debug(fs4[gracefulQueue]);
22665
- __require("assert").equal(fs4[gracefulQueue].length, 0);
22664
+ debug(fs5[gracefulQueue]);
22665
+ __require("assert").equal(fs5[gracefulQueue].length, 0);
22666
22666
  });
22667
22667
  }
22668
22668
  }
22669
22669
  var queue;
22670
22670
  if (!global[gracefulQueue]) {
22671
- publishQueue(global, fs4[gracefulQueue]);
22672
- }
22673
- module.exports = patch(clone2(fs4));
22674
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs4.__patched) {
22675
- module.exports = patch(fs4);
22676
- fs4.__patched = true;
22677
- }
22678
- function patch(fs5) {
22679
- polyfills(fs5);
22680
- fs5.gracefulify = patch;
22681
- fs5.createReadStream = createReadStream2;
22682
- fs5.createWriteStream = createWriteStream;
22683
- var fs$readFile = fs5.readFile;
22684
- fs5.readFile = readFile;
22671
+ publishQueue(global, fs5[gracefulQueue]);
22672
+ }
22673
+ module.exports = patch(clone2(fs5));
22674
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs5.__patched) {
22675
+ module.exports = patch(fs5);
22676
+ fs5.__patched = true;
22677
+ }
22678
+ function patch(fs6) {
22679
+ polyfills(fs6);
22680
+ fs6.gracefulify = patch;
22681
+ fs6.createReadStream = createReadStream2;
22682
+ fs6.createWriteStream = createWriteStream;
22683
+ var fs$readFile = fs6.readFile;
22684
+ fs6.readFile = readFile;
22685
22685
  function readFile(path3, options, cb) {
22686
22686
  if (typeof options === "function")
22687
22687
  cb = options, options = null;
@@ -22697,8 +22697,8 @@ GFS4: `);
22697
22697
  });
22698
22698
  }
22699
22699
  }
22700
- var fs$writeFile = fs5.writeFile;
22701
- fs5.writeFile = writeFile;
22700
+ var fs$writeFile = fs6.writeFile;
22701
+ fs6.writeFile = writeFile;
22702
22702
  function writeFile(path3, data, options, cb) {
22703
22703
  if (typeof options === "function")
22704
22704
  cb = options, options = null;
@@ -22714,9 +22714,9 @@ GFS4: `);
22714
22714
  });
22715
22715
  }
22716
22716
  }
22717
- var fs$appendFile = fs5.appendFile;
22717
+ var fs$appendFile = fs6.appendFile;
22718
22718
  if (fs$appendFile)
22719
- fs5.appendFile = appendFile;
22719
+ fs6.appendFile = appendFile;
22720
22720
  function appendFile(path3, data, options, cb) {
22721
22721
  if (typeof options === "function")
22722
22722
  cb = options, options = null;
@@ -22732,9 +22732,9 @@ GFS4: `);
22732
22732
  });
22733
22733
  }
22734
22734
  }
22735
- var fs$copyFile = fs5.copyFile;
22735
+ var fs$copyFile = fs6.copyFile;
22736
22736
  if (fs$copyFile)
22737
- fs5.copyFile = copyFile;
22737
+ fs6.copyFile = copyFile;
22738
22738
  function copyFile(src, dest, flags, cb) {
22739
22739
  if (typeof flags === "function") {
22740
22740
  cb = flags;
@@ -22752,8 +22752,8 @@ GFS4: `);
22752
22752
  });
22753
22753
  }
22754
22754
  }
22755
- var fs$readdir = fs5.readdir;
22756
- fs5.readdir = readdir3;
22755
+ var fs$readdir = fs6.readdir;
22756
+ fs6.readdir = readdir3;
22757
22757
  var noReaddirOptionVersions = /^v[0-5]\./;
22758
22758
  function readdir3(path3, options, cb) {
22759
22759
  if (typeof options === "function")
@@ -22784,21 +22784,21 @@ GFS4: `);
22784
22784
  }
22785
22785
  }
22786
22786
  if (process.version.substr(0, 4) === "v0.8") {
22787
- var legStreams = legacy(fs5);
22787
+ var legStreams = legacy(fs6);
22788
22788
  ReadStream2 = legStreams.ReadStream;
22789
22789
  WriteStream = legStreams.WriteStream;
22790
22790
  }
22791
- var fs$ReadStream = fs5.ReadStream;
22791
+ var fs$ReadStream = fs6.ReadStream;
22792
22792
  if (fs$ReadStream) {
22793
22793
  ReadStream2.prototype = Object.create(fs$ReadStream.prototype);
22794
22794
  ReadStream2.prototype.open = ReadStream$open;
22795
22795
  }
22796
- var fs$WriteStream = fs5.WriteStream;
22796
+ var fs$WriteStream = fs6.WriteStream;
22797
22797
  if (fs$WriteStream) {
22798
22798
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
22799
22799
  WriteStream.prototype.open = WriteStream$open;
22800
22800
  }
22801
- Object.defineProperty(fs5, "ReadStream", {
22801
+ Object.defineProperty(fs6, "ReadStream", {
22802
22802
  get: function() {
22803
22803
  return ReadStream2;
22804
22804
  },
@@ -22808,7 +22808,7 @@ GFS4: `);
22808
22808
  enumerable: true,
22809
22809
  configurable: true
22810
22810
  });
22811
- Object.defineProperty(fs5, "WriteStream", {
22811
+ Object.defineProperty(fs6, "WriteStream", {
22812
22812
  get: function() {
22813
22813
  return WriteStream;
22814
22814
  },
@@ -22819,7 +22819,7 @@ GFS4: `);
22819
22819
  configurable: true
22820
22820
  });
22821
22821
  var FileReadStream = ReadStream2;
22822
- Object.defineProperty(fs5, "FileReadStream", {
22822
+ Object.defineProperty(fs6, "FileReadStream", {
22823
22823
  get: function() {
22824
22824
  return FileReadStream;
22825
22825
  },
@@ -22830,7 +22830,7 @@ GFS4: `);
22830
22830
  configurable: true
22831
22831
  });
22832
22832
  var FileWriteStream = WriteStream;
22833
- Object.defineProperty(fs5, "FileWriteStream", {
22833
+ Object.defineProperty(fs6, "FileWriteStream", {
22834
22834
  get: function() {
22835
22835
  return FileWriteStream;
22836
22836
  },
@@ -22879,13 +22879,13 @@ GFS4: `);
22879
22879
  });
22880
22880
  }
22881
22881
  function createReadStream2(path3, options) {
22882
- return new fs5.ReadStream(path3, options);
22882
+ return new fs6.ReadStream(path3, options);
22883
22883
  }
22884
22884
  function createWriteStream(path3, options) {
22885
- return new fs5.WriteStream(path3, options);
22885
+ return new fs6.WriteStream(path3, options);
22886
22886
  }
22887
- var fs$open = fs5.open;
22888
- fs5.open = open;
22887
+ var fs$open = fs6.open;
22888
+ fs6.open = open;
22889
22889
  function open(path3, flags, mode, cb) {
22890
22890
  if (typeof mode === "function")
22891
22891
  cb = mode, mode = null;
@@ -22901,20 +22901,20 @@ GFS4: `);
22901
22901
  });
22902
22902
  }
22903
22903
  }
22904
- return fs5;
22904
+ return fs6;
22905
22905
  }
22906
22906
  function enqueue(elem) {
22907
22907
  debug("ENQUEUE", elem[0].name, elem[1]);
22908
- fs4[gracefulQueue].push(elem);
22908
+ fs5[gracefulQueue].push(elem);
22909
22909
  retry();
22910
22910
  }
22911
22911
  var retryTimer;
22912
22912
  function resetQueue() {
22913
22913
  var now = Date.now();
22914
- for (var i2 = 0;i2 < fs4[gracefulQueue].length; ++i2) {
22915
- if (fs4[gracefulQueue][i2].length > 2) {
22916
- fs4[gracefulQueue][i2][3] = now;
22917
- fs4[gracefulQueue][i2][4] = now;
22914
+ for (var i2 = 0;i2 < fs5[gracefulQueue].length; ++i2) {
22915
+ if (fs5[gracefulQueue][i2].length > 2) {
22916
+ fs5[gracefulQueue][i2][3] = now;
22917
+ fs5[gracefulQueue][i2][4] = now;
22918
22918
  }
22919
22919
  }
22920
22920
  retry();
@@ -22922,9 +22922,9 @@ GFS4: `);
22922
22922
  function retry() {
22923
22923
  clearTimeout(retryTimer);
22924
22924
  retryTimer = undefined;
22925
- if (fs4[gracefulQueue].length === 0)
22925
+ if (fs5[gracefulQueue].length === 0)
22926
22926
  return;
22927
- var elem = fs4[gracefulQueue].shift();
22927
+ var elem = fs5[gracefulQueue].shift();
22928
22928
  var fn2 = elem[0];
22929
22929
  var args = elem[1];
22930
22930
  var err = elem[2];
@@ -22946,7 +22946,7 @@ GFS4: `);
22946
22946
  debug("RETRY", fn2.name, args);
22947
22947
  fn2.apply(null, args.concat([startTime]));
22948
22948
  } else {
22949
- fs4[gracefulQueue].push(elem);
22949
+ fs5[gracefulQueue].push(elem);
22950
22950
  }
22951
22951
  }
22952
22952
  if (retryTimer === undefined) {
@@ -31598,7 +31598,7 @@ var require_stream = __commonJS((exports, module) => {
31598
31598
  var { pipeline } = require_pipeline();
31599
31599
  var { destroyer } = require_destroy3();
31600
31600
  var eos = require_end_of_stream();
31601
- var promises2 = require_promises();
31601
+ var promises3 = require_promises();
31602
31602
  var utils = require_utils3();
31603
31603
  var Stream = module.exports = require_legacy().Stream;
31604
31604
  Stream.isDestroyed = utils.isDestroyed;
@@ -31672,21 +31672,21 @@ var require_stream = __commonJS((exports, module) => {
31672
31672
  configurable: true,
31673
31673
  enumerable: true,
31674
31674
  get() {
31675
- return promises2;
31675
+ return promises3;
31676
31676
  }
31677
31677
  });
31678
31678
  ObjectDefineProperty(pipeline, customPromisify, {
31679
31679
  __proto__: null,
31680
31680
  enumerable: true,
31681
31681
  get() {
31682
- return promises2.pipeline;
31682
+ return promises3.pipeline;
31683
31683
  }
31684
31684
  });
31685
31685
  ObjectDefineProperty(eos, customPromisify, {
31686
31686
  __proto__: null,
31687
31687
  enumerable: true,
31688
31688
  get() {
31689
- return promises2.finished;
31689
+ return promises3.finished;
31690
31690
  }
31691
31691
  });
31692
31692
  Stream.Stream = Stream;
@@ -31702,7 +31702,7 @@ var require_stream = __commonJS((exports, module) => {
31702
31702
  var require_ours = __commonJS((exports, module) => {
31703
31703
  var Stream = __require("stream");
31704
31704
  if (Stream && process.env.READABLE_STREAM === "disable") {
31705
- const promises2 = Stream.promises;
31705
+ const promises3 = Stream.promises;
31706
31706
  module.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer;
31707
31707
  module.exports._isUint8Array = Stream._isUint8Array;
31708
31708
  module.exports.isDisturbed = Stream.isDisturbed;
@@ -31722,13 +31722,13 @@ var require_ours = __commonJS((exports, module) => {
31722
31722
  configurable: true,
31723
31723
  enumerable: true,
31724
31724
  get() {
31725
- return promises2;
31725
+ return promises3;
31726
31726
  }
31727
31727
  });
31728
31728
  module.exports.Stream = Stream.Stream;
31729
31729
  } else {
31730
31730
  const CustomStream = require_stream();
31731
- const promises2 = require_promises();
31731
+ const promises3 = require_promises();
31732
31732
  const originalDestroy = CustomStream.Readable.destroy;
31733
31733
  module.exports = CustomStream.Readable;
31734
31734
  module.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer;
@@ -31751,7 +31751,7 @@ var require_ours = __commonJS((exports, module) => {
31751
31751
  configurable: true,
31752
31752
  enumerable: true,
31753
31753
  get() {
31754
- return promises2;
31754
+ return promises3;
31755
31755
  }
31756
31756
  });
31757
31757
  module.exports.Stream = CustomStream.Stream;
@@ -36757,8 +36757,8 @@ var require_commonjs4 = __commonJS((exports) => {
36757
36757
  #children;
36758
36758
  nocase;
36759
36759
  #fs;
36760
- constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs4 = defaultFS } = {}) {
36761
- this.#fs = fsFromOption(fs4);
36760
+ constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs5 = defaultFS } = {}) {
36761
+ this.#fs = fsFromOption(fs5);
36762
36762
  if (cwd instanceof URL || cwd.startsWith("file://")) {
36763
36763
  cwd = (0, node_url_1.fileURLToPath)(cwd);
36764
36764
  }
@@ -37121,14 +37121,14 @@ var require_commonjs4 = __commonJS((exports) => {
37121
37121
  if (er2)
37122
37122
  return results.emit("error", er2);
37123
37123
  if (follow && !didRealpaths) {
37124
- const promises2 = [];
37124
+ const promises3 = [];
37125
37125
  for (const e of entries) {
37126
37126
  if (e.isSymbolicLink()) {
37127
- promises2.push(e.realpath().then((r2) => r2?.isUnknown() ? r2.lstat() : r2));
37127
+ promises3.push(e.realpath().then((r2) => r2?.isUnknown() ? r2.lstat() : r2));
37128
37128
  }
37129
37129
  }
37130
- if (promises2.length) {
37131
- Promise.all(promises2).then(() => onReaddir(null, entries, true));
37130
+ if (promises3.length) {
37131
+ Promise.all(promises3).then(() => onReaddir(null, entries, true));
37132
37132
  return;
37133
37133
  }
37134
37134
  }
@@ -37235,8 +37235,8 @@ var require_commonjs4 = __commonJS((exports) => {
37235
37235
  parseRootPath(dir) {
37236
37236
  return node_path_1.win32.parse(dir).root.toUpperCase();
37237
37237
  }
37238
- newRoot(fs4) {
37239
- return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs: fs4 });
37238
+ newRoot(fs5) {
37239
+ return new PathWin32(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs: fs5 });
37240
37240
  }
37241
37241
  isAbsolute(p3) {
37242
37242
  return p3.startsWith("/") || p3.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(p3);
@@ -37254,8 +37254,8 @@ var require_commonjs4 = __commonJS((exports) => {
37254
37254
  parseRootPath(_dir) {
37255
37255
  return "/";
37256
37256
  }
37257
- newRoot(fs4) {
37258
- return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs: fs4 });
37257
+ newRoot(fs5) {
37258
+ return new PathPosix(this.rootPath, IFDIR, undefined, this.roots, this.nocase, this.childrenCache(), { fs: fs5 });
37259
37259
  }
37260
37260
  isAbsolute(p3) {
37261
37261
  return p3.startsWith("/");
@@ -38341,7 +38341,7 @@ var require_commonjs5 = __commonJS((exports) => {
38341
38341
 
38342
38342
  // node_modules/archiver-utils/file.js
38343
38343
  var require_file = __commonJS((exports, module) => {
38344
- var fs4 = require_graceful_fs();
38344
+ var fs5 = require_graceful_fs();
38345
38345
  var path3 = __require("path");
38346
38346
  var flatten = require_flatten();
38347
38347
  var difference = require_difference();
@@ -38368,7 +38368,7 @@ var require_file = __commonJS((exports, module) => {
38368
38368
  };
38369
38369
  file2.exists = function() {
38370
38370
  var filepath = path3.join.apply(path3, arguments);
38371
- return fs4.existsSync(filepath);
38371
+ return fs5.existsSync(filepath);
38372
38372
  };
38373
38373
  file2.expand = function(...args) {
38374
38374
  var options = isPlainObject4(args[0]) ? args.shift() : {};
@@ -38386,7 +38386,7 @@ var require_file = __commonJS((exports, module) => {
38386
38386
  if (typeof options.filter === "function") {
38387
38387
  return options.filter(filepath);
38388
38388
  } else {
38389
- return fs4.statSync(filepath)[options.filter]();
38389
+ return fs5.statSync(filepath)[options.filter]();
38390
38390
  }
38391
38391
  } catch (e) {
38392
38392
  return false;
@@ -38492,7 +38492,7 @@ var require_file = __commonJS((exports, module) => {
38492
38492
 
38493
38493
  // node_modules/archiver-utils/index.js
38494
38494
  var require_archiver_utils = __commonJS((exports, module) => {
38495
- var fs4 = require_graceful_fs();
38495
+ var fs5 = require_graceful_fs();
38496
38496
  var path3 = __require("path");
38497
38497
  var isStream = require_is_stream();
38498
38498
  var lazystream = require_lazystream();
@@ -38541,7 +38541,7 @@ var require_archiver_utils = __commonJS((exports, module) => {
38541
38541
  };
38542
38542
  utils.lazyReadStream = function(filepath) {
38543
38543
  return new lazystream.Readable(function() {
38544
- return fs4.createReadStream(filepath);
38544
+ return fs5.createReadStream(filepath);
38545
38545
  });
38546
38546
  };
38547
38547
  utils.normalizeInputSource = function(source) {
@@ -38569,7 +38569,7 @@ var require_archiver_utils = __commonJS((exports, module) => {
38569
38569
  callback2 = base;
38570
38570
  base = dirpath;
38571
38571
  }
38572
- fs4.readdir(dirpath, function(err, list) {
38572
+ fs5.readdir(dirpath, function(err, list) {
38573
38573
  var i2 = 0;
38574
38574
  var file2;
38575
38575
  var filepath;
@@ -38582,7 +38582,7 @@ var require_archiver_utils = __commonJS((exports, module) => {
38582
38582
  return callback2(null, results);
38583
38583
  }
38584
38584
  filepath = path3.join(dirpath, file2);
38585
- fs4.stat(filepath, function(err2, stats) {
38585
+ fs5.stat(filepath, function(err2, stats) {
38586
38586
  results.push({
38587
38587
  path: filepath,
38588
38588
  relative: path3.relative(base, filepath).replace(/\\/g, "/"),
@@ -43829,7 +43829,7 @@ var require_stream2 = __commonJS((exports, module) => {
43829
43829
  var { pipeline } = require_pipeline2();
43830
43830
  var { destroyer } = require_destroy4();
43831
43831
  var eos = require_end_of_stream2();
43832
- var promises2 = require_promises2();
43832
+ var promises3 = require_promises2();
43833
43833
  var utils = require_utils4();
43834
43834
  var Stream = module.exports = require_legacy2().Stream;
43835
43835
  Stream.isDestroyed = utils.isDestroyed;
@@ -43903,21 +43903,21 @@ var require_stream2 = __commonJS((exports, module) => {
43903
43903
  configurable: true,
43904
43904
  enumerable: true,
43905
43905
  get() {
43906
- return promises2;
43906
+ return promises3;
43907
43907
  }
43908
43908
  });
43909
43909
  ObjectDefineProperty(pipeline, customPromisify, {
43910
43910
  __proto__: null,
43911
43911
  enumerable: true,
43912
43912
  get() {
43913
- return promises2.pipeline;
43913
+ return promises3.pipeline;
43914
43914
  }
43915
43915
  });
43916
43916
  ObjectDefineProperty(eos, customPromisify, {
43917
43917
  __proto__: null,
43918
43918
  enumerable: true,
43919
43919
  get() {
43920
- return promises2.finished;
43920
+ return promises3.finished;
43921
43921
  }
43922
43922
  });
43923
43923
  Stream.Stream = Stream;
@@ -43933,7 +43933,7 @@ var require_stream2 = __commonJS((exports, module) => {
43933
43933
  var require_ours2 = __commonJS((exports, module) => {
43934
43934
  var Stream = __require("stream");
43935
43935
  if (Stream && process.env.READABLE_STREAM === "disable") {
43936
- const promises2 = Stream.promises;
43936
+ const promises3 = Stream.promises;
43937
43937
  module.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer;
43938
43938
  module.exports._isUint8Array = Stream._isUint8Array;
43939
43939
  module.exports.isDisturbed = Stream.isDisturbed;
@@ -43953,13 +43953,13 @@ var require_ours2 = __commonJS((exports, module) => {
43953
43953
  configurable: true,
43954
43954
  enumerable: true,
43955
43955
  get() {
43956
- return promises2;
43956
+ return promises3;
43957
43957
  }
43958
43958
  });
43959
43959
  module.exports.Stream = Stream.Stream;
43960
43960
  } else {
43961
43961
  const CustomStream = require_stream2();
43962
- const promises2 = require_promises2();
43962
+ const promises3 = require_promises2();
43963
43963
  const originalDestroy = CustomStream.Readable.destroy;
43964
43964
  module.exports = CustomStream.Readable;
43965
43965
  module.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer;
@@ -43982,7 +43982,7 @@ var require_ours2 = __commonJS((exports, module) => {
43982
43982
  configurable: true,
43983
43983
  enumerable: true,
43984
43984
  get() {
43985
- return promises2;
43985
+ return promises3;
43986
43986
  }
43987
43987
  });
43988
43988
  module.exports.Stream = CustomStream.Stream;
@@ -43992,7 +43992,7 @@ var require_ours2 = __commonJS((exports, module) => {
43992
43992
 
43993
43993
  // node_modules/archiver/lib/core.js
43994
43994
  var require_core = __commonJS((exports, module) => {
43995
- var fs4 = __require("fs");
43995
+ var fs5 = __require("fs");
43996
43996
  var glob2 = require_readdir_glob();
43997
43997
  var async = require_async();
43998
43998
  var path3 = __require("path");
@@ -44056,7 +44056,7 @@ var require_core = __commonJS((exports, module) => {
44056
44056
  data.sourcePath = filepath;
44057
44057
  task.data = data;
44058
44058
  this._entriesCount++;
44059
- if (data.stats && data.stats instanceof fs4.Stats) {
44059
+ if (data.stats && data.stats instanceof fs5.Stats) {
44060
44060
  task = this._updateQueueTaskWithStats(task, data.stats);
44061
44061
  if (task) {
44062
44062
  if (data.stats.size) {
@@ -44227,7 +44227,7 @@ var require_core = __commonJS((exports, module) => {
44227
44227
  callback2();
44228
44228
  return;
44229
44229
  }
44230
- fs4.lstat(task.filepath, function(err, stats) {
44230
+ fs5.lstat(task.filepath, function(err, stats) {
44231
44231
  if (this._state.aborted) {
44232
44232
  setImmediate(callback2);
44233
44233
  return;
@@ -44270,7 +44270,7 @@ var require_core = __commonJS((exports, module) => {
44270
44270
  task.data.sourceType = "buffer";
44271
44271
  task.source = Buffer.concat([]);
44272
44272
  } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) {
44273
- var linkPath = fs4.readlinkSync(task.filepath);
44273
+ var linkPath = fs5.readlinkSync(task.filepath);
44274
44274
  var dirName = path3.dirname(task.filepath);
44275
44275
  task.data.type = "symlink";
44276
44276
  task.data.linkname = path3.relative(dirName, path3.resolve(dirName, linkPath));
@@ -50092,7 +50092,7 @@ var require_stream3 = __commonJS((exports, module) => {
50092
50092
  var { pipeline } = require_pipeline3();
50093
50093
  var { destroyer } = require_destroy5();
50094
50094
  var eos = require_end_of_stream3();
50095
- var promises2 = require_promises3();
50095
+ var promises3 = require_promises3();
50096
50096
  var utils = require_utils5();
50097
50097
  var Stream = module.exports = require_legacy3().Stream;
50098
50098
  Stream.isDestroyed = utils.isDestroyed;
@@ -50166,21 +50166,21 @@ var require_stream3 = __commonJS((exports, module) => {
50166
50166
  configurable: true,
50167
50167
  enumerable: true,
50168
50168
  get() {
50169
- return promises2;
50169
+ return promises3;
50170
50170
  }
50171
50171
  });
50172
50172
  ObjectDefineProperty(pipeline, customPromisify, {
50173
50173
  __proto__: null,
50174
50174
  enumerable: true,
50175
50175
  get() {
50176
- return promises2.pipeline;
50176
+ return promises3.pipeline;
50177
50177
  }
50178
50178
  });
50179
50179
  ObjectDefineProperty(eos, customPromisify, {
50180
50180
  __proto__: null,
50181
50181
  enumerable: true,
50182
50182
  get() {
50183
- return promises2.finished;
50183
+ return promises3.finished;
50184
50184
  }
50185
50185
  });
50186
50186
  Stream.Stream = Stream;
@@ -50196,7 +50196,7 @@ var require_stream3 = __commonJS((exports, module) => {
50196
50196
  var require_ours3 = __commonJS((exports, module) => {
50197
50197
  var Stream = __require("stream");
50198
50198
  if (Stream && process.env.READABLE_STREAM === "disable") {
50199
- const promises2 = Stream.promises;
50199
+ const promises3 = Stream.promises;
50200
50200
  module.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer;
50201
50201
  module.exports._isUint8Array = Stream._isUint8Array;
50202
50202
  module.exports.isDisturbed = Stream.isDisturbed;
@@ -50216,13 +50216,13 @@ var require_ours3 = __commonJS((exports, module) => {
50216
50216
  configurable: true,
50217
50217
  enumerable: true,
50218
50218
  get() {
50219
- return promises2;
50219
+ return promises3;
50220
50220
  }
50221
50221
  });
50222
50222
  module.exports.Stream = Stream.Stream;
50223
50223
  } else {
50224
50224
  const CustomStream = require_stream3();
50225
- const promises2 = require_promises3();
50225
+ const promises3 = require_promises3();
50226
50226
  const originalDestroy = CustomStream.Readable.destroy;
50227
50227
  module.exports = CustomStream.Readable;
50228
50228
  module.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer;
@@ -50245,7 +50245,7 @@ var require_ours3 = __commonJS((exports, module) => {
50245
50245
  configurable: true,
50246
50246
  enumerable: true,
50247
50247
  get() {
50248
- return promises2;
50248
+ return promises3;
50249
50249
  }
50250
50250
  });
50251
50251
  module.exports.Stream = CustomStream.Stream;
@@ -55649,7 +55649,7 @@ var require_stream4 = __commonJS((exports, module) => {
55649
55649
  var { pipeline } = require_pipeline4();
55650
55650
  var { destroyer } = require_destroy6();
55651
55651
  var eos = require_end_of_stream4();
55652
- var promises2 = require_promises4();
55652
+ var promises3 = require_promises4();
55653
55653
  var utils = require_utils6();
55654
55654
  var Stream = module.exports = require_legacy4().Stream;
55655
55655
  Stream.isDestroyed = utils.isDestroyed;
@@ -55723,21 +55723,21 @@ var require_stream4 = __commonJS((exports, module) => {
55723
55723
  configurable: true,
55724
55724
  enumerable: true,
55725
55725
  get() {
55726
- return promises2;
55726
+ return promises3;
55727
55727
  }
55728
55728
  });
55729
55729
  ObjectDefineProperty(pipeline, customPromisify, {
55730
55730
  __proto__: null,
55731
55731
  enumerable: true,
55732
55732
  get() {
55733
- return promises2.pipeline;
55733
+ return promises3.pipeline;
55734
55734
  }
55735
55735
  });
55736
55736
  ObjectDefineProperty(eos, customPromisify, {
55737
55737
  __proto__: null,
55738
55738
  enumerable: true,
55739
55739
  get() {
55740
- return promises2.finished;
55740
+ return promises3.finished;
55741
55741
  }
55742
55742
  });
55743
55743
  Stream.Stream = Stream;
@@ -55753,7 +55753,7 @@ var require_stream4 = __commonJS((exports, module) => {
55753
55753
  var require_ours4 = __commonJS((exports, module) => {
55754
55754
  var Stream = __require("stream");
55755
55755
  if (Stream && process.env.READABLE_STREAM === "disable") {
55756
- const promises2 = Stream.promises;
55756
+ const promises3 = Stream.promises;
55757
55757
  module.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer;
55758
55758
  module.exports._isUint8Array = Stream._isUint8Array;
55759
55759
  module.exports.isDisturbed = Stream.isDisturbed;
@@ -55773,13 +55773,13 @@ var require_ours4 = __commonJS((exports, module) => {
55773
55773
  configurable: true,
55774
55774
  enumerable: true,
55775
55775
  get() {
55776
- return promises2;
55776
+ return promises3;
55777
55777
  }
55778
55778
  });
55779
55779
  module.exports.Stream = Stream.Stream;
55780
55780
  } else {
55781
55781
  const CustomStream = require_stream4();
55782
- const promises2 = require_promises4();
55782
+ const promises3 = require_promises4();
55783
55783
  const originalDestroy = CustomStream.Readable.destroy;
55784
55784
  module.exports = CustomStream.Readable;
55785
55785
  module.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer;
@@ -55802,7 +55802,7 @@ var require_ours4 = __commonJS((exports, module) => {
55802
55802
  configurable: true,
55803
55803
  enumerable: true,
55804
55804
  get() {
55805
- return promises2;
55805
+ return promises3;
55806
55806
  }
55807
55807
  });
55808
55808
  module.exports.Stream = CustomStream.Stream;
@@ -59364,7 +59364,7 @@ function mitt_default(n2) {
59364
59364
  }
59365
59365
 
59366
59366
  // node_modules/@wdio/utils/build/index.js
59367
- import fs4 from "node:fs/promises";
59367
+ import fs5 from "node:fs/promises";
59368
59368
  import path3 from "node:path";
59369
59369
  function overwriteElementCommands(propertiesObject) {
59370
59370
  const elementOverrides = propertiesObject.__elementOverrides__ ? propertiesObject.__elementOverrides__.value : {};
@@ -59497,7 +59497,7 @@ async function enableFileLogging(outputDir) {
59497
59497
  if (!outputDir) {
59498
59498
  return;
59499
59499
  }
59500
- await fs4.mkdir(path3.join(outputDir), { recursive: true });
59500
+ await fs5.mkdir(path3.join(outputDir), { recursive: true });
59501
59501
  process.env.WDIO_LOG_PATH = path3.join(outputDir, "wdio.log");
59502
59502
  }
59503
59503
  function WebDriver(options, modifier, propertiesObject = {}) {
@@ -88613,19 +88613,19 @@ async function connectWebsocket(candidateUrls, options) {
88613
88613
  }
88614
88614
  return;
88615
88615
  }
88616
- function firstResolved(promises2, errorMessages = []) {
88617
- if (promises2.length === 0) {
88616
+ function firstResolved(promises3, errorMessages = []) {
88617
+ if (promises3.length === 0) {
88618
88618
  const sep5 = `
88619
88619
  - `;
88620
88620
  const errorMessage2 = errorMessages.length > 0 ? sep5 + errorMessages.join(sep5) : "";
88621
88621
  log6.error("Could not connect to Bidi protocol" + errorMessage2);
88622
88622
  return Promise.resolve(undefined);
88623
88623
  }
88624
- return Promise.race(promises2.map(({ promise: promise3 }) => promise3)).then((result) => {
88624
+ return Promise.race(promises3.map(({ promise: promise3 }) => promise3)).then((result) => {
88625
88625
  if (result.isConnected) {
88626
88626
  return result;
88627
88627
  }
88628
- return firstResolved(promises2.filter(({ index }) => index !== result.index), [...errorMessages, result.errorMessage || "unknown error"]);
88628
+ return firstResolved(promises3.filter(({ index }) => index !== result.index), [...errorMessages, result.errorMessage || "unknown error"]);
88629
88629
  });
88630
88630
  }
88631
88631
  function killDriverProcess(capabilities, shutdownDriver) {
@@ -131304,18 +131304,18 @@ var require_proxy_agent2 = __commonJS((exports, module) => {
131304
131304
  }
131305
131305
  }
131306
131306
  [kClose]() {
131307
- const promises2 = [this[kAgent].close()];
131307
+ const promises3 = [this[kAgent].close()];
131308
131308
  if (this[kClient]) {
131309
- promises2.push(this[kClient].close());
131309
+ promises3.push(this[kClient].close());
131310
131310
  }
131311
- return Promise.all(promises2);
131311
+ return Promise.all(promises3);
131312
131312
  }
131313
131313
  [kDestroy]() {
131314
- const promises2 = [this[kAgent].destroy()];
131314
+ const promises3 = [this[kAgent].destroy()];
131315
131315
  if (this[kClient]) {
131316
- promises2.push(this[kClient].destroy());
131316
+ promises3.push(this[kClient].destroy());
131317
131317
  }
131318
- return Promise.all(promises2);
131318
+ return Promise.all(promises3);
131319
131319
  }
131320
131320
  }
131321
131321
  function buildHeaders(headers) {
@@ -144419,7 +144419,7 @@ __export(exports_node, {
144419
144419
  import os5 from "node:os";
144420
144420
  import fs8 from "node:fs";
144421
144421
  import process22 from "node:process";
144422
- import fs5 from "node:fs";
144422
+ import fs6 from "node:fs";
144423
144423
  import path4 from "node:path";
144424
144424
  import fs32 from "node:fs";
144425
144425
  import path32 from "node:path";
@@ -144429,7 +144429,7 @@ import fs42 from "node:fs";
144429
144429
  import path42 from "node:path";
144430
144430
  import fs52 from "node:fs";
144431
144431
  import path5 from "node:path";
144432
- import fs6 from "node:fs/promises";
144432
+ import fs62 from "node:fs/promises";
144433
144433
  import path6 from "node:path";
144434
144434
  import fs7 from "node:fs/promises";
144435
144435
  import path7 from "node:path";
@@ -144445,12 +144445,12 @@ async function downloadFile(fileName, targetDirectory) {
144445
144445
  if (!targetDirectory.endsWith("/")) {
144446
144446
  targetDirectory += "/";
144447
144447
  }
144448
- fs5.mkdirSync(targetDirectory, { recursive: true });
144448
+ fs6.mkdirSync(targetDirectory, { recursive: true });
144449
144449
  const zipFilePath = path4.join(targetDirectory, `${fileName}.zip`);
144450
144450
  const binaryString = atob(base64Content);
144451
144451
  const bytes = Uint8Array.from(binaryString, (char) => char.charCodeAt(0));
144452
- fs5.writeFileSync(zipFilePath, bytes);
144453
- const zipData = fs5.readFileSync(zipFilePath);
144452
+ fs6.writeFileSync(zipFilePath, bytes);
144453
+ const zipData = fs6.readFileSync(zipFilePath);
144454
144454
  const filesData = [];
144455
144455
  try {
144456
144456
  const zip2 = await import_jszip.default.loadAsync(zipData);
@@ -144458,7 +144458,7 @@ async function downloadFile(fileName, targetDirectory) {
144458
144458
  for (let i2 = 0;i2 < keys2.length; i2++) {
144459
144459
  const fileData = await zip2.files[keys2[i2]].async("nodebuffer");
144460
144460
  const dir = path4.resolve(targetDirectory, keys2[i2]);
144461
- fs5.writeFileSync(dir, fileData);
144461
+ fs6.writeFileSync(dir, fileData);
144462
144462
  log8.info(`File extracted: ${keys2[i2]}`);
144463
144463
  filesData.push(dir);
144464
144464
  }
@@ -144580,7 +144580,7 @@ async function saveScreenshot(filepath, options) {
144580
144580
  await assertDirectoryExists(absoluteFilepath);
144581
144581
  const screenBuffer = this.isBidi ? await takeScreenshotBidi.call(this, filepath, options) : await takeScreenshotClassic.call(this, filepath, options);
144582
144582
  const screenshot = Buffer.from(screenBuffer, "base64");
144583
- await fs6.writeFile(absoluteFilepath, screenshot);
144583
+ await fs62.writeFile(absoluteFilepath, screenshot);
144584
144584
  return screenshot;
144585
144585
  }
144586
144586
  function takeScreenshotClassic(filepath, options) {
@@ -155198,7 +155198,7 @@ var authMessages = {
155198
155198
  linkExpired: "The flow bundle download link has expired. Please run `qawolf flows pull` again to refresh.",
155199
155199
  failedWithStatus: (status) => `Could not download the flow bundle (HTTP ${status}).`,
155200
155200
  networkUnreachable: "Could not reach the flow bundle storage. Check your network connection and try again.",
155201
- timedOut: (timeoutMs) => `Downloading the flow bundle timed out after ${formatSeconds(timeoutMs)}. Please try again.`,
155201
+ timedOut: (timeoutMs) => `Downloading the flow bundle stalled — no data arrived for ${formatSeconds(timeoutMs)}. Please try again.`,
155202
155202
  malformed: "The flow bundle download was malformed. Please run `qawolf flows pull` again."
155203
155203
  }
155204
155204
  },
@@ -155345,6 +155345,7 @@ var flowsMessages = {
155345
155345
  aborted: "Aborted; no changes.",
155346
155346
  extractingBundle: "Extracting bundle",
155347
155347
  downloadingTeamStorageAssets: "Downloading team-storage assets",
155348
+ downloadingTeamStorageAssetsProgress: (current, total) => `Downloading team-storage assets (${String(current)}/${String(total)})`,
155348
155349
  teamStorageRequiresTeamKey: "Team storage requires a team API key; organization keys are not supported here.",
155349
155350
  summary: (result, assetsAbs) => {
155350
155351
  const flows = pluralize(result.flowCount, "flow");
@@ -155639,10 +155640,33 @@ function flushAndExit(code, proc = process, scheduleBackstop = (fn) => {
155639
155640
  }
155640
155641
 
155641
155642
  // src/shell/fs.ts
155643
+ import * as fs2 from "node:fs";
155644
+
155645
+ // src/shell/fsWriteHandle.ts
155642
155646
  import * as fs from "node:fs";
155647
+ async function openFsWriteHandle(path2) {
155648
+ const handle = await fs.promises.open(path2, "w");
155649
+ return {
155650
+ async write(chunk) {
155651
+ let remaining = chunk;
155652
+ while (remaining.length > 0) {
155653
+ const { bytesWritten } = await handle.write(remaining);
155654
+ if (bytesWritten === 0) {
155655
+ throw new Error(`write returned 0 bytes for '${path2}'`);
155656
+ }
155657
+ remaining = remaining.subarray(bytesWritten);
155658
+ }
155659
+ },
155660
+ close() {
155661
+ return handle.close();
155662
+ }
155663
+ };
155664
+ }
155665
+
155666
+ // src/shell/fs.ts
155643
155667
  async function pathExists(p) {
155644
155668
  try {
155645
- await fs.promises.stat(p);
155669
+ await fs2.promises.stat(p);
155646
155670
  return true;
155647
155671
  } catch (err) {
155648
155672
  if (isNoEntError(err))
@@ -155653,66 +155677,67 @@ async function pathExists(p) {
155653
155677
  function makeDefaultFs() {
155654
155678
  return {
155655
155679
  async mkdir(path2, options) {
155656
- await fs.promises.mkdir(path2, options);
155680
+ await fs2.promises.mkdir(path2, options);
155657
155681
  },
155658
155682
  pathExists,
155659
155683
  readFile(path2) {
155660
- return fs.promises.readFile(path2, "utf-8");
155684
+ return fs2.promises.readFile(path2, "utf-8");
155661
155685
  },
155662
155686
  async rm(path2, options) {
155663
- await fs.promises.rm(path2, options);
155687
+ await fs2.promises.rm(path2, options);
155664
155688
  },
155665
155689
  stat(path2) {
155666
- return fs.promises.stat(path2);
155690
+ return fs2.promises.stat(path2);
155667
155691
  },
155668
155692
  async unlink(path2) {
155669
- await fs.promises.unlink(path2);
155693
+ await fs2.promises.unlink(path2);
155670
155694
  },
155671
155695
  async writeFile(path2, data, options) {
155672
155696
  if (typeof data === "string") {
155673
- await fs.promises.writeFile(path2, data, {
155697
+ await fs2.promises.writeFile(path2, data, {
155674
155698
  encoding: "utf8",
155675
155699
  mode: options?.mode
155676
155700
  });
155677
155701
  } else {
155678
- await fs.promises.writeFile(path2, data, options ?? undefined);
155702
+ await fs2.promises.writeFile(path2, data, options ?? undefined);
155679
155703
  }
155680
155704
  },
155705
+ openWriteHandle: openFsWriteHandle,
155681
155706
  readdir(path2) {
155682
- return fs.promises.readdir(path2);
155707
+ return fs2.promises.readdir(path2);
155683
155708
  },
155684
155709
  readdirWithTypes(path2) {
155685
- return fs.promises.readdir(path2, {
155710
+ return fs2.promises.readdir(path2, {
155686
155711
  withFileTypes: true
155687
155712
  });
155688
155713
  },
155689
155714
  rename(oldPath, newPath) {
155690
- return fs.promises.rename(oldPath, newPath);
155715
+ return fs2.promises.rename(oldPath, newPath);
155691
155716
  },
155692
155717
  utimes(path2, atime, mtime) {
155693
- return fs.promises.utimes(path2, atime, mtime);
155718
+ return fs2.promises.utimes(path2, atime, mtime);
155694
155719
  },
155695
155720
  createReadStream(path2) {
155696
- if (!fs.existsSync(path2)) {
155721
+ if (!fs2.existsSync(path2)) {
155697
155722
  const err = Object.assign(new Error(`ENOENT: no such file or directory, open '${path2}'`), { code: "ENOENT", errno: -2 });
155698
155723
  throw err;
155699
155724
  }
155700
- return fs.createReadStream(path2);
155725
+ return fs2.createReadStream(path2);
155701
155726
  },
155702
155727
  async copyFile(source, destination) {
155703
- await fs.promises.copyFile(source, destination);
155728
+ await fs2.promises.copyFile(source, destination);
155704
155729
  },
155705
155730
  existsSync(path2) {
155706
- return fs.existsSync(path2);
155731
+ return fs2.existsSync(path2);
155707
155732
  },
155708
155733
  readFileSync(path2) {
155709
- return fs.readFileSync(path2, "utf-8");
155734
+ return fs2.readFileSync(path2, "utf-8");
155710
155735
  },
155711
155736
  writeFileSync(path2, data) {
155712
- fs.writeFileSync(path2, data, "utf8");
155737
+ fs2.writeFileSync(path2, data, "utf8");
155713
155738
  },
155714
155739
  mkdirSync(path2, options) {
155715
- fs.mkdirSync(path2, options);
155740
+ fs2.mkdirSync(path2, options);
155716
155741
  }
155717
155742
  };
155718
155743
  }
@@ -155747,18 +155772,18 @@ function deleteFromKeychain() {
155747
155772
  return "unavailable";
155748
155773
  }
155749
155774
  }
155750
- async function deleteFromFile(configDir, fs2) {
155775
+ async function deleteFromFile(configDir, fs3) {
155751
155776
  try {
155752
- await fs2.unlink(join2(configDir, credentialsFile));
155777
+ await fs3.unlink(join2(configDir, credentialsFile));
155753
155778
  return "deleted";
155754
155779
  } catch {
155755
155780
  return "not-found";
155756
155781
  }
155757
155782
  }
155758
- async function deleteApiKey(configDir, fs2) {
155783
+ async function deleteApiKey(configDir, fs3) {
155759
155784
  const [keychain, file] = await Promise.all([
155760
155785
  Promise.resolve(deleteFromKeychain()),
155761
- deleteFromFile(configDir, fs2)
155786
+ deleteFromFile(configDir, fs3)
155762
155787
  ]);
155763
155788
  return { keychain, file };
155764
155789
  }
@@ -156536,8 +156561,8 @@ function getElementAtPath(obj, path2) {
156536
156561
  }
156537
156562
  function promiseAllObject(promisesObj) {
156538
156563
  const keys = Object.keys(promisesObj);
156539
- const promises2 = keys.map((key) => promisesObj[key]);
156540
- return Promise.all(promises2).then((results) => {
156564
+ const promises3 = keys.map((key) => promisesObj[key]);
156565
+ return Promise.all(promises3).then((results) => {
156541
156566
  const resolvedObj = {};
156542
156567
  for (let i = 0;i < keys.length; i++) {
156543
156568
  resolvedObj[keys[i]] = results[i];
@@ -170072,30 +170097,30 @@ async function loadApiKey(configDir, deps) {
170072
170097
  // src/domains/auth/store/save.ts
170073
170098
  import { join as join4 } from "node:path";
170074
170099
  import { Entry as Entry2 } from "@napi-rs/keyring";
170075
- async function saveToFile(configDir, key, fs2) {
170100
+ async function saveToFile(configDir, key, fs3) {
170076
170101
  const payload = { apiKey: key };
170077
- await fs2.mkdir(configDir, { recursive: true, mode: 448 });
170078
- await fs2.writeFile(join4(configDir, credentialsFile), JSON.stringify(payload, undefined, 2), { mode: 384 });
170102
+ await fs3.mkdir(configDir, { recursive: true, mode: 448 });
170103
+ await fs3.writeFile(join4(configDir, credentialsFile), JSON.stringify(payload, undefined, 2), { mode: 384 });
170079
170104
  }
170080
- async function saveApiKey(configDir, key, fs2) {
170105
+ async function saveApiKey(configDir, key, fs3) {
170081
170106
  try {
170082
170107
  const entry = new Entry2(service, account);
170083
170108
  entry.setPassword(key);
170084
170109
  return { stored: "keychain" };
170085
170110
  } catch (err) {
170086
- await saveToFile(configDir, key, fs2);
170111
+ await saveToFile(configDir, key, fs3);
170087
170112
  return { stored: "file", keychainError: errorMessage(err) };
170088
170113
  }
170089
170114
  }
170090
170115
  // src/domains/auth/resolve.ts
170091
- function makeDefaultDeps(fs2) {
170116
+ function makeDefaultDeps(fs3) {
170092
170117
  return {
170093
- loadApiKey: (configDir) => loadApiKey(configDir, { EntryClass: Entry3, fs: fs2 }),
170118
+ loadApiKey: (configDir) => loadApiKey(configDir, { EntryClass: Entry3, fs: fs3 }),
170094
170119
  env: process.env
170095
170120
  };
170096
170121
  }
170097
- async function resolveApiKey(configDir, fs2, deps) {
170098
- const resolvedDeps = deps ?? makeDefaultDeps(fs2);
170122
+ async function resolveApiKey(configDir, fs3, deps) {
170123
+ const resolvedDeps = deps ?? makeDefaultDeps(fs3);
170099
170124
  const envKey = resolvedDeps.env["QAWOLF_API_KEY"];
170100
170125
  if (envKey?.trim()) {
170101
170126
  return { key: envKey.trim(), source: "env" };
@@ -170106,8 +170131,8 @@ async function resolveApiKey(configDir, fs2, deps) {
170106
170131
  }
170107
170132
  return;
170108
170133
  }
170109
- async function requireApiKey(configDir, fs2, deps) {
170110
- const result = await resolveApiKey(configDir, fs2, deps);
170134
+ async function requireApiKey(configDir, fs3, deps) {
170135
+ const result = await resolveApiKey(configDir, fs3, deps);
170111
170136
  if (!result) {
170112
170137
  throw new Error("QAWOLF_API_KEY is not set. Set it in your environment, or run 'qawolf auth login'. See 'qawolf doctor'.");
170113
170138
  }
@@ -170298,7 +170323,7 @@ function describeTeamStorageDownloadError(path2, err) {
170298
170323
  return `Could not reach team-storage while downloading ${path2}. Check your network connection and try again.`;
170299
170324
  }
170300
170325
  if (err.kind === "timeout") {
170301
- return `Downloading the team-storage asset ${path2} timed out after ${formatSeconds(err.timeoutMs)}. Please try again.`;
170326
+ return `Downloading the team-storage asset ${path2} stalled — no data arrived for ${formatSeconds(err.timeoutMs)}. Please try again.`;
170302
170327
  }
170303
170328
  return `The team-storage download for ${path2} was malformed. Please run \`qawolf flows pull\` again.`;
170304
170329
  }
@@ -171242,47 +171267,87 @@ import { tmpdir as tmpdir2 } from "node:os";
171242
171267
  import { join as join6 } from "node:path";
171243
171268
 
171244
171269
  // src/shell/platform/fetchSignedUrl.ts
171245
- var timeoutMs = 30000;
171270
+ var defaultStallTimeoutMs = 30000;
171246
171271
  async function fetchSignedUrl(args, deps = { fetch: globalThis.fetch }) {
171247
- let response;
171272
+ const timeoutMs = deps.stallTimeoutMs ?? defaultStallTimeoutMs;
171273
+ const fs3 = deps.fs ?? makeDefaultFs();
171274
+ const partPath = `${args.dest}.part`;
171275
+ const controller = new AbortController;
171276
+ let stallTimer;
171277
+ const armStallTimer = () => {
171278
+ clearTimeout(stallTimer);
171279
+ stallTimer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), timeoutMs);
171280
+ };
171248
171281
  try {
171249
- response = await deps.fetch(args.url, {
171250
- signal: AbortSignal.timeout(timeoutMs)
171251
- });
171252
- } catch (error51) {
171253
- if (isTimeoutError(error51)) {
171254
- return { ok: false, error: { kind: "timeout", timeoutMs } };
171282
+ armStallTimer();
171283
+ let response;
171284
+ try {
171285
+ response = await deps.fetch(args.url, { signal: controller.signal });
171286
+ } catch (error51) {
171287
+ if (isTimeoutError(error51)) {
171288
+ return { ok: false, error: { kind: "timeout", timeoutMs } };
171289
+ }
171290
+ return { ok: false, error: { cause: toError(error51), kind: "network" } };
171255
171291
  }
171256
- return { ok: false, error: { cause: toError(error51), kind: "network" } };
171257
- }
171258
- if (!response.ok) {
171259
- const body = await response.text().catch(() => "");
171260
- return {
171261
- ok: false,
171262
- error: { body, kind: "http", status: response.status }
171263
- };
171264
- }
171265
- if (!response.body) {
171266
- return {
171267
- ok: false,
171268
- error: { cause: new Error("response had no body"), kind: "network" }
171292
+ if (!response.ok) {
171293
+ const body = await response.text().catch(() => "");
171294
+ return {
171295
+ ok: false,
171296
+ error: { body, kind: "http", status: response.status }
171297
+ };
171298
+ }
171299
+ if (!response.body) {
171300
+ return {
171301
+ ok: false,
171302
+ error: { cause: new Error("response had no body"), kind: "network" }
171303
+ };
171304
+ }
171305
+ let handle;
171306
+ try {
171307
+ handle = await fs3.openWriteHandle(partPath);
171308
+ } catch (error51) {
171309
+ controller.abort(toError(error51));
171310
+ return { ok: false, error: { cause: toError(error51), kind: "network" } };
171311
+ }
171312
+ const discardPart = async () => {
171313
+ await handle.close().catch(() => {});
171314
+ await fs3.unlink(partPath).catch(() => {});
171269
171315
  };
171270
- }
171271
- let downloaded;
171272
- try {
171273
- downloaded = await response.arrayBuffer();
171274
- } catch (error51) {
171275
- if (isTimeoutError(error51)) {
171276
- return { ok: false, error: { kind: "timeout", timeoutMs } };
171316
+ const reader = response.body.getReader();
171317
+ for (;; ) {
171318
+ let result;
171319
+ try {
171320
+ result = await reader.read();
171321
+ } catch (error51) {
171322
+ await discardPart();
171323
+ if (isTimeoutError(error51)) {
171324
+ return { ok: false, error: { kind: "timeout", timeoutMs } };
171325
+ }
171326
+ return { ok: false, error: { cause: toError(error51), kind: "network" } };
171327
+ }
171328
+ if (result.done)
171329
+ break;
171330
+ clearTimeout(stallTimer);
171331
+ try {
171332
+ await handle.write(result.value);
171333
+ } catch (error51) {
171334
+ controller.abort(toError(error51));
171335
+ await discardPart();
171336
+ return { ok: false, error: { cause: toError(error51), kind: "network" } };
171337
+ }
171338
+ armStallTimer();
171277
171339
  }
171278
- return { ok: false, error: { cause: toError(error51), kind: "network" } };
171279
- }
171280
- try {
171281
- await (deps.fs ?? makeDefaultFs()).writeFile(args.dest, new Uint8Array(downloaded));
171282
- } catch (error51) {
171283
- return { ok: false, error: { cause: toError(error51), kind: "network" } };
171340
+ try {
171341
+ await handle.close();
171342
+ await fs3.rename(partPath, args.dest);
171343
+ } catch (error51) {
171344
+ await fs3.unlink(partPath).catch(() => {});
171345
+ return { ok: false, error: { cause: toError(error51), kind: "network" } };
171346
+ }
171347
+ return { ok: true, data: undefined };
171348
+ } finally {
171349
+ clearTimeout(stallTimer);
171284
171350
  }
171285
- return { ok: true, data: undefined };
171286
171351
  }
171287
171352
 
171288
171353
  // src/shell/platform/downloadBundle.ts
@@ -172169,18 +172234,18 @@ var makeContractsV1 = (ids) => {
172169
172234
  var publicContractsV1 = makeContractsV1(defaultIdSchemas);
172170
172235
 
172171
172236
  // src/shell/platform/getIdentity.ts
172172
- var timeoutMs2 = 1e4;
172237
+ var timeoutMs = 1e4;
172173
172238
  async function getIdentity(apiKey, deps) {
172174
172239
  const url2 = `${deps.baseUrl}/api/v0/identity`;
172175
172240
  let response;
172176
172241
  try {
172177
172242
  response = await deps.fetch(url2, {
172178
172243
  headers: { Authorization: `Bearer ${apiKey}` },
172179
- signal: AbortSignal.timeout(timeoutMs2)
172244
+ signal: AbortSignal.timeout(timeoutMs)
172180
172245
  });
172181
172246
  } catch (error51) {
172182
172247
  if (isTimeoutError(error51)) {
172183
- return { ok: false, error: { kind: "timeout", timeoutMs: timeoutMs2 } };
172248
+ return { ok: false, error: { kind: "timeout", timeoutMs } };
172184
172249
  }
172185
172250
  return {
172186
172251
  ok: false,
@@ -172199,7 +172264,7 @@ async function getIdentity(apiKey, deps) {
172199
172264
  json2 = await response.json();
172200
172265
  } catch (error51) {
172201
172266
  if (isTimeoutError(error51)) {
172202
- return { ok: false, error: { kind: "timeout", timeoutMs: timeoutMs2 } };
172267
+ return { ok: false, error: { kind: "timeout", timeoutMs } };
172203
172268
  }
172204
172269
  json2 = undefined;
172205
172270
  }
@@ -172262,9 +172327,6 @@ async function listTeamStorageFiles(trpc, args, deps) {
172262
172327
  return { ok: true, value: files };
172263
172328
  }
172264
172329
 
172265
- // src/shell/platform/teamStorageAssets.ts
172266
- import { dirname as dirname3, join as join9 } from "node:path";
172267
-
172268
172330
  // src/shell/platform/teamStorageAssetManifest.ts
172269
172331
  import { dirname as dirname2 } from "node:path";
172270
172332
  var assetManifestSchema = exports_external.object({
@@ -172279,10 +172341,10 @@ var assetManifestSchema = exports_external.object({
172279
172341
  function assetManifestPath(assetsAbs) {
172280
172342
  return `${assetsAbs}.manifest.json`;
172281
172343
  }
172282
- async function readAssetManifest(assetsAbs, fs2) {
172344
+ async function readAssetManifest(assetsAbs, fs3) {
172283
172345
  let raw;
172284
172346
  try {
172285
- raw = await fs2.readFile(assetManifestPath(assetsAbs));
172347
+ raw = await fs3.readFile(assetManifestPath(assetsAbs));
172286
172348
  } catch (err) {
172287
172349
  if (isNoEntError(err))
172288
172350
  return new Map;
@@ -172299,7 +172361,7 @@ async function readAssetManifest(assetsAbs, fs2) {
172299
172361
  return new Map;
172300
172362
  return new Map(result.data.files.map((file2) => [file2.path, file2]));
172301
172363
  }
172302
- async function writeAssetManifest(assetsAbs, files, fs2) {
172364
+ async function writeAssetManifest(assetsAbs, files, fs3) {
172303
172365
  const manifest = {
172304
172366
  version: 1,
172305
172367
  files: files.map((file2) => ({
@@ -172310,8 +172372,8 @@ async function writeAssetManifest(assetsAbs, files, fs2) {
172310
172372
  }))
172311
172373
  };
172312
172374
  const path2 = assetManifestPath(assetsAbs);
172313
- await fs2.mkdir(dirname2(path2), { recursive: true });
172314
- await fs2.writeFile(path2, `${JSON.stringify(manifest, undefined, 2)}
172375
+ await fs3.mkdir(dirname2(path2), { recursive: true });
172376
+ await fs3.writeFile(path2, `${JSON.stringify(manifest, undefined, 2)}
172315
172377
  `);
172316
172378
  }
172317
172379
  function serializeDate(value) {
@@ -172344,19 +172406,19 @@ import { join as join7, sep as sep2 } from "node:path";
172344
172406
  function mintAssetSnapshotPath(assetsAbs, label) {
172345
172407
  return `${assetsAbs}.${label}-${randomBytes2(8).toString("hex")}`;
172346
172408
  }
172347
- async function replaceAssetsDir(assetsAbs, tmpAssets, fs2) {
172409
+ async function replaceAssetsDir(assetsAbs, tmpAssets, fs3) {
172348
172410
  const oldAssets = mintAssetSnapshotPath(assetsAbs, "old");
172349
172411
  let movedOldAssets = false;
172350
172412
  try {
172351
- if (await fs2.pathExists(assetsAbs)) {
172352
- await fs2.rename(assetsAbs, oldAssets);
172413
+ if (await fs3.pathExists(assetsAbs)) {
172414
+ await fs3.rename(assetsAbs, oldAssets);
172353
172415
  movedOldAssets = true;
172354
172416
  }
172355
- await fs2.rename(tmpAssets, assetsAbs);
172417
+ await fs3.rename(tmpAssets, assetsAbs);
172356
172418
  } catch (error51) {
172357
172419
  if (movedOldAssets) {
172358
172420
  try {
172359
- await fs2.rename(oldAssets, assetsAbs);
172421
+ await fs3.rename(oldAssets, assetsAbs);
172360
172422
  } catch (rollbackError) {
172361
172423
  throw new Error(`Failed to replace team-storage assets and rollback also failed; previous assets may remain at ${oldAssets}. Replace error: ${errorMessage(error51)}. Rollback error: ${errorMessage(rollbackError)}`, { cause: rollbackError });
172362
172424
  }
@@ -172364,18 +172426,18 @@ async function replaceAssetsDir(assetsAbs, tmpAssets, fs2) {
172364
172426
  throw error51;
172365
172427
  }
172366
172428
  if (movedOldAssets) {
172367
- await cleanupAssetSnapshot(oldAssets, fs2);
172429
+ await cleanupAssetSnapshot(oldAssets, fs3);
172368
172430
  }
172369
172431
  }
172370
- async function cleanupAssetSnapshot(absPath, fs2) {
172371
- await fs2.rm(absPath, { recursive: true, force: true }).catch(() => {});
172432
+ async function cleanupAssetSnapshot(absPath, fs3) {
172433
+ await fs3.rm(absPath, { recursive: true, force: true }).catch(() => {});
172372
172434
  }
172373
- async function hasExactAssetSnapshot(assetsAbs, filePaths, fs2) {
172435
+ async function hasExactAssetSnapshot(assetsAbs, filePaths, fs3) {
172374
172436
  const expected = expectedEntries(filePaths);
172375
- if (!await fs2.pathExists(assetsAbs))
172437
+ if (!await fs3.pathExists(assetsAbs))
172376
172438
  return expected.size === 0;
172377
172439
  const actual = new Set;
172378
- await collectEntries(assetsAbs, "", actual, fs2);
172440
+ await collectEntries(assetsAbs, "", actual, fs3);
172379
172441
  return setsEqual(actual, expected);
172380
172442
  }
172381
172443
  function expectedEntries(filePaths) {
@@ -172389,13 +172451,13 @@ function expectedEntries(filePaths) {
172389
172451
  }
172390
172452
  return entries;
172391
172453
  }
172392
- async function collectEntries(root, relDir, out, fs2) {
172454
+ async function collectEntries(root, relDir, out, fs3) {
172393
172455
  const current = relDir ? join7(root, relDir) : root;
172394
- for (const entry of await fs2.readdirWithTypes(current)) {
172456
+ for (const entry of await fs3.readdirWithTypes(current)) {
172395
172457
  const relPath = relDir ? join7(relDir, entry.name) : entry.name;
172396
172458
  out.add(relPath);
172397
172459
  if (entry.isDirectory()) {
172398
- await collectEntries(root, relPath, out, fs2);
172460
+ await collectEntries(root, relPath, out, fs3);
172399
172461
  }
172400
172462
  }
172401
172463
  }
@@ -172407,22 +172469,45 @@ function setsEqual(left, right) {
172407
172469
 
172408
172470
  // src/shell/platform/teamStorageAssetReuse.ts
172409
172471
  import { join as join8 } from "node:path";
172410
- async function reusableAssetPaths(assetsAbs, safeFiles, manifest, fs2) {
172472
+ async function reusableAssetPaths(assetsAbs, safeFiles, manifest, fs3) {
172411
172473
  const reusable = new Set;
172412
172474
  for (const { file: file2, relativePath } of safeFiles) {
172413
- if (await canReuseAsset(assetsAbs, relativePath, file2, manifest, fs2)) {
172475
+ if (await canReuseAsset(assetsAbs, relativePath, file2, manifest, fs3)) {
172414
172476
  reusable.add(relativePath);
172415
172477
  }
172416
172478
  }
172417
172479
  return reusable;
172418
172480
  }
172419
- async function canReuseAsset(assetsAbs, relativePath, file2, manifest, fs2) {
172481
+ async function canReuseAsset(assetsAbs, relativePath, file2, manifest, fs3) {
172420
172482
  if (file2.etag === undefined)
172421
172483
  return false;
172422
172484
  const previous = manifest.get(relativePath);
172423
172485
  if (previous?.etag !== file2.etag)
172424
172486
  return false;
172425
- return fs2.pathExists(join8(assetsAbs, relativePath));
172487
+ return fs3.pathExists(join8(assetsAbs, relativePath));
172488
+ }
172489
+
172490
+ // src/shell/platform/writeAssetSnapshot.ts
172491
+ import { dirname as dirname3, join as join9 } from "node:path";
172492
+ async function writeAssetSnapshot(args) {
172493
+ let downloadedCount = 0;
172494
+ const total = args.safeFiles.filter(({ relativePath }) => !args.reusable.has(relativePath)).length;
172495
+ await args.deps.fs.mkdir(args.tmpAssets, { recursive: true });
172496
+ for (const { file: file2, relativePath } of args.safeFiles) {
172497
+ const dest = join9(args.tmpAssets, relativePath);
172498
+ await args.deps.fs.mkdir(dirname3(dest), { recursive: true });
172499
+ if (args.reusable.has(relativePath)) {
172500
+ await args.deps.fs.copyFile(join9(args.assetsAbs, relativePath), dest);
172501
+ continue;
172502
+ }
172503
+ args.deps.onProgress?.({ current: downloadedCount + 1, total });
172504
+ const result = await fetchSignedUrl({ url: file2.signedUrl, dest }, { fetch: args.deps.fetch, fs: args.deps.fs });
172505
+ if (!result.ok) {
172506
+ throw new Error(describeTeamStorageDownloadError(file2.path, result.error));
172507
+ }
172508
+ downloadedCount++;
172509
+ }
172510
+ return downloadedCount;
172426
172511
  }
172427
172512
 
172428
172513
  // src/shell/platform/teamStorageAssets.ts
@@ -172437,9 +172522,9 @@ async function downloadTeamStorageAssets(args, deps = { fetch: globalThis.fetch
172437
172522
  }
172438
172523
  }
172439
172524
  async function writeTeamStorageAssets(args, deps) {
172440
- const fs2 = deps.fs ?? makeDefaultFs();
172525
+ const fs3 = deps.fs ?? makeDefaultFs();
172441
172526
  const tmpAssets = mintAssetSnapshotPath(args.assetsAbs, "pull");
172442
- const manifest = await readAssetManifest(args.assetsAbs, fs2);
172527
+ const manifest = await readAssetManifest(args.assetsAbs, fs3);
172443
172528
  const safeFiles = [];
172444
172529
  for (const file2 of args.files) {
172445
172530
  const relativePath = safeAssetPath(file2.path);
@@ -172447,54 +172532,36 @@ async function writeTeamStorageAssets(args, deps) {
172447
172532
  safeFiles.push({ file: file2, relativePath });
172448
172533
  }
172449
172534
  const skippedCount = args.files.length - safeFiles.length;
172450
- const reusable = await reusableAssetPaths(args.assetsAbs, safeFiles, manifest, fs2);
172535
+ const reusable = await reusableAssetPaths(args.assetsAbs, safeFiles, manifest, fs3);
172451
172536
  const reusedCount = reusable.size;
172452
- if (reusedCount === safeFiles.length && await hasExactAssetSnapshot(args.assetsAbs, safeFiles.map((file2) => file2.relativePath), fs2)) {
172537
+ if (reusedCount === safeFiles.length && await hasExactAssetSnapshot(args.assetsAbs, safeFiles.map((file2) => file2.relativePath), fs3)) {
172453
172538
  return { downloadedCount: 0, reusedCount, skippedCount };
172454
172539
  }
172455
172540
  try {
172456
172541
  const downloadedCount = await writeAssetSnapshot({
172457
172542
  assetsAbs: args.assetsAbs,
172458
- deps: { fetch: deps.fetch, fs: fs2 },
172543
+ deps: { fetch: deps.fetch, fs: fs3, onProgress: deps.onProgress },
172459
172544
  reusable,
172460
172545
  safeFiles,
172461
172546
  tmpAssets
172462
172547
  });
172463
- await replaceAssetsDir(args.assetsAbs, tmpAssets, fs2);
172548
+ await replaceAssetsDir(args.assetsAbs, tmpAssets, fs3);
172464
172549
  await writeAssetManifest(args.assetsAbs, safeFiles.map(({ file: file2, relativePath }) => ({
172465
172550
  ...file2,
172466
172551
  path: relativePath
172467
- })), fs2);
172552
+ })), fs3);
172468
172553
  return { downloadedCount, reusedCount, skippedCount };
172469
172554
  } catch (error51) {
172470
- await cleanupAssetSnapshot(tmpAssets, fs2);
172555
+ await cleanupAssetSnapshot(tmpAssets, fs3);
172471
172556
  throw error51;
172472
172557
  }
172473
172558
  }
172474
- async function writeAssetSnapshot(args) {
172475
- let downloadedCount = 0;
172476
- await args.deps.fs.mkdir(args.tmpAssets, { recursive: true });
172477
- for (const { file: file2, relativePath } of args.safeFiles) {
172478
- const dest = join9(args.tmpAssets, relativePath);
172479
- await args.deps.fs.mkdir(dirname3(dest), { recursive: true });
172480
- if (args.reusable.has(relativePath)) {
172481
- await args.deps.fs.copyFile(join9(args.assetsAbs, relativePath), dest);
172482
- continue;
172483
- }
172484
- const result = await fetchSignedUrl({ url: file2.signedUrl, dest }, { fetch: args.deps.fetch, fs: args.deps.fs });
172485
- if (!result.ok) {
172486
- throw new Error(describeTeamStorageDownloadError(file2.path, result.error));
172487
- }
172488
- downloadedCount++;
172489
- }
172490
- return downloadedCount;
172491
- }
172492
172559
 
172493
172560
  // src/shell/platform/createPlatformClient.ts
172494
172561
  var requestBackoffMs2 = [500, 1500];
172495
172562
  function createPlatformClient(apiKey, deps) {
172496
172563
  const trpc = createTrpcClient(apiKey, deps);
172497
- const fs2 = deps.fs ?? makeDefaultFs();
172564
+ const fs3 = deps.fs ?? makeDefaultFs();
172498
172565
  async function getFlowsBundleUrlImpl(envId) {
172499
172566
  const result = await requestWithRetry({
172500
172567
  call: () => trpc.mutation("gitwolf.getFlowsBundleUrl", { environmentId: envId }, flowsBundleResponseSchema),
@@ -172540,11 +172607,11 @@ function createPlatformClient(apiKey, deps) {
172540
172607
  }
172541
172608
  return listTeamStorageFiles(trpc, { teamId: identity.value.team.id }, deps);
172542
172609
  },
172543
- async syncTeamStorageAssets(assetsAbs) {
172610
+ async syncTeamStorageAssets(assetsAbs, opts) {
172544
172611
  const files = await this.listTeamStorageFiles();
172545
172612
  if (!files.ok)
172546
172613
  return files;
172547
- return downloadTeamStorageAssets({ assetsAbs, files: files.value }, { fetch: deps.fetch, fs: fs2 });
172614
+ return downloadTeamStorageAssets({ assetsAbs, files: files.value }, { fetch: deps.fetch, fs: fs3, onProgress: opts?.onProgress });
172548
172615
  },
172549
172616
  async downloadBundle(envId) {
172550
172617
  const urlResult = await getFlowsBundleUrlImpl(envId);
@@ -172552,7 +172619,7 @@ function createPlatformClient(apiKey, deps) {
172552
172619
  return urlResult;
172553
172620
  return downloadBundle(urlResult.value.signedUrl, {
172554
172621
  fetch: deps.fetch,
172555
- fs: fs2
172622
+ fs: fs3
172556
172623
  });
172557
172624
  }
172558
172625
  };
@@ -174386,8 +174453,9 @@ function createAgentRenderers() {
174386
174453
  const results = [];
174387
174454
  const total = steps.length;
174388
174455
  for (const [i2, step] of steps.entries()) {
174389
- writeStderrLine(`[${String(i2 + 1)}/${String(total)}] ${step.message}`);
174390
- results.push(await step.task());
174456
+ const label = (message) => `[${String(i2 + 1)}/${String(total)}] ${message}`;
174457
+ writeStderrLine(label(step.message));
174458
+ results.push(await step.task((message) => writeStderrLine(label(message))));
174391
174459
  }
174392
174460
  const { typed, doneMessage } = finalizeResults(results, done);
174393
174461
  writeStderrLine(doneMessage);
@@ -174424,9 +174492,13 @@ ${body}` : ""));
174424
174492
  let currentLabel2 = "";
174425
174493
  try {
174426
174494
  for (const [i2, step] of steps.entries()) {
174427
- currentLabel2 = `[${String(i2 + 1)}/${String(total)}] ${step.message}`;
174495
+ const label = (message) => `[${String(i2 + 1)}/${String(total)}] ${message}`;
174496
+ currentLabel2 = label(step.message);
174428
174497
  clack.log.step(currentLabel2);
174429
- results.push(await step.task());
174498
+ results.push(await step.task((message) => {
174499
+ currentLabel2 = label(message);
174500
+ clack.log.step(currentLabel2);
174501
+ }));
174430
174502
  }
174431
174503
  const { typed, doneMessage } = finalizeResults(results, done);
174432
174504
  clack.log.success(doneMessage);
@@ -174440,13 +174512,17 @@ ${body}` : ""));
174440
174512
  let currentLabel = "";
174441
174513
  try {
174442
174514
  for (const [i2, step] of steps.entries()) {
174443
- currentLabel = `[${String(i2 + 1)}/${String(total)}] ${step.message}`;
174515
+ const label = (message) => `[${String(i2 + 1)}/${String(total)}] ${message}`;
174516
+ currentLabel = label(step.message);
174444
174517
  if (i2 === 0) {
174445
174518
  s.start(currentLabel);
174446
174519
  } else {
174447
174520
  s.message(currentLabel);
174448
174521
  }
174449
- results.push(await step.task());
174522
+ results.push(await step.task((message) => {
174523
+ currentLabel = label(message);
174524
+ s.message(currentLabel);
174525
+ }));
174450
174526
  }
174451
174527
  const { typed, doneMessage } = finalizeResults(results, done);
174452
174528
  s.stop(doneMessage);
@@ -174491,7 +174567,7 @@ function createJsonRenderers() {
174491
174567
  step: i2 + 1,
174492
174568
  total
174493
174569
  });
174494
- results.push(await step.task());
174570
+ results.push(await step.task(() => {}));
174495
174571
  }
174496
174572
  const { typed, doneMessage } = finalizeResults(results, done);
174497
174573
  writeJsonDiagnostic({ type: "success", message: doneMessage });
@@ -174578,12 +174654,12 @@ function createVerboseContext(outputMode, isVerbose) {
174578
174654
 
174579
174655
  // src/shell/npmRegistry.ts
174580
174656
  var registryUrl = "https://registry.npmjs.org";
174581
- var timeoutMs3 = 3000;
174657
+ var timeoutMs2 = 3000;
174582
174658
  async function fetchLatestVersion(packageName, deps = {}) {
174583
174659
  const fetchFn = deps.fetchFn ?? globalThis.fetch;
174584
174660
  try {
174585
174661
  const response = await fetchFn(`${registryUrl}/${packageName}/latest`, {
174586
- signal: AbortSignal.timeout(timeoutMs3)
174662
+ signal: AbortSignal.timeout(timeoutMs2)
174587
174663
  });
174588
174664
  if (!response.ok)
174589
174665
  return;
@@ -174666,7 +174742,7 @@ function startUpdateCheck(deps) {
174666
174742
  // package.json
174667
174743
  var package_default = {
174668
174744
  name: "@qawolf/cli",
174669
- version: "1.7.4",
174745
+ version: "1.7.5",
174670
174746
  description: "Run and manage QA Wolf flows from the terminal, CI, or an AI agent",
174671
174747
  keywords: [
174672
174748
  "automation",
@@ -174781,7 +174857,7 @@ function buildBaseContext(command, signals) {
174781
174857
  ...verboseWrite ? { verboseWrite } : {}
174782
174858
  });
174783
174859
  const apiBaseUrl = resolveHostUrl(env2);
174784
- const fs2 = makeDefaultFs();
174860
+ const fs3 = makeDefaultFs();
174785
174861
  const ui = createUI(outputMode, {
174786
174862
  clack,
174787
174863
  ...verboseTarget ? { verboseTarget } : {}
@@ -174790,7 +174866,7 @@ function buildBaseContext(command, signals) {
174790
174866
  env: env2,
174791
174867
  currentVersion: package_default.version,
174792
174868
  configDir: getConfigDir(),
174793
- fs: fs2,
174869
+ fs: fs3,
174794
174870
  fetchLatestVersion: () => fetchLatestVersion(package_default.name),
174795
174871
  renderNotice: (body, title) => ui.note(body, title)
174796
174872
  });
@@ -174806,7 +174882,7 @@ function buildBaseContext(command, signals) {
174806
174882
  apiBaseUrl,
174807
174883
  signals,
174808
174884
  log: (scope) => loggingSystem.createLogger(scope),
174809
- fs: fs2
174885
+ fs: fs3
174810
174886
  },
174811
174887
  apiBaseUrl,
174812
174888
  loggingSystem,
@@ -175291,12 +175367,12 @@ async function checkApiKey(deps) {
175291
175367
 
175292
175368
  // src/domains/doctor/checks/apiUrl.ts
175293
175369
  async function checkApiUrl(deps) {
175294
- const timeoutMs4 = deps.timeoutMs ?? 5000;
175370
+ const timeoutMs3 = deps.timeoutMs ?? 5000;
175295
175371
  let response;
175296
175372
  try {
175297
175373
  response = await deps.fetch(deps.apiBaseUrl, {
175298
175374
  method: "HEAD",
175299
- signal: AbortSignal.timeout(timeoutMs4)
175375
+ signal: AbortSignal.timeout(timeoutMs3)
175300
175376
  });
175301
175377
  } catch (error51) {
175302
175378
  return {
@@ -175610,10 +175686,10 @@ function renderResults(ui, results) {
175610
175686
 
175611
175687
  // src/domains/flows/ensureDeps.ts
175612
175688
  import { dirname as dirname4, join as join14 } from "node:path";
175613
- function findEnvDir(flowPath, fs2) {
175689
+ function findEnvDir(flowPath, fs3) {
175614
175690
  let dir = dirname4(flowPath);
175615
175691
  while (true) {
175616
- if (fs2.existsSync(join14(dir, "package.json")))
175692
+ if (fs3.existsSync(join14(dir, "package.json")))
175617
175693
  return dir;
175618
175694
  const parent = dirname4(dir);
175619
175695
  if (parent === dir)
@@ -175621,8 +175697,8 @@ function findEnvDir(flowPath, fs2) {
175621
175697
  dir = parent;
175622
175698
  }
175623
175699
  }
175624
- function resolveUniqueEnvDir(files, fs2) {
175625
- const dirs = new Set(files.map((f2) => findEnvDir(f2, fs2)).filter((d) => d !== undefined));
175700
+ function resolveUniqueEnvDir(files, fs3) {
175701
+ const dirs = new Set(files.map((f2) => findEnvDir(f2, fs3)).filter((d) => d !== undefined));
175626
175702
  if (dirs.size > 1) {
175627
175703
  const listed = [...dirs].map((d) => ` - ${d}`).join(`
175628
175704
  `);
@@ -175630,9 +175706,9 @@ function resolveUniqueEnvDir(files, fs2) {
175630
175706
  }
175631
175707
  return dirs.size === 1 ? [...dirs][0] : undefined;
175632
175708
  }
175633
- function resolveProjectDirSafe(files, fs2) {
175709
+ function resolveProjectDirSafe(files, fs3) {
175634
175710
  try {
175635
- return resolveUniqueEnvDir(files, fs2);
175711
+ return resolveUniqueEnvDir(files, fs3);
175636
175712
  } catch {
175637
175713
  return;
175638
175714
  }
@@ -175775,12 +175851,12 @@ function build$3(options) {
175775
175851
  return options.group ? groupFiles : empty;
175776
175852
  }
175777
175853
  var resolveSymlinksAsync = function(path2, state, callback$1) {
175778
- const { queue, fs: fs2, options: { suppressErrors } } = state;
175854
+ const { queue, fs: fs3, options: { suppressErrors } } = state;
175779
175855
  queue.enqueue();
175780
- fs2.realpath(path2, (error51, resolvedPath) => {
175856
+ fs3.realpath(path2, (error51, resolvedPath) => {
175781
175857
  if (error51)
175782
175858
  return queue.dequeue(suppressErrors ? null : error51, state);
175783
- fs2.stat(resolvedPath, (error$1, stat) => {
175859
+ fs3.stat(resolvedPath, (error$1, stat) => {
175784
175860
  if (error$1)
175785
175861
  return queue.dequeue(suppressErrors ? null : error$1, state);
175786
175862
  if (stat.isDirectory() && isRecursive(path2, resolvedPath, state))
@@ -175791,11 +175867,11 @@ var resolveSymlinksAsync = function(path2, state, callback$1) {
175791
175867
  });
175792
175868
  };
175793
175869
  var resolveSymlinks = function(path2, state, callback$1) {
175794
- const { queue, fs: fs2, options: { suppressErrors } } = state;
175870
+ const { queue, fs: fs3, options: { suppressErrors } } = state;
175795
175871
  queue.enqueue();
175796
175872
  try {
175797
- const resolvedPath = fs2.realpathSync(path2);
175798
- const stat = fs2.statSync(resolvedPath);
175873
+ const resolvedPath = fs3.realpathSync(path2);
175874
+ const stat = fs3.statSync(resolvedPath);
175799
175875
  if (stat.isDirectory() && isRecursive(path2, resolvedPath, state))
175800
175876
  return;
175801
175877
  callback$1(stat, resolvedPath);
@@ -175878,23 +175954,23 @@ var walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
175878
175954
  state.queue.enqueue();
175879
175955
  if (currentDepth < 0)
175880
175956
  return state.queue.dequeue(null, state);
175881
- const { fs: fs2 } = state;
175957
+ const { fs: fs3 } = state;
175882
175958
  state.visited.push(crawlPath);
175883
175959
  state.counts.directories++;
175884
- fs2.readdir(crawlPath || ".", readdirOpts, (error51, entries = []) => {
175960
+ fs3.readdir(crawlPath || ".", readdirOpts, (error51, entries = []) => {
175885
175961
  callback$1(entries, directoryPath, currentDepth);
175886
175962
  state.queue.dequeue(state.options.suppressErrors ? null : error51, state);
175887
175963
  });
175888
175964
  };
175889
175965
  var walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
175890
- const { fs: fs2 } = state;
175966
+ const { fs: fs3 } = state;
175891
175967
  if (currentDepth < 0)
175892
175968
  return;
175893
175969
  state.visited.push(crawlPath);
175894
175970
  state.counts.directories++;
175895
175971
  let entries = [];
175896
175972
  try {
175897
- entries = fs2.readdirSync(crawlPath || ".", readdirOpts);
175973
+ entries = fs3.readdirSync(crawlPath || ".", readdirOpts);
175898
175974
  } catch (e) {
175899
175975
  if (!state.options.suppressErrors)
175900
175976
  throw e;
@@ -176523,25 +176599,25 @@ function extractFlowMeta(source) {
176523
176599
  }
176524
176600
 
176525
176601
  // src/domains/flows/expand.ts
176526
- function makePeekFlowMeta(fs2) {
176602
+ function makePeekFlowMeta(fs3) {
176527
176603
  return async (filePath) => {
176528
- const source = await fs2.readFile(filePath);
176604
+ const source = await fs3.readFile(filePath);
176529
176605
  return extractFlowMeta(source);
176530
176606
  };
176531
176607
  }
176532
- async function resolveGlobRoots(cwd, fs2) {
176608
+ async function resolveGlobRoots(cwd, fs3) {
176533
176609
  const qawolfPath = join15(cwd, ".qawolf");
176534
176610
  let envDirs = [];
176535
176611
  try {
176536
- const entries = await fs2.readdirWithTypes(qawolfPath);
176612
+ const entries = await fs3.readdirWithTypes(qawolfPath);
176537
176613
  envDirs = entries.filter((e) => e.isDirectory()).map((e) => join15(qawolfPath, e.name));
176538
176614
  } catch {}
176539
176615
  return [cwd, ...envDirs];
176540
176616
  }
176541
- async function expandPatterns(patterns, cwd, logger, fs2) {
176617
+ async function expandPatterns(patterns, cwd, logger, fs3) {
176542
176618
  logger?.debug(`expandPatterns: ${patterns.join(", ")}`);
176543
176619
  const effectivePatterns = patterns.length > 0 ? patterns : ["**/*.flow.{ts,js}"];
176544
- const roots = await resolveGlobRoots(cwd, fs2);
176620
+ const roots = await resolveGlobRoots(cwd, fs3);
176545
176621
  const seen = new Set;
176546
176622
  for (const root of roots) {
176547
176623
  const matches = await glob(effectivePatterns, {
@@ -176604,40 +176680,40 @@ function runStagingRoot() {
176604
176680
  function managedEnvDir() {
176605
176681
  return join16(managedEnvBaseDir(), managedEnvHash());
176606
176682
  }
176607
- async function scaffoldManagedEnv(dir, fs2) {
176608
- await fs2.mkdir(dir, { recursive: true });
176683
+ async function scaffoldManagedEnv(dir, fs3) {
176684
+ await fs3.mkdir(dir, { recursive: true });
176609
176685
  const dependencies = Object.fromEntries(pinnedPackages.map(({ name, version: version2 }) => [name, version2]));
176610
- await fs2.writeFile(join16(dir, "package.json"), JSON.stringify({ name: "qawolf-runtime", private: true, dependencies }, undefined, 2));
176611
- await fs2.writeFile(join16(dir, ".npmrc"), `@qawolf:registry=https://registry.npmjs.org/
176686
+ await fs3.writeFile(join16(dir, "package.json"), JSON.stringify({ name: "qawolf-runtime", private: true, dependencies }, undefined, 2));
176687
+ await fs3.writeFile(join16(dir, ".npmrc"), `@qawolf:registry=https://registry.npmjs.org/
176612
176688
  `);
176613
176689
  }
176614
176690
 
176615
176691
  // src/domains/runtimeEnv/clearRuntimeEnv.ts
176616
176692
  var runtimeSentinel = "qawolf-runtime";
176617
- async function clearRuntimeEnv(fs2) {
176693
+ async function clearRuntimeEnv(fs3) {
176618
176694
  const dir = managedEnvBaseDir();
176619
- const existed = await fs2.pathExists(dir);
176695
+ const existed = await fs3.pathExists(dir);
176620
176696
  if (!existed)
176621
176697
  return { dir, existed };
176622
- if (!await isManagedRuntimeBase(dir, fs2)) {
176698
+ if (!await isManagedRuntimeBase(dir, fs3)) {
176623
176699
  throw new Error(`Refusing to delete ${dir}: it does not look like a QA Wolf managed ` + `runtime directory (expected only ${runtimeSentinel} hash dirs). ` + `Check your QAWOLF_RUNTIME_DIR override.`);
176624
176700
  }
176625
- await fs2.rm(dir, { recursive: true, force: true });
176701
+ await fs3.rm(dir, { recursive: true, force: true });
176626
176702
  return { dir, existed };
176627
176703
  }
176628
- async function isManagedRuntimeBase(dir, fs2) {
176629
- const entries = await fs2.readdirWithTypes(dir);
176704
+ async function isManagedRuntimeBase(dir, fs3) {
176705
+ const entries = await fs3.readdirWithTypes(dir);
176630
176706
  for (const entry of entries) {
176631
176707
  if (!entry.isDirectory())
176632
176708
  return false;
176633
- if (!await hasRuntimeSentinel(join17(dir, entry.name), fs2))
176709
+ if (!await hasRuntimeSentinel(join17(dir, entry.name), fs3))
176634
176710
  return false;
176635
176711
  }
176636
176712
  return true;
176637
176713
  }
176638
- async function hasRuntimeSentinel(hashDir, fs2) {
176714
+ async function hasRuntimeSentinel(hashDir, fs3) {
176639
176715
  try {
176640
- const pkg = JSON.parse(await fs2.readFile(join17(hashDir, "package.json")));
176716
+ const pkg = JSON.parse(await fs3.readFile(join17(hashDir, "package.json")));
176641
176717
  return pkg.name === runtimeSentinel;
176642
176718
  } catch {
176643
176719
  return false;
@@ -176712,10 +176788,10 @@ function spawnNpmInstall(cwd, spawn2 = spawn) {
176712
176788
 
176713
176789
  // src/domains/runtimeEnv/resolvePinned.ts
176714
176790
  import { join as join18 } from "node:path";
176715
- function readInstalledVersion(dir, pkgName, fs2) {
176791
+ function readInstalledVersion(dir, pkgName, fs3) {
176716
176792
  try {
176717
176793
  const pkgPath = join18(dir, "node_modules", ...pkgName.split("/"), "package.json");
176718
- const raw = JSON.parse(fs2.readFileSync(pkgPath));
176794
+ const raw = JSON.parse(fs3.readFileSync(pkgPath));
176719
176795
  const { version: version2 } = raw;
176720
176796
  return typeof version2 === "string" ? version2 : undefined;
176721
176797
  } catch {
@@ -176736,16 +176812,16 @@ var shims = [
176736
176812
  candidates: appiumCliCandidates
176737
176813
  }
176738
176814
  ];
176739
- function pinnedResolutionFailures(dir, fs2, platform) {
176815
+ function pinnedResolutionFailures(dir, fs3, platform) {
176740
176816
  const failures = [];
176741
176817
  for (const { name, version: version2 } of pinnedPackages) {
176742
- const installed = readInstalledVersion(dir, name, fs2);
176818
+ const installed = readInstalledVersion(dir, name, fs3);
176743
176819
  if (installed !== version2) {
176744
176820
  failures.push({ kind: "package", name, pinned: version2, installed });
176745
176821
  }
176746
176822
  }
176747
176823
  for (const { name, display, candidates } of shims) {
176748
- if (!candidates(dir, platform).some((p2) => fs2.existsSync(p2))) {
176824
+ if (!candidates(dir, platform).some((p2) => fs3.existsSync(p2))) {
176749
176825
  failures.push({ kind: "shim", name, display });
176750
176826
  }
176751
176827
  }
@@ -176757,8 +176833,8 @@ function describePinnedFailure(failure) {
176757
176833
  }
176758
176834
  return failure.installed === undefined ? `${failure.name} (missing, pinned ${failure.pinned})` : `${failure.name} ${failure.installed} (pinned ${failure.pinned})`;
176759
176835
  }
176760
- function allPinnedResolved(dir, fs2, platform) {
176761
- return pinnedResolutionFailures(dir, fs2, platform).length === 0;
176836
+ function allPinnedResolved(dir, fs3, platform) {
176837
+ return pinnedResolutionFailures(dir, fs3, platform).length === 0;
176762
176838
  }
176763
176839
 
176764
176840
  // src/domains/runtimeEnv/shimDeps.ts
@@ -176790,7 +176866,7 @@ function normalizeExports(exports) {
176790
176866
  }
176791
176867
  return;
176792
176868
  }
176793
- function resolveFromEnvDir(envDir, specifier, preference = "esm", fs2 = makeDefaultFs()) {
176869
+ function resolveFromEnvDir(envDir, specifier, preference = "esm", fs3 = makeDefaultFs()) {
176794
176870
  const isScoped = specifier.startsWith("@");
176795
176871
  const parts = specifier.split("/");
176796
176872
  const pkgPartCount = isScoped ? 2 : 1;
@@ -176800,7 +176876,7 @@ function resolveFromEnvDir(envDir, specifier, preference = "esm", fs2 = makeDefa
176800
176876
  const pkgDir = join19(envDir, "node_modules", ...pkgName.split("/"));
176801
176877
  let pkg;
176802
176878
  try {
176803
- pkg = JSON.parse(fs2.readFileSync(join19(pkgDir, "package.json")));
176879
+ pkg = JSON.parse(fs3.readFileSync(join19(pkgDir, "package.json")));
176804
176880
  } catch (err) {
176805
176881
  if (isNoEntError(err))
176806
176882
  throw new Error(`Package '${pkgName}' not found in ${join19(envDir, "node_modules")}`, { cause: err });
@@ -176816,9 +176892,9 @@ function resolveFromEnvDir(envDir, specifier, preference = "esm", fs2 = makeDefa
176816
176892
  }
176817
176893
 
176818
176894
  // src/domains/runtimeEnv/shimDeps.ts
176819
- function readShimMarker(shimDir, fs2) {
176895
+ function readShimMarker(shimDir, fs3) {
176820
176896
  try {
176821
- const pkg = JSON.parse(fs2.readFileSync(join20(shimDir, "package.json")));
176897
+ const pkg = JSON.parse(fs3.readFileSync(join20(shimDir, "package.json")));
176822
176898
  if (pkg._qawolf_format) {
176823
176899
  return {
176824
176900
  _qawolf_version: pkg._qawolf_version ?? "",
@@ -176833,42 +176909,42 @@ function resolveBunBuild(bunBuild) {
176833
176909
  return globalThis.Bun;
176834
176910
  return bunBuild === false ? undefined : { build: bunBuild };
176835
176911
  }
176836
- async function removeStaleShims(flowsDir, flowsDeps, fs2) {
176912
+ async function removeStaleShims(flowsDir, flowsDeps, fs3) {
176837
176913
  const shimsDir = join20(flowsDir, "node_modules");
176838
- if (!fs2.existsSync(shimsDir))
176914
+ if (!fs3.existsSync(shimsDir))
176839
176915
  return;
176840
176916
  for (const dep of flowsDeps) {
176841
176917
  const shimDepDir = join20(shimsDir, ...dep.split("/"));
176842
- if (readShimMarker(shimDepDir, fs2)) {
176843
- await fs2.rm(shimDepDir, { recursive: true, force: true });
176918
+ if (readShimMarker(shimDepDir, fs3)) {
176919
+ await fs3.rm(shimDepDir, { recursive: true, force: true });
176844
176920
  }
176845
176921
  }
176846
176922
  }
176847
176923
  async function buildDepShim(args) {
176848
- const { envDir, flowsDir, dep, fs: fs2, build: build2 } = args;
176924
+ const { envDir, flowsDir, dep, fs: fs3, build: build2 } = args;
176849
176925
  const depParts = dep.split("/");
176850
176926
  const depDir = join20(envDir, "node_modules", ...depParts);
176851
- if (!fs2.existsSync(depDir))
176927
+ if (!fs3.existsSync(depDir))
176852
176928
  return;
176853
176929
  let depVersion;
176854
176930
  try {
176855
- const pkg = JSON.parse(fs2.readFileSync(join20(depDir, "package.json")));
176931
+ const pkg = JSON.parse(fs3.readFileSync(join20(depDir, "package.json")));
176856
176932
  depVersion = pkg.version ?? "unknown";
176857
176933
  } catch {
176858
176934
  depVersion = "unknown";
176859
176935
  }
176860
176936
  const shimDir = join20(flowsDir, "node_modules", ...depParts);
176861
- if (fs2.existsSync(shimDir)) {
176862
- const marker = readShimMarker(shimDir, fs2);
176937
+ if (fs3.existsSync(shimDir)) {
176938
+ const marker = readShimMarker(shimDir, fs3);
176863
176939
  if (!marker)
176864
176940
  return;
176865
176941
  if (marker._qawolf_version === depVersion && marker._qawolf_format === "bun-build-v1")
176866
176942
  return;
176867
- await fs2.rm(shimDir, { recursive: true, force: true });
176943
+ await fs3.rm(shimDir, { recursive: true, force: true });
176868
176944
  }
176869
176945
  let entry;
176870
176946
  try {
176871
- entry = resolveFromEnvDir(envDir, dep, "cjs", fs2);
176947
+ entry = resolveFromEnvDir(envDir, dep, "cjs", fs3);
176872
176948
  } catch {
176873
176949
  return;
176874
176950
  }
@@ -176883,32 +176959,32 @@ async function buildDepShim(args) {
176883
176959
  throw new Error(`bun.build failed to shim ${dep}: ${logs}`);
176884
176960
  }
176885
176961
  const shimCode = await output.text();
176886
- await fs2.mkdir(shimDir, { recursive: true });
176887
- await fs2.writeFile(join20(shimDir, "package.json"), JSON.stringify({
176962
+ await fs3.mkdir(shimDir, { recursive: true });
176963
+ await fs3.writeFile(join20(shimDir, "package.json"), JSON.stringify({
176888
176964
  name: dep,
176889
176965
  _qawolf_version: depVersion,
176890
176966
  _qawolf_format: "bun-build-v1"
176891
176967
  }));
176892
- await fs2.writeFile(join20(shimDir, "index.js"), shimCode);
176968
+ await fs3.writeFile(join20(shimDir, "index.js"), shimCode);
176893
176969
  }
176894
- async function shimFlowsDeps(envDir, fs2 = makeDefaultFs(), bunBuild) {
176970
+ async function shimFlowsDeps(envDir, fs3 = makeDefaultFs(), bunBuild) {
176895
176971
  const flowsDir = join20(envDir, "node_modules", "@qawolf", "flows");
176896
- if (!fs2.existsSync(flowsDir))
176972
+ if (!fs3.existsSync(flowsDir))
176897
176973
  return;
176898
176974
  let flowsDeps;
176899
176975
  try {
176900
- const flowsPkg = JSON.parse(fs2.readFileSync(join20(flowsDir, "package.json")));
176976
+ const flowsPkg = JSON.parse(fs3.readFileSync(join20(flowsDir, "package.json")));
176901
176977
  flowsDeps = Object.keys(flowsPkg.dependencies ?? {});
176902
176978
  } catch {
176903
176979
  return;
176904
176980
  }
176905
176981
  const bun = resolveBunBuild(bunBuild);
176906
176982
  if (!bun) {
176907
- await removeStaleShims(flowsDir, flowsDeps, fs2);
176983
+ await removeStaleShims(flowsDir, flowsDeps, fs3);
176908
176984
  return;
176909
176985
  }
176910
176986
  for (const dep of flowsDeps) {
176911
- await buildDepShim({ envDir, flowsDir, dep, fs: fs2, build: bun.build });
176987
+ await buildDepShim({ envDir, flowsDir, dep, fs: fs3, build: bun.build });
176912
176988
  }
176913
176989
  }
176914
176990
 
@@ -176941,15 +177017,15 @@ async function installPinned(targetDir, deps) {
176941
177017
 
176942
177018
  // src/domains/runtimeEnv/ensureRuntimeEnv.ts
176943
177019
  async function ensureRuntimeEnv(args, deps = {}) {
176944
- const fs2 = deps.fs ?? makeDefaultFs();
177020
+ const fs3 = deps.fs ?? makeDefaultFs();
176945
177021
  const resolveManagedDir = deps.resolveManagedDir ?? managedEnvDir;
176946
177022
  const install = deps.install ?? ((t2) => installPinned(t2, {
176947
- fs: fs2,
177023
+ fs: fs3,
176948
177024
  spawnInstall: defaultSpawnInstall,
176949
177025
  platform: args.platform
176950
177026
  }));
176951
177027
  if (args.overrideDir !== undefined) {
176952
- const failures = pinnedResolutionFailures(args.overrideDir, fs2, args.platform);
177028
+ const failures = pinnedResolutionFailures(args.overrideDir, fs3, args.platform);
176953
177029
  if (failures.length === 0) {
176954
177030
  return {
176955
177031
  depsRoot: args.overrideDir,
@@ -176959,27 +177035,27 @@ async function ensureRuntimeEnv(args, deps = {}) {
176959
177035
  }
176960
177036
  throw new Error(runnerMessages.depsDirIncomplete(args.overrideDir, failures.map(describePinnedFailure)));
176961
177037
  }
176962
- if (args.projectDir !== undefined && allPinnedResolved(args.projectDir, fs2, args.platform)) {
177038
+ if (args.projectDir !== undefined && allPinnedResolved(args.projectDir, fs3, args.platform)) {
176963
177039
  return { depsRoot: args.projectDir, source: "project", installed: false };
176964
177040
  }
176965
177041
  const managed = resolveManagedDir();
176966
- if (allPinnedResolved(managed, fs2, args.platform)) {
177042
+ if (allPinnedResolved(managed, fs3, args.platform)) {
176967
177043
  return { depsRoot: managed, source: "managed", installed: false };
176968
177044
  }
176969
177045
  await install(managed);
176970
- if (!allPinnedResolved(managed, fs2, args.platform)) {
177046
+ if (!allPinnedResolved(managed, fs3, args.platform)) {
176971
177047
  throw new Error(`Managed runtime is incomplete after install at ${managed}.`);
176972
177048
  }
176973
177049
  return { depsRoot: managed, source: "managed", installed: true };
176974
177050
  }
176975
177051
  // src/domains/runtimeEnv/resolveDepsRootIfPresent.ts
176976
- function resolveDepsRootIfPresent(args, fs2 = makeDefaultFs()) {
176977
- if (args.overrideDir !== undefined && allPinnedResolved(args.overrideDir, fs2, args.platform))
177052
+ function resolveDepsRootIfPresent(args, fs3 = makeDefaultFs()) {
177053
+ if (args.overrideDir !== undefined && allPinnedResolved(args.overrideDir, fs3, args.platform))
176978
177054
  return args.overrideDir;
176979
- if (args.projectDir !== undefined && allPinnedResolved(args.projectDir, fs2, args.platform))
177055
+ if (args.projectDir !== undefined && allPinnedResolved(args.projectDir, fs3, args.platform))
176980
177056
  return args.projectDir;
176981
177057
  const managed = managedEnvDir();
176982
- if (allPinnedResolved(managed, fs2, args.platform))
177058
+ if (allPinnedResolved(managed, fs3, args.platform))
176983
177059
  return managed;
176984
177060
  return;
176985
177061
  }
@@ -177001,16 +177077,16 @@ async function collectRequiredAvds(files, peekFlowMeta) {
177001
177077
  return [...seen];
177002
177078
  }
177003
177079
  async function handleDoctor(ctx, opts) {
177004
- const { fs: fs2 } = ctx;
177080
+ const { fs: fs3 } = ctx;
177005
177081
  const cwd = process.cwd();
177006
- const flowFiles = await expandPatterns([], cwd, undefined, fs2);
177007
- const projectDir = resolveProjectDirSafe([...flowFiles], fs2);
177082
+ const flowFiles = await expandPatterns([], cwd, undefined, fs3);
177083
+ const projectDir = resolveProjectDirSafe([...flowFiles], fs3);
177008
177084
  const envDir = resolveDepsRootIfPresent({
177009
177085
  platform: process.platform,
177010
177086
  ...projectDir !== undefined ? { projectDir } : {}
177011
- }, fs2);
177012
- const resolved = await resolveApiKey(ctx.configDir, fs2);
177013
- const requiredAvds = await collectRequiredAvds(flowFiles, makePeekFlowMeta(fs2));
177087
+ }, fs3);
177088
+ const resolved = await resolveApiKey(ctx.configDir, fs3);
177089
+ const requiredAvds = await collectRequiredAvds(flowFiles, makePeekFlowMeta(fs3));
177014
177090
  const runAndroidChecks = opts.all || requiredAvds.length > 0;
177015
177091
  const cliCheck = {
177016
177092
  name: "qawolf",
@@ -177114,11 +177190,11 @@ async function flowsList(ctx, pattern, deps) {
177114
177190
  ctx.ui.outro(flowsMessages.flowCount(items.length));
177115
177191
  }
177116
177192
  function handleFlowsList(ctx, pattern) {
177117
- const { fs: fs2 } = ctx;
177193
+ const { fs: fs3 } = ctx;
177118
177194
  return flowsList(ctx, pattern, {
177119
177195
  cwd: process.cwd(),
177120
- expandPatterns: (patterns, cwd) => expandPatterns(patterns, cwd, undefined, fs2),
177121
- peekFlowMeta: makePeekFlowMeta(fs2)
177196
+ expandPatterns: (patterns, cwd) => expandPatterns(patterns, cwd, undefined, fs3),
177197
+ peekFlowMeta: makePeekFlowMeta(fs3)
177122
177198
  });
177123
177199
  }
177124
177200
 
@@ -177183,10 +177259,10 @@ var manifestSchema = exports_external.object({
177183
177259
  qawolfCommittedAt: exports_external.string().optional(),
177184
177260
  flows: exports_external.array(flowEntrySchema)
177185
177261
  });
177186
- async function readManifest(envDir, fs2 = makeDefaultFs()) {
177262
+ async function readManifest(envDir, fs3 = makeDefaultFs()) {
177187
177263
  let raw;
177188
177264
  try {
177189
- raw = await fs2.readFile(join21(envDir, manifestFilename));
177265
+ raw = await fs3.readFile(join21(envDir, manifestFilename));
177190
177266
  } catch (err) {
177191
177267
  if (isNoEntError(err))
177192
177268
  return "missing";
@@ -177212,15 +177288,15 @@ async function readManifest(envDir, fs2 = makeDefaultFs()) {
177212
177288
  flows: result.data.flows
177213
177289
  };
177214
177290
  }
177215
- async function writeManifest(envDir, manifest, fs2 = makeDefaultFs()) {
177291
+ async function writeManifest(envDir, manifest, fs3 = makeDefaultFs()) {
177216
177292
  const body = JSON.stringify(manifest, undefined, 2);
177217
- await fs2.writeFile(join21(envDir, manifestFilename), `${body}
177293
+ await fs3.writeFile(join21(envDir, manifestFilename), `${body}
177218
177294
  `);
177219
177295
  }
177220
- function hashFile(absPath, fs2 = makeDefaultFs()) {
177296
+ function hashFile(absPath, fs3 = makeDefaultFs()) {
177221
177297
  return new Promise((resolve5, reject) => {
177222
177298
  const hash2 = createHash2("sha256");
177223
- const stream = fs2.createReadStream(absPath);
177299
+ const stream = fs3.createReadStream(absPath);
177224
177300
  stream.on("data", (chunk) => hash2.update(chunk));
177225
177301
  stream.on("end", () => resolve5(hash2.digest("hex")));
177226
177302
  stream.on("error", reject);
@@ -177350,25 +177426,25 @@ async function checkSafety(args) {
177350
177426
 
177351
177427
  // src/domains/flows/pull/bundle.ts
177352
177428
  import { join as join22, relative as relative4 } from "node:path";
177353
- async function flattenSingleWrapper(dir, fs2 = makeDefaultFs()) {
177354
- const entries = await fs2.readdir(dir);
177429
+ async function flattenSingleWrapper(dir, fs3 = makeDefaultFs()) {
177430
+ const entries = await fs3.readdir(dir);
177355
177431
  if (entries.length !== 1)
177356
177432
  return;
177357
177433
  const innerName = entries[0];
177358
177434
  if (!innerName)
177359
177435
  return;
177360
177436
  const inner = join22(dir, innerName);
177361
- const innerStat = await fs2.stat(inner);
177437
+ const innerStat = await fs3.stat(inner);
177362
177438
  if (!innerStat.isDirectory())
177363
177439
  return;
177364
- for (const e of await fs2.readdir(inner)) {
177365
- await fs2.rename(join22(inner, e), join22(dir, e));
177440
+ for (const e of await fs3.readdir(inner)) {
177441
+ await fs3.rename(join22(inner, e), join22(dir, e));
177366
177442
  }
177367
- const leftovers = await fs2.readdir(inner);
177443
+ const leftovers = await fs3.readdir(inner);
177368
177444
  if (leftovers.length > 0) {
177369
177445
  throw new Error(`flattenSingleWrapper: ${leftovers.length} unexpected item(s) remain in wrapper dir`);
177370
177446
  }
177371
- await fs2.rm(inner, { recursive: true });
177447
+ await fs3.rm(inner, { recursive: true });
177372
177448
  return innerName;
177373
177449
  }
177374
177450
  function extractQawolfCommitSha(wrapperName) {
@@ -177377,11 +177453,11 @@ function extractQawolfCommitSha(wrapperName) {
177377
177453
  return /-([0-9a-f]{40})$/i.exec(wrapperName)?.[1];
177378
177454
  }
177379
177455
  var flowExtensions = [".flow.ts", ".flow.js"];
177380
- async function buildManifest(args, fs2 = makeDefaultFs()) {
177381
- const flowPaths = await walkForFlows(args.bundleDir, fs2);
177456
+ async function buildManifest(args, fs3 = makeDefaultFs()) {
177457
+ const flowPaths = await walkForFlows(args.bundleDir, fs3);
177382
177458
  const flows = await Promise.all(flowPaths.map(async (rel) => ({
177383
177459
  path: rel,
177384
- contentHash: await hashFile(join22(args.bundleDir, rel), fs2)
177460
+ contentHash: await hashFile(join22(args.bundleDir, rel), fs3)
177385
177461
  })));
177386
177462
  return {
177387
177463
  envId: args.envId,
@@ -177394,28 +177470,28 @@ async function buildManifest(args, fs2 = makeDefaultFs()) {
177394
177470
  flows
177395
177471
  };
177396
177472
  }
177397
- async function walkForFlows(root, fs2) {
177473
+ async function walkForFlows(root, fs3) {
177398
177474
  const out = [];
177399
- await walk(root, root, out, fs2);
177475
+ await walk(root, root, out, fs3);
177400
177476
  return out.sort();
177401
177477
  }
177402
- async function walk(current, root, out, fs2) {
177403
- const entries = await fs2.readdirWithTypes(current);
177478
+ async function walk(current, root, out, fs3) {
177479
+ const entries = await fs3.readdirWithTypes(current);
177404
177480
  for (const e of entries) {
177405
177481
  const abs = join22(current, e.name);
177406
177482
  if (e.isDirectory()) {
177407
- await walk(abs, root, out, fs2);
177483
+ await walk(abs, root, out, fs3);
177408
177484
  } else if (e.isFile() && flowExtensions.some((ext) => e.name.endsWith(ext))) {
177409
177485
  out.push(relative4(root, abs));
177410
177486
  }
177411
177487
  }
177412
177488
  }
177413
- async function sampleQawolfCommittedAt(bundleDir, fs2 = makeDefaultFs()) {
177414
- const flowPaths = await walkForFlows(bundleDir, fs2);
177489
+ async function sampleQawolfCommittedAt(bundleDir, fs3 = makeDefaultFs()) {
177490
+ const flowPaths = await walkForFlows(bundleDir, fs3);
177415
177491
  const sample = flowPaths[0];
177416
177492
  if (!sample)
177417
177493
  return;
177418
- return (await fs2.stat(join22(bundleDir, sample))).mtime.toISOString();
177494
+ return (await fs3.stat(join22(bundleDir, sample))).mtime.toISOString();
177419
177495
  }
177420
177496
 
177421
177497
  // src/domains/flows/pull/applyTeamStorageRewrite.ts
@@ -177452,26 +177528,26 @@ function isSourceFile(name) {
177452
177528
  function isFlowFile(name) {
177453
177529
  return flowExtensions2.some((ext) => name.endsWith(ext));
177454
177530
  }
177455
- async function walk2(dir, out, fs2) {
177456
- const entries = await fs2.readdirWithTypes(dir);
177531
+ async function walk2(dir, out, fs3) {
177532
+ const entries = await fs3.readdirWithTypes(dir);
177457
177533
  for (const e of entries) {
177458
177534
  const abs = join23(dir, e.name);
177459
177535
  if (e.isDirectory()) {
177460
- await walk2(abs, out, fs2);
177536
+ await walk2(abs, out, fs3);
177461
177537
  } else if (e.isFile() && isSourceFile(e.name)) {
177462
177538
  out.push(abs);
177463
177539
  }
177464
177540
  }
177465
177541
  }
177466
- async function applyTeamStorageRewrite(rootDir, fs2 = makeDefaultFs()) {
177542
+ async function applyTeamStorageRewrite(rootDir, fs3 = makeDefaultFs()) {
177467
177543
  const files = [];
177468
- await walk2(rootDir, files, fs2);
177544
+ await walk2(rootDir, files, fs3);
177469
177545
  const results = await Promise.all(files.map(async (file2) => {
177470
- const source = await fs2.readFile(file2);
177546
+ const source = await fs3.readFile(file2);
177471
177547
  const result = rewriteTeamStorage(source);
177472
177548
  const finalSource = result.rewrites > 0 ? result.source : source;
177473
177549
  if (result.rewrites > 0) {
177474
- await fs2.writeFile(file2, finalSource);
177550
+ await fs3.writeFile(file2, finalSource);
177475
177551
  }
177476
177552
  if (isFlowFile(file2) && finalSource.includes("process.env.TEAM_STORAGE_DIR")) {
177477
177553
  return relative5(rootDir, file2);
@@ -177545,10 +177621,10 @@ function unquote(escaped) {
177545
177621
  }
177546
177622
 
177547
177623
  // src/domains/flows/pull/envVars.ts
177548
- async function writeEnvFile(envDir, vars, fs2 = makeDefaultFs()) {
177624
+ async function writeEnvFile(envDir, vars, fs3 = makeDefaultFs()) {
177549
177625
  if (Object.keys(vars).length === 0)
177550
177626
  return;
177551
- await fs2.writeFile(join24(envDir, ".env"), serializeDotenv(vars), {
177627
+ await fs3.writeFile(join24(envDir, ".env"), serializeDotenv(vars), {
177552
177628
  mode: 384
177553
177629
  });
177554
177630
  }
@@ -179585,7 +179661,7 @@ var hs = Symbol("jobDone");
179585
179661
  var li = Symbol("addFSEntry");
179586
179662
  var sr = Symbol("addTarEntry");
179587
179663
  var cs = Symbol("stat");
179588
- var fs2 = Symbol("readdir");
179664
+ var fs3 = Symbol("readdir");
179589
179665
  var ci = Symbol("onreaddir");
179590
179666
  var fi = Symbol("pipe");
179591
179667
  var rr = Symbol("entry");
@@ -179680,7 +179756,7 @@ var wt = class extends A2 {
179680
179756
  }
179681
179757
  this[Ct]();
179682
179758
  }
179683
- [fs2](t2) {
179759
+ [fs3](t2) {
179684
179760
  t2.pending = true, this[G] += 1, ui.readdir(t2.absolute, (e, i2) => {
179685
179761
  if (t2.pending = false, this[G] -= 1, e)
179686
179762
  return this.emit("error", e);
@@ -179730,7 +179806,7 @@ var wt = class extends A2 {
179730
179806
  if (t2.stat && !t2.ignore) {
179731
179807
  if (!this.noDirRecurse && t2.stat.isDirectory() && !t2.readdir) {
179732
179808
  let e = this.readdirCache.get(t2.absolute);
179733
- if (e ? this[ci](t2, e) : this[fs2](t2), !t2.readdir)
179809
+ if (e ? this[ci](t2, e) : this[fs3](t2), !t2.readdir)
179734
179810
  return;
179735
179811
  }
179736
179812
  if (t2.entry = this[rr](t2), !t2.entry) {
@@ -179787,7 +179863,7 @@ var kt = class extends wt {
179787
179863
  let e = this.follow ? "statSync" : "lstatSync";
179788
179864
  this[ai](t2, ui[e](t2.absolute));
179789
179865
  }
179790
- [fs2](t2) {
179866
+ [fs3](t2) {
179791
179867
  this[ci](t2, ui.readdirSync(t2.absolute));
179792
179868
  }
179793
179869
  [fi](t2) {
@@ -180748,16 +180824,16 @@ function checkEntrySize(args) {
180748
180824
  // src/domains/flows/pull/extract.ts
180749
180825
  var defaultMaxEntryBytes = 50 * 1024 * 1024;
180750
180826
  var defaultMaxTotalBytes = 500 * 1024 * 1024;
180751
- async function extractTarGz(tgzPath, destDir, opts = {}, fs3 = makeDefaultFs()) {
180827
+ async function extractTarGz(tgzPath, destDir, opts = {}, fs4 = makeDefaultFs()) {
180752
180828
  const maxEntryBytes = opts.maxEntryBytes ?? defaultMaxEntryBytes;
180753
180829
  const maxTotalBytes = opts.maxTotalBytes ?? defaultMaxTotalBytes;
180754
- await fs3.mkdir(destDir, { recursive: true });
180830
+ await fs4.mkdir(destDir, { recursive: true });
180755
180831
  const destResolved = resolve7(destDir);
180756
180832
  return new Promise((resolveOuter, rejectOuter) => {
180757
180833
  let total = 0;
180758
180834
  let aborted2 = false;
180759
180835
  const pending = [];
180760
- const rs2 = fs3.createReadStream(tgzPath);
180836
+ const rs2 = fs4.createReadStream(tgzPath);
180761
180837
  const gz = createGunzip();
180762
180838
  const parser = new st({ strict: true });
180763
180839
  const abort = (err) => {
@@ -180781,7 +180857,7 @@ async function extractTarGz(tgzPath, destDir, opts = {}, fs3 = makeDefaultFs())
180781
180857
  maxTotalBytes,
180782
180858
  addTotal: (n2) => total += n2,
180783
180859
  getTotal: () => total,
180784
- fs: fs3
180860
+ fs: fs4
180785
180861
  }).catch((err) => {
180786
180862
  abort(err instanceof Error ? err : new Error(String(err)));
180787
180863
  });
@@ -180846,7 +180922,7 @@ function mintTempPath(destAbs, kind, registry2) {
180846
180922
  registry2.minted.add(path3);
180847
180923
  return path3;
180848
180924
  }
180849
- async function removeTempDir(absPath, registry2, fs3 = makeDefaultFs()) {
180925
+ async function removeTempDir(absPath, registry2, fs4 = makeDefaultFs()) {
180850
180926
  if (!absPath || !isAbsolute4(absPath)) {
180851
180927
  throw new Error(`removeTempDir refused: not an absolute path (${absPath})`);
180852
180928
  }
@@ -180856,24 +180932,24 @@ async function removeTempDir(absPath, registry2, fs3 = makeDefaultFs()) {
180856
180932
  if (!registry2.minted.has(absPath)) {
180857
180933
  throw new Error(`removeTempDir refused: not minted in this registry`);
180858
180934
  }
180859
- await fs3.rm(absPath, { recursive: true, force: true });
180935
+ await fs4.rm(absPath, { recursive: true, force: true });
180860
180936
  registry2.minted.delete(absPath);
180861
180937
  }
180862
180938
 
180863
180939
  // src/domains/flows/pull/stage.ts
180864
- async function stageBundle(args, fs3 = makeDefaultFs()) {
180940
+ async function stageBundle(args, fs4 = makeDefaultFs()) {
180865
180941
  const registry2 = createTempPathRegistry();
180866
180942
  const tmpDir = mintTempPath(args.destAbs, "pull", registry2);
180867
180943
  try {
180868
- await extractTarGz(args.tmpArchive, tmpDir, {}, fs3);
180869
- const wrapperName = await flattenSingleWrapper(tmpDir, fs3);
180870
- const qawolfCommittedAt = await sampleQawolfCommittedAt(tmpDir, fs3);
180871
- const { flowsWithTeamStorageRefs } = await applyTeamStorageRewrite(tmpDir, fs3);
180944
+ await extractTarGz(args.tmpArchive, tmpDir, {}, fs4);
180945
+ const wrapperName = await flattenSingleWrapper(tmpDir, fs4);
180946
+ const qawolfCommittedAt = await sampleQawolfCommittedAt(tmpDir, fs4);
180947
+ const { flowsWithTeamStorageRefs } = await applyTeamStorageRewrite(tmpDir, fs4);
180872
180948
  const effectiveEnvVars = {
180873
180949
  ...args.envVars,
180874
180950
  TEAM_STORAGE_DIR: args.assetsAbs
180875
180951
  };
180876
- await writeEnvFile(tmpDir, effectiveEnvVars, fs3);
180952
+ await writeEnvFile(tmpDir, effectiveEnvVars, fs4);
180877
180953
  const manifest = await buildManifest({
180878
180954
  envId: args.envId,
180879
180955
  bundleDir: tmpDir,
@@ -180882,22 +180958,22 @@ async function stageBundle(args, fs3 = makeDefaultFs()) {
180882
180958
  envVarsFetchedAt: args.envVarsFetchedAt,
180883
180959
  wrapperName,
180884
180960
  qawolfCommittedAt
180885
- }, fs3);
180886
- await writeManifest(tmpDir, manifest, fs3);
180961
+ }, fs4);
180962
+ await writeManifest(tmpDir, manifest, fs4);
180887
180963
  let oldDir;
180888
180964
  try {
180889
- if (await fs3.pathExists(args.destAbs)) {
180965
+ if (await fs4.pathExists(args.destAbs)) {
180890
180966
  oldDir = mintTempPath(args.destAbs, "old", registry2);
180891
- await fs3.rename(args.destAbs, oldDir);
180967
+ await fs4.rename(args.destAbs, oldDir);
180892
180968
  }
180893
- await fs3.rename(tmpDir, args.destAbs);
180969
+ await fs4.rename(tmpDir, args.destAbs);
180894
180970
  } catch (err) {
180895
180971
  if (oldDir)
180896
- await fs3.rename(oldDir, args.destAbs).catch(() => {});
180972
+ await fs4.rename(oldDir, args.destAbs).catch(() => {});
180897
180973
  throw err;
180898
180974
  }
180899
180975
  if (oldDir)
180900
- await removeTempDir(oldDir, registry2, fs3).catch(() => {});
180976
+ await removeTempDir(oldDir, registry2, fs4).catch(() => {});
180901
180977
  return {
180902
180978
  envDir: args.destAbs,
180903
180979
  flowCount: manifest.flows.length,
@@ -180905,7 +180981,7 @@ async function stageBundle(args, fs3 = makeDefaultFs()) {
180905
180981
  flowsWithTeamStorageRefs
180906
180982
  };
180907
180983
  } catch (err) {
180908
- await removeTempDir(tmpDir, registry2, fs3).catch(() => {});
180984
+ await removeTempDir(tmpDir, registry2, fs4).catch(() => {});
180909
180985
  throw err;
180910
180986
  }
180911
180987
  }
@@ -180963,8 +181039,10 @@ async function handleFlowsPull(ctx, opts, deps) {
180963
181039
  },
180964
181040
  {
180965
181041
  message: flowsMessages.pull.downloadingTeamStorageAssets,
180966
- task: async () => {
180967
- const result2 = await ctx.platformClient.syncTeamStorageAssets(assetsAbs);
181042
+ task: async (update) => {
181043
+ const result2 = await ctx.platformClient.syncTeamStorageAssets(assetsAbs, {
181044
+ onProgress: ({ current, total }) => update(flowsMessages.pull.downloadingTeamStorageAssetsProgress(current, total))
181045
+ });
180968
181046
  if (!result2.ok)
180969
181047
  throw new Error(result2.error);
180970
181048
  return result2.value;
@@ -181689,16 +181767,16 @@ import { join as join26 } from "node:path";
181689
181767
  var flowSubpathImports = { "#playwright": "playwright" };
181690
181768
  var packageJsonSchema = exports_external.looseObject({ imports: exports_external.record(exports_external.string(), exports_external.unknown()).catch({}) }).catch({ imports: {} });
181691
181769
  async function writeExecSubpathImports(args) {
181692
- const { execDir, fs: fs3 } = args;
181770
+ const { execDir, fs: fs4 } = args;
181693
181771
  const pkgPath = join26(execDir, "package.json");
181694
- const pkg = packageJsonSchema.parse(await readPackageJson(pkgPath, fs3));
181772
+ const pkg = packageJsonSchema.parse(await readPackageJson(pkgPath, fs4));
181695
181773
  const merged = { ...pkg, imports: { ...pkg.imports, ...flowSubpathImports } };
181696
- await fs3.writeFile(pkgPath, JSON.stringify(merged, undefined, 2));
181774
+ await fs4.writeFile(pkgPath, JSON.stringify(merged, undefined, 2));
181697
181775
  }
181698
- async function readPackageJson(pkgPath, fs3) {
181776
+ async function readPackageJson(pkgPath, fs4) {
181699
181777
  let content;
181700
181778
  try {
181701
- content = await fs3.readFile(pkgPath);
181779
+ content = await fs4.readFile(pkgPath);
181702
181780
  } catch (err) {
181703
181781
  if (isNoEntError(err))
181704
181782
  return {};
@@ -181726,27 +181804,27 @@ async function createDirSymlink(source, target) {
181726
181804
 
181727
181805
  // src/domains/runtimeEnv/linkPinnedPackages.ts
181728
181806
  async function linkPinnedPackages(args) {
181729
- const { depsRoot, nodeModulesDir, fs: fs3 } = args;
181807
+ const { depsRoot, nodeModulesDir, fs: fs4 } = args;
181730
181808
  const managedModules = join27(depsRoot, "node_modules");
181731
- await fs3.mkdir(nodeModulesDir, { recursive: true });
181809
+ await fs4.mkdir(nodeModulesDir, { recursive: true });
181732
181810
  for (const { name } of pinnedPackages) {
181733
181811
  const segments = name.split("/");
181734
181812
  const target = join27(nodeModulesDir, ...segments);
181735
181813
  if (segments.length > 1) {
181736
- await fs3.mkdir(dirname8(target), { recursive: true });
181814
+ await fs4.mkdir(dirname8(target), { recursive: true });
181737
181815
  }
181738
- await fs3.rm(target, { recursive: true, force: true });
181816
+ await fs4.rm(target, { recursive: true, force: true });
181739
181817
  await createDirSymlink(join27(managedModules, ...segments), target);
181740
181818
  }
181741
181819
  }
181742
181820
 
181743
181821
  // src/domains/runtimeEnv/innerHop.ts
181744
181822
  async function populateInnerHop(args) {
181745
- const { depsRoot, execDir, fs: fs3 } = args;
181823
+ const { depsRoot, execDir, fs: fs4 } = args;
181746
181824
  await linkPinnedPackages({
181747
181825
  depsRoot,
181748
181826
  nodeModulesDir: join28(execDir, "node_modules"),
181749
- fs: fs3
181827
+ fs: fs4
181750
181828
  });
181751
181829
  }
181752
181830
 
@@ -181755,12 +181833,12 @@ import { lstat } from "node:fs/promises";
181755
181833
  import { dirname as dirname9, join as join29 } from "node:path";
181756
181834
  var executorPackageNames = new Set(pinnedPackages.map((p3) => p3.name));
181757
181835
  async function populateOuterHop(args) {
181758
- const { projectDir, runDir, fs: fs3 } = args;
181836
+ const { projectDir, runDir, fs: fs4 } = args;
181759
181837
  if (projectDir === undefined)
181760
181838
  return { mode: "none" };
181761
- const installableDeps = await readInstallableDeps(projectDir, fs3);
181839
+ const installableDeps = await readInstallableDeps(projectDir, fs4);
181762
181840
  const depNames = Object.keys(installableDeps);
181763
- const { satisfying, rejected } = await findSatisfyingNodeModulesDir(projectDir, depNames, fs3);
181841
+ const { satisfying, rejected } = await findSatisfyingNodeModulesDir(projectDir, depNames, fs4);
181764
181842
  if (satisfying !== undefined) {
181765
181843
  await createDirSymlink(satisfying, join29(runDir, "node_modules"));
181766
181844
  return { mode: "symlink", nodeModulesDir: satisfying };
@@ -181768,22 +181846,22 @@ async function populateOuterHop(args) {
181768
181846
  if (depNames.length === 0)
181769
181847
  return { mode: "none" };
181770
181848
  args.onInstallStart?.(depNames.length);
181771
- await installOuterDeps(runDir, installableDeps, fs3, args.install ?? spawnNpmInstall);
181849
+ await installOuterDeps(runDir, installableDeps, fs4, args.install ?? spawnNpmInstall);
181772
181850
  await linkPinnedPackages({
181773
181851
  depsRoot: args.depsRoot,
181774
181852
  nodeModulesDir: join29(runDir, "node_modules"),
181775
- fs: fs3
181853
+ fs: fs4
181776
181854
  });
181777
181855
  return { mode: "install", depCount: depNames.length, rejected };
181778
181856
  }
181779
- async function findSatisfyingNodeModulesDir(startDir, depNames, fs3) {
181857
+ async function findSatisfyingNodeModulesDir(startDir, depNames, fs4) {
181780
181858
  const rejected = [];
181781
181859
  let dir = startDir;
181782
181860
  while (true) {
181783
181861
  const candidate = join29(dir, "node_modules");
181784
181862
  const stats = await lstatSafe(candidate);
181785
181863
  if (stats !== undefined && stats.isDirectory() && !stats.isSymbolicLink()) {
181786
- const missing = depNames.filter((name) => !fs3.existsSync(join29(candidate, name, "package.json")));
181864
+ const missing = depNames.filter((name) => !fs4.existsSync(join29(candidate, name, "package.json")));
181787
181865
  if (missing.length === 0)
181788
181866
  return { satisfying: candidate, rejected };
181789
181867
  rejected.push({ dir: candidate, missing });
@@ -181801,10 +181879,10 @@ async function lstatSafe(path3) {
181801
181879
  return;
181802
181880
  }
181803
181881
  }
181804
- async function readInstallableDeps(projectDir, fs3) {
181882
+ async function readInstallableDeps(projectDir, fs4) {
181805
181883
  let content;
181806
181884
  try {
181807
- content = await fs3.readFile(join29(projectDir, "package.json"));
181885
+ content = await fs4.readFile(join29(projectDir, "package.json"));
181808
181886
  } catch {
181809
181887
  return {};
181810
181888
  }
@@ -181821,9 +181899,9 @@ async function readInstallableDeps(projectDir, fs3) {
181821
181899
  return {};
181822
181900
  return Object.fromEntries(Object.entries(rawDeps).filter(([name]) => !executorPackageNames.has(name)).filter((entry) => typeof entry[1] === "string"));
181823
181901
  }
181824
- async function installOuterDeps(runDir, deps, fs3, install) {
181825
- await fs3.writeFile(join29(runDir, "package.json"), JSON.stringify({ name: "qawolf-run", private: true, dependencies: deps }, undefined, 2));
181826
- await fs3.writeFile(join29(runDir, ".npmrc"), `@qawolf:registry=https://registry.npmjs.org/
181902
+ async function installOuterDeps(runDir, deps, fs4, install) {
181903
+ await fs4.writeFile(join29(runDir, "package.json"), JSON.stringify({ name: "qawolf-run", private: true, dependencies: deps }, undefined, 2));
181904
+ await fs4.writeFile(join29(runDir, ".npmrc"), `@qawolf:registry=https://registry.npmjs.org/
181827
181905
  `);
181828
181906
  const result = await install(runDir);
181829
181907
  if (result.exitCode !== 0) {
@@ -181849,23 +181927,23 @@ async function copyDirExcluding(source, destination, excludedNames) {
181849
181927
  // src/domains/runtimeEnv/stageFlowFiles.ts
181850
181928
  var excludedDirs = new Set(["node_modules", ".git", ".qawolf"]);
181851
181929
  async function stageFlowFiles(args) {
181852
- const { files, projectDir, execDir, fs: fs3 } = args;
181930
+ const { files, projectDir, execDir, fs: fs4 } = args;
181853
181931
  if (projectDir !== undefined) {
181854
181932
  await copyDirExcluding(projectDir, execDir, excludedDirs);
181855
- return Promise.all(files.map(async (f3) => remapPath(f3, projectDir, execDir) ?? stageOneFile(f3, execDir, fs3)));
181933
+ return Promise.all(files.map(async (f3) => remapPath(f3, projectDir, execDir) ?? stageOneFile(f3, execDir, fs4)));
181856
181934
  }
181857
181935
  if (files.length > 1) {
181858
- return Promise.all(files.map((f3) => stageOneFile(f3, execDir, fs3)));
181936
+ return Promise.all(files.map((f3) => stageOneFile(f3, execDir, fs4)));
181859
181937
  }
181860
- await Promise.all(files.map((f3) => fs3.copyFile(f3, join31(execDir, basename4(f3)))));
181938
+ await Promise.all(files.map((f3) => fs4.copyFile(f3, join31(execDir, basename4(f3)))));
181861
181939
  return files.map((f3) => join31(execDir, basename4(f3)));
181862
181940
  }
181863
- async function stageOneFile(file2, execDir, fs3) {
181941
+ async function stageOneFile(file2, execDir, fs4) {
181864
181942
  const dirHash = createHash3("sha256").update(dirname10(file2)).digest("hex").slice(0, 8);
181865
181943
  const subDir = join31(execDir, dirHash);
181866
- await fs3.mkdir(subDir, { recursive: true });
181944
+ await fs4.mkdir(subDir, { recursive: true });
181867
181945
  const dest = join31(subDir, basename4(file2));
181868
- await fs3.copyFile(file2, dest);
181946
+ await fs4.copyFile(file2, dest);
181869
181947
  return dest;
181870
181948
  }
181871
181949
  function remapPath(file2, projectDir, execDir) {
@@ -181880,30 +181958,30 @@ function remapPath(file2, projectDir, execDir) {
181880
181958
  // src/domains/runtimeEnv/prepareRunDir.ts
181881
181959
  async function prepareRunDir(args) {
181882
181960
  const { files, projectDir, depsRoot, runRoot } = args;
181883
- const fs3 = args.fs ?? makeDefaultFs();
181961
+ const fs4 = args.fs ?? makeDefaultFs();
181884
181962
  const runId = buildRunId(projectDir, files);
181885
181963
  const runDir = join32(runRoot, runId);
181886
- await fs3.rm(runDir, { recursive: true, force: true });
181887
- await fs3.mkdir(runDir, { recursive: true });
181964
+ await fs4.rm(runDir, { recursive: true, force: true });
181965
+ await fs4.mkdir(runDir, { recursive: true });
181888
181966
  const execDir = join32(runDir, "exec");
181889
- await fs3.mkdir(execDir, { recursive: true });
181890
- await populateInnerHop({ depsRoot, execDir, fs: fs3 });
181891
- const stagedFiles = await stageFlowFiles({ files, projectDir, execDir, fs: fs3 });
181967
+ await fs4.mkdir(execDir, { recursive: true });
181968
+ await populateInnerHop({ depsRoot, execDir, fs: fs4 });
181969
+ const stagedFiles = await stageFlowFiles({ files, projectDir, execDir, fs: fs4 });
181892
181970
  if (projectDir !== undefined) {
181893
- await writeExecSubpathImports({ execDir, fs: fs3 });
181971
+ await writeExecSubpathImports({ execDir, fs: fs4 });
181894
181972
  }
181895
181973
  const outerHop = await populateOuterHop({
181896
181974
  projectDir,
181897
181975
  runDir,
181898
181976
  depsRoot,
181899
- fs: fs3,
181977
+ fs: fs4,
181900
181978
  ...args.onInstallStart !== undefined ? { onInstallStart: args.onInstallStart } : {}
181901
181979
  });
181902
181980
  return {
181903
181981
  files: stagedFiles,
181904
181982
  runDir,
181905
181983
  outerHop,
181906
- cleanup: () => fs3.rm(runDir, { recursive: true, force: true })
181984
+ cleanup: () => fs4.rm(runDir, { recursive: true, force: true })
181907
181985
  };
181908
181986
  }
181909
181987
  function buildRunId(projectDir, files) {
@@ -181950,13 +182028,13 @@ async function configureTestkit(cwd, deps) {
181950
182028
 
181951
182029
  // src/commands/resolveDepsRoot.ts
181952
182030
  function resolveDepsRoot(args) {
181953
- const fs3 = args.fs ?? makeDefaultFs();
181954
- const projectDir = resolveProjectDirSafe(args.files, fs3);
182031
+ const fs4 = args.fs ?? makeDefaultFs();
182032
+ const projectDir = resolveProjectDirSafe(args.files, fs4);
181955
182033
  return ensureRuntimeEnv({
181956
182034
  platform: args.platform,
181957
182035
  ...projectDir !== undefined ? { projectDir } : {},
181958
182036
  ...args.overrideDir !== undefined ? { overrideDir: args.overrideDir } : {}
181959
- }, { fs: fs3 });
182037
+ }, { fs: fs4 });
181960
182038
  }
181961
182039
 
181962
182040
  // src/domains/emails/configureEmails.ts
@@ -181988,31 +182066,31 @@ import { join as join34 } from "node:path";
181988
182066
  function envFilePath(envDir) {
181989
182067
  return join34(envDir, ".env");
181990
182068
  }
181991
- async function readEnv(envDir, fs3) {
182069
+ async function readEnv(envDir, fs4) {
181992
182070
  try {
181993
- return parseDotenv(await fs3.readFile(envFilePath(envDir)));
182071
+ return parseDotenv(await fs4.readFile(envFilePath(envDir)));
181994
182072
  } catch (err) {
181995
182073
  if (isNoEntError(err))
181996
182074
  return {};
181997
182075
  throw err;
181998
182076
  }
181999
182077
  }
182000
- async function writeEnv(envDir, fs3, vars) {
182078
+ async function writeEnv(envDir, fs4, vars) {
182001
182079
  const target = envFilePath(envDir);
182002
182080
  const tmp = `${target}.${process.pid}.tmp`;
182003
- await fs3.writeFile(tmp, serializeDotenv(vars), { mode: 384 });
182004
- await fs3.rename(tmp, target);
182081
+ await fs4.writeFile(tmp, serializeDotenv(vars), { mode: 384 });
182082
+ await fs4.rename(tmp, target);
182005
182083
  }
182006
- function makeEnvVarDeps(envDir, fs3) {
182084
+ function makeEnvVarDeps(envDir, fs4) {
182007
182085
  return {
182008
182086
  setEnvironmentVariable: async (key, value) => {
182009
- const vars = await readEnv(envDir, fs3);
182087
+ const vars = await readEnv(envDir, fs4);
182010
182088
  vars[key] = value;
182011
- await writeEnv(envDir, fs3, vars);
182089
+ await writeEnv(envDir, fs4, vars);
182012
182090
  process.env[key] = value;
182013
182091
  },
182014
182092
  fetchLatestEnvironmentVariables: async () => {
182015
- const vars = await readEnv(envDir, fs3);
182093
+ const vars = await readEnv(envDir, fs4);
182016
182094
  for (const [key, value] of Object.entries(vars)) {
182017
182095
  process.env[key] = value;
182018
182096
  }
@@ -182134,7 +182212,7 @@ var defaultSpawnAppium = (bin, args, platform, env2) => {
182134
182212
  var readyBanner = "Appium REST http interface listener started on";
182135
182213
  var defaultStartTimeoutMs = 30000;
182136
182214
  var bannerBufferMaxBytes = 1024;
182137
- function waitForBanner(output, exitCode, timeoutMs4) {
182215
+ function waitForBanner(output, exitCode, timeoutMs3) {
182138
182216
  return new Promise((resolve10, reject) => {
182139
182217
  let done = false;
182140
182218
  function cleanup() {
@@ -182158,8 +182236,8 @@ function waitForBanner(output, exitCode, timeoutMs4) {
182158
182236
  };
182159
182237
  const timer = setTimeout(() => {
182160
182238
  cleanup();
182161
- reject(new Error(`Appium server did not start within ${timeoutMs4 / 1000}s`));
182162
- }, timeoutMs4);
182239
+ reject(new Error(`Appium server did not start within ${timeoutMs3 / 1000}s`));
182240
+ }, timeoutMs3);
182163
182241
  output.on("data", onData);
182164
182242
  const fail = (err) => {
182165
182243
  if (done)
@@ -182175,7 +182253,7 @@ async function createAppiumServer(envDir, signals, params) {
182175
182253
  const findFreePortFn = params?.deps?.findFreePort ?? findFreePort;
182176
182254
  const checkExists = params?.deps?.checkExists ?? existsSync2;
182177
182255
  const appiumHome = params?.options?.appiumHome ?? getAppiumHome();
182178
- const timeoutMs4 = params?.options?.startTimeoutMs ?? defaultStartTimeoutMs;
182256
+ const timeoutMs3 = params?.options?.startTimeoutMs ?? defaultStartTimeoutMs;
182179
182257
  const platform = params?.options?.platform ?? process.platform;
182180
182258
  const candidates = appiumCliCandidates(envDir, platform);
182181
182259
  const bin = candidates.find(checkExists);
@@ -182192,7 +182270,7 @@ async function createAppiumServer(envDir, signals, params) {
182192
182270
  proc.kill();
182193
182271
  };
182194
182272
  const unregister = signals.register(stop);
182195
- await waitForBanner(proc.output, proc.exitCode, timeoutMs4).catch((err) => {
182273
+ await waitForBanner(proc.output, proc.exitCode, timeoutMs3).catch((err) => {
182196
182274
  unregister();
182197
182275
  stop();
182198
182276
  throw err;
@@ -182243,13 +182321,13 @@ async function bootSequence(adb, serial, cancelled) {
182243
182321
  await new Promise((r2) => setTimeout(r2, pollIntervalMs));
182244
182322
  }
182245
182323
  }
182246
- function waitForBoot(adb, serial, timeoutMs4) {
182324
+ function waitForBoot(adb, serial, timeoutMs3) {
182247
182325
  return new Promise((resolve10, reject) => {
182248
182326
  let done = false;
182249
182327
  const timer = setTimeout(() => {
182250
182328
  done = true;
182251
- reject(new Error(`Android emulator did not finish booting within ${timeoutMs4 / 1000}s`));
182252
- }, timeoutMs4);
182329
+ reject(new Error(`Android emulator did not finish booting within ${timeoutMs3 / 1000}s`));
182330
+ }, timeoutMs3);
182253
182331
  bootSequence(adb, serial, () => done).then(() => {
182254
182332
  if (!done) {
182255
182333
  done = true;
@@ -182269,7 +182347,7 @@ async function createAndroidEmulator(params) {
182269
182347
  const { avdName, port } = params;
182270
182348
  const spawnFn = params.deps?.spawn ?? defaultSpawnEmulator;
182271
182349
  const adbFn = params.deps?.adb ?? defaultAdb;
182272
- const timeoutMs4 = params.options?.bootTimeoutMs ?? defaultBootTimeoutMs;
182350
+ const timeoutMs3 = params.options?.bootTimeoutMs ?? defaultBootTimeoutMs;
182273
182351
  const serial = `emulator-${port}`;
182274
182352
  const proc = spawnFn(emulatorBin(androidSdkHome(), process.platform), [
182275
182353
  "-avd",
@@ -182280,7 +182358,7 @@ async function createAndroidEmulator(params) {
182280
182358
  String(port)
182281
182359
  ]);
182282
182360
  try {
182283
- await waitForBoot(adbFn, serial, timeoutMs4);
182361
+ await waitForBoot(adbFn, serial, timeoutMs3);
182284
182362
  } catch (err) {
182285
182363
  proc.stop();
182286
182364
  throw err;
@@ -184889,4 +184967,4 @@ createProgram({ signals }).parseAsync().catch(() => {
184889
184967
  process.exitCode = 1;
184890
184968
  }).finally(() => flushAndExit(typeof process.exitCode === "number" ? process.exitCode : 0));
184891
184969
 
184892
- //# debugId=6CBE0567ED2CC02E64756E2164756E21
184970
+ //# debugId=6C7CEF86B6A2980364756E2164756E21