@mcesystems/adb-kit 1.0.61 → 1.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2359,7 +2359,7 @@ var require_nodeback = __commonJS({
2359
2359
  var require_method = __commonJS({
2360
2360
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/method.js"(exports2, module2) {
2361
2361
  "use strict";
2362
- module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, debug2) {
2362
+ module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, debug) {
2363
2363
  var util = require_util();
2364
2364
  var tryCatch2 = util.tryCatch;
2365
2365
  Promise2.method = function(fn) {
@@ -2372,7 +2372,7 @@ var require_method = __commonJS({
2372
2372
  ret2._pushContext();
2373
2373
  var value = tryCatch2(fn).apply(this, arguments);
2374
2374
  var promiseCreated = ret2._popContext();
2375
- debug2.checkForgottenReturns(
2375
+ debug.checkForgottenReturns(
2376
2376
  value,
2377
2377
  promiseCreated,
2378
2378
  "Promise.method",
@@ -2391,7 +2391,7 @@ var require_method = __commonJS({
2391
2391
  ret2._pushContext();
2392
2392
  var value;
2393
2393
  if (arguments.length > 1) {
2394
- debug2.deprecated("calling Promise.try with more than 1 argument");
2394
+ debug.deprecated("calling Promise.try with more than 1 argument");
2395
2395
  var arg = arguments[1];
2396
2396
  var ctx = arguments[2];
2397
2397
  value = util.isArray(arg) ? tryCatch2(fn).apply(ctx, arg) : tryCatch2(fn).call(ctx, arg);
@@ -2399,7 +2399,7 @@ var require_method = __commonJS({
2399
2399
  value = tryCatch2(fn)();
2400
2400
  }
2401
2401
  var promiseCreated = ret2._popContext();
2402
- debug2.checkForgottenReturns(
2402
+ debug.checkForgottenReturns(
2403
2403
  value,
2404
2404
  promiseCreated,
2405
2405
  "Promise.try",
@@ -2423,7 +2423,7 @@ var require_method = __commonJS({
2423
2423
  var require_bind = __commonJS({
2424
2424
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/bind.js"(exports2, module2) {
2425
2425
  "use strict";
2426
- module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, debug2) {
2426
+ module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, debug) {
2427
2427
  var calledBind = false;
2428
2428
  var rejectThis = function(_, e) {
2429
2429
  this._reject(e);
@@ -2443,8 +2443,8 @@ var require_bind = __commonJS({
2443
2443
  Promise2.prototype.bind = function(thisArg) {
2444
2444
  if (!calledBind) {
2445
2445
  calledBind = true;
2446
- Promise2.prototype._propagateFrom = debug2.propagateFromFunction();
2447
- Promise2.prototype._boundValue = debug2.boundValueFunction();
2446
+ Promise2.prototype._propagateFrom = debug.propagateFromFunction();
2447
+ Promise2.prototype._boundValue = debug.boundValueFunction();
2448
2448
  }
2449
2449
  var maybePromise = tryConvertToPromise(thisArg);
2450
2450
  var ret2 = new Promise2(INTERNAL);
@@ -2494,13 +2494,13 @@ var require_bind = __commonJS({
2494
2494
  var require_cancel = __commonJS({
2495
2495
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/cancel.js"(exports2, module2) {
2496
2496
  "use strict";
2497
- module2.exports = function(Promise2, PromiseArray, apiRejection, debug2) {
2497
+ module2.exports = function(Promise2, PromiseArray, apiRejection, debug) {
2498
2498
  var util = require_util();
2499
2499
  var tryCatch2 = util.tryCatch;
2500
2500
  var errorObj2 = util.errorObj;
2501
2501
  var async = Promise2._async;
2502
2502
  Promise2.prototype["break"] = Promise2.prototype.cancel = function() {
2503
- if (!debug2.cancellation()) return this._warn("cancellation is disabled");
2503
+ if (!debug.cancellation()) return this._warn("cancellation is disabled");
2504
2504
  var promise = this;
2505
2505
  var child = promise;
2506
2506
  while (promise._isCancellable()) {
@@ -2996,7 +2996,7 @@ var require_call_get = __commonJS({
2996
2996
  var require_generators = __commonJS({
2997
2997
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/generators.js"(exports2, module2) {
2998
2998
  "use strict";
2999
- module2.exports = function(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug2) {
2999
+ module2.exports = function(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug) {
3000
3000
  var errors = require_errors();
3001
3001
  var TypeError2 = errors.TypeError;
3002
3002
  var util = require_util();
@@ -3020,7 +3020,7 @@ var require_generators = __commonJS({
3020
3020
  return null;
3021
3021
  }
3022
3022
  function PromiseSpawn(generatorFunction, receiver2, yieldHandler, stack) {
3023
- if (debug2.cancellation()) {
3023
+ if (debug.cancellation()) {
3024
3024
  var internal = new Promise2(INTERNAL);
3025
3025
  var _finallyPromise = this._finallyPromise = new Promise2(INTERNAL);
3026
3026
  this._promise = internal.lastly(function() {
@@ -3046,7 +3046,7 @@ var require_generators = __commonJS({
3046
3046
  };
3047
3047
  PromiseSpawn.prototype._cleanup = function() {
3048
3048
  this._promise = this._generator = null;
3049
- if (debug2.cancellation() && this._finallyPromise !== null) {
3049
+ if (debug.cancellation() && this._finallyPromise !== null) {
3050
3050
  this._finallyPromise._fulfill();
3051
3051
  this._finallyPromise = null;
3052
3052
  }
@@ -3195,7 +3195,7 @@ var require_generators = __commonJS({
3195
3195
  yieldHandlers.push(fn);
3196
3196
  };
3197
3197
  Promise2.spawn = function(generatorFunction) {
3198
- debug2.deprecated("Promise.spawn()", "Promise.coroutine()");
3198
+ debug.deprecated("Promise.spawn()", "Promise.coroutine()");
3199
3199
  if (typeof generatorFunction !== "function") {
3200
3200
  return apiRejection("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");
3201
3201
  }
@@ -3212,7 +3212,7 @@ var require_generators = __commonJS({
3212
3212
  var require_map = __commonJS({
3213
3213
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/map.js"(exports2, module2) {
3214
3214
  "use strict";
3215
- module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug2) {
3215
+ module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) {
3216
3216
  var util = require_util();
3217
3217
  var tryCatch2 = util.tryCatch;
3218
3218
  var errorObj2 = util.errorObj;
@@ -3268,7 +3268,7 @@ var require_map = __commonJS({
3268
3268
  promise._pushContext();
3269
3269
  var ret2 = tryCatch2(callback).call(receiver2, value, index, length);
3270
3270
  var promiseCreated = promise._popContext();
3271
- debug2.checkForgottenReturns(
3271
+ debug.checkForgottenReturns(
3272
3272
  ret2,
3273
3273
  promiseCreated,
3274
3274
  preservedValues !== null ? "Promise.filter" : "Promise.map",
@@ -3857,7 +3857,7 @@ var require_race = __commonJS({
3857
3857
  var require_reduce = __commonJS({
3858
3858
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/reduce.js"(exports2, module2) {
3859
3859
  "use strict";
3860
- module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug2) {
3860
+ module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) {
3861
3861
  var util = require_util();
3862
3862
  var tryCatch2 = util.tryCatch;
3863
3863
  function ReductionPromiseArray(promises, fn, initialValue, _each) {
@@ -4006,7 +4006,7 @@ var require_reduce = __commonJS({
4006
4006
  array._currentCancellable = ret2;
4007
4007
  }
4008
4008
  var promiseCreated = promise._popContext();
4009
- debug2.checkForgottenReturns(
4009
+ debug.checkForgottenReturns(
4010
4010
  ret2,
4011
4011
  promiseCreated,
4012
4012
  array._eachValues !== void 0 ? "Promise.each" : "Promise.reduce",
@@ -4022,7 +4022,7 @@ var require_reduce = __commonJS({
4022
4022
  var require_settle = __commonJS({
4023
4023
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/settle.js"(exports2, module2) {
4024
4024
  "use strict";
4025
- module2.exports = function(Promise2, PromiseArray, debug2) {
4025
+ module2.exports = function(Promise2, PromiseArray, debug) {
4026
4026
  var PromiseInspection = Promise2.PromiseInspection;
4027
4027
  var util = require_util();
4028
4028
  function SettledPromiseArray(values) {
@@ -4051,7 +4051,7 @@ var require_settle = __commonJS({
4051
4051
  return this._promiseResolved(index, ret2);
4052
4052
  };
4053
4053
  Promise2.settle = function(promises) {
4054
- debug2.deprecated(".settle()", ".reflect()");
4054
+ debug.deprecated(".settle()", ".reflect()");
4055
4055
  return new SettledPromiseArray(promises).promise();
4056
4056
  };
4057
4057
  Promise2.allSettled = function(promises) {
@@ -4196,7 +4196,7 @@ var require_some = __commonJS({
4196
4196
  var require_timers = __commonJS({
4197
4197
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/timers.js"(exports2, module2) {
4198
4198
  "use strict";
4199
- module2.exports = function(Promise2, INTERNAL, debug2) {
4199
+ module2.exports = function(Promise2, INTERNAL, debug) {
4200
4200
  var util = require_util();
4201
4201
  var TimeoutError = Promise2.TimeoutError;
4202
4202
  function HandleWrapper(handle) {
@@ -4213,7 +4213,7 @@ var require_timers = __commonJS({
4213
4213
  var handle;
4214
4214
  if (value !== void 0) {
4215
4215
  ret2 = Promise2.resolve(value)._then(afterValue, null, null, ms, void 0);
4216
- if (debug2.cancellation() && value instanceof Promise2) {
4216
+ if (debug.cancellation() && value instanceof Promise2) {
4217
4217
  ret2._setOnCancel(value);
4218
4218
  }
4219
4219
  } else {
@@ -4221,7 +4221,7 @@ var require_timers = __commonJS({
4221
4221
  handle = setTimeout(function() {
4222
4222
  ret2._fulfill();
4223
4223
  }, +ms);
4224
- if (debug2.cancellation()) {
4224
+ if (debug.cancellation()) {
4225
4225
  ret2._setOnCancel(new HandleWrapper(handle));
4226
4226
  }
4227
4227
  ret2._captureStackTrace();
@@ -4266,7 +4266,7 @@ var require_timers = __commonJS({
4266
4266
  afterTimeout(ret2, message, parent);
4267
4267
  }
4268
4268
  }, ms));
4269
- if (debug2.cancellation()) {
4269
+ if (debug.cancellation()) {
4270
4270
  parent = this.then();
4271
4271
  ret2 = parent._then(
4272
4272
  successClear,
@@ -4295,7 +4295,7 @@ var require_timers = __commonJS({
4295
4295
  var require_using = __commonJS({
4296
4296
  "../../node_modules/.pnpm/bluebird@3.7.2/node_modules/bluebird/js/release/using.js"(exports2, module2) {
4297
4297
  "use strict";
4298
- module2.exports = function(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug2) {
4298
+ module2.exports = function(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug) {
4299
4299
  var util = require_util();
4300
4300
  var TypeError2 = require_errors().TypeError;
4301
4301
  var inherits2 = require_util().inherits;
@@ -4461,7 +4461,7 @@ var require_using = __commonJS({
4461
4461
  fn = tryCatch2(fn);
4462
4462
  var ret2 = spreadArgs ? fn.apply(void 0, inspections) : fn(inspections);
4463
4463
  var promiseCreated = promise._popContext();
4464
- debug2.checkForgottenReturns(
4464
+ debug.checkForgottenReturns(
4465
4465
  ret2,
4466
4466
  promiseCreated,
4467
4467
  "Promise.using",
@@ -4646,13 +4646,13 @@ var require_promise = __commonJS({
4646
4646
  );
4647
4647
  var Context = require_context()(Promise2);
4648
4648
  var createContext = Context.create;
4649
- var debug2 = require_debuggability()(
4649
+ var debug = require_debuggability()(
4650
4650
  Promise2,
4651
4651
  Context,
4652
4652
  enableAsyncHooks,
4653
4653
  disableAsyncHooks
4654
4654
  );
4655
- var CapturedTrace = debug2.CapturedTrace;
4655
+ var CapturedTrace = debug.CapturedTrace;
4656
4656
  var PassThroughHandlerContext = require_finally()(Promise2, tryConvertToPromise, NEXT_FILTER);
4657
4657
  var catchFilter = require_catch_filter()(NEXT_FILTER);
4658
4658
  var nodebackForPromise = require_nodeback();
@@ -4713,7 +4713,7 @@ var require_promise = __commonJS({
4713
4713
  );
4714
4714
  };
4715
4715
  Promise2.prototype.then = function(didFulfill, didReject) {
4716
- if (debug2.warnings() && arguments.length > 0 && typeof didFulfill !== "function" && typeof didReject !== "function") {
4716
+ if (debug.warnings() && arguments.length > 0 && typeof didFulfill !== "function" && typeof didReject !== "function") {
4717
4717
  var msg = ".then() only accepts functions but was passed: " + util.classString(didFulfill);
4718
4718
  if (arguments.length > 1) {
4719
4719
  msg += ", " + util.classString(didReject);
@@ -5000,7 +5000,7 @@ var require_promise = __commonJS({
5000
5000
  Promise2.prototype._rejectCallback = function(reason, synchronous, ignoreNonErrorWarnings) {
5001
5001
  var trace = util.ensureErrorObject(reason);
5002
5002
  var hasStack = trace === reason;
5003
- if (!hasStack && !ignoreNonErrorWarnings && debug2.warnings()) {
5003
+ if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {
5004
5004
  var message = "a promise was rejected with a non-error: " + util.classString(reason);
5005
5005
  this._warn(message, true);
5006
5006
  }
@@ -5047,7 +5047,7 @@ var require_promise = __commonJS({
5047
5047
  } else if (x === errorObj2) {
5048
5048
  promise._rejectCallback(x.e, false);
5049
5049
  } else {
5050
- debug2.checkForgottenReturns(x, promiseCreated, "", promise, this);
5050
+ debug.checkForgottenReturns(x, promiseCreated, "", promise, this);
5051
5051
  promise._resolveCallback(x);
5052
5052
  }
5053
5053
  };
@@ -5225,7 +5225,7 @@ var require_promise = __commonJS({
5225
5225
  this.promise._rejectCallback(v, false);
5226
5226
  }
5227
5227
  Promise2.defer = Promise2.pending = function() {
5228
- debug2.deprecated("Promise.defer", "new Promise");
5228
+ debug.deprecated("Promise.defer", "new Promise");
5229
5229
  var promise = new Promise2(INTERNAL);
5230
5230
  return {
5231
5231
  promise,
@@ -5243,10 +5243,10 @@ var require_promise = __commonJS({
5243
5243
  INTERNAL,
5244
5244
  tryConvertToPromise,
5245
5245
  apiRejection,
5246
- debug2
5246
+ debug
5247
5247
  );
5248
- require_bind()(Promise2, INTERNAL, tryConvertToPromise, debug2);
5249
- require_cancel()(Promise2, PromiseArray, apiRejection, debug2);
5248
+ require_bind()(Promise2, INTERNAL, tryConvertToPromise, debug);
5249
+ require_cancel()(Promise2, PromiseArray, apiRejection, debug);
5250
5250
  require_direct_resolve()(Promise2);
5251
5251
  require_synchronous_inspection()(Promise2);
5252
5252
  require_join()(
@@ -5259,17 +5259,17 @@ var require_promise = __commonJS({
5259
5259
  Promise2.Promise = Promise2;
5260
5260
  Promise2.version = "3.7.2";
5261
5261
  require_call_get()(Promise2);
5262
- require_generators()(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug2);
5263
- require_map()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug2);
5262
+ require_generators()(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);
5263
+ require_map()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
5264
5264
  require_nodeify()(Promise2);
5265
5265
  require_promisify()(Promise2, INTERNAL);
5266
5266
  require_props()(Promise2, PromiseArray, tryConvertToPromise, apiRejection);
5267
5267
  require_race()(Promise2, INTERNAL, tryConvertToPromise, apiRejection);
5268
- require_reduce()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug2);
5269
- require_settle()(Promise2, PromiseArray, debug2);
5268
+ require_reduce()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);
5269
+ require_settle()(Promise2, PromiseArray, debug);
5270
5270
  require_some()(Promise2, PromiseArray, apiRejection);
5271
- require_timers()(Promise2, INTERNAL, debug2);
5272
- require_using()(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug2);
5271
+ require_timers()(Promise2, INTERNAL, debug);
5272
+ require_using()(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);
5273
5273
  require_any()(Promise2);
5274
5274
  require_each()(Promise2, INTERNAL);
5275
5275
  require_filter()(Promise2, INTERNAL);
@@ -5291,7 +5291,7 @@ var require_promise = __commonJS({
5291
5291
  fillTypes(void 0);
5292
5292
  fillTypes(false);
5293
5293
  fillTypes(new Promise2(INTERNAL));
5294
- debug2.setBounds(Async.firstLineError, util.lastLineError);
5294
+ debug.setBounds(Async.firstLineError, util.lastLineError);
5295
5295
  return Promise2;
5296
5296
  };
5297
5297
  }
@@ -5808,7 +5808,7 @@ var require_ms = __commonJS({
5808
5808
  // ../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js
5809
5809
  var require_common = __commonJS({
5810
5810
  "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js"(exports2, module2) {
5811
- function setup(env2) {
5811
+ function setup(env3) {
5812
5812
  createDebug.debug = createDebug;
5813
5813
  createDebug.default = createDebug;
5814
5814
  createDebug.coerce = coerce;
@@ -5817,8 +5817,8 @@ var require_common = __commonJS({
5817
5817
  createDebug.enabled = enabled;
5818
5818
  createDebug.humanize = require_ms();
5819
5819
  createDebug.destroy = destroy;
5820
- Object.keys(env2).forEach((key) => {
5821
- createDebug[key] = env2[key];
5820
+ Object.keys(env3).forEach((key) => {
5821
+ createDebug[key] = env3[key];
5822
5822
  });
5823
5823
  createDebug.names = [];
5824
5824
  createDebug.skips = [];
@@ -5837,11 +5837,11 @@ var require_common = __commonJS({
5837
5837
  let enableOverride = null;
5838
5838
  let namespacesCache;
5839
5839
  let enabledCache;
5840
- function debug2(...args) {
5841
- if (!debug2.enabled) {
5840
+ function debug(...args) {
5841
+ if (!debug.enabled) {
5842
5842
  return;
5843
5843
  }
5844
- const self2 = debug2;
5844
+ const self2 = debug;
5845
5845
  const curr = Number(/* @__PURE__ */ new Date());
5846
5846
  const ms = curr - (prevTime || curr);
5847
5847
  self2.diff = ms;
@@ -5871,12 +5871,12 @@ var require_common = __commonJS({
5871
5871
  const logFn = self2.log || createDebug.log;
5872
5872
  logFn.apply(self2, args);
5873
5873
  }
5874
- debug2.namespace = namespace;
5875
- debug2.useColors = createDebug.useColors();
5876
- debug2.color = createDebug.selectColor(namespace);
5877
- debug2.extend = extend;
5878
- debug2.destroy = createDebug.destroy;
5879
- Object.defineProperty(debug2, "enabled", {
5874
+ debug.namespace = namespace;
5875
+ debug.useColors = createDebug.useColors();
5876
+ debug.color = createDebug.selectColor(namespace);
5877
+ debug.extend = extend;
5878
+ debug.destroy = createDebug.destroy;
5879
+ Object.defineProperty(debug, "enabled", {
5880
5880
  enumerable: true,
5881
5881
  configurable: false,
5882
5882
  get: () => {
@@ -5894,9 +5894,9 @@ var require_common = __commonJS({
5894
5894
  }
5895
5895
  });
5896
5896
  if (typeof createDebug.init === "function") {
5897
- createDebug.init(debug2);
5897
+ createDebug.init(debug);
5898
5898
  }
5899
- return debug2;
5899
+ return debug;
5900
5900
  }
5901
5901
  function extend(namespace, delimiter) {
5902
5902
  const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
@@ -6155,26 +6155,26 @@ var require_has_flag = __commonJS({
6155
6155
  var require_supports_color = __commonJS({
6156
6156
  "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) {
6157
6157
  "use strict";
6158
- var os2 = require("os");
6159
- var tty = require("tty");
6160
- var hasFlag = require_has_flag();
6161
- var { env: env2 } = process;
6158
+ var os3 = require("os");
6159
+ var tty2 = require("tty");
6160
+ var hasFlag2 = require_has_flag();
6161
+ var { env: env3 } = process;
6162
6162
  var forceColor;
6163
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
6163
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
6164
6164
  forceColor = 0;
6165
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
6165
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
6166
6166
  forceColor = 1;
6167
6167
  }
6168
- if ("FORCE_COLOR" in env2) {
6169
- if (env2.FORCE_COLOR === "true") {
6168
+ if ("FORCE_COLOR" in env3) {
6169
+ if (env3.FORCE_COLOR === "true") {
6170
6170
  forceColor = 1;
6171
- } else if (env2.FORCE_COLOR === "false") {
6171
+ } else if (env3.FORCE_COLOR === "false") {
6172
6172
  forceColor = 0;
6173
6173
  } else {
6174
- forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
6174
+ forceColor = env3.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env3.FORCE_COLOR, 10), 3);
6175
6175
  }
6176
6176
  }
6177
- function translateLevel(level) {
6177
+ function translateLevel2(level) {
6178
6178
  if (level === 0) {
6179
6179
  return false;
6180
6180
  }
@@ -6185,70 +6185,70 @@ var require_supports_color = __commonJS({
6185
6185
  has16m: level >= 3
6186
6186
  };
6187
6187
  }
6188
- function supportsColor(haveStream, streamIsTTY) {
6188
+ function supportsColor2(haveStream, streamIsTTY) {
6189
6189
  if (forceColor === 0) {
6190
6190
  return 0;
6191
6191
  }
6192
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
6192
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
6193
6193
  return 3;
6194
6194
  }
6195
- if (hasFlag("color=256")) {
6195
+ if (hasFlag2("color=256")) {
6196
6196
  return 2;
6197
6197
  }
6198
6198
  if (haveStream && !streamIsTTY && forceColor === void 0) {
6199
6199
  return 0;
6200
6200
  }
6201
6201
  const min = forceColor || 0;
6202
- if (env2.TERM === "dumb") {
6202
+ if (env3.TERM === "dumb") {
6203
6203
  return min;
6204
6204
  }
6205
6205
  if (process.platform === "win32") {
6206
- const osRelease = os2.release().split(".");
6206
+ const osRelease = os3.release().split(".");
6207
6207
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
6208
6208
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
6209
6209
  }
6210
6210
  return 1;
6211
6211
  }
6212
- if ("CI" in env2) {
6213
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
6212
+ if ("CI" in env3) {
6213
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env3) || env3.CI_NAME === "codeship") {
6214
6214
  return 1;
6215
6215
  }
6216
6216
  return min;
6217
6217
  }
6218
- if ("TEAMCITY_VERSION" in env2) {
6219
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
6218
+ if ("TEAMCITY_VERSION" in env3) {
6219
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
6220
6220
  }
6221
- if (env2.COLORTERM === "truecolor") {
6221
+ if (env3.COLORTERM === "truecolor") {
6222
6222
  return 3;
6223
6223
  }
6224
- if ("TERM_PROGRAM" in env2) {
6225
- const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
6226
- switch (env2.TERM_PROGRAM) {
6224
+ if ("TERM_PROGRAM" in env3) {
6225
+ const version = parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
6226
+ switch (env3.TERM_PROGRAM) {
6227
6227
  case "iTerm.app":
6228
6228
  return version >= 3 ? 3 : 2;
6229
6229
  case "Apple_Terminal":
6230
6230
  return 2;
6231
6231
  }
6232
6232
  }
6233
- if (/-256(color)?$/i.test(env2.TERM)) {
6233
+ if (/-256(color)?$/i.test(env3.TERM)) {
6234
6234
  return 2;
6235
6235
  }
6236
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
6236
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
6237
6237
  return 1;
6238
6238
  }
6239
- if ("COLORTERM" in env2) {
6239
+ if ("COLORTERM" in env3) {
6240
6240
  return 1;
6241
6241
  }
6242
6242
  return min;
6243
6243
  }
6244
6244
  function getSupportLevel(stream) {
6245
- const level = supportsColor(stream, stream && stream.isTTY);
6246
- return translateLevel(level);
6245
+ const level = supportsColor2(stream, stream && stream.isTTY);
6246
+ return translateLevel2(level);
6247
6247
  }
6248
6248
  module2.exports = {
6249
6249
  supportsColor: getSupportLevel,
6250
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
6251
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
6250
+ stdout: translateLevel2(supportsColor2(true, tty2.isatty(1))),
6251
+ stderr: translateLevel2(supportsColor2(true, tty2.isatty(2)))
6252
6252
  };
6253
6253
  }
6254
6254
  });
@@ -6256,7 +6256,7 @@ var require_supports_color = __commonJS({
6256
6256
  // ../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js
6257
6257
  var require_node = __commonJS({
6258
6258
  "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js"(exports2, module2) {
6259
- var tty = require("tty");
6259
+ var tty2 = require("tty");
6260
6260
  var util = require("util");
6261
6261
  exports2.init = init;
6262
6262
  exports2.log = log;
@@ -6271,8 +6271,8 @@ var require_node = __commonJS({
6271
6271
  );
6272
6272
  exports2.colors = [6, 2, 3, 4, 5, 1];
6273
6273
  try {
6274
- const supportsColor = require_supports_color();
6275
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
6274
+ const supportsColor2 = require_supports_color();
6275
+ if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
6276
6276
  exports2.colors = [
6277
6277
  20,
6278
6278
  21,
@@ -6374,7 +6374,7 @@ var require_node = __commonJS({
6374
6374
  return obj2;
6375
6375
  }, {});
6376
6376
  function useColors() {
6377
- return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
6377
+ return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
6378
6378
  }
6379
6379
  function formatArgs(args) {
6380
6380
  const { namespace: name, useColors: useColors2 } = this;
@@ -6407,11 +6407,11 @@ var require_node = __commonJS({
6407
6407
  function load() {
6408
6408
  return process.env.DEBUG;
6409
6409
  }
6410
- function init(debug2) {
6411
- debug2.inspectOpts = {};
6410
+ function init(debug) {
6411
+ debug.inspectOpts = {};
6412
6412
  const keys = Object.keys(exports2.inspectOpts);
6413
6413
  for (let i = 0; i < keys.length; i++) {
6414
- debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
6414
+ debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
6415
6415
  }
6416
6416
  }
6417
6417
  module2.exports = require_common()(exports2);
@@ -6480,7 +6480,7 @@ var require_connection = __commonJS({
6480
6480
  var dump_1 = __importDefault(require_dump());
6481
6481
  var debug_1 = __importDefault(require_src());
6482
6482
  var bluebird_1 = __importDefault(require_bluebird());
6483
- var debug2 = (0, debug_1.default)("adb:connection");
6483
+ var debug = (0, debug_1.default)("adb:connection");
6484
6484
  var Connection = class extends events_1.EventEmitter {
6485
6485
  constructor(options) {
6486
6486
  super();
@@ -6501,7 +6501,7 @@ var require_connection = __commonJS({
6501
6501
  this.socket.once("error", reject);
6502
6502
  }).catch((err) => {
6503
6503
  if (err.code === "ECONNREFUSED" && !this.triedStarting) {
6504
- debug2("Connection was refused, let's try starting the server once");
6504
+ debug("Connection was refused, let's try starting the server once");
6505
6505
  this.triedStarting = true;
6506
6506
  return this.startServer().then(() => {
6507
6507
  return this.connect();
@@ -6543,11 +6543,11 @@ var require_connection = __commonJS({
6543
6543
  port = this.options.port;
6544
6544
  }
6545
6545
  const args = port ? ["-P", String(port), "start-server"] : ["start-server"];
6546
- debug2(`Starting ADB server via '${this.options.bin} ${args.join(" ")}'`);
6546
+ debug(`Starting ADB server via '${this.options.bin} ${args.join(" ")}'`);
6547
6547
  return this._exec(args, {});
6548
6548
  }
6549
6549
  _exec(args, options) {
6550
- debug2(`CLI: ${this.options.bin} ${args.join(" ")}`);
6550
+ debug(`CLI: ${this.options.bin} ${args.join(" ")}`);
6551
6551
  return bluebird_1.default.promisify(child_process_1.execFile)(this.options.bin, args, options);
6552
6552
  }
6553
6553
  };
@@ -6565,7 +6565,7 @@ var require_command = __commonJS({
6565
6565
  Object.defineProperty(exports2, "__esModule", { value: true });
6566
6566
  var protocol_1 = __importDefault(require_protocol());
6567
6567
  var debug_1 = __importDefault(require_src());
6568
- var debug2 = (0, debug_1.default)("adb:command");
6568
+ var debug = (0, debug_1.default)("adb:command");
6569
6569
  var RE_SQUOT = /'/g;
6570
6570
  var RE_ESCAPE = /([$`\\!"])/g;
6571
6571
  var Command = class {
@@ -6576,8 +6576,8 @@ var require_command = __commonJS({
6576
6576
  }
6577
6577
  _send(data) {
6578
6578
  const encoded = protocol_1.default.encodeData(data);
6579
- if (debug2.enabled) {
6580
- debug2(`Send '${encoded}'`);
6579
+ if (debug.enabled) {
6580
+ debug(`Send '${encoded}'`);
6581
6581
  }
6582
6582
  this.connection.write(encoded);
6583
6583
  return this;
@@ -25125,7 +25125,7 @@ var require_service = __commonJS({
25125
25125
  var packet_1 = __importDefault(require_packet());
25126
25126
  var bluebird_1 = __importDefault(require_bluebird());
25127
25127
  var protocol_1 = __importDefault(require_protocol());
25128
- var debug2 = (0, debug_1.default)("adb:tcpusb:service");
25128
+ var debug = (0, debug_1.default)("adb:tcpusb:service");
25129
25129
  var PrematurePacketError = class _PrematurePacketError extends Error {
25130
25130
  constructor(packet) {
25131
25131
  super();
@@ -25164,7 +25164,7 @@ var require_service = __commonJS({
25164
25164
  if (this.ended) {
25165
25165
  return this;
25166
25166
  }
25167
- debug2("O:A_CLSE");
25167
+ debug("O:A_CLSE");
25168
25168
  const localId = this.opened ? this.localId : 0;
25169
25169
  try {
25170
25170
  this.socket.write(packet_1.default.assemble(packet_1.default.A_CLSE, localId, this.remoteId, null));
@@ -25195,7 +25195,7 @@ var require_service = __commonJS({
25195
25195
  });
25196
25196
  }
25197
25197
  _handleOpenPacket(packet) {
25198
- debug2("I:A_OPEN", packet);
25198
+ debug("I:A_OPEN", packet);
25199
25199
  return this.client.getDevice(this.serial).transport().then((transport) => {
25200
25200
  this.transport = transport;
25201
25201
  if (this.ended) {
@@ -25205,7 +25205,7 @@ var require_service = __commonJS({
25205
25205
  return this.transport.parser.readAscii(4).then((reply) => {
25206
25206
  switch (reply) {
25207
25207
  case protocol_1.default.OKAY:
25208
- debug2("O:A_OKAY");
25208
+ debug("O:A_OKAY");
25209
25209
  this.socket.write(packet_1.default.assemble(packet_1.default.A_OKAY, this.localId, this.remoteId, null));
25210
25210
  return this.opened = true;
25211
25211
  case protocol_1.default.FAIL:
@@ -25224,7 +25224,7 @@ var require_service = __commonJS({
25224
25224
  });
25225
25225
  }
25226
25226
  _handleOkayPacket(packet) {
25227
- debug2("I:A_OKAY", packet);
25227
+ debug("I:A_OKAY", packet);
25228
25228
  if (this.ended) {
25229
25229
  return;
25230
25230
  }
@@ -25235,7 +25235,7 @@ var require_service = __commonJS({
25235
25235
  return this._tryPush();
25236
25236
  }
25237
25237
  _handleWritePacket(packet) {
25238
- debug2("I:A_WRTE", packet);
25238
+ debug("I:A_WRTE", packet);
25239
25239
  if (this.ended) {
25240
25240
  return;
25241
25241
  }
@@ -25245,11 +25245,11 @@ var require_service = __commonJS({
25245
25245
  if (this.transport && packet.data) {
25246
25246
  this.transport.write(packet.data);
25247
25247
  }
25248
- debug2("O:A_OKAY");
25248
+ debug("O:A_OKAY");
25249
25249
  return this.socket.write(packet_1.default.assemble(packet_1.default.A_OKAY, this.localId, this.remoteId, null));
25250
25250
  }
25251
25251
  _handleClosePacket(packet) {
25252
- debug2("I:A_CLSE", packet);
25252
+ debug("I:A_CLSE", packet);
25253
25253
  if (this.ended) {
25254
25254
  return;
25255
25255
  }
@@ -25264,7 +25264,7 @@ var require_service = __commonJS({
25264
25264
  }
25265
25265
  const chunk = this._readChunk(this.transport.socket);
25266
25266
  if (chunk) {
25267
- debug2("O:A_WRTE");
25267
+ debug("O:A_WRTE");
25268
25268
  this.socket.write(packet_1.default.assemble(packet_1.default.A_WRTE, this.localId, this.remoteId, chunk));
25269
25269
  return this.needAck = true;
25270
25270
  }
@@ -25324,7 +25324,7 @@ var require_socket = __commonJS({
25324
25324
  var auth_1 = __importDefault(require_auth());
25325
25325
  var servicemap_1 = __importDefault(require_servicemap());
25326
25326
  var service_1 = __importDefault(require_service());
25327
- var debug2 = (0, debug_1.default)("adb:tcpusb:socket");
25327
+ var debug = (0, debug_1.default)("adb:tcpusb:socket");
25328
25328
  var UINT32_MAX = 4294967295;
25329
25329
  var UINT16_MAX = 65535;
25330
25330
  var AUTH_TOKEN = 1;
@@ -25365,7 +25365,7 @@ var require_socket = __commonJS({
25365
25365
  (base = this.options).auth || (base.auth = () => bluebird_1.default.resolve(true));
25366
25366
  this.socket.setNoDelay(true);
25367
25367
  this.reader = new packetreader_1.default(this.socket).on("packet", this._handle.bind(this)).on("error", (err) => {
25368
- debug2(`PacketReader error: ${err.message}`);
25368
+ debug(`PacketReader error: ${err.message}`);
25369
25369
  return this.end();
25370
25370
  }).on("end", this.end.bind(this));
25371
25371
  this.remoteAddress = this.socket.remoteAddress;
@@ -25420,27 +25420,27 @@ var require_socket = __commonJS({
25420
25420
  });
25421
25421
  }
25422
25422
  _handleSyncPacket() {
25423
- debug2("I:A_SYNC");
25424
- debug2("O:A_SYNC");
25423
+ debug("I:A_SYNC");
25424
+ debug("O:A_SYNC");
25425
25425
  return this.write(packet_1.default.assemble(packet_1.default.A_SYNC, 1, this.syncToken.next()));
25426
25426
  }
25427
25427
  _handleConnectionPacket(packet) {
25428
- debug2("I:A_CNXN", packet);
25428
+ debug("I:A_CNXN", packet);
25429
25429
  this.version = packet_1.default.swap32(packet.arg0);
25430
25430
  this.maxPayload = Math.min(UINT16_MAX, packet.arg1);
25431
25431
  return this._createToken().then((token) => {
25432
25432
  this.token = token;
25433
- debug2(`Created challenge '${this.token.toString("base64")}'`);
25434
- debug2("O:A_AUTH");
25433
+ debug(`Created challenge '${this.token.toString("base64")}'`);
25434
+ debug("O:A_AUTH");
25435
25435
  return this.write(packet_1.default.assemble(packet_1.default.A_AUTH, AUTH_TOKEN, 0, this.token));
25436
25436
  });
25437
25437
  }
25438
25438
  _handleAuthPacket(packet) {
25439
- debug2("I:A_AUTH", packet);
25439
+ debug("I:A_AUTH", packet);
25440
25440
  switch (packet.arg0) {
25441
25441
  case AUTH_SIGNATURE:
25442
25442
  if (packet.data)
25443
- debug2(`Received signature '${packet.data.toString("base64")}'`);
25443
+ debug(`Received signature '${packet.data.toString("base64")}'`);
25444
25444
  if (!this.signature) {
25445
25445
  this.signature = packet.data;
25446
25446
  }
@@ -25450,7 +25450,7 @@ var require_socket = __commonJS({
25450
25450
  if (key.verify(digest, sig))
25451
25451
  return this._acceptConnection();
25452
25452
  }
25453
- debug2("O:A_AUTH");
25453
+ debug("O:A_AUTH");
25454
25454
  const b = this.write(packet_1.default.assemble(packet_1.default.A_AUTH, AUTH_TOKEN, 0, this.token));
25455
25455
  return bluebird_1.default.resolve(b);
25456
25456
  case AUTH_RSAPUBLICKEY:
@@ -25460,21 +25460,21 @@ var require_socket = __commonJS({
25460
25460
  if (!packet.data || packet.data.length < 2) {
25461
25461
  throw new _Socket.AuthError("Empty RSA public key");
25462
25462
  }
25463
- debug2(`Received RSA public key '${packet.data.toString("base64")}'`);
25463
+ debug(`Received RSA public key '${packet.data.toString("base64")}'`);
25464
25464
  return auth_1.default.parsePublicKey(this._skipNull(packet.data).toString()).then((key) => {
25465
25465
  const digest2 = this.token.toString("binary");
25466
25466
  const sig2 = this.signature.toString("binary");
25467
25467
  if (!key.verify(digest2, sig2)) {
25468
- debug2("Signature mismatch");
25468
+ debug("Signature mismatch");
25469
25469
  throw new _Socket.AuthError("Signature mismatch");
25470
25470
  }
25471
- debug2("Signature verified");
25471
+ debug("Signature verified");
25472
25472
  return key;
25473
25473
  }).then((key) => {
25474
25474
  if (!this.options.auth)
25475
25475
  return;
25476
25476
  return this.options.auth(key).catch(() => {
25477
- debug2("Connection rejected by user-defined auth handler");
25477
+ debug("Connection rejected by user-defined auth handler");
25478
25478
  throw new _Socket.AuthError("Rejected by user-defined handler");
25479
25479
  });
25480
25480
  }).then(() => {
@@ -25491,7 +25491,7 @@ var require_socket = __commonJS({
25491
25491
  _acceptConnection() {
25492
25492
  return this._deviceId().then((id) => {
25493
25493
  this.authorized = true;
25494
- debug2("O:A_CNXN");
25494
+ debug("O:A_CNXN");
25495
25495
  return this.write(packet_1.default.assemble(packet_1.default.A_CNXN, packet_1.default.swap32(this.version), this.maxPayload, id));
25496
25496
  });
25497
25497
  }
@@ -25505,17 +25505,17 @@ var require_socket = __commonJS({
25505
25505
  throw new Error("Empty service name");
25506
25506
  }
25507
25507
  const name = this._skipNull(packet.data);
25508
- debug2(`Calling ${name}`);
25508
+ debug(`Calling ${name}`);
25509
25509
  const service = new service_1.default(this.client, this.serial, localId, remoteId, this);
25510
25510
  return new bluebird_1.default((resolve, reject) => {
25511
25511
  service.on("error", reject);
25512
25512
  service.on("end", resolve);
25513
25513
  this.services.insert(localId, service);
25514
- debug2(`Handling ${this.services.count} services simultaneously`);
25514
+ debug(`Handling ${this.services.count} services simultaneously`);
25515
25515
  return service.handle(packet);
25516
25516
  }).catch(() => true).finally(() => {
25517
25517
  this.services.remove(localId);
25518
- debug2(`Handling ${this.services.count} services simultaneously`);
25518
+ debug(`Handling ${this.services.count} services simultaneously`);
25519
25519
  return service.end();
25520
25520
  });
25521
25521
  }
@@ -25528,7 +25528,7 @@ var require_socket = __commonJS({
25528
25528
  if (service) {
25529
25529
  return service.handle(packet);
25530
25530
  } else {
25531
- debug2("Received a packet to a service that may have been closed already");
25531
+ debug("Received a packet to a service that may have been closed already");
25532
25532
  return Promise.resolve(false);
25533
25533
  }
25534
25534
  }
@@ -25545,7 +25545,7 @@ var require_socket = __commonJS({
25545
25545
  return data.slice(0, -1);
25546
25546
  }
25547
25547
  _deviceId() {
25548
- debug2("Loading device properties to form a standard device ID");
25548
+ debug("Loading device properties to form a standard device ID");
25549
25549
  return this.client.getDevice(this.serial).getProperties().then(function(properties) {
25550
25550
  const id = (function() {
25551
25551
  const ref = ["ro.product.name", "ro.product.model", "ro.product.device"];
@@ -26988,7 +26988,7 @@ var require_sync = __commonJS({
26988
26988
  var TEMP_PATH = "/data/local/tmp";
26989
26989
  var DEFAULT_CHMOD = 420;
26990
26990
  var DATA_MAX_LENGTH = 65536;
26991
- var debug2 = (0, debug_1.default)("adb:sync");
26991
+ var debug = (0, debug_1.default)("adb:sync");
26992
26992
  var Sync = class _Sync extends events_1.EventEmitter {
26993
26993
  static temp(path2) {
26994
26994
  return `${TEMP_PATH}/${Path.basename(path2)}`;
@@ -27246,7 +27246,7 @@ var require_sync = __commonJS({
27246
27246
  }
27247
27247
  _sendCommandWithLength(cmd, length) {
27248
27248
  if (cmd !== protocol_1.default.DATA) {
27249
- debug2(cmd);
27249
+ debug(cmd);
27250
27250
  }
27251
27251
  const payload = Buffer.alloc(cmd.length + 4);
27252
27252
  payload.write(cmd, 0, cmd.length);
@@ -27254,7 +27254,7 @@ var require_sync = __commonJS({
27254
27254
  return this.connection.write(payload);
27255
27255
  }
27256
27256
  _sendCommandWithArg(cmd, arg) {
27257
- debug2(`${cmd} ${arg}`);
27257
+ debug(`${cmd} ${arg}`);
27258
27258
  const arglen = Buffer.byteLength(arg, "utf-8");
27259
27259
  const payload = Buffer.alloc(cmd.length + 4 + arglen);
27260
27260
  let pos = 0;
@@ -27505,7 +27505,7 @@ var require_framebuffer = __commonJS({
27505
27505
  var rgbtransform_1 = __importDefault(require_rgbtransform());
27506
27506
  var protocol_1 = __importDefault(require_protocol());
27507
27507
  var command_1 = __importDefault(require_command());
27508
- var debug2 = (0, debug_1.default)("adb:command:framebuffer");
27508
+ var debug = (0, debug_1.default)("adb:command:framebuffer");
27509
27509
  var FrameBufferCommand = class extends command_1.default {
27510
27510
  execute(format) {
27511
27511
  this._send("framebuffer:");
@@ -27534,13 +27534,13 @@ var require_framebuffer = __commonJS({
27534
27534
  });
27535
27535
  }
27536
27536
  _convert(meta, format, raw) {
27537
- debug2(`Converting raw framebuffer stream into ${format.toUpperCase()}`);
27537
+ debug(`Converting raw framebuffer stream into ${format.toUpperCase()}`);
27538
27538
  switch (meta.format) {
27539
27539
  case "rgb":
27540
27540
  case "rgba":
27541
27541
  break;
27542
27542
  default:
27543
- debug2(`Silently transforming '${meta.format}' into 'rgb' for \`gm\``);
27543
+ debug(`Silently transforming '${meta.format}' into 'rgb' for \`gm\``);
27544
27544
  const transform = new rgbtransform_1.default(meta);
27545
27545
  meta.format = "rgb";
27546
27546
  raw = this.parser.raw().pipe(transform);
@@ -29197,7 +29197,7 @@ var require_DeviceClient = __commonJS({
29197
29197
  var host_serial_1 = require_host_serial();
29198
29198
  var debug_1 = __importDefault(require_src());
29199
29199
  var bluebird_1 = __importDefault(require_bluebird());
29200
- var debug2 = (0, debug_1.default)("adb:client");
29200
+ var debug = (0, debug_1.default)("adb:client");
29201
29201
  var NoUserOptionError = (err) => err.message.indexOf("--user") !== -1;
29202
29202
  var DeviceClient = class {
29203
29203
  constructor(client, serial) {
@@ -29412,7 +29412,7 @@ var require_DeviceClient = __commonJS({
29412
29412
  */
29413
29413
  screencap() {
29414
29414
  return this.transport().then((transport) => new host_transport_1.ScreencapCommand(transport).execute().catch((err) => {
29415
- debug2(`Emulating screencap command due to '${err}'`);
29415
+ debug(`Emulating screencap command due to '${err}'`);
29416
29416
  return this.framebuffer("png");
29417
29417
  }));
29418
29418
  }
@@ -29460,7 +29460,7 @@ var require_DeviceClient = __commonJS({
29460
29460
  const tryConnect = (times) => {
29461
29461
  return this.openTcp(port).then((stream) => adbkit_monkey_1.default.connectStream(stream)).catch((err) => {
29462
29462
  if (times -= 1) {
29463
- debug2(`Monkey can't be reached, trying ${times} more times`);
29463
+ debug(`Monkey can't be reached, trying ${times} more times`);
29464
29464
  return bluebird_1.default.delay(100).then(() => tryConnect(times));
29465
29465
  } else {
29466
29466
  throw err;
@@ -30173,50 +30173,216 @@ var require_dist = __commonJS({
30173
30173
  }
30174
30174
  });
30175
30175
 
30176
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
30177
- var require_common3 = __commonJS({
30178
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports2, module2) {
30179
- function setup(env2) {
30180
- createDebug.debug = createDebug;
30181
- createDebug.default = createDebug;
30182
- createDebug.coerce = coerce;
30183
- createDebug.disable = disable;
30184
- createDebug.enable = enable;
30185
- createDebug.enabled = enabled;
30186
- createDebug.humanize = require_ms();
30187
- createDebug.destroy = destroy;
30188
- Object.keys(env2).forEach((key) => {
30189
- createDebug[key] = env2[key];
30176
+ // src/index.ts
30177
+ var index_exports = {};
30178
+ __export(index_exports, {
30179
+ AdbDeviceKit: () => AdbDeviceKit
30180
+ });
30181
+ module.exports = __toCommonJS(index_exports);
30182
+
30183
+ // src/logic/adbDeviceKit.ts
30184
+ var adbkit = __toESM(require_dist());
30185
+
30186
+ // ../tool-debug/dist/index.mjs
30187
+ var import_node_process = __toESM(require("node:process"), 1);
30188
+ var import_node_os = __toESM(require("node:os"), 1);
30189
+ var import_node_tty = __toESM(require("node:tty"), 1);
30190
+ var __create2 = Object.create;
30191
+ var __defProp2 = Object.defineProperty;
30192
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
30193
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
30194
+ var __getProtoOf2 = Object.getPrototypeOf;
30195
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
30196
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
30197
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
30198
+ }) : x)(function(x) {
30199
+ if (typeof require !== "undefined") return require.apply(this, arguments);
30200
+ throw Error('Dynamic require of "' + x + '" is not supported');
30201
+ });
30202
+ var __esm = (fn, res) => function __init() {
30203
+ return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
30204
+ };
30205
+ var __commonJS2 = (cb, mod) => function __require2() {
30206
+ return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
30207
+ };
30208
+ var __export2 = (target, all) => {
30209
+ for (var name in all)
30210
+ __defProp2(target, name, { get: all[name], enumerable: true });
30211
+ };
30212
+ var __copyProps2 = (to, from, except, desc) => {
30213
+ if (from && typeof from === "object" || typeof from === "function") {
30214
+ for (let key of __getOwnPropNames2(from))
30215
+ if (!__hasOwnProp2.call(to, key) && key !== except)
30216
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
30217
+ }
30218
+ return to;
30219
+ };
30220
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
30221
+ // If the importer is in node compatibility mode or this is not an ESM
30222
+ // file that has been converted to a CommonJS file using a Babel-
30223
+ // compatible transform (i.e. "__esModule" has not been set), then set
30224
+ // "default" to the CommonJS "module.exports" for node compatibility.
30225
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
30226
+ mod
30227
+ ));
30228
+ var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
30229
+ var require_ms2 = __commonJS2({
30230
+ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) {
30231
+ var s = 1e3;
30232
+ var m = s * 60;
30233
+ var h = m * 60;
30234
+ var d = h * 24;
30235
+ var w = d * 7;
30236
+ var y = d * 365.25;
30237
+ module2.exports = function(val, options) {
30238
+ options = options || {};
30239
+ var type = typeof val;
30240
+ if (type === "string" && val.length > 0) {
30241
+ return parse(val);
30242
+ } else if (type === "number" && isFinite(val)) {
30243
+ return options.long ? fmtLong(val) : fmtShort(val);
30244
+ }
30245
+ throw new Error(
30246
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
30247
+ );
30248
+ };
30249
+ function parse(str) {
30250
+ str = String(str);
30251
+ if (str.length > 100) {
30252
+ return;
30253
+ }
30254
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
30255
+ str
30256
+ );
30257
+ if (!match) {
30258
+ return;
30259
+ }
30260
+ var n = parseFloat(match[1]);
30261
+ var type = (match[2] || "ms").toLowerCase();
30262
+ switch (type) {
30263
+ case "years":
30264
+ case "year":
30265
+ case "yrs":
30266
+ case "yr":
30267
+ case "y":
30268
+ return n * y;
30269
+ case "weeks":
30270
+ case "week":
30271
+ case "w":
30272
+ return n * w;
30273
+ case "days":
30274
+ case "day":
30275
+ case "d":
30276
+ return n * d;
30277
+ case "hours":
30278
+ case "hour":
30279
+ case "hrs":
30280
+ case "hr":
30281
+ case "h":
30282
+ return n * h;
30283
+ case "minutes":
30284
+ case "minute":
30285
+ case "mins":
30286
+ case "min":
30287
+ case "m":
30288
+ return n * m;
30289
+ case "seconds":
30290
+ case "second":
30291
+ case "secs":
30292
+ case "sec":
30293
+ case "s":
30294
+ return n * s;
30295
+ case "milliseconds":
30296
+ case "millisecond":
30297
+ case "msecs":
30298
+ case "msec":
30299
+ case "ms":
30300
+ return n;
30301
+ default:
30302
+ return void 0;
30303
+ }
30304
+ }
30305
+ function fmtShort(ms) {
30306
+ var msAbs = Math.abs(ms);
30307
+ if (msAbs >= d) {
30308
+ return Math.round(ms / d) + "d";
30309
+ }
30310
+ if (msAbs >= h) {
30311
+ return Math.round(ms / h) + "h";
30312
+ }
30313
+ if (msAbs >= m) {
30314
+ return Math.round(ms / m) + "m";
30315
+ }
30316
+ if (msAbs >= s) {
30317
+ return Math.round(ms / s) + "s";
30318
+ }
30319
+ return ms + "ms";
30320
+ }
30321
+ function fmtLong(ms) {
30322
+ var msAbs = Math.abs(ms);
30323
+ if (msAbs >= d) {
30324
+ return plural(ms, msAbs, d, "day");
30325
+ }
30326
+ if (msAbs >= h) {
30327
+ return plural(ms, msAbs, h, "hour");
30328
+ }
30329
+ if (msAbs >= m) {
30330
+ return plural(ms, msAbs, m, "minute");
30331
+ }
30332
+ if (msAbs >= s) {
30333
+ return plural(ms, msAbs, s, "second");
30334
+ }
30335
+ return ms + " ms";
30336
+ }
30337
+ function plural(ms, msAbs, n, name) {
30338
+ var isPlural = msAbs >= n * 1.5;
30339
+ return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
30340
+ }
30341
+ }
30342
+ });
30343
+ var require_common2 = __commonJS2({
30344
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/common.js"(exports2, module2) {
30345
+ function setup(env22) {
30346
+ createDebug2.debug = createDebug2;
30347
+ createDebug2.default = createDebug2;
30348
+ createDebug2.coerce = coerce;
30349
+ createDebug2.disable = disable;
30350
+ createDebug2.enable = enable;
30351
+ createDebug2.enabled = enabled;
30352
+ createDebug2.humanize = require_ms2();
30353
+ createDebug2.destroy = destroy;
30354
+ Object.keys(env22).forEach((key) => {
30355
+ createDebug2[key] = env22[key];
30190
30356
  });
30191
- createDebug.names = [];
30192
- createDebug.skips = [];
30193
- createDebug.formatters = {};
30357
+ createDebug2.names = [];
30358
+ createDebug2.skips = [];
30359
+ createDebug2.formatters = {};
30194
30360
  function selectColor(namespace) {
30195
30361
  let hash = 0;
30196
30362
  for (let i = 0; i < namespace.length; i++) {
30197
30363
  hash = (hash << 5) - hash + namespace.charCodeAt(i);
30198
30364
  hash |= 0;
30199
30365
  }
30200
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
30366
+ return createDebug2.colors[Math.abs(hash) % createDebug2.colors.length];
30201
30367
  }
30202
- createDebug.selectColor = selectColor;
30203
- function createDebug(namespace) {
30368
+ createDebug2.selectColor = selectColor;
30369
+ function createDebug2(namespace) {
30204
30370
  let prevTime;
30205
30371
  let enableOverride = null;
30206
30372
  let namespacesCache;
30207
30373
  let enabledCache;
30208
- function debug2(...args) {
30209
- if (!debug2.enabled) {
30374
+ function debug(...args) {
30375
+ if (!debug.enabled) {
30210
30376
  return;
30211
30377
  }
30212
- const self2 = debug2;
30378
+ const self2 = debug;
30213
30379
  const curr = Number(/* @__PURE__ */ new Date());
30214
30380
  const ms = curr - (prevTime || curr);
30215
30381
  self2.diff = ms;
30216
30382
  self2.prev = prevTime;
30217
30383
  self2.curr = curr;
30218
30384
  prevTime = curr;
30219
- args[0] = createDebug.coerce(args[0]);
30385
+ args[0] = createDebug2.coerce(args[0]);
30220
30386
  if (typeof args[0] !== "string") {
30221
30387
  args.unshift("%O");
30222
30388
  }
@@ -30226,7 +30392,7 @@ var require_common3 = __commonJS({
30226
30392
  return "%";
30227
30393
  }
30228
30394
  index++;
30229
- const formatter = createDebug.formatters[format];
30395
+ const formatter = createDebug2.formatters[format];
30230
30396
  if (typeof formatter === "function") {
30231
30397
  const val = args[index];
30232
30398
  match = formatter.call(self2, val);
@@ -30235,25 +30401,25 @@ var require_common3 = __commonJS({
30235
30401
  }
30236
30402
  return match;
30237
30403
  });
30238
- createDebug.formatArgs.call(self2, args);
30239
- const logFn = self2.log || createDebug.log;
30404
+ createDebug2.formatArgs.call(self2, args);
30405
+ const logFn = self2.log || createDebug2.log;
30240
30406
  logFn.apply(self2, args);
30241
30407
  }
30242
- debug2.namespace = namespace;
30243
- debug2.useColors = createDebug.useColors();
30244
- debug2.color = createDebug.selectColor(namespace);
30245
- debug2.extend = extend;
30246
- debug2.destroy = createDebug.destroy;
30247
- Object.defineProperty(debug2, "enabled", {
30408
+ debug.namespace = namespace;
30409
+ debug.useColors = createDebug2.useColors();
30410
+ debug.color = createDebug2.selectColor(namespace);
30411
+ debug.extend = extend;
30412
+ debug.destroy = createDebug2.destroy;
30413
+ Object.defineProperty(debug, "enabled", {
30248
30414
  enumerable: true,
30249
30415
  configurable: false,
30250
30416
  get: () => {
30251
30417
  if (enableOverride !== null) {
30252
30418
  return enableOverride;
30253
30419
  }
30254
- if (namespacesCache !== createDebug.namespaces) {
30255
- namespacesCache = createDebug.namespaces;
30256
- enabledCache = createDebug.enabled(namespace);
30420
+ if (namespacesCache !== createDebug2.namespaces) {
30421
+ namespacesCache = createDebug2.namespaces;
30422
+ enabledCache = createDebug2.enabled(namespace);
30257
30423
  }
30258
30424
  return enabledCache;
30259
30425
  },
@@ -30261,27 +30427,27 @@ var require_common3 = __commonJS({
30261
30427
  enableOverride = v;
30262
30428
  }
30263
30429
  });
30264
- if (typeof createDebug.init === "function") {
30265
- createDebug.init(debug2);
30430
+ if (typeof createDebug2.init === "function") {
30431
+ createDebug2.init(debug);
30266
30432
  }
30267
- return debug2;
30433
+ return debug;
30268
30434
  }
30269
30435
  function extend(namespace, delimiter) {
30270
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
30436
+ const newDebug = createDebug2(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
30271
30437
  newDebug.log = this.log;
30272
30438
  return newDebug;
30273
30439
  }
30274
30440
  function enable(namespaces) {
30275
- createDebug.save(namespaces);
30276
- createDebug.namespaces = namespaces;
30277
- createDebug.names = [];
30278
- createDebug.skips = [];
30441
+ createDebug2.save(namespaces);
30442
+ createDebug2.namespaces = namespaces;
30443
+ createDebug2.names = [];
30444
+ createDebug2.skips = [];
30279
30445
  const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
30280
30446
  for (const ns of split) {
30281
30447
  if (ns[0] === "-") {
30282
- createDebug.skips.push(ns.slice(1));
30448
+ createDebug2.skips.push(ns.slice(1));
30283
30449
  } else {
30284
- createDebug.names.push(ns);
30450
+ createDebug2.names.push(ns);
30285
30451
  }
30286
30452
  }
30287
30453
  }
@@ -30315,19 +30481,19 @@ var require_common3 = __commonJS({
30315
30481
  }
30316
30482
  function disable() {
30317
30483
  const namespaces = [
30318
- ...createDebug.names,
30319
- ...createDebug.skips.map((namespace) => "-" + namespace)
30484
+ ...createDebug2.names,
30485
+ ...createDebug2.skips.map((namespace) => "-" + namespace)
30320
30486
  ].join(",");
30321
- createDebug.enable("");
30487
+ createDebug2.enable("");
30322
30488
  return namespaces;
30323
30489
  }
30324
30490
  function enabled(name) {
30325
- for (const skip of createDebug.skips) {
30491
+ for (const skip of createDebug2.skips) {
30326
30492
  if (matchesTemplate(name, skip)) {
30327
30493
  return false;
30328
30494
  }
30329
30495
  }
30330
- for (const ns of createDebug.names) {
30496
+ for (const ns of createDebug2.names) {
30331
30497
  if (matchesTemplate(name, ns)) {
30332
30498
  return true;
30333
30499
  }
@@ -30343,16 +30509,14 @@ var require_common3 = __commonJS({
30343
30509
  function destroy() {
30344
30510
  console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
30345
30511
  }
30346
- createDebug.enable(createDebug.load());
30347
- return createDebug;
30512
+ createDebug2.enable(createDebug2.load());
30513
+ return createDebug2;
30348
30514
  }
30349
30515
  module2.exports = setup;
30350
30516
  }
30351
30517
  });
30352
-
30353
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
30354
- var require_browser3 = __commonJS({
30355
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports2, module2) {
30518
+ var require_browser2 = __commonJS2({
30519
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/browser.js"(exports2, module2) {
30356
30520
  exports2.formatArgs = formatArgs;
30357
30521
  exports2.save = save;
30358
30522
  exports2.load = load;
@@ -30508,7 +30672,7 @@ var require_browser3 = __commonJS({
30508
30672
  } catch (error) {
30509
30673
  }
30510
30674
  }
30511
- module2.exports = require_common3()(exports2);
30675
+ module2.exports = require_common2()(exports2);
30512
30676
  var { formatters } = module2.exports;
30513
30677
  formatters.j = function(v) {
30514
30678
  try {
@@ -30519,805 +30683,156 @@ var require_browser3 = __commonJS({
30519
30683
  };
30520
30684
  }
30521
30685
  });
30522
-
30523
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
30524
- var require_node3 = __commonJS({
30525
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports2, module2) {
30526
- var tty = require("tty");
30527
- var util = require("util");
30528
- exports2.init = init;
30529
- exports2.log = log;
30530
- exports2.formatArgs = formatArgs;
30531
- exports2.save = save;
30532
- exports2.load = load;
30533
- exports2.useColors = useColors;
30534
- exports2.destroy = util.deprecate(
30535
- () => {
30536
- },
30537
- "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
30538
- );
30539
- exports2.colors = [6, 2, 3, 4, 5, 1];
30540
- try {
30541
- const supportsColor = require_supports_color();
30542
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
30543
- exports2.colors = [
30544
- 20,
30545
- 21,
30546
- 26,
30547
- 27,
30548
- 32,
30549
- 33,
30550
- 38,
30551
- 39,
30552
- 40,
30553
- 41,
30554
- 42,
30555
- 43,
30556
- 44,
30557
- 45,
30558
- 56,
30559
- 57,
30560
- 62,
30561
- 63,
30562
- 68,
30563
- 69,
30564
- 74,
30565
- 75,
30566
- 76,
30567
- 77,
30568
- 78,
30569
- 79,
30570
- 80,
30571
- 81,
30572
- 92,
30573
- 93,
30574
- 98,
30575
- 99,
30576
- 112,
30577
- 113,
30578
- 128,
30579
- 129,
30580
- 134,
30581
- 135,
30582
- 148,
30583
- 149,
30584
- 160,
30585
- 161,
30586
- 162,
30587
- 163,
30588
- 164,
30589
- 165,
30590
- 166,
30591
- 167,
30592
- 168,
30593
- 169,
30594
- 170,
30595
- 171,
30596
- 172,
30597
- 173,
30598
- 178,
30599
- 179,
30600
- 184,
30601
- 185,
30602
- 196,
30603
- 197,
30604
- 198,
30605
- 199,
30606
- 200,
30607
- 201,
30608
- 202,
30609
- 203,
30610
- 204,
30611
- 205,
30612
- 206,
30613
- 207,
30614
- 208,
30615
- 209,
30616
- 214,
30617
- 215,
30618
- 220,
30619
- 221
30620
- ];
30621
- }
30622
- } catch (error) {
30623
- }
30624
- exports2.inspectOpts = Object.keys(process.env).filter((key) => {
30625
- return /^debug_/i.test(key);
30626
- }).reduce((obj2, key) => {
30627
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
30628
- return k.toUpperCase();
30629
- });
30630
- let val = process.env[key];
30631
- if (/^(yes|on|true|enabled)$/i.test(val)) {
30632
- val = true;
30633
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
30634
- val = false;
30635
- } else if (val === "null") {
30636
- val = null;
30637
- } else {
30638
- val = Number(val);
30639
- }
30640
- obj2[prop] = val;
30641
- return obj2;
30642
- }, {});
30643
- function useColors() {
30644
- return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
30645
- }
30646
- function formatArgs(args) {
30647
- const { namespace: name, useColors: useColors2 } = this;
30648
- if (useColors2) {
30649
- const c = this.color;
30650
- const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
30651
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
30652
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
30653
- args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
30654
- } else {
30655
- args[0] = getDate() + name + " " + args[0];
30656
- }
30657
- }
30658
- function getDate() {
30659
- if (exports2.inspectOpts.hideDate) {
30660
- return "";
30661
- }
30662
- return (/* @__PURE__ */ new Date()).toISOString() + " ";
30663
- }
30664
- function log(...args) {
30665
- return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
30666
- }
30667
- function save(namespaces) {
30668
- if (namespaces) {
30669
- process.env.DEBUG = namespaces;
30670
- } else {
30671
- delete process.env.DEBUG;
30672
- }
30673
- }
30674
- function load() {
30675
- return process.env.DEBUG;
30676
- }
30677
- function init(debug2) {
30678
- debug2.inspectOpts = {};
30679
- const keys = Object.keys(exports2.inspectOpts);
30680
- for (let i = 0; i < keys.length; i++) {
30681
- debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
30682
- }
30683
- }
30684
- module2.exports = require_common3()(exports2);
30685
- var { formatters } = module2.exports;
30686
- formatters.o = function(v) {
30687
- this.inspectOpts.colors = this.useColors;
30688
- return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
30689
- };
30690
- formatters.O = function(v) {
30691
- this.inspectOpts.colors = this.useColors;
30692
- return util.inspect(v, this.inspectOpts);
30693
- };
30694
- }
30695
- });
30696
-
30697
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
30698
- var require_src3 = __commonJS({
30699
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports2, module2) {
30700
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
30701
- module2.exports = require_browser3();
30702
- } else {
30703
- module2.exports = require_node3();
30704
- }
30705
- }
30706
- });
30707
-
30708
- // src/index.ts
30709
- var index_exports = {};
30710
- __export(index_exports, {
30711
- AdbDeviceKit: () => AdbDeviceKit
30712
- });
30713
- module.exports = __toCommonJS(index_exports);
30714
-
30715
- // src/logic/adbDeviceKit.ts
30716
- var adbkit = __toESM(require_dist());
30717
-
30718
- // ../tool-debug/dist/index.mjs
30719
- var __create2 = Object.create;
30720
- var __defProp2 = Object.defineProperty;
30721
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
30722
- var __getOwnPropNames2 = Object.getOwnPropertyNames;
30723
- var __getProtoOf2 = Object.getPrototypeOf;
30724
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
30725
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
30726
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
30727
- }) : x)(function(x) {
30728
- if (typeof require !== "undefined") return require.apply(this, arguments);
30729
- throw Error('Dynamic require of "' + x + '" is not supported');
30730
- });
30731
- var __commonJS2 = (cb, mod) => function __require2() {
30732
- return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
30733
- };
30734
- var __copyProps2 = (to, from, except, desc) => {
30735
- if (from && typeof from === "object" || typeof from === "function") {
30736
- for (let key of __getOwnPropNames2(from))
30737
- if (!__hasOwnProp2.call(to, key) && key !== except)
30738
- __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
30739
- }
30740
- return to;
30741
- };
30742
- var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
30743
- // If the importer is in node compatibility mode or this is not an ESM
30744
- // file that has been converted to a CommonJS file using a Babel-
30745
- // compatible transform (i.e. "__esModule" has not been set), then set
30746
- // "default" to the CommonJS "module.exports" for node compatibility.
30747
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
30748
- mod
30749
- ));
30750
- var require_ms2 = __commonJS2({
30751
- "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports2, module2) {
30752
- var s = 1e3;
30753
- var m = s * 60;
30754
- var h = m * 60;
30755
- var d = h * 24;
30756
- var w = d * 7;
30757
- var y = d * 365.25;
30758
- module2.exports = function(val, options) {
30759
- options = options || {};
30760
- var type = typeof val;
30761
- if (type === "string" && val.length > 0) {
30762
- return parse(val);
30763
- } else if (type === "number" && isFinite(val)) {
30764
- return options.long ? fmtLong(val) : fmtShort(val);
30765
- }
30766
- throw new Error(
30767
- "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
30768
- );
30769
- };
30770
- function parse(str) {
30771
- str = String(str);
30772
- if (str.length > 100) {
30773
- return;
30774
- }
30775
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
30776
- str
30777
- );
30778
- if (!match) {
30779
- return;
30780
- }
30781
- var n = parseFloat(match[1]);
30782
- var type = (match[2] || "ms").toLowerCase();
30783
- switch (type) {
30784
- case "years":
30785
- case "year":
30786
- case "yrs":
30787
- case "yr":
30788
- case "y":
30789
- return n * y;
30790
- case "weeks":
30791
- case "week":
30792
- case "w":
30793
- return n * w;
30794
- case "days":
30795
- case "day":
30796
- case "d":
30797
- return n * d;
30798
- case "hours":
30799
- case "hour":
30800
- case "hrs":
30801
- case "hr":
30802
- case "h":
30803
- return n * h;
30804
- case "minutes":
30805
- case "minute":
30806
- case "mins":
30807
- case "min":
30808
- case "m":
30809
- return n * m;
30810
- case "seconds":
30811
- case "second":
30812
- case "secs":
30813
- case "sec":
30814
- case "s":
30815
- return n * s;
30816
- case "milliseconds":
30817
- case "millisecond":
30818
- case "msecs":
30819
- case "msec":
30820
- case "ms":
30821
- return n;
30822
- default:
30823
- return void 0;
30824
- }
30825
- }
30826
- function fmtShort(ms) {
30827
- var msAbs = Math.abs(ms);
30828
- if (msAbs >= d) {
30829
- return Math.round(ms / d) + "d";
30830
- }
30831
- if (msAbs >= h) {
30832
- return Math.round(ms / h) + "h";
30833
- }
30834
- if (msAbs >= m) {
30835
- return Math.round(ms / m) + "m";
30836
- }
30837
- if (msAbs >= s) {
30838
- return Math.round(ms / s) + "s";
30839
- }
30840
- return ms + "ms";
30841
- }
30842
- function fmtLong(ms) {
30843
- var msAbs = Math.abs(ms);
30844
- if (msAbs >= d) {
30845
- return plural(ms, msAbs, d, "day");
30846
- }
30847
- if (msAbs >= h) {
30848
- return plural(ms, msAbs, h, "hour");
30849
- }
30850
- if (msAbs >= m) {
30851
- return plural(ms, msAbs, m, "minute");
30852
- }
30853
- if (msAbs >= s) {
30854
- return plural(ms, msAbs, s, "second");
30855
- }
30856
- return ms + " ms";
30857
- }
30858
- function plural(ms, msAbs, n, name) {
30859
- var isPlural = msAbs >= n * 1.5;
30860
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
30861
- }
30862
- }
30863
- });
30864
- var require_common2 = __commonJS2({
30865
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports2, module2) {
30866
- function setup(env2) {
30867
- createDebug2.debug = createDebug2;
30868
- createDebug2.default = createDebug2;
30869
- createDebug2.coerce = coerce;
30870
- createDebug2.disable = disable;
30871
- createDebug2.enable = enable;
30872
- createDebug2.enabled = enabled;
30873
- createDebug2.humanize = require_ms2();
30874
- createDebug2.destroy = destroy;
30875
- Object.keys(env2).forEach((key) => {
30876
- createDebug2[key] = env2[key];
30877
- });
30878
- createDebug2.names = [];
30879
- createDebug2.skips = [];
30880
- createDebug2.formatters = {};
30881
- function selectColor(namespace) {
30882
- let hash = 0;
30883
- for (let i = 0; i < namespace.length; i++) {
30884
- hash = (hash << 5) - hash + namespace.charCodeAt(i);
30885
- hash |= 0;
30886
- }
30887
- return createDebug2.colors[Math.abs(hash) % createDebug2.colors.length];
30888
- }
30889
- createDebug2.selectColor = selectColor;
30890
- function createDebug2(namespace) {
30891
- let prevTime;
30892
- let enableOverride = null;
30893
- let namespacesCache;
30894
- let enabledCache;
30895
- function debug2(...args) {
30896
- if (!debug2.enabled) {
30897
- return;
30898
- }
30899
- const self2 = debug2;
30900
- const curr = Number(/* @__PURE__ */ new Date());
30901
- const ms = curr - (prevTime || curr);
30902
- self2.diff = ms;
30903
- self2.prev = prevTime;
30904
- self2.curr = curr;
30905
- prevTime = curr;
30906
- args[0] = createDebug2.coerce(args[0]);
30907
- if (typeof args[0] !== "string") {
30908
- args.unshift("%O");
30909
- }
30910
- let index = 0;
30911
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
30912
- if (match === "%%") {
30913
- return "%";
30914
- }
30915
- index++;
30916
- const formatter = createDebug2.formatters[format];
30917
- if (typeof formatter === "function") {
30918
- const val = args[index];
30919
- match = formatter.call(self2, val);
30920
- args.splice(index, 1);
30921
- index--;
30922
- }
30923
- return match;
30924
- });
30925
- createDebug2.formatArgs.call(self2, args);
30926
- const logFn = self2.log || createDebug2.log;
30927
- logFn.apply(self2, args);
30928
- }
30929
- debug2.namespace = namespace;
30930
- debug2.useColors = createDebug2.useColors();
30931
- debug2.color = createDebug2.selectColor(namespace);
30932
- debug2.extend = extend;
30933
- debug2.destroy = createDebug2.destroy;
30934
- Object.defineProperty(debug2, "enabled", {
30935
- enumerable: true,
30936
- configurable: false,
30937
- get: () => {
30938
- if (enableOverride !== null) {
30939
- return enableOverride;
30940
- }
30941
- if (namespacesCache !== createDebug2.namespaces) {
30942
- namespacesCache = createDebug2.namespaces;
30943
- enabledCache = createDebug2.enabled(namespace);
30944
- }
30945
- return enabledCache;
30946
- },
30947
- set: (v) => {
30948
- enableOverride = v;
30949
- }
30950
- });
30951
- if (typeof createDebug2.init === "function") {
30952
- createDebug2.init(debug2);
30953
- }
30954
- return debug2;
30955
- }
30956
- function extend(namespace, delimiter) {
30957
- const newDebug = createDebug2(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
30958
- newDebug.log = this.log;
30959
- return newDebug;
30960
- }
30961
- function enable(namespaces) {
30962
- createDebug2.save(namespaces);
30963
- createDebug2.namespaces = namespaces;
30964
- createDebug2.names = [];
30965
- createDebug2.skips = [];
30966
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
30967
- for (const ns of split) {
30968
- if (ns[0] === "-") {
30969
- createDebug2.skips.push(ns.slice(1));
30970
- } else {
30971
- createDebug2.names.push(ns);
30972
- }
30973
- }
30974
- }
30975
- function matchesTemplate(search, template) {
30976
- let searchIndex = 0;
30977
- let templateIndex = 0;
30978
- let starIndex = -1;
30979
- let matchIndex = 0;
30980
- while (searchIndex < search.length) {
30981
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
30982
- if (template[templateIndex] === "*") {
30983
- starIndex = templateIndex;
30984
- matchIndex = searchIndex;
30985
- templateIndex++;
30986
- } else {
30987
- searchIndex++;
30988
- templateIndex++;
30989
- }
30990
- } else if (starIndex !== -1) {
30991
- templateIndex = starIndex + 1;
30992
- matchIndex++;
30993
- searchIndex = matchIndex;
30994
- } else {
30995
- return false;
30996
- }
30997
- }
30998
- while (templateIndex < template.length && template[templateIndex] === "*") {
30999
- templateIndex++;
31000
- }
31001
- return templateIndex === template.length;
31002
- }
31003
- function disable() {
31004
- const namespaces = [
31005
- ...createDebug2.names,
31006
- ...createDebug2.skips.map((namespace) => "-" + namespace)
31007
- ].join(",");
31008
- createDebug2.enable("");
31009
- return namespaces;
31010
- }
31011
- function enabled(name) {
31012
- for (const skip of createDebug2.skips) {
31013
- if (matchesTemplate(name, skip)) {
31014
- return false;
31015
- }
31016
- }
31017
- for (const ns of createDebug2.names) {
31018
- if (matchesTemplate(name, ns)) {
31019
- return true;
31020
- }
31021
- }
31022
- return false;
31023
- }
31024
- function coerce(val) {
31025
- if (val instanceof Error) {
31026
- return val.stack || val.message;
31027
- }
31028
- return val;
31029
- }
31030
- function destroy() {
31031
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
31032
- }
31033
- createDebug2.enable(createDebug2.load());
31034
- return createDebug2;
31035
- }
31036
- module2.exports = setup;
31037
- }
31038
- });
31039
- var require_browser2 = __commonJS2({
31040
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports2, module2) {
31041
- exports2.formatArgs = formatArgs;
31042
- exports2.save = save;
31043
- exports2.load = load;
31044
- exports2.useColors = useColors;
31045
- exports2.storage = localstorage();
31046
- exports2.destroy = /* @__PURE__ */ (() => {
31047
- let warned = false;
31048
- return () => {
31049
- if (!warned) {
31050
- warned = true;
31051
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
31052
- }
31053
- };
31054
- })();
31055
- exports2.colors = [
31056
- "#0000CC",
31057
- "#0000FF",
31058
- "#0033CC",
31059
- "#0033FF",
31060
- "#0066CC",
31061
- "#0066FF",
31062
- "#0099CC",
31063
- "#0099FF",
31064
- "#00CC00",
31065
- "#00CC33",
31066
- "#00CC66",
31067
- "#00CC99",
31068
- "#00CCCC",
31069
- "#00CCFF",
31070
- "#3300CC",
31071
- "#3300FF",
31072
- "#3333CC",
31073
- "#3333FF",
31074
- "#3366CC",
31075
- "#3366FF",
31076
- "#3399CC",
31077
- "#3399FF",
31078
- "#33CC00",
31079
- "#33CC33",
31080
- "#33CC66",
31081
- "#33CC99",
31082
- "#33CCCC",
31083
- "#33CCFF",
31084
- "#6600CC",
31085
- "#6600FF",
31086
- "#6633CC",
31087
- "#6633FF",
31088
- "#66CC00",
31089
- "#66CC33",
31090
- "#9900CC",
31091
- "#9900FF",
31092
- "#9933CC",
31093
- "#9933FF",
31094
- "#99CC00",
31095
- "#99CC33",
31096
- "#CC0000",
31097
- "#CC0033",
31098
- "#CC0066",
31099
- "#CC0099",
31100
- "#CC00CC",
31101
- "#CC00FF",
31102
- "#CC3300",
31103
- "#CC3333",
31104
- "#CC3366",
31105
- "#CC3399",
31106
- "#CC33CC",
31107
- "#CC33FF",
31108
- "#CC6600",
31109
- "#CC6633",
31110
- "#CC9900",
31111
- "#CC9933",
31112
- "#CCCC00",
31113
- "#CCCC33",
31114
- "#FF0000",
31115
- "#FF0033",
31116
- "#FF0066",
31117
- "#FF0099",
31118
- "#FF00CC",
31119
- "#FF00FF",
31120
- "#FF3300",
31121
- "#FF3333",
31122
- "#FF3366",
31123
- "#FF3399",
31124
- "#FF33CC",
31125
- "#FF33FF",
31126
- "#FF6600",
31127
- "#FF6633",
31128
- "#FF9900",
31129
- "#FF9933",
31130
- "#FFCC00",
31131
- "#FFCC33"
31132
- ];
31133
- function useColors() {
31134
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
31135
- return true;
31136
- }
31137
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
31138
- return false;
31139
- }
31140
- let m;
31141
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
31142
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
31143
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
31144
- typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
31145
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
31146
- }
31147
- function formatArgs(args) {
31148
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
31149
- if (!this.useColors) {
31150
- return;
31151
- }
31152
- const c = "color: " + this.color;
31153
- args.splice(1, 0, c, "color: inherit");
31154
- let index = 0;
31155
- let lastC = 0;
31156
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
31157
- if (match === "%%") {
31158
- return;
31159
- }
31160
- index++;
31161
- if (match === "%c") {
31162
- lastC = index;
31163
- }
31164
- });
31165
- args.splice(lastC, 0, c);
31166
- }
31167
- exports2.log = console.debug || console.log || (() => {
31168
- });
31169
- function save(namespaces) {
31170
- try {
31171
- if (namespaces) {
31172
- exports2.storage.setItem("debug", namespaces);
31173
- } else {
31174
- exports2.storage.removeItem("debug");
31175
- }
31176
- } catch (error) {
31177
- }
31178
- }
31179
- function load() {
31180
- let r;
31181
- try {
31182
- r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
31183
- } catch (error) {
31184
- }
31185
- if (!r && typeof process !== "undefined" && "env" in process) {
31186
- r = process.env.DEBUG;
31187
- }
31188
- return r;
30686
+ var supports_color_exports = {};
30687
+ __export2(supports_color_exports, {
30688
+ createSupportsColor: () => createSupportsColor,
30689
+ default: () => supports_color_default
30690
+ });
30691
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
30692
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
30693
+ const position = argv.indexOf(prefix + flag);
30694
+ const terminatorPosition = argv.indexOf("--");
30695
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
30696
+ }
30697
+ function envForceColor() {
30698
+ if (!("FORCE_COLOR" in env2)) {
30699
+ return;
30700
+ }
30701
+ if (env2.FORCE_COLOR === "true") {
30702
+ return 1;
30703
+ }
30704
+ if (env2.FORCE_COLOR === "false") {
30705
+ return 0;
30706
+ }
30707
+ if (env2.FORCE_COLOR.length === 0) {
30708
+ return 1;
30709
+ }
30710
+ const level = Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
30711
+ if (![0, 1, 2, 3].includes(level)) {
30712
+ return;
30713
+ }
30714
+ return level;
30715
+ }
30716
+ function translateLevel(level) {
30717
+ if (level === 0) {
30718
+ return false;
30719
+ }
30720
+ return {
30721
+ level,
30722
+ hasBasic: true,
30723
+ has256: level >= 2,
30724
+ has16m: level >= 3
30725
+ };
30726
+ }
30727
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
30728
+ const noFlagForceColor = envForceColor();
30729
+ if (noFlagForceColor !== void 0) {
30730
+ flagForceColor = noFlagForceColor;
30731
+ }
30732
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
30733
+ if (forceColor === 0) {
30734
+ return 0;
30735
+ }
30736
+ if (sniffFlags) {
30737
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
30738
+ return 3;
31189
30739
  }
31190
- function localstorage() {
31191
- try {
31192
- return localStorage;
31193
- } catch (error) {
31194
- }
30740
+ if (hasFlag("color=256")) {
30741
+ return 2;
31195
30742
  }
31196
- module2.exports = require_common2()(exports2);
31197
- var { formatters } = module2.exports;
31198
- formatters.j = function(v) {
31199
- try {
31200
- return JSON.stringify(v);
31201
- } catch (error) {
31202
- return "[UnexpectedJSONParseError]: " + error.message;
31203
- }
31204
- };
31205
30743
  }
31206
- });
31207
- var require_has_flag2 = __commonJS2({
31208
- "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports2, module2) {
31209
- "use strict";
31210
- module2.exports = (flag, argv = process.argv) => {
31211
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
31212
- const position = argv.indexOf(prefix + flag);
31213
- const terminatorPosition = argv.indexOf("--");
31214
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
31215
- };
30744
+ if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
30745
+ return 1;
31216
30746
  }
31217
- });
31218
- var require_supports_color2 = __commonJS2({
31219
- "../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) {
31220
- "use strict";
31221
- var os2 = __require("os");
31222
- var tty = __require("tty");
31223
- var hasFlag = require_has_flag2();
31224
- var { env: env2 } = process;
31225
- var forceColor;
31226
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
31227
- forceColor = 0;
31228
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
31229
- forceColor = 1;
30747
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
30748
+ return 0;
30749
+ }
30750
+ const min = forceColor || 0;
30751
+ if (env2.TERM === "dumb") {
30752
+ return min;
30753
+ }
30754
+ if (import_node_process.default.platform === "win32") {
30755
+ const osRelease = import_node_os.default.release().split(".");
30756
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
30757
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
31230
30758
  }
31231
- if ("FORCE_COLOR" in env2) {
31232
- if (env2.FORCE_COLOR === "true") {
31233
- forceColor = 1;
31234
- } else if (env2.FORCE_COLOR === "false") {
31235
- forceColor = 0;
31236
- } else {
31237
- forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
31238
- }
30759
+ return 1;
30760
+ }
30761
+ if ("CI" in env2) {
30762
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2)) {
30763
+ return 3;
31239
30764
  }
31240
- function translateLevel(level) {
31241
- if (level === 0) {
31242
- return false;
31243
- }
31244
- return {
31245
- level,
31246
- hasBasic: true,
31247
- has256: level >= 2,
31248
- has16m: level >= 3
31249
- };
30765
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
30766
+ return 1;
31250
30767
  }
31251
- function supportsColor(haveStream, streamIsTTY) {
31252
- if (forceColor === 0) {
31253
- return 0;
31254
- }
31255
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
31256
- return 3;
31257
- }
31258
- if (hasFlag("color=256")) {
31259
- return 2;
31260
- }
31261
- if (haveStream && !streamIsTTY && forceColor === void 0) {
31262
- return 0;
31263
- }
31264
- const min = forceColor || 0;
31265
- if (env2.TERM === "dumb") {
31266
- return min;
31267
- }
31268
- if (process.platform === "win32") {
31269
- const osRelease = os2.release().split(".");
31270
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
31271
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
31272
- }
31273
- return 1;
31274
- }
31275
- if ("CI" in env2) {
31276
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
31277
- return 1;
31278
- }
31279
- return min;
31280
- }
31281
- if ("TEAMCITY_VERSION" in env2) {
31282
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
31283
- }
31284
- if (env2.COLORTERM === "truecolor") {
31285
- return 3;
31286
- }
31287
- if ("TERM_PROGRAM" in env2) {
31288
- const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
31289
- switch (env2.TERM_PROGRAM) {
31290
- case "iTerm.app":
31291
- return version >= 3 ? 3 : 2;
31292
- case "Apple_Terminal":
31293
- return 2;
31294
- }
30768
+ return min;
30769
+ }
30770
+ if ("TEAMCITY_VERSION" in env2) {
30771
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
30772
+ }
30773
+ if (env2.COLORTERM === "truecolor") {
30774
+ return 3;
30775
+ }
30776
+ if (env2.TERM === "xterm-kitty") {
30777
+ return 3;
30778
+ }
30779
+ if (env2.TERM === "xterm-ghostty") {
30780
+ return 3;
30781
+ }
30782
+ if (env2.TERM === "wezterm") {
30783
+ return 3;
30784
+ }
30785
+ if ("TERM_PROGRAM" in env2) {
30786
+ const version = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
30787
+ switch (env2.TERM_PROGRAM) {
30788
+ case "iTerm.app": {
30789
+ return version >= 3 ? 3 : 2;
31295
30790
  }
31296
- if (/-256(color)?$/i.test(env2.TERM)) {
30791
+ case "Apple_Terminal": {
31297
30792
  return 2;
31298
30793
  }
31299
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
31300
- return 1;
31301
- }
31302
- if ("COLORTERM" in env2) {
31303
- return 1;
31304
- }
31305
- return min;
31306
30794
  }
31307
- function getSupportLevel(stream) {
31308
- const level = supportsColor(stream, stream && stream.isTTY);
31309
- return translateLevel(level);
30795
+ }
30796
+ if (/-256(color)?$/i.test(env2.TERM)) {
30797
+ return 2;
30798
+ }
30799
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
30800
+ return 1;
30801
+ }
30802
+ if ("COLORTERM" in env2) {
30803
+ return 1;
30804
+ }
30805
+ return min;
30806
+ }
30807
+ function createSupportsColor(stream, options = {}) {
30808
+ const level = _supportsColor(stream, {
30809
+ streamIsTTY: stream && stream.isTTY,
30810
+ ...options
30811
+ });
30812
+ return translateLevel(level);
30813
+ }
30814
+ var env2;
30815
+ var flagForceColor;
30816
+ var supportsColor;
30817
+ var supports_color_default;
30818
+ var init_supports_color = __esm({
30819
+ "../../node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js"() {
30820
+ ({ env: env2 } = import_node_process.default);
30821
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
30822
+ flagForceColor = 0;
30823
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
30824
+ flagForceColor = 1;
31310
30825
  }
31311
- module2.exports = {
31312
- supportsColor: getSupportLevel,
31313
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
31314
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
30826
+ supportsColor = {
30827
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
30828
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
31315
30829
  };
30830
+ supports_color_default = supportsColor;
31316
30831
  }
31317
30832
  });
31318
30833
  var require_node2 = __commonJS2({
31319
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports2, module2) {
31320
- var tty = __require("tty");
30834
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/node.js"(exports2, module2) {
30835
+ var tty2 = __require("tty");
31321
30836
  var util = __require("util");
31322
30837
  exports2.init = init;
31323
30838
  exports2.log = log;
@@ -31332,8 +30847,8 @@ var require_node2 = __commonJS2({
31332
30847
  );
31333
30848
  exports2.colors = [6, 2, 3, 4, 5, 1];
31334
30849
  try {
31335
- const supportsColor = require_supports_color2();
31336
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
30850
+ const supportsColor2 = (init_supports_color(), __toCommonJS2(supports_color_exports));
30851
+ if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
31337
30852
  exports2.colors = [
31338
30853
  20,
31339
30854
  21,
@@ -31435,7 +30950,7 @@ var require_node2 = __commonJS2({
31435
30950
  return obj2;
31436
30951
  }, {});
31437
30952
  function useColors() {
31438
- return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty.isatty(process.stderr.fd);
30953
+ return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
31439
30954
  }
31440
30955
  function formatArgs(args) {
31441
30956
  const { namespace: name, useColors: useColors2 } = this;
@@ -31468,11 +30983,11 @@ var require_node2 = __commonJS2({
31468
30983
  function load() {
31469
30984
  return process.env.DEBUG;
31470
30985
  }
31471
- function init(debug2) {
31472
- debug2.inspectOpts = {};
30986
+ function init(debug) {
30987
+ debug.inspectOpts = {};
31473
30988
  const keys = Object.keys(exports2.inspectOpts);
31474
30989
  for (let i = 0; i < keys.length; i++) {
31475
- debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
30990
+ debug.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]];
31476
30991
  }
31477
30992
  }
31478
30993
  module2.exports = require_common2()(exports2);
@@ -31488,7 +31003,7 @@ var require_node2 = __commonJS2({
31488
31003
  }
31489
31004
  });
31490
31005
  var require_src2 = __commonJS2({
31491
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports2, module2) {
31006
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@10.2.2/node_modules/debug/src/index.js"(exports2, module2) {
31492
31007
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
31493
31008
  module2.exports = require_browser2();
31494
31009
  } else {
@@ -31501,20 +31016,56 @@ var logInfo = (0, import_debug.default)("info");
31501
31016
  var logTask = (0, import_debug.default)("task");
31502
31017
  var logError = (0, import_debug.default)("error");
31503
31018
  var logDetail = (0, import_debug.default)("detail");
31019
+ var logDebug = (0, import_debug.default)("debug");
31020
+ var logWarning = (0, import_debug.default)("warning");
31021
+ var logColor = (0, import_debug.default)("color");
31022
+ logInfo.color = "19";
31023
+ logTask.color = "25";
31024
+ logError.color = "1";
31025
+ logDetail.color = "199";
31026
+ logWarning.color = "186";
31027
+ logDebug.color = "211";
31028
+ logColor.enabled = true;
31504
31029
  function logNamespace(namespace) {
31505
- logInfo.namespace = `${namespace}:INFO`;
31506
- logTask.namespace = `${namespace}:TASK`;
31507
- logError.namespace = `${namespace}:ERROR`;
31508
- logDetail.namespace = `${namespace}:DETAIL`;
31509
- logInfo.color = "45";
31510
- logTask.color = "40";
31511
- logError.color = "160";
31512
- logDetail.color = "240";
31030
+ logInfo.namespace = `${namespace}:info`;
31031
+ logTask.namespace = `${namespace}:task`;
31032
+ logError.namespace = `${namespace}:error`;
31033
+ logDetail.namespace = `${namespace}:detail`;
31034
+ logWarning.namespace = `${namespace}:warning`;
31035
+ logDebug.namespace = `${namespace}:debug`;
31036
+ }
31037
+ function setLogLevel(level) {
31038
+ switch (level) {
31039
+ case "info":
31040
+ logInfo.enabled = true;
31041
+ logTask.enabled = true;
31042
+ logError.enabled = true;
31043
+ logWarning.enabled = true;
31044
+ logDetail.enabled = false;
31045
+ logDebug.enabled = false;
31046
+ break;
31047
+ case "debug":
31048
+ logInfo.enabled = true;
31049
+ logTask.enabled = true;
31050
+ logError.enabled = true;
31051
+ logWarning.enabled = true;
31052
+ logDetail.enabled = true;
31053
+ logDebug.enabled = true;
31054
+ break;
31055
+ case "none":
31056
+ logInfo.enabled = false;
31057
+ logTask.enabled = false;
31058
+ logError.enabled = false;
31059
+ logWarning.enabled = false;
31060
+ logDetail.enabled = false;
31061
+ logDebug.enabled = false;
31062
+ break;
31063
+ }
31513
31064
  }
31514
31065
 
31515
31066
  // ../../node_modules/.pnpm/get-port@7.1.0/node_modules/get-port/index.js
31516
31067
  var import_node_net = __toESM(require("node:net"), 1);
31517
- var import_node_os = __toESM(require("node:os"), 1);
31068
+ var import_node_os2 = __toESM(require("node:os"), 1);
31518
31069
  var Locked = class extends Error {
31519
31070
  constructor(port) {
31520
31071
  super(`${port} is locked`);
@@ -31529,7 +31080,7 @@ var minPort = 1024;
31529
31080
  var maxPort = 65535;
31530
31081
  var timeout;
31531
31082
  var getLocalHosts = () => {
31532
- const interfaces = import_node_os.default.networkInterfaces();
31083
+ const interfaces = import_node_os2.default.networkInterfaces();
31533
31084
  const results = /* @__PURE__ */ new Set([void 0, "0.0.0.0"]);
31534
31085
  for (const _interface of Object.values(interfaces)) {
31535
31086
  for (const config of _interface) {
@@ -31688,23 +31239,12 @@ function getAdbBinaryPath() {
31688
31239
  return null;
31689
31240
  }
31690
31241
 
31691
- // src/utils/debug.ts
31692
- var import_debug2 = __toESM(require_src3());
31693
- var logTask2 = (0, import_debug2.default)("adb-kit:task");
31694
- var logInfo2 = (0, import_debug2.default)("adb-kit:info");
31695
- var logWarning = (0, import_debug2.default)("adb-kit:warning");
31696
- var logError2 = (0, import_debug2.default)("adb-kit:error");
31697
- logTask2.color = "40";
31698
- logInfo2.color = "45";
31699
- logWarning.color = "214";
31700
- logError2.color = "160";
31701
-
31702
31242
  // src/logic/adbDeviceKit.ts
31703
31243
  function ensureAdbPathFromResources() {
31704
31244
  const adbPath = getAdbBinaryPath();
31705
31245
  if (adbPath && !process.env.ADB_PATH) {
31706
31246
  process.env.ADB_PATH = adbPath;
31707
- logInfo2(`Using ADB from resources: ${adbPath}`);
31247
+ logInfo(`Using ADB from resources: ${adbPath}`);
31708
31248
  }
31709
31249
  }
31710
31250
  var deviceProps = {
@@ -31738,12 +31278,14 @@ var deviceProps = {
31738
31278
  var AdbDeviceKit = class {
31739
31279
  constructor(deviceId, port) {
31740
31280
  this.port = port;
31281
+ setLogLevel(process.env.LOG_LEVEL ?? "none");
31282
+ logNamespace(`adb:${deviceId}`);
31741
31283
  ensureAdbPathFromResources();
31742
31284
  this.client = adbkit.default.createClient({
31743
31285
  bin: process.env.ADB_PATH ?? getAdbBinaryPath() ?? "."
31744
31286
  });
31745
31287
  this.deviceId = deviceId.split("\\").pop() ?? deviceId;
31746
- logInfo2(`Device ID: ${this.deviceId}`);
31288
+ logInfo(`Device ID: ${this.deviceId}`);
31747
31289
  this.device = this.client.getDevice(this.deviceId);
31748
31290
  }
31749
31291
  client;
@@ -31756,16 +31298,16 @@ var AdbDeviceKit = class {
31756
31298
  }
31757
31299
  async getProperty(adbDevice, property) {
31758
31300
  try {
31759
- logTask2(`Getting property ${property} for device ${this.deviceId}`);
31301
+ logTask(`Getting property ${property} for device ${this.deviceId}`);
31760
31302
  const stream = await adbDevice.shell(`getprop ${deviceProps[property]}`);
31761
- logTask2(`Stream: ${stream}`);
31303
+ logTask(`Stream: ${stream}`);
31762
31304
  const chunks = [];
31763
31305
  for await (const chunk of stream) {
31764
31306
  chunks.push(chunk);
31765
31307
  }
31766
31308
  return Buffer.concat(chunks).toString().trim();
31767
31309
  } catch (error) {
31768
- logError2(`Error getting property ${property} for device ${this.deviceId}: ${error}`);
31310
+ logError(`Error getting property ${property} for device ${this.deviceId}: ${error}`);
31769
31311
  return "";
31770
31312
  }
31771
31313
  }
@@ -31773,22 +31315,22 @@ var AdbDeviceKit = class {
31773
31315
  return this.device.getProperties();
31774
31316
  }
31775
31317
  async getDeviceProperties(properties) {
31776
- logTask2(`Getting properties ${properties.join(", ")} for device ${this.deviceId}`);
31318
+ logTask(`Getting properties ${properties.join(", ")} for device ${this.deviceId}`);
31777
31319
  const propertiesValues = await Promise.all(
31778
31320
  properties.map((property) => this.getProperty(this.device, property))
31779
31321
  );
31780
31322
  return propertiesValues;
31781
31323
  }
31782
31324
  async installApp(appPath) {
31783
- logTask2(`Installing app ${appPath} on device ${this.deviceId}`);
31325
+ logTask(`Installing app ${appPath} on device ${this.deviceId}`);
31784
31326
  await this.device.install(appPath);
31785
31327
  }
31786
31328
  async uninstallApp(packageName) {
31787
- logTask2(`Uninstalling app ${packageName} on device ${this.deviceId}`);
31329
+ logTask(`Uninstalling app ${packageName} on device ${this.deviceId}`);
31788
31330
  await this.device.uninstall(packageName);
31789
31331
  }
31790
31332
  async isAppInstalled(packageName) {
31791
- logTask2(`Checking if app ${packageName} is installed on device ${this.deviceId}`);
31333
+ logTask(`Checking if app ${packageName} is installed on device ${this.deviceId}`);
31792
31334
  return await this.device.isInstalled(packageName);
31793
31335
  }
31794
31336
  /**
@@ -31811,12 +31353,12 @@ var AdbDeviceKit = class {
31811
31353
  const tracker = await this.client.trackDevices();
31812
31354
  return new Promise((resolve, reject) => {
31813
31355
  const timeoutId = setTimeout(() => {
31814
- logError2("Timeout waiting for USB debugging");
31356
+ logError("Timeout waiting for USB debugging");
31815
31357
  reject(new Error("Timeout waiting for USB debugging"));
31816
31358
  }, timeout2);
31817
31359
  tracker.on("remove", (_) => {
31818
31360
  clearTimeout(timeoutId);
31819
- logError2("Device removed from tracker");
31361
+ logError("Device removed from tracker");
31820
31362
  });
31821
31363
  tracker.on("add", (device) => {
31822
31364
  if (device.type === "device") {
@@ -31844,6 +31386,7 @@ var AdbDeviceKit = class {
31844
31386
  return this.devicePort;
31845
31387
  }
31846
31388
  const port = await getPorts({ port: portNumbers(3e4, 31e3) });
31389
+ logDetail(`Forwarding port ${port} to service ${serviceName}`);
31847
31390
  if (await this.device.forward(`tcp:${port}`, serviceName)) {
31848
31391
  this.devicePort = port;
31849
31392
  }
@@ -31859,9 +31402,6 @@ var AdbDeviceKit = class {
31859
31402
  return this.device;
31860
31403
  }
31861
31404
  };
31862
-
31863
- // src/index.ts
31864
- logNamespace("adb-kit");
31865
31405
  // Annotate the CommonJS export names for ESM import in node:
31866
31406
  0 && (module.exports = {
31867
31407
  AdbDeviceKit