@socketsecurity/lib 5.18.1 → 5.19.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 (305) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +6 -5
  3. package/dist/abort.d.ts +3 -0
  4. package/dist/abort.js +1 -0
  5. package/dist/agent.d.ts +66 -49
  6. package/dist/agent.js +51 -50
  7. package/dist/ansi.d.ts +2 -5
  8. package/dist/ansi.js +3 -2
  9. package/dist/archives.d.ts +25 -21
  10. package/dist/archives.js +35 -34
  11. package/dist/argv/flags.d.ts +100 -91
  12. package/dist/argv/flags.js +88 -87
  13. package/dist/argv/parse.d.ts +30 -40
  14. package/dist/argv/parse.js +33 -32
  15. package/dist/arrays.d.ts +4 -8
  16. package/dist/arrays.js +1 -0
  17. package/dist/bin.d.ts +7 -5
  18. package/dist/bin.js +52 -29
  19. package/dist/cacache.d.ts +13 -12
  20. package/dist/cacache.js +9 -8
  21. package/dist/cache-with-ttl.d.ts +53 -35
  22. package/dist/cache-with-ttl.js +1 -0
  23. package/dist/colors.d.ts +5 -5
  24. package/dist/colors.js +1 -0
  25. package/dist/constants/agents.d.ts +5 -9
  26. package/dist/constants/agents.js +3 -2
  27. package/dist/constants/core.d.ts +5 -10
  28. package/dist/constants/core.js +2 -1
  29. package/dist/constants/encoding.d.ts +3 -3
  30. package/dist/constants/encoding.js +1 -0
  31. package/dist/constants/github.d.ts +3 -3
  32. package/dist/constants/github.js +1 -0
  33. package/dist/constants/licenses.d.ts +9 -2
  34. package/dist/constants/licenses.js +1 -0
  35. package/dist/constants/lifecycle-script-names.js +1 -0
  36. package/dist/constants/maintained-node-versions.d.ts +3 -0
  37. package/dist/constants/maintained-node-versions.js +1 -0
  38. package/dist/constants/node.d.ts +125 -16
  39. package/dist/constants/node.js +74 -73
  40. package/dist/constants/package-default-node-range.d.ts +3 -1
  41. package/dist/constants/package-default-node-range.js +2 -1
  42. package/dist/constants/package-default-socket-categories.d.ts +0 -1
  43. package/dist/constants/package-default-socket-categories.js +1 -0
  44. package/dist/constants/packages.d.ts +12 -17
  45. package/dist/constants/packages.js +31 -16
  46. package/dist/constants/platform.d.ts +1 -2
  47. package/dist/constants/platform.js +2 -1
  48. package/dist/constants/process.d.ts +18 -0
  49. package/dist/constants/process.js +1 -0
  50. package/dist/constants/socket.d.ts +4 -10
  51. package/dist/constants/socket.js +2 -1
  52. package/dist/constants/testing.d.ts +3 -3
  53. package/dist/constants/testing.js +1 -0
  54. package/dist/constants/time.d.ts +3 -4
  55. package/dist/constants/time.js +1 -0
  56. package/dist/constants/typescript.d.ts +10 -3
  57. package/dist/constants/typescript.js +5 -4
  58. package/dist/cover/code.d.ts +3 -0
  59. package/dist/cover/code.js +12 -12
  60. package/dist/cover/formatters.d.ts +12 -9
  61. package/dist/cover/formatters.js +19 -18
  62. package/dist/cover/type.d.ts +3 -0
  63. package/dist/cover/type.js +1 -0
  64. package/dist/cover/types.js +1 -0
  65. package/dist/debug.d.ts +32 -47
  66. package/dist/debug.js +97 -96
  67. package/dist/dlx/arborist.d.ts +134 -0
  68. package/dist/dlx/arborist.js +177 -0
  69. package/dist/dlx/binary.d.ts +25 -9
  70. package/dist/dlx/binary.js +34 -12
  71. package/dist/dlx/cache.d.ts +1 -0
  72. package/dist/dlx/cache.js +2 -1
  73. package/dist/dlx/detect.d.ts +15 -0
  74. package/dist/dlx/detect.js +28 -20
  75. package/dist/dlx/dir.d.ts +1 -11
  76. package/dist/dlx/dir.js +2 -12
  77. package/dist/dlx/integrity.d.ts +86 -0
  78. package/dist/dlx/integrity.js +112 -0
  79. package/dist/dlx/lockfile.d.ts +115 -0
  80. package/dist/dlx/lockfile.js +139 -0
  81. package/dist/dlx/manifest.d.ts +26 -1
  82. package/dist/dlx/manifest.js +9 -6
  83. package/dist/dlx/package.d.ts +58 -3
  84. package/dist/dlx/package.js +101 -74
  85. package/dist/dlx/packages.d.ts +1 -11
  86. package/dist/dlx/packages.js +3 -14
  87. package/dist/dlx/paths.d.ts +1 -0
  88. package/dist/dlx/paths.js +2 -1
  89. package/dist/effects/pulse-frames.js +1 -0
  90. package/dist/effects/text-shimmer.d.ts +13 -2
  91. package/dist/effects/text-shimmer.js +50 -46
  92. package/dist/effects/types.js +1 -0
  93. package/dist/effects/ultra.js +1 -0
  94. package/dist/env/ci.d.ts +6 -1
  95. package/dist/env/ci.js +1 -0
  96. package/dist/env/debug.d.ts +5 -1
  97. package/dist/env/debug.js +1 -0
  98. package/dist/env/github.d.ts +19 -23
  99. package/dist/env/github.js +5 -4
  100. package/dist/env/helpers.d.ts +21 -9
  101. package/dist/env/helpers.js +5 -11
  102. package/dist/env/home.d.ts +17 -4
  103. package/dist/env/home.js +2 -1
  104. package/dist/env/locale.d.ts +4 -3
  105. package/dist/env/locale.js +1 -0
  106. package/dist/env/node-auth-token.d.ts +5 -1
  107. package/dist/env/node-auth-token.js +1 -0
  108. package/dist/env/node-env.d.ts +5 -1
  109. package/dist/env/node-env.js +1 -0
  110. package/dist/env/npm.d.ts +4 -5
  111. package/dist/env/npm.js +1 -0
  112. package/dist/env/package-manager.d.ts +4 -3
  113. package/dist/env/package-manager.js +2 -1
  114. package/dist/env/path.d.ts +5 -1
  115. package/dist/env/path.js +1 -0
  116. package/dist/env/pre-commit.d.ts +5 -1
  117. package/dist/env/pre-commit.js +1 -0
  118. package/dist/env/rewire.d.ts +10 -0
  119. package/dist/env/rewire.js +7 -5
  120. package/dist/env/shell.d.ts +5 -1
  121. package/dist/env/shell.js +1 -0
  122. package/dist/env/socket-cli-shadow.d.ts +4 -5
  123. package/dist/env/socket-cli-shadow.js +1 -0
  124. package/dist/env/socket-cli.d.ts +4 -14
  125. package/dist/env/socket-cli.js +1 -0
  126. package/dist/env/socket.d.ts +6 -18
  127. package/dist/env/socket.js +4 -3
  128. package/dist/env/temp-dir.d.ts +4 -3
  129. package/dist/env/temp-dir.js +1 -0
  130. package/dist/env/term.d.ts +5 -1
  131. package/dist/env/term.js +1 -0
  132. package/dist/env/test.d.ts +4 -3
  133. package/dist/env/test.js +1 -0
  134. package/dist/env/windows.d.ts +4 -4
  135. package/dist/env/windows.js +1 -0
  136. package/dist/env/xdg.d.ts +4 -3
  137. package/dist/env/xdg.js +1 -0
  138. package/dist/env.d.ts +83 -23
  139. package/dist/env.js +112 -80
  140. package/dist/errors.js +1 -0
  141. package/dist/external/@npmcli/package-json.js +9 -3968
  142. package/dist/external/@socketregistry/packageurl-js.js +2 -2
  143. package/dist/external/debug.js +162 -328
  144. package/dist/external/external-pack.js +3 -2835
  145. package/dist/external/npm-pack.js +13939 -33342
  146. package/dist/external/zod.js +160 -7558
  147. package/dist/fs.d.ts +92 -113
  148. package/dist/fs.js +35 -35
  149. package/dist/git.d.ts +170 -164
  150. package/dist/git.js +113 -87
  151. package/dist/github.d.ts +249 -227
  152. package/dist/github.js +82 -81
  153. package/dist/globs.d.ts +31 -17
  154. package/dist/globs.js +51 -58
  155. package/dist/http-request.d.ts +99 -99
  156. package/dist/http-request.js +182 -156
  157. package/dist/ipc-cli.d.ts +28 -0
  158. package/dist/{utils/get-ipc.js → ipc-cli.js} +4 -3
  159. package/dist/ipc.d.ts +9 -299
  160. package/dist/ipc.js +18 -204
  161. package/dist/json/edit.d.ts +3 -1
  162. package/dist/json/edit.js +30 -30
  163. package/dist/json/format.d.ts +36 -36
  164. package/dist/json/format.js +22 -21
  165. package/dist/json/parse.d.ts +4 -2
  166. package/dist/json/parse.js +1 -0
  167. package/dist/json/types.js +1 -0
  168. package/dist/{links/index.d.ts → links.d.ts} +6 -2
  169. package/dist/{links/index.js → links.js} +5 -4
  170. package/dist/logger.d.ts +4 -6
  171. package/dist/logger.js +61 -53
  172. package/dist/memoization.d.ts +52 -49
  173. package/dist/memoization.js +55 -33
  174. package/dist/objects.d.ts +25 -44
  175. package/dist/objects.js +2 -1
  176. package/dist/package-extensions.d.ts +6 -0
  177. package/dist/package-extensions.js +2 -1
  178. package/dist/packages/edit.d.ts +3 -5
  179. package/dist/packages/edit.js +4 -3
  180. package/dist/packages/exports.d.ts +11 -14
  181. package/dist/packages/exports.js +11 -10
  182. package/dist/packages/isolation.d.ts +4 -0
  183. package/dist/packages/isolation.js +20 -19
  184. package/dist/packages/licenses.d.ts +3 -10
  185. package/dist/packages/licenses.js +2 -1
  186. package/dist/packages/manifest.d.ts +3 -3
  187. package/dist/packages/manifest.js +1 -0
  188. package/dist/packages/normalize.d.ts +3 -4
  189. package/dist/packages/normalize.js +1 -0
  190. package/dist/packages/operations.d.ts +3 -10
  191. package/dist/packages/operations.js +1 -0
  192. package/dist/packages/provenance.d.ts +10 -8
  193. package/dist/packages/provenance.js +55 -54
  194. package/dist/packages/specs.d.ts +3 -5
  195. package/dist/packages/specs.js +1 -0
  196. package/dist/packages/validation.d.ts +3 -3
  197. package/dist/packages/validation.js +1 -0
  198. package/dist/packages.d.ts +2 -17
  199. package/dist/packages.js +2 -1
  200. package/dist/paths/dirnames.d.ts +0 -2
  201. package/dist/paths/dirnames.js +1 -0
  202. package/dist/paths/exts.d.ts +0 -1
  203. package/dist/paths/exts.js +1 -0
  204. package/dist/paths/filenames.d.ts +0 -1
  205. package/dist/paths/filenames.js +1 -0
  206. package/dist/paths/globs.d.ts +0 -1
  207. package/dist/paths/globs.js +1 -0
  208. package/dist/paths/normalize.d.ts +115 -123
  209. package/dist/paths/normalize.js +128 -127
  210. package/dist/paths/packages.d.ts +3 -2
  211. package/dist/paths/packages.js +2 -1
  212. package/dist/paths/rewire.d.ts +9 -0
  213. package/dist/paths/rewire.js +5 -3
  214. package/dist/paths/socket.d.ts +37 -23
  215. package/dist/paths/socket.js +26 -25
  216. package/dist/performance.d.ts +87 -84
  217. package/dist/performance.js +97 -96
  218. package/dist/process-lock.d.ts +41 -1
  219. package/dist/process-lock.js +24 -17
  220. package/dist/promise-queue.d.ts +6 -0
  221. package/dist/promise-queue.js +1 -0
  222. package/dist/promises.d.ts +40 -55
  223. package/dist/promises.js +12 -11
  224. package/dist/regexps.d.ts +0 -5
  225. package/dist/regexps.js +1 -0
  226. package/dist/releases/github.d.ts +59 -63
  227. package/dist/releases/github.js +95 -100
  228. package/dist/releases/socket-btm.d.ts +9 -2
  229. package/dist/releases/socket-btm.js +32 -25
  230. package/dist/sea.d.ts +5 -0
  231. package/dist/sea.js +1 -0
  232. package/dist/shadow.d.ts +4 -0
  233. package/dist/shadow.js +1 -0
  234. package/dist/signal-exit.d.ts +7 -7
  235. package/dist/signal-exit.js +46 -45
  236. package/dist/sorts.d.ts +5 -7
  237. package/dist/sorts.js +11 -10
  238. package/dist/spawn.d.ts +96 -77
  239. package/dist/spawn.js +39 -38
  240. package/dist/spinner.d.ts +21 -22
  241. package/dist/spinner.js +15 -11
  242. package/dist/ssri.d.ts +31 -36
  243. package/dist/ssri.js +15 -14
  244. package/dist/stdio/_stream.d.ts +31 -0
  245. package/dist/stdio/_stream.js +57 -0
  246. package/dist/stdio/divider.d.ts +40 -36
  247. package/dist/stdio/divider.js +10 -9
  248. package/dist/stdio/footer.d.ts +20 -0
  249. package/dist/stdio/footer.js +12 -2
  250. package/dist/stdio/header.d.ts +4 -16
  251. package/dist/stdio/header.js +1 -9
  252. package/dist/stdio/stderr.d.ts +51 -39
  253. package/dist/stdio/stderr.js +19 -22
  254. package/dist/stdio/stdout.d.ts +54 -52
  255. package/dist/stdio/stdout.js +35 -33
  256. package/dist/streams.d.ts +4 -3
  257. package/dist/streams.js +1 -0
  258. package/dist/strings.d.ts +31 -85
  259. package/dist/strings.js +5 -49
  260. package/dist/suppress-warnings.d.ts +32 -15
  261. package/dist/suppress-warnings.js +14 -13
  262. package/dist/tables.d.ts +30 -26
  263. package/dist/tables.js +24 -23
  264. package/dist/temporary-executor.d.ts +4 -0
  265. package/dist/temporary-executor.js +1 -0
  266. package/dist/themes/context.d.ts +30 -26
  267. package/dist/themes/context.js +19 -18
  268. package/dist/themes/index.d.ts +0 -4
  269. package/dist/themes/index.js +1 -0
  270. package/dist/themes/themes.d.ts +1 -1
  271. package/dist/themes/themes.js +1 -0
  272. package/dist/themes/types.js +1 -0
  273. package/dist/themes/utils.d.ts +46 -43
  274. package/dist/themes/utils.js +45 -44
  275. package/dist/types.d.ts +48 -52
  276. package/dist/types.js +35 -35
  277. package/dist/url.d.ts +48 -53
  278. package/dist/url.js +38 -37
  279. package/dist/validation/json-parser.d.ts +19 -190
  280. package/dist/validation/json-parser.js +5 -69
  281. package/dist/validation/types.d.ts +9 -33
  282. package/dist/validation/types.js +1 -0
  283. package/dist/versions.d.ts +1 -0
  284. package/dist/versions.js +2 -1
  285. package/dist/words.d.ts +3 -6
  286. package/dist/words.js +1 -0
  287. package/dist/zod.js +1 -0
  288. package/package.json +34 -70
  289. package/dist/external/@inquirer/checkbox.js +0 -5
  290. package/dist/external/@inquirer/confirm.js +0 -5
  291. package/dist/external/@inquirer/input.js +0 -5
  292. package/dist/external/@inquirer/password.js +0 -5
  293. package/dist/external/@inquirer/search.js +0 -5
  294. package/dist/external/@inquirer/select.js +0 -5
  295. package/dist/functions.d.ts +0 -57
  296. package/dist/functions.js +0 -70
  297. package/dist/stdio/clear.d.ts +0 -140
  298. package/dist/stdio/clear.js +0 -95
  299. package/dist/stdio/mask.d.ts +0 -151
  300. package/dist/stdio/mask.js +0 -224
  301. package/dist/stdio/progress.d.ts +0 -148
  302. package/dist/stdio/progress.js +0 -212
  303. package/dist/stdio/prompts.d.ts +0 -195
  304. package/dist/stdio/prompts.js +0 -176
  305. package/dist/utils/get-ipc.d.ts +0 -15
