@socketsecurity/lib 3.2.7 → 3.3.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 (79) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +18 -240
  3. package/dist/agent.js +10 -10
  4. package/dist/bin.js +4 -4
  5. package/dist/colors.d.ts +37 -0
  6. package/dist/colors.js +58 -0
  7. package/dist/constants/node.js +1 -1
  8. package/dist/constants/packages.js +7 -7
  9. package/dist/constants/process.js +1 -1
  10. package/dist/debug.js +3 -3
  11. package/dist/dlx-binary.js +4 -4
  12. package/dist/effects/text-shimmer.js +1 -1
  13. package/dist/env/ci.js +2 -2
  14. package/dist/env/debug.js +1 -1
  15. package/dist/env/github.js +1 -1
  16. package/dist/env/home.js +1 -1
  17. package/dist/env/locale.js +1 -1
  18. package/dist/env/node-auth-token.js +1 -1
  19. package/dist/env/node-env.js +1 -1
  20. package/dist/env/npm.js +1 -1
  21. package/dist/env/package-manager.js +1 -1
  22. package/dist/env/path.js +1 -1
  23. package/dist/env/pre-commit.js +2 -2
  24. package/dist/env/rewire.d.ts +5 -5
  25. package/dist/env/rewire.js +22 -14
  26. package/dist/env/shell.js +1 -1
  27. package/dist/env/socket-cli-shadow.js +2 -2
  28. package/dist/env/socket-cli.js +2 -2
  29. package/dist/env/socket.js +2 -2
  30. package/dist/env/temp-dir.js +1 -1
  31. package/dist/env/term.js +1 -1
  32. package/dist/env/test.js +3 -3
  33. package/dist/env/windows.js +1 -1
  34. package/dist/env/xdg.js +1 -1
  35. package/dist/external/@inquirer/confirm.js +2 -2
  36. package/dist/external/@inquirer/input.js +2 -2
  37. package/dist/external/@inquirer/password.js +3 -3
  38. package/dist/external/@inquirer/search.js +2 -2
  39. package/dist/external/@inquirer/select.js +3 -3
  40. package/dist/external/@socketregistry/yocto-spinner.js +1 -1
  41. package/dist/external/yoctocolors-cjs.js +1 -1
  42. package/dist/fs.js +4 -6
  43. package/dist/git.js +1 -1
  44. package/dist/github.js +2 -2
  45. package/dist/globs.js +3 -4
  46. package/dist/lifecycle-script-names.d.ts +9 -2
  47. package/dist/lifecycle-script-names.js +11 -4
  48. package/dist/logger.d.ts +106 -81
  49. package/dist/logger.js +234 -205
  50. package/dist/maintained-node-versions.d.ts +3 -2
  51. package/dist/maintained-node-versions.js +11 -4
  52. package/dist/objects.js +1 -1
  53. package/dist/package-default-node-range.d.ts +3 -2
  54. package/dist/package-default-node-range.js +12 -5
  55. package/dist/package-default-socket-categories.d.ts +7 -2
  56. package/dist/package-default-socket-categories.js +11 -4
  57. package/dist/package-extensions.d.ts +3 -2
  58. package/dist/package-extensions.js +11 -4
  59. package/dist/packages/exports.js +1 -1
  60. package/dist/packages/isolation.js +2 -2
  61. package/dist/packages/licenses.js +2 -2
  62. package/dist/packages/manifest.js +3 -3
  63. package/dist/packages/normalize.js +1 -1
  64. package/dist/packages/operations.js +5 -5
  65. package/dist/packages/provenance.js +1 -1
  66. package/dist/path.js +1 -1
  67. package/dist/paths.js +14 -14
  68. package/dist/promises.js +2 -2
  69. package/dist/spawn.js +1 -1
  70. package/dist/spinner.d.ts +29 -51
  71. package/dist/spinner.js +155 -149
  72. package/dist/stdio/prompts.js +1 -1
  73. package/dist/temporary-executor.js +1 -1
  74. package/dist/themes/types.d.ts +2 -1
  75. package/dist/themes/utils.d.ts +1 -1
  76. package/dist/utils/get-ipc.d.ts +0 -1
  77. package/dist/utils/get-ipc.js +4 -4
  78. package/dist/versions.d.ts +1 -1
  79. package/package.json +10 -9
