@socketsecurity/lib 5.24.0 → 5.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/archives.js +4 -4
  3. package/dist/constants/socket.js +1 -1
  4. package/dist/debug.js +5 -5
  5. package/dist/dlx/manifest.js +18 -20
  6. package/dist/errors.js +2 -3
  7. package/dist/external/@npmcli/package-json/lib/read-package.js +3 -2
  8. package/dist/external/@npmcli/package-json.js +19 -18
  9. package/dist/external/@npmcli/promise-spawn.js +3 -2
  10. package/dist/external/adm-zip.js +3 -2
  11. package/dist/external/debug.js +2 -1
  12. package/dist/external/external-pack.js +4 -3
  13. package/dist/external/fast-sort.js +2 -1
  14. package/dist/external/get-east-asian-width.js +3 -2
  15. package/dist/external/npm-pack.js +36 -35
  16. package/dist/external/p-map.js +6 -5
  17. package/dist/external/pico-pack.js +24 -23
  18. package/dist/external/supports-color.js +3 -1
  19. package/dist/external/tar-fs.js +9 -8
  20. package/dist/external/which.js +3 -2
  21. package/dist/external/yargs-parser.js +3 -2
  22. package/dist/fs.js +5 -4
  23. package/dist/git.js +3 -3
  24. package/dist/github.d.ts +3 -3
  25. package/dist/github.js +3 -3
  26. package/dist/http-request.d.ts +2 -2
  27. package/dist/json/edit.js +9 -9
  28. package/dist/json/parse.d.ts +2 -2
  29. package/dist/json/parse.js +2 -2
  30. package/dist/logger.js +5 -6
  31. package/dist/objects.js +28 -39
  32. package/dist/packages/edit.js +3 -3
  33. package/dist/packages/isolation.js +3 -3
  34. package/dist/primordials.d.ts +337 -0
  35. package/dist/primordials.js +828 -0
  36. package/dist/process-lock.js +11 -11
  37. package/dist/releases/github.js +4 -4
  38. package/dist/signal-exit.js +4 -4
  39. package/dist/spawn.d.ts +13 -13
  40. package/dist/stdio/stderr.d.ts +2 -2
  41. package/dist/suppress-warnings.js +2 -2
  42. package/package.json +12 -4