@@ -24,7 +24,7 @@ export interface ParseResult<T> {
24
24
  /** Parsed and validated data (only present when `success` is `true`) */
25
25
  data?: T | undefined;
26
26
  /** Error information (only present when `success` is `false`) */
27
- error?: any;
27
+ error?: unknown;
28
28
  }
29
29
  /**
30
30
  * Base schema interface compatible with Zod and similar validation libraries.
@@ -46,7 +46,7 @@ export interface ParseResult<T> {
46
46
  * const result = schema.safeParse({ name: 'Alice', age: 30 })
47
47
  * ```
48
48
  */
49
- export interface Schema<T = any> {
49
+ export interface Schema<T = unknown> {
50
50
  /**
51
51
  * Safely parse data without throwing errors.
52
52
  * Returns a result object indicating success or failure.
@@ -54,7 +54,7 @@ export interface Schema<T = any> {
54
54
  * @param data - The data to validate
55
55
  * @returns Parse result with success flag and data or error
56
56
  */
57
- safeParse(data: any): ParseResult<T>;
57
+ safeParse(data: unknown): ParseResult<T>;
58
58
  /**
59
59
  * Parse data and throw an error if validation fails.
60
60
  * Use this when you want to fail fast on invalid data.
@@ -63,7 +63,7 @@ export interface Schema<T = any> {
63
63
  * @returns The validated and parsed data
64
64
  * @throws {Error} When validation fails
65
65
  */
66
- parse(data: any): T;
66
+ parse(data: unknown): T;
67
67
  /**
68
68
  * Optional schema name for debugging and error messages.
69
69
  * Useful for identifying which schema failed in complex validation chains.
@@ -71,17 +71,19 @@ export interface Schema<T = any> {
71
71
  _name?: string | undefined;
72
72
  }
73
73
  /**
74
- * Options for configuring JSON parsing behavior with security controls.
74
+ * Options for configuring safe JSON parsing with security controls.
75
+ * Distinct from `JsonParseOptions` in `@socketsecurity/lib/json/types`
76
+ * which is scoped to reviver/error-handling for fs-oriented JSON reads.
75
77
  *
76
78
  * @example
77
79
  * ```ts
78
- * const options: JsonParseOptions = {
80
+ * const options: SafeJsonParseOptions = {
79
81
  * maxSize: 1024 * 1024, // 1MB limit
80
82
  * allowPrototype: false // Block prototype pollution
81
83
  * }
82
84
  * ```
83
85
  */
84
- export interface JsonParseOptions {
86
+ export interface SafeJsonParseOptions {
85
87
  /**
86
88
  * Allow dangerous prototype pollution keys (`__proto__`, `constructor`, `prototype`).
87
89
  * Set to `true` only if you trust the JSON source completely.
@@ -114,29 +116,3 @@ export interface JsonParseOptions {
114
116
  */
115
117
  maxSize?: number | undefined;
116
118
  }
117
- /**
118
- * Discriminated union type for JSON parsing results.
119
- * Enables type-safe handling of success and failure cases.
120
- *
121
- * @template T - The expected type of the parsed data
122
- *
123
- * @example
124
- * ```ts
125
- * const result: JsonParseResult<User> = parseJsonWithResult(jsonString)
126
- *
127
- * if (result.success) {
128
- * // TypeScript knows result.data is available
129
- * console.log(result.data.name)
130
- * } else {
131
- * // TypeScript knows result.error is available
132
- * console.error(result.error)
133
- * }
134
- * ```
135
- */
136
- export type JsonParseResult<T> = {
137
- success: true;
138
- data: T;
139
- } | {
140
- success: false;
141
- error: string;
142
- };
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with esbuild */
3
+ "use strict";
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,4 @@
1
+ /** @fileoverview Version comparison and validation utilities for Socket ecosystem. */
1
2
  /**
2
3
  * Coerce a version string to valid semver format.
3
4
  *
package/dist/versions.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with esbuild */
3
+ "use strict";
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -44,7 +45,7 @@ module.exports = __toCommonJS(versions_exports);
44
45
  let _semver;
45
46
  function getSemver() {
46
47
  if (_semver === void 0) {
47
- _semver = require("./external/semver.js");
48
+ _semver = require("./external/semver");
48
49
  }
49
50
  return _semver;
50
51
  }
package/dist/words.d.ts CHANGED
@@ -2,6 +2,9 @@
2
2
  * @fileoverview Word manipulation utilities for capitalization and formatting.
3
3
  * Provides text transformation functions for consistent word processing.
4
4
  */
5
+ export interface PluralizeOptions {
6
+ count?: number;
7
+ }
5
8
  /**
6
9
  * Capitalize the first letter of a word.
7
10
  *
@@ -12,7 +15,6 @@
12
15
  * capitalize('') // ''
13
16
  * ```
14
17
  */
15
- /*@__NO_SIDE_EFFECTS__*/
16
18
  export declare function capitalize(word: string): string;
17
19
  /**
18
20
  * Determine the appropriate article (a/an) for a word.
@@ -23,11 +25,7 @@ export declare function capitalize(word: string): string;
23
25
  * determineArticle('banana') // 'a'
24
26
  * ```
25
27
  */
26
- /*@__NO_SIDE_EFFECTS__*/
27
28
  export declare function determineArticle(word: string): string;
28
- export interface PluralizeOptions {
29
- count?: number;
30
- }
31
29
  /**
32
30
  * Pluralize a word based on count.
33
31
  *
@@ -38,5 +36,4 @@ export interface PluralizeOptions {
38
36
  * pluralize('file', { count: 0 }) // 'files'
39
37
  * ```
40
38
  */
41
- /*@__NO_SIDE_EFFECTS__*/
42
39
  export declare function pluralize(word: string, options?: PluralizeOptions | undefined): string;
package/dist/words.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with esbuild */
3
+ "use strict";
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/dist/zod.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with esbuild */
3
+ "use strict";
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@socketsecurity/lib",
3
- "version": "5.18.1",
4
- "packageManager": "pnpm@11.0.0-rc.0",
3
+ "version": "5.19.0",
4
+ "packageManager": "pnpm@11.0.0-rc.2",
5
5
  "license": "MIT",
6
6
  "description": "Core utilities and infrastructure for Socket.dev security tools",
7
7
  "keywords": [
@@ -223,6 +223,10 @@
223
223
  "types": "./dist/debug.d.ts",
224
224
  "default": "./dist/debug.js"
225
225
  },
226
+ "./dlx/arborist": {
227
+ "types": "./dist/dlx/arborist.d.ts",
228
+ "default": "./dist/dlx/arborist.js"
229
+ },
226
230
  "./dlx/binary": {
227
231
  "types": "./dist/dlx/binary.d.ts",
228
232
  "default": "./dist/dlx/binary.js"
@@ -239,6 +243,14 @@
239
243
  "types": "./dist/dlx/dir.d.ts",
240
244
  "default": "./dist/dlx/dir.js"
241
245
  },
246
+ "./dlx/integrity": {
247
+ "types": "./dist/dlx/integrity.d.ts",
248
+ "default": "./dist/dlx/integrity.js"
249
+ },
250
+ "./dlx/lockfile": {
251
+ "types": "./dist/dlx/lockfile.d.ts",
252
+ "default": "./dist/dlx/lockfile.js"
253
+ },
242
254
  "./dlx/manifest": {
243
255
  "types": "./dist/dlx/manifest.d.ts",
244
256
  "default": "./dist/dlx/manifest.js"
@@ -371,10 +383,6 @@
371
383
  "types": "./dist/fs.d.ts",
372
384
  "default": "./dist/fs.js"
373
385
  },
374
- "./functions": {
375
- "types": "./dist/functions.d.ts",
376
- "default": "./dist/functions.js"
377
- },
378
386
  "./git": {
379
387
  "types": "./dist/git.d.ts",
380
388
  "default": "./dist/git.js"
@@ -395,6 +403,10 @@
395
403
  "types": "./dist/ipc.d.ts",
396
404
  "default": "./dist/ipc.js"
397
405
  },
406
+ "./ipc-cli": {
407
+ "types": "./dist/ipc-cli.d.ts",
408
+ "default": "./dist/ipc-cli.js"
409
+ },
398
410
  "./json/edit": {
399
411
  "types": "./dist/json/edit.d.ts",
400
412
  "default": "./dist/json/edit.js"
@@ -412,12 +424,8 @@
412
424
  "default": "./dist/json/types.js"
413
425
  },
414
426
  "./links": {
415
- "types": "./dist/links/index.d.ts",
416
- "default": "./dist/links/index.js"
417
- },
418
- "./links/index": {
419
- "types": "./dist/links/index.d.ts",
420
- "default": "./dist/links/index.js"
427
+ "types": "./dist/links.d.ts",
428
+ "default": "./dist/links.js"
421
429
  },
422
430
  "./logger": {
423
431
  "types": "./dist/logger.d.ts",
@@ -515,10 +523,6 @@
515
523
  "types": "./dist/performance.d.ts",
516
524
  "default": "./dist/performance.js"
517
525
  },
518
- "./plugins/babel-plugin-inline-require-calls": {
519
- "types": "./plugins/babel-plugin-inline-require-calls.d.ts",
520
- "default": "./plugins/babel-plugin-inline-require-calls.js"
521
- },
522
526
  "./process-lock": {
523
527
  "types": "./dist/process-lock.d.ts",
524
528
  "default": "./dist/process-lock.js"
@@ -571,10 +575,6 @@
571
575
  "types": "./dist/ssri.d.ts",
572
576
  "default": "./dist/ssri.js"
573
577
  },
574
- "./stdio/clear": {
575
- "types": "./dist/stdio/clear.d.ts",
576
- "default": "./dist/stdio/clear.js"
577
- },
578
578
  "./stdio/divider": {
579
579
  "types": "./dist/stdio/divider.d.ts",
580
580
  "default": "./dist/stdio/divider.js"
@@ -587,18 +587,6 @@
587
587
  "types": "./dist/stdio/header.d.ts",
588
588
  "default": "./dist/stdio/header.js"
589
589
  },
590
- "./stdio/mask": {
591
- "types": "./dist/stdio/mask.d.ts",
592
- "default": "./dist/stdio/mask.js"
593
- },
594
- "./stdio/progress": {
595
- "types": "./dist/stdio/progress.d.ts",
596
- "default": "./dist/stdio/progress.js"
597
- },
598
- "./stdio/prompts": {
599
- "types": "./dist/stdio/prompts.d.ts",
600
- "default": "./dist/stdio/prompts.js"
601
- },
602
590
  "./stdio/stderr": {
603
591
  "types": "./dist/stdio/stderr.d.ts",
604
592
  "default": "./dist/stdio/stderr.js"
@@ -635,10 +623,6 @@
635
623
  "types": "./dist/themes/context.d.ts",
636
624
  "default": "./dist/themes/context.js"
637
625
  },
638
- "./themes/index": {
639
- "types": "./dist/themes/index.d.ts",
640
- "default": "./dist/themes/index.js"
641
- },
642
626
  "./themes/themes": {
643
627
  "types": "./dist/themes/themes.d.ts",
644
628
  "default": "./dist/themes/themes.js"
@@ -659,10 +643,6 @@
659
643
  "types": "./dist/url.d.ts",
660
644
  "default": "./dist/url.js"
661
645
  },
662
- "./utils/get-ipc": {
663
- "types": "./dist/utils/get-ipc.d.ts",
664
- "default": "./dist/utils/get-ipc.js"
665
- },
666
646
  "./validation/json-parser": {
667
647
  "types": "./dist/validation/json-parser.d.ts",
668
648
  "default": "./dist/validation/json-parser.js"
@@ -700,22 +680,18 @@
700
680
  },
701
681
  "sideEffects": false,
702
682
  "scripts": {
703
- "build": "node scripts/build/main.mjs",
704
- "check": "node scripts/check.mjs",
705
- "clean": "node scripts/build/clean.mjs",
706
- "cover": "node scripts/test/cover.mjs",
707
- "dev": "node scripts/build/main.mjs --watch",
708
- "fix": "node scripts/fix.mjs",
709
- "format": "oxfmt",
710
- "format:check": "oxfmt --check",
711
- "lint": "node scripts/lint.mjs",
712
- "lint:oxlint": "oxlint .",
713
- "lint:oxfmt": "oxfmt --check .",
683
+ "build": "node scripts/build/main.mts",
684
+ "check": "node scripts/check.mts",
685
+ "clean": "node scripts/build/clean.mts",
686
+ "cover": "node scripts/test/cover.mts",
687
+ "dev": "node scripts/build/main.mts --watch",
688
+ "fix": "node scripts/fix.mts",
689
+ "lint": "node scripts/lint.mts",
714
690
  "security": "agentshield scan && { command -v zizmor >/dev/null && zizmor .github/ || echo 'zizmor not installed — run pnpm run setup to install'; }",
715
691
  "prepare": "husky",
716
692
  "prepublishOnly": "pnpm run build",
717
- "test": "node scripts/test/main.mjs",
718
- "update": "node scripts/update.mjs"
693
+ "test": "node scripts/test/main.mts",
694
+ "update": "node scripts/update.mts"
719
695
  },
720
696
  "devDependencies": {
721
697
  "@anthropic-ai/claude-code": "2.1.92",
@@ -723,34 +699,24 @@
723
699
  "@babel/parser": "7.28.4",
724
700
  "@babel/traverse": "7.28.4",
725
701
  "@babel/types": "7.28.4",
726
- "ecc-agentshield": "1.4.0",
727
- "@dotenvx/dotenvx": "1.49.0",
728
- "@inquirer/checkbox": "4.3.1",
729
- "@inquirer/confirm": "5.1.16",
730
- "@inquirer/input": "4.2.2",
731
- "@inquirer/password": "4.0.18",
732
- "@inquirer/search": "3.1.1",
733
- "@inquirer/select": "4.3.2",
734
702
  "@npmcli/arborist": "9.1.4",
735
703
  "@npmcli/package-json": "7.0.0",
736
704
  "@npmcli/promise-spawn": "8.0.3",
737
705
  "@socketregistry/is-unicode-supported": "1.0.5",
738
- "@socketregistry/packageurl-js": "1.4.1",
706
+ "@socketregistry/packageurl-js": "1.4.2",
739
707
  "@socketregistry/yocto-spinner": "1.0.25",
740
- "@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.18.0",
708
+ "@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.18.2",
741
709
  "@types/node": "24.9.2",
742
- "@typescript/native-preview": "7.0.0-dev.20250920.1",
710
+ "@typescript/native-preview": "7.0.0-dev.20260415.1",
743
711
  "@vitest/coverage-v8": "4.0.3",
744
712
  "@vitest/ui": "4.0.3",
745
- "@yarnpkg/core": "4.5.0",
746
713
  "@yarnpkg/extensions": "2.0.6",
747
714
  "adm-zip": "0.5.16",
748
715
  "cacache": "20.0.1",
749
716
  "debug": "4.4.3",
750
717
  "del": "8.0.1",
751
- "del-cli": "6.0.0",
718
+ "ecc-agentshield": "1.4.0",
752
719
  "esbuild": "0.25.11",
753
- "eslint-plugin-sort-destructure-keys": "2.0.0",
754
720
  "fast-glob": "3.3.3",
755
721
  "fast-sort": "3.4.1",
756
722
  "get-east-asian-width": "1.3.0",
@@ -765,7 +731,7 @@
765
731
  "nock": "14.0.10",
766
732
  "normalize-package-data": "8.0.0",
767
733
  "npm-package-arg": "13.0.0",
768
- "oxfmt": "^0.37.0",
734
+ "oxfmt": "0.37.0",
769
735
  "oxlint": "1.53.0",
770
736
  "p-map": "7.0.4",
771
737
  "pacote": "21.5.0",
@@ -780,11 +746,9 @@
780
746
  "tar-fs": "3.1.2",
781
747
  "tar-stream": "3.1.8",
782
748
  "taze": "19.9.2",
783
- "trash": "10.0.0",
784
749
  "type-coverage": "2.29.7",
785
750
  "typescript": "5.9.2",
786
751
  "validate-npm-package-name": "6.0.2",
787
- "vite-tsconfig-paths": "5.1.4",
788
752
  "vitest": "4.0.3",
789
753
  "which": "5.0.0",
790
754
  "yargs-parser": "22.0.0",
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- // Re-export from external-pack bundle for better deduplication.
4
- const { checkbox } = require('../external-pack')
5
- module.exports = checkbox
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- // Re-export from external-pack bundle for better deduplication.
4
- const { confirm } = require('../external-pack')
5
- module.exports = confirm
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- // Re-export from external-pack bundle for better deduplication.
4
- const { input } = require('../external-pack')
5
- module.exports = input
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- // Re-export from external-pack bundle for better deduplication.
4
- const { password } = require('../external-pack')
5
- module.exports = password
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- // Re-export from external-pack bundle for better deduplication.
4
- const { search } = require('../external-pack')
5
- module.exports = search
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- // Re-export from external-pack bundle for better deduplication.
4
- const { select } = require('../external-pack')
5
- module.exports = select
@@ -1,57 +0,0 @@
1
- /**
2
- * @fileoverview Common function utilities for control flow and caching.
3
- * Provides noop, once, and other foundational function helpers.
4
- */
5
- // Type definitions
6
- export type AsyncFunction<TArgs extends unknown[], TResult> = (...args: TArgs) => Promise<TResult>;
7
- export type AnyFunction = (...args: unknown[]) => unknown;
8
- /**
9
- * A no-op function that does nothing.
10
- *
11
- * @example
12
- * ```typescript
13
- * const callback = noop
14
- * callback() // does nothing
15
- * ```
16
- */
17
- /*@__NO_SIDE_EFFECTS__*/
18
- export declare function noop(): void;
19
- /**
20
- * Create a function that only executes once.
21
- *
22
- * @example
23
- * ```typescript
24
- * const init = once(() => Math.random())
25
- * init() // 0.456 (random value)
26
- * init() // 0.456 (same value, not recalculated)
27
- * ```
28
- */
29
- /*@__NO_SIDE_EFFECTS__*/
30
- export declare function once<T extends AnyFunction>(fn: T): T;
31
- /**
32
- * Wrap an async function to silently catch and ignore errors.
33
- *
34
- * @example
35
- * ```typescript
36
- * const safeFetch = silentWrapAsync(async (url: string) => {
37
- * const res = await fetch(url)
38
- * return res.json()
39
- * })
40
- * await safeFetch('https://example.com') // result or undefined on error
41
- * ```
42
- */
43
- /*@__NO_SIDE_EFFECTS__*/
44
- export declare function silentWrapAsync<TArgs extends unknown[], TResult>(fn: AsyncFunction<TArgs, TResult>): (...args: TArgs) => Promise<TResult | undefined>;
45
- /**
46
- * Execute a function with tail call optimization via trampoline.
47
- *
48
- * @example
49
- * ```typescript
50
- * const factorial = trampoline((n: number, acc = 1): any =>
51
- * n <= 1 ? acc : () => factorial(n - 1, n * acc)
52
- * )
53
- * factorial(5) // 120
54
- * ```
55
- */
56
- /*@__NO_SIDE_EFFECTS__*/
57
- export declare function trampoline<T extends AnyFunction>(fn: T): T;
package/dist/functions.js DELETED
@@ -1,70 +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 functions_exports = {};
21
- __export(functions_exports, {
22
- noop: () => noop,
23
- once: () => once,
24
- silentWrapAsync: () => silentWrapAsync,
25
- trampoline: () => trampoline
26
- });
27
- module.exports = __toCommonJS(functions_exports);
28
- // @__NO_SIDE_EFFECTS__
29
- function noop() {
30
- }
31
- // @__NO_SIDE_EFFECTS__
32
- function once(fn) {
33
- let called = false;
34
- let result;
35
- return function(...args) {
36
- if (!called) {
37
- called = true;
38
- result = fn.apply(this, args);
39
- }
40
- return result;
41
- };
42
- }
43
- // @__NO_SIDE_EFFECTS__
44
- function silentWrapAsync(fn) {
45
- return async (...args) => {
46
- try {
47
- const result = await fn(...args);
48
- return result === null ? void 0 : result;
49
- } catch {
50
- }
51
- return void 0;
52
- };
53
- }
54
- // @__NO_SIDE_EFFECTS__
55
- function trampoline(fn) {
56
- return function(...args) {
57
- let result = fn.apply(this, args);
58
- while (typeof result === "function") {
59
- result = result();
60
- }
61
- return result;
62
- };
63
- }
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- noop,
67
- once,
68
- silentWrapAsync,
69
- trampoline
70
- });