@samchon/ts-patch 3.2.2 → 3.4.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 (1377) hide show
  1. package/.editorconfig +371 -0
  2. package/.gitattributes +2 -0
  3. package/.github/FUNDING.yml +1 -0
  4. package/.github/workflows/build.yml +49 -0
  5. package/.github/workflows/publish.yml +47 -0
  6. package/.idea/codeStyles/Project.xml +28 -0
  7. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  8. package/.idea/compiler.xml +6 -0
  9. package/.idea/inspectionProfiles/Project_Default.xml +98 -0
  10. package/.idea/jsonSchemas.xml +28 -0
  11. package/.idea/misc.xml +9 -0
  12. package/.idea/modules.xml +8 -0
  13. package/.idea/ts-patch.iml +22 -0
  14. package/.idea/vcs.xml +12 -0
  15. package/.idea/webResources.xml +15 -0
  16. package/CHANGELOG.md +7 -0
  17. package/dist/CHANGELOG.md +275 -0
  18. package/dist/LICENSE.md +13 -0
  19. package/dist/README.md +348 -0
  20. package/dist/actions/check.js +53 -0
  21. package/dist/actions/check.js.map +1 -0
  22. package/dist/actions/patch.js +88 -0
  23. package/dist/actions/patch.js.map +1 -0
  24. package/dist/actions/unpatch.js +87 -0
  25. package/dist/actions/unpatch.js.map +1 -0
  26. package/dist/bin/ts-patch.js +43 -0
  27. package/dist/bin/ts-patch.js.map +1 -0
  28. package/dist/cli/cli.js +106 -0
  29. package/dist/cli/cli.js.map +1 -0
  30. package/dist/cli/commands.js +49 -0
  31. package/dist/cli/commands.js.map +1 -0
  32. package/dist/config.js +50 -0
  33. package/dist/config.js.map +1 -0
  34. package/dist/module/module-file.d.ts +10 -0
  35. package/dist/module/module-file.js +102 -0
  36. package/dist/module/module-file.js.map +1 -0
  37. package/dist/module/ts-module.d.ts +40 -0
  38. package/dist/module/ts-module.js +131 -0
  39. package/dist/module/ts-module.js.map +1 -0
  40. package/dist/node_modules/.bin/resolve +15 -0
  41. package/dist/node_modules/.bin/resolve.cmd +7 -0
  42. package/dist/node_modules/.bin/semver +15 -0
  43. package/dist/node_modules/.bin/semver.cmd +7 -0
  44. package/dist/package.json +106 -0
  45. package/dist/patch/get-patched-source.js +69 -0
  46. package/dist/patch/get-patched-source.js.map +1 -0
  47. package/dist/patch/transformers/fix-ts-early-return.js +61 -0
  48. package/dist/patch/transformers/fix-ts-early-return.js.map +1 -0
  49. package/dist/resources/module-patch.js +623 -0
  50. package/dist/system/cache.js +79 -0
  51. package/dist/system/cache.js.map +1 -0
  52. package/dist/utils/file-utils.js +98 -0
  53. package/dist/utils/file-utils.js.map +1 -0
  54. package/jest.config.ts +26 -0
  55. package/package.json +60 -11
  56. package/projects/core/plugin.ts +42 -0
  57. package/projects/core/resolver-hook.js +55 -0
  58. package/projects/core/shared/plugin-types.ts +159 -0
  59. package/projects/core/src/actions/check.ts +79 -0
  60. package/projects/core/src/actions/index.ts +5 -0
  61. package/projects/core/src/actions/install.ts +23 -0
  62. package/projects/core/src/actions/patch.ts +110 -0
  63. package/projects/core/src/actions/uninstall.ts +24 -0
  64. package/projects/core/src/actions/unpatch.ts +109 -0
  65. package/projects/core/src/bin/ts-patch.ts +7 -0
  66. package/projects/core/src/bin/tspc.ts +12 -0
  67. package/projects/core/src/cli/cli.ts +94 -0
  68. package/projects/core/src/cli/commands.ts +55 -0
  69. package/projects/core/src/cli/help-menu.ts +48 -0
  70. package/projects/core/src/cli/options.ts +83 -0
  71. package/projects/core/src/compiler/package.json +4 -0
  72. package/projects/core/src/compiler/tsc.js +19 -0
  73. package/projects/core/src/compiler/tsserver.js +19 -0
  74. package/projects/core/src/compiler/tsserverlibrary.js +19 -0
  75. package/projects/core/src/compiler/typescript.js +19 -0
  76. package/projects/core/src/config.ts +65 -0
  77. package/projects/core/src/index.ts +4 -0
  78. package/projects/core/src/module/get-live-module.ts +25 -0
  79. package/projects/core/src/module/index.ts +4 -0
  80. package/projects/core/src/module/module-file.ts +127 -0
  81. package/projects/core/src/module/module-source.ts +59 -0
  82. package/projects/core/src/module/source-section.ts +110 -0
  83. package/projects/core/src/module/ts-module.ts +187 -0
  84. package/projects/core/src/options.ts +55 -0
  85. package/projects/core/src/patch/get-patched-source.ts +85 -0
  86. package/projects/core/src/patch/patch-detail.ts +106 -0
  87. package/projects/core/src/patch/patch-module.ts +213 -0
  88. package/projects/core/src/patch/transformers/add-original-create-program.ts +129 -0
  89. package/projects/core/src/patch/transformers/fix-ts-early-return.ts +46 -0
  90. package/projects/core/src/patch/transformers/hook-tsc-exec.ts +52 -0
  91. package/projects/core/src/patch/transformers/index.ts +6 -0
  92. package/projects/core/src/patch/transformers/merge-statements.ts +61 -0
  93. package/projects/core/src/patch/transformers/patch-create-program.ts +68 -0
  94. package/projects/core/src/patch/transformers/patch-emitter.ts +75 -0
  95. package/projects/core/src/slice/module-slice.ts +59 -0
  96. package/projects/core/src/slice/ts54.ts +79 -0
  97. package/projects/core/src/slice/ts55.ts +80 -0
  98. package/projects/core/src/slice/ts552.ts +80 -0
  99. package/projects/core/src/system/cache.ts +48 -0
  100. package/projects/core/src/system/errors.ts +39 -0
  101. package/projects/core/src/system/index.ts +4 -0
  102. package/projects/core/src/system/logger.ts +53 -0
  103. package/projects/core/src/system/types.ts +11 -0
  104. package/projects/core/src/ts-package.ts +99 -0
  105. package/projects/core/src/utils/file-utils.ts +104 -0
  106. package/projects/core/src/utils/find-cache-dir.ts +122 -0
  107. package/projects/core/src/utils/general.ts +24 -0
  108. package/projects/core/src/utils/index.ts +3 -0
  109. package/projects/core/tsconfig.json +20 -0
  110. package/projects/patch/package.json +8 -0
  111. package/projects/patch/plugin.ts +128 -0
  112. package/projects/patch/src/plugin/esm-intercept.ts +141 -0
  113. package/projects/patch/src/plugin/plugin-creator.ts +254 -0
  114. package/projects/patch/src/plugin/plugin.ts +193 -0
  115. package/projects/patch/src/plugin/register-plugin.ts +141 -0
  116. package/projects/patch/src/shared.ts +59 -0
  117. package/projects/patch/src/ts/create-program.ts +156 -0
  118. package/projects/patch/src/ts/shim.ts +43 -0
  119. package/projects/patch/src/types/plugin-types.ts +51 -0
  120. package/projects/patch/src/types/typescript.ts +11 -0
  121. package/projects/patch/tsconfig.json +34 -0
  122. package/scripts/postbuild.js +66 -0
  123. package/test/.yarnrc +1 -0
  124. package/test/assets/projects/main/package.json +5 -0
  125. package/test/assets/projects/main/src/index.ts +0 -0
  126. package/test/assets/projects/main/tsconfig.json +16 -0
  127. package/test/assets/projects/package-config/plugin/package.json +8 -0
  128. package/test/assets/projects/package-config/plugin/plugin.js +9 -0
  129. package/test/assets/projects/package-config/plugin/transformers/transformer1.js +28 -0
  130. package/test/assets/projects/package-config/plugin/transformers/transformer2.js +22 -0
  131. package/test/assets/projects/package-config/run-transform.js +72 -0
  132. package/test/assets/projects/package-config/src/index.ts +6 -0
  133. package/test/assets/projects/package-config/tsconfig.json +13 -0
  134. package/test/assets/projects/path-mapping/base.ts +1 -0
  135. package/test/assets/projects/path-mapping/package.json +8 -0
  136. package/test/assets/projects/path-mapping/src/a/a.ts +1 -0
  137. package/test/assets/projects/path-mapping/src/b.ts +1 -0
  138. package/test/assets/projects/path-mapping/src/index.ts +29 -0
  139. package/test/assets/projects/path-mapping/tsconfig.json +18 -0
  140. package/test/assets/projects/path-mapping/tsconfig.plugin.json +15 -0
  141. package/test/assets/projects/transform/package.json +9 -0
  142. package/test/assets/projects/transform/run-transform.js +56 -0
  143. package/test/assets/projects/transform/src/index.ts +4 -0
  144. package/test/assets/projects/transform/transformers/cjs/js-plugin.cjs +19 -0
  145. package/test/assets/projects/transform/transformers/cjs/package.json +3 -0
  146. package/test/assets/projects/transform/transformers/cjs/plugin.cts +17 -0
  147. package/test/assets/projects/transform/transformers/cjs/tsconfig.json +7 -0
  148. package/test/assets/projects/transform/transformers/esm/js-plugin.mjs +17 -0
  149. package/test/assets/projects/transform/transformers/esm/package.json +3 -0
  150. package/test/assets/projects/transform/transformers/esm/plugin.mts +19 -0
  151. package/test/assets/projects/transform/transformers/esm/plugin.ts +19 -0
  152. package/test/assets/projects/transform/transformers/esm/tsconfig.json +7 -0
  153. package/test/assets/projects/transform/tsconfig.cjs.json +12 -0
  154. package/test/assets/projects/transform/tsconfig.cts.json +12 -0
  155. package/test/assets/projects/transform/tsconfig.json +9 -0
  156. package/test/assets/projects/transform/tsconfig.mjs.json +12 -0
  157. package/test/assets/projects/transform/tsconfig.mts.json +11 -0
  158. package/test/assets/projects/transform/tsconfig.ts.json +11 -0
  159. package/test/assets/projects/webpack/esm-plugin.mjs +5 -0
  160. package/test/assets/projects/webpack/esm-plugin.mts +5 -0
  161. package/test/assets/projects/webpack/hide-module.js +24 -0
  162. package/test/assets/projects/webpack/package.json +14 -0
  163. package/test/assets/projects/webpack/plugin.ts +7 -0
  164. package/test/assets/projects/webpack/src/index.ts +0 -0
  165. package/test/assets/projects/webpack/tsconfig.esm.json +8 -0
  166. package/test/assets/projects/webpack/tsconfig.esmts.json +8 -0
  167. package/test/assets/projects/webpack/tsconfig.json +14 -0
  168. package/test/assets/projects/webpack/webpack.config.js +24 -0
  169. package/test/node_modules/.bin/acorn +15 -0
  170. package/test/node_modules/.bin/acorn.cmd +7 -0
  171. package/test/node_modules/.bin/json5 +15 -0
  172. package/test/node_modules/.bin/json5.cmd +7 -0
  173. package/test/node_modules/.bin/node-which +15 -0
  174. package/test/node_modules/.bin/node-which.cmd +7 -0
  175. package/test/node_modules/.bin/resolve +15 -0
  176. package/test/node_modules/.bin/resolve.cmd +7 -0
  177. package/test/node_modules/.bin/semver +15 -0
  178. package/test/node_modules/.bin/semver.cmd +7 -0
  179. package/test/node_modules/.bin/ts-node +15 -0
  180. package/test/node_modules/.bin/ts-node-cwd +15 -0
  181. package/test/node_modules/.bin/ts-node-cwd.cmd +7 -0
  182. package/test/node_modules/.bin/ts-node-esm +15 -0
  183. package/test/node_modules/.bin/ts-node-esm.cmd +7 -0
  184. package/test/node_modules/.bin/ts-node-script +15 -0
  185. package/test/node_modules/.bin/ts-node-script.cmd +7 -0
  186. package/test/node_modules/.bin/ts-node-transpile-only +15 -0
  187. package/test/node_modules/.bin/ts-node-transpile-only.cmd +7 -0
  188. package/test/node_modules/.bin/ts-node.cmd +7 -0
  189. package/test/node_modules/.bin/ts-script +15 -0
  190. package/test/node_modules/.bin/ts-script.cmd +7 -0
  191. package/test/node_modules/.bin/tsc +15 -0
  192. package/test/node_modules/.bin/tsc.cmd +7 -0
  193. package/test/node_modules/.bin/tsserver +15 -0
  194. package/test/node_modules/.bin/tsserver.cmd +7 -0
  195. package/test/node_modules/.yarn-integrity +73 -0
  196. package/test/node_modules/@cspotcode/source-map-support/LICENSE.md +21 -0
  197. package/test/node_modules/@cspotcode/source-map-support/README.md +289 -0
  198. package/test/node_modules/@cspotcode/source-map-support/browser-source-map-support.js +114 -0
  199. package/test/node_modules/@cspotcode/source-map-support/package.json +50 -0
  200. package/test/node_modules/@cspotcode/source-map-support/register-hook-require.d.ts +7 -0
  201. package/test/node_modules/@cspotcode/source-map-support/register-hook-require.js +3 -0
  202. package/test/node_modules/@cspotcode/source-map-support/register.d.ts +7 -0
  203. package/test/node_modules/@cspotcode/source-map-support/register.js +1 -0
  204. package/test/node_modules/@cspotcode/source-map-support/source-map-support.d.ts +76 -0
  205. package/test/node_modules/@cspotcode/source-map-support/source-map-support.js +938 -0
  206. package/test/node_modules/@jridgewell/resolve-uri/LICENSE +19 -0
  207. package/test/node_modules/@jridgewell/resolve-uri/README.md +40 -0
  208. package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs +232 -0
  209. package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map +1 -0
  210. package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js +240 -0
  211. package/test/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map +1 -0
  212. package/test/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +4 -0
  213. package/test/node_modules/@jridgewell/resolve-uri/package.json +69 -0
  214. package/test/node_modules/@jridgewell/sourcemap-codec/LICENSE +19 -0
  215. package/test/node_modules/@jridgewell/sourcemap-codec/README.md +264 -0
  216. package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +423 -0
  217. package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +6 -0
  218. package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +464 -0
  219. package/test/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +6 -0
  220. package/test/node_modules/@jridgewell/sourcemap-codec/package.json +63 -0
  221. package/test/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +345 -0
  222. package/test/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +111 -0
  223. package/test/node_modules/@jridgewell/sourcemap-codec/src/strings.ts +65 -0
  224. package/test/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +55 -0
  225. package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts +50 -0
  226. package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +1 -0
  227. package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +50 -0
  228. package/test/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +1 -0
  229. package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +9 -0
  230. package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +1 -0
  231. package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +9 -0
  232. package/test/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +1 -0
  233. package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts +16 -0
  234. package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map +1 -0
  235. package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
  236. package/test/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map +1 -0
  237. package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +7 -0
  238. package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +1 -0
  239. package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
  240. package/test/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +1 -0
  241. package/test/node_modules/@jridgewell/trace-mapping/LICENSE +19 -0
  242. package/test/node_modules/@jridgewell/trace-mapping/README.md +193 -0
  243. package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs +514 -0
  244. package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map +1 -0
  245. package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js +528 -0
  246. package/test/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map +1 -0
  247. package/test/node_modules/@jridgewell/trace-mapping/dist/types/any-map.d.ts +8 -0
  248. package/test/node_modules/@jridgewell/trace-mapping/dist/types/binary-search.d.ts +32 -0
  249. package/test/node_modules/@jridgewell/trace-mapping/dist/types/by-source.d.ts +7 -0
  250. package/test/node_modules/@jridgewell/trace-mapping/dist/types/resolve.d.ts +1 -0
  251. package/test/node_modules/@jridgewell/trace-mapping/dist/types/sort.d.ts +2 -0
  252. package/test/node_modules/@jridgewell/trace-mapping/dist/types/sourcemap-segment.d.ts +16 -0
  253. package/test/node_modules/@jridgewell/trace-mapping/dist/types/strip-filename.d.ts +4 -0
  254. package/test/node_modules/@jridgewell/trace-mapping/dist/types/trace-mapping.d.ts +70 -0
  255. package/test/node_modules/@jridgewell/trace-mapping/dist/types/types.d.ts +85 -0
  256. package/test/node_modules/@jridgewell/trace-mapping/package.json +70 -0
  257. package/test/node_modules/@tsconfig/node10/LICENSE +21 -0
  258. package/test/node_modules/@tsconfig/node10/README.md +38 -0
  259. package/test/node_modules/@tsconfig/node10/package.json +15 -0
  260. package/test/node_modules/@tsconfig/node10/tsconfig.json +14 -0
  261. package/test/node_modules/@tsconfig/node12/LICENSE +21 -0
  262. package/test/node_modules/@tsconfig/node12/README.md +40 -0
  263. package/test/node_modules/@tsconfig/node12/package.json +1 -0
  264. package/test/node_modules/@tsconfig/node12/tsconfig.json +16 -0
  265. package/test/node_modules/@tsconfig/node14/LICENSE +21 -0
  266. package/test/node_modules/@tsconfig/node14/README.md +40 -0
  267. package/test/node_modules/@tsconfig/node14/package.json +1 -0
  268. package/test/node_modules/@tsconfig/node14/tsconfig.json +16 -0
  269. package/test/node_modules/@tsconfig/node16/LICENSE +21 -0
  270. package/test/node_modules/@tsconfig/node16/README.md +40 -0
  271. package/test/node_modules/@tsconfig/node16/package.json +15 -0
  272. package/test/node_modules/@tsconfig/node16/tsconfig.json +16 -0
  273. package/test/node_modules/@types/fs-extra/LICENSE +21 -0
  274. package/test/node_modules/@types/fs-extra/README.md +16 -0
  275. package/test/node_modules/@types/fs-extra/index.d.ts +563 -0
  276. package/test/node_modules/@types/fs-extra/package.json +67 -0
  277. package/test/node_modules/@types/node/LICENSE +21 -0
  278. package/test/node_modules/@types/node/README.md +15 -0
  279. package/test/node_modules/@types/node/assert/strict.d.ts +105 -0
  280. package/test/node_modules/@types/node/assert.d.ts +955 -0
  281. package/test/node_modules/@types/node/async_hooks.d.ts +623 -0
  282. package/test/node_modules/@types/node/buffer.buffer.d.ts +466 -0
  283. package/test/node_modules/@types/node/buffer.d.ts +1810 -0
  284. package/test/node_modules/@types/node/child_process.d.ts +1433 -0
  285. package/test/node_modules/@types/node/cluster.d.ts +486 -0
  286. package/test/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  287. package/test/node_modules/@types/node/console.d.ts +151 -0
  288. package/test/node_modules/@types/node/constants.d.ts +20 -0
  289. package/test/node_modules/@types/node/crypto.d.ts +4065 -0
  290. package/test/node_modules/@types/node/dgram.d.ts +564 -0
  291. package/test/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  292. package/test/node_modules/@types/node/dns/promises.d.ts +503 -0
  293. package/test/node_modules/@types/node/dns.d.ts +922 -0
  294. package/test/node_modules/@types/node/domain.d.ts +166 -0
  295. package/test/node_modules/@types/node/events.d.ts +1047 -0
  296. package/test/node_modules/@types/node/fs/promises.d.ts +1329 -0
  297. package/test/node_modules/@types/node/fs.d.ts +4678 -0
  298. package/test/node_modules/@types/node/globals.d.ts +150 -0
  299. package/test/node_modules/@types/node/globals.typedarray.d.ts +101 -0
  300. package/test/node_modules/@types/node/http.d.ts +2188 -0
  301. package/test/node_modules/@types/node/http2.d.ts +2480 -0
  302. package/test/node_modules/@types/node/https.d.ts +405 -0
  303. package/test/node_modules/@types/node/index.d.ts +115 -0
  304. package/test/node_modules/@types/node/inspector/promises.d.ts +41 -0
  305. package/test/node_modules/@types/node/inspector.d.ts +269 -0
  306. package/test/node_modules/@types/node/inspector.generated.d.ts +4401 -0
  307. package/test/node_modules/@types/node/module.d.ts +757 -0
  308. package/test/node_modules/@types/node/net.d.ts +933 -0
  309. package/test/node_modules/@types/node/os.d.ts +507 -0
  310. package/test/node_modules/@types/node/package.json +155 -0
  311. package/test/node_modules/@types/node/path/posix.d.ts +8 -0
  312. package/test/node_modules/@types/node/path/win32.d.ts +8 -0
  313. package/test/node_modules/@types/node/path.d.ts +187 -0
  314. package/test/node_modules/@types/node/perf_hooks.d.ts +643 -0
  315. package/test/node_modules/@types/node/process.d.ts +2175 -0
  316. package/test/node_modules/@types/node/punycode.d.ts +117 -0
  317. package/test/node_modules/@types/node/querystring.d.ts +152 -0
  318. package/test/node_modules/@types/node/quic.d.ts +910 -0
  319. package/test/node_modules/@types/node/readline/promises.d.ts +161 -0
  320. package/test/node_modules/@types/node/readline.d.ts +542 -0
  321. package/test/node_modules/@types/node/repl.d.ts +415 -0
  322. package/test/node_modules/@types/node/sea.d.ts +162 -0
  323. package/test/node_modules/@types/node/sqlite.d.ts +1065 -0
  324. package/test/node_modules/@types/node/stream/consumers.d.ts +38 -0
  325. package/test/node_modules/@types/node/stream/promises.d.ts +211 -0
  326. package/test/node_modules/@types/node/stream/web.d.ts +296 -0
  327. package/test/node_modules/@types/node/stream.d.ts +1770 -0
  328. package/test/node_modules/@types/node/string_decoder.d.ts +67 -0
  329. package/test/node_modules/@types/node/test/reporters.d.ts +96 -0
  330. package/test/node_modules/@types/node/test.d.ts +2275 -0
  331. package/test/node_modules/@types/node/timers/promises.d.ts +108 -0
  332. package/test/node_modules/@types/node/timers.d.ts +159 -0
  333. package/test/node_modules/@types/node/tls.d.ts +1203 -0
  334. package/test/node_modules/@types/node/trace_events.d.ts +197 -0
  335. package/test/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
  336. package/test/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  337. package/test/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  338. package/test/node_modules/@types/node/ts5.6/index.d.ts +117 -0
  339. package/test/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  340. package/test/node_modules/@types/node/ts5.7/index.d.ts +117 -0
  341. package/test/node_modules/@types/node/tty.d.ts +250 -0
  342. package/test/node_modules/@types/node/url.d.ts +541 -0
  343. package/test/node_modules/@types/node/util/types.d.ts +558 -0
  344. package/test/node_modules/@types/node/util.d.ts +1687 -0
  345. package/test/node_modules/@types/node/v8.d.ts +988 -0
  346. package/test/node_modules/@types/node/vm.d.ts +1208 -0
  347. package/test/node_modules/@types/node/wasi.d.ts +202 -0
  348. package/test/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
  349. package/test/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  350. package/test/node_modules/@types/node/web-globals/console.d.ts +9 -0
  351. package/test/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  352. package/test/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  353. package/test/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  354. package/test/node_modules/@types/node/web-globals/events.d.ts +106 -0
  355. package/test/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
  356. package/test/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  357. package/test/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  358. package/test/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  359. package/test/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  360. package/test/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  361. package/test/node_modules/@types/node/web-globals/streams.d.ts +115 -0
  362. package/test/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  363. package/test/node_modules/@types/node/web-globals/url.d.ts +24 -0
  364. package/test/node_modules/@types/node/worker_threads.d.ts +717 -0
  365. package/test/node_modules/@types/node/zlib.d.ts +682 -0
  366. package/test/node_modules/acorn/CHANGELOG.md +972 -0
  367. package/test/node_modules/acorn/LICENSE +21 -0
  368. package/test/node_modules/acorn/README.md +301 -0
  369. package/test/node_modules/acorn/bin/acorn +4 -0
  370. package/test/node_modules/acorn/dist/acorn.d.mts +883 -0
  371. package/test/node_modules/acorn/dist/acorn.d.ts +883 -0
  372. package/test/node_modules/acorn/dist/acorn.js +6295 -0
  373. package/test/node_modules/acorn/dist/acorn.mjs +6266 -0
  374. package/test/node_modules/acorn/dist/bin.js +90 -0
  375. package/test/node_modules/acorn/package.json +50 -0
  376. package/test/node_modules/acorn-walk/CHANGELOG.md +209 -0
  377. package/test/node_modules/acorn-walk/LICENSE +21 -0
  378. package/test/node_modules/acorn-walk/README.md +124 -0
  379. package/test/node_modules/acorn-walk/dist/walk.d.mts +152 -0
  380. package/test/node_modules/acorn-walk/dist/walk.d.ts +152 -0
  381. package/test/node_modules/acorn-walk/dist/walk.js +485 -0
  382. package/test/node_modules/acorn-walk/dist/walk.mjs +467 -0
  383. package/test/node_modules/acorn-walk/node_modules/.bin/acorn +15 -0
  384. package/test/node_modules/acorn-walk/node_modules/.bin/acorn.cmd +7 -0
  385. package/test/node_modules/acorn-walk/package.json +50 -0
  386. package/test/node_modules/ansi-regex/index.d.ts +37 -0
  387. package/test/node_modules/ansi-regex/index.js +10 -0
  388. package/test/node_modules/ansi-regex/license +9 -0
  389. package/test/node_modules/ansi-regex/package.json +55 -0
  390. package/test/node_modules/ansi-regex/readme.md +78 -0
  391. package/test/node_modules/ansi-styles/index.d.ts +345 -0
  392. package/test/node_modules/ansi-styles/index.js +163 -0
  393. package/test/node_modules/ansi-styles/license +9 -0
  394. package/test/node_modules/ansi-styles/package.json +56 -0
  395. package/test/node_modules/ansi-styles/readme.md +152 -0
  396. package/test/node_modules/arg/LICENSE.md +21 -0
  397. package/test/node_modules/arg/README.md +280 -0
  398. package/test/node_modules/arg/index.d.ts +31 -0
  399. package/test/node_modules/arg/index.js +144 -0
  400. package/test/node_modules/arg/package.json +30 -0
  401. package/test/node_modules/chalk/index.d.ts +415 -0
  402. package/test/node_modules/chalk/license +9 -0
  403. package/test/node_modules/chalk/package.json +68 -0
  404. package/test/node_modules/chalk/readme.md +341 -0
  405. package/test/node_modules/chalk/source/index.js +229 -0
  406. package/test/node_modules/chalk/source/templates.js +134 -0
  407. package/test/node_modules/chalk/source/util.js +39 -0
  408. package/test/node_modules/color-convert/CHANGELOG.md +54 -0
  409. package/test/node_modules/color-convert/LICENSE +21 -0
  410. package/test/node_modules/color-convert/README.md +68 -0
  411. package/test/node_modules/color-convert/conversions.js +839 -0
  412. package/test/node_modules/color-convert/index.js +81 -0
  413. package/test/node_modules/color-convert/package.json +48 -0
  414. package/test/node_modules/color-convert/route.js +97 -0
  415. package/test/node_modules/color-name/LICENSE +8 -0
  416. package/test/node_modules/color-name/README.md +11 -0
  417. package/test/node_modules/color-name/index.js +152 -0
  418. package/test/node_modules/color-name/package.json +28 -0
  419. package/test/node_modules/create-require/CHANGELOG.md +33 -0
  420. package/test/node_modules/create-require/LICENSE +25 -0
  421. package/test/node_modules/create-require/README.md +46 -0
  422. package/test/node_modules/create-require/create-require.d.ts +3 -0
  423. package/test/node_modules/create-require/create-require.js +49 -0
  424. package/test/node_modules/create-require/package.json +39 -0
  425. package/test/node_modules/diff/CONTRIBUTING.md +39 -0
  426. package/test/node_modules/diff/LICENSE +31 -0
  427. package/test/node_modules/diff/README.md +207 -0
  428. package/test/node_modules/diff/dist/diff.js +1548 -0
  429. package/test/node_modules/diff/dist/diff.min.js +1 -0
  430. package/test/node_modules/diff/lib/convert/dmp.js +32 -0
  431. package/test/node_modules/diff/lib/convert/xml.js +42 -0
  432. package/test/node_modules/diff/lib/diff/array.js +45 -0
  433. package/test/node_modules/diff/lib/diff/base.js +304 -0
  434. package/test/node_modules/diff/lib/diff/character.js +37 -0
  435. package/test/node_modules/diff/lib/diff/css.js +41 -0
  436. package/test/node_modules/diff/lib/diff/json.js +163 -0
  437. package/test/node_modules/diff/lib/diff/line.js +89 -0
  438. package/test/node_modules/diff/lib/diff/sentence.js +41 -0
  439. package/test/node_modules/diff/lib/diff/word.js +107 -0
  440. package/test/node_modules/diff/lib/index.es6.js +1519 -0
  441. package/test/node_modules/diff/lib/index.js +216 -0
  442. package/test/node_modules/diff/lib/patch/apply.js +243 -0
  443. package/test/node_modules/diff/lib/patch/create.js +247 -0
  444. package/test/node_modules/diff/lib/patch/merge.js +609 -0
  445. package/test/node_modules/diff/lib/patch/parse.js +156 -0
  446. package/test/node_modules/diff/lib/util/array.js +32 -0
  447. package/test/node_modules/diff/lib/util/distance-iterator.js +57 -0
  448. package/test/node_modules/diff/lib/util/params.js +24 -0
  449. package/test/node_modules/diff/package.json +74 -0
  450. package/test/node_modules/diff/release-notes.md +261 -0
  451. package/test/node_modules/diff/runtime.js +3 -0
  452. package/test/node_modules/fs-extra/LICENSE +15 -0
  453. package/test/node_modules/fs-extra/README.md +262 -0
  454. package/test/node_modules/fs-extra/lib/copy/copy-sync.js +169 -0
  455. package/test/node_modules/fs-extra/lib/copy/copy.js +235 -0
  456. package/test/node_modules/fs-extra/lib/copy/index.js +7 -0
  457. package/test/node_modules/fs-extra/lib/empty/index.js +39 -0
  458. package/test/node_modules/fs-extra/lib/ensure/file.js +69 -0
  459. package/test/node_modules/fs-extra/lib/ensure/index.js +23 -0
  460. package/test/node_modules/fs-extra/lib/ensure/link.js +64 -0
  461. package/test/node_modules/fs-extra/lib/ensure/symlink-paths.js +99 -0
  462. package/test/node_modules/fs-extra/lib/ensure/symlink-type.js +31 -0
  463. package/test/node_modules/fs-extra/lib/ensure/symlink.js +82 -0
  464. package/test/node_modules/fs-extra/lib/fs/index.js +128 -0
  465. package/test/node_modules/fs-extra/lib/index.js +16 -0
  466. package/test/node_modules/fs-extra/lib/json/index.js +16 -0
  467. package/test/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
  468. package/test/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
  469. package/test/node_modules/fs-extra/lib/json/output-json.js +12 -0
  470. package/test/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  471. package/test/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
  472. package/test/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
  473. package/test/node_modules/fs-extra/lib/move/index.js +7 -0
  474. package/test/node_modules/fs-extra/lib/move/move-sync.js +54 -0
  475. package/test/node_modules/fs-extra/lib/move/move.js +75 -0
  476. package/test/node_modules/fs-extra/lib/output-file/index.js +40 -0
  477. package/test/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  478. package/test/node_modules/fs-extra/lib/remove/index.js +22 -0
  479. package/test/node_modules/fs-extra/lib/remove/rimraf.js +302 -0
  480. package/test/node_modules/fs-extra/lib/util/stat.js +154 -0
  481. package/test/node_modules/fs-extra/lib/util/utimes.js +26 -0
  482. package/test/node_modules/fs-extra/package.json +67 -0
  483. package/test/node_modules/function-bind/.eslintrc +21 -0
  484. package/test/node_modules/function-bind/.github/FUNDING.yml +12 -0
  485. package/test/node_modules/function-bind/.github/SECURITY.md +3 -0
  486. package/test/node_modules/function-bind/.nycrc +13 -0
  487. package/test/node_modules/function-bind/CHANGELOG.md +136 -0
  488. package/test/node_modules/function-bind/LICENSE +20 -0
  489. package/test/node_modules/function-bind/README.md +46 -0
  490. package/test/node_modules/function-bind/implementation.js +84 -0
  491. package/test/node_modules/function-bind/index.js +5 -0
  492. package/test/node_modules/function-bind/package.json +87 -0
  493. package/test/node_modules/function-bind/test/.eslintrc +9 -0
  494. package/test/node_modules/function-bind/test/index.js +252 -0
  495. package/test/node_modules/global-prefix/LICENSE +21 -0
  496. package/test/node_modules/global-prefix/README.md +92 -0
  497. package/test/node_modules/global-prefix/index.js +85 -0
  498. package/test/node_modules/global-prefix/node_modules/.bin/node-which +15 -0
  499. package/test/node_modules/global-prefix/node_modules/.bin/node-which.cmd +7 -0
  500. package/test/node_modules/global-prefix/package.json +49 -0
  501. package/test/node_modules/graceful-fs/LICENSE +15 -0
  502. package/test/node_modules/graceful-fs/README.md +143 -0
  503. package/test/node_modules/graceful-fs/clone.js +23 -0
  504. package/test/node_modules/graceful-fs/graceful-fs.js +448 -0
  505. package/test/node_modules/graceful-fs/legacy-streams.js +118 -0
  506. package/test/node_modules/graceful-fs/package.json +53 -0
  507. package/test/node_modules/graceful-fs/polyfills.js +355 -0
  508. package/test/node_modules/has-flag/index.d.ts +39 -0
  509. package/test/node_modules/has-flag/index.js +8 -0
  510. package/test/node_modules/has-flag/license +9 -0
  511. package/test/node_modules/has-flag/package.json +46 -0
  512. package/test/node_modules/has-flag/readme.md +89 -0
  513. package/test/node_modules/hasown/.eslintrc +5 -0
  514. package/test/node_modules/hasown/.github/FUNDING.yml +12 -0
  515. package/test/node_modules/hasown/.nycrc +13 -0
  516. package/test/node_modules/hasown/CHANGELOG.md +40 -0
  517. package/test/node_modules/hasown/LICENSE +21 -0
  518. package/test/node_modules/hasown/README.md +40 -0
  519. package/test/node_modules/hasown/index.d.ts +3 -0
  520. package/test/node_modules/hasown/index.js +8 -0
  521. package/test/node_modules/hasown/package.json +92 -0
  522. package/test/node_modules/hasown/tsconfig.json +6 -0
  523. package/test/node_modules/ini/LICENSE +15 -0
  524. package/test/node_modules/ini/README.md +180 -0
  525. package/test/node_modules/ini/lib/ini.js +280 -0
  526. package/test/node_modules/ini/package.json +45 -0
  527. package/test/node_modules/is-core-module/.eslintrc +18 -0
  528. package/test/node_modules/is-core-module/.nycrc +9 -0
  529. package/test/node_modules/is-core-module/CHANGELOG.md +218 -0
  530. package/test/node_modules/is-core-module/LICENSE +20 -0
  531. package/test/node_modules/is-core-module/README.md +40 -0
  532. package/test/node_modules/is-core-module/core.json +162 -0
  533. package/test/node_modules/is-core-module/index.js +69 -0
  534. package/test/node_modules/is-core-module/package.json +76 -0
  535. package/test/node_modules/is-core-module/test/index.js +157 -0
  536. package/test/node_modules/isexe/LICENSE.md +55 -0
  537. package/test/node_modules/isexe/README.md +80 -0
  538. package/test/node_modules/isexe/dist/commonjs/index.d.ts +14 -0
  539. package/test/node_modules/isexe/dist/commonjs/index.d.ts.map +1 -0
  540. package/test/node_modules/isexe/dist/commonjs/index.js +56 -0
  541. package/test/node_modules/isexe/dist/commonjs/index.js.map +1 -0
  542. package/test/node_modules/isexe/dist/commonjs/index.min.js +2 -0
  543. package/test/node_modules/isexe/dist/commonjs/index.min.js.map +7 -0
  544. package/test/node_modules/isexe/dist/commonjs/options.d.ts +32 -0
  545. package/test/node_modules/isexe/dist/commonjs/options.d.ts.map +1 -0
  546. package/test/node_modules/isexe/dist/commonjs/options.js +3 -0
  547. package/test/node_modules/isexe/dist/commonjs/options.js.map +1 -0
  548. package/test/node_modules/isexe/dist/commonjs/package.json +3 -0
  549. package/test/node_modules/isexe/dist/commonjs/posix.d.ts +18 -0
  550. package/test/node_modules/isexe/dist/commonjs/posix.d.ts.map +1 -0
  551. package/test/node_modules/isexe/dist/commonjs/posix.js +67 -0
  552. package/test/node_modules/isexe/dist/commonjs/posix.js.map +1 -0
  553. package/test/node_modules/isexe/dist/commonjs/win32.d.ts +18 -0
  554. package/test/node_modules/isexe/dist/commonjs/win32.d.ts.map +1 -0
  555. package/test/node_modules/isexe/dist/commonjs/win32.js +63 -0
  556. package/test/node_modules/isexe/dist/commonjs/win32.js.map +1 -0
  557. package/test/node_modules/isexe/dist/esm/index.d.ts +14 -0
  558. package/test/node_modules/isexe/dist/esm/index.d.ts.map +1 -0
  559. package/test/node_modules/isexe/dist/esm/index.js +16 -0
  560. package/test/node_modules/isexe/dist/esm/index.js.map +1 -0
  561. package/test/node_modules/isexe/dist/esm/index.min.js +2 -0
  562. package/test/node_modules/isexe/dist/esm/index.min.js.map +7 -0
  563. package/test/node_modules/isexe/dist/esm/options.d.ts +32 -0
  564. package/test/node_modules/isexe/dist/esm/options.d.ts.map +1 -0
  565. package/test/node_modules/isexe/dist/esm/options.js +2 -0
  566. package/test/node_modules/isexe/dist/esm/options.js.map +1 -0
  567. package/test/node_modules/isexe/dist/esm/package.json +3 -0
  568. package/test/node_modules/isexe/dist/esm/posix.d.ts +18 -0
  569. package/test/node_modules/isexe/dist/esm/posix.d.ts.map +1 -0
  570. package/test/node_modules/isexe/dist/esm/posix.js +62 -0
  571. package/test/node_modules/isexe/dist/esm/posix.js.map +1 -0
  572. package/test/node_modules/isexe/dist/esm/win32.d.ts +18 -0
  573. package/test/node_modules/isexe/dist/esm/win32.d.ts.map +1 -0
  574. package/test/node_modules/isexe/dist/esm/win32.js +58 -0
  575. package/test/node_modules/isexe/dist/esm/win32.js.map +1 -0
  576. package/test/node_modules/isexe/package.json +78 -0
  577. package/test/node_modules/json5/LICENSE.md +23 -0
  578. package/test/node_modules/json5/README.md +282 -0
  579. package/test/node_modules/json5/dist/index.js +1737 -0
  580. package/test/node_modules/json5/dist/index.min.js +1 -0
  581. package/test/node_modules/json5/dist/index.min.mjs +1 -0
  582. package/test/node_modules/json5/dist/index.mjs +1426 -0
  583. package/test/node_modules/json5/lib/cli.js +152 -0
  584. package/test/node_modules/json5/lib/index.d.ts +4 -0
  585. package/test/node_modules/json5/lib/index.js +9 -0
  586. package/test/node_modules/json5/lib/parse.d.ts +15 -0
  587. package/test/node_modules/json5/lib/parse.js +1114 -0
  588. package/test/node_modules/json5/lib/register.js +13 -0
  589. package/test/node_modules/json5/lib/require.js +4 -0
  590. package/test/node_modules/json5/lib/stringify.d.ts +89 -0
  591. package/test/node_modules/json5/lib/stringify.js +261 -0
  592. package/test/node_modules/json5/lib/unicode.d.ts +3 -0
  593. package/test/node_modules/json5/lib/unicode.js +4 -0
  594. package/test/node_modules/json5/lib/util.d.ts +5 -0
  595. package/test/node_modules/json5/lib/util.js +35 -0
  596. package/test/node_modules/json5/package.json +72 -0
  597. package/test/node_modules/jsonfile/LICENSE +15 -0
  598. package/test/node_modules/jsonfile/README.md +230 -0
  599. package/test/node_modules/jsonfile/index.js +88 -0
  600. package/test/node_modules/jsonfile/package.json +40 -0
  601. package/test/node_modules/jsonfile/utils.js +14 -0
  602. package/test/node_modules/kind-of/CHANGELOG.md +160 -0
  603. package/test/node_modules/kind-of/LICENSE +21 -0
  604. package/test/node_modules/kind-of/README.md +367 -0
  605. package/test/node_modules/kind-of/index.js +129 -0
  606. package/test/node_modules/kind-of/package.json +88 -0
  607. package/test/node_modules/make-error/LICENSE +5 -0
  608. package/test/node_modules/make-error/README.md +112 -0
  609. package/test/node_modules/make-error/dist/make-error.js +1 -0
  610. package/test/node_modules/make-error/index.d.ts +47 -0
  611. package/test/node_modules/make-error/index.js +151 -0
  612. package/test/node_modules/make-error/package.json +62 -0
  613. package/test/node_modules/minimist/.eslintrc +29 -0
  614. package/test/node_modules/minimist/.github/FUNDING.yml +12 -0
  615. package/test/node_modules/minimist/.nycrc +14 -0
  616. package/test/node_modules/minimist/CHANGELOG.md +298 -0
  617. package/test/node_modules/minimist/LICENSE +18 -0
  618. package/test/node_modules/minimist/README.md +121 -0
  619. package/test/node_modules/minimist/example/parse.js +4 -0
  620. package/test/node_modules/minimist/index.js +263 -0
  621. package/test/node_modules/minimist/package.json +75 -0
  622. package/test/node_modules/minimist/test/all_bool.js +34 -0
  623. package/test/node_modules/minimist/test/bool.js +177 -0
  624. package/test/node_modules/minimist/test/dash.js +43 -0
  625. package/test/node_modules/minimist/test/default_bool.js +37 -0
  626. package/test/node_modules/minimist/test/dotted.js +24 -0
  627. package/test/node_modules/minimist/test/kv_short.js +32 -0
  628. package/test/node_modules/minimist/test/long.js +33 -0
  629. package/test/node_modules/minimist/test/num.js +38 -0
  630. package/test/node_modules/minimist/test/parse.js +209 -0
  631. package/test/node_modules/minimist/test/parse_modified.js +11 -0
  632. package/test/node_modules/minimist/test/proto.js +64 -0
  633. package/test/node_modules/minimist/test/short.js +69 -0
  634. package/test/node_modules/minimist/test/stop_early.js +17 -0
  635. package/test/node_modules/minimist/test/unknown.js +104 -0
  636. package/test/node_modules/minimist/test/whitespace.js +10 -0
  637. package/test/node_modules/path-parse/LICENSE +21 -0
  638. package/test/node_modules/path-parse/README.md +42 -0
  639. package/test/node_modules/path-parse/index.js +75 -0
  640. package/test/node_modules/path-parse/package.json +33 -0
  641. package/test/node_modules/resolve/.editorconfig +37 -0
  642. package/test/node_modules/resolve/.eslintrc +65 -0
  643. package/test/node_modules/resolve/.github/FUNDING.yml +12 -0
  644. package/test/node_modules/resolve/.github/INCIDENT_RESPONSE_PROCESS.md +119 -0
  645. package/test/node_modules/resolve/.github/THREAT_MODEL.md +74 -0
  646. package/test/node_modules/resolve/LICENSE +21 -0
  647. package/test/node_modules/resolve/SECURITY.md +11 -0
  648. package/test/node_modules/resolve/async.js +3 -0
  649. package/test/node_modules/resolve/bin/resolve +50 -0
  650. package/test/node_modules/resolve/example/async.js +5 -0
  651. package/test/node_modules/resolve/example/sync.js +3 -0
  652. package/test/node_modules/resolve/index.js +6 -0
  653. package/test/node_modules/resolve/lib/async.js +333 -0
  654. package/test/node_modules/resolve/lib/caller.js +8 -0
  655. package/test/node_modules/resolve/lib/core.js +12 -0
  656. package/test/node_modules/resolve/lib/core.json +162 -0
  657. package/test/node_modules/resolve/lib/homedir.js +24 -0
  658. package/test/node_modules/resolve/lib/is-core.js +5 -0
  659. package/test/node_modules/resolve/lib/node-modules-paths.js +45 -0
  660. package/test/node_modules/resolve/lib/normalize-options.js +10 -0
  661. package/test/node_modules/resolve/lib/sync.js +212 -0
  662. package/test/node_modules/resolve/package.json +75 -0
  663. package/test/node_modules/resolve/readme.markdown +301 -0
  664. package/test/node_modules/resolve/sync.js +3 -0
  665. package/test/node_modules/resolve/test/core.js +88 -0
  666. package/test/node_modules/resolve/test/dotdot/abc/index.js +2 -0
  667. package/test/node_modules/resolve/test/dotdot/index.js +1 -0
  668. package/test/node_modules/resolve/test/dotdot.js +29 -0
  669. package/test/node_modules/resolve/test/faulty_basedir.js +29 -0
  670. package/test/node_modules/resolve/test/filter.js +34 -0
  671. package/test/node_modules/resolve/test/filter_sync.js +33 -0
  672. package/test/node_modules/resolve/test/home_paths.js +127 -0
  673. package/test/node_modules/resolve/test/home_paths_sync.js +114 -0
  674. package/test/node_modules/resolve/test/mock.js +315 -0
  675. package/test/node_modules/resolve/test/mock_sync.js +214 -0
  676. package/test/node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0
  677. package/test/node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0
  678. package/test/node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0
  679. package/test/node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0
  680. package/test/node_modules/resolve/test/module_dir.js +56 -0
  681. package/test/node_modules/resolve/test/node-modules-paths.js +143 -0
  682. package/test/node_modules/resolve/test/node_path/x/aaa/index.js +1 -0
  683. package/test/node_modules/resolve/test/node_path/x/ccc/index.js +1 -0
  684. package/test/node_modules/resolve/test/node_path/y/bbb/index.js +1 -0
  685. package/test/node_modules/resolve/test/node_path/y/ccc/index.js +1 -0
  686. package/test/node_modules/resolve/test/node_path.js +70 -0
  687. package/test/node_modules/resolve/test/nonstring.js +9 -0
  688. package/test/node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
  689. package/test/node_modules/resolve/test/pathfilter.js +75 -0
  690. package/test/node_modules/resolve/test/precedence/aaa/index.js +1 -0
  691. package/test/node_modules/resolve/test/precedence/aaa/main.js +1 -0
  692. package/test/node_modules/resolve/test/precedence/aaa.js +1 -0
  693. package/test/node_modules/resolve/test/precedence/bbb/main.js +1 -0
  694. package/test/node_modules/resolve/test/precedence/bbb.js +1 -0
  695. package/test/node_modules/resolve/test/precedence.js +23 -0
  696. package/test/node_modules/resolve/test/resolver/baz/doom.js +0 -0
  697. package/test/node_modules/resolve/test/resolver/baz/package.json +4 -0
  698. package/test/node_modules/resolve/test/resolver/baz/quux.js +1 -0
  699. package/test/node_modules/resolve/test/resolver/browser_field/a.js +0 -0
  700. package/test/node_modules/resolve/test/resolver/browser_field/b.js +0 -0
  701. package/test/node_modules/resolve/test/resolver/browser_field/package.json +5 -0
  702. package/test/node_modules/resolve/test/resolver/cup.coffee +1 -0
  703. package/test/node_modules/resolve/test/resolver/dot_main/index.js +1 -0
  704. package/test/node_modules/resolve/test/resolver/dot_main/package.json +3 -0
  705. package/test/node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0
  706. package/test/node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0
  707. package/test/node_modules/resolve/test/resolver/false_main/index.js +0 -0
  708. package/test/node_modules/resolve/test/resolver/false_main/package.json +4 -0
  709. package/test/node_modules/resolve/test/resolver/foo.js +1 -0
  710. package/test/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
  711. package/test/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
  712. package/test/node_modules/resolve/test/resolver/invalid_main/package.json +7 -0
  713. package/test/node_modules/resolve/test/resolver/mug.coffee +0 -0
  714. package/test/node_modules/resolve/test/resolver/mug.js +0 -0
  715. package/test/node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0
  716. package/test/node_modules/resolve/test/resolver/multirepo/package.json +20 -0
  717. package/test/node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0
  718. package/test/node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0
  719. package/test/node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
  720. package/test/node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0
  721. package/test/node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0
  722. package/test/node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0
  723. package/test/node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0
  724. package/test/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
  725. package/test/node_modules/resolve/test/resolver/other_path/root.js +0 -0
  726. package/test/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
  727. package/test/node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0
  728. package/test/node_modules/resolve/test/resolver/same_names/foo.js +1 -0
  729. package/test/node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
  730. package/test/node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
  731. package/test/node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0
  732. package/test/node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0
  733. package/test/node_modules/resolve/test/resolver/without_basedir/main.js +5 -0
  734. package/test/node_modules/resolve/test/resolver.js +597 -0
  735. package/test/node_modules/resolve/test/resolver_sync.js +730 -0
  736. package/test/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
  737. package/test/node_modules/resolve/test/shadowed_core.js +54 -0
  738. package/test/node_modules/resolve/test/subdirs.js +13 -0
  739. package/test/node_modules/resolve/test/symlinks.js +176 -0
  740. package/test/node_modules/semver/LICENSE +15 -0
  741. package/test/node_modules/semver/README.md +665 -0
  742. package/test/node_modules/semver/bin/semver.js +191 -0
  743. package/test/node_modules/semver/classes/comparator.js +143 -0
  744. package/test/node_modules/semver/classes/index.js +7 -0
  745. package/test/node_modules/semver/classes/range.js +557 -0
  746. package/test/node_modules/semver/classes/semver.js +333 -0
  747. package/test/node_modules/semver/functions/clean.js +8 -0
  748. package/test/node_modules/semver/functions/cmp.js +54 -0
  749. package/test/node_modules/semver/functions/coerce.js +62 -0
  750. package/test/node_modules/semver/functions/compare-build.js +9 -0
  751. package/test/node_modules/semver/functions/compare-loose.js +5 -0
  752. package/test/node_modules/semver/functions/compare.js +7 -0
  753. package/test/node_modules/semver/functions/diff.js +60 -0
  754. package/test/node_modules/semver/functions/eq.js +5 -0
  755. package/test/node_modules/semver/functions/gt.js +5 -0
  756. package/test/node_modules/semver/functions/gte.js +5 -0
  757. package/test/node_modules/semver/functions/inc.js +21 -0
  758. package/test/node_modules/semver/functions/lt.js +5 -0
  759. package/test/node_modules/semver/functions/lte.js +5 -0
  760. package/test/node_modules/semver/functions/major.js +5 -0
  761. package/test/node_modules/semver/functions/minor.js +5 -0
  762. package/test/node_modules/semver/functions/neq.js +5 -0
  763. package/test/node_modules/semver/functions/parse.js +18 -0
  764. package/test/node_modules/semver/functions/patch.js +5 -0
  765. package/test/node_modules/semver/functions/prerelease.js +8 -0
  766. package/test/node_modules/semver/functions/rcompare.js +5 -0
  767. package/test/node_modules/semver/functions/rsort.js +5 -0
  768. package/test/node_modules/semver/functions/satisfies.js +12 -0
  769. package/test/node_modules/semver/functions/sort.js +5 -0
  770. package/test/node_modules/semver/functions/valid.js +8 -0
  771. package/test/node_modules/semver/index.js +91 -0
  772. package/test/node_modules/semver/internal/constants.js +37 -0
  773. package/test/node_modules/semver/internal/debug.js +11 -0
  774. package/test/node_modules/semver/internal/identifiers.js +29 -0
  775. package/test/node_modules/semver/internal/lrucache.js +42 -0
  776. package/test/node_modules/semver/internal/parse-options.js +17 -0
  777. package/test/node_modules/semver/internal/re.js +223 -0
  778. package/test/node_modules/semver/package.json +78 -0
  779. package/test/node_modules/semver/preload.js +4 -0
  780. package/test/node_modules/semver/range.bnf +16 -0
  781. package/test/node_modules/semver/ranges/gtr.js +6 -0
  782. package/test/node_modules/semver/ranges/intersects.js +9 -0
  783. package/test/node_modules/semver/ranges/ltr.js +6 -0
  784. package/test/node_modules/semver/ranges/max-satisfying.js +27 -0
  785. package/test/node_modules/semver/ranges/min-satisfying.js +26 -0
  786. package/test/node_modules/semver/ranges/min-version.js +63 -0
  787. package/test/node_modules/semver/ranges/outside.js +82 -0
  788. package/test/node_modules/semver/ranges/simplify.js +49 -0
  789. package/test/node_modules/semver/ranges/subset.js +249 -0
  790. package/test/node_modules/semver/ranges/to-comparators.js +10 -0
  791. package/test/node_modules/semver/ranges/valid.js +13 -0
  792. package/test/node_modules/strip-ansi/index.d.ts +17 -0
  793. package/test/node_modules/strip-ansi/index.js +4 -0
  794. package/test/node_modules/strip-ansi/license +9 -0
  795. package/test/node_modules/strip-ansi/package.json +54 -0
  796. package/test/node_modules/strip-ansi/readme.md +46 -0
  797. package/test/node_modules/strip-bom/index.js +14 -0
  798. package/test/node_modules/strip-bom/license +21 -0
  799. package/test/node_modules/strip-bom/package.json +40 -0
  800. package/test/node_modules/strip-bom/readme.md +36 -0
  801. package/test/node_modules/supports-color/browser.js +5 -0
  802. package/test/node_modules/supports-color/index.js +135 -0
  803. package/test/node_modules/supports-color/license +9 -0
  804. package/test/node_modules/supports-color/package.json +53 -0
  805. package/test/node_modules/supports-color/readme.md +76 -0
  806. package/test/node_modules/supports-preserve-symlinks-flag/.eslintrc +14 -0
  807. package/test/node_modules/supports-preserve-symlinks-flag/.github/FUNDING.yml +12 -0
  808. package/test/node_modules/supports-preserve-symlinks-flag/.nycrc +9 -0
  809. package/test/node_modules/supports-preserve-symlinks-flag/CHANGELOG.md +22 -0
  810. package/test/node_modules/supports-preserve-symlinks-flag/LICENSE +21 -0
  811. package/test/node_modules/supports-preserve-symlinks-flag/README.md +42 -0
  812. package/test/node_modules/supports-preserve-symlinks-flag/browser.js +3 -0
  813. package/test/node_modules/supports-preserve-symlinks-flag/index.js +9 -0
  814. package/test/node_modules/supports-preserve-symlinks-flag/package.json +70 -0
  815. package/test/node_modules/supports-preserve-symlinks-flag/test/index.js +29 -0
  816. package/test/node_modules/ts-latest/LICENSE.txt +55 -0
  817. package/test/node_modules/ts-latest/README.md +50 -0
  818. package/test/node_modules/ts-latest/SECURITY.md +39 -0
  819. package/test/node_modules/ts-latest/ThirdPartyNoticeText.txt +193 -0
  820. package/test/node_modules/ts-latest/bin/tsc +2 -0
  821. package/test/node_modules/ts-latest/bin/tsserver +2 -0
  822. package/test/node_modules/ts-latest/lib/_tsc.js +134440 -0
  823. package/test/node_modules/ts-latest/lib/_tsserver.js +659 -0
  824. package/test/node_modules/ts-latest/lib/_typingsInstaller.js +222 -0
  825. package/test/node_modules/ts-latest/lib/cs/diagnosticMessages.generated.json +2129 -0
  826. package/test/node_modules/ts-latest/lib/de/diagnosticMessages.generated.json +2125 -0
  827. package/test/node_modules/ts-latest/lib/es/diagnosticMessages.generated.json +2129 -0
  828. package/test/node_modules/ts-latest/lib/fr/diagnosticMessages.generated.json +2129 -0
  829. package/test/node_modules/ts-latest/lib/it/diagnosticMessages.generated.json +2125 -0
  830. package/test/node_modules/ts-latest/lib/ja/diagnosticMessages.generated.json +2129 -0
  831. package/test/node_modules/ts-latest/lib/ko/diagnosticMessages.generated.json +2129 -0
  832. package/test/node_modules/ts-latest/lib/lib.d.ts +20 -0
  833. package/test/node_modules/ts-latest/lib/lib.decorators.d.ts +382 -0
  834. package/test/node_modules/ts-latest/lib/lib.decorators.legacy.d.ts +20 -0
  835. package/test/node_modules/ts-latest/lib/lib.dom.asynciterable.d.ts +18 -0
  836. package/test/node_modules/ts-latest/lib/lib.dom.d.ts +44303 -0
  837. package/test/node_modules/ts-latest/lib/lib.dom.iterable.d.ts +18 -0
  838. package/test/node_modules/ts-latest/lib/lib.es2015.collection.d.ts +150 -0
  839. package/test/node_modules/ts-latest/lib/lib.es2015.core.d.ts +595 -0
  840. package/test/node_modules/ts-latest/lib/lib.es2015.d.ts +26 -0
  841. package/test/node_modules/ts-latest/lib/lib.es2015.generator.d.ts +75 -0
  842. package/test/node_modules/ts-latest/lib/lib.es2015.iterable.d.ts +603 -0
  843. package/test/node_modules/ts-latest/lib/lib.es2015.promise.d.ts +79 -0
  844. package/test/node_modules/ts-latest/lib/lib.es2015.proxy.d.ts +126 -0
  845. package/test/node_modules/ts-latest/lib/lib.es2015.reflect.d.ts +142 -0
  846. package/test/node_modules/ts-latest/lib/lib.es2015.symbol.d.ts +44 -0
  847. package/test/node_modules/ts-latest/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  848. package/test/node_modules/ts-latest/lib/lib.es2016.array.include.d.ts +114 -0
  849. package/test/node_modules/ts-latest/lib/lib.es2016.d.ts +19 -0
  850. package/test/node_modules/ts-latest/lib/lib.es2016.full.d.ts +21 -0
  851. package/test/node_modules/ts-latest/lib/lib.es2016.intl.d.ts +29 -0
  852. package/test/node_modules/ts-latest/lib/lib.es2017.arraybuffer.d.ts +19 -0
  853. package/test/node_modules/ts-latest/lib/lib.es2017.d.ts +24 -0
  854. package/test/node_modules/ts-latest/lib/lib.es2017.date.d.ts +29 -0
  855. package/test/node_modules/ts-latest/lib/lib.es2017.full.d.ts +21 -0
  856. package/test/node_modules/ts-latest/lib/lib.es2017.intl.d.ts +42 -0
  857. package/test/node_modules/ts-latest/lib/lib.es2017.object.d.ts +47 -0
  858. package/test/node_modules/ts-latest/lib/lib.es2017.sharedmemory.d.ts +133 -0
  859. package/test/node_modules/ts-latest/lib/lib.es2017.string.d.ts +43 -0
  860. package/test/node_modules/ts-latest/lib/lib.es2017.typedarrays.d.ts +51 -0
  861. package/test/node_modules/ts-latest/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  862. package/test/node_modules/ts-latest/lib/lib.es2018.asynciterable.d.ts +51 -0
  863. package/test/node_modules/ts-latest/lib/lib.es2018.d.ts +22 -0
  864. package/test/node_modules/ts-latest/lib/lib.es2018.full.d.ts +22 -0
  865. package/test/node_modules/ts-latest/lib/lib.es2018.intl.d.ts +81 -0
  866. package/test/node_modules/ts-latest/lib/lib.es2018.promise.d.ts +28 -0
  867. package/test/node_modules/ts-latest/lib/lib.es2018.regexp.d.ts +35 -0
  868. package/test/node_modules/ts-latest/lib/lib.es2019.array.d.ts +77 -0
  869. package/test/node_modules/ts-latest/lib/lib.es2019.d.ts +22 -0
  870. package/test/node_modules/ts-latest/lib/lib.es2019.full.d.ts +22 -0
  871. package/test/node_modules/ts-latest/lib/lib.es2019.intl.d.ts +21 -0
  872. package/test/node_modules/ts-latest/lib/lib.es2019.object.d.ts +31 -0
  873. package/test/node_modules/ts-latest/lib/lib.es2019.string.d.ts +35 -0
  874. package/test/node_modules/ts-latest/lib/lib.es2019.symbol.d.ts +22 -0
  875. package/test/node_modules/ts-latest/lib/lib.es2020.bigint.d.ts +763 -0
  876. package/test/node_modules/ts-latest/lib/lib.es2020.d.ts +25 -0
  877. package/test/node_modules/ts-latest/lib/lib.es2020.date.d.ts +40 -0
  878. package/test/node_modules/ts-latest/lib/lib.es2020.full.d.ts +22 -0
  879. package/test/node_modules/ts-latest/lib/lib.es2020.intl.d.ts +472 -0
  880. package/test/node_modules/ts-latest/lib/lib.es2020.number.d.ts +26 -0
  881. package/test/node_modules/ts-latest/lib/lib.es2020.promise.d.ts +45 -0
  882. package/test/node_modules/ts-latest/lib/lib.es2020.sharedmemory.d.ts +97 -0
  883. package/test/node_modules/ts-latest/lib/lib.es2020.string.d.ts +42 -0
  884. package/test/node_modules/ts-latest/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  885. package/test/node_modules/ts-latest/lib/lib.es2021.d.ts +21 -0
  886. package/test/node_modules/ts-latest/lib/lib.es2021.full.d.ts +22 -0
  887. package/test/node_modules/ts-latest/lib/lib.es2021.intl.d.ts +164 -0
  888. package/test/node_modules/ts-latest/lib/lib.es2021.promise.d.ts +46 -0
  889. package/test/node_modules/ts-latest/lib/lib.es2021.string.d.ts +31 -0
  890. package/test/node_modules/ts-latest/lib/lib.es2021.weakref.d.ts +76 -0
  891. package/test/node_modules/ts-latest/lib/lib.es2022.array.d.ts +119 -0
  892. package/test/node_modules/ts-latest/lib/lib.es2022.d.ts +23 -0
  893. package/test/node_modules/ts-latest/lib/lib.es2022.error.d.ts +73 -0
  894. package/test/node_modules/ts-latest/lib/lib.es2022.full.d.ts +22 -0
  895. package/test/node_modules/ts-latest/lib/lib.es2022.intl.d.ts +143 -0
  896. package/test/node_modules/ts-latest/lib/lib.es2022.object.d.ts +24 -0
  897. package/test/node_modules/ts-latest/lib/lib.es2022.regexp.d.ts +37 -0
  898. package/test/node_modules/ts-latest/lib/lib.es2022.string.d.ts +23 -0
  899. package/test/node_modules/ts-latest/lib/lib.es2023.array.d.ts +922 -0
  900. package/test/node_modules/ts-latest/lib/lib.es2023.collection.d.ts +19 -0
  901. package/test/node_modules/ts-latest/lib/lib.es2023.d.ts +20 -0
  902. package/test/node_modules/ts-latest/lib/lib.es2023.full.d.ts +22 -0
  903. package/test/node_modules/ts-latest/lib/lib.es2023.intl.d.ts +62 -0
  904. package/test/node_modules/ts-latest/lib/lib.es2024.arraybuffer.d.ts +63 -0
  905. package/test/node_modules/ts-latest/lib/lib.es2024.collection.d.ts +27 -0
  906. package/test/node_modules/ts-latest/lib/lib.es2024.d.ts +24 -0
  907. package/test/node_modules/ts-latest/lib/lib.es2024.full.d.ts +22 -0
  908. package/test/node_modules/ts-latest/lib/lib.es2024.object.d.ts +27 -0
  909. package/test/node_modules/ts-latest/lib/lib.es2024.promise.d.ts +33 -0
  910. package/test/node_modules/ts-latest/lib/lib.es2024.regexp.d.ts +23 -0
  911. package/test/node_modules/ts-latest/lib/lib.es2024.sharedmemory.d.ts +66 -0
  912. package/test/node_modules/ts-latest/lib/lib.es2024.string.d.ts +27 -0
  913. package/test/node_modules/ts-latest/lib/lib.es2025.collection.d.ts +94 -0
  914. package/test/node_modules/ts-latest/lib/lib.es2025.d.ts +23 -0
  915. package/test/node_modules/ts-latest/lib/lib.es2025.float16.d.ts +443 -0
  916. package/test/node_modules/ts-latest/lib/lib.es2025.full.d.ts +22 -0
  917. package/test/node_modules/ts-latest/lib/lib.es2025.intl.d.ts +200 -0
  918. package/test/node_modules/ts-latest/lib/lib.es2025.iterator.d.ts +146 -0
  919. package/test/node_modules/ts-latest/lib/lib.es2025.promise.d.ts +32 -0
  920. package/test/node_modules/ts-latest/lib/lib.es2025.regexp.d.ts +30 -0
  921. package/test/node_modules/ts-latest/lib/lib.es5.d.ts +4599 -0
  922. package/test/node_modules/ts-latest/lib/lib.es6.d.ts +21 -0
  923. package/test/node_modules/ts-latest/lib/lib.esnext.array.d.ts +33 -0
  924. package/test/node_modules/ts-latest/lib/lib.esnext.collection.d.ts +47 -0
  925. package/test/node_modules/ts-latest/lib/lib.esnext.d.ts +27 -0
  926. package/test/node_modules/ts-latest/lib/lib.esnext.date.d.ts +21 -0
  927. package/test/node_modules/ts-latest/lib/lib.esnext.decorators.d.ts +26 -0
  928. package/test/node_modules/ts-latest/lib/lib.esnext.disposable.d.ts +191 -0
  929. package/test/node_modules/ts-latest/lib/lib.esnext.error.d.ts +22 -0
  930. package/test/node_modules/ts-latest/lib/lib.esnext.full.d.ts +22 -0
  931. package/test/node_modules/ts-latest/lib/lib.esnext.intl.d.ts +107 -0
  932. package/test/node_modules/ts-latest/lib/lib.esnext.sharedmemory.d.ts +23 -0
  933. package/test/node_modules/ts-latest/lib/lib.esnext.temporal.d.ts +473 -0
  934. package/test/node_modules/ts-latest/lib/lib.esnext.typedarrays.d.ts +90 -0
  935. package/test/node_modules/ts-latest/lib/lib.scripthost.d.ts +320 -0
  936. package/test/node_modules/ts-latest/lib/lib.webworker.asynciterable.d.ts +18 -0
  937. package/test/node_modules/ts-latest/lib/lib.webworker.d.ts +14814 -0
  938. package/test/node_modules/ts-latest/lib/lib.webworker.importscripts.d.ts +21 -0
  939. package/test/node_modules/ts-latest/lib/lib.webworker.iterable.d.ts +18 -0
  940. package/test/node_modules/ts-latest/lib/pl/diagnosticMessages.generated.json +2129 -0
  941. package/test/node_modules/ts-latest/lib/pt-br/diagnosticMessages.generated.json +2129 -0
  942. package/test/node_modules/ts-latest/lib/ru/diagnosticMessages.generated.json +2125 -0
  943. package/test/node_modules/ts-latest/lib/tr/diagnosticMessages.generated.json +2129 -0
  944. package/test/node_modules/ts-latest/lib/tsc.js +8 -0
  945. package/test/node_modules/ts-latest/lib/tsserver.js +8 -0
  946. package/test/node_modules/ts-latest/lib/tsserverlibrary.d.ts +17 -0
  947. package/test/node_modules/ts-latest/lib/tsserverlibrary.js +21 -0
  948. package/test/node_modules/ts-latest/lib/typesMap.json +497 -0
  949. package/test/node_modules/ts-latest/lib/typescript.d.ts +11448 -0
  950. package/test/node_modules/ts-latest/lib/typescript.js +200997 -0
  951. package/test/node_modules/ts-latest/lib/typingsInstaller.js +8 -0
  952. package/test/node_modules/ts-latest/lib/watchGuard.js +53 -0
  953. package/test/node_modules/ts-latest/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
  954. package/test/node_modules/ts-latest/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
  955. package/test/node_modules/ts-latest/package.json +119 -0
  956. package/test/node_modules/ts-node/LICENSE +21 -0
  957. package/test/node_modules/ts-node/README.md +1442 -0
  958. package/test/node_modules/ts-node/child-loader.mjs +8 -0
  959. package/test/node_modules/ts-node/dist/bin-cwd.d.ts +2 -0
  960. package/test/node_modules/ts-node/dist/bin-cwd.js +6 -0
  961. package/test/node_modules/ts-node/dist/bin-cwd.js.map +1 -0
  962. package/test/node_modules/ts-node/dist/bin-esm.d.ts +2 -0
  963. package/test/node_modules/ts-node/dist/bin-esm.js +6 -0
  964. package/test/node_modules/ts-node/dist/bin-esm.js.map +1 -0
  965. package/test/node_modules/ts-node/dist/bin-script-deprecated.d.ts +2 -0
  966. package/test/node_modules/ts-node/dist/bin-script-deprecated.js +7 -0
  967. package/test/node_modules/ts-node/dist/bin-script-deprecated.js.map +1 -0
  968. package/test/node_modules/ts-node/dist/bin-script.d.ts +2 -0
  969. package/test/node_modules/ts-node/dist/bin-script.js +6 -0
  970. package/test/node_modules/ts-node/dist/bin-script.js.map +1 -0
  971. package/test/node_modules/ts-node/dist/bin-transpile.d.ts +2 -0
  972. package/test/node_modules/ts-node/dist/bin-transpile.js +6 -0
  973. package/test/node_modules/ts-node/dist/bin-transpile.js.map +1 -0
  974. package/test/node_modules/ts-node/dist/bin.d.ts +11 -0
  975. package/test/node_modules/ts-node/dist/bin.js +581 -0
  976. package/test/node_modules/ts-node/dist/bin.js.map +1 -0
  977. package/test/node_modules/ts-node/dist/child/argv-payload.d.ts +1 -0
  978. package/test/node_modules/ts-node/dist/child/argv-payload.js +19 -0
  979. package/test/node_modules/ts-node/dist/child/argv-payload.js.map +1 -0
  980. package/test/node_modules/ts-node/dist/child/child-entrypoint.d.ts +1 -0
  981. package/test/node_modules/ts-node/dist/child/child-entrypoint.js +24 -0
  982. package/test/node_modules/ts-node/dist/child/child-entrypoint.js.map +1 -0
  983. package/test/node_modules/ts-node/dist/child/child-loader.d.ts +1 -0
  984. package/test/node_modules/ts-node/dist/child/child-loader.js +32 -0
  985. package/test/node_modules/ts-node/dist/child/child-loader.js.map +1 -0
  986. package/test/node_modules/ts-node/dist/child/child-require.d.ts +7 -0
  987. package/test/node_modules/ts-node/dist/child/child-require.js +22 -0
  988. package/test/node_modules/ts-node/dist/child/child-require.js.map +1 -0
  989. package/test/node_modules/ts-node/dist/child/spawn-child.d.ts +1 -0
  990. package/test/node_modules/ts-node/dist/child/spawn-child.js +49 -0
  991. package/test/node_modules/ts-node/dist/child/spawn-child.js.map +1 -0
  992. package/test/node_modules/ts-node/dist/cjs-resolve-hooks.d.ts +1 -0
  993. package/test/node_modules/ts-node/dist/cjs-resolve-hooks.js +29 -0
  994. package/test/node_modules/ts-node/dist/cjs-resolve-hooks.js.map +1 -0
  995. package/test/node_modules/ts-node/dist/configuration.d.ts +1 -0
  996. package/test/node_modules/ts-node/dist/configuration.js +308 -0
  997. package/test/node_modules/ts-node/dist/configuration.js.map +1 -0
  998. package/test/node_modules/ts-node/dist/esm.d.ts +53 -0
  999. package/test/node_modules/ts-node/dist/esm.js +228 -0
  1000. package/test/node_modules/ts-node/dist/esm.js.map +1 -0
  1001. package/test/node_modules/ts-node/dist/file-extensions.d.ts +1 -0
  1002. package/test/node_modules/ts-node/dist/file-extensions.js +133 -0
  1003. package/test/node_modules/ts-node/dist/file-extensions.js.map +1 -0
  1004. package/test/node_modules/ts-node/dist/index.d.ts +332 -0
  1005. package/test/node_modules/ts-node/dist/index.js +953 -0
  1006. package/test/node_modules/ts-node/dist/index.js.map +1 -0
  1007. package/test/node_modules/ts-node/dist/module-type-classifier.d.ts +1 -0
  1008. package/test/node_modules/ts-node/dist/module-type-classifier.js +64 -0
  1009. package/test/node_modules/ts-node/dist/module-type-classifier.js.map +1 -0
  1010. package/test/node_modules/ts-node/dist/node-module-type-classifier.d.ts +1 -0
  1011. package/test/node_modules/ts-node/dist/node-module-type-classifier.js +39 -0
  1012. package/test/node_modules/ts-node/dist/node-module-type-classifier.js.map +1 -0
  1013. package/test/node_modules/ts-node/dist/repl.d.ts +78 -0
  1014. package/test/node_modules/ts-node/dist/repl.js +561 -0
  1015. package/test/node_modules/ts-node/dist/repl.js.map +1 -0
  1016. package/test/node_modules/ts-node/dist/resolver-functions.d.ts +1 -0
  1017. package/test/node_modules/ts-node/dist/resolver-functions.js +143 -0
  1018. package/test/node_modules/ts-node/dist/resolver-functions.js.map +1 -0
  1019. package/test/node_modules/ts-node/dist/transpilers/swc.d.ts +11 -0
  1020. package/test/node_modules/ts-node/dist/transpilers/swc.js +218 -0
  1021. package/test/node_modules/ts-node/dist/transpilers/swc.js.map +1 -0
  1022. package/test/node_modules/ts-node/dist/transpilers/types.d.ts +35 -0
  1023. package/test/node_modules/ts-node/dist/transpilers/types.js +3 -0
  1024. package/test/node_modules/ts-node/dist/transpilers/types.js.map +1 -0
  1025. package/test/node_modules/ts-node/dist/ts-compiler-types.d.ts +63 -0
  1026. package/test/node_modules/ts-node/dist/ts-compiler-types.js +3 -0
  1027. package/test/node_modules/ts-node/dist/ts-compiler-types.js.map +1 -0
  1028. package/test/node_modules/ts-node/dist/ts-internals.d.ts +6 -0
  1029. package/test/node_modules/ts-node/dist/ts-internals.js +321 -0
  1030. package/test/node_modules/ts-node/dist/ts-internals.js.map +1 -0
  1031. package/test/node_modules/ts-node/dist/ts-transpile-module.d.ts +1 -0
  1032. package/test/node_modules/ts-node/dist/ts-transpile-module.js +100 -0
  1033. package/test/node_modules/ts-node/dist/ts-transpile-module.js.map +1 -0
  1034. package/test/node_modules/ts-node/dist/tsconfig-schema.d.ts +13 -0
  1035. package/test/node_modules/ts-node/dist/tsconfig-schema.js +3 -0
  1036. package/test/node_modules/ts-node/dist/tsconfig-schema.js.map +1 -0
  1037. package/test/node_modules/ts-node/dist/tsconfigs.d.ts +1 -0
  1038. package/test/node_modules/ts-node/dist/tsconfigs.js +36 -0
  1039. package/test/node_modules/ts-node/dist/tsconfigs.js.map +1 -0
  1040. package/test/node_modules/ts-node/dist/util.d.ts +4 -0
  1041. package/test/node_modules/ts-node/dist/util.js +175 -0
  1042. package/test/node_modules/ts-node/dist/util.js.map +1 -0
  1043. package/test/node_modules/ts-node/dist-raw/NODE-LICENSE.md +24 -0
  1044. package/test/node_modules/ts-node/dist-raw/README.md +36 -0
  1045. package/test/node_modules/ts-node/dist-raw/node-internal-constants.js +4 -0
  1046. package/test/node_modules/ts-node/dist-raw/node-internal-errors.js +82 -0
  1047. package/test/node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js +89 -0
  1048. package/test/node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js +593 -0
  1049. package/test/node_modules/ts-node/dist-raw/node-internal-modules-esm-get_format.js +106 -0
  1050. package/test/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js +962 -0
  1051. package/test/node_modules/ts-node/dist-raw/node-internal-modules-package_json_reader.js +44 -0
  1052. package/test/node_modules/ts-node/dist-raw/node-internal-repl-await.js +254 -0
  1053. package/test/node_modules/ts-node/dist-raw/node-internalBinding-fs.js +58 -0
  1054. package/test/node_modules/ts-node/dist-raw/node-nativemodule.js +9 -0
  1055. package/test/node_modules/ts-node/dist-raw/node-options.js +103 -0
  1056. package/test/node_modules/ts-node/dist-raw/node-primordials.js +37 -0
  1057. package/test/node_modules/ts-node/dist-raw/runmain-hack.js +9 -0
  1058. package/test/node_modules/ts-node/esm/transpile-only.mjs +8 -0
  1059. package/test/node_modules/ts-node/esm.mjs +8 -0
  1060. package/test/node_modules/ts-node/node10/tsconfig.json +3 -0
  1061. package/test/node_modules/ts-node/node12/tsconfig.json +3 -0
  1062. package/test/node_modules/ts-node/node14/tsconfig.json +3 -0
  1063. package/test/node_modules/ts-node/node16/tsconfig.json +3 -0
  1064. package/test/node_modules/ts-node/node_modules/.bin/acorn +15 -0
  1065. package/test/node_modules/ts-node/node_modules/.bin/acorn.cmd +7 -0
  1066. package/test/node_modules/ts-node/package.json +182 -0
  1067. package/test/node_modules/ts-node/register/files.js +3 -0
  1068. package/test/node_modules/ts-node/register/index.js +1 -0
  1069. package/test/node_modules/ts-node/register/transpile-only.js +3 -0
  1070. package/test/node_modules/ts-node/register/type-check.js +3 -0
  1071. package/test/node_modules/ts-node/transpilers/swc-experimental.js +1 -0
  1072. package/test/node_modules/ts-node/transpilers/swc.js +1 -0
  1073. package/test/node_modules/ts-node/tsconfig.schema.json +183 -0
  1074. package/test/node_modules/ts-node/tsconfig.schemastore-schema.json +1326 -0
  1075. package/test/node_modules/tsconfig-paths/CHANGELOG.md +407 -0
  1076. package/test/node_modules/tsconfig-paths/LICENSE +21 -0
  1077. package/test/node_modules/tsconfig-paths/README.md +269 -0
  1078. package/test/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.d.ts +1 -0
  1079. package/test/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js +87 -0
  1080. package/test/node_modules/tsconfig-paths/lib/__tests__/config-loader.test.js.map +1 -0
  1081. package/test/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.d.ts +17 -0
  1082. package/test/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js +216 -0
  1083. package/test/node_modules/tsconfig-paths/lib/__tests__/data/match-path-data.js.map +1 -0
  1084. package/test/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.d.ts +1 -0
  1085. package/test/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js +56 -0
  1086. package/test/node_modules/tsconfig-paths/lib/__tests__/filesystem.test.js.map +1 -0
  1087. package/test/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.d.ts +1 -0
  1088. package/test/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js +39 -0
  1089. package/test/node_modules/tsconfig-paths/lib/__tests__/mapping-entry.test.js.map +1 -0
  1090. package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.d.ts +1 -0
  1091. package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js +18 -0
  1092. package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-async.test.js.map +1 -0
  1093. package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.d.ts +1 -0
  1094. package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js +14 -0
  1095. package/test/node_modules/tsconfig-paths/lib/__tests__/match-path-sync.test.js.map +1 -0
  1096. package/test/node_modules/tsconfig-paths/lib/__tests__/try-path.test.d.ts +1 -0
  1097. package/test/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js +124 -0
  1098. package/test/node_modules/tsconfig-paths/lib/__tests__/try-path.test.js.map +1 -0
  1099. package/test/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.d.ts +1 -0
  1100. package/test/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js +328 -0
  1101. package/test/node_modules/tsconfig-paths/lib/__tests__/tsconfig-loader.test.js.map +1 -0
  1102. package/test/node_modules/tsconfig-paths/lib/config-loader.d.ts +33 -0
  1103. package/test/node_modules/tsconfig-paths/lib/config-loader.js +48 -0
  1104. package/test/node_modules/tsconfig-paths/lib/config-loader.js.map +1 -0
  1105. package/test/node_modules/tsconfig-paths/lib/filesystem.d.ts +34 -0
  1106. package/test/node_modules/tsconfig-paths/lib/filesystem.js +61 -0
  1107. package/test/node_modules/tsconfig-paths/lib/filesystem.js.map +1 -0
  1108. package/test/node_modules/tsconfig-paths/lib/index.d.ts +5 -0
  1109. package/test/node_modules/tsconfig-paths/lib/index.js +15 -0
  1110. package/test/node_modules/tsconfig-paths/lib/index.js.map +1 -0
  1111. package/test/node_modules/tsconfig-paths/lib/mapping-entry.d.ts +18 -0
  1112. package/test/node_modules/tsconfig-paths/lib/mapping-entry.js +54 -0
  1113. package/test/node_modules/tsconfig-paths/lib/mapping-entry.js.map +1 -0
  1114. package/test/node_modules/tsconfig-paths/lib/match-path-async.d.ts +21 -0
  1115. package/test/node_modules/tsconfig-paths/lib/match-path-async.js +116 -0
  1116. package/test/node_modules/tsconfig-paths/lib/match-path-async.js.map +1 -0
  1117. package/test/node_modules/tsconfig-paths/lib/match-path-sync.d.ts +32 -0
  1118. package/test/node_modules/tsconfig-paths/lib/match-path-sync.js +91 -0
  1119. package/test/node_modules/tsconfig-paths/lib/match-path-sync.js.map +1 -0
  1120. package/test/node_modules/tsconfig-paths/lib/register.d.ts +12 -0
  1121. package/test/node_modules/tsconfig-paths/lib/register.js +112 -0
  1122. package/test/node_modules/tsconfig-paths/lib/register.js.map +1 -0
  1123. package/test/node_modules/tsconfig-paths/lib/try-path.d.ts +15 -0
  1124. package/test/node_modules/tsconfig-paths/lib/try-path.js +91 -0
  1125. package/test/node_modules/tsconfig-paths/lib/try-path.js.map +1 -0
  1126. package/test/node_modules/tsconfig-paths/lib/tsconfig-loader.d.ts +28 -0
  1127. package/test/node_modules/tsconfig-paths/lib/tsconfig-loader.js +148 -0
  1128. package/test/node_modules/tsconfig-paths/lib/tsconfig-loader.js.map +1 -0
  1129. package/test/node_modules/tsconfig-paths/node_modules/.bin/json5 +15 -0
  1130. package/test/node_modules/tsconfig-paths/node_modules/.bin/json5.cmd +7 -0
  1131. package/test/node_modules/tsconfig-paths/package.json +74 -0
  1132. package/test/node_modules/tsconfig-paths/register.js +1 -0
  1133. package/test/node_modules/tsconfig-paths/src/__tests__/config-loader.test.ts +101 -0
  1134. package/test/node_modules/tsconfig-paths/src/__tests__/data/match-path-data.ts +230 -0
  1135. package/test/node_modules/tsconfig-paths/src/__tests__/filesystem.test.ts +57 -0
  1136. package/test/node_modules/tsconfig-paths/src/__tests__/mapping-entry.test.ts +43 -0
  1137. package/test/node_modules/tsconfig-paths/src/__tests__/match-path-async.test.ts +26 -0
  1138. package/test/node_modules/tsconfig-paths/src/__tests__/match-path-sync.test.ts +22 -0
  1139. package/test/node_modules/tsconfig-paths/src/__tests__/try-path.test.ts +141 -0
  1140. package/test/node_modules/tsconfig-paths/src/__tests__/tsconfig-loader.test.ts +428 -0
  1141. package/test/node_modules/tsconfig-paths/src/__tests__/tsconfig-named.json +10 -0
  1142. package/test/node_modules/tsconfig-paths/src/config-loader.ts +89 -0
  1143. package/test/node_modules/tsconfig-paths/src/filesystem.ts +93 -0
  1144. package/test/node_modules/tsconfig-paths/src/index.ts +24 -0
  1145. package/test/node_modules/tsconfig-paths/src/mapping-entry.ts +65 -0
  1146. package/test/node_modules/tsconfig-paths/src/match-path-async.ts +223 -0
  1147. package/test/node_modules/tsconfig-paths/src/match-path-sync.ts +146 -0
  1148. package/test/node_modules/tsconfig-paths/src/register.ts +123 -0
  1149. package/test/node_modules/tsconfig-paths/src/try-path.ts +103 -0
  1150. package/test/node_modules/tsconfig-paths/src/tsconfig-loader.ts +229 -0
  1151. package/test/node_modules/undici-types/LICENSE +21 -0
  1152. package/test/node_modules/undici-types/README.md +6 -0
  1153. package/test/node_modules/undici-types/agent.d.ts +32 -0
  1154. package/test/node_modules/undici-types/api.d.ts +43 -0
  1155. package/test/node_modules/undici-types/balanced-pool.d.ts +30 -0
  1156. package/test/node_modules/undici-types/cache-interceptor.d.ts +173 -0
  1157. package/test/node_modules/undici-types/cache.d.ts +36 -0
  1158. package/test/node_modules/undici-types/client-stats.d.ts +15 -0
  1159. package/test/node_modules/undici-types/client.d.ts +108 -0
  1160. package/test/node_modules/undici-types/connector.d.ts +34 -0
  1161. package/test/node_modules/undici-types/content-type.d.ts +21 -0
  1162. package/test/node_modules/undici-types/cookies.d.ts +30 -0
  1163. package/test/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  1164. package/test/node_modules/undici-types/dispatcher.d.ts +276 -0
  1165. package/test/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  1166. package/test/node_modules/undici-types/errors.d.ts +161 -0
  1167. package/test/node_modules/undici-types/eventsource.d.ts +66 -0
  1168. package/test/node_modules/undici-types/fetch.d.ts +211 -0
  1169. package/test/node_modules/undici-types/formdata.d.ts +108 -0
  1170. package/test/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  1171. package/test/node_modules/undici-types/global-origin.d.ts +7 -0
  1172. package/test/node_modules/undici-types/h2c-client.d.ts +73 -0
  1173. package/test/node_modules/undici-types/handlers.d.ts +15 -0
  1174. package/test/node_modules/undici-types/header.d.ts +160 -0
  1175. package/test/node_modules/undici-types/index.d.ts +88 -0
  1176. package/test/node_modules/undici-types/interceptors.d.ts +73 -0
  1177. package/test/node_modules/undici-types/mock-agent.d.ts +68 -0
  1178. package/test/node_modules/undici-types/mock-call-history.d.ts +111 -0
  1179. package/test/node_modules/undici-types/mock-client.d.ts +27 -0
  1180. package/test/node_modules/undici-types/mock-errors.d.ts +12 -0
  1181. package/test/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  1182. package/test/node_modules/undici-types/mock-pool.d.ts +27 -0
  1183. package/test/node_modules/undici-types/package.json +55 -0
  1184. package/test/node_modules/undici-types/patch.d.ts +29 -0
  1185. package/test/node_modules/undici-types/pool-stats.d.ts +19 -0
  1186. package/test/node_modules/undici-types/pool.d.ts +41 -0
  1187. package/test/node_modules/undici-types/proxy-agent.d.ts +29 -0
  1188. package/test/node_modules/undici-types/readable.d.ts +68 -0
  1189. package/test/node_modules/undici-types/retry-agent.d.ts +8 -0
  1190. package/test/node_modules/undici-types/retry-handler.d.ts +125 -0
  1191. package/test/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  1192. package/test/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  1193. package/test/node_modules/undici-types/util.d.ts +18 -0
  1194. package/test/node_modules/undici-types/utility.d.ts +7 -0
  1195. package/test/node_modules/undici-types/webidl.d.ts +341 -0
  1196. package/test/node_modules/undici-types/websocket.d.ts +186 -0
  1197. package/test/node_modules/universalify/LICENSE +20 -0
  1198. package/test/node_modules/universalify/README.md +76 -0
  1199. package/test/node_modules/universalify/index.js +24 -0
  1200. package/test/node_modules/universalify/package.json +34 -0
  1201. package/test/node_modules/v8-compile-cache-lib/CHANGELOG.md +53 -0
  1202. package/test/node_modules/v8-compile-cache-lib/LICENSE +21 -0
  1203. package/test/node_modules/v8-compile-cache-lib/README.md +60 -0
  1204. package/test/node_modules/v8-compile-cache-lib/package.json +35 -0
  1205. package/test/node_modules/v8-compile-cache-lib/v8-compile-cache.d.ts +7 -0
  1206. package/test/node_modules/v8-compile-cache-lib/v8-compile-cache.js +391 -0
  1207. package/test/node_modules/which/LICENSE +15 -0
  1208. package/test/node_modules/which/README.md +51 -0
  1209. package/test/node_modules/which/bin/which.js +52 -0
  1210. package/test/node_modules/which/lib/index.js +111 -0
  1211. package/test/node_modules/which/package.json +57 -0
  1212. package/test/node_modules/yn/index.d.ts +65 -0
  1213. package/test/node_modules/yn/index.js +33 -0
  1214. package/test/node_modules/yn/lenient.js +105 -0
  1215. package/test/node_modules/yn/license +9 -0
  1216. package/test/node_modules/yn/package.json +42 -0
  1217. package/test/node_modules/yn/readme.md +83 -0
  1218. package/test/package.json +14 -0
  1219. package/test/src/cleanup.ts +10 -0
  1220. package/test/src/config.ts +35 -0
  1221. package/test/src/perf.ts +110 -0
  1222. package/test/src/prepare.ts +10 -0
  1223. package/test/src/project.ts +134 -0
  1224. package/test/src/utils/general.ts +8 -0
  1225. package/test/tests/actions.test.ts +274 -0
  1226. package/test/tests/package-config.test.ts +40 -0
  1227. package/test/tests/path-mapping.test.ts +47 -0
  1228. package/test/tests/transformer.test.ts +44 -0
  1229. package/test/tests/webpack.test.ts +71 -0
  1230. package/test/tsconfig.json +12 -0
  1231. package/tsconfig.base.json +21 -0
  1232. package/actions/check.js +0 -45
  1233. package/actions/check.js.map +0 -1
  1234. package/actions/patch.js +0 -82
  1235. package/actions/patch.js.map +0 -1
  1236. package/actions/unpatch.js +0 -82
  1237. package/actions/unpatch.js.map +0 -1
  1238. package/bin/ts-patch.js +0 -33
  1239. package/bin/ts-patch.js.map +0 -1
  1240. package/cli/cli.js +0 -96
  1241. package/cli/cli.js.map +0 -1
  1242. package/cli/commands.js +0 -49
  1243. package/cli/commands.js.map +0 -1
  1244. package/config.js +0 -50
  1245. package/config.js.map +0 -1
  1246. package/module/module-file.d.ts +0 -9
  1247. package/module/module-file.js +0 -97
  1248. package/module/module-file.js.map +0 -1
  1249. package/module/ts-module.d.ts +0 -35
  1250. package/module/ts-module.js +0 -100
  1251. package/module/ts-module.js.map +0 -1
  1252. package/patch/get-patched-source.js +0 -69
  1253. package/patch/get-patched-source.js.map +0 -1
  1254. package/patch/transformers/fix-ts-early-return.js +0 -51
  1255. package/patch/transformers/fix-ts-early-return.js.map +0 -1
  1256. package/resources/module-patch.js +0 -609
  1257. package/system/cache.js +0 -69
  1258. package/system/cache.js.map +0 -1
  1259. package/tsconfig.tsbuildinfo +0 -1
  1260. package/utils/file-utils.js +0 -98
  1261. package/utils/file-utils.js.map +0 -1
  1262. /package/{actions → dist/actions}/check.d.ts +0 -0
  1263. /package/{actions → dist/actions}/index.d.ts +0 -0
  1264. /package/{actions → dist/actions}/index.js +0 -0
  1265. /package/{actions → dist/actions}/index.js.map +0 -0
  1266. /package/{actions → dist/actions}/install.d.ts +0 -0
  1267. /package/{actions → dist/actions}/install.js +0 -0
  1268. /package/{actions → dist/actions}/install.js.map +0 -0
  1269. /package/{actions → dist/actions}/patch.d.ts +0 -0
  1270. /package/{actions → dist/actions}/uninstall.d.ts +0 -0
  1271. /package/{actions → dist/actions}/uninstall.js +0 -0
  1272. /package/{actions → dist/actions}/uninstall.js.map +0 -0
  1273. /package/{actions → dist/actions}/unpatch.d.ts +0 -0
  1274. /package/{bin → dist/bin}/ts-patch.d.ts +0 -0
  1275. /package/{bin → dist/bin}/tspc.d.ts +0 -0
  1276. /package/{bin → dist/bin}/tspc.js +0 -0
  1277. /package/{bin → dist/bin}/tspc.js.map +0 -0
  1278. /package/{cli → dist/cli}/cli.d.ts +0 -0
  1279. /package/{cli → dist/cli}/commands.d.ts +0 -0
  1280. /package/{cli → dist/cli}/help-menu.d.ts +0 -0
  1281. /package/{cli → dist/cli}/help-menu.js +0 -0
  1282. /package/{cli → dist/cli}/help-menu.js.map +0 -0
  1283. /package/{cli → dist/cli}/options.d.ts +0 -0
  1284. /package/{cli → dist/cli}/options.js +0 -0
  1285. /package/{cli → dist/cli}/options.js.map +0 -0
  1286. /package/{compiler → dist/compiler}/package.json +0 -0
  1287. /package/{compiler → dist/compiler}/tsc.js +0 -0
  1288. /package/{compiler → dist/compiler}/tsserver.js +0 -0
  1289. /package/{compiler → dist/compiler}/tsserverlibrary.js +0 -0
  1290. /package/{compiler → dist/compiler}/typescript.js +0 -0
  1291. /package/{config.d.ts → dist/config.d.ts} +0 -0
  1292. /package/{index.d.ts → dist/index.d.ts} +0 -0
  1293. /package/{index.js → dist/index.js} +0 -0
  1294. /package/{index.js.map → dist/index.js.map} +0 -0
  1295. /package/{module → dist/module}/get-live-module.d.ts +0 -0
  1296. /package/{module → dist/module}/get-live-module.js +0 -0
  1297. /package/{module → dist/module}/get-live-module.js.map +0 -0
  1298. /package/{module → dist/module}/index.d.ts +0 -0
  1299. /package/{module → dist/module}/index.js +0 -0
  1300. /package/{module → dist/module}/index.js.map +0 -0
  1301. /package/{module → dist/module}/module-source.d.ts +0 -0
  1302. /package/{module → dist/module}/module-source.js +0 -0
  1303. /package/{module → dist/module}/module-source.js.map +0 -0
  1304. /package/{module → dist/module}/source-section.d.ts +0 -0
  1305. /package/{module → dist/module}/source-section.js +0 -0
  1306. /package/{module → dist/module}/source-section.js.map +0 -0
  1307. /package/{options.d.ts → dist/options.d.ts} +0 -0
  1308. /package/{options.js → dist/options.js} +0 -0
  1309. /package/{options.js.map → dist/options.js.map} +0 -0
  1310. /package/{patch → dist/patch}/get-patched-source.d.ts +0 -0
  1311. /package/{patch → dist/patch}/patch-detail.d.ts +0 -0
  1312. /package/{patch → dist/patch}/patch-detail.js +0 -0
  1313. /package/{patch → dist/patch}/patch-detail.js.map +0 -0
  1314. /package/{patch → dist/patch}/patch-module.d.ts +0 -0
  1315. /package/{patch → dist/patch}/patch-module.js +0 -0
  1316. /package/{patch → dist/patch}/patch-module.js.map +0 -0
  1317. /package/{patch → dist/patch}/transformers/add-original-create-program.d.ts +0 -0
  1318. /package/{patch → dist/patch}/transformers/add-original-create-program.js +0 -0
  1319. /package/{patch → dist/patch}/transformers/add-original-create-program.js.map +0 -0
  1320. /package/{patch → dist/patch}/transformers/fix-ts-early-return.d.ts +0 -0
  1321. /package/{patch → dist/patch}/transformers/hook-tsc-exec.d.ts +0 -0
  1322. /package/{patch → dist/patch}/transformers/hook-tsc-exec.js +0 -0
  1323. /package/{patch → dist/patch}/transformers/hook-tsc-exec.js.map +0 -0
  1324. /package/{patch → dist/patch}/transformers/index.d.ts +0 -0
  1325. /package/{patch → dist/patch}/transformers/index.js +0 -0
  1326. /package/{patch → dist/patch}/transformers/index.js.map +0 -0
  1327. /package/{patch → dist/patch}/transformers/merge-statements.d.ts +0 -0
  1328. /package/{patch → dist/patch}/transformers/merge-statements.js +0 -0
  1329. /package/{patch → dist/patch}/transformers/merge-statements.js.map +0 -0
  1330. /package/{patch → dist/patch}/transformers/patch-create-program.d.ts +0 -0
  1331. /package/{patch → dist/patch}/transformers/patch-create-program.js +0 -0
  1332. /package/{patch → dist/patch}/transformers/patch-create-program.js.map +0 -0
  1333. /package/{patch → dist/patch}/transformers/patch-emitter.d.ts +0 -0
  1334. /package/{patch → dist/patch}/transformers/patch-emitter.js +0 -0
  1335. /package/{patch → dist/patch}/transformers/patch-emitter.js.map +0 -0
  1336. /package/{plugin-types.d.ts → dist/plugin-types.d.ts} +0 -0
  1337. /package/{plugin-types.js → dist/plugin-types.js} +0 -0
  1338. /package/{plugin-types.js.map → dist/plugin-types.js.map} +0 -0
  1339. /package/{resources → dist/resources}/module-patch.d.ts +0 -0
  1340. /package/{slice → dist/slice}/module-slice.d.ts +0 -0
  1341. /package/{slice → dist/slice}/module-slice.js +0 -0
  1342. /package/{slice → dist/slice}/module-slice.js.map +0 -0
  1343. /package/{slice → dist/slice}/ts54.d.ts +0 -0
  1344. /package/{slice → dist/slice}/ts54.js +0 -0
  1345. /package/{slice → dist/slice}/ts54.js.map +0 -0
  1346. /package/{slice → dist/slice}/ts55.d.ts +0 -0
  1347. /package/{slice → dist/slice}/ts55.js +0 -0
  1348. /package/{slice → dist/slice}/ts55.js.map +0 -0
  1349. /package/{slice → dist/slice}/ts552.d.ts +0 -0
  1350. /package/{slice → dist/slice}/ts552.js +0 -0
  1351. /package/{slice → dist/slice}/ts552.js.map +0 -0
  1352. /package/{system → dist/system}/cache.d.ts +0 -0
  1353. /package/{system → dist/system}/errors.d.ts +0 -0
  1354. /package/{system → dist/system}/errors.js +0 -0
  1355. /package/{system → dist/system}/errors.js.map +0 -0
  1356. /package/{system → dist/system}/index.d.ts +0 -0
  1357. /package/{system → dist/system}/index.js +0 -0
  1358. /package/{system → dist/system}/index.js.map +0 -0
  1359. /package/{system → dist/system}/logger.d.ts +0 -0
  1360. /package/{system → dist/system}/logger.js +0 -0
  1361. /package/{system → dist/system}/logger.js.map +0 -0
  1362. /package/{system → dist/system}/types.d.ts +0 -0
  1363. /package/{system → dist/system}/types.js +0 -0
  1364. /package/{system → dist/system}/types.js.map +0 -0
  1365. /package/{ts-package.d.ts → dist/ts-package.d.ts} +0 -0
  1366. /package/{ts-package.js → dist/ts-package.js} +0 -0
  1367. /package/{ts-package.js.map → dist/ts-package.js.map} +0 -0
  1368. /package/{utils → dist/utils}/file-utils.d.ts +0 -0
  1369. /package/{utils → dist/utils}/find-cache-dir.d.ts +0 -0
  1370. /package/{utils → dist/utils}/find-cache-dir.js +0 -0
  1371. /package/{utils → dist/utils}/find-cache-dir.js.map +0 -0
  1372. /package/{utils → dist/utils}/general.d.ts +0 -0
  1373. /package/{utils → dist/utils}/general.js +0 -0
  1374. /package/{utils → dist/utils}/general.js.map +0 -0
  1375. /package/{utils → dist/utils}/index.d.ts +0 -0
  1376. /package/{utils → dist/utils}/index.js +0 -0
  1377. /package/{utils → dist/utils}/index.js.map +0 -0