@@ -24,7 +24,7 @@ __export(locale_exports, {
24
24
  getLcMessages: () => getLcMessages
25
25
  });
26
26
  module.exports = __toCommonJS(locale_exports);
27
- var import_rewire = require("./rewire");
27
+ var import_rewire = require("#env/rewire");
28
28
  function getLang() {
29
29
  return (0, import_rewire.getEnvValue)("LANG");
30
30
  }
@@ -22,7 +22,7 @@ __export(node_auth_token_exports, {
22
22
  getNodeAuthToken: () => getNodeAuthToken
23
23
  });
24
24
  module.exports = __toCommonJS(node_auth_token_exports);
25
- var import_rewire = require("./rewire");
25
+ var import_rewire = require("#env/rewire");
26
26
  function getNodeAuthToken() {
27
27
  return (0, import_rewire.getEnvValue)("NODE_AUTH_TOKEN");
28
28
  }
@@ -22,7 +22,7 @@ __export(node_env_exports, {
22
22
  getNodeEnv: () => getNodeEnv
23
23
  });
24
24
  module.exports = __toCommonJS(node_env_exports);
25
- var import_rewire = require("./rewire");
25
+ var import_rewire = require("#env/rewire");
26
26
  function getNodeEnv() {
27
27
  return (0, import_rewire.getEnvValue)("NODE_ENV");
28
28
  }
package/dist/env/npm.js CHANGED
@@ -26,7 +26,7 @@ __export(npm_exports, {
26
26
  getNpmToken: () => getNpmToken
27
27
  });
28
28
  module.exports = __toCommonJS(npm_exports);
29
- var import_rewire = require("./rewire");
29
+ var import_rewire = require("#env/rewire");
30
30
  function getNpmConfigRegistry() {
31
31
  return (0, import_rewire.getEnvValue)("npm_config_registry");
32
32
  }
@@ -24,7 +24,7 @@ __export(package_manager_exports, {
24
24
  getPackageManagerUserAgent: () => getPackageManagerUserAgent
25
25
  });
26
26
  module.exports = __toCommonJS(package_manager_exports);