@@ -1,3 +1,4 @@
1
+ const { ArrayBufferIsView: _p_ArrayBufferIsView, ArrayCtor: _p_ArrayCtor, BufferIsBuffer: _p_BufferIsBuffer, DateNow: _p_DateNow, ErrorCtor: _p_ErrorCtor, JSONParse: _p_JSONParse, JSONStringify: _p_JSONStringify, MathRandom: _p_MathRandom, ObjectCreate: _p_ObjectCreate, ObjectDefineProperty: _p_ObjectDefineProperty, ObjectGetOwnPropertyDescriptor: _p_ObjectGetOwnPropertyDescriptor, PromiseCtor: _p_PromiseCtor, RegExpPrototypeTest: _p_RegExpPrototypeTest, SetCtor: _p_SetCtor, StringPrototypeCharAt: _p_StringPrototypeCharAt, StringPrototypeEndsWith: _p_StringPrototypeEndsWith, StringPrototypeSubstring: _p_StringPrototypeSubstring, SymbolFor: _p_SymbolFor, TypeErrorCtor: _p_TypeErrorCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from npm-pack
@@ -43,8 +44,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
43
44
  var require_lib = __commonJS({
44
45
  "node_modules/.pnpm/json-parse-even-better-errors@5.0.0/node_modules/json-parse-even-better-errors/lib/index.js"(exports2, module2) {
45
46
  "use strict";
46
- var INDENT = Symbol.for("indent");
47
- var NEWLINE = Symbol.for("newline");
47
+ var INDENT = _p_SymbolFor("indent");
48
+ var NEWLINE = _p_SymbolFor("newline");
48
49
  var DEFAULT_NEWLINE = "\n";
49
50
  var DEFAULT_INDENT = " ";
50
51
  var BOM = /^\uFEFF/;
@@ -150,7 +151,7 @@ var require_lib = __commonJS({
150
151
  // node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/update-dependencies.js
151
152
  var require_update_dependencies = __commonJS({
152
153
  "node_modules/.pnpm/@npmcli+package-json@7.0.0/node_modules/@npmcli/package-json/lib/update-dependencies.js"(exports2, module2) {
153
- var depTypes = /* @__PURE__ */ new Set([
154
+ var depTypes = /* @__PURE__ */ new _p_SetCtor([
154
155
  "dependencies",
155
156
  "optionalDependencies",
156
157
  "devDependencies",
@@ -911,7 +912,7 @@ var require_lib2 = __commonJS({
911
912
  var require_commonjs = __commonJS({
912
913
  "node_modules/.pnpm/lru-cache@11.2.2/node_modules/lru-cache/dist/commonjs/index.js"(exports2) {
913
914
  "use strict";
914
- Object.defineProperty(exports2, "__esModule", { value: true });
915
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
915
916
  exports2.LRUCache = void 0;
916
917
  var defaultPerf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
917
918
  var warned = /* @__PURE__ */ new Set();
@@ -1699,7 +1700,7 @@ var require_commonjs = __commonJS({
1699
1700
  this.clear();
1700
1701
  for (const [key, entry] of arr) {
1701
1702
  if (entry.start) {
1702
- const age = Date.now() - entry.start;
1703
+ const age = _p_DateNow() - entry.start;
1703
1704
  entry.start = this.#perf.now() - age;
1704
1705
  }
1705
1706
  this.set(key, entry.value, entry);
@@ -2246,7 +2247,7 @@ var require_commonjs = __commonJS({
2246
2247
  this.#removeItemSize(index);
2247
2248
  const v = this.#valList[index];
2248
2249
  if (this.#isBackgroundFetch(v)) {
2249
- v.__abortController.abort(new Error("deleted"));
2250
+ v.__abortController.abort(new _p_ErrorCtor("deleted"));
2250
2251
  } else if (this.#hasDispose || this.#hasDisposeAfter) {
2251
2252
  if (this.#hasDispose) {
2252
2253
  this.#dispose?.(v, k, reason);
@@ -2419,7 +2420,7 @@ var require_hosts = __commonJS({
2419
2420
  }
2420
2421
  const segments = path.split("/");
2421
2422
  let project = segments.pop();
2422
- if (project.endsWith(".git")) {
2423
+ if (_p_StringPrototypeEndsWith(project, ".git")) {
2423
2424
  project = project.slice(0, -4);
2424
2425
  }
2425
2426
  const user = segments.join("/");
@@ -2891,11 +2892,11 @@ var require_commonjs2 = __commonJS({
2891
2892
  var require_commonjs3 = __commonJS({
2892
2893
  "node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/commonjs/index.js"(exports2) {
2893
2894
  "use strict";
2894
- Object.defineProperty(exports2, "__esModule", { value: true });
2895
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
2895
2896
  exports2.EXPANSION_MAX = void 0;
2896
2897
  exports2.expand = expand;
2897
2898
  var balanced_match_1 = require_commonjs2();
2898
- var escSlash = "\0SLASH" + Math.random() + "\0";
2899
+ var escSlash = "\0SLASH" + _p_MathRandom() + "\0";
2899
2900
  var escOpen = "\0OPEN" + Math.random() + "\0";
2900
2901
  var escClose = "\0CLOSE" + Math.random() + "\0";
2901
2902
  var escComma = "\0COMMA" + Math.random() + "\0";
@@ -3219,7 +3220,7 @@ var require_unescape = __commonJS({
3219
3220
  var require_ast = __commonJS({
3220
3221
  "node_modules/.pnpm/minimatch@9.0.6/node_modules/minimatch/dist/commonjs/ast.js"(exports2) {
3221
3222
  "use strict";
3222
- Object.defineProperty(exports2, "__esModule", { value: true });
3223
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
3223
3224
  exports2.AST = void 0;
3224
3225
  var brace_expressions_js_1 = require_brace_expressions();
3225
3226
  var unescape_js_1 = require_unescape();
@@ -3729,7 +3730,7 @@ var require_escape = __commonJS({
3729
3730
  var require_commonjs4 = __commonJS({
3730
3731
  "node_modules/.pnpm/minimatch@9.0.6/node_modules/minimatch/dist/commonjs/index.js"(exports2) {
3731
3732
  "use strict";
3732
- Object.defineProperty(exports2, "__esModule", { value: true });
3733
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
3733
3734
  exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0;
3734
3735
  var brace_expansion_1 = require_commonjs3();
3735
3736
  var assert_valid_pattern_js_1 = require_assert_valid_pattern();
@@ -4490,7 +4491,7 @@ var require_commonjs5 = __commonJS({
4490
4491
  var __importDefault = exports2 && exports2.__importDefault || function(mod) {
4491
4492
  return mod && mod.__esModule ? mod : { "default": mod };
4492
4493
  };
4493
- Object.defineProperty(exports2, "__esModule", { value: true });
4494
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4494
4495
  exports2.Minipass = exports2.isWritable = exports2.isReadable = exports2.isStream = void 0;
4495
4496
  var proc = typeof process === "object" && process ? process : {
4496
4497
  stdout: null,
@@ -4541,7 +4542,7 @@ var require_commonjs5 = __commonJS({
4541
4542
  var nodefer = /* @__PURE__ */ __name((fn) => fn(), "nodefer");
4542
4543
  var isEndish = /* @__PURE__ */ __name((ev) => ev === "end" || ev === "finish" || ev === "prefinish", "isEndish");
4543
4544
  var isArrayBufferLike = /* @__PURE__ */ __name((b) => b instanceof ArrayBuffer || !!b && typeof b === "object" && b.constructor && b.constructor.name === "ArrayBuffer" && b.byteLength >= 0, "isArrayBufferLike");
4544
- var isArrayBufferView = /* @__PURE__ */ __name((b) => !Buffer.isBuffer(b) && ArrayBuffer.isView(b), "isArrayBufferView");
4545
+ var isArrayBufferView = /* @__PURE__ */ __name((b) => !_p_BufferIsBuffer(b) && _p_ArrayBufferIsView(b), "isArrayBufferView");
4545
4546
  var Pipe = class {
4546
4547
  static {
4547
4548
  __name(this, "Pipe");
@@ -4643,7 +4644,7 @@ var require_commonjs5 = __commonJS({
4643
4644
  this[ASYNC] = !!options.async;
4644
4645
  this[DECODER] = this[ENCODING] ? new node_string_decoder_1.StringDecoder(this[ENCODING]) : null;
4645
4646
  if (options && options.debugExposeBuffer === true) {
4646
- Object.defineProperty(this, "buffer", { get: /* @__PURE__ */ __name(() => this[BUFFER], "get") });
4647
+ _p_ObjectDefineProperty(this, "buffer", { get: /* @__PURE__ */ __name(() => this[BUFFER], "get") });
4647
4648
  }
4648
4649
  if (options && options.debugExposePipes === true) {
4649
4650
  Object.defineProperty(this, "pipes", { get: /* @__PURE__ */ __name(() => this[PIPES], "get") });
@@ -5394,7 +5395,7 @@ var require_commonjs6 = __commonJS({
5394
5395
  "use strict";
5395
5396
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
5396
5397
  if (k2 === void 0) k2 = k;
5397
- var desc = Object.getOwnPropertyDescriptor(m, k);
5398
+ var desc = _p_ObjectGetOwnPropertyDescriptor(m, k);
5398
5399
  if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
5399
5400
  desc = { enumerable: true, get: /* @__PURE__ */ __name(function() {
5400
5401
  return m[k];
@@ -5710,7 +5711,7 @@ var require_commonjs6 = __commonJS({
5710
5711
  return this;
5711
5712
  }
5712
5713
  const rootPath = this.getRootString(path);
5713
- const dir = path.substring(rootPath.length);
5714
+ const dir = _p_StringPrototypeSubstring(path, rootPath.length);
5714
5715
  const dirParts = dir.split(this.splitSep);
5715
5716
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
5716
5717
  return result;
@@ -6600,7 +6601,7 @@ var require_commonjs6 = __commonJS({
6600
6601
  for (const part of split) {
6601
6602
  const l = len--;
6602
6603
  prev = prev.child(part, {
6603
- relative: new Array(l).fill("..").join(joinSep),
6604
+ relative: new _p_ArrayCtor(l).fill("..").join(joinSep),
6604
6605
  relativePosix: new Array(l).fill("..").join("/"),
6605
6606
  fullpath: abs += (sawFirst ? "" : joinSep) + part
6606
6607
  });
@@ -6991,7 +6992,7 @@ var require_commonjs6 = __commonJS({
6991
6992
  if (!filter || filter(entry)) {
6992
6993
  results.write(withFileTypes ? entry : entry.fullpath());
6993
6994
  }
6994
- const dirs = /* @__PURE__ */ new Set();
6995
+ const dirs = /* @__PURE__ */ new _p_SetCtor();
6995
6996
  const queue = [entry];
6996
6997
  let processing = 0;
6997
6998
  const process3 = /* @__PURE__ */ __name(() => {
@@ -7229,7 +7230,7 @@ var require_pattern = __commonJS({
7229
7230
  }
7230
7231
  this.length = patternList.length;
7231
7232
  if (index < 0 || index >= this.length) {
7232
- throw new TypeError("index out of range");
7233
+ throw new _p_TypeErrorCtor("index out of range");
7233
7234
  }
7234
7235
  this.#patternList = patternList;
7235
7236
  this.#globList = globList;
@@ -7474,7 +7475,7 @@ var require_ignore = __commonJS({
7474
7475
  var require_processor = __commonJS({
7475
7476
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/processor.js"(exports2) {
7476
7477
  "use strict";
7477
- Object.defineProperty(exports2, "__esModule", { value: true });
7478
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
7478
7479
  exports2.Processor = exports2.SubWalks = exports2.MatchRecord = exports2.HasWalkedCache = void 0;
7479
7480
  var minimatch_1 = require_commonjs4();
7480
7481
  var HasWalkedCache = class _HasWalkedCache {
@@ -7719,7 +7720,7 @@ var require_processor = __commonJS({
7719
7720
  var require_walker = __commonJS({
7720
7721
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/walker.js"(exports2) {
7721
7722
  "use strict";
7722
- Object.defineProperty(exports2, "__esModule", { value: true });
7723
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
7723
7724
  exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0;
7724
7725
  var minipass_1 = require_commonjs5();
7725
7726
  var ignore_js_1 = require_ignore();
@@ -8068,7 +8069,7 @@ var require_walker = __commonJS({
8068
8069
  var require_glob = __commonJS({
8069
8070
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/glob.js"(exports2) {
8070
8071
  "use strict";
8071
- Object.defineProperty(exports2, "__esModule", { value: true });
8072
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
8072
8073
  exports2.Glob = void 0;
8073
8074
  var minimatch_1 = require_commonjs4();
8074
8075
  var node_url_1 = require("node:url");
@@ -8154,7 +8155,7 @@ var require_glob = __commonJS({
8154
8155
  this.stat = !!opts.stat;
8155
8156
  this.ignore = opts.ignore;
8156
8157
  if (this.withFileTypes && this.absolute !== void 0) {
8157
- throw new Error("cannot set absolute and withFileTypes:true");
8158
+ throw new _p_ErrorCtor("cannot set absolute and withFileTypes:true");
8158
8159
  }
8159
8160
  if (typeof pattern === "string") {
8160
8161
  pattern = [pattern];
@@ -8305,7 +8306,7 @@ var require_has_magic = __commonJS({
8305
8306
  var require_commonjs7 = __commonJS({
8306
8307
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/commonjs/index.js"(exports2) {
8307
8308
  "use strict";
8308
- Object.defineProperty(exports2, "__esModule", { value: true });
8309
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
8309
8310
  exports2.glob = exports2.sync = exports2.iterate = exports2.iterateSync = exports2.stream = exports2.streamSync = exports2.Ignore = exports2.hasMagic = exports2.Glob = exports2.unescape = exports2.escape = void 0;
8310
8311
  exports2.globStreamSync = globStreamSync;
8311
8312
  exports2.globStream = globStream;
@@ -9257,7 +9258,7 @@ var require_scan = __commonJS({
9257
9258
  function expectIdstring() {
9258
9259
  var string = idstring();
9259
9260
  if (!string) {
9260
- throw new Error("Expected idstring at offset " + index);
9261
+ throw new _p_ErrorCtor("Expected idstring at offset " + index);
9261
9262
  }
9262
9263
  return string;
9263
9264
  }
@@ -10099,7 +10100,7 @@ var require_normalize_data = __commonJS({
10099
10100
  var require_posix = __commonJS({
10100
10101
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js"(exports2) {
10101
10102
  "use strict";
10102
- Object.defineProperty(exports2, "__esModule", { value: true });
10103
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
10103
10104
  exports2.sync = exports2.isexe = void 0;
10104
10105
  var fs_1 = require("fs");
10105
10106
  var promises_1 = require("fs/promises");
@@ -10152,7 +10153,7 @@ var require_posix = __commonJS({
10152
10153
  var require_win32 = __commonJS({
10153
10154
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js"(exports2) {
10154
10155
  "use strict";
10155
- Object.defineProperty(exports2, "__esModule", { value: true });
10156
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
10156
10157
  exports2.sync = exports2.isexe = void 0;
10157
10158
  var fs_1 = require("fs");
10158
10159
  var promises_1 = require("fs/promises");
@@ -10617,7 +10618,7 @@ var require_retry_operation = __commonJS({
10617
10618
  if (typeof options === "boolean") {
10618
10619
  options = { forever: options };
10619
10620
  }
10620
- this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
10621
+ this._originalTimeouts = _p_JSONParse(_p_JSONStringify(timeouts));
10621
10622
  this._timeouts = timeouts;
10622
10623
  this._options = options || {};
10623
10624
  this._maxRetryTime = options && options.maxRetryTime || Infinity;
@@ -11041,7 +11042,7 @@ var require_ini = __commonJS({
11041
11042
  __name(splitSections, "splitSections");
11042
11043
  var decode = /* @__PURE__ */ __name((str, opt = {}) => {
11043
11044
  opt.bracketedArray = opt.bracketedArray !== false;
11044
- const out = /* @__PURE__ */ Object.create(null);
11045
+ const out = /* @__PURE__ */ _p_ObjectCreate(null);
11045
11046
  let p = out;
11046
11047
  let section = null;
11047
11048
  const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
@@ -12228,7 +12229,7 @@ var require_min_satisfying = __commonJS({
12228
12229
  return null;
12229
12230
  }
12230
12231
  versions.forEach((v) => {
12231
- if (rangeObj.test(v)) {
12232
+ if (_p_RegExpPrototypeTest(rangeObj, v)) {
12232
12233
  if (!min || minSV.compare(v) === 1) {
12233
12234
  min = v;
12234
12235
  minSV = new SemVer(min, options);
@@ -13218,7 +13219,7 @@ var require_npa = __commonJS({
13218
13219
  }
13219
13220
  __name(pathToFileURL, "pathToFileURL");
13220
13221
  function fromFile(res, where) {
13221
- res.type = isFileType.test(res.rawSpec) ? "file" : "directory";
13222
+ res.type = _p_RegExpPrototypeTest(isFileType, res.rawSpec) ? "file" : "directory";
13222
13223
  res.where = where;
13223
13224
  let rawSpec = pathToFileURL(res.rawSpec);
13224
13225
  if (rawSpec.startsWith("file:/")) {
@@ -13659,7 +13660,7 @@ var require_lib7 = __commonJS({
13659
13660
  let negated = 0;
13660
13661
  let match = false;
13661
13662
  for (const entry of list) {
13662
- const negate = entry.charAt(0) === "!";
13663
+ const negate = _p_StringPrototypeCharAt(entry, 0) === "!";
13663
13664
  const test = negate ? entry.slice(1) : entry;
13664
13665
  if (negate) {
13665
13666
  negated++;
@@ -13890,7 +13891,7 @@ ${polMsg}`;
13890
13891
  // node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/clone.js
13891
13892
  var require_clone = __commonJS({
13892
13893
  "node_modules/.pnpm/@npmcli+git@6.0.3/node_modules/@npmcli/git/lib/clone.js"(exports2, module2) {
13893
- var shallowHosts = /* @__PURE__ */ new Set([
13894
+ var shallowHosts = /* @__PURE__ */ new _p_SetCtor([
13894
13895
  "github.com",
13895
13896
  "gist.github.com",
13896
13897
  "gitlab.com",
@@ -16611,7 +16612,7 @@ async function pMap(iterable, mapper, {
16611
16612
  stopOnError = true,
16612
16613
  signal
16613
16614
  } = {}) {
16614
- return new Promise((resolve_, reject_) => {
16615
+ return new _p_PromiseCtor((resolve_, reject_) => {
16615
16616
  if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
16616
16617
  throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
16617
16618
  }
@@ -16731,7 +16732,7 @@ function pMapIterable(iterable, mapper, {
16731
16732
  backpressure = concurrency
16732
16733
  } = {}) {
16733
16734
  if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
16734
- throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
16735
+ throw new _p_TypeErrorCtor(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
16735
16736
  }
16736
16737
  if (typeof mapper !== "function") {
16737
16738
  throw new TypeError("Mapper function is required");
@@ -1,3 +1,4 @@
1
+ const { NumberIsSafeInteger: _p_NumberIsSafeInteger, PromiseCtor: _p_PromiseCtor, TypeErrorCtor: _p_TypeErrorCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from p-map
@@ -38,14 +39,14 @@ async function pMap(iterable, mapper, {
38
39
  stopOnError = true,
39
40
  signal
40
41
  } = {}) {
41
- return new Promise((resolve_, reject_) => {
42
+ return new _p_PromiseCtor((resolve_, reject_) => {
42
43
  if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
43
- throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
44
+ throw new _p_TypeErrorCtor(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
44
45
  }
45
46
  if (typeof mapper !== "function") {
46
- throw new TypeError("Mapper function is required");
47
+ throw new _p_TypeErrorCtor("Mapper function is required");
47
48
  }
48
- if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
49
+ if (!(_p_NumberIsSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
49
50
  throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
50
51
  }
51
52
  const result = [];
@@ -158,7 +159,7 @@ function pMapIterable(iterable, mapper, {
158
159
  backpressure = concurrency
159
160
  } = {}) {
160
161
  if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
161
- throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
162
+ throw new _p_TypeErrorCtor(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
162
163
  }
163
164
  if (typeof mapper !== "function") {
164
165
  throw new TypeError("Mapper function is required");
@@ -1,3 +1,4 @@
1
+ const { ArrayIsArray: _p_ArrayIsArray, NumberIsSafeInteger: _p_NumberIsSafeInteger, ObjectDefineProperty: _p_ObjectDefineProperty, PromiseCtor: _p_PromiseCtor, StringPrototypeStartsWith: _p_StringPrototypeStartsWith, TypeErrorCtor: _p_TypeErrorCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from pico-pack
@@ -1792,8 +1793,8 @@ var require_picomatch2 = __commonJS({
1792
1793
 
1793
1794
  // node_modules/.pnpm/@sindresorhus+merge-streams@2.3.0/node_modules/@sindresorhus/merge-streams/index.js
1794
1795
  function mergeStreams(streams) {
1795
- if (!Array.isArray(streams)) {
1796
- throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
1796
+ if (!_p_ArrayIsArray(streams)) {
1797
+ throw new _p_TypeErrorCtor(`Expected an array, got \`${typeof streams}\`.`);
1797
1798
  }
1798
1799
  for (const stream of streams) {
1799
1800
  validateStream(stream);
@@ -2052,7 +2053,7 @@ var require_fs = __commonJS({
2052
2053
  var require_path = __commonJS({
2053
2054
  "node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js"(exports2) {
2054
2055
  "use strict";
2055
- Object.defineProperty(exports2, "__esModule", { value: true });
2056
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
2056
2057
  exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
2057
2058
  var os = require("os");
2058
2059
  var path6 = require("path");
@@ -2421,7 +2422,7 @@ var require_to_regex_range = __commonJS({
2421
2422
  var isNumber = require_is_number();
2422
2423
  var toRegexRange = /* @__PURE__ */ __name((min, max, options) => {
2423
2424
  if (isNumber(min) === false) {
2424
- throw new TypeError("toRegexRange: expected the first argument to be a number");
2425
+ throw new _p_TypeErrorCtor("toRegexRange: expected the first argument to be a number");
2425
2426
  }
2426
2427
  if (max === void 0 || min === max) {
2427
2428
  return String(min);
@@ -3546,7 +3547,7 @@ var require_micromatch = __commonJS({
3546
3547
  var require_pattern = __commonJS({
3547
3548
  "node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js"(exports2) {
3548
3549
  "use strict";
3549
- Object.defineProperty(exports2, "__esModule", { value: true });
3550
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
3550
3551
  exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
3551
3552
  var path6 = require("path");
3552
3553
  var globParent = require_glob_parent();
@@ -3908,7 +3909,7 @@ var require_string = __commonJS({
3908
3909
  var require_utils3 = __commonJS({
3909
3910
  "node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js"(exports2) {
3910
3911
  "use strict";
3911
- Object.defineProperty(exports2, "__esModule", { value: true });
3912
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
3912
3913
  exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0;
3913
3914
  var array = require_array();
3914
3915
  exports2.array = array;
@@ -3931,7 +3932,7 @@ var require_utils3 = __commonJS({
3931
3932
  var require_tasks = __commonJS({
3932
3933
  "node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js"(exports2) {
3933
3934
  "use strict";
3934
- Object.defineProperty(exports2, "__esModule", { value: true });
3935
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
3935
3936
  exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0;
3936
3937
  var utils = require_utils3();
3937
3938
  function generate(input, settings) {
@@ -4158,7 +4159,7 @@ var require_settings = __commonJS({
4158
4159
  var require_out = __commonJS({
4159
4160
  "node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js"(exports2) {
4160
4161
  "use strict";
4161
- Object.defineProperty(exports2, "__esModule", { value: true });
4162
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4162
4163
  exports2.statSync = exports2.stat = exports2.Settings = void 0;
4163
4164
  var async = require_async();
4164
4165
  var sync = require_sync();
@@ -4257,7 +4258,7 @@ var require_run_parallel = __commonJS({
4257
4258
  var require_constants3 = __commonJS({
4258
4259
  "node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) {
4259
4260
  "use strict";
4260
- Object.defineProperty(exports2, "__esModule", { value: true });
4261
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4261
4262
  exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
4262
4263
  var NODE_PROCESS_VERSION_PARTS = process.versions.node.split(".");
4263
4264
  if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) {
@@ -4334,7 +4335,7 @@ var require_common = __commonJS({
4334
4335
  var require_async2 = __commonJS({
4335
4336
  "node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) {
4336
4337
  "use strict";
4337
- Object.defineProperty(exports2, "__esModule", { value: true });
4338
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4338
4339
  exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
4339
4340
  var fsStat = require_out();
4340
4341
  var rpl = require_run_parallel();
@@ -4450,7 +4451,7 @@ var require_async2 = __commonJS({
4450
4451
  var require_sync2 = __commonJS({
4451
4452
  "node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) {
4452
4453
  "use strict";
4453
- Object.defineProperty(exports2, "__esModule", { value: true });
4454
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4454
4455
  exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0;
4455
4456
  var fsStat = require_out();
4456
4457
  var constants_1 = require_constants3();
@@ -4571,7 +4572,7 @@ var require_settings2 = __commonJS({
4571
4572
  var require_out2 = __commonJS({
4572
4573
  "node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js"(exports2) {
4573
4574
  "use strict";
4574
- Object.defineProperty(exports2, "__esModule", { value: true });
4575
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4575
4576
  exports2.Settings = exports2.scandirSync = exports2.scandir = void 0;
4576
4577
  var async = require_async2();
4577
4578
  var sync = require_sync2();
@@ -4945,7 +4946,7 @@ var require_queue = __commonJS({
4945
4946
  var require_common2 = __commonJS({
4946
4947
  "node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) {
4947
4948
  "use strict";
4948
- Object.defineProperty(exports2, "__esModule", { value: true });
4949
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
4949
4950
  exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0;
4950
4951
  function isFatalError(settings, error) {
4951
4952
  if (settings.errorFilter === null) {
@@ -5319,7 +5320,7 @@ var require_settings3 = __commonJS({
5319
5320
  var require_out3 = __commonJS({
5320
5321
  "node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js"(exports2) {
5321
5322
  "use strict";
5322
- Object.defineProperty(exports2, "__esModule", { value: true });
5323
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
5323
5324
  exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0;
5324
5325
  var async_1 = require_async4();
5325
5326
  var stream_1 = require_stream2();
@@ -6204,7 +6205,7 @@ var require_out4 = __commonJS({
6204
6205
  // node_modules/.pnpm/path-type@6.0.0/node_modules/path-type/index.js
6205
6206
  async function isType(fsStatType, statsMethodName, filePath) {
6206
6207
  if (typeof filePath !== "string") {
6207
- throw new TypeError(`Expected a string, got ${typeof filePath}`);
6208
+ throw new _p_TypeErrorCtor(`Expected a string, got ${typeof filePath}`);
6208
6209
  }
6209
6210
  try {
6210
6211
  const stats = await import_promises2.default[fsStatType](filePath);
@@ -6218,7 +6219,7 @@ async function isType(fsStatType, statsMethodName, filePath) {
6218
6219
  }
6219
6220
  function isTypeSync(fsStatType, statsMethodName, filePath) {
6220
6221
  if (typeof filePath !== "string") {
6221
- throw new TypeError(`Expected a string, got ${typeof filePath}`);
6222
+ throw new _p_TypeErrorCtor(`Expected a string, got ${typeof filePath}`);
6222
6223
  }
6223
6224
  try {
6224
6225
  return import_node_fs.default[fsStatType](filePath)[statsMethodName]();
@@ -6273,7 +6274,7 @@ var init_node = __esm({
6273
6274
  var require_ignore = __commonJS({
6274
6275
  "node_modules/.pnpm/ignore@7.0.5/node_modules/ignore/index.js"(exports2, module2) {
6275
6276
  function makeArray(subject) {
6276
- return Array.isArray(subject) ? subject : [subject];
6277
+ return _p_ArrayIsArray(subject) ? subject : [subject];
6277
6278
  }
6278
6279
  __name(makeArray, "makeArray");
6279
6280
  var UNDEFINED = void 0;
@@ -6738,7 +6739,7 @@ var require_ignore = __commonJS({
6738
6739
 
6739
6740
  // node_modules/.pnpm/slash@5.1.0/node_modules/slash/index.js
6740
6741
  function slash(path6) {
6741
- const isExtendedLengthPath = path6.startsWith("\\\\?\\");
6742
+ const isExtendedLengthPath = _p_StringPrototypeStartsWith(path6, "\\\\?\\");
6742
6743
  if (isExtendedLengthPath) {
6743
6744
  return path6;
6744
6745
  }
@@ -7091,14 +7092,14 @@ async function pMap(iterable, mapper, {
7091
7092
  stopOnError = true,
7092
7093
  signal
7093
7094
  } = {}) {
7094
- return new Promise((resolve_, reject_) => {
7095
+ return new _p_PromiseCtor((resolve_, reject_) => {
7095
7096
  if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) {
7096
- throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
7097
+ throw new _p_TypeErrorCtor(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
7097
7098
  }
7098
7099
  if (typeof mapper !== "function") {
7099
- throw new TypeError("Mapper function is required");
7100
+ throw new _p_TypeErrorCtor("Mapper function is required");
7100
7101
  }
7101
- if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
7102
+ if (!(_p_NumberIsSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) {
7102
7103
  throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
7103
7104
  }
7104
7105
  const result = [];
@@ -7257,7 +7258,7 @@ function safeCheck(file, cwd) {
7257
7258
  }
7258
7259
  }
7259
7260
  function normalizePatterns(patterns) {
7260
- patterns = Array.isArray(patterns) ? patterns : [patterns];
7261
+ patterns = _p_ArrayIsArray(patterns) ? patterns : [patterns];
7261
7262
  patterns = patterns.map((pattern) => {
7262
7263
  if (import_node_process4.default.platform === "win32" && (0, import_is_glob.default)(pattern) === false) {
7263
7264
  return slash(pattern);
@@ -2,7 +2,9 @@
2
2
 
3
3
  // Re-export from external-pack bundle for better deduplication.
4
4
  const { supportsColor } = require('./external-pack')
5
+ const { ObjectAssign: _p_ObjectAssign } = require('../primordials.js')
6
+
5
7
  // supports-color is an ESM module, re-export all properties.
6
8
  const exported = supportsColor.default || supportsColor
7
- Object.assign(module.exports, exported)
9
+ _p_ObjectAssign(module.exports, exported)
8
10
  module.exports.default = exported
@@ -1,3 +1,4 @@
1
+ const { BufferAlloc: _p_BufferAlloc, BufferAllocUnsafe: _p_BufferAllocUnsafe, BufferAllocUnsafeSlow: _p_BufferAllocUnsafeSlow, BufferIsBuffer: _p_BufferIsBuffer, BufferIsEncoding: _p_BufferIsEncoding, ErrorCtor: _p_ErrorCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from tar-fs
@@ -26,7 +27,7 @@ var require_fixed_size = __commonJS({
26
27
  __name(this, "FixedFIFO");
27
28
  }
28
29
  constructor(hwm) {
29
- if (!(hwm > 0) || (hwm - 1 & hwm) !== 0) throw new Error("Max size for a FixedFIFO should be a power of two");
30
+ if (!(hwm > 0) || (hwm - 1 & hwm) !== 0) throw new _p_ErrorCtor("Max size for a FixedFIFO should be a power of two");
30
31
  this.buffer = new Array(hwm);
31
32
  this.mask = hwm - 1;
32
33
  this.top = 0;
@@ -115,23 +116,23 @@ var require_fast_fifo = __commonJS({
115
116
  var require_b4a = __commonJS({
116
117
  "node_modules/.pnpm/b4a@1.8.0/node_modules/b4a/index.js"(exports2, module2) {
117
118
  function isBuffer(value) {
118
- return Buffer.isBuffer(value) || value instanceof Uint8Array;
119
+ return _p_BufferIsBuffer(value) || value instanceof Uint8Array;
119
120
  }
120
121
  __name(isBuffer, "isBuffer");
121
122
  function isEncoding(encoding) {
122
- return Buffer.isEncoding(encoding);
123
+ return _p_BufferIsEncoding(encoding);
123
124
  }
124
125
  __name(isEncoding, "isEncoding");
125
126
  function alloc(size, fill2, encoding) {
126
- return Buffer.alloc(size, fill2, encoding);
127
+ return _p_BufferAlloc(size, fill2, encoding);
127
128
  }
128
129
  __name(alloc, "alloc");
129
130
  function allocUnsafe(size) {
130
- return Buffer.allocUnsafe(size);
131
+ return _p_BufferAllocUnsafe(size);
131
132
  }
132
133
  __name(allocUnsafe, "allocUnsafe");
133
134
  function allocUnsafeSlow(size) {
134
- return Buffer.allocUnsafeSlow(size);
135
+ return _p_BufferAllocUnsafeSlow(size);
135
136
  }
136
137
  __name(allocUnsafeSlow, "allocUnsafeSlow");
137
138
  function byteLength(string, encoding) {
@@ -551,8 +552,8 @@ var require_text_decoder = __commonJS({
551
552
  var require_streamx = __commonJS({
552
553
  "node_modules/.pnpm/streamx@2.25.0/node_modules/streamx/index.js"(exports2, module2) {
553
554
  var { EventEmitter } = require_default();
554
- var STREAM_DESTROYED = new Error("Stream was destroyed");
555
- var PREMATURE_CLOSE = new Error("Premature close");
555
+ var STREAM_DESTROYED = new _p_ErrorCtor("Stream was destroyed");
556
+ var PREMATURE_CLOSE = new _p_ErrorCtor("Premature close");
556
557
  var FIFO = require_fast_fifo();
557
558
  var TextDecoder = require_text_decoder();
558
559
  var qmt = typeof queueMicrotask === "undefined" ? (fn) => global.process.nextTick(fn) : queueMicrotask;
@@ -1,3 +1,4 @@
1
+ const { ObjectDefineProperty: _p_ObjectDefineProperty } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from which
@@ -15,7 +16,7 @@ var __commonJS = (cb, mod) => function __require() {
15
16
  var require_posix = __commonJS({
16
17
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js"(exports2) {
17
18
  "use strict";
18
- Object.defineProperty(exports2, "__esModule", { value: true });
19
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
19
20
  exports2.sync = exports2.isexe = void 0;
20
21
  var fs_1 = require("fs");
21
22
  var promises_1 = require("fs/promises");
@@ -68,7 +69,7 @@ var require_posix = __commonJS({
68
69
  var require_win32 = __commonJS({
69
70
  "node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js"(exports2) {
70
71
  "use strict";
71
- Object.defineProperty(exports2, "__esModule", { value: true });
72
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
72
73
  exports2.sync = exports2.isexe = void 0;
73
74
  var fs_1 = require("fs");
74
75
  var promises_1 = require("fs/promises");
@@ -1,3 +1,4 @@
1
+ const { ArrayIsArray: _p_ArrayIsArray, ObjectCreate: _p_ObjectCreate } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from yargs-parser
@@ -89,7 +90,7 @@ var init_string_utils = __esm({
89
90
 
90
91
  // node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/tokenize-arg-string.js
91
92
  function tokenizeArgString(argString) {
92
- if (Array.isArray(argString)) {
93
+ if (_p_ArrayIsArray(argString)) {
93
94
  return argString.map((e) => typeof e !== "string" ? e + "" : e);
94
95
  }
95
96
  argString = argString.trim();
@@ -140,7 +141,7 @@ var init_yargs_parser_types = __esm({
140
141
  // node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/yargs-parser.js
141
142
  function combineAliases(aliases) {
142
143
  const aliasArrays = [];
143
- const combined = /* @__PURE__ */ Object.create(null);
144
+ const combined = /* @__PURE__ */ _p_ObjectCreate(null);
144
145
  let change = true;
145
146
  Object.keys(aliases).forEach(function(key) {
146
147
  aliasArrays.push([].concat(aliases[key], key));