nitro-nightly 4.0.0-20251030-091344-d4418b98 → 4.0.0-20251030-121649-98b56dfe

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 (334) hide show
  1. package/dist/_build/common.mjs +763 -0
  2. package/dist/_build/rolldown.mjs +216 -0
  3. package/dist/_build/rollup.mjs +359 -0
  4. package/dist/_build/vite.build.mjs +67 -0
  5. package/dist/_build/vite.plugin.mjs +747 -0
  6. package/dist/_chunks/B-7HiF0V.mjs +1303 -0
  7. package/dist/_chunks/B3asVbT4.mjs +151 -0
  8. package/dist/_chunks/B5ooyfLk.mjs +372 -0
  9. package/dist/_chunks/DXMHy5ca.mjs +43 -0
  10. package/dist/_dev.d.mts +12 -0
  11. package/dist/_dev.mjs +675 -0
  12. package/dist/_libs/acorn.mjs +5034 -0
  13. package/dist/_libs/c12.mjs +2798 -0
  14. package/dist/_libs/chokidar.mjs +1560 -0
  15. package/dist/_libs/citty.mjs +333 -0
  16. package/dist/_libs/commondir.mjs +22 -0
  17. package/dist/_libs/compatx.mjs +46 -0
  18. package/dist/_libs/confbox.mjs +2920 -0
  19. package/dist/_libs/debug.mjs +848 -0
  20. package/dist/_libs/deepmerge.mjs +86 -0
  21. package/dist/_libs/depd.mjs +314 -0
  22. package/dist/_libs/dot-prop.mjs +138 -0
  23. package/dist/_libs/duplexer.mjs +71 -0
  24. package/dist/_libs/ee-first.mjs +68 -0
  25. package/dist/_libs/encodeurl.mjs +49 -0
  26. package/dist/_libs/escape-html.mjs +58 -0
  27. package/dist/_libs/escape-string-regexp.mjs +8 -0
  28. package/dist/_libs/estree-walker.mjs +330 -0
  29. package/dist/_libs/etag.mjs +75 -0
  30. package/dist/{_chunks/_deps → _libs}/fdir.mjs +49 -104
  31. package/dist/_libs/fresh.mjs +85 -0
  32. package/dist/_libs/function-bind.mjs +63 -0
  33. package/dist/_libs/gen-mapping.mjs +612 -0
  34. package/dist/_libs/giget.mjs +19076 -0
  35. package/dist/_libs/gzip-size.mjs +21 -0
  36. package/dist/_libs/hasown.mjs +14 -0
  37. package/dist/_libs/http-errors.mjs +436 -0
  38. package/dist/_libs/httpxy.mjs +410 -0
  39. package/dist/_libs/is-core-module.mjs +220 -0
  40. package/dist/_libs/is-module.mjs +13 -0
  41. package/dist/_libs/is-reference.mjs +32 -0
  42. package/dist/{_chunks/_deps → _libs}/js-tokens.mjs +83 -112
  43. package/dist/_libs/klona.mjs +90 -0
  44. package/dist/_libs/knitwork.mjs +124 -0
  45. package/dist/_libs/local-pkg.mjs +1686 -0
  46. package/dist/{_chunks/_deps → _libs}/magic-string.mjs +272 -629
  47. package/dist/_libs/mime-db.mjs +7642 -0
  48. package/dist/_libs/mime-types.mjs +162 -0
  49. package/dist/_libs/mime.mjs +1391 -0
  50. package/dist/_libs/node-fetch-native.mjs +173 -0
  51. package/dist/_libs/on-finished.mjs +170 -0
  52. package/dist/_libs/parseurl.mjs +103 -0
  53. package/dist/_libs/path-parse.mjs +47 -0
  54. package/dist/_libs/pathe.mjs +41 -0
  55. package/dist/_libs/picomatch.mjs +1673 -0
  56. package/dist/_libs/plugin-alias.mjs +64 -0
  57. package/dist/_libs/plugin-commonjs.mjs +1489 -0
  58. package/dist/_libs/plugin-inject.mjs +135 -0
  59. package/dist/_libs/plugin-json.mjs +36 -0
  60. package/dist/_libs/plugin-node-resolve.mjs +1553 -0
  61. package/dist/_libs/plugin-replace.mjs +104 -0
  62. package/dist/_libs/pretty-bytes.mjs +116 -0
  63. package/dist/_libs/range-parser.mjs +102 -0
  64. package/dist/_libs/remapping.mjs +117 -0
  65. package/dist/{_chunks/_deps → _libs}/rou3.mjs +7 -22
  66. package/dist/_libs/send.mjs +857 -0
  67. package/dist/_libs/serve-static.mjs +124 -0
  68. package/dist/_libs/std-env.mjs +158 -0
  69. package/dist/_libs/strip-literal.mjs +51 -0
  70. package/dist/{_chunks/_deps → _libs}/tinyglobby.mjs +32 -33
  71. package/dist/_libs/ultrahtml.mjs +138 -0
  72. package/dist/_libs/unimport.mjs +3520 -0
  73. package/dist/_libs/untyped.mjs +271 -0
  74. package/dist/_libs/unwasm.mjs +5825 -0
  75. package/dist/{_chunks/_deps/@pi0 → _libs}/vite-plugin-fullstack.mjs +28 -42
  76. package/dist/_presets.mjs +1723 -0
  77. package/dist/builder.d.mts +37 -35
  78. package/dist/builder.mjs +45 -117
  79. package/dist/cli/_chunks/build.mjs +43 -0
  80. package/dist/cli/_chunks/common.mjs +15 -0
  81. package/dist/cli/_chunks/detect-acorn.mjs +12 -0
  82. package/dist/cli/_chunks/dev.mjs +79 -0
  83. package/dist/cli/_chunks/dist.mjs +3 -0
  84. package/dist/cli/_chunks/dist2.mjs +4 -0
  85. package/dist/cli/_chunks/esm.mjs +3 -0
  86. package/dist/cli/_chunks/json5.mjs +4 -0
  87. package/dist/cli/_chunks/jsonc.mjs +4 -0
  88. package/dist/cli/_chunks/list.mjs +27 -0
  89. package/dist/cli/_chunks/multipart-parser.mjs +6 -0
  90. package/dist/cli/_chunks/prepare.mjs +19 -0
  91. package/dist/cli/_chunks/run.mjs +55 -0
  92. package/dist/cli/_chunks/task.mjs +16 -0
  93. package/dist/cli/_chunks/toml.mjs +4 -0
  94. package/dist/cli/_chunks/yaml.mjs +4 -0
  95. package/dist/cli/index.d.mts +1 -1
  96. package/dist/cli/index.mjs +19 -18
  97. package/dist/presets/_nitro/runtime/nitro-dev.d.mts +1 -0
  98. package/dist/presets/_nitro/runtime/nitro-dev.mjs +42 -33
  99. package/dist/presets/_nitro/runtime/nitro-prerenderer.d.mts +2 -2
  100. package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +4 -8
  101. package/dist/presets/_nitro/runtime/service-worker.d.mts +1 -0
  102. package/dist/presets/_nitro/runtime/service-worker.mjs +14 -11
  103. package/dist/presets/aws-amplify/runtime/aws-amplify.d.mts +1 -0
  104. package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +6 -5
  105. package/dist/presets/aws-lambda/runtime/_utils.d.mts +8 -13
  106. package/dist/presets/aws-lambda/runtime/_utils.mjs +95 -81
  107. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +1 -2
  108. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +25 -27
  109. package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +7 -7
  110. package/dist/presets/azure/runtime/_utils.mjs +43 -43
  111. package/dist/presets/azure/runtime/azure-swa.d.mts +2 -2
  112. package/dist/presets/azure/runtime/azure-swa.mjs +22 -21
  113. package/dist/presets/bun/runtime/bun.d.mts +1 -0
  114. package/dist/presets/bun/runtime/bun.mjs +18 -17
  115. package/dist/presets/cloudflare/runtime/_module-handler.d.mts +10 -7
  116. package/dist/presets/cloudflare/runtime/_module-handler.mjs +78 -87
  117. package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +6 -14
  118. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +53 -58
  119. package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +1 -7
  120. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +12 -14
  121. package/dist/presets/cloudflare/runtime/cloudflare-pages.d.mts +12 -12
  122. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +35 -39
  123. package/dist/presets/cloudflare/runtime/plugin.dev.d.mts +2 -2
  124. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +86 -76
  125. package/dist/presets/deno/runtime/deno-deploy.d.mts +1 -0
  126. package/dist/presets/deno/runtime/deno-deploy.mjs +12 -11
  127. package/dist/presets/deno/runtime/deno-server.d.mts +2 -1
  128. package/dist/presets/deno/runtime/deno-server.mjs +31 -39
  129. package/dist/presets/netlify/runtime/netlify-edge.d.mts +2 -1
  130. package/dist/presets/netlify/runtime/netlify-edge.mjs +14 -11
  131. package/dist/presets/netlify/runtime/netlify.mjs +11 -17
  132. package/dist/presets/node/runtime/node-cluster.mjs +49 -48
  133. package/dist/presets/node/runtime/node-middleware.d.mts +3 -2
  134. package/dist/presets/node/runtime/node-middleware.mjs +7 -6
  135. package/dist/presets/node/runtime/node-server.mjs +33 -23
  136. package/dist/presets/standard/runtime/server.d.mts +1 -3
  137. package/dist/presets/standard/runtime/server.mjs +1 -3
  138. package/dist/presets/stormkit/runtime/stormkit.d.mts +13 -13
  139. package/dist/presets/stormkit/runtime/stormkit.mjs +20 -20
  140. package/dist/presets/vercel/runtime/vercel.d.mts +3 -3
  141. package/dist/presets/vercel/runtime/vercel.mjs +15 -14
  142. package/dist/presets/winterjs/runtime/winterjs.d.mts +2 -0
  143. package/dist/presets/winterjs/runtime/winterjs.mjs +72 -68
  144. package/dist/presets/zeabur/runtime/zeabur.d.mts +1 -1
  145. package/dist/runtime/index.d.mts +12 -1
  146. package/dist/runtime/index.mjs +12 -7
  147. package/dist/runtime/internal/app.mjs +175 -162
  148. package/dist/runtime/internal/cache.d.mts +10 -4
  149. package/dist/runtime/internal/cache.mjs +247 -216
  150. package/dist/runtime/internal/context.d.mts +9 -9
  151. package/dist/runtime/internal/context.mjs +17 -10
  152. package/dist/runtime/internal/database.mjs +8 -10
  153. package/dist/runtime/internal/error/dev.d.mts +5 -4
  154. package/dist/runtime/internal/error/dev.mjs +106 -105
  155. package/dist/runtime/internal/error/prod.d.mts +2 -2
  156. package/dist/runtime/internal/error/prod.mjs +48 -52
  157. package/dist/runtime/internal/error/utils.d.mts +4 -4
  158. package/dist/runtime/internal/error/utils.mjs +1 -1
  159. package/dist/runtime/internal/index.d.mts +2 -0
  160. package/dist/runtime/internal/index.mjs +2 -0
  161. package/dist/runtime/internal/lib/http-graceful-shutdown.d.mts +14 -14
  162. package/dist/runtime/internal/lib/http-graceful-shutdown.mjs +248 -209
  163. package/dist/runtime/internal/meta.d.mts +1 -1
  164. package/dist/runtime/internal/meta.mjs +1 -1
  165. package/dist/runtime/internal/plugin.d.mts +2 -2
  166. package/dist/runtime/internal/plugin.mjs +1 -1
  167. package/dist/runtime/internal/renderer.mjs +39 -31
  168. package/dist/runtime/internal/route-rules.d.mts +8 -8
  169. package/dist/runtime/internal/route-rules.mjs +53 -51
  170. package/dist/runtime/internal/routes/dev-tasks.d.mts +1 -30
  171. package/dist/runtime/internal/routes/dev-tasks.mjs +15 -17
  172. package/dist/runtime/internal/routes/openapi.d.mts +1 -0
  173. package/dist/runtime/internal/routes/openapi.mjs +81 -87
  174. package/dist/runtime/internal/routes/renderer-template.d.mts +1 -1
  175. package/dist/runtime/internal/routes/renderer-template.dev.d.mts +1 -2
  176. package/dist/runtime/internal/routes/renderer-template.dev.mjs +10 -17
  177. package/dist/runtime/internal/routes/renderer-template.mjs +1 -1
  178. package/dist/runtime/internal/routes/scalar.d.mts +1 -0
  179. package/dist/runtime/internal/routes/scalar.mjs +22 -23
  180. package/dist/runtime/internal/routes/swagger.d.mts +1 -0
  181. package/dist/runtime/internal/routes/swagger.mjs +9 -11
  182. package/dist/runtime/internal/runtime-config.d.mts +4 -4
  183. package/dist/runtime/internal/runtime-config.mjs +40 -35
  184. package/dist/runtime/internal/shutdown.d.mts +2 -7
  185. package/dist/runtime/internal/shutdown.mjs +30 -29
  186. package/dist/runtime/internal/static.mjs +63 -74
  187. package/dist/runtime/internal/storage.mjs +2 -2
  188. package/dist/runtime/internal/task.d.mts +6 -6
  189. package/dist/runtime/internal/task.mjs +56 -59
  190. package/dist/runtime/internal/utils.d.mts +1 -1
  191. package/dist/runtime/internal/utils.mjs +4 -10
  192. package/dist/types/index.d.mts +2566 -3851
  193. package/dist/types/index.mjs +1 -1
  194. package/dist/vite.d.mts +56 -52
  195. package/dist/vite.mjs +55 -132
  196. package/package.json +10 -10
  197. package/dist/_build/build.mjs +0 -368
  198. package/dist/_build/build2.mjs +0 -556
  199. package/dist/_build/info.mjs +0 -1002
  200. package/dist/_build/prepare.mjs +0 -1511
  201. package/dist/_build/snapshot.mjs +0 -185
  202. package/dist/_build/vite.mjs +0 -959
  203. package/dist/_build/vite2.mjs +0 -149
  204. package/dist/_chunks/_deps/@jridgewell/gen-mapping.mjs +0 -189
  205. package/dist/_chunks/_deps/@jridgewell/remapping.mjs +0 -137
  206. package/dist/_chunks/_deps/@jridgewell/resolve-uri.mjs +0 -231
  207. package/dist/_chunks/_deps/@jridgewell/sourcemap-codec.mjs +0 -173
  208. package/dist/_chunks/_deps/@jridgewell/trace-mapping.mjs +0 -170
  209. package/dist/_chunks/_deps/@rollup/plugin-alias.mjs +0 -89
  210. package/dist/_chunks/_deps/@rollup/plugin-commonjs.mjs +0 -2376
  211. package/dist/_chunks/_deps/@rollup/plugin-inject.mjs +0 -212
  212. package/dist/_chunks/_deps/@rollup/plugin-json.mjs +0 -37
  213. package/dist/_chunks/_deps/@rollup/plugin-node-resolve.mjs +0 -1386
  214. package/dist/_chunks/_deps/@rollup/plugin-replace.mjs +0 -133
  215. package/dist/_chunks/_deps/@rollup/pluginutils.mjs +0 -346
  216. package/dist/_chunks/_deps/acorn.mjs +0 -6225
  217. package/dist/_chunks/_deps/c12.mjs +0 -510
  218. package/dist/_chunks/_deps/chokidar.mjs +0 -1428
  219. package/dist/_chunks/_deps/citty.mjs +0 -460
  220. package/dist/_chunks/_deps/commondir.mjs +0 -77
  221. package/dist/_chunks/_deps/compatx.mjs +0 -76
  222. package/dist/_chunks/_deps/confbox.mjs +0 -300
  223. package/dist/_chunks/_deps/debug.mjs +0 -885
  224. package/dist/_chunks/_deps/deepmerge.mjs +0 -147
  225. package/dist/_chunks/_deps/depd.mjs +0 -550
  226. package/dist/_chunks/_deps/dot-prop.mjs +0 -282
  227. package/dist/_chunks/_deps/dotenv.mjs +0 -555
  228. package/dist/_chunks/_deps/duplexer.mjs +0 -1
  229. package/dist/_chunks/_deps/ee-first.mjs +0 -104
  230. package/dist/_chunks/_deps/encodeurl.mjs +0 -69
  231. package/dist/_chunks/_deps/escape-html.mjs +0 -87
  232. package/dist/_chunks/_deps/escape-string-regexp.mjs +0 -13
  233. package/dist/_chunks/_deps/estree-walker.mjs +0 -433
  234. package/dist/_chunks/_deps/etag.mjs +0 -147
  235. package/dist/_chunks/_deps/exsolve.mjs +0 -1416
  236. package/dist/_chunks/_deps/fresh.mjs +0 -145
  237. package/dist/_chunks/_deps/function-bind.mjs +0 -106
  238. package/dist/_chunks/_deps/giget.mjs +0 -451
  239. package/dist/_chunks/_deps/gzip-size.mjs +0 -19
  240. package/dist/_chunks/_deps/hasown.mjs +0 -19
  241. package/dist/_chunks/_deps/http-errors.mjs +0 -307
  242. package/dist/_chunks/_deps/httpxy.mjs +0 -580
  243. package/dist/_chunks/_deps/inherits.mjs +0 -57
  244. package/dist/_chunks/_deps/is-core-module.mjs +0 -596
  245. package/dist/_chunks/_deps/is-module.mjs +0 -25
  246. package/dist/_chunks/_deps/is-reference.mjs +0 -31
  247. package/dist/_chunks/_deps/klona.mjs +0 -137
  248. package/dist/_chunks/_deps/knitwork.mjs +0 -172
  249. package/dist/_chunks/_deps/local-pkg.mjs +0 -163
  250. package/dist/_chunks/_deps/mime-db.mjs +0 -11685
  251. package/dist/_chunks/_deps/mime-types.mjs +0 -287
  252. package/dist/_chunks/_deps/mime.mjs +0 -1172
  253. package/dist/_chunks/_deps/mlly.mjs +0 -2413
  254. package/dist/_chunks/_deps/ms.mjs +0 -172
  255. package/dist/_chunks/_deps/node-fetch-native.mjs +0 -3
  256. package/dist/_chunks/_deps/nypm.mjs +0 -219
  257. package/dist/_chunks/_deps/on-finished.mjs +0 -246
  258. package/dist/_chunks/_deps/parseurl.mjs +0 -168
  259. package/dist/_chunks/_deps/path-parse.mjs +0 -85
  260. package/dist/_chunks/_deps/pathe.mjs +0 -251
  261. package/dist/_chunks/_deps/perfect-debounce.mjs +0 -88
  262. package/dist/_chunks/_deps/picomatch.mjs +0 -2144
  263. package/dist/_chunks/_deps/pkg-types.mjs +0 -247
  264. package/dist/_chunks/_deps/pretty-bytes.mjs +0 -180
  265. package/dist/_chunks/_deps/quansync.mjs +0 -99
  266. package/dist/_chunks/_deps/range-parser.mjs +0 -171
  267. package/dist/_chunks/_deps/rc9.mjs +0 -219
  268. package/dist/_chunks/_deps/readdirp.mjs +0 -245
  269. package/dist/_chunks/_deps/resolve.mjs +0 -1260
  270. package/dist/_chunks/_deps/send.mjs +0 -1022
  271. package/dist/_chunks/_deps/serve-static.mjs +0 -228
  272. package/dist/_chunks/_deps/setprototypeof.mjs +0 -26
  273. package/dist/_chunks/_deps/statuses.mjs +0 -457
  274. package/dist/_chunks/_deps/std-env.mjs +0 -3
  275. package/dist/_chunks/_deps/strip-literal.mjs +0 -67
  276. package/dist/_chunks/_deps/supports-color.mjs +0 -44
  277. package/dist/_chunks/_deps/tinyexec.mjs +0 -552
  278. package/dist/_chunks/_deps/toidentifier.mjs +0 -41
  279. package/dist/_chunks/_deps/ultrahtml.mjs +0 -3
  280. package/dist/_chunks/_deps/unimport.mjs +0 -2267
  281. package/dist/_chunks/_deps/unplugin-utils.mjs +0 -65
  282. package/dist/_chunks/_deps/unplugin.mjs +0 -1294
  283. package/dist/_chunks/_deps/untyped.mjs +0 -375
  284. package/dist/_chunks/_deps/unwasm.mjs +0 -6959
  285. package/dist/_chunks/_deps/webpack-virtual-modules.mjs +0 -360
  286. package/dist/_chunks/_presets/_all.mjs +0 -59
  287. package/dist/_chunks/_presets/_nitro.mjs +0 -74
  288. package/dist/_chunks/_presets/_resolve.mjs +0 -64
  289. package/dist/_chunks/_presets/_static.mjs +0 -69
  290. package/dist/_chunks/_presets/_types.mjs +0 -3
  291. package/dist/_chunks/_presets/_utils.mjs +0 -31
  292. package/dist/_chunks/_presets/alwaysdata.mjs +0 -17
  293. package/dist/_chunks/_presets/aws-amplify.mjs +0 -111
  294. package/dist/_chunks/_presets/aws-lambda.mjs +0 -23
  295. package/dist/_chunks/_presets/azure.mjs +0 -162
  296. package/dist/_chunks/_presets/bun.mjs +0 -19
  297. package/dist/_chunks/_presets/cleavr.mjs +0 -15
  298. package/dist/_chunks/_presets/cloudflare.mjs +0 -608
  299. package/dist/_chunks/_presets/deno.mjs +0 -196
  300. package/dist/_chunks/_presets/digitalocean.mjs +0 -14
  301. package/dist/_chunks/_presets/firebase.mjs +0 -47
  302. package/dist/_chunks/_presets/flightcontrol.mjs +0 -14
  303. package/dist/_chunks/_presets/genezio.mjs +0 -13
  304. package/dist/_chunks/_presets/heroku.mjs +0 -14
  305. package/dist/_chunks/_presets/iis.mjs +0 -194
  306. package/dist/_chunks/_presets/index.mjs +0 -62
  307. package/dist/_chunks/_presets/koyeb.mjs +0 -14
  308. package/dist/_chunks/_presets/netlify.mjs +0 -241
  309. package/dist/_chunks/_presets/node.mjs +0 -54
  310. package/dist/_chunks/_presets/platform.mjs +0 -14
  311. package/dist/_chunks/_presets/render.mjs +0 -14
  312. package/dist/_chunks/_presets/standard.mjs +0 -23
  313. package/dist/_chunks/_presets/stormkit.mjs +0 -18
  314. package/dist/_chunks/_presets/vercel.mjs +0 -375
  315. package/dist/_chunks/_presets/winterjs.mjs +0 -22
  316. package/dist/_chunks/_presets/zeabur.mjs +0 -69
  317. package/dist/_chunks/_presets/zerops.mjs +0 -27
  318. package/dist/_chunks/app.mjs +0 -600
  319. package/dist/_chunks/builder.mjs +0 -648
  320. package/dist/_chunks/server.mjs +0 -256
  321. package/dist/_cli/build.mjs +0 -49
  322. package/dist/_cli/common.mjs +0 -13
  323. package/dist/_cli/dev.mjs +0 -121
  324. package/dist/_cli/index.mjs +0 -16
  325. package/dist/_cli/list.mjs +0 -33
  326. package/dist/_cli/prepare.mjs +0 -23
  327. package/dist/_cli/run.mjs +0 -59
  328. package/dist/presets/cloudflare/runtime/shims/workers.dev.d.mts +0 -21
  329. package/dist/runtime/internal/empty.d.mts +0 -0
  330. package/dist/runtime/internal/vite/dev-entry.d.mts +0 -1
  331. package/dist/runtime/internal/vite/dev-worker.d.mts +0 -1
  332. package/dist/runtime/internal/vite/prod-setup.d.mts +0 -4
  333. package/dist/runtime/internal/vite/ssr-renderer.d.mts +0 -4
  334. /package/lib/{indexd.mts → index.d.mts} +0 -0