27
- var import_rewire = require("./rewire");
27
+ var import_rewire = require("#env/rewire");
28
28
  function detectPackageManager() {
29
29
  const userAgent = getPackageManagerUserAgent();
30
30
  if (userAgent) {
package/dist/env/path.js CHANGED
@@ -22,7 +22,7 @@ __export(path_exports, {
22
22
  getPath: () => getPath
23
23
  });
24
24
  module.exports = __toCommonJS(path_exports);
25
- var import_rewire = require("./rewire");
25
+ var import_rewire = require("#env/rewire");
26
26
  function getPath() {
27
27
  return (0, import_rewire.getEnvValue)("PATH");
28
28
  }
@@ -22,8 +22,8 @@ __export(pre_commit_exports, {
22
22
  getPreCommit: () => getPreCommit
23
23
  });
24
24
  module.exports = __toCommonJS(pre_commit_exports);
25
- var import_helpers = require("./helpers");
26
- var import_rewire = require("./rewire");
25
+ var import_helpers = require("#env/helpers");
26
+ var import_rewire = require("#env/rewire");
27
27
  function getPreCommit() {
28
28
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("PRE_COMMIT"));
29
29
  }
@@ -2,8 +2,8 @@
2
2
  * Get an environment variable value, checking overrides first.
3
3
  *
4
4
  * Resolution order:
5
- * 1. AsyncLocalStorage context (set via withEnv)
6
- * 2. Test overrides (set via setEnv in beforeEach)
5
+ * 1. Isolated overrides (temporary - set via withEnv/withEnvSync)
6
+ * 2. Shared overrides (persistent - set via setEnv in beforeEach)
7
7
  * 3. process.env (including vi.stubEnv modifications)
8
8
  *
9
9
  * @internal Used by env getters to support test rewiring
@@ -79,13 +79,13 @@ export declare function hasOverride(key: string): boolean;
79
79
  * @example
80
80
  * ```typescript
81
81
  * // Nested overrides work correctly
82
- * setEnv('CI', '1') // Test-level override
82
+ * setEnv('CI', '1') // Shared override (persistent)
83
83
  *
84
84
  * await withEnv({ CI: '0' }, async () => {
85
- * expect(getCI()).toBe(false) // Context override takes precedence
85
+ * expect(getCI()).toBe(false) // Isolated override takes precedence
86
86
  * })
87
87
  *
88
- * expect(getCI()).toBe(true) // Back to test-level override
88
+ * expect(getCI()).toBe(true) // Back to shared override
89
89
  * ```
90
90
  */
91
91
  export declare function withEnv<T>(overrides: Record<string, string | undefined>, fn: () => T | Promise<T>): Promise<T>;
@@ -29,38 +29,46 @@ __export(rewire_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(rewire_exports);
31
31
  var import_async_hooks = require("async_hooks");
32
- const envStorage = new import_async_hooks.AsyncLocalStorage();
33
- const testOverrides = /* @__PURE__ */ new Map();
32
+ var import_helpers = require("#env/helpers");
33
+ const isolatedOverridesStorage = new import_async_hooks.AsyncLocalStorage();
34
+ const sharedOverridesSymbol = Symbol.for(
35
+ "@socketsecurity/lib/env/rewire/test-overrides"
36
+ );
37
+ const isVitestEnv = (0, import_helpers.envAsBoolean)(process.env.VITEST);
38
+ if (isVitestEnv && !globalThis[sharedOverridesSymbol]) {
39
+ globalThis[sharedOverridesSymbol] = /* @__PURE__ */ new Map();
40
+ }
41
+ const sharedOverrides = globalThis[sharedOverridesSymbol];
34
42
  function getEnvValue(key) {
35
- const contextOverrides = envStorage.getStore();
36
- if (contextOverrides?.has(key)) {
37
- return contextOverrides.get(key);
43
+ const isolatedOverrides = isolatedOverridesStorage.getStore();
44
+ if (isolatedOverrides?.has(key)) {
45
+ return isolatedOverrides.get(key);
38
46
  }
39
- if (testOverrides.has(key)) {
40
- return testOverrides.get(key);
47
+ if (sharedOverrides?.has(key)) {
48
+ return sharedOverrides.get(key);
41
49
  }
42
50
  return process.env[key];
43
51
  }
44
52
  function setEnv(key, value) {
45
- testOverrides.set(key, value);
53
+ sharedOverrides?.set(key, value);
46
54
  }
47
55
  function clearEnv(key) {
48
- testOverrides.delete(key);
56
+ sharedOverrides?.delete(key);
49
57
  }
50
58
  function resetEnv() {
51
- testOverrides.clear();
59
+ sharedOverrides?.clear();
52
60
  }
53
61
  function hasOverride(key) {
54
- const contextOverrides = envStorage.getStore();
55
- return contextOverrides?.has(key) || testOverrides.has(key);
62
+ const isolatedOverrides = isolatedOverridesStorage.getStore();
63
+ return !!(isolatedOverrides?.has(key) || sharedOverrides?.has(key));
56
64
  }
57
65
  async function withEnv(overrides, fn) {
58
66
  const map = new Map(Object.entries(overrides));
59
- return await envStorage.run(map, fn);
67
+ return await isolatedOverridesStorage.run(map, fn);
60
68
  }
61
69
  function withEnvSync(overrides, fn) {
62
70
  const map = new Map(Object.entries(overrides));
63
- return envStorage.run(map, fn);
71
+ return isolatedOverridesStorage.run(map, fn);
64
72
  }
65
73
  // Annotate the CommonJS export names for ESM import in node:
66
74
  0 && (module.exports = {
package/dist/env/shell.js CHANGED
@@ -22,7 +22,7 @@ __export(shell_exports, {
22
22
  getShell: () => getShell
23
23
  });
24
24
  module.exports = __toCommonJS(shell_exports);
25
- var import_rewire = require("./rewire");
25
+ var import_rewire = require("#env/rewire");
26
26
  function getShell() {
27
27
  return (0, import_rewire.getEnvValue)("SHELL");
28
28
  }
@@ -26,8 +26,8 @@ __export(socket_cli_shadow_exports, {
26
26
  getSocketCliShadowSilent: () => getSocketCliShadowSilent
27
27
  });
28
28
  module.exports = __toCommonJS(socket_cli_shadow_exports);
29
- var import_helpers = require("./helpers");
30
- var import_rewire = require("./rewire");
29
+ var import_helpers = require("#env/helpers");
30
+ var import_rewire = require("#env/rewire");
31
31
  function getSocketCliShadowAcceptRisks() {
32
32
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_SHADOW_ACCEPT_RISKS"));
33
33
  }
@@ -35,8 +35,8 @@ __export(socket_cli_exports, {
35
35
  getSocketCliViewAllRisks: () => getSocketCliViewAllRisks
36
36
  });
37
37
  module.exports = __toCommonJS(socket_cli_exports);
38
- var import_helpers = require("./helpers");
39
- var import_rewire = require("./rewire");
38
+ var import_helpers = require("#env/helpers");
39
+ var import_rewire = require("#env/rewire");
40
40
  function getSocketCliAcceptRisks() {
41
41
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_CLI_ACCEPT_RISKS"));
42
42
  }
@@ -36,8 +36,8 @@ __export(socket_exports, {
36
36
  getSocketViewAllRisks: () => getSocketViewAllRisks
37
37
  });
38
38
  module.exports = __toCommonJS(socket_exports);
39
- var import_helpers = require("./helpers");
40
- var import_rewire = require("./rewire");
39
+ var import_helpers = require("#env/helpers");
40
+ var import_rewire = require("#env/rewire");
41
41
  function getSocketAcceptRisks() {
42
42
  return (0, import_helpers.envAsBoolean)((0, import_rewire.getEnvValue)("SOCKET_ACCEPT_RISKS"));
43
43
  }
@@ -24,7 +24,7 @@ __export(temp_dir_exports, {
24
24
  getTmpdir: () => getTmpdir
25
25
  });
26
26
  module.exports = __toCommonJS(temp_dir_exports);
27
- var import_rewire = require("./rewire");
27
+ var import_rewire = require("#env/rewire");
28
28
  function getTmpdir() {
29
29
  return (0, import_rewire.getEnvValue)("TMPDIR");
30
30
  }
package/dist/env/term.js CHANGED
@@ -22,7 +22,7 @@ __export(term_exports, {
22
22
  getTerm: () => getTerm
23
23
  });
24
24
  module.exports = __toCommonJS(term_exports);
25
- var import_rewire = require("./rewire");
25
+ var import_rewire = require("#env/rewire");
26
26
  function getTerm() {
27
27
  return (0, import_rewire.getEnvValue)("TERM");
28
28
  }
package/dist/env/test.js CHANGED
@@ -24,9 +24,9 @@ __export(test_exports, {
24
24
  isTest: () => isTest
25
25
  });
26
26
  module.exports = __toCommonJS(test_exports);
27
- var import_helpers = require("./helpers");
28
- var import_node_env = require("./node-env");
29
- var import_rewire = require("./rewire");
27
+ var import_helpers = require("#env/helpers");
28
+ var import_node_env = require("#env/node-env");
29
+ var import_rewire = require("#env/rewire");
30
30
  function getJestWorkerId() {
31
31
  return (0, import_helpers.envAsString)((0, import_rewire.getEnvValue)("JEST_WORKER_ID"));
32
32
  }
@@ -25,7 +25,7 @@ __export(windows_exports, {
25
25
  getUserprofile: () => getUserprofile
26
26
  });
27
27
  module.exports = __toCommonJS(windows_exports);
28
- var import_rewire = require("./rewire");
28
+ var import_rewire = require("#env/rewire");
29
29
  function getAppdata() {
30
30
  return (0, import_rewire.getEnvValue)("APPDATA");
31
31
  }
package/dist/env/xdg.js CHANGED
@@ -24,7 +24,7 @@ __export(xdg_exports, {
24
24
  getXdgDataHome: () => getXdgDataHome
25
25
  });
26
26
  module.exports = __toCommonJS(xdg_exports);
27
- var import_rewire = require("./rewire");
27
+ var import_rewire = require("#env/rewire");
28
28
  function getXdgCacheHome() {
29
29
  return (0, import_rewire.getEnvValue)("XDG_CACHE_HOME");
30
30
  }
@@ -937,7 +937,7 @@ var require_is_fullwidth_code_point = __commonJS({
937
937
  return false;
938
938
  }, "isFullwidthCodePoint");
939
939
  module2.exports = isFullwidthCodePoint;
940
- module2.module.exports = isFullwidthCodePoint;
940
+ module2.exports.default = isFullwidthCodePoint;
941
941
  }
942
942
  });
943
943
 
@@ -984,7 +984,7 @@ var require_string_width = __commonJS({
984
984
  return width;
985
985
  }, "stringWidth");
986
986
  module2.exports = stringWidth;
987
- module2.module.exports = stringWidth;
987
+ module2.exports.default = stringWidth;
988
988
  }
989
989
  });