@@ -0,0 +1,1687 @@
1
+ /**
2
+ * The `node:util` module supports the needs of Node.js internal APIs. Many of the
3
+ * utilities are useful for application and module developers as well. To access
4
+ * it:
5
+ *
6
+ * ```js
7
+ * import util from 'node:util';
8
+ * ```
9
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/util.js)
10
+ */
11
+ declare module "node:util" {
12
+ export * as types from "node:util/types";
13
+ export type InspectStyle =
14
+ | "special"
15
+ | "number"
16
+ | "bigint"
17
+ | "boolean"
18
+ | "undefined"
19
+ | "null"
20
+ | "string"
21
+ | "symbol"
22
+ | "date"
23
+ | "name"
24
+ | "regexp"
25
+ | "module";
26
+ export interface InspectStyles extends Record<InspectStyle, InspectColor | ((value: string) => string)> {
27
+ regexp: {
28
+ (value: string): string;
29
+ colors: InspectColor[];
30
+ };
31
+ }
32
+ export type InspectColorModifier =
33
+ | "reset"
34
+ | "bold"
35
+ | "dim"
36
+ | "italic"
37
+ | "underline"
38
+ | "blink"
39
+ | "inverse"
40
+ | "hidden"
41
+ | "strikethrough"
42
+ | "doubleunderline";
43
+ export type InspectColorForeground =
44
+ | "black"
45
+ | "red"
46
+ | "green"
47
+ | "yellow"
48
+ | "blue"
49
+ | "magenta"
50
+ | "cyan"
51
+ | "white"
52
+ | "gray"
53
+ | "redBright"
54
+ | "greenBright"
55
+ | "yellowBright"
56
+ | "blueBright"
57
+ | "magentaBright"
58
+ | "cyanBright"
59
+ | "whiteBright";
60
+ export type InspectColorBackground = `bg${Capitalize<InspectColorForeground>}`;
61
+ export type InspectColor = InspectColorModifier | InspectColorForeground | InspectColorBackground;
62
+ export interface InspectColors extends Record<InspectColor, [number, number]> {}
63
+ export interface InspectOptions {
64
+ /**
65
+ * If `true`, object's non-enumerable symbols and properties are included in the formatted result.
66
+ * `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties).
67
+ * @default false
68
+ */
69
+ showHidden?: boolean | undefined;
70
+ /**
71
+ * Specifies the number of times to recurse while formatting object.
72
+ * This is useful for inspecting large objects.
73
+ * To recurse up to the maximum call stack size pass `Infinity` or `null`.
74
+ * @default 2
75
+ */
76
+ depth?: number | null | undefined;
77
+ /**
78
+ * If `true`, the output is styled with ANSI color codes. Colors are customizable.
79
+ */
80
+ colors?: boolean | undefined;
81
+ /**
82
+ * If `false`, `[util.inspect.custom](depth, opts, inspect)` functions are not invoked.
83
+ * @default true
84
+ */
85
+ customInspect?: boolean | undefined;
86
+ /**
87
+ * If `true`, `Proxy` inspection includes the target and handler objects.
88
+ * @default false
89
+ */
90
+ showProxy?: boolean | undefined;
91
+ /**
92
+ * Specifies the maximum number of `Array`, `TypedArray`, `WeakMap`, and `WeakSet` elements
93
+ * to include when formatting. Set to `null` or `Infinity` to show all elements.
94
+ * Set to `0` or negative to show no elements.
95
+ * @default 100
96
+ */
97
+ maxArrayLength?: number | null | undefined;
98
+ /**
99
+ * Specifies the maximum number of characters to
100
+ * include when formatting. Set to `null` or `Infinity` to show all elements.
101
+ * Set to `0` or negative to show no characters.
102
+ * @default 10000
103
+ */
104
+ maxStringLength?: number | null | undefined;
105
+ /**
106
+ * The length at which input values are split across multiple lines.
107
+ * Set to `Infinity` to format the input as a single line
108
+ * (in combination with `compact` set to `true` or any number >= `1`).
109
+ * @default 80
110
+ */
111
+ breakLength?: number | undefined;
112
+ /**
113
+ * Setting this to `false` causes each object key
114
+ * to be displayed on a new line. It will also add new lines to text that is
115
+ * longer than `breakLength`. If set to a number, the most `n` inner elements
116
+ * are united on a single line as long as all properties fit into
117
+ * `breakLength`. Short array elements are also grouped together. Note that no
118
+ * text will be reduced below 16 characters, no matter the `breakLength` size.
119
+ * For more information, see the example below.
120
+ * @default true
121
+ */
122
+ compact?: boolean | number | undefined;
123
+ /**
124
+ * If set to `true` or a function, all properties of an object, and `Set` and `Map`
125
+ * entries are sorted in the resulting string.
126
+ * If set to `true` the default sort is used.
127
+ * If set to a function, it is used as a compare function.
128
+ */
129
+ sorted?: boolean | ((a: string, b: string) => number) | undefined;
130
+ /**
131
+ * If set to `true`, getters are going to be
132
+ * inspected as well. If set to `'get'` only getters without setter are going
133
+ * to be inspected. If set to `'set'` only getters having a corresponding
134
+ * setter are going to be inspected. This might cause side effects depending on
135
+ * the getter function.
136
+ * @default false
137
+ */
138
+ getters?: "get" | "set" | boolean | undefined;
139
+ /**
140
+ * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers.
141
+ * @default false
142
+ */
143
+ numericSeparator?: boolean | undefined;
144
+ }
145
+ export interface InspectContext extends Required<InspectOptions> {
146
+ stylize(text: string, styleType: InspectStyle): string;
147
+ }
148
+ import _inspect = inspect;
149
+ export interface Inspectable {
150
+ [inspect.custom](depth: number, options: InspectContext, inspect: typeof _inspect): any;
151
+ }
152
+ // TODO: Remove these in a future major
153
+ /** @deprecated Use `InspectStyle` instead. */
154
+ export type Style = Exclude<InspectStyle, "name">;
155
+ /** @deprecated Use the `Inspectable` interface instead. */
156
+ export type CustomInspectFunction = (depth: number, options: InspectContext) => any;
157
+ /** @deprecated Use `InspectContext` instead. */
158
+ export interface InspectOptionsStylized extends InspectContext {}
159
+ /** @deprecated Use `InspectColorModifier` instead. */
160
+ export type Modifiers = InspectColorModifier;
161
+ /** @deprecated Use `InspectColorForeground` instead. */
162
+ export type ForegroundColors = InspectColorForeground;
163
+ /** @deprecated Use `InspectColorBackground` instead. */
164
+ export type BackgroundColors = InspectColorBackground;
165
+ export interface CallSiteObject {
166
+ /**
167
+ * Returns the name of the function associated with this call site.
168
+ */
169
+ functionName: string;
170
+ /**
171
+ * Returns the name of the resource that contains the script for the
172
+ * function for this call site.
173
+ */
174
+ scriptName: string;
175
+ /**
176
+ * Returns the unique id of the script, as in Chrome DevTools protocol
177
+ * [`Runtime.ScriptId`](https://chromedevtools.github.io/devtools-protocol/1-3/Runtime/#type-ScriptId).
178
+ * @since v22.14.0
179
+ */
180
+ scriptId: string;
181
+ /**
182
+ * Returns the number, 1-based, of the line for the associate function call.
183
+ */
184
+ lineNumber: number;
185
+ /**
186
+ * Returns the 1-based column offset on the line for the associated function call.
187
+ */
188
+ columnNumber: number;
189
+ }
190
+ export type DiffEntry = [operation: -1 | 0 | 1, value: string];
191
+ /**
192
+ * `util.diff()` compares two string or array values and returns an array of difference entries.
193
+ * It uses the Myers diff algorithm to compute minimal differences, which is the same algorithm
194
+ * used internally by assertion error messages.
195
+ *
196
+ * If the values are equal, an empty array is returned.
197
+ *
198
+ * ```js
199
+ * const { diff } = require('node:util');
200
+ *
201
+ * // Comparing strings
202
+ * const actualString = '12345678';
203
+ * const expectedString = '12!!5!7!';
204
+ * console.log(diff(actualString, expectedString));
205
+ * // [
206
+ * // [0, '1'],
207
+ * // [0, '2'],
208
+ * // [1, '3'],
209
+ * // [1, '4'],
210
+ * // [-1, '!'],
211
+ * // [-1, '!'],
212
+ * // [0, '5'],
213
+ * // [1, '6'],
214
+ * // [-1, '!'],
215
+ * // [0, '7'],
216
+ * // [1, '8'],
217
+ * // [-1, '!'],
218
+ * // ]
219
+ * // Comparing arrays
220
+ * const actualArray = ['1', '2', '3'];
221
+ * const expectedArray = ['1', '3', '4'];
222
+ * console.log(diff(actualArray, expectedArray));
223
+ * // [
224
+ * // [0, '1'],
225
+ * // [1, '2'],
226
+ * // [0, '3'],
227
+ * // [-1, '4'],
228
+ * // ]
229
+ * // Equal values return empty array
230
+ * console.log(diff('same', 'same'));
231
+ * // []
232
+ * ```
233
+ * @since v22.15.0
234
+ * @experimental
235
+ * @param actual The first value to compare
236
+ * @param expected The second value to compare
237
+ * @returns An array of difference entries. Each entry is an array with two elements:
238
+ * * Index 0: `number` Operation code: `-1` for delete, `0` for no-op/unchanged, `1` for insert
239
+ * * Index 1: `string` The value associated with the operation
240
+ */
241
+ export function diff(actual: string | readonly string[], expected: string | readonly string[]): DiffEntry[];
242
+ /**
243
+ * The `util.format()` method returns a formatted string using the first argument
244
+ * as a `printf`-like format string which can contain zero or more format
245
+ * specifiers. Each specifier is replaced with the converted value from the
246
+ * corresponding argument. Supported specifiers are:
247
+ *
248
+ * If a specifier does not have a corresponding argument, it is not replaced:
249
+ *
250
+ * ```js
251
+ * util.format('%s:%s', 'foo');
252
+ * // Returns: 'foo:%s'
253
+ * ```
254
+ *
255
+ * Values that are not part of the format string are formatted using `util.inspect()` if their type is not `string`.
256
+ *
257
+ * If there are more arguments passed to the `util.format()` method than the
258
+ * number of specifiers, the extra arguments are concatenated to the returned
259
+ * string, separated by spaces:
260
+ *
261
+ * ```js
262
+ * util.format('%s:%s', 'foo', 'bar', 'baz');
263
+ * // Returns: 'foo:bar baz'
264
+ * ```
265
+ *
266
+ * If the first argument does not contain a valid format specifier, `util.format()` returns a string that is the concatenation of all arguments separated by spaces:
267
+ *
268
+ * ```js
269
+ * util.format(1, 2, 3);
270
+ * // Returns: '1 2 3'
271
+ * ```
272
+ *
273
+ * If only one argument is passed to `util.format()`, it is returned as it is
274
+ * without any formatting:
275
+ *
276
+ * ```js
277
+ * util.format('%% %s');
278
+ * // Returns: '%% %s'
279
+ * ```
280
+ *
281
+ * `util.format()` is a synchronous method that is intended as a debugging tool.
282
+ * Some input values can have a significant performance overhead that can block the
283
+ * event loop. Use this function with care and never in a hot code path.
284
+ * @since v0.5.3
285
+ * @param format A `printf`-like format string.
286
+ */
287
+ export function format(format?: any, ...param: any[]): string;
288
+ /**
289
+ * This function is identical to {@link format}, except in that it takes
290
+ * an `inspectOptions` argument which specifies options that are passed along to {@link inspect}.
291
+ *
292
+ * ```js
293
+ * util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });
294
+ * // Returns 'See object { foo: 42 }', where `42` is colored as a number
295
+ * // when printed to a terminal.
296
+ * ```
297
+ * @since v10.0.0
298
+ */
299
+ export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
300
+ export interface GetCallSitesOptions {
301
+ /**
302
+ * Reconstruct the original location in the stacktrace from the source-map.
303
+ * Enabled by default with the flag `--enable-source-maps`.
304
+ */
305
+ sourceMap?: boolean | undefined;
306
+ }
307
+ /**
308
+ * Returns an array of call site objects containing the stack of
309
+ * the caller function.
310
+ *
311
+ * Unlike accessing an `error.stack`, the result returned from this API is not
312
+ * interfered with `Error.prepareStackTrace`.
313
+ *
314
+ * ```js
315
+ * import { getCallSites } from 'node:util';
316
+ *
317
+ * function exampleFunction() {
318
+ * const callSites = getCallSites();
319
+ *
320
+ * console.log('Call Sites:');
321
+ * callSites.forEach((callSite, index) => {
322
+ * console.log(`CallSite ${index + 1}:`);
323
+ * console.log(`Function Name: ${callSite.functionName}`);
324
+ * console.log(`Script Name: ${callSite.scriptName}`);
325
+ * console.log(`Line Number: ${callSite.lineNumber}`);
326
+ * console.log(`Column Number: ${callSite.columnNumber}`);
327
+ * });
328
+ * // CallSite 1:
329
+ * // Function Name: exampleFunction
330
+ * // Script Name: /home/example.js
331
+ * // Line Number: 5
332
+ * // Column Number: 26
333
+ *
334
+ * // CallSite 2:
335
+ * // Function Name: anotherFunction
336
+ * // Script Name: /home/example.js
337
+ * // Line Number: 22
338
+ * // Column Number: 3
339
+ *
340
+ * // ...
341
+ * }
342
+ *
343
+ * // A function to simulate another stack layer
344
+ * function anotherFunction() {
345
+ * exampleFunction();
346
+ * }
347
+ *
348
+ * anotherFunction();
349
+ * ```
350
+ *
351
+ * It is possible to reconstruct the original locations by setting the option `sourceMap` to `true`.
352
+ * If the source map is not available, the original location will be the same as the current location.
353
+ * When the `--enable-source-maps` flag is enabled, for example when using `--experimental-transform-types`,
354
+ * `sourceMap` will be true by default.
355
+ *
356
+ * ```ts
357
+ * import { getCallSites } from 'node:util';
358
+ *
359
+ * interface Foo {
360
+ * foo: string;
361
+ * }
362
+ *
363
+ * const callSites = getCallSites({ sourceMap: true });
364
+ *
365
+ * // With sourceMap:
366
+ * // Function Name: ''
367
+ * // Script Name: example.js
368
+ * // Line Number: 7
369
+ * // Column Number: 26
370
+ *
371
+ * // Without sourceMap:
372
+ * // Function Name: ''
373
+ * // Script Name: example.js
374
+ * // Line Number: 2
375
+ * // Column Number: 26
376
+ * ```
377
+ * @param frameCount Number of frames to capture as call site objects.
378
+ * **Default:** `10`. Allowable range is between 1 and 200.
379
+ * @return An array of call site objects
380
+ * @since v22.9.0
381
+ */
382
+ export function getCallSites(frameCount?: number, options?: GetCallSitesOptions): CallSiteObject[];
383
+ export function getCallSites(options: GetCallSitesOptions): CallSiteObject[];
384
+ /**
385
+ * Returns the string name for a numeric error code that comes from a Node.js API.
386
+ * The mapping between error codes and error names is platform-dependent.
387
+ * See `Common System Errors` for the names of common errors.
388
+ *
389
+ * ```js
390
+ * fs.access('file/that/does/not/exist', (err) => {
391
+ * const name = util.getSystemErrorName(err.errno);
392
+ * console.error(name); // ENOENT
393
+ * });
394
+ * ```
395
+ * @since v9.7.0
396
+ */
397
+ export function getSystemErrorName(err: number): string;
398
+ /**
399
+ * Enable or disable printing a stack trace on `SIGINT`. The API is only available on the main thread.
400
+ * @since 24.6.0
401
+ */
402
+ export function setTraceSigInt(enable: boolean): void;
403
+ /**
404
+ * Returns a Map of all system error codes available from the Node.js API.
405
+ * The mapping between error codes and error names is platform-dependent.
406
+ * See `Common System Errors` for the names of common errors.
407
+ *
408
+ * ```js
409
+ * fs.access('file/that/does/not/exist', (err) => {
410
+ * const errorMap = util.getSystemErrorMap();
411
+ * const name = errorMap.get(err.errno);
412
+ * console.error(name); // ENOENT
413
+ * });
414
+ * ```
415
+ * @since v16.0.0, v14.17.0
416
+ */
417
+ export function getSystemErrorMap(): Map<number, [string, string]>;
418
+ /**
419
+ * Returns the string message for a numeric error code that comes from a Node.js
420
+ * API.
421
+ * The mapping between error codes and string messages is platform-dependent.
422
+ *
423
+ * ```js
424
+ * fs.access('file/that/does/not/exist', (err) => {
425
+ * const message = util.getSystemErrorMessage(err.errno);
426
+ * console.error(message); // no such file or directory
427
+ * });
428
+ * ```
429
+ * @since v22.12.0
430
+ */
431
+ export function getSystemErrorMessage(err: number): string;
432
+ /**
433
+ * Returns the `string` after replacing any surrogate code points
434
+ * (or equivalently, any unpaired surrogate code units) with the
435
+ * Unicode "replacement character" U+FFFD.
436
+ * @since v16.8.0, v14.18.0
437
+ */
438
+ export function toUSVString(string: string): string;
439
+ /**
440
+ * Creates and returns an `AbortController` instance whose `AbortSignal` is marked
441
+ * as transferable and can be used with `structuredClone()` or `postMessage()`.
442
+ * @since v18.11.0
443
+ * @returns A transferable AbortController
444
+ */
445
+ export function transferableAbortController(): AbortController;
446
+ /**
447
+ * Marks the given `AbortSignal` as transferable so that it can be used with`structuredClone()` and `postMessage()`.
448
+ *
449
+ * ```js
450
+ * const signal = transferableAbortSignal(AbortSignal.timeout(100));
451
+ * const channel = new MessageChannel();
452
+ * channel.port2.postMessage(signal, [signal]);
453
+ * ```
454
+ * @since v18.11.0
455
+ * @param signal The AbortSignal
456
+ * @returns The same AbortSignal
457
+ */
458
+ export function transferableAbortSignal(signal: AbortSignal): AbortSignal;
459
+ /**
460
+ * Listens to abort event on the provided `signal` and returns a promise that resolves when the `signal` is aborted.
461
+ * If `resource` is provided, it weakly references the operation's associated object,
462
+ * so if `resource` is garbage collected before the `signal` aborts,
463
+ * then returned promise shall remain pending.
464
+ * This prevents memory leaks in long-running or non-cancelable operations.
465
+ *
466
+ * ```js
467
+ * import { aborted } from 'node:util';
468
+ *
469
+ * // Obtain an object with an abortable signal, like a custom resource or operation.
470
+ * const dependent = obtainSomethingAbortable();
471
+ *
472
+ * // Pass `dependent` as the resource, indicating the promise should only resolve
473
+ * // if `dependent` is still in memory when the signal is aborted.
474
+ * aborted(dependent.signal, dependent).then(() => {
475
+ * // This code runs when `dependent` is aborted.
476
+ * console.log('Dependent resource was aborted.');
477
+ * });
478
+ *
479
+ * // Simulate an event that triggers the abort.
480
+ * dependent.on('event', () => {
481
+ * dependent.abort(); // This will cause the `aborted` promise to resolve.
482
+ * });
483
+ * ```
484
+ * @since v19.7.0
485
+ * @param resource Any non-null object tied to the abortable operation and held weakly.
486
+ * If `resource` is garbage collected before the `signal` aborts, the promise remains pending,
487
+ * allowing Node.js to stop tracking it.
488
+ * This helps prevent memory leaks in long-running or non-cancelable operations.
489
+ */
490
+ export function aborted(signal: AbortSignal, resource: any): Promise<void>;
491
+ /**
492
+ * The `util.inspect()` method returns a string representation of `object` that is
493
+ * intended for debugging. The output of `util.inspect` may change at any time
494
+ * and should not be depended upon programmatically. Additional `options` may be
495
+ * passed that alter the result.
496
+ * `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag`
497
+ * property to make an identifiable tag for an inspected value.
498
+ *
499
+ * ```js
500
+ * class Foo {
501
+ * get [Symbol.toStringTag]() {
502
+ * return 'bar';
503
+ * }
504
+ * }
505
+ *
506
+ * class Bar {}
507
+ *
508
+ * const baz = Object.create(null, { [Symbol.toStringTag]: { value: 'foo' } });
509
+ *
510
+ * util.inspect(new Foo()); // 'Foo [bar] {}'
511
+ * util.inspect(new Bar()); // 'Bar {}'
512
+ * util.inspect(baz); // '[foo] {}'
513
+ * ```
514
+ *
515
+ * Circular references point to their anchor by using a reference index:
516
+ *
517
+ * ```js
518
+ * import { inspect } from 'node:util';
519
+ *
520
+ * const obj = {};
521
+ * obj.a = [obj];
522
+ * obj.b = {};
523
+ * obj.b.inner = obj.b;
524
+ * obj.b.obj = obj;
525
+ *
526
+ * console.log(inspect(obj));
527
+ * // <ref *1> {
528
+ * // a: [ [Circular *1] ],
529
+ * // b: <ref *2> { inner: [Circular *2], obj: [Circular *1] }
530
+ * // }
531
+ * ```
532
+ *
533
+ * The following example inspects all properties of the `util` object:
534
+ *
535
+ * ```js
536
+ * import util from 'node:util';
537
+ *
538
+ * console.log(util.inspect(util, { showHidden: true, depth: null }));
539
+ * ```
540
+ *
541
+ * The following example highlights the effect of the `compact` option:
542
+ *
543
+ * ```js
544
+ * import { inspect } from 'node:util';
545
+ *
546
+ * const o = {
547
+ * a: [1, 2, [[
548
+ * 'Lorem ipsum dolor sit amet,\nconsectetur adipiscing elit, sed do ' +
549
+ * 'eiusmod \ntempor incididunt ut labore et dolore magna aliqua.',
550
+ * 'test',
551
+ * 'foo']], 4],
552
+ * b: new Map([['za', 1], ['zb', 'test']]),
553
+ * };
554
+ * console.log(inspect(o, { compact: true, depth: 5, breakLength: 80 }));
555
+ *
556
+ * // { a:
557
+ * // [ 1,
558
+ * // 2,
559
+ * // [ [ 'Lorem ipsum dolor sit amet,\nconsectetur [...]', // A long line
560
+ * // 'test',
561
+ * // 'foo' ] ],
562
+ * // 4 ],
563
+ * // b: Map(2) { 'za' => 1, 'zb' => 'test' } }
564
+ *
565
+ * // Setting `compact` to false or an integer creates more reader friendly output.
566
+ * console.log(inspect(o, { compact: false, depth: 5, breakLength: 80 }));
567
+ *
568
+ * // {
569
+ * // a: [
570
+ * // 1,
571
+ * // 2,
572
+ * // [
573
+ * // [
574
+ * // 'Lorem ipsum dolor sit amet,\n' +
575
+ * // 'consectetur adipiscing elit, sed do eiusmod \n' +
576
+ * // 'tempor incididunt ut labore et dolore magna aliqua.',
577
+ * // 'test',
578
+ * // 'foo'
579
+ * // ]
580
+ * // ],
581
+ * // 4
582
+ * // ],
583
+ * // b: Map(2) {
584
+ * // 'za' => 1,
585
+ * // 'zb' => 'test'
586
+ * // }
587
+ * // }
588
+ *
589
+ * // Setting `breakLength` to e.g. 150 will print the "Lorem ipsum" text in a
590
+ * // single line.
591
+ * ```
592
+ *
593
+ * The `showHidden` option allows `WeakMap` and `WeakSet` entries to be
594
+ * inspected. If there are more entries than `maxArrayLength`, there is no
595
+ * guarantee which entries are displayed. That means retrieving the same
596
+ * `WeakSet` entries twice may result in different output. Furthermore, entries
597
+ * with no remaining strong references may be garbage collected at any time.
598
+ *
599
+ * ```js
600
+ * import { inspect } from 'node:util';
601
+ *
602
+ * const obj = { a: 1 };
603
+ * const obj2 = { b: 2 };
604
+ * const weakSet = new WeakSet([obj, obj2]);
605
+ *
606
+ * console.log(inspect(weakSet, { showHidden: true }));
607
+ * // WeakSet { { a: 1 }, { b: 2 } }
608
+ * ```
609
+ *
610
+ * The `sorted` option ensures that an object's property insertion order does not
611
+ * impact the result of `util.inspect()`.
612
+ *
613
+ * ```js
614
+ * import { inspect } from 'node:util';
615
+ * import assert from 'node:assert';
616
+ *
617
+ * const o1 = {
618
+ * b: [2, 3, 1],
619
+ * a: '`a` comes before `b`',
620
+ * c: new Set([2, 3, 1]),
621
+ * };
622
+ * console.log(inspect(o1, { sorted: true }));
623
+ * // { a: '`a` comes before `b`', b: [ 2, 3, 1 ], c: Set(3) { 1, 2, 3 } }
624
+ * console.log(inspect(o1, { sorted: (a, b) => b.localeCompare(a) }));
625
+ * // { c: Set(3) { 3, 2, 1 }, b: [ 2, 3, 1 ], a: '`a` comes before `b`' }
626
+ *
627
+ * const o2 = {
628
+ * c: new Set([2, 1, 3]),
629
+ * a: '`a` comes before `b`',
630
+ * b: [2, 3, 1],
631
+ * };
632
+ * assert.strict.equal(
633
+ * inspect(o1, { sorted: true }),
634
+ * inspect(o2, { sorted: true }),
635
+ * );
636
+ * ```
637
+ *
638
+ * The `numericSeparator` option adds an underscore every three digits to all
639
+ * numbers.
640
+ *
641
+ * ```js
642
+ * import { inspect } from 'node:util';
643
+ *
644
+ * const thousand = 1000;
645
+ * const million = 1000000;
646
+ * const bigNumber = 123456789n;
647
+ * const bigDecimal = 1234.12345;
648
+ *
649
+ * console.log(inspect(thousand, { numericSeparator: true }));
650
+ * // 1_000
651
+ * console.log(inspect(million, { numericSeparator: true }));
652
+ * // 1_000_000
653
+ * console.log(inspect(bigNumber, { numericSeparator: true }));
654
+ * // 123_456_789n
655
+ * console.log(inspect(bigDecimal, { numericSeparator: true }));
656
+ * // 1_234.123_45
657
+ * ```
658
+ *
659
+ * `util.inspect()` is a synchronous method intended for debugging. Its maximum
660
+ * output length is approximately 128 MiB. Inputs that result in longer output will
661
+ * be truncated.
662
+ * @since v0.3.0
663
+ * @param object Any JavaScript primitive or `Object`.
664
+ * @return The representation of `object`.
665
+ */
666
+ export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
667
+ export function inspect(object: any, options?: InspectOptions): string;
668
+ export namespace inspect {
669
+ const custom: unique symbol;
670
+ let colors: InspectColors;
671
+ let styles: InspectStyles;
672
+ let defaultOptions: InspectOptions;
673
+ let replDefaults: InspectOptions;
674
+ }
675
+ /**
676
+ * Alias for [`Array.isArray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray).
677
+ *
678
+ * Returns `true` if the given `object` is an `Array`. Otherwise, returns `false`.
679
+ *
680
+ * ```js
681
+ * import util from 'node:util';
682
+ *
683
+ * util.isArray([]);
684
+ * // Returns: true
685
+ * util.isArray(new Array());
686
+ * // Returns: true
687
+ * util.isArray({});
688
+ * // Returns: false
689
+ * ```
690
+ * @since v0.6.0
691
+ * @deprecated Since v4.0.0 - Use `isArray` instead.
692
+ */
693
+ export function isArray(object: unknown): object is unknown[];
694
+ /**
695
+ * Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and
696
+ * `extends` keywords to get language level inheritance support. Also note
697
+ * that the two styles are [semantically incompatible](https://github.com/nodejs/node/issues/4179).
698
+ *
699
+ * Inherit the prototype methods from one
700
+ * [constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/constructor) into another. The
701
+ * prototype of `constructor` will be set to a new object created from
702
+ * `superConstructor`.
703
+ *
704
+ * This mainly adds some input validation on top of
705
+ * `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`.
706
+ * As an additional convenience, `superConstructor` will be accessible
707
+ * through the `constructor.super_` property.
708
+ *
709
+ * ```js
710
+ * const util = require('node:util');
711
+ * const EventEmitter = require('node:events');
712
+ *
713
+ * function MyStream() {
714
+ * EventEmitter.call(this);
715
+ * }
716
+ *
717
+ * util.inherits(MyStream, EventEmitter);
718
+ *
719
+ * MyStream.prototype.write = function(data) {
720
+ * this.emit('data', data);
721
+ * };
722
+ *
723
+ * const stream = new MyStream();
724
+ *
725
+ * console.log(stream instanceof EventEmitter); // true
726
+ * console.log(MyStream.super_ === EventEmitter); // true
727
+ *
728
+ * stream.on('data', (data) => {
729
+ * console.log(`Received data: "${data}"`);
730
+ * });
731
+ * stream.write('It works!'); // Received data: "It works!"
732
+ * ```
733
+ *
734
+ * ES6 example using `class` and `extends`:
735
+ *
736
+ * ```js
737
+ * import EventEmitter from 'node:events';
738
+ *
739
+ * class MyStream extends EventEmitter {
740
+ * write(data) {
741
+ * this.emit('data', data);
742
+ * }
743
+ * }
744
+ *
745
+ * const stream = new MyStream();
746
+ *
747
+ * stream.on('data', (data) => {
748
+ * console.log(`Received data: "${data}"`);
749
+ * });
750
+ * stream.write('With ES6');
751
+ * ```
752
+ * @since v0.3.0
753
+ * @legacy Use ES2015 class syntax and `extends` keyword instead.
754
+ */
755
+ export function inherits(constructor: unknown, superConstructor: unknown): void;
756
+ /**
757
+ * The `util.convertProcessSignalToExitCode()` method converts a signal name to its
758
+ * corresponding POSIX exit code. Following the POSIX standard, the exit code
759
+ * for a process terminated by a signal is calculated as `128 + signal number`.
760
+ *
761
+ * If `signal` is not a valid signal name, then an error will be thrown. See
762
+ * [`signal(7)`](https://man7.org/linux/man-pages/man7/signal.7.html) for a list of valid signals.
763
+ *
764
+ * ```js
765
+ * import { convertProcessSignalToExitCode } from 'node:util';
766
+ *
767
+ * console.log(convertProcessSignalToExitCode('SIGTERM')); // 143 (128 + 15)
768
+ * console.log(convertProcessSignalToExitCode('SIGKILL')); // 137 (128 + 9)
769
+ * ```
770
+ *
771
+ * This is particularly useful when working with processes to determine
772
+ * the exit code based on the signal that terminated the process.
773
+ * @since v25.4.0
774
+ * @param signal A signal name (e.g. `'SIGTERM'`)
775
+ * @returns The exit code corresponding to `signal`
776
+ */
777
+ export function convertProcessSignalToExitCode(signal: NodeJS.Signals): number;
778
+ export type DebugLoggerFunction = (msg: string, ...param: unknown[]) => void;
779
+ export interface DebugLogger extends DebugLoggerFunction {
780
+ /**
781
+ * The `util.debuglog().enabled` getter is used to create a test that can be used
782
+ * in conditionals based on the existence of the `NODE_DEBUG` environment variable.
783
+ * If the `section` name appears within the value of that environment variable,
784
+ * then the returned value will be `true`. If not, then the returned value will be
785
+ * `false`.
786
+ *
787
+ * ```js
788
+ * import { debuglog } from 'node:util';
789
+ * const enabled = debuglog('foo').enabled;
790
+ * if (enabled) {
791
+ * console.log('hello from foo [%d]', 123);
792
+ * }
793
+ * ```
794
+ *
795
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then it will
796
+ * output something like:
797
+ *
798
+ * ```console
799
+ * hello from foo [123]
800
+ * ```
801
+ */
802
+ enabled: boolean;
803
+ }
804
+ /**
805
+ * The `util.debuglog()` method is used to create a function that conditionally
806
+ * writes debug messages to `stderr` based on the existence of the `NODE_DEBUG`
807
+ * environment variable. If the `section` name appears within the value of that
808
+ * environment variable, then the returned function operates similar to
809
+ * `console.error()`. If not, then the returned function is a no-op.
810
+ *
811
+ * ```js
812
+ * import { debuglog } from 'node:util';
813
+ * const log = debuglog('foo');
814
+ *
815
+ * log('hello from foo [%d]', 123);
816
+ * ```
817
+ *
818
+ * If this program is run with `NODE_DEBUG=foo` in the environment, then
819
+ * it will output something like:
820
+ *
821
+ * ```console
822
+ * FOO 3245: hello from foo [123]
823
+ * ```
824
+ *
825
+ * where `3245` is the process id. If it is not run with that
826
+ * environment variable set, then it will not print anything.
827
+ *
828
+ * The `section` supports wildcard also:
829
+ *
830
+ * ```js
831
+ * import { debuglog } from 'node:util';
832
+ * const log = debuglog('foo-bar');
833
+ *
834
+ * log('hi there, it\'s foo-bar [%d]', 2333);
835
+ * ```
836
+ *
837
+ * if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
838
+ * something like:
839
+ *
840
+ * ```console
841
+ * FOO-BAR 3257: hi there, it's foo-bar [2333]
842
+ * ```
843
+ *
844
+ * Multiple comma-separated `section` names may be specified in the `NODE_DEBUG`
845
+ * environment variable: `NODE_DEBUG=fs,net,tls`.
846
+ *
847
+ * The optional `callback` argument can be used to replace the logging function
848
+ * with a different function that doesn't have any initialization or
849
+ * unnecessary wrapping.
850
+ *
851
+ * ```js
852
+ * import { debuglog } from 'node:util';
853
+ * let log = debuglog('internals', (debug) => {
854
+ * // Replace with a logging function that optimizes out
855
+ * // testing if the section is enabled
856
+ * log = debug;
857
+ * });
858
+ * ```
859
+ * @since v0.11.3
860
+ * @param section A string identifying the portion of the application for which the `debuglog` function is being created.
861
+ * @param callback A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.
862
+ * @return The logging function
863
+ */
864
+ export function debuglog(section: string, callback?: (fn: DebugLoggerFunction) => void): DebugLogger;
865
+ export { debuglog as debug };
866
+ export interface DeprecateOptions {
867
+ /**
868
+ * When false do not change the prototype of object
869
+ * while emitting the deprecation warning.
870
+ * @since v25.2.0
871
+ * @default true
872
+ */
873
+ modifyPrototype?: boolean | undefined;
874
+ }
875
+ /**
876
+ * The `util.deprecate()` method wraps `fn` (which may be a function or class) in
877
+ * such a way that it is marked as deprecated.
878
+ *
879
+ * ```js
880
+ * import { deprecate } from 'node:util';
881
+ *
882
+ * export const obsoleteFunction = deprecate(() => {
883
+ * // Do something here.
884
+ * }, 'obsoleteFunction() is deprecated. Use newShinyFunction() instead.');
885
+ * ```
886
+ *
887
+ * When called, `util.deprecate()` will return a function that will emit a
888
+ * `DeprecationWarning` using the `'warning'` event. The warning will
889
+ * be emitted and printed to `stderr` the first time the returned function is
890
+ * called. After the warning is emitted, the wrapped function is called without
891
+ * emitting a warning.
892
+ *
893
+ * If the same optional `code` is supplied in multiple calls to `util.deprecate()`,
894
+ * the warning will be emitted only once for that `code`.
895
+ *
896
+ * ```js
897
+ * import { deprecate } from 'node:util';
898
+ *
899
+ * const fn1 = deprecate(
900
+ * () => 'a value',
901
+ * 'deprecation message',
902
+ * 'DEP0001',
903
+ * );
904
+ * const fn2 = deprecate(
905
+ * () => 'a different value',
906
+ * 'other dep message',
907
+ * 'DEP0001',
908
+ * );
909
+ * fn1(); // Emits a deprecation warning with code DEP0001
910
+ * fn2(); // Does not emit a deprecation warning because it has the same code
911
+ * ```
912
+ *
913
+ * If either the `--no-deprecation` or `--no-warnings` command-line flags are
914
+ * used, or if the `process.noDeprecation` property is set to `true` _prior_ to
915
+ * the first deprecation warning, the `util.deprecate()` method does nothing.
916
+ *
917
+ * If the `--trace-deprecation` or `--trace-warnings` command-line flags are set,
918
+ * or the `process.traceDeprecation` property is set to `true`, a warning and a
919
+ * stack trace are printed to `stderr` the first time the deprecated function is
920
+ * called.
921
+ *
922
+ * If the `--throw-deprecation` command-line flag is set, or the
923
+ * `process.throwDeprecation` property is set to `true`, then an exception will be
924
+ * thrown when the deprecated function is called.
925
+ *
926
+ * The `--throw-deprecation` command-line flag and `process.throwDeprecation`
927
+ * property take precedence over `--trace-deprecation` and
928
+ * `process.traceDeprecation`.
929
+ * @since v0.8.0
930
+ * @param fn The function that is being deprecated.
931
+ * @param msg A warning message to display when the deprecated function is invoked.
932
+ * @param code A deprecation code. See the `list of deprecated APIs` for a list of codes.
933
+ * @return The deprecated function wrapped to emit a warning.
934
+ */
935
+ export function deprecate<T extends Function>(fn: T, msg: string, code?: string, options?: DeprecateOptions): T;
936
+ export interface IsDeepStrictEqualOptions {
937
+ /**
938
+ * If `true`, prototype and constructor
939
+ * comparison is skipped during deep strict equality check.
940
+ * @since v24.9.0
941
+ * @default false
942
+ */
943
+ skipPrototype?: boolean | undefined;
944
+ }
945
+ /**
946
+ * Returns `true` if there is deep strict equality between `val1` and `val2`.
947
+ * Otherwise, returns `false`.
948
+ *
949
+ * See `assert.deepStrictEqual()` for more information about deep strict
950
+ * equality.
951
+ * @since v9.0.0
952
+ */
953
+ export function isDeepStrictEqual(val1: unknown, val2: unknown, options?: IsDeepStrictEqualOptions): boolean;
954
+ /**
955
+ * Returns `str` with any ANSI escape codes removed.
956
+ *
957
+ * ```js
958
+ * console.log(util.stripVTControlCharacters('\u001B[4mvalue\u001B[0m'));
959
+ * // Prints "value"
960
+ * ```
961
+ * @since v16.11.0
962
+ */
963
+ export function stripVTControlCharacters(str: string): string;
964
+ /**
965
+ * Takes an `async` function (or a function that returns a `Promise`) and returns a
966
+ * function following the error-first callback style, i.e. taking
967
+ * an `(err, value) => ...` callback as the last argument. In the callback, the
968
+ * first argument will be the rejection reason (or `null` if the `Promise`
969
+ * resolved), and the second argument will be the resolved value.
970
+ *
971
+ * ```js
972
+ * import { callbackify } from 'node:util';
973
+ *
974
+ * async function fn() {
975
+ * return 'hello world';
976
+ * }
977
+ * const callbackFunction = callbackify(fn);
978
+ *
979
+ * callbackFunction((err, ret) => {
980
+ * if (err) throw err;
981
+ * console.log(ret);
982
+ * });
983
+ * ```
984
+ *
985
+ * Will print:
986
+ *
987
+ * ```text
988
+ * hello world
989
+ * ```
990
+ *
991
+ * The callback is executed asynchronously, and will have a limited stack trace.
992
+ * If the callback throws, the process will emit an `'uncaughtException'`
993
+ * event, and if not handled will exit.
994
+ *
995
+ * Since `null` has a special meaning as the first argument to a callback, if a
996
+ * wrapped function rejects a `Promise` with a falsy value as a reason, the value
997
+ * is wrapped in an `Error` with the original value stored in a field named
998
+ * `reason`.
999
+ *
1000
+ * ```js
1001
+ * function fn() {
1002
+ * return Promise.reject(null);
1003
+ * }
1004
+ * const callbackFunction = util.callbackify(fn);
1005
+ *
1006
+ * callbackFunction((err, ret) => {
1007
+ * // When the Promise was rejected with `null` it is wrapped with an Error and
1008
+ * // the original value is stored in `reason`.
1009
+ * err && Object.hasOwn(err, 'reason') && err.reason === null; // true
1010
+ * });
1011
+ * ```
1012
+ * @since v8.2.0
1013
+ * @param fn An `async` function
1014
+ * @return a callback style function
1015
+ */
1016
+ export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
1017
+ export function callbackify<TResult>(
1018
+ fn: () => Promise<TResult>,
1019
+ ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
1020
+ export function callbackify<T1>(
1021
+ fn: (arg1: T1) => Promise<void>,
1022
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
1023
+ export function callbackify<T1, TResult>(
1024
+ fn: (arg1: T1) => Promise<TResult>,
1025
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
1026
+ export function callbackify<T1, T2>(
1027
+ fn: (arg1: T1, arg2: T2) => Promise<void>,
1028
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
1029
+ export function callbackify<T1, T2, TResult>(
1030
+ fn: (arg1: T1, arg2: T2) => Promise<TResult>,
1031
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
1032
+ export function callbackify<T1, T2, T3>(
1033
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
1034
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
1035
+ export function callbackify<T1, T2, T3, TResult>(
1036
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
1037
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
1038
+ export function callbackify<T1, T2, T3, T4>(
1039
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
1040
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
1041
+ export function callbackify<T1, T2, T3, T4, TResult>(
1042
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
1043
+ ): (
1044
+ arg1: T1,
1045
+ arg2: T2,
1046
+ arg3: T3,
1047
+ arg4: T4,
1048
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
1049
+ ) => void;
1050
+ export function callbackify<T1, T2, T3, T4, T5>(
1051
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
1052
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
1053
+ export function callbackify<T1, T2, T3, T4, T5, TResult>(
1054
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
1055
+ ): (
1056
+ arg1: T1,
1057
+ arg2: T2,
1058
+ arg3: T3,
1059
+ arg4: T4,
1060
+ arg5: T5,
1061
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
1062
+ ) => void;
1063
+ export function callbackify<T1, T2, T3, T4, T5, T6>(
1064
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
1065
+ ): (
1066
+ arg1: T1,
1067
+ arg2: T2,
1068
+ arg3: T3,
1069
+ arg4: T4,
1070
+ arg5: T5,
1071
+ arg6: T6,
1072
+ callback: (err: NodeJS.ErrnoException) => void,
1073
+ ) => void;
1074
+ export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
1075
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
1076
+ ): (
1077
+ arg1: T1,
1078
+ arg2: T2,
1079
+ arg3: T3,
1080
+ arg4: T4,
1081
+ arg5: T5,
1082
+ arg6: T6,
1083
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
1084
+ ) => void;
1085
+ export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
1086
+ __promisify__: TCustom;
1087
+ }
1088
+ export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
1089
+ [promisify.custom]: TCustom;
1090
+ }
1091
+ export type CustomPromisify<TCustom extends Function> =
1092
+ | CustomPromisifySymbol<TCustom>
1093
+ | CustomPromisifyLegacy<TCustom>;
1094
+ /**
1095
+ * Takes a function following the common error-first callback style, i.e. taking
1096
+ * an `(err, value) => ...` callback as the last argument, and returns a version
1097
+ * that returns promises.
1098
+ *
1099
+ * ```js
1100
+ * import { promisify } from 'node:util';
1101
+ * import { stat } from 'node:fs';
1102
+ *
1103
+ * const promisifiedStat = promisify(stat);
1104
+ * promisifiedStat('.').then((stats) => {
1105
+ * // Do something with `stats`
1106
+ * }).catch((error) => {
1107
+ * // Handle the error.
1108
+ * });
1109
+ * ```
1110
+ *
1111
+ * Or, equivalently using `async function`s:
1112
+ *
1113
+ * ```js
1114
+ * import { promisify } from 'node:util';
1115
+ * import { stat } from 'node:fs';
1116
+ *
1117
+ * const promisifiedStat = promisify(stat);
1118
+ *
1119
+ * async function callStat() {
1120
+ * const stats = await promisifiedStat('.');
1121
+ * console.log(`This directory is owned by ${stats.uid}`);
1122
+ * }
1123
+ *
1124
+ * callStat();
1125
+ * ```
1126
+ *
1127
+ * If there is an `original[util.promisify.custom]` property present, `promisify`
1128
+ * will return its value, see [Custom promisified functions](https://nodejs.org/docs/latest-v25.x/api/util.html#custom-promisified-functions).
1129
+ *
1130
+ * `promisify()` assumes that `original` is a function taking a callback as its
1131
+ * final argument in all cases. If `original` is not a function, `promisify()`
1132
+ * will throw an error. If `original` is a function but its last argument is not
1133
+ * an error-first callback, it will still be passed an error-first
1134
+ * callback as its last argument.
1135
+ *
1136
+ * Using `promisify()` on class methods or other methods that use `this` may not
1137
+ * work as expected unless handled specially:
1138
+ *
1139
+ * ```js
1140
+ * import { promisify } from 'node:util';
1141
+ *
1142
+ * class Foo {
1143
+ * constructor() {
1144
+ * this.a = 42;
1145
+ * }
1146
+ *
1147
+ * bar(callback) {
1148
+ * callback(null, this.a);
1149
+ * }
1150
+ * }
1151
+ *
1152
+ * const foo = new Foo();
1153
+ *
1154
+ * const naiveBar = promisify(foo.bar);
1155
+ * // TypeError: Cannot read properties of undefined (reading 'a')
1156
+ * // naiveBar().then(a => console.log(a));
1157
+ *
1158
+ * naiveBar.call(foo).then((a) => console.log(a)); // '42'
1159
+ *
1160
+ * const bindBar = naiveBar.bind(foo);
1161
+ * bindBar().then((a) => console.log(a)); // '42'
1162
+ * ```
1163
+ * @since v8.0.0
1164
+ */
1165
+ export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
1166
+ export function promisify<TResult>(
1167
+ fn: (callback: (err: any, result: TResult) => void) => void,
1168
+ ): () => Promise<TResult>;
1169
+ export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
1170
+ export function promisify<T1, TResult>(
1171
+ fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
1172
+ ): (arg1: T1) => Promise<TResult>;
1173
+ export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
1174
+ export function promisify<T1, T2, TResult>(
1175
+ fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
1176
+ ): (arg1: T1, arg2: T2) => Promise<TResult>;
1177
+ export function promisify<T1, T2>(
1178
+ fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
1179
+ ): (arg1: T1, arg2: T2) => Promise<void>;
1180
+ export function promisify<T1, T2, T3, TResult>(
1181
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
1182
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
1183
+ export function promisify<T1, T2, T3>(
1184
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
1185
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
1186
+ export function promisify<T1, T2, T3, T4, TResult>(
1187
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
1188
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
1189
+ export function promisify<T1, T2, T3, T4>(
1190
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
1191
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
1192
+ export function promisify<T1, T2, T3, T4, T5, TResult>(
1193
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
1194
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
1195
+ export function promisify<T1, T2, T3, T4, T5>(
1196
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
1197
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
1198
+ export function promisify(fn: Function): Function;
1199
+ export namespace promisify {
1200
+ /**
1201
+ * That can be used to declare custom promisified variants of functions.
1202
+ */
1203
+ const custom: unique symbol;
1204
+ }
1205
+ /**
1206
+ * Stability: 1.1 - Active development
1207
+ * Given an example `.env` file:
1208
+ *
1209
+ * ```js
1210
+ * import { parseEnv } from 'node:util';
1211
+ *
1212
+ * parseEnv('HELLO=world\nHELLO=oh my\n');
1213
+ * // Returns: { HELLO: 'oh my' }
1214
+ * ```
1215
+ * @param content The raw contents of a `.env` file.
1216
+ * @since v20.12.0
1217
+ */
1218
+ export function parseEnv(content: string): NodeJS.Dict<string>;
1219
+ export interface StyleTextOptions {
1220
+ /**
1221
+ * When true, `stream` is checked to see if it can handle colors.
1222
+ * @default true
1223
+ */
1224
+ validateStream?: boolean | undefined;
1225
+ /**
1226
+ * A stream that will be validated if it can be colored.
1227
+ * @default process.stdout
1228
+ */
1229
+ stream?: NodeJS.WritableStream | undefined;
1230
+ }
1231
+ /**
1232
+ * This function returns a formatted text considering the `format` passed
1233
+ * for printing in a terminal. It is aware of the terminal's capabilities
1234
+ * and acts according to the configuration set via `NO_COLOR`,
1235
+ * `NODE_DISABLE_COLORS` and `FORCE_COLOR` environment variables.
1236
+ *
1237
+ * ```js
1238
+ * import { styleText } from 'node:util';
1239
+ * import { stderr } from 'node:process';
1240
+ *
1241
+ * const successMessage = styleText('green', 'Success!');
1242
+ * console.log(successMessage);
1243
+ *
1244
+ * const errorMessage = styleText(
1245
+ * 'red',
1246
+ * 'Error! Error!',
1247
+ * // Validate if process.stderr has TTY
1248
+ * { stream: stderr },
1249
+ * );
1250
+ * console.error(errorMessage);
1251
+ * ```
1252
+ *
1253
+ * `util.inspect.colors` also provides text formats such as `italic`, and
1254
+ * `underline` and you can combine both:
1255
+ *
1256
+ * ```js
1257
+ * console.log(
1258
+ * util.styleText(['underline', 'italic'], 'My italic underlined message'),
1259
+ * );
1260
+ * ```
1261
+ *
1262
+ * When passing an array of formats, the order of the format applied
1263
+ * is left to right so the following style might overwrite the previous one.
1264
+ *
1265
+ * ```js
1266
+ * console.log(
1267
+ * util.styleText(['red', 'green'], 'text'), // green
1268
+ * );
1269
+ * ```
1270
+ *
1271
+ * The special format value `none` applies no additional styling to the text.
1272
+ *
1273
+ * The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v25.x/api/util.html#modifiers).
1274
+ * @param format A text format or an Array of text formats defined in `util.inspect.colors`.
1275
+ * @param text The text to to be formatted.
1276
+ * @since v20.12.0
1277
+ */
1278
+ export function styleText(
1279
+ format: InspectColor | readonly InspectColor[],
1280
+ text: string,
1281
+ options?: StyleTextOptions,
1282
+ ): string;
1283
+ /** @deprecated This alias will be removed in a future version. Use the canonical `TextEncoderEncodeIntoResult` instead. */
1284
+ // TODO: remove in future major
1285
+ export interface EncodeIntoResult extends TextEncoderEncodeIntoResult {}
1286
+ //// parseArgs
1287
+ /**
1288
+ * Provides a higher level API for command-line argument parsing than interacting
1289
+ * with `process.argv` directly. Takes a specification for the expected arguments
1290
+ * and returns a structured object with the parsed options and positionals.
1291
+ *
1292
+ * ```js
1293
+ * import { parseArgs } from 'node:util';
1294
+ * const args = ['-f', '--bar', 'b'];
1295
+ * const options = {
1296
+ * foo: {
1297
+ * type: 'boolean',
1298
+ * short: 'f',
1299
+ * },
1300
+ * bar: {
1301
+ * type: 'string',
1302
+ * },
1303
+ * };
1304
+ * const {
1305
+ * values,
1306
+ * positionals,
1307
+ * } = parseArgs({ args, options });
1308
+ * console.log(values, positionals);
1309
+ * // Prints: [Object: null prototype] { foo: true, bar: 'b' } []
1310
+ * ```
1311
+ * @since v18.3.0, v16.17.0
1312
+ * @param config Used to provide arguments for parsing and to configure the parser. `config` supports the following properties:
1313
+ * @return The parsed command line arguments:
1314
+ */
1315
+ export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
1316
+ /**
1317
+ * Type of argument used in {@link parseArgs}.
1318
+ */
1319
+ export type ParseArgsOptionsType = "boolean" | "string";
1320
+ export interface ParseArgsOptionDescriptor {
1321
+ /**
1322
+ * Type of argument.
1323
+ */
1324
+ type: ParseArgsOptionsType;
1325
+ /**
1326
+ * Whether this option can be provided multiple times.
1327
+ * If `true`, all values will be collected in an array.
1328
+ * If `false`, values for the option are last-wins.
1329
+ * @default false.
1330
+ */
1331
+ multiple?: boolean | undefined;
1332
+ /**
1333
+ * A single character alias for the option.
1334
+ */
1335
+ short?: string | undefined;
1336
+ /**
1337
+ * The value to assign to
1338
+ * the option if it does not appear in the arguments to be parsed. The value
1339
+ * must match the type specified by the `type` property. If `multiple` is
1340
+ * `true`, it must be an array. No default value is applied when the option
1341
+ * does appear in the arguments to be parsed, even if the provided value
1342
+ * is falsy.
1343
+ * @since v18.11.0
1344
+ */
1345
+ default?: string | boolean | string[] | boolean[] | undefined;
1346
+ }
1347
+ export interface ParseArgsOptionsConfig {
1348
+ [longOption: string]: ParseArgsOptionDescriptor;
1349
+ }
1350
+ export interface ParseArgsConfig {
1351
+ /**
1352
+ * Array of argument strings.
1353
+ */
1354
+ args?: readonly string[] | undefined;
1355
+ /**
1356
+ * Used to describe arguments known to the parser.
1357
+ */
1358
+ options?: ParseArgsOptionsConfig | undefined;
1359
+ /**
1360
+ * Should an error be thrown when unknown arguments are encountered,
1361
+ * or when arguments are passed that do not match the `type` configured in `options`.
1362
+ * @default true
1363
+ */
1364
+ strict?: boolean | undefined;
1365
+ /**
1366
+ * Whether this command accepts positional arguments.
1367
+ */
1368
+ allowPositionals?: boolean | undefined;
1369
+ /**
1370
+ * If `true`, allows explicitly setting boolean options to `false` by prefixing the option name with `--no-`.
1371
+ * @default false
1372
+ * @since v22.4.0
1373
+ */
1374
+ allowNegative?: boolean | undefined;
1375
+ /**
1376
+ * Return the parsed tokens. This is useful for extending the built-in behavior,
1377
+ * from adding additional checks through to reprocessing the tokens in different ways.
1378
+ * @default false
1379
+ */
1380
+ tokens?: boolean | undefined;
1381
+ }
1382
+ /*
1383
+ IfDefaultsTrue and IfDefaultsFalse are helpers to handle default values for missing boolean properties.
1384
+ TypeScript does not have exact types for objects: https://github.com/microsoft/TypeScript/issues/12936
1385
+ This means it is impossible to distinguish between "field X is definitely not present" and "field X may or may not be present".
1386
+ But we expect users to generally provide their config inline or `as const`, which means TS will always know whether a given field is present.
1387
+ So this helper treats "not definitely present" (i.e., not `extends boolean`) as being "definitely not present", i.e. it should have its default value.
1388
+ This is technically incorrect but is a much nicer UX for the common case.
1389
+ The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
1390
+ */
1391
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true ? IfTrue
1392
+ : T extends false ? IfFalse
1393
+ : IfTrue;
1394
+ // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
1395
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false ? IfFalse
1396
+ : T extends true ? IfTrue
1397
+ : IfFalse;
1398
+ type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionDescriptor> = IfDefaultsTrue<
1399
+ T["strict"],
1400
+ O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean,
1401
+ string | boolean
1402
+ >;
1403
+ type ApplyOptionalModifiers<O extends ParseArgsOptionsConfig, V extends Record<keyof O, unknown>> = (
1404
+ & { -readonly [LongOption in keyof O]?: V[LongOption] }
1405
+ & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] }
1406
+ ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object
1407
+ type ParsedValues<T extends ParseArgsConfig> =
1408
+ & IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
1409
+ & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers<
1410
+ T["options"],
1411
+ {
1412
+ [LongOption in keyof T["options"]]: IfDefaultsFalse<
1413
+ T["options"][LongOption]["multiple"],
1414
+ Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1415
+ ExtractOptionValue<T, T["options"][LongOption]>
1416
+ >;
1417
+ }
1418
+ >
1419
+ : {});
1420
+ type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
1421
+ T["strict"],
1422
+ IfDefaultsFalse<T["allowPositionals"], string[], []>,
1423
+ IfDefaultsTrue<T["allowPositionals"], string[], []>
1424
+ >;
1425
+ type PreciseTokenForOptions<
1426
+ K extends string,
1427
+ O extends ParseArgsOptionDescriptor,
1428
+ > = O["type"] extends "string" ? {
1429
+ kind: "option";
1430
+ index: number;
1431
+ name: K;
1432
+ rawName: string;
1433
+ value: string;
1434
+ inlineValue: boolean;
1435
+ }
1436
+ : O["type"] extends "boolean" ? {
1437
+ kind: "option";
1438
+ index: number;
1439
+ name: K;
1440
+ rawName: string;
1441
+ value: undefined;
1442
+ inlineValue: undefined;
1443
+ }
1444
+ : OptionToken & { name: K };
1445
+ type TokenForOptions<
1446
+ T extends ParseArgsConfig,
1447
+ K extends keyof T["options"] = keyof T["options"],
1448
+ > = K extends unknown
1449
+ ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions<K & string, T["options"][K]>
1450
+ : OptionToken
1451
+ : never;
1452
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T["strict"], TokenForOptions<T>, OptionToken>;
1453
+ type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
1454
+ T["strict"],
1455
+ IfDefaultsFalse<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>,
1456
+ IfDefaultsTrue<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>
1457
+ >;
1458
+ type ParsedTokens<T extends ParseArgsConfig> = Array<
1459
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: "option-terminator"; index: number }
1460
+ >;
1461
+ type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
1462
+ T["tokens"],
1463
+ {
1464
+ values: ParsedValues<T>;
1465
+ positionals: ParsedPositionals<T>;
1466
+ tokens: ParsedTokens<T>;
1467
+ },
1468
+ {
1469
+ values: ParsedValues<T>;
1470
+ positionals: ParsedPositionals<T>;
1471
+ }
1472
+ >;
1473
+ type OptionToken =
1474
+ | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
1475
+ | {
1476
+ kind: "option";
1477
+ index: number;
1478
+ name: string;
1479
+ rawName: string;
1480
+ value: undefined;
1481
+ inlineValue: undefined;
1482
+ };
1483
+ type Token =
1484
+ | OptionToken
1485
+ | { kind: "positional"; index: number; value: string }
1486
+ | { kind: "option-terminator"; index: number };
1487
+ // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
1488
+ // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
1489
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T ? {
1490
+ values: {
1491
+ [longOption: string]: undefined | string | boolean | Array<string | boolean>;
1492
+ };
1493
+ positionals: string[];
1494
+ tokens?: Token[];
1495
+ }
1496
+ : PreciseParsedResults<T>;
1497
+ /**
1498
+ * An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/).
1499
+ *
1500
+ * In accordance with browser conventions, all properties of `MIMEType` objects
1501
+ * are implemented as getters and setters on the class prototype, rather than as
1502
+ * data properties on the object itself.
1503
+ *
1504
+ * A MIME string is a structured string containing multiple meaningful
1505
+ * components. When parsed, a `MIMEType` object is returned containing
1506
+ * properties for each of these components.
1507
+ * @since v19.1.0, v18.13.0
1508
+ */
1509
+ export class MIMEType {
1510
+ /**
1511
+ * Creates a new MIMEType object by parsing the input.
1512
+ *
1513
+ * A `TypeError` will be thrown if the `input` is not a valid MIME.
1514
+ * Note that an effort will be made to coerce the given values into strings.
1515
+ * @param input The input MIME to parse.
1516
+ */
1517
+ constructor(input: string | { toString: () => string });
1518
+ /**
1519
+ * Gets and sets the type portion of the MIME.
1520
+ *
1521
+ * ```js
1522
+ * import { MIMEType } from 'node:util';
1523
+ *
1524
+ * const myMIME = new MIMEType('text/javascript');
1525
+ * console.log(myMIME.type);
1526
+ * // Prints: text
1527
+ * myMIME.type = 'application';
1528
+ * console.log(myMIME.type);
1529
+ * // Prints: application
1530
+ * console.log(String(myMIME));
1531
+ * // Prints: application/javascript
1532
+ * ```
1533
+ */
1534
+ type: string;
1535
+ /**
1536
+ * Gets and sets the subtype portion of the MIME.
1537
+ *
1538
+ * ```js
1539
+ * import { MIMEType } from 'node:util';
1540
+ *
1541
+ * const myMIME = new MIMEType('text/ecmascript');
1542
+ * console.log(myMIME.subtype);
1543
+ * // Prints: ecmascript
1544
+ * myMIME.subtype = 'javascript';
1545
+ * console.log(myMIME.subtype);
1546
+ * // Prints: javascript
1547
+ * console.log(String(myMIME));
1548
+ * // Prints: text/javascript
1549
+ * ```
1550
+ */
1551
+ subtype: string;
1552
+ /**
1553
+ * Gets the essence of the MIME. This property is read only.
1554
+ * Use `mime.type` or `mime.subtype` to alter the MIME.
1555
+ *
1556
+ * ```js
1557
+ * import { MIMEType } from 'node:util';
1558
+ *
1559
+ * const myMIME = new MIMEType('text/javascript;key=value');
1560
+ * console.log(myMIME.essence);
1561
+ * // Prints: text/javascript
1562
+ * myMIME.type = 'application';
1563
+ * console.log(myMIME.essence);
1564
+ * // Prints: application/javascript
1565
+ * console.log(String(myMIME));
1566
+ * // Prints: application/javascript;key=value
1567
+ * ```
1568
+ */
1569
+ readonly essence: string;
1570
+ /**
1571
+ * Gets the `MIMEParams` object representing the
1572
+ * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details.
1573
+ */
1574
+ readonly params: MIMEParams;
1575
+ /**
1576
+ * The `toString()` method on the `MIMEType` object returns the serialized MIME.
1577
+ *
1578
+ * Because of the need for standard compliance, this method does not allow users
1579
+ * to customize the serialization process of the MIME.
1580
+ */
1581
+ toString(): string;
1582
+ }
1583
+ /**
1584
+ * The `MIMEParams` API provides read and write access to the parameters of a `MIMEType`.
1585
+ * @since v19.1.0, v18.13.0
1586
+ */
1587
+ export class MIMEParams {
1588
+ /**
1589
+ * Remove all name-value pairs whose name is `name`.
1590
+ */
1591
+ delete(name: string): void;
1592
+ /**
1593
+ * Returns an iterator over each of the name-value pairs in the parameters.
1594
+ * Each item of the iterator is a JavaScript `Array`. The first item of the array
1595
+ * is the `name`, the second item of the array is the `value`.
1596
+ */
1597
+ entries(): NodeJS.Iterator<[name: string, value: string]>;
1598
+ /**
1599
+ * Returns the value of the first name-value pair whose name is `name`. If there
1600
+ * are no such pairs, `null` is returned.
1601
+ * @return or `null` if there is no name-value pair with the given `name`.
1602
+ */
1603
+ get(name: string): string | null;
1604
+ /**
1605
+ * Returns `true` if there is at least one name-value pair whose name is `name`.
1606
+ */
1607
+ has(name: string): boolean;
1608
+ /**
1609
+ * Returns an iterator over the names of each name-value pair.
1610
+ *
1611
+ * ```js
1612
+ * import { MIMEType } from 'node:util';
1613
+ *
1614
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1615
+ * for (const name of params.keys()) {
1616
+ * console.log(name);
1617
+ * }
1618
+ * // Prints:
1619
+ * // foo
1620
+ * // bar
1621
+ * ```
1622
+ */
1623
+ keys(): NodeJS.Iterator<string>;
1624
+ /**
1625
+ * Sets the value in the `MIMEParams` object associated with `name` to `value`. If there are any pre-existing name-value pairs whose names are `name`,
1626
+ * set the first such pair's value to `value`.
1627
+ *
1628
+ * ```js
1629
+ * import { MIMEType } from 'node:util';
1630
+ *
1631
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1632
+ * params.set('foo', 'def');
1633
+ * params.set('baz', 'xyz');
1634
+ * console.log(params.toString());
1635
+ * // Prints: foo=def;bar=1;baz=xyz
1636
+ * ```
1637
+ */
1638
+ set(name: string, value: string): void;
1639
+ /**
1640
+ * Returns an iterator over the values of each name-value pair.
1641
+ */
1642
+ values(): NodeJS.Iterator<string>;
1643
+ /**
1644
+ * Returns an iterator over each of the name-value pairs in the parameters.
1645
+ */
1646
+ [Symbol.iterator](): NodeJS.Iterator<[name: string, value: string]>;
1647
+ }
1648
+ // #region web types
1649
+ export interface TextDecodeOptions {
1650
+ stream?: boolean;
1651
+ }
1652
+ export interface TextDecoderCommon {
1653
+ readonly encoding: string;
1654
+ readonly fatal: boolean;
1655
+ readonly ignoreBOM: boolean;
1656
+ }
1657
+ export interface TextDecoderOptions {
1658
+ fatal?: boolean;
1659
+ ignoreBOM?: boolean;
1660
+ }
1661
+ export interface TextEncoderCommon {
1662
+ readonly encoding: string;
1663
+ }
1664
+ export interface TextEncoderEncodeIntoResult {
1665
+ read: number;
1666
+ written: number;
1667
+ }
1668
+ export interface TextDecoder extends TextDecoderCommon {
1669
+ decode(input?: NodeJS.AllowSharedBufferSource, options?: TextDecodeOptions): string;
1670
+ }
1671
+ export var TextDecoder: {
1672
+ prototype: TextDecoder;
1673
+ new(label?: string, options?: TextDecoderOptions): TextDecoder;
1674
+ };
1675
+ export interface TextEncoder extends TextEncoderCommon {
1676
+ encode(input?: string): NodeJS.NonSharedUint8Array;
1677
+ encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
1678
+ }
1679
+ export var TextEncoder: {
1680
+ prototype: TextEncoder;
1681
+ new(): TextEncoder;
1682
+ };
1683
+ // #endregion
1684
+ }
1685
+ declare module "util" {
1686
+ export * from "node:util";
1687
+ }