@@ -1,1260 +0,0 @@
1
- import { b as getAugmentedNamespace, a as getDefaultExportFromCjs } from './commondir.mjs';
2
- import V__default from 'fs';
3
- import require$$2 from 'os';
4
- import sysPath__default from 'path';
5
- import { r as requirePathParse } from './path-parse.mjs';
6
- import { r as requireIsCoreModule } from './is-core-module.mjs';
7
-
8
- var homedir;
9
- var hasRequiredHomedir;
10
-
11
- function requireHomedir () {
12
- if (hasRequiredHomedir) return homedir;
13
- hasRequiredHomedir = 1;
14
-
15
- var os = require$$2;
16
-
17
- // adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js
18
-
19
- homedir = os.homedir || function homedir() {
20
- var home = process.env.HOME;
21
- var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
22
-
23
- if (process.platform === 'win32') {
24
- return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null;
25
- }
26
-
27
- if (process.platform === 'darwin') {
28
- return home || (user ? '/Users/' + user : null);
29
- }
30
-
31
- if (process.platform === 'linux') {
32
- return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens
33
- }
34
-
35
- return home || null;
36
- };
37
- return homedir;
38
- }
39
-
40
- var caller;
41
- var hasRequiredCaller;
42
-
43
- function requireCaller () {
44
- if (hasRequiredCaller) return caller;
45
- hasRequiredCaller = 1;
46
- caller = function () {
47
- // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
48
- var origPrepareStackTrace = Error.prepareStackTrace;
49
- Error.prepareStackTrace = function (_, stack) { return stack; };
50
- var stack = (new Error()).stack;
51
- Error.prepareStackTrace = origPrepareStackTrace;
52
- return stack[2].getFileName();
53
- };
54
- return caller;
55
- }
56
-
57
- var nodeModulesPaths;
58
- var hasRequiredNodeModulesPaths;
59
-
60
- function requireNodeModulesPaths () {
61
- if (hasRequiredNodeModulesPaths) return nodeModulesPaths;
62
- hasRequiredNodeModulesPaths = 1;
63
- var path = sysPath__default;
64
- var parse = path.parse || requirePathParse(); // eslint-disable-line global-require
65
-
66
- var driveLetterRegex = /^([A-Za-z]:)/;
67
- var uncPathRegex = /^\\\\/;
68
-
69
- var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
70
- var prefix = '/';
71
- if (driveLetterRegex.test(absoluteStart)) {
72
- prefix = '';
73
- } else if (uncPathRegex.test(absoluteStart)) {
74
- prefix = '\\\\';
75
- }
76
-
77
- var paths = [absoluteStart];
78
- var parsed = parse(absoluteStart);
79
- while (parsed.dir !== paths[paths.length - 1]) {
80
- paths.push(parsed.dir);
81
- parsed = parse(parsed.dir);
82
- }
83
-
84
- return paths.reduce(function (dirs, aPath) {
85
- return dirs.concat(modules.map(function (moduleDir) {
86
- return path.resolve(prefix, aPath, moduleDir);
87
- }));
88
- }, []);
89
- };
90
-
91
- nodeModulesPaths = function nodeModulesPaths(start, opts, request) {
92
- var modules = opts && opts.moduleDirectory
93
- ? [].concat(opts.moduleDirectory)
94
- : ['node_modules'];
95
-
96
- if (opts && typeof opts.paths === 'function') {
97
- return opts.paths(
98
- request,
99
- start,
100
- function () { return getNodeModulesDirs(start, modules); },
101
- opts
102
- );
103
- }
104
-
105
- var dirs = getNodeModulesDirs(start, modules);
106
- return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
107
- };
108
- return nodeModulesPaths;
109
- }
110
-
111
- var normalizeOptions;
112
- var hasRequiredNormalizeOptions;
113
-
114
- function requireNormalizeOptions () {
115
- if (hasRequiredNormalizeOptions) return normalizeOptions;
116
- hasRequiredNormalizeOptions = 1;
117
- normalizeOptions = function (x, opts) {
118
- /**
119
- * This file is purposefully a passthrough. It's expected that third-party
120
- * environments will override it at runtime in order to inject special logic
121
- * into `resolve` (by manipulating the options). One such example is the PnP
122
- * code path in Yarn.
123
- */
124
-
125
- return opts || {};
126
- };
127
- return normalizeOptions;
128
- }
129
-
130
- var async;
131
- var hasRequiredAsync;
132
-
133
- function requireAsync () {
134
- if (hasRequiredAsync) return async;
135
- hasRequiredAsync = 1;
136
- var fs = V__default;
137
- var getHomedir = requireHomedir();
138
- var path = sysPath__default;
139
- var caller = requireCaller();
140
- var nodeModulesPaths = requireNodeModulesPaths();
141
- var normalizeOptions = requireNormalizeOptions();
142
- var isCore = /*@__PURE__*/ requireIsCoreModule();
143
-
144
- var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
145
-
146
- var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
147
- var windowsDriveRegex = /^\w:[/\\]*$/;
148
- var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
149
-
150
- var homedir = getHomedir();
151
- var defaultPaths = function () {
152
- return [
153
- path.join(homedir, '.node_modules'),
154
- path.join(homedir, '.node_libraries')
155
- ];
156
- };
157
-
158
- var defaultIsFile = function isFile(file, cb) {
159
- fs.stat(file, function (err, stat) {
160
- if (!err) {
161
- return cb(null, stat.isFile() || stat.isFIFO());
162
- }
163
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
164
- return cb(err);
165
- });
166
- };
167
-
168
- var defaultIsDir = function isDirectory(dir, cb) {
169
- fs.stat(dir, function (err, stat) {
170
- if (!err) {
171
- return cb(null, stat.isDirectory());
172
- }
173
- if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
174
- return cb(err);
175
- });
176
- };
177
-
178
- var defaultRealpath = function realpath(x, cb) {
179
- realpathFS(x, function (realpathErr, realPath) {
180
- if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);
181
- else cb(null, realpathErr ? x : realPath);
182
- });
183
- };
184
-
185
- var maybeRealpath = function maybeRealpath(realpath, x, opts, cb) {
186
- if (opts && opts.preserveSymlinks === false) {
187
- realpath(x, cb);
188
- } else {
189
- cb(null, x);
190
- }
191
- };
192
-
193
- var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) {
194
- readFile(pkgfile, function (readFileErr, body) {
195
- if (readFileErr) cb(readFileErr);
196
- else {
197
- try {
198
- var pkg = JSON.parse(body);
199
- cb(null, pkg);
200
- } catch (jsonErr) {
201
- cb(null);
202
- }
203
- }
204
- });
205
- };
206
-
207
- var getPackageCandidates = function getPackageCandidates(x, start, opts) {
208
- var dirs = nodeModulesPaths(start, opts, x);
209
- for (var i = 0; i < dirs.length; i++) {
210
- dirs[i] = path.join(dirs[i], x);
211
- }
212
- return dirs;
213
- };
214
-
215
- async = function resolve(x, options, callback) {
216
- var cb = callback;
217
- var opts = options;
218
- if (typeof options === 'function') {
219
- cb = opts;
220
- opts = {};
221
- }
222
- if (typeof x !== 'string') {
223
- var err = new TypeError('Path must be a string.');
224
- return process.nextTick(function () {
225
- cb(err);
226
- });
227
- }
228
-
229
- opts = normalizeOptions(x, opts);
230
-
231
- var isFile = opts.isFile || defaultIsFile;
232
- var isDirectory = opts.isDirectory || defaultIsDir;
233
- var readFile = opts.readFile || fs.readFile;
234
- var realpath = opts.realpath || defaultRealpath;
235
- var readPackage = opts.readPackage || defaultReadPackage;
236
- if (opts.readFile && opts.readPackage) {
237
- var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.');
238
- return process.nextTick(function () {
239
- cb(conflictErr);
240
- });
241
- }
242
- var packageIterator = opts.packageIterator;
243
-
244
- var extensions = opts.extensions || ['.js'];
245
- var includeCoreModules = opts.includeCoreModules !== false;
246
- var basedir = opts.basedir || path.dirname(caller());
247
- var parent = opts.filename || basedir;
248
-
249
- opts.paths = opts.paths || defaultPaths();
250
-
251
- // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
252
- var absoluteStart = path.resolve(basedir);
253
-
254
- maybeRealpath(
255
- realpath,
256
- absoluteStart,
257
- opts,
258
- function (err, realStart) {
259
- if (err) cb(err);
260
- else init(realStart);
261
- }
262
- );
263
-
264
- var res;
265
- function init(basedir) {
266
- if (relativePathRegex.test(x)) {
267
- res = path.resolve(basedir, x);
268
- if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
269
- if (x.slice(-1) === '/' && res === basedir) {
270
- loadAsDirectory(res, opts.package, onfile);
271
- } else loadAsFile(res, opts.package, onfile);
272
- } else if (includeCoreModules && isCore(x)) {
273
- return cb(null, x);
274
- } else loadNodeModules(x, basedir, function (err, n, pkg) {
275
- if (err) cb(err);
276
- else if (n) {
277
- return maybeRealpath(realpath, n, opts, function (err, realN) {
278
- if (err) {
279
- cb(err);
280
- } else {
281
- cb(null, realN, pkg);
282
- }
283
- });
284
- } else {
285
- var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
286
- moduleError.code = 'MODULE_NOT_FOUND';
287
- cb(moduleError);
288
- }
289
- });
290
- }
291
-
292
- function onfile(err, m, pkg) {
293
- if (err) cb(err);
294
- else if (m) cb(null, m, pkg);
295
- else loadAsDirectory(res, function (err, d, pkg) {
296
- if (err) cb(err);
297
- else if (d) {
298
- maybeRealpath(realpath, d, opts, function (err, realD) {
299
- if (err) {
300
- cb(err);
301
- } else {
302
- cb(null, realD, pkg);
303
- }
304
- });
305
- } else {
306
- var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
307
- moduleError.code = 'MODULE_NOT_FOUND';
308
- cb(moduleError);
309
- }
310
- });
311
- }
312
-
313
- function loadAsFile(x, thePackage, callback) {
314
- var loadAsFilePackage = thePackage;
315
- var cb = callback;
316
- if (typeof loadAsFilePackage === 'function') {
317
- cb = loadAsFilePackage;
318
- loadAsFilePackage = undefined;
319
- }
320
-
321
- var exts = [''].concat(extensions);
322
- load(exts, x, loadAsFilePackage);
323
-
324
- function load(exts, x, loadPackage) {
325
- if (exts.length === 0) return cb(null, undefined, loadPackage);
326
- var file = x + exts[0];
327
-
328
- var pkg = loadPackage;
329
- if (pkg) onpkg(null, pkg);
330
- else loadpkg(path.dirname(file), onpkg);
331
-
332
- function onpkg(err, pkg_, dir) {
333
- pkg = pkg_;
334
- if (err) return cb(err);
335
- if (dir && pkg && opts.pathFilter) {
336
- var rfile = path.relative(dir, file);
337
- var rel = rfile.slice(0, rfile.length - exts[0].length);
338
- var r = opts.pathFilter(pkg, x, rel);
339
- if (r) return load(
340
- [''].concat(extensions.slice()),
341
- path.resolve(dir, r),
342
- pkg
343
- );
344
- }
345
- isFile(file, onex);
346
- }
347
- function onex(err, ex) {
348
- if (err) return cb(err);
349
- if (ex) return cb(null, file, pkg);
350
- load(exts.slice(1), x, pkg);
351
- }
352
- }
353
- }
354
-
355
- function loadpkg(dir, cb) {
356
- if (dir === '' || dir === '/') return cb(null);
357
- if (process.platform === 'win32' && windowsDriveRegex.test(dir)) {
358
- return cb(null);
359
- }
360
- if (nodeModulesRegex.test(dir)) return cb(null);
361
-
362
- maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {
363
- if (unwrapErr) return loadpkg(path.dirname(dir), cb);
364
- var pkgfile = path.join(pkgdir, 'package.json');
365
- isFile(pkgfile, function (err, ex) {
366
- // on err, ex is false
367
- if (!ex) return loadpkg(path.dirname(dir), cb);
368
-
369
- readPackage(readFile, pkgfile, function (err, pkgParam) {
370
- if (err) cb(err);
371
-
372
- var pkg = pkgParam;
373
-
374
- if (pkg && opts.packageFilter) {
375
- pkg = opts.packageFilter(pkg, pkgfile);
376
- }
377
- cb(null, pkg, dir);
378
- });
379
- });
380
- });
381
- }
382
-
383
- function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
384
- var cb = callback;
385
- var fpkg = loadAsDirectoryPackage;
386
- if (typeof fpkg === 'function') {
387
- cb = fpkg;
388
- fpkg = opts.package;
389
- }
390
-
391
- maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) {
392
- if (unwrapErr) return cb(unwrapErr);
393
- var pkgfile = path.join(pkgdir, 'package.json');
394
- isFile(pkgfile, function (err, ex) {
395
- if (err) return cb(err);
396
- if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);
397
-
398
- readPackage(readFile, pkgfile, function (err, pkgParam) {
399
- if (err) return cb(err);
400
-
401
- var pkg = pkgParam;
402
-
403
- if (pkg && opts.packageFilter) {
404
- pkg = opts.packageFilter(pkg, pkgfile);
405
- }
406
-
407
- if (pkg && pkg.main) {
408
- if (typeof pkg.main !== 'string') {
409
- var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
410
- mainError.code = 'INVALID_PACKAGE_MAIN';
411
- return cb(mainError);
412
- }
413
- if (pkg.main === '.' || pkg.main === './') {
414
- pkg.main = 'index';
415
- }
416
- loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {
417
- if (err) return cb(err);
418
- if (m) return cb(null, m, pkg);
419
- if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);
420
-
421
- var dir = path.resolve(x, pkg.main);
422
- loadAsDirectory(dir, pkg, function (err, n, pkg) {
423
- if (err) return cb(err);
424
- if (n) return cb(null, n, pkg);
425
- loadAsFile(path.join(x, 'index'), pkg, cb);
426
- });
427
- });
428
- return;
429
- }
430
-
431
- loadAsFile(path.join(x, '/index'), pkg, cb);
432
- });
433
- });
434
- });
435
- }
436
-
437
- function processDirs(cb, dirs) {
438
- if (dirs.length === 0) return cb(null, undefined);
439
- var dir = dirs[0];
440
-
441
- isDirectory(path.dirname(dir), isdir);
442
-
443
- function isdir(err, isdir) {
444
- if (err) return cb(err);
445
- if (!isdir) return processDirs(cb, dirs.slice(1));
446
- loadAsFile(dir, opts.package, onfile);
447
- }
448
-
449
- function onfile(err, m, pkg) {
450
- if (err) return cb(err);
451
- if (m) return cb(null, m, pkg);
452
- loadAsDirectory(dir, opts.package, ondir);
453
- }
454
-
455
- function ondir(err, n, pkg) {
456
- if (err) return cb(err);
457
- if (n) return cb(null, n, pkg);
458
- processDirs(cb, dirs.slice(1));
459
- }
460
- }
461
- function loadNodeModules(x, start, cb) {
462
- var thunk = function () { return getPackageCandidates(x, start, opts); };
463
- processDirs(
464
- cb,
465
- packageIterator ? packageIterator(x, start, thunk, opts) : thunk()
466
- );
467
- }
468
- };
469
- return async;
470
- }
471
-
472
- const assert = true;
473
- const async_hooks = ">= 8";
474
- const buffer_ieee754 = ">= 0.5 && < 0.9.7";
475
- const buffer = true;
476
- const child_process = true;
477
- const cluster = ">= 0.5";
478
- const console = true;
479
- const constants = true;
480
- const crypto = true;
481
- const _debug_agent = ">= 1 && < 8";
482
- const _debugger = "< 8";
483
- const dgram = true;
484
- const diagnostics_channel = [
485
- ">= 14.17 && < 15",
486
- ">= 15.1"
487
- ];
488
- const dns = true;
489
- const domain = ">= 0.7.12";
490
- const events = true;
491
- const freelist = "< 6";
492
- const fs = true;
493
- const _http_agent = ">= 0.11.1";
494
- const _http_client = ">= 0.11.1";
495
- const _http_common = ">= 0.11.1";
496
- const _http_incoming = ">= 0.11.1";
497
- const _http_outgoing = ">= 0.11.1";
498
- const _http_server = ">= 0.11.1";
499
- const http = true;
500
- const http2 = ">= 8.8";
501
- const https = true;
502
- const inspector = ">= 8";
503
- const _linklist = "< 8";
504
- const module = true;
505
- const net = true;
506
- const os = true;
507
- const path = true;
508
- const perf_hooks = ">= 8.5";
509
- const process$1 = ">= 1";
510
- const punycode = ">= 0.5";
511
- const querystring = true;
512
- const readline = true;
513
- const repl = true;
514
- const smalloc = ">= 0.11.5 && < 3";
515
- const _stream_duplex = ">= 0.9.4";
516
- const _stream_transform = ">= 0.9.4";
517
- const _stream_wrap = ">= 1.4.1";
518
- const _stream_passthrough = ">= 0.9.4";
519
- const _stream_readable = ">= 0.9.4";
520
- const _stream_writable = ">= 0.9.4";
521
- const stream = true;
522
- const string_decoder = true;
523
- const sys = [
524
- ">= 0.4 && < 0.7",
525
- ">= 0.8"
526
- ];
527
- const timers = true;
528
- const _tls_common = ">= 0.11.13";
529
- const _tls_legacy = ">= 0.11.3 && < 10";
530
- const _tls_wrap = ">= 0.11.3";
531
- const tls = true;
532
- const trace_events = ">= 10";
533
- const tty = true;
534
- const url = true;
535
- const util = true;
536
- const v8 = ">= 1";
537
- const vm = true;
538
- const wasi = [
539
- ">= 13.4 && < 13.5",
540
- ">= 18.17 && < 19",
541
- ">= 20"
542
- ];
543
- const worker_threads = ">= 11.7";
544
- const zlib = ">= 0.5";
545
- const core = {
546
- assert: assert,
547
- "node:assert": [
548
- ">= 14.18 && < 15",
549
- ">= 16"
550
- ],
551
- "assert/strict": ">= 15",
552
- "node:assert/strict": ">= 16",
553
- async_hooks: async_hooks,
554
- "node:async_hooks": [
555
- ">= 14.18 && < 15",
556
- ">= 16"
557
- ],
558
- buffer_ieee754: buffer_ieee754,
559
- buffer: buffer,
560
- "node:buffer": [
561
- ">= 14.18 && < 15",
562
- ">= 16"
563
- ],
564
- child_process: child_process,
565
- "node:child_process": [
566
- ">= 14.18 && < 15",
567
- ">= 16"
568
- ],
569
- cluster: cluster,
570
- "node:cluster": [
571
- ">= 14.18 && < 15",
572
- ">= 16"
573
- ],
574
- console: console,
575
- "node:console": [
576
- ">= 14.18 && < 15",
577
- ">= 16"
578
- ],
579
- constants: constants,
580
- "node:constants": [
581
- ">= 14.18 && < 15",
582
- ">= 16"
583
- ],
584
- crypto: crypto,
585
- "node:crypto": [
586
- ">= 14.18 && < 15",
587
- ">= 16"
588
- ],
589
- _debug_agent: _debug_agent,
590
- _debugger: _debugger,
591
- dgram: dgram,
592
- "node:dgram": [
593
- ">= 14.18 && < 15",
594
- ">= 16"
595
- ],
596
- diagnostics_channel: diagnostics_channel,
597
- "node:diagnostics_channel": [
598
- ">= 14.18 && < 15",
599
- ">= 16"
600
- ],
601
- dns: dns,
602
- "node:dns": [
603
- ">= 14.18 && < 15",
604
- ">= 16"
605
- ],
606
- "dns/promises": ">= 15",
607
- "node:dns/promises": ">= 16",
608
- domain: domain,
609
- "node:domain": [
610
- ">= 14.18 && < 15",
611
- ">= 16"
612
- ],
613
- events: events,
614
- "node:events": [
615
- ">= 14.18 && < 15",
616
- ">= 16"
617
- ],
618
- freelist: freelist,
619
- fs: fs,
620
- "node:fs": [
621
- ">= 14.18 && < 15",
622
- ">= 16"
623
- ],
624
- "fs/promises": [
625
- ">= 10 && < 10.1",
626
- ">= 14"
627
- ],
628
- "node:fs/promises": [
629
- ">= 14.18 && < 15",
630
- ">= 16"
631
- ],
632
- _http_agent: _http_agent,
633
- "node:_http_agent": [
634
- ">= 14.18 && < 15",
635
- ">= 16"
636
- ],
637
- _http_client: _http_client,
638
- "node:_http_client": [
639
- ">= 14.18 && < 15",
640
- ">= 16"
641
- ],
642
- _http_common: _http_common,
643
- "node:_http_common": [
644
- ">= 14.18 && < 15",
645
- ">= 16"
646
- ],
647
- _http_incoming: _http_incoming,
648
- "node:_http_incoming": [
649
- ">= 14.18 && < 15",
650
- ">= 16"
651
- ],
652
- _http_outgoing: _http_outgoing,
653
- "node:_http_outgoing": [
654
- ">= 14.18 && < 15",
655
- ">= 16"
656
- ],
657
- _http_server: _http_server,
658
- "node:_http_server": [
659
- ">= 14.18 && < 15",
660
- ">= 16"
661
- ],
662
- http: http,
663
- "node:http": [
664
- ">= 14.18 && < 15",
665
- ">= 16"
666
- ],
667
- http2: http2,
668
- "node:http2": [
669
- ">= 14.18 && < 15",
670
- ">= 16"
671
- ],
672
- https: https,
673
- "node:https": [
674
- ">= 14.18 && < 15",
675
- ">= 16"
676
- ],
677
- inspector: inspector,
678
- "node:inspector": [
679
- ">= 14.18 && < 15",
680
- ">= 16"
681
- ],
682
- "inspector/promises": [
683
- ">= 19"
684
- ],
685
- "node:inspector/promises": [
686
- ">= 19"
687
- ],
688
- _linklist: _linklist,
689
- module: module,
690
- "node:module": [
691
- ">= 14.18 && < 15",
692
- ">= 16"
693
- ],
694
- net: net,
695
- "node:net": [
696
- ">= 14.18 && < 15",
697
- ">= 16"
698
- ],
699
- "node-inspect/lib/_inspect": ">= 7.6 && < 12",
700
- "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
701
- "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
702
- os: os,
703
- "node:os": [
704
- ">= 14.18 && < 15",
705
- ">= 16"
706
- ],
707
- path: path,
708
- "node:path": [
709
- ">= 14.18 && < 15",
710
- ">= 16"
711
- ],
712
- "path/posix": ">= 15.3",
713
- "node:path/posix": ">= 16",
714
- "path/win32": ">= 15.3",
715
- "node:path/win32": ">= 16",
716
- perf_hooks: perf_hooks,
717
- "node:perf_hooks": [
718
- ">= 14.18 && < 15",
719
- ">= 16"
720
- ],
721
- process: process$1,
722
- "node:process": [
723
- ">= 14.18 && < 15",
724
- ">= 16"
725
- ],
726
- punycode: punycode,
727
- "node:punycode": [
728
- ">= 14.18 && < 15",
729
- ">= 16"
730
- ],
731
- querystring: querystring,
732
- "node:querystring": [
733
- ">= 14.18 && < 15",
734
- ">= 16"
735
- ],
736
- readline: readline,
737
- "node:readline": [
738
- ">= 14.18 && < 15",
739
- ">= 16"
740
- ],
741
- "readline/promises": ">= 17",
742
- "node:readline/promises": ">= 17",
743
- repl: repl,
744
- "node:repl": [
745
- ">= 14.18 && < 15",
746
- ">= 16"
747
- ],
748
- "node:sea": [
749
- ">= 20.12 && < 21",
750
- ">= 21.7"
751
- ],
752
- smalloc: smalloc,
753
- "node:sqlite": [
754
- ">= 22.13 && < 23",
755
- ">= 23.4"
756
- ],
757
- _stream_duplex: _stream_duplex,
758
- "node:_stream_duplex": [
759
- ">= 14.18 && < 15",
760
- ">= 16"
761
- ],
762
- _stream_transform: _stream_transform,
763
- "node:_stream_transform": [
764
- ">= 14.18 && < 15",
765
- ">= 16"
766
- ],
767
- _stream_wrap: _stream_wrap,
768
- "node:_stream_wrap": [
769
- ">= 14.18 && < 15",
770
- ">= 16"
771
- ],
772
- _stream_passthrough: _stream_passthrough,
773
- "node:_stream_passthrough": [
774
- ">= 14.18 && < 15",
775
- ">= 16"
776
- ],
777
- _stream_readable: _stream_readable,
778
- "node:_stream_readable": [
779
- ">= 14.18 && < 15",
780
- ">= 16"
781
- ],
782
- _stream_writable: _stream_writable,
783
- "node:_stream_writable": [
784
- ">= 14.18 && < 15",
785
- ">= 16"
786
- ],
787
- stream: stream,
788
- "node:stream": [
789
- ">= 14.18 && < 15",
790
- ">= 16"
791
- ],
792
- "stream/consumers": ">= 16.7",
793
- "node:stream/consumers": ">= 16.7",
794
- "stream/promises": ">= 15",
795
- "node:stream/promises": ">= 16",
796
- "stream/web": ">= 16.5",
797
- "node:stream/web": ">= 16.5",
798
- string_decoder: string_decoder,
799
- "node:string_decoder": [
800
- ">= 14.18 && < 15",
801
- ">= 16"
802
- ],
803
- sys: sys,
804
- "node:sys": [
805
- ">= 14.18 && < 15",
806
- ">= 16"
807
- ],
808
- "test/reporters": ">= 19.9 && < 20.2",
809
- "node:test/reporters": [
810
- ">= 18.17 && < 19",
811
- ">= 19.9",
812
- ">= 20"
813
- ],
814
- "test/mock_loader": ">= 22.3 && < 22.7",
815
- "node:test/mock_loader": ">= 22.3 && < 22.7",
816
- "node:test": [
817
- ">= 16.17 && < 17",
818
- ">= 18"
819
- ],
820
- timers: timers,
821
- "node:timers": [
822
- ">= 14.18 && < 15",
823
- ">= 16"
824
- ],
825
- "timers/promises": ">= 15",
826
- "node:timers/promises": ">= 16",
827
- _tls_common: _tls_common,
828
- "node:_tls_common": [
829
- ">= 14.18 && < 15",
830
- ">= 16"
831
- ],
832
- _tls_legacy: _tls_legacy,
833
- _tls_wrap: _tls_wrap,
834
- "node:_tls_wrap": [
835
- ">= 14.18 && < 15",
836
- ">= 16"
837
- ],
838
- tls: tls,
839
- "node:tls": [
840
- ">= 14.18 && < 15",
841
- ">= 16"
842
- ],
843
- trace_events: trace_events,
844
- "node:trace_events": [
845
- ">= 14.18 && < 15",
846
- ">= 16"
847
- ],
848
- tty: tty,
849
- "node:tty": [
850
- ">= 14.18 && < 15",
851
- ">= 16"
852
- ],
853
- url: url,
854
- "node:url": [
855
- ">= 14.18 && < 15",
856
- ">= 16"
857
- ],
858
- util: util,
859
- "node:util": [
860
- ">= 14.18 && < 15",
861
- ">= 16"
862
- ],
863
- "util/types": ">= 15.3",
864
- "node:util/types": ">= 16",
865
- "v8/tools/arguments": ">= 10 && < 12",
866
- "v8/tools/codemap": [
867
- ">= 4.4 && < 5",
868
- ">= 5.2 && < 12"
869
- ],
870
- "v8/tools/consarray": [
871
- ">= 4.4 && < 5",
872
- ">= 5.2 && < 12"
873
- ],
874
- "v8/tools/csvparser": [
875
- ">= 4.4 && < 5",
876
- ">= 5.2 && < 12"
877
- ],
878
- "v8/tools/logreader": [
879
- ">= 4.4 && < 5",
880
- ">= 5.2 && < 12"
881
- ],
882
- "v8/tools/profile_view": [
883
- ">= 4.4 && < 5",
884
- ">= 5.2 && < 12"
885
- ],
886
- "v8/tools/splaytree": [
887
- ">= 4.4 && < 5",
888
- ">= 5.2 && < 12"
889
- ],
890
- v8: v8,
891
- "node:v8": [
892
- ">= 14.18 && < 15",
893
- ">= 16"
894
- ],
895
- vm: vm,
896
- "node:vm": [
897
- ">= 14.18 && < 15",
898
- ">= 16"
899
- ],
900
- wasi: wasi,
901
- "node:wasi": [
902
- ">= 18.17 && < 19",
903
- ">= 20"
904
- ],
905
- worker_threads: worker_threads,
906
- "node:worker_threads": [
907
- ">= 14.18 && < 15",
908
- ">= 16"
909
- ],
910
- zlib: zlib,
911
- "node:zlib": [
912
- ">= 14.18 && < 15",
913
- ">= 16"
914
- ]
915
- };
916
-
917
- const core$1 = {
918
- __proto__: null,
919
- _debug_agent: _debug_agent,
920
- _debugger: _debugger,
921
- _http_agent: _http_agent,
922
- _http_client: _http_client,
923
- _http_common: _http_common,
924
- _http_incoming: _http_incoming,
925
- _http_outgoing: _http_outgoing,
926
- _http_server: _http_server,
927
- _linklist: _linklist,
928
- _stream_duplex: _stream_duplex,
929
- _stream_passthrough: _stream_passthrough,
930
- _stream_readable: _stream_readable,
931
- _stream_transform: _stream_transform,
932
- _stream_wrap: _stream_wrap,
933
- _stream_writable: _stream_writable,
934
- _tls_common: _tls_common,
935
- _tls_legacy: _tls_legacy,
936
- _tls_wrap: _tls_wrap,
937
- assert: assert,
938
- async_hooks: async_hooks,
939
- buffer: buffer,
940
- buffer_ieee754: buffer_ieee754,
941
- child_process: child_process,
942
- cluster: cluster,
943
- console: console,
944
- constants: constants,
945
- crypto: crypto,
946
- default: core,
947
- dgram: dgram,
948
- diagnostics_channel: diagnostics_channel,
949
- dns: dns,
950
- domain: domain,
951
- events: events,
952
- freelist: freelist,
953
- fs: fs,
954
- http: http,
955
- http2: http2,
956
- https: https,
957
- inspector: inspector,
958
- module: module,
959
- net: net,
960
- os: os,
961
- path: path,
962
- perf_hooks: perf_hooks,
963
- process: process$1,
964
- punycode: punycode,
965
- querystring: querystring,
966
- readline: readline,
967
- repl: repl,
968
- smalloc: smalloc,
969
- stream: stream,
970
- string_decoder: string_decoder,
971
- sys: sys,
972
- timers: timers,
973
- tls: tls,
974
- trace_events: trace_events,
975
- tty: tty,
976
- url: url,
977
- util: util,
978
- v8: v8,
979
- vm: vm,
980
- wasi: wasi,
981
- worker_threads: worker_threads,
982
- zlib: zlib
983
- };
984
-
985
- const require$$1 = /*@__PURE__*/getAugmentedNamespace(core$1);
986
-
987
- var core_1;
988
- var hasRequiredCore;
989
-
990
- function requireCore () {
991
- if (hasRequiredCore) return core_1;
992
- hasRequiredCore = 1;
993
-
994
- var isCoreModule = /*@__PURE__*/ requireIsCoreModule();
995
- var data = require$$1;
996
-
997
- var core = {};
998
- for (var mod in data) { // eslint-disable-line no-restricted-syntax
999
- if (Object.prototype.hasOwnProperty.call(data, mod)) {
1000
- core[mod] = isCoreModule(mod);
1001
- }
1002
- }
1003
- core_1 = core;
1004
- return core_1;
1005
- }
1006
-
1007
- var isCore;
1008
- var hasRequiredIsCore;
1009
-
1010
- function requireIsCore () {
1011
- if (hasRequiredIsCore) return isCore;
1012
- hasRequiredIsCore = 1;
1013
- var isCoreModule = /*@__PURE__*/ requireIsCoreModule();
1014
-
1015
- isCore = function isCore(x) {
1016
- return isCoreModule(x);
1017
- };
1018
- return isCore;
1019
- }
1020
-
1021
- var sync;
1022
- var hasRequiredSync;
1023
-
1024
- function requireSync () {
1025
- if (hasRequiredSync) return sync;
1026
- hasRequiredSync = 1;
1027
- var isCore = /*@__PURE__*/ requireIsCoreModule();
1028
- var fs = V__default;
1029
- var path = sysPath__default;
1030
- var getHomedir = requireHomedir();
1031
- var caller = requireCaller();
1032
- var nodeModulesPaths = requireNodeModulesPaths();
1033
- var normalizeOptions = requireNormalizeOptions();
1034
-
1035
- var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
1036
-
1037
- var relativePathRegex = /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/;
1038
- var windowsDriveRegex = /^\w:[/\\]*$/;
1039
- var nodeModulesRegex = /[/\\]node_modules[/\\]*$/;
1040
-
1041
- var homedir = getHomedir();
1042
- var defaultPaths = function () {
1043
- return [
1044
- path.join(homedir, '.node_modules'),
1045
- path.join(homedir, '.node_libraries')
1046
- ];
1047
- };
1048
-
1049
- var defaultIsFile = function isFile(file) {
1050
- try {
1051
- var stat = fs.statSync(file, { throwIfNoEntry: false });
1052
- } catch (e) {
1053
- if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
1054
- throw e;
1055
- }
1056
- return !!stat && (stat.isFile() || stat.isFIFO());
1057
- };
1058
-
1059
- var defaultIsDir = function isDirectory(dir) {
1060
- try {
1061
- var stat = fs.statSync(dir, { throwIfNoEntry: false });
1062
- } catch (e) {
1063
- if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
1064
- throw e;
1065
- }
1066
- return !!stat && stat.isDirectory();
1067
- };
1068
-
1069
- var defaultRealpathSync = function realpathSync(x) {
1070
- try {
1071
- return realpathFS(x);
1072
- } catch (realpathErr) {
1073
- if (realpathErr.code !== 'ENOENT') {
1074
- throw realpathErr;
1075
- }
1076
- }
1077
- return x;
1078
- };
1079
-
1080
- var maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) {
1081
- if (opts && opts.preserveSymlinks === false) {
1082
- return realpathSync(x);
1083
- }
1084
- return x;
1085
- };
1086
-
1087
- var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) {
1088
- var body = readFileSync(pkgfile);
1089
- try {
1090
- var pkg = JSON.parse(body);
1091
- return pkg;
1092
- } catch (jsonErr) {}
1093
- };
1094
-
1095
- var getPackageCandidates = function getPackageCandidates(x, start, opts) {
1096
- var dirs = nodeModulesPaths(start, opts, x);
1097
- for (var i = 0; i < dirs.length; i++) {
1098
- dirs[i] = path.join(dirs[i], x);
1099
- }
1100
- return dirs;
1101
- };
1102
-
1103
- sync = function resolveSync(x, options) {
1104
- if (typeof x !== 'string') {
1105
- throw new TypeError('Path must be a string.');
1106
- }
1107
- var opts = normalizeOptions(x, options);
1108
-
1109
- var isFile = opts.isFile || defaultIsFile;
1110
- var readFileSync = opts.readFileSync || fs.readFileSync;
1111
- var isDirectory = opts.isDirectory || defaultIsDir;
1112
- var realpathSync = opts.realpathSync || defaultRealpathSync;
1113
- var readPackageSync = opts.readPackageSync || defaultReadPackageSync;
1114
- if (opts.readFileSync && opts.readPackageSync) {
1115
- throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.');
1116
- }
1117
- var packageIterator = opts.packageIterator;
1118
-
1119
- var extensions = opts.extensions || ['.js'];
1120
- var includeCoreModules = opts.includeCoreModules !== false;
1121
- var basedir = opts.basedir || path.dirname(caller());
1122
- var parent = opts.filename || basedir;
1123
-
1124
- opts.paths = opts.paths || defaultPaths();
1125
-
1126
- // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
1127
- var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
1128
-
1129
- if (relativePathRegex.test(x)) {
1130
- var res = path.resolve(absoluteStart, x);
1131
- if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
1132
- var m = loadAsFileSync(res) || loadAsDirectorySync(res);
1133
- if (m) return maybeRealpathSync(realpathSync, m, opts);
1134
- } else if (includeCoreModules && isCore(x)) {
1135
- return x;
1136
- } else {
1137
- var n = loadNodeModulesSync(x, absoluteStart);
1138
- if (n) return maybeRealpathSync(realpathSync, n, opts);
1139
- }
1140
-
1141
- var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
1142
- err.code = 'MODULE_NOT_FOUND';
1143
- throw err;
1144
-
1145
- function loadAsFileSync(x) {
1146
- var pkg = loadpkg(path.dirname(x));
1147
-
1148
- if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
1149
- var rfile = path.relative(pkg.dir, x);
1150
- var r = opts.pathFilter(pkg.pkg, x, rfile);
1151
- if (r) {
1152
- x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
1153
- }
1154
- }
1155
-
1156
- if (isFile(x)) {
1157
- return x;
1158
- }
1159
-
1160
- for (var i = 0; i < extensions.length; i++) {
1161
- var file = x + extensions[i];
1162
- if (isFile(file)) {
1163
- return file;
1164
- }
1165
- }
1166
- }
1167
-
1168
- function loadpkg(dir) {
1169
- if (dir === '' || dir === '/') return;
1170
- if (process.platform === 'win32' && windowsDriveRegex.test(dir)) {
1171
- return;
1172
- }
1173
- if (nodeModulesRegex.test(dir)) return;
1174
-
1175
- var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');
1176
-
1177
- if (!isFile(pkgfile)) {
1178
- return loadpkg(path.dirname(dir));
1179
- }
1180
-
1181
- var pkg = readPackageSync(readFileSync, pkgfile);
1182
-
1183
- if (pkg && opts.packageFilter) {
1184
- // v2 will pass pkgfile
1185
- pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment
1186
- }
1187
-
1188
- return { pkg: pkg, dir: dir };
1189
- }
1190
-
1191
- function loadAsDirectorySync(x) {
1192
- var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');
1193
- if (isFile(pkgfile)) {
1194
- try {
1195
- var pkg = readPackageSync(readFileSync, pkgfile);
1196
- } catch (e) {}
1197
-
1198
- if (pkg && opts.packageFilter) {
1199
- // v2 will pass pkgfile
1200
- pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment
1201
- }
1202
-
1203
- if (pkg && pkg.main) {
1204
- if (typeof pkg.main !== 'string') {
1205
- var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
1206
- mainError.code = 'INVALID_PACKAGE_MAIN';
1207
- throw mainError;
1208
- }
1209
- if (pkg.main === '.' || pkg.main === './') {
1210
- pkg.main = 'index';
1211
- }
1212
- try {
1213
- var m = loadAsFileSync(path.resolve(x, pkg.main));
1214
- if (m) return m;
1215
- var n = loadAsDirectorySync(path.resolve(x, pkg.main));
1216
- if (n) return n;
1217
- } catch (e) {}
1218
- }
1219
- }
1220
-
1221
- return loadAsFileSync(path.join(x, '/index'));
1222
- }
1223
-
1224
- function loadNodeModulesSync(x, start) {
1225
- var thunk = function () { return getPackageCandidates(x, start, opts); };
1226
- var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
1227
-
1228
- for (var i = 0; i < dirs.length; i++) {
1229
- var dir = dirs[i];
1230
- if (isDirectory(path.dirname(dir))) {
1231
- var m = loadAsFileSync(dir);
1232
- if (m) return m;
1233
- var n = loadAsDirectorySync(dir);
1234
- if (n) return n;
1235
- }
1236
- }
1237
- }
1238
- };
1239
- return sync;
1240
- }
1241
-
1242
- var resolve;
1243
- var hasRequiredResolve;
1244
-
1245
- function requireResolve () {
1246
- if (hasRequiredResolve) return resolve;
1247
- hasRequiredResolve = 1;
1248
- var async = requireAsync();
1249
- async.core = requireCore();
1250
- async.isCore = requireIsCore();
1251
- async.sync = requireSync();
1252
-
1253
- resolve = async;
1254
- return resolve;
1255
- }
1256
-
1257
- var resolveExports = requireResolve();
1258
- const resolve$1 = /*@__PURE__*/getDefaultExportFromCjs(resolveExports);
1259
-
1260
- export { resolve$1 as r };