990
990
 
@@ -937,7 +937,7 @@ var require_is_fullwidth_code_point = __commonJS({
937
937
  return false;
938
938
  }, "isFullwidthCodePoint");
939
939
  module2.exports = isFullwidthCodePoint;
940
- module2.module.exports = isFullwidthCodePoint;
940
+ module2.exports.default = isFullwidthCodePoint;
941
941
  }
942
942
  });
943
943
 
@@ -984,7 +984,7 @@ var require_string_width = __commonJS({
984
984
  return width;
985
985
  }, "stringWidth");
986
986
  module2.exports = stringWidth;
987
- module2.module.exports = stringWidth;
987
+ module2.exports.default = stringWidth;
988
988
  }
989
989
  });
990
990
 
@@ -937,7 +937,7 @@ var require_is_fullwidth_code_point = __commonJS({
937
937
  return false;
938
938
  }, "isFullwidthCodePoint");
939
939
  module2.exports = isFullwidthCodePoint;
940
- module2.module.exports = isFullwidthCodePoint;
940
+ module2.exports.default = isFullwidthCodePoint;
941
941
  }
942
942
  });
943
943
 
@@ -984,7 +984,7 @@ var require_string_width = __commonJS({
984
984
  return width;
985
985
  }, "stringWidth");
986
986
  module2.exports = stringWidth;
