@socketsecurity/lib 5.23.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 (44) hide show
  1. package/CHANGELOG.md +18 -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 +4125 -165
  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 +6965 -4075
  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 -8
  43. package/dist/env/socket-cli-shadow.d.ts +0 -77
  44. package/dist/env/socket-cli-shadow.js +0 -59
@@ -1,3 +1,4 @@
1
+ const { ObjectDefineProperty: _p_ObjectDefineProperty } = require('../../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from @npmcli/promise-spawn
@@ -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 { BufferFrom: _p_BufferFrom, Uint32ArrayCtor: _p_Uint32ArrayCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from adm-zip
@@ -627,7 +628,7 @@ var require_decoder = __commonJS({
627
628
  "node_modules/.pnpm/adm-zip@0.5.16/node_modules/adm-zip/util/decoder.js"(exports2, module2) {
628
629
  module2.exports = {
629
630
  efs: true,
630
- encode: /* @__PURE__ */ __name((data) => Buffer.from(data, "utf8"), "encode"),
631
+ encode: /* @__PURE__ */ __name((data) => _p_BufferFrom(data, "utf8"), "encode"),
631
632
  decode: /* @__PURE__ */ __name((data) => data.toString("utf8"), "decode")
632
633
  };
633
634
  }
@@ -1086,7 +1087,7 @@ var require_zipcrypto = __commonJS({
1086
1087
  "use strict";
1087
1088
  var { randomFillSync } = require("crypto");
1088
1089
  var Errors = require_errors();
1089
- var crctable = new Uint32Array(256).map((t, crc) => {
1090
+ var crctable = new _p_Uint32ArrayCtor(256).map((t, crc) => {
1090
1091
  for (let j = 0; j < 8; j++) {
1091
1092
  if (0 !== (crc & 1)) {
1092
1093
  crc = crc >>> 1 ^ 3988292384;
@@ -1,3 +1,4 @@
1
+ const { StringPrototypeStartsWith: _p_StringPrototypeStartsWith } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from debug
@@ -54,7 +55,7 @@ __export(supports_color_exports, {
54
55
  default: () => supports_color_default
55
56
  });
56
57
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
57
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
58
+ const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
58
59
  const position = argv.indexOf(prefix + flag);
59
60
  const terminatorPosition = argv.indexOf("--");
60
61
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
@@ -1,3 +1,4 @@
1
+ const { ObjectDefineProperty: _p_ObjectDefineProperty, StringPrototypeStartsWith: _p_StringPrototypeStartsWith } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from external-pack
@@ -75,7 +76,7 @@ var require_cjs = __commonJS({
75
76
  "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/cjs/index.js"(exports2) {
76
77
  "use strict";
77
78
  var _a;
78
- Object.defineProperty(exports2, "__esModule", { value: true });
79
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
79
80
  exports2.unload = exports2.load = exports2.onExit = exports2.signals = void 0;
80
81
  var signals_js_1 = require_signals();
81
82
  Object.defineProperty(exports2, "signals", { enumerable: true, get: /* @__PURE__ */ __name(function() {
@@ -324,7 +325,7 @@ __export(supports_color_exports, {
324
325
  default: () => supports_color_default
325
326
  });
326
327
  function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : import_node_process.default.argv) {
327
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
328
+ const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
328
329
  const position = argv.indexOf(prefix + flag);
329
330
  const terminatorPosition = argv.indexOf("--");
330
331
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
@@ -477,7 +478,7 @@ __export(has_flag_exports, {
477
478
  default: () => hasFlag2
478
479
  });
479
480
  function hasFlag2(flag, argv = import_process.default.argv) {
480
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
481
+ const prefix = _p_StringPrototypeStartsWith(flag, "-") ? "" : flag.length === 1 ? "-" : "--";
481
482
  const position = argv.indexOf(prefix + flag);
482
483
  const terminatorPosition = argv.indexOf("--");
483
484
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
@@ -1,3 +1,4 @@
1
+ const { ObjectDefineProperty: _p_ObjectDefineProperty } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from fast-sort
@@ -15,7 +16,7 @@ var __commonJS = (cb, mod) => function __require() {
15
16
  var require_sort_cjs = __commonJS({
16
17
  "node_modules/.pnpm/fast-sort@3.4.1/node_modules/fast-sort/dist/sort.cjs.js"(exports2) {
17
18
  "use strict";
18
- Object.defineProperty(exports2, "__esModule", { value: true });
19
+ _p_ObjectDefineProperty(exports2, "__esModule", { value: true });
19
20
  var castComparer = /* @__PURE__ */ __name(function(comparer) {
20
21
  return function(a, b, order) {
21
22
  return comparer(a, b, order) * order;
@@ -1,3 +1,4 @@
1
+ const { NumberIsSafeInteger: _p_NumberIsSafeInteger, TypeErrorCtor: _p_TypeErrorCtor } = require('../primordials.js')
1
2
  "use strict";
2
3
  /**
3
4
  * Bundled from get-east-asian-width
@@ -65,8 +66,8 @@ __export(get_east_asian_width_exports, {
65
66
  eastAsianWidthType: () => eastAsianWidthType
66
67
  });
67
68
  function validate(codePoint) {
68
- if (!Number.isSafeInteger(codePoint)) {
69
- throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
69
+ if (!_p_NumberIsSafeInteger(codePoint)) {
70
+ throw new _p_TypeErrorCtor(`Expected a code point, got \`${typeof codePoint}\`.`);
70
71
  }
71
72
  }
72
73
  function eastAsianWidthType(codePoint) {