@socketsecurity/lib 3.4.0 → 4.0.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 (70) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +8 -8
  3. package/dist/agent.js +11 -24
  4. package/dist/bin.d.ts +97 -40
  5. package/dist/bin.js +129 -134
  6. package/dist/cacache.d.ts +5 -2
  7. package/dist/cacache.js +29 -18
  8. package/dist/cache-with-ttl.js +1 -1
  9. package/dist/constants/agents.d.ts +0 -4
  10. package/dist/constants/agents.js +13 -4
  11. package/dist/constants/node.d.ts +1 -0
  12. package/dist/constants/node.js +2 -5
  13. package/dist/constants/packages.js +22 -10
  14. package/dist/dlx-binary.js +9 -17
  15. package/dist/dlx-manifest.js +2 -2
  16. package/dist/dlx-package.js +22 -62
  17. package/dist/dlx.js +14 -14
  18. package/dist/fs.js +19 -24
  19. package/dist/git.d.ts +6 -6
  20. package/dist/git.js +11 -14
  21. package/dist/globs.js +16 -29
  22. package/dist/ipc.d.ts +4 -4
  23. package/dist/ipc.js +3 -3
  24. package/dist/logger.d.ts +0 -25
  25. package/dist/logger.js +0 -26
  26. package/dist/package-default-node-range.js +13 -3
  27. package/dist/package-extensions.d.ts +2 -1
  28. package/dist/package-extensions.js +12 -2
  29. package/dist/packages/editable.d.ts +0 -3
  30. package/dist/packages/editable.js +34 -24
  31. package/dist/packages/isolation.js +32 -32
  32. package/dist/packages/licenses.js +18 -32
  33. package/dist/packages/manifest.js +18 -33
  34. package/dist/packages/normalize.js +19 -43
  35. package/dist/packages/operations.js +33 -80
  36. package/dist/packages/provenance.js +14 -4
  37. package/dist/packages/specs.js +13 -12
  38. package/dist/packages/validation.js +12 -10
  39. package/dist/packages.d.ts +1 -1
  40. package/dist/packages.js +3 -3
  41. package/dist/paths/dirnames.d.ts +13 -0
  42. package/dist/paths/dirnames.js +50 -0
  43. package/dist/paths/exts.d.ts +18 -0
  44. package/dist/paths/exts.js +68 -0
  45. package/dist/paths/filenames.d.ts +16 -0
  46. package/dist/paths/filenames.js +62 -0
  47. package/dist/paths/globs.d.ts +10 -0
  48. package/dist/paths/globs.js +44 -0
  49. package/dist/{path.d.ts → paths/normalize.d.ts} +41 -0
  50. package/dist/{path.js → paths/normalize.js} +17 -4
  51. package/dist/{packages/paths.js → paths/packages.js} +8 -8
  52. package/dist/{paths.js → paths/socket.js} +29 -65
  53. package/dist/sea.js +2 -2
  54. package/dist/shadow.js +3 -3
  55. package/dist/sorts.js +12 -2
  56. package/dist/spawn.d.ts +15 -12
  57. package/dist/spawn.js +42 -30
  58. package/dist/spinner.d.ts +2 -6
  59. package/dist/spinner.js +6 -39
  60. package/dist/stdio/prompts.d.ts +8 -10
  61. package/dist/stdio/prompts.js +14 -12
  62. package/dist/streams.d.ts +0 -4
  63. package/dist/streams.js +3 -12
  64. package/dist/temporary-executor.js +3 -3
  65. package/dist/versions.js +31 -28
  66. package/package.json +28 -16
  67. package/dist/constants/paths.d.ts +0 -51
  68. package/dist/constants/paths.js +0 -152
  69. /package/dist/{packages/paths.d.ts → paths/packages.d.ts} +0 -0
  70. /package/dist/{paths.d.ts → paths/socket.d.ts} +0 -0
package/dist/spinner.js CHANGED
@@ -38,6 +38,7 @@ __export(spinner_exports, {
38
38
  withSpinnerSync: () => withSpinnerSync
39
39
  });
40
40
  module.exports = __toCommonJS(spinner_exports);
41
+ var import_yoctocolors_cjs = __toESM(require("./external/yoctocolors-cjs"));
41
42
  var import_colors = require("./colors");
42
43
  var import_ci = require("#env/ci");
43
44
  var import_debug = require("./debug");