987
- module2.module.exports = stringWidth;
987
+ module2.exports.default = stringWidth;
988
988
  }
989
989
  });
990
990
 
@@ -3150,7 +3150,7 @@ var require_ansi_escapes = __commonJS({
3150
3150
  "node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports2, module2) {
3151
3151
  "use strict";
3152
3152
  var ansiEscapes = module2.exports;
3153
- module2.module.exports = ansiEscapes;
3153
+ module2.exports.default = ansiEscapes;
3154
3154
  var ESC = "\x1B[";
3155
3155
  var OSC = "\x1B]";
3156
3156
  var BEL = "\x07";
@@ -937,7 +937,7 @@ var require_is_fullwidth_code_point = __commonJS({
937
937
  return false;
938
938
  }, "isFullwidthCodePoint");
939
939
  module2.exports = isFullwidthCodePoint;
940
- module2.module.exports = isFullwidthCodePoint;
940
+ module2.exports.default = isFullwidthCodePoint;
941
941
  }
942
942
  });
943
943
 
@@ -984,7 +984,7 @@ var require_string_width = __commonJS({
984
984
  return width;
985
985
  }, "stringWidth");
986
986
  module2.exports = stringWidth;
987
- module2.module.exports = stringWidth;
987
+ module2.exports.default = stringWidth;
988
988
  }
989
989
  });
990
990
 
@@ -937,7 +937,7 @@ var require_is_fullwidth_code_point = __commonJS({
937
937
  return false;
938
938
  }, "isFullwidthCodePoint");
939
939
  module2.exports = isFullwidthCodePoint;
940
- module2.module.exports = isFullwidthCodePoint;
940
+ module2.exports.default = isFullwidthCodePoint;
941
941
  }
942
942
  });
943
943
 
@@ -984,7 +984,7 @@ var require_string_width = __commonJS({
984
984
  return width;
985
985
  }, "stringWidth");
986
986
  module2.exports = stringWidth;
987
- module2.module.exports = stringWidth;
987
+ module2.exports.default = stringWidth;
988
988
  }
989
989
  });
990
990
 
@@ -3150,7 +3150,7 @@ var require_ansi_escapes = __commonJS({
3150
3150
  "node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports2, module2) {
3151
3151
  "use strict";
3152
3152
  var ansiEscapes = module2.exports;
3153
- module2.module.exports = ansiEscapes;
3153
+ module2.exports.default = ansiEscapes;
3154
3154
  var ESC = "\x1B[";
3155
3155
  var OSC = "\x1B]";
3156
3156
  var BEL = "\x07";
@@ -462,4 +462,4 @@ var require_yocto_spinner = __commonJS({
462
462
  // src/external/@socketregistry/yocto-spinner.js
463
463
  var YoctoSpinner = require_yocto_spinner();
464
464
  module.exports = YoctoSpinner;
465
- module.module.exports = YoctoSpinner;
465
+ module.exports.default = YoctoSpinner;
@@ -90,4 +90,4 @@ var require_yoctocolors_cjs = __commonJS({
90
90
  // src/external/yoctocolors-cjs.js
91
91
  var colors = require_yoctocolors_cjs();
92
92
  module.exports = colors;
93
- module.module.exports = colors;
93
+ module.exports.default = colors;
package/dist/fs.js CHANGED
@@ -48,7 +48,7 @@ __export(fs_exports, {
48
48
  writeJsonSync: () => writeJsonSync
49
49
  });
50
50
  module.exports = __toCommonJS(fs_exports);
51
- var import_process = require("./constants/process");
51
+ var import_process = require("#constants/process");
52
52
  var import_arrays = require("./arrays");
53
53
  var import_globs = require("./globs");
54
54
  var import_json = require("./json");
@@ -429,7 +429,7 @@ function getAllowedDirectories() {
429
429
  getOsTmpDir,
430
430
  getSocketCacacheDir,
431
431
  getSocketUserDir
432
- } = require("./paths");
432
+ } = require("#lib/paths");
433
433
  _cachedAllowedDirs = [
434
434
  path.resolve(getOsTmpDir()),
435
435
  path.resolve(getSocketCacacheDir()),
@@ -444,8 +444,7 @@ function invalidatePathCache() {
444
444
  (0, import_rewire.registerCacheInvalidation)(invalidatePathCache);
445
445
  // @__NO_SIDE_EFFECTS__
446
446
  async function safeDelete(filepath, options) {
447
- const del = require("./external/del");
448
- const { deleteAsync } = del;
447
+ const { deleteAsync } = require("./external/del");
449
448
  const opts = { __proto__: null, ...options };
450
449
  const patterns = (0, import_arrays.isArray)(filepath) ? filepath.map(import_path.pathLikeToString) : [(0, import_path.pathLikeToString)(filepath)];
451
450
  let shouldForce = opts.force !== false;
@@ -477,8 +476,7 @@ async function safeDelete(filepath, options) {
477
476
  }
478
477
  // @__NO_SIDE_EFFECTS__
479
478
  function safeDeleteSync(filepath, options) {
480
- const del = require("./external/del");
481
- const { deleteSync } = del;
479
+ const { deleteSync } = require("./external/del");
482
480
  const opts = { __proto__: null, ...options };
483
481
  const patterns = (0, import_arrays.isArray)(filepath) ? filepath.map(import_path.pathLikeToString) : [(0, import_path.pathLikeToString)(filepath)];
484
482
  let shouldForce = opts.force !== false;
package/dist/git.js CHANGED
@@ -45,7 +45,7 @@ __export(git_exports, {
45
45
  });
46
46
  module.exports = __toCommonJS(git_exports);
47
47
  var import_path = __toESM(require("path"));
48
- var import_platform = require("./constants/platform");
48
+ var import_platform = require("#constants/platform");
49
49
  var import_debug = require("./debug");
50
50
  var import_globs = require("./globs");
51
51
  var import_path2 = require("./path");
package/dist/github.js CHANGED
@@ -31,8 +31,8 @@ __export(github_exports, {
31
31
  });
32
32
  module.exports = __toCommonJS(github_exports);
33
33
  var import_cache_with_ttl = require("./cache-with-ttl");
34
- var import_github = require("./env/github");
35
- var import_socket_cli = require("./env/socket-cli");
34
+ var import_github = require("#env/github");
35
+ var import_socket_cli = require("#env/socket-cli");
36
36
  var import_http_request = require("./http-request");
37
37
  var import_spawn = require("./spawn");
38
38
  const GITHUB_API_BASE_URL = "https://api.github.com";
package/dist/globs.js CHANGED
@@ -77,8 +77,7 @@ let _fastGlob;
77
77
  // @__NO_SIDE_EFFECTS__
78
78
  function getFastGlob() {
79
79
  if (_fastGlob === void 0) {
80
- const globExport = require("./external/fast-glob");
81
- _fastGlob = "default" in globExport ? globExport.default : globExport;
80
+ _fastGlob = require("./external/fast-glob");
82
81
  }
83
82
  return _fastGlob;
84
83
  }
@@ -97,14 +96,14 @@ function globStreamLicenses(dirname, options) {
97
96
  if (ignoreOriginals) {
98
97
  const { LICENSE_ORIGINAL_GLOB_RECURSIVE } = (
99
98
  /*@__INLINE__*/
100
- require("./constants/paths")
99
+ require("#constants/paths")
101
100
  );
102
101
  ignore.push(LICENSE_ORIGINAL_GLOB_RECURSIVE);
103
102
  }
104
103
  const fastGlob = /* @__PURE__ */ getFastGlob();
105
104
  const paths = (
106
105
  /*@__INLINE__*/
107
- require("./constants/paths")
106
+ require("#constants/paths")
108
107
  );
109
108
  return fastGlob.globStream(
110
109
  [recursive ? paths.LICENSE_GLOB_RECURSIVE : paths.LICENSE_GLOB],
@@ -1,2 +1,9 @@
1
- declare const _default: Set<string>;
2
- export default _default;
1
+ /**
2
+ * @fileoverview NPM lifecycle script names.
3
+ *
4
+ * Standard npm lifecycle hooks that can be defined in package.json scripts.
5
+ * https://docs.npmjs.com/cli/v10/using-npm/scripts#life-cycle-scripts
6
+ */
7
+ declare const lifecycleScriptNames: Set<string>;
8
+ export default lifecycleScriptNames;
9
+ export { lifecycleScriptNames as 'module.exports' };
@@ -18,8 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  };
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
  var lifecycle_script_names_exports = {};
21
- /* module.exports will be set at end of file */;
22
- var lifecycle_script_names_default = new Set(
21
+ __export(lifecycle_script_names_exports, {
22
+ default: () => lifecycle_script_names_default,
23
+ "module.exports": () => lifecycleScriptNames
24
+ });
25
+ module.exports = __toCommonJS(lifecycle_script_names_exports);
26
+ const lifecycleScriptNames = new Set(
23
27
  [
24
28
  "dependencies",
25
29
  "prepublishOnly",
@@ -35,5 +39,8 @@ var lifecycle_script_names_default = new Set(
35
39
  ].map((n) => [`pre${n}`, n, `post${n}`])
36
40
  ].flat()
37
41
  );
38
-
39
- module.exports = lifecycle_script_names_default;
42
+ var lifecycle_script_names_default = lifecycleScriptNames;
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ "module.exports": null
46
+ });