@@ -76,8 +77,7 @@ function renderProgressBar(percentage, width = 20) {
76
77
  const filled = Math.round(percentage / 100 * width);
77
78
  const empty = width - filled;
78
79
  const bar = "\u2588".repeat(filled) + "\u2591".repeat(empty);
79
- const colors = require("./external/yoctocolors-cjs.js");
80
- return colors.cyan(bar);
80
+ return import_yoctocolors_cjs.default.cyan(bar);
81
81
  }
82
82
  let _cliSpinners;
83
83
  // @__NO_SIDE_EFFECTS__
@@ -571,40 +571,6 @@ function Spinner(options) {
571
571
  }
572
572
  return this;
573
573
  }
574
- /**
575
- * Show a reasoning/working message (∴) without stopping the spinner.
576
- * Outputs to stderr and continues spinning.
577
- *
578
- * @param text - Reasoning message to display
579
- * @param extras - Additional values to log
580
- * @returns This spinner for chaining
581
- */
582
- reason(text, ...extras) {
583
- return this.#showStatusAndKeepSpinning("reason", [text, ...extras]);
584
- }
585
- /**
586
- * Show a reasoning/working message (∴) and stop the spinner.
587
- * Auto-clears the spinner line before displaying the message.
588
- *
589
- * Implementation note: Unlike other *AndStop methods (successAndStop, failAndStop, etc.),
590
- * this method cannot use #apply() with a 'reason' method name because yocto-spinner
591
- * doesn't have a built-in 'reason' method. Instead, we manually stop the spinner then
592
- * log the message with the reason symbol. This matches the pattern used by methods
593
- * like debugAndStop() and maintains consistency with normalizeText() usage and empty
594
- * string handling (see #apply's stop method handling for the pattern).
595
- *
596
- * @param text - Reasoning message to display
597
- * @param extras - Additional values to log
598
- * @returns This spinner for chaining
599
- */
600
- reasonAndStop(text, ...extras) {
601
- this.#apply("stop", []);
602
- const normalized = normalizeText(text);
603
- if (normalized) {
604
- logger.error(`${import_logger.LOG_SYMBOLS.reason} ${normalized}`, ...extras);
605
- }
606
- return this;
607
- }
608
574
  /**
609
575
  * Show a skip message (↻) without stopping the spinner.
610
576
  * Outputs to stderr and continues spinning.
@@ -620,9 +586,10 @@ function Spinner(options) {
620
586
  * Show a skip message (↻) and stop the spinner.
621
587
  * Auto-clears the spinner line before displaying the message.
622
588
  *
623
- * Implementation note: Similar to reasonAndStop(), this method cannot use #apply()
624
- * with a 'skip' method name because yocto-spinner doesn't have a built-in 'skip'
625
- * method. Instead, we manually stop the spinner then log the message with the skip symbol.
589
+ * Implementation note: Unlike other *AndStop methods (successAndStop, failAndStop, etc.),
590
+ * this method cannot use #apply() with a 'skip' method name because yocto-spinner doesn't
591
+ * have a built-in 'skip' method. Instead, we manually stop the spinner then log the message
592
+ * with the skip symbol.
626
593
  *
627
594
  * @param text - Skip message to display
628
595
  * @param extras - Additional values to log
@@ -1,5 +1,13 @@
1
+ import checkboxRaw from '../external/@inquirer/checkbox';
2
+ import confirmRaw from '../external/@inquirer/confirm';
3
+ import inputRaw from '../external/@inquirer/input';
4
+ import passwordRaw from '../external/@inquirer/password';
1
5
  import { type ThemeName } from '../themes/themes';
2
6
  import type { Theme } from '../themes/types';
7
+ // Modules imported at the top - extract default and Separator
8
+ declare const searchRaw: any;
9
+ declare const selectRaw: any;
10
+ declare const ActualSeparator: any;
3
11
  // Type definitions
4
12
  /**
5
13
  * Choice option for select and search prompts.
@@ -98,16 +106,6 @@ export declare function createInquirerTheme(theme: Theme | ThemeName | unknown):
98
106
  */
99
107
  /*@__NO_SIDE_EFFECTS__*/
100
108
  export declare function wrapPrompt<T = unknown>(inquirerPrompt: (...args: unknown[]) => Promise<T>): (...args: unknown[]) => Promise<T | undefined>;
101
- // c8 ignore start - Third-party inquirer library requires and exports not testable in isolation.
102
- declare const checkboxRaw: any;
103
- declare const confirmRaw: any;
104
- declare const inputRaw: any;
105
- declare const passwordRaw: any;
106
- // Search and select export additional named exports, so we access .default.
107
- declare const searchRaw: any;
108
- declare const selectRaw: any;
109
- declare const ActualSeparator: any;
110
- // c8 ignore stop
111
109
  /**
112
110
  * Prompt to select multiple items from a list of choices.
113
111
  * Wrapped with spinner handling and abort signal support.
@@ -42,12 +42,22 @@ __export(prompts_exports, {
42
42
  });
43
43
  module.exports = __toCommonJS(prompts_exports);
44
44
  var import_process = require("#constants/process");
45
+ var import_checkbox = __toESM(require("../external/@inquirer/checkbox"));
46
+ var import_confirm = __toESM(require("../external/@inquirer/confirm"));
47
+ var import_input = __toESM(require("../external/@inquirer/input"));
48
+ var import_password = __toESM(require("../external/@inquirer/password"));
49
+ var searchModule = __toESM(require("../external/@inquirer/search"));
50
+ var selectModuleImport = __toESM(require("../external/@inquirer/select"));
45
51
  var import_context = require("../themes/context");
46
52
  var import_themes = require("../themes/themes");
47
53
  var import_utils = require("../themes/utils");
48
54
  var import_yoctocolors_cjs = __toESM(require("../external/yoctocolors-cjs"));
49
55
  const abortSignal = (0, import_process.getAbortSignal)();
50
56
  const spinner = (0, import_process.getSpinner)();
57
+ const searchRaw = searchModule.default;
58
+ const selectModule = selectModuleImport;
59
+ const selectRaw = selectModule.default;
60
+ const ActualSeparator = selectModule.Separator;
51
61
  function applyColor(text, color) {
52
62
  if (typeof color === "string") {
53
63
  return import_yoctocolors_cjs.default[color](text);
@@ -141,18 +151,10 @@ function wrapPrompt(inquirerPrompt) {
141
151
  return typeof result === "string" ? result.trim() : result;
142
152
  };
143
153
  }
144
- const checkboxRaw = require("../external/@inquirer/checkbox");
145
- const confirmRaw = require("../external/@inquirer/confirm");
146
- const inputRaw = require("../external/@inquirer/input");
147
- const passwordRaw = require("../external/@inquirer/password");
148
- const searchRaw = require("../external/@inquirer/search").default;
149
- const selectModule = require("../external/@inquirer/select");
150
- const selectRaw = selectModule.default;
151
- const ActualSeparator = selectModule.Separator;
152
- const checkbox = /* @__PURE__ */ wrapPrompt(checkboxRaw);
153
- const confirm = /* @__PURE__ */ wrapPrompt(confirmRaw);
154
- const input = /* @__PURE__ */ wrapPrompt(inputRaw);
155
- const password = /* @__PURE__ */ wrapPrompt(passwordRaw);
154
+ const checkbox = /* @__PURE__ */ wrapPrompt(import_checkbox.default);
155
+ const confirm = /* @__PURE__ */ wrapPrompt(import_confirm.default);
156
+ const input = /* @__PURE__ */ wrapPrompt(import_input.default);
157
+ const password = /* @__PURE__ */ wrapPrompt(import_password.default);
156
158
  const search = /* @__PURE__ */ wrapPrompt(searchRaw);
157
159
  const select = /* @__PURE__ */ wrapPrompt(selectRaw);
158
160
  function createSeparator(text) {
package/dist/streams.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- /**
2
- * @fileoverview Stream processing utilities with streaming-iterables integration.
3
- * Provides async stream handling and transformation functions.
4
- */
5
1
  import type { IterationOptions } from './promises';
6
2
  /**
7
3
  * Execute a function for each item in an iterable in parallel.
package/dist/streams.js CHANGED
@@ -24,15 +24,8 @@ __export(streams_exports, {
24
24
  transform: () => transform
25
25
  });
26
26
  module.exports = __toCommonJS(streams_exports);
27
+ var import_streaming_iterables = require("./external/streaming-iterables");
27
28
  var import_promises = require("./promises");
28
- let _streamingIterables;
29
- // @__NO_SIDE_EFFECTS__
30
- function getStreamingIterables() {
31
- if (_streamingIterables === void 0) {
32
- _streamingIterables = require("./external/streaming-iterables.js");
33
- }
34
- return _streamingIterables;
35
- }
36
29
  // @__NO_SIDE_EFFECTS__
37
30
  async function parallelEach(iterable, func, options) {
38
31
  for await (const _ of /* @__PURE__ */ parallelMap(iterable, func, options)) {
@@ -40,9 +33,8 @@ async function parallelEach(iterable, func, options) {
40
33
  }
41
34
  // @__NO_SIDE_EFFECTS__
42
35
  function parallelMap(iterable, func, options) {
43
- const streamingIterables = /* @__PURE__ */ getStreamingIterables();
44
36
  const opts = (0, import_promises.normalizeIterationOptions)(options);
45
- const result = streamingIterables?.parallelMap(
37
+ const result = (0, import_streaming_iterables.parallelMap)(
46
38
  opts.concurrency,
47
39
  async (item) => {
48
40
  const result2 = await (0, import_promises.pRetry)((...args) => func(args[0]), {
@@ -57,9 +49,8 @@ function parallelMap(iterable, func, options) {
57
49
  }
58
50
  // @__NO_SIDE_EFFECTS__
59
51
  function transform(iterable, func, options) {
60
- const streamingIterables = /* @__PURE__ */ getStreamingIterables();
61
52
  const opts = (0, import_promises.normalizeIterationOptions)(options);
62
- const result = streamingIterables?.transform(
53
+ const result = (0, import_streaming_iterables.transform)(
63
54
  opts.concurrency,
64
55
  async (item) => {
65
56
  const result2 = await (0, import_promises.pRetry)((...args) => func(args[0]), {
@@ -23,15 +23,15 @@ __export(temporary_executor_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(temporary_executor_exports);
25
25
  var import_platform = require("#constants/platform");
26
- var import_path = require("./path");
26
+ var import_normalize = require("./paths/normalize");
27
27
  function isRunningInTemporaryExecutor(cwd = process.cwd()) {
28
28
  const userAgent = process.env["npm_config_user_agent"];
29
29
  if (userAgent?.includes("exec") || userAgent?.includes("npx") || userAgent?.includes("dlx")) {
30
30
  return true;
31
31
  }
32
- const normalizedCwd = (0, import_path.normalizePath)(cwd);
32
+ const normalizedCwd = (0, import_normalize.normalizePath)(cwd);
33
33
  const npmCache = process.env["npm_config_cache"];
34
- if (npmCache && normalizedCwd.includes((0, import_path.normalizePath)(npmCache))) {
34
+ if (npmCache && normalizedCwd.includes((0, import_normalize.normalizePath)(npmCache))) {
35
35
  return true;
36
36
  }
37
37
  const tempPatterns = [
package/dist/versions.js CHANGED
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with esbuild */
3
+ var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
6
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
9
  var __export = (target, all) => {
8
10
  for (var name in all)
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
16
18
  }
17
19
  return to;
18
20
  };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
19
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
30
  var versions_exports = {};
21
31
  __export(versions_exports, {
@@ -41,69 +51,62 @@ __export(versions_exports, {
41
51
  versionDiff: () => versionDiff
42
52
  });
43
53
  module.exports = __toCommonJS(versions_exports);
44
- let _semver;
45
- // @__NO_SIDE_EFFECTS__
46
- function getSemver() {
47
- if (_semver === void 0) {
48
- _semver = require("./external/semver.js");
49
- }
50
- return _semver;
51
- }
54
+ var semver = __toESM(require("./external/semver.js"));
52
55
  function coerceVersion(version) {
53
- const coerced = (/* @__PURE__ */ getSemver()).coerce(version);
56
+ const coerced = semver.coerce(version);
54
57
  return coerced?.version;
55
58
  }
56
59
  function compareVersions(v1, v2) {
57
60
  try {
58
- return (/* @__PURE__ */ getSemver()).compare(v1, v2);
61
+ return semver.compare(v1, v2);
59
62
  } catch {
60
63
  return void 0;
61
64
  }
62
65
  }
63
66
  function filterVersions(versions, range) {
64
- return versions.filter((v) => (/* @__PURE__ */ getSemver()).satisfies(v, range));
67
+ return versions.filter((v) => semver.satisfies(v, range));
65
68
  }
66
69
  function getMajorVersion(version) {
67
- const parsed = (/* @__PURE__ */ getSemver()).parse(version);
70
+ const parsed = semver.parse(version);
68
71
  return parsed?.major;
69
72
  }
70
73
  function getMinorVersion(version) {
71
- const parsed = (/* @__PURE__ */ getSemver()).parse(version);
74
+ const parsed = semver.parse(version);
72
75
  return parsed?.minor;
73
76
  }
74
77
  function getPatchVersion(version) {
75
- const parsed = (/* @__PURE__ */ getSemver()).parse(version);
78
+ const parsed = semver.parse(version);
76
79
  return parsed?.patch;
77
80
  }
78
81
  function incrementVersion(version, release, identifier) {
79
- return (/* @__PURE__ */ getSemver()).inc(version, release, identifier) || void 0;
82
+ return semver.inc(version, release, identifier) || void 0;
80
83
  }
81
84
  function isEqual(version1, version2) {
82
- return (/* @__PURE__ */ getSemver()).eq(version1, version2);
85
+ return semver.eq(version1, version2);
83
86
  }
84
87
  function isGreaterThan(version1, version2) {
85
- return (/* @__PURE__ */ getSemver()).gt(version1, version2);
88
+ return semver.gt(version1, version2);
86
89
  }
87
90
  function isGreaterThanOrEqual(version1, version2) {
88
- return (/* @__PURE__ */ getSemver()).gte(version1, version2);
91
+ return semver.gte(version1, version2);
89
92
  }
90
93
  function isLessThan(version1, version2) {
91
- return (/* @__PURE__ */ getSemver()).lt(version1, version2);
94
+ return semver.lt(version1, version2);
92
95
  }
93
96
  function isLessThanOrEqual(version1, version2) {
94
- return (/* @__PURE__ */ getSemver()).lte(version1, version2);
97
+ return semver.lte(version1, version2);
95
98
  }
96
99
  function isValidVersion(version) {
97
- return (/* @__PURE__ */ getSemver()).valid(version) !== null;
100
+ return semver.valid(version) !== null;
98
101
  }
99
102
  function maxVersion(versions) {
100
- return (/* @__PURE__ */ getSemver()).maxSatisfying(versions, "*") || void 0;
103
+ return semver.maxSatisfying(versions, "*") || void 0;
101
104
  }
102
105
  function minVersion(versions) {
103
- return (/* @__PURE__ */ getSemver()).minSatisfying(versions, "*") || void 0;
106
+ return semver.minSatisfying(versions, "*") || void 0;
104
107
  }
105
108
  function parseVersion(version) {
106
- const parsed = (/* @__PURE__ */ getSemver()).parse(version);
109
+ const parsed = semver.parse(version);
107
110
  if (!parsed) {
108
111
  return void 0;
109
112
  }
@@ -116,17 +119,17 @@ function parseVersion(version) {
116
119
  };
117
120
  }
118
121
  function satisfiesVersion(version, range) {
119
- return (/* @__PURE__ */ getSemver()).satisfies(version, range);
122
+ return semver.satisfies(version, range);
120
123
  }
121
124
  function sortVersions(versions) {
122
- return (/* @__PURE__ */ getSemver()).sort([...versions]);
125
+ return semver.sort([...versions]);
123
126
  }
124
127
  function sortVersionsDesc(versions) {
125
- return (/* @__PURE__ */ getSemver()).rsort([...versions]);
128
+ return semver.rsort([...versions]);
126
129
  }
127
130
  function versionDiff(version1, version2) {
128
131
  try {
129
- return (/* @__PURE__ */ getSemver()).diff(version1, version2) || void 0;
132
+ return semver.diff(version1, version2) || void 0;
130
133
  } catch {
131
134
  return void 0;
132
135
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/lib",
3
- "version": "3.4.0",
3
+ "version": "4.0.0",
4
4
  "packageManager": "pnpm@10.22.0",
5
5
  "license": "MIT",
6
6
  "description": "Core utilities and infrastructure for Socket.dev security tools",
@@ -159,10 +159,6 @@
159
159
  "types": "./dist/constants/packages.d.ts",
160
160
  "default": "./dist/constants/packages.js"
161
161
  },
162
- "./constants/paths": {
163
- "types": "./dist/constants/paths.d.ts",
164
- "default": "./dist/constants/paths.js"
165
- },
166
162
  "./constants/platform": {
167
163
  "types": "./dist/constants/platform.d.ts",
168
164
  "default": "./dist/constants/platform.js"
@@ -435,10 +431,6 @@
435
431
  "types": "./dist/packages/operations.d.ts",
436
432
  "default": "./dist/packages/operations.js"
437
433
  },
438
- "./packages/paths": {
439
- "types": "./dist/packages/paths.d.ts",
440
- "default": "./dist/packages/paths.js"
441
- },
442
434
  "./packages/provenance": {
443
435
  "types": "./dist/packages/provenance.d.ts",
444
436
  "default": "./dist/packages/provenance.js"
@@ -451,18 +443,38 @@
451
443
  "types": "./dist/packages/validation.d.ts",
452
444
  "default": "./dist/packages/validation.js"
453
445
  },
454
- "./path": {
455
- "types": "./dist/path.d.ts",
456
- "default": "./dist/path.js"
446
+ "./paths/dirnames": {
447
+ "types": "./dist/paths/dirnames.d.ts",
448
+ "default": "./dist/paths/dirnames.js"
449
+ },
450
+ "./paths/exts": {
451
+ "types": "./dist/paths/exts.d.ts",
452
+ "default": "./dist/paths/exts.js"
453
+ },
454
+ "./paths/filenames": {
455
+ "types": "./dist/paths/filenames.d.ts",
456
+ "default": "./dist/paths/filenames.js"
457
457
  },
458
- "./paths": {
459
- "types": "./dist/paths.d.ts",
460
- "default": "./dist/paths.js"
458
+ "./paths/globs": {
459
+ "types": "./dist/paths/globs.d.ts",
460
+ "default": "./dist/paths/globs.js"
461
+ },
462
+ "./paths/normalize": {
463
+ "types": "./dist/paths/normalize.d.ts",
464
+ "default": "./dist/paths/normalize.js"
465
+ },
466
+ "./paths/packages": {
467
+ "types": "./dist/paths/packages.d.ts",
468
+ "default": "./dist/paths/packages.js"
461
469
  },
462
470
  "./paths/rewire": {
463
471
  "types": "./dist/paths/rewire.d.ts",
464
472
  "default": "./dist/paths/rewire.js"
465
473
  },
474
+ "./paths/socket": {
475
+ "types": "./dist/paths/socket.d.ts",
476
+ "default": "./dist/paths/socket.js"
477
+ },
466
478
  "./performance": {
467
479
  "types": "./dist/performance.d.ts",
468
480
  "default": "./dist/performance.js"
@@ -687,7 +699,7 @@
687
699
  "@socketregistry/is-unicode-supported": "1.0.5",
688
700
  "@socketregistry/packageurl-js": "1.3.5",
689
701
  "@socketregistry/yocto-spinner": "1.0.25",
690
- "@socketsecurity/lib-stable": "npm:@socketsecurity/lib@3.3.7",
702
+ "@socketsecurity/lib-stable": "npm:@socketsecurity/lib@3.5.0",
691
703
  "@types/node": "24.9.2",
692
704
  "@typescript/native-preview": "7.0.0-dev.20250920.1",
693
705
  "@vitest/coverage-v8": "4.0.3",
@@ -1,51 +0,0 @@
1
- /**
2
- * File paths, directory names, extensions, and glob patterns.
3
- */
4
- // File names.
5
- export declare const PACKAGE_JSON = "package.json";
6
- export declare const TSCONFIG_JSON = "tsconfig.json";
7
- export declare const LICENSE = "LICENSE";
8
- export declare const LICENSE_MD = "LICENSE.md";
9
- export declare const LICENSE_ORIGINAL = "LICENSE.original";
10
- export declare const README_MD = "README.md";
11
- export declare const CHANGELOG_MD = "CHANGELOG.md";
12
- export declare const MANIFEST_JSON = "manifest.json";
13
- export declare const EXTENSIONS_JSON = "extensions.json";
14
- export declare const ESLINT_CONFIG_JS = "eslint.config.js";
15
- export declare const GITIGNORE = ".gitignore";
16
- export declare const DOT_PACKAGE_LOCK_JSON = ".package-lock.json";
17
- // Directory names.
18
- export declare const NODE_MODULES = "node_modules";
19
- export declare const DOT_GIT_DIR = ".git";
20
- export declare const DOT_GITHUB = ".github";
21
- export declare const DOT_SOCKET_DIR = ".socket";
22
- export declare const CACHE_DIR = "cache";
23
- export declare const CACHE_TTL_DIR = "ttl";
24
- // Path patterns.
25
- export declare const NODE_MODULES_GLOB_RECURSIVE = "**/node_modules";
26
- export declare const SLASH_NODE_MODULES_SLASH = "/node_modules/";
27
- // File extensions.
28
- export declare const EXT_CJS = ".cjs";
29
- export declare const EXT_CMD = ".cmd";
30
- export declare const EXT_CTS = ".cts";
31
- export declare const EXT_DTS = ".d.ts";
32
- export declare const EXT_JS = ".js";
33
- export declare const EXT_JSON = ".json";
34
- export declare const EXT_LOCK = ".lock";
35
- export declare const EXT_LOCKB = ".lockb";
36
- export declare const EXT_MD = ".md";
37
- export declare const EXT_MJS = ".mjs";
38
- export declare const EXT_MTS = ".mts";
39
- export declare const EXT_PS1 = ".ps1";
40
- export declare const EXT_YAML = ".yaml";
41
- export declare const EXT_YML = ".yml";
42
- // Glob patterns.
43
- export declare const LICENSE_GLOB = "LICEN[CS]E{[.-]*,}";
44
- export declare const LICENSE_GLOB_RECURSIVE = "**/LICEN[CS]E{[.-]*,}";
45
- export declare const LICENSE_ORIGINAL_GLOB = "*.original{.*,}";
46
- export declare const LICENSE_ORIGINAL_GLOB_RECURSIVE = "**/*.original{.*,}";
47
- export declare const README_GLOB = "README{.*,}";
48
- export declare const README_GLOB_RECURSIVE = "**/README{.*,}";
49
- // Miscellaneous path constants.
50
- export declare const EXTENSIONS = "extensions";
51
- export declare const ROLLUP_EXTERNAL_SUFFIX = "__rollup_external";
@@ -1,152 +0,0 @@
1
- "use strict";
2
- /* Socket Lib - Built with esbuild */
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
- var paths_exports = {};
21
- __export(paths_exports, {
22
- CACHE_DIR: () => CACHE_DIR,
23
- CACHE_TTL_DIR: () => CACHE_TTL_DIR,
24
- CHANGELOG_MD: () => CHANGELOG_MD,
25
- DOT_GITHUB: () => DOT_GITHUB,
26
- DOT_GIT_DIR: () => DOT_GIT_DIR,
27
- DOT_PACKAGE_LOCK_JSON: () => DOT_PACKAGE_LOCK_JSON,
28
- DOT_SOCKET_DIR: () => DOT_SOCKET_DIR,
29
- ESLINT_CONFIG_JS: () => ESLINT_CONFIG_JS,
30
- EXTENSIONS: () => EXTENSIONS,
31
- EXTENSIONS_JSON: () => EXTENSIONS_JSON,
32
- EXT_CJS: () => EXT_CJS,
33
- EXT_CMD: () => EXT_CMD,
34
- EXT_CTS: () => EXT_CTS,
35
- EXT_DTS: () => EXT_DTS,
36
- EXT_JS: () => EXT_JS,
37
- EXT_JSON: () => EXT_JSON,
38
- EXT_LOCK: () => EXT_LOCK,
39
- EXT_LOCKB: () => EXT_LOCKB,
40
- EXT_MD: () => EXT_MD,
41
- EXT_MJS: () => EXT_MJS,
42
- EXT_MTS: () => EXT_MTS,
43
- EXT_PS1: () => EXT_PS1,
44
- EXT_YAML: () => EXT_YAML,
45
- EXT_YML: () => EXT_YML,
46
- GITIGNORE: () => GITIGNORE,
47
- LICENSE: () => LICENSE,
48
- LICENSE_GLOB: () => LICENSE_GLOB,
49
- LICENSE_GLOB_RECURSIVE: () => LICENSE_GLOB_RECURSIVE,
50
- LICENSE_MD: () => LICENSE_MD,
51
- LICENSE_ORIGINAL: () => LICENSE_ORIGINAL,
52
- LICENSE_ORIGINAL_GLOB: () => LICENSE_ORIGINAL_GLOB,
53
- LICENSE_ORIGINAL_GLOB_RECURSIVE: () => LICENSE_ORIGINAL_GLOB_RECURSIVE,
54
- MANIFEST_JSON: () => MANIFEST_JSON,
55
- NODE_MODULES: () => NODE_MODULES,
56
- NODE_MODULES_GLOB_RECURSIVE: () => NODE_MODULES_GLOB_RECURSIVE,
57
- PACKAGE_JSON: () => PACKAGE_JSON,
58
- README_GLOB: () => README_GLOB,
59
- README_GLOB_RECURSIVE: () => README_GLOB_RECURSIVE,
60
- README_MD: () => README_MD,
61
- ROLLUP_EXTERNAL_SUFFIX: () => ROLLUP_EXTERNAL_SUFFIX,
62
- SLASH_NODE_MODULES_SLASH: () => SLASH_NODE_MODULES_SLASH,
63
- TSCONFIG_JSON: () => TSCONFIG_JSON
64
- });
65
- module.exports = __toCommonJS(paths_exports);
66
- const PACKAGE_JSON = "package.json";
67
- const TSCONFIG_JSON = "tsconfig.json";
68
- const LICENSE = "LICENSE";
69
- const LICENSE_MD = "LICENSE.md";
70
- const LICENSE_ORIGINAL = "LICENSE.original";
71
- const README_MD = "README.md";
72
- const CHANGELOG_MD = "CHANGELOG.md";
73
- const MANIFEST_JSON = "manifest.json";
74
- const EXTENSIONS_JSON = "extensions.json";
75
- const ESLINT_CONFIG_JS = "eslint.config.js";
76
- const GITIGNORE = ".gitignore";
77
- const DOT_PACKAGE_LOCK_JSON = ".package-lock.json";
78
- const NODE_MODULES = "node_modules";
79
- const DOT_GIT_DIR = ".git";
80
- const DOT_GITHUB = ".github";
81
- const DOT_SOCKET_DIR = ".socket";
82
- const CACHE_DIR = "cache";
83
- const CACHE_TTL_DIR = "ttl";
84
- const NODE_MODULES_GLOB_RECURSIVE = "**/node_modules";
85
- const SLASH_NODE_MODULES_SLASH = "/node_modules/";
86
- const EXT_CJS = ".cjs";
87
- const EXT_CMD = ".cmd";
88
- const EXT_CTS = ".cts";
89
- const EXT_DTS = ".d.ts";
90
- const EXT_JS = ".js";
91
- const EXT_JSON = ".json";
92
- const EXT_LOCK = ".lock";
93
- const EXT_LOCKB = ".lockb";
94
- const EXT_MD = ".md";
95
- const EXT_MJS = ".mjs";
96
- const EXT_MTS = ".mts";
97
- const EXT_PS1 = ".ps1";
98
- const EXT_YAML = ".yaml";
99
- const EXT_YML = ".yml";
100
- const LICENSE_GLOB = "LICEN[CS]E{[.-]*,}";
101
- const LICENSE_GLOB_RECURSIVE = "**/LICEN[CS]E{[.-]*,}";
102
- const LICENSE_ORIGINAL_GLOB = "*.original{.*,}";
103
- const LICENSE_ORIGINAL_GLOB_RECURSIVE = "**/*.original{.*,}";
104
- const README_GLOB = "README{.*,}";
105
- const README_GLOB_RECURSIVE = "**/README{.*,}";
106
- const EXTENSIONS = "extensions";
107
- const ROLLUP_EXTERNAL_SUFFIX = "__rollup_external";
108
- // Annotate the CommonJS export names for ESM import in node:
109
- 0 && (module.exports = {
110
- CACHE_DIR,
111
- CACHE_TTL_DIR,
112
- CHANGELOG_MD,
113
- DOT_GITHUB,
114
- DOT_GIT_DIR,
115
- DOT_PACKAGE_LOCK_JSON,
116
- DOT_SOCKET_DIR,
117
- ESLINT_CONFIG_JS,
118
- EXTENSIONS,
119
- EXTENSIONS_JSON,
120
- EXT_CJS,
121
- EXT_CMD,
122
- EXT_CTS,
123
- EXT_DTS,
124
- EXT_JS,
125
- EXT_JSON,
126
- EXT_LOCK,
127
- EXT_LOCKB,
128
- EXT_MD,
129
- EXT_MJS,
130
- EXT_MTS,
131
- EXT_PS1,
132
- EXT_YAML,
133
- EXT_YML,
134
- GITIGNORE,
135
- LICENSE,
136
- LICENSE_GLOB,
137
- LICENSE_GLOB_RECURSIVE,
138
- LICENSE_MD,
139
- LICENSE_ORIGINAL,
140
- LICENSE_ORIGINAL_GLOB,
141
- LICENSE_ORIGINAL_GLOB_RECURSIVE,
142
- MANIFEST_JSON,
143
- NODE_MODULES,
144
- NODE_MODULES_GLOB_RECURSIVE,
145
- PACKAGE_JSON,
146
- README_GLOB,
147
- README_GLOB_RECURSIVE,
148
- README_MD,
149
- ROLLUP_EXTERNAL_SUFFIX,
150
- SLASH_NODE_MODULES_SLASH,
151
- TSCONFIG_JSON
152
- });
File without changes