nitro-nightly 4.0.0-20251010-091516-7cafddba → 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 (252) 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/_libs/fdir.mjs +514 -0
  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/_libs/js-tokens.mjs +382 -0
  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/_libs/magic-string.mjs +939 -0
  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/_libs/rou3.mjs +311 -0
  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/_libs/tinyglobby.mjs +292 -0
  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/_libs/vite-plugin-fullstack.mjs +561 -0
  76. package/dist/_presets.mjs +1723 -0
  77. package/dist/builder.d.mts +54 -0
  78. package/dist/builder.mjs +45 -0
  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 +20 -476
  97. package/dist/node_modules/@speed-highlight/core/dist/index.js +1 -1
  98. package/dist/node_modules/@speed-highlight/core/dist/terminal.js +1 -1
  99. package/dist/node_modules/@speed-highlight/core/package.json +7 -3
  100. package/dist/node_modules/cookie-es/dist/index.mjs +262 -0
  101. package/dist/node_modules/cookie-es/package.json +37 -0
  102. package/dist/node_modules/hookable/dist/index.mjs +243 -266
  103. package/dist/node_modules/hookable/package.json +29 -26
  104. package/dist/node_modules/rendu/dist/index.mjs +380 -0
  105. package/dist/node_modules/rendu/package.json +47 -0
  106. package/dist/presets/_nitro/runtime/nitro-dev.d.mts +1 -0
  107. package/dist/presets/_nitro/runtime/nitro-dev.mjs +44 -38
  108. package/dist/presets/_nitro/runtime/nitro-prerenderer.d.mts +2 -2
  109. package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +9 -12
  110. package/dist/presets/_nitro/runtime/service-worker.d.mts +1 -0
  111. package/dist/presets/_nitro/runtime/service-worker.mjs +14 -11
  112. package/dist/presets/aws-amplify/runtime/aws-amplify.d.mts +1 -0
  113. package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +6 -5
  114. package/dist/presets/aws-lambda/runtime/_utils.d.mts +8 -13
  115. package/dist/presets/aws-lambda/runtime/_utils.mjs +95 -81
  116. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +1 -2
  117. package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +25 -27
  118. package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +7 -7
  119. package/dist/presets/azure/runtime/_utils.mjs +43 -43
  120. package/dist/presets/azure/runtime/azure-swa.d.mts +2 -2
  121. package/dist/presets/azure/runtime/azure-swa.mjs +22 -21
  122. package/dist/presets/bun/runtime/bun.d.mts +1 -0
  123. package/dist/presets/bun/runtime/bun.mjs +18 -17
  124. package/dist/presets/cloudflare/runtime/_module-handler.d.mts +10 -7
  125. package/dist/presets/cloudflare/runtime/_module-handler.mjs +79 -87
  126. package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +6 -14
  127. package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +55 -61
  128. package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +1 -7
  129. package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +12 -14
  130. package/dist/presets/cloudflare/runtime/cloudflare-pages.d.mts +12 -12
  131. package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +35 -39
  132. package/dist/presets/cloudflare/runtime/plugin.dev.d.mts +2 -2
  133. package/dist/presets/cloudflare/runtime/plugin.dev.mjs +89 -82
  134. package/dist/presets/cloudflare/runtime/shims/workers.dev.mjs +27 -0
  135. package/dist/presets/deno/runtime/deno-deploy.d.mts +1 -0
  136. package/dist/presets/deno/runtime/deno-deploy.mjs +12 -11
  137. package/dist/presets/deno/runtime/deno-server.d.mts +2 -1
  138. package/dist/presets/deno/runtime/deno-server.mjs +31 -39
  139. package/dist/presets/netlify/runtime/netlify-edge.d.mts +2 -1
  140. package/dist/presets/netlify/runtime/netlify-edge.mjs +14 -11
  141. package/dist/presets/netlify/runtime/netlify.mjs +11 -17
  142. package/dist/presets/node/runtime/node-cluster.mjs +49 -48
  143. package/dist/presets/node/runtime/node-middleware.d.mts +3 -2
  144. package/dist/presets/node/runtime/node-middleware.mjs +7 -6
  145. package/dist/presets/node/runtime/node-server.mjs +34 -24
  146. package/dist/presets/standard/runtime/server.d.mts +1 -3
  147. package/dist/presets/standard/runtime/server.mjs +1 -3
  148. package/dist/presets/stormkit/runtime/stormkit.d.mts +13 -13
  149. package/dist/presets/stormkit/runtime/stormkit.mjs +20 -20
  150. package/dist/presets/vercel/runtime/vercel.d.mts +3 -3
  151. package/dist/presets/vercel/runtime/vercel.mjs +15 -14
  152. package/dist/presets/winterjs/runtime/winterjs.d.mts +2 -0
  153. package/dist/presets/winterjs/runtime/winterjs.mjs +72 -68
  154. package/dist/presets/zeabur/runtime/zeabur.d.mts +1 -1
  155. package/dist/runtime/index.d.mts +13 -2
  156. package/dist/runtime/index.mjs +13 -8
  157. package/dist/runtime/internal/app.d.mts +3 -1
  158. package/dist/runtime/internal/app.mjs +179 -140
  159. package/dist/runtime/internal/cache.d.mts +10 -4
  160. package/dist/runtime/internal/cache.mjs +247 -216
  161. package/dist/runtime/internal/context.d.mts +9 -9
  162. package/dist/runtime/internal/context.mjs +17 -10
  163. package/dist/runtime/internal/database.mjs +8 -10
  164. package/dist/runtime/internal/error/dev.d.mts +5 -4
  165. package/dist/runtime/internal/error/dev.mjs +106 -105
  166. package/dist/runtime/internal/error/prod.d.mts +5 -4
  167. package/dist/runtime/internal/error/prod.mjs +51 -59
  168. package/dist/runtime/internal/error/utils.d.mts +4 -4
  169. package/dist/runtime/internal/error/utils.mjs +1 -1
  170. package/dist/runtime/internal/index.d.mts +2 -0
  171. package/dist/runtime/internal/index.mjs +2 -0
  172. package/dist/runtime/internal/lib/http-graceful-shutdown.d.mts +14 -14
  173. package/dist/runtime/internal/lib/http-graceful-shutdown.mjs +248 -209
  174. package/dist/runtime/internal/meta.d.mts +1 -1
  175. package/dist/runtime/internal/meta.mjs +1 -1
  176. package/dist/runtime/internal/plugin.d.mts +2 -2
  177. package/dist/runtime/internal/plugin.mjs +1 -1
  178. package/dist/runtime/internal/renderer.mjs +40 -32
  179. package/dist/runtime/internal/route-rules.d.mts +8 -8
  180. package/dist/runtime/internal/route-rules.mjs +53 -51
  181. package/dist/runtime/internal/routes/dev-tasks.d.mts +1 -2
  182. package/dist/runtime/internal/routes/dev-tasks.mjs +15 -17
  183. package/dist/runtime/internal/routes/openapi.d.mts +1 -0
  184. package/dist/runtime/internal/routes/openapi.mjs +81 -87
  185. package/dist/runtime/internal/routes/renderer-template.d.mts +1 -1
  186. package/dist/runtime/internal/routes/renderer-template.dev.d.mts +1 -2
  187. package/dist/runtime/internal/routes/renderer-template.dev.mjs +10 -17
  188. package/dist/runtime/internal/routes/renderer-template.mjs +1 -1
  189. package/dist/runtime/internal/routes/scalar.d.mts +1 -0
  190. package/dist/runtime/internal/routes/scalar.mjs +22 -23
  191. package/dist/runtime/internal/routes/swagger.d.mts +1 -0
  192. package/dist/runtime/internal/routes/swagger.mjs +9 -11
  193. package/dist/runtime/internal/runtime-config.d.mts +4 -4
  194. package/dist/runtime/internal/runtime-config.mjs +40 -35
  195. package/dist/runtime/internal/shutdown.d.mts +2 -8
  196. package/dist/runtime/internal/shutdown.mjs +32 -30
  197. package/dist/runtime/internal/static.mjs +63 -74
  198. package/dist/runtime/internal/storage.mjs +2 -2
  199. package/dist/runtime/internal/task.d.mts +6 -6
  200. package/dist/runtime/internal/task.mjs +56 -60
  201. package/dist/runtime/internal/utils.d.mts +1 -1
  202. package/dist/runtime/internal/utils.mjs +4 -10
  203. package/dist/types/index.d.mts +2594 -2286
  204. package/dist/types/index.mjs +1 -1
  205. package/dist/vite.d.mts +56 -47
  206. package/dist/vite.mjs +55 -68
  207. package/lib/index.d.mts +1 -0
  208. package/lib/index.mjs +1 -0
  209. package/lib/runtime/meta.mjs +35 -0
  210. package/package.json +49 -50
  211. package/dist/_chunks/app.mjs +0 -19797
  212. package/dist/_chunks/build.mjs +0 -84
  213. package/dist/_chunks/build2.mjs +0 -318
  214. package/dist/_chunks/build3.mjs +0 -6452
  215. package/dist/_chunks/detect-acorn.mjs +0 -503
  216. package/dist/_chunks/index.mjs +0 -22242
  217. package/dist/_chunks/index2.mjs +0 -297
  218. package/dist/_chunks/index3.mjs +0 -1058
  219. package/dist/_chunks/index4.mjs +0 -1206
  220. package/dist/_chunks/info.mjs +0 -11157
  221. package/dist/_chunks/json5.mjs +0 -68
  222. package/dist/_chunks/jsonc.mjs +0 -51
  223. package/dist/_chunks/pathe.M-eThtNZ.mjs +0 -204
  224. package/dist/_chunks/plugin.mjs +0 -960
  225. package/dist/_chunks/server.mjs +0 -254
  226. package/dist/_chunks/snapshot.mjs +0 -284
  227. package/dist/_chunks/toml.mjs +0 -259
  228. package/dist/_chunks/yaml.mjs +0 -86
  229. package/dist/cli/build.mjs +0 -54
  230. package/dist/cli/common.mjs +0 -13
  231. package/dist/cli/dev.mjs +0 -95
  232. package/dist/cli/index2.mjs +0 -17
  233. package/dist/cli/list.mjs +0 -34
  234. package/dist/cli/prepare.mjs +0 -24
  235. package/dist/cli/run.mjs +0 -60
  236. package/dist/index.d.mts +0 -52
  237. package/dist/index.mjs +0 -55
  238. package/dist/node_modules/klona/dist/index.mjs +0 -81
  239. package/dist/node_modules/klona/full/index.mjs +0 -53
  240. package/dist/node_modules/klona/package.json +0 -74
  241. package/dist/node_modules/std-env/dist/index.mjs +0 -1
  242. package/dist/node_modules/std-env/package.json +0 -46
  243. package/dist/presets.mjs +0 -2460
  244. package/dist/runtime/internal/debug.d.mts +0 -2
  245. package/dist/runtime/internal/debug.mjs +0 -5
  246. package/dist/runtime/internal/empty.d.mts +0 -0
  247. package/dist/runtime/internal/vite/dev-entry.d.mts +0 -1
  248. package/dist/runtime/internal/vite/dev-worker.d.mts +0 -1
  249. package/dist/runtime/internal/vite/prod-setup.d.mts +0 -4
  250. package/dist/runtime/internal/vite/ssr-renderer.d.mts +0 -4
  251. package/lib/runtime-meta.mjs +0 -38
  252. /package/lib/{runtime-meta.d.mts → runtime/meta.d.mts} +0 -0
@@ -0,0 +1,410 @@
1
+ import http from "node:http";
2
+ import https from "node:https";
3
+ import { EventEmitter } from "node:events";
4
+
5
+ //#region node_modules/.pnpm/httpxy@0.1.7/node_modules/httpxy/dist/index.mjs
6
+ const upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
7
+ const isSSL = /^https|wss/;
8
+ function setupOutgoing(outgoing, options, req, forward) {
9
+ outgoing.port = options[forward || "target"].port || (isSSL.test(options[forward || "target"].protocol) ? 443 : 80);
10
+ for (const e of [
11
+ "host",
12
+ "hostname",
13
+ "socketPath",
14
+ "pfx",
15
+ "key",
16
+ "passphrase",
17
+ "cert",
18
+ "ca",
19
+ "ciphers",
20
+ "secureProtocol"
21
+ ]) outgoing[e] = options[forward || "target"][e];
22
+ outgoing.method = options.method || req.method;
23
+ outgoing.headers = { ...req.headers };
24
+ if (options.headers) outgoing.headers = {
25
+ ...outgoing.headers,
26
+ ...options.headers
27
+ };
28
+ if (options.auth) outgoing.auth = options.auth;
29
+ if (options.ca) outgoing.ca = options.ca;
30
+ if (isSSL.test(options[forward || "target"].protocol)) outgoing.rejectUnauthorized = options.secure === void 0 ? true : options.secure;
31
+ outgoing.agent = options.agent || false;
32
+ outgoing.localAddress = options.localAddress;
33
+ if (!outgoing.agent) {
34
+ outgoing.headers = outgoing.headers || {};
35
+ if (typeof outgoing.headers.connection !== "string" || !upgradeHeader.test(outgoing.headers.connection)) outgoing.headers.connection = "close";
36
+ }
37
+ const target = options[forward || "target"];
38
+ const targetPath = target && options.prependPath !== false ? target.pathname || target.path || "" : "";
39
+ const parsed = new URL(req.url, "http://localhost");
40
+ let outgoingPath = options.toProxy ? req.url : parsed.pathname + parsed.search || "";
41
+ outgoingPath = options.ignorePath ? "" : outgoingPath;
42
+ outgoing.path = joinURL(targetPath, outgoingPath);
43
+ if (options.changeOrigin) outgoing.headers.host = requiresPort(outgoing.port, options[forward || "target"].protocol) && !hasPort(outgoing.host) ? outgoing.host + ":" + outgoing.port : outgoing.host;
44
+ return outgoing;
45
+ }
46
+ function joinURL(base, path) {
47
+ if (!base || base === "/") return path || "/";
48
+ if (!path || path === "/") return base || "/";
49
+ const baseHasTrailing = base[base.length - 1] === "/";
50
+ const pathHasLeading = path[0] === "/";
51
+ if (baseHasTrailing && pathHasLeading) return base + path.slice(1);
52
+ if (!baseHasTrailing && !pathHasLeading) return base + "/" + path;
53
+ return base + path;
54
+ }
55
+ function setupSocket(socket) {
56
+ socket.setTimeout(0);
57
+ socket.setNoDelay(true);
58
+ socket.setKeepAlive(true, 0);
59
+ return socket;
60
+ }
61
+ function getPort(req) {
62
+ const res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
63
+ if (res) return res[1];
64
+ return hasEncryptedConnection(req) ? "443" : "80";
65
+ }
66
+ function hasEncryptedConnection(req) {
67
+ return Boolean(req.connection.encrypted || req.connection.pair);
68
+ }
69
+ function rewriteCookieProperty(header, config, property) {
70
+ if (Array.isArray(header)) return header.map(function(headerElement) {
71
+ return rewriteCookieProperty(headerElement, config, property);
72
+ });
73
+ return header.replace(new RegExp(String.raw`(;\s*` + property + "=)([^;]+)", "i"), function(match, prefix, previousValue) {
74
+ let newValue;
75
+ if (previousValue in config) newValue = config[previousValue];
76
+ else if ("*" in config) newValue = config["*"];
77
+ else return match;
78
+ return newValue ? prefix + newValue : "";
79
+ });
80
+ }
81
+ function hasPort(host) {
82
+ return !!~host.indexOf(":");
83
+ }
84
+ function requiresPort(_port, _protocol) {
85
+ const protocol = _protocol.split(":")[0];
86
+ const port = +_port;
87
+ if (!port) return false;
88
+ switch (protocol) {
89
+ case "http":
90
+ case "ws": return port !== 80;
91
+ case "https":
92
+ case "wss": return port !== 443;
93
+ case "ftp": return port !== 21;
94
+ case "gopher": return port !== 70;
95
+ case "file": return false;
96
+ }
97
+ return port !== 0;
98
+ }
99
+ function defineProxyMiddleware(m) {
100
+ return m;
101
+ }
102
+ function defineProxyOutgoingMiddleware(m) {
103
+ return m;
104
+ }
105
+ const redirectRegex = /^201|30([1278])$/;
106
+ const webOutgoingMiddleware = [
107
+ defineProxyOutgoingMiddleware((req, res, proxyRes) => {
108
+ if (req.httpVersion === "1.0") delete proxyRes.headers["transfer-encoding"];
109
+ }),
110
+ defineProxyOutgoingMiddleware((req, res, proxyRes) => {
111
+ if (req.httpVersion === "1.0") proxyRes.headers.connection = req.headers.connection || "close";
112
+ else if (req.httpVersion !== "2.0" && !proxyRes.headers.connection) proxyRes.headers.connection = req.headers.connection || "keep-alive";
113
+ }),
114
+ defineProxyOutgoingMiddleware((req, res, proxyRes, options) => {
115
+ if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers.location && redirectRegex.test(String(proxyRes.statusCode))) {
116
+ const target = new URL(options.target);
117
+ const u = new URL(proxyRes.headers.location);
118
+ if (target.host !== u.host) return;
119
+ if (options.hostRewrite) u.host = options.hostRewrite;
120
+ else if (options.autoRewrite) u.host = req.headers.host;
121
+ if (options.protocolRewrite) u.protocol = options.protocolRewrite;
122
+ proxyRes.headers.location = u.toString();
123
+ }
124
+ }),
125
+ defineProxyOutgoingMiddleware((req, res, proxyRes, options) => {
126
+ let rewriteCookieDomainConfig = options.cookieDomainRewrite;
127
+ let rewriteCookiePathConfig = options.cookiePathRewrite;
128
+ const preserveHeaderKeyCase = options.preserveHeaderKeyCase;
129
+ let rawHeaderKeyMap;
130
+ const setHeader = function(key, header) {
131
+ if (header === void 0) return;
132
+ if (rewriteCookieDomainConfig && key.toLowerCase() === "set-cookie") header = rewriteCookieProperty(header, rewriteCookieDomainConfig, "domain");
133
+ if (rewriteCookiePathConfig && key.toLowerCase() === "set-cookie") header = rewriteCookieProperty(header, rewriteCookiePathConfig, "path");
134
+ res.setHeader(String(key).trim(), header);
135
+ };
136
+ if (typeof rewriteCookieDomainConfig === "string") rewriteCookieDomainConfig = { "*": rewriteCookieDomainConfig };
137
+ if (typeof rewriteCookiePathConfig === "string") rewriteCookiePathConfig = { "*": rewriteCookiePathConfig };
138
+ if (preserveHeaderKeyCase && proxyRes.rawHeaders !== void 0) {
139
+ rawHeaderKeyMap = {};
140
+ for (let i = 0; i < proxyRes.rawHeaders.length; i += 2) {
141
+ const key = proxyRes.rawHeaders[i];
142
+ rawHeaderKeyMap[key.toLowerCase()] = key;
143
+ }
144
+ }
145
+ for (let key of Object.keys(proxyRes.headers)) {
146
+ const header = proxyRes.headers[key];
147
+ if (preserveHeaderKeyCase && rawHeaderKeyMap) key = rawHeaderKeyMap[key] || key;
148
+ setHeader(key, header);
149
+ }
150
+ }),
151
+ defineProxyOutgoingMiddleware((req, res, proxyRes) => {
152
+ if (proxyRes.statusMessage) {
153
+ res.statusCode = proxyRes.statusCode;
154
+ res.statusMessage = proxyRes.statusMessage;
155
+ } else res.statusCode = proxyRes.statusCode;
156
+ })
157
+ ];
158
+ const nativeAgents = {
159
+ http,
160
+ https
161
+ };
162
+ const webIncomingMiddleware = [
163
+ defineProxyMiddleware((req) => {
164
+ if ((req.method === "DELETE" || req.method === "OPTIONS") && !req.headers["content-length"]) {
165
+ req.headers["content-length"] = "0";
166
+ delete req.headers["transfer-encoding"];
167
+ }
168
+ }),
169
+ defineProxyMiddleware((req, res, options) => {
170
+ if (options.timeout) req.socket.setTimeout(options.timeout);
171
+ }),
172
+ defineProxyMiddleware((req, res, options) => {
173
+ if (!options.xfwd) return;
174
+ const encrypted = req.isSpdy || hasEncryptedConnection(req);
175
+ const values = {
176
+ for: req.connection.remoteAddress || req.socket.remoteAddress,
177
+ port: getPort(req),
178
+ proto: encrypted ? "https" : "http"
179
+ };
180
+ for (const header of [
181
+ "for",
182
+ "port",
183
+ "proto"
184
+ ]) req.headers["x-forwarded-" + header] = (req.headers["x-forwarded-" + header] || "") + (req.headers["x-forwarded-" + header] ? "," : "") + values[header];
185
+ req.headers["x-forwarded-host"] = req.headers["x-forwarded-host"] || req.headers.host || "";
186
+ }),
187
+ defineProxyMiddleware((req, res, options, server, head, callback) => {
188
+ server.emit("start", req, res, options.target || options.forward);
189
+ const agents = nativeAgents;
190
+ const http$1 = agents.http;
191
+ const https$1 = agents.https;
192
+ if (options.forward) {
193
+ const forwardReq = (options.forward.protocol === "https:" ? https$1 : http$1).request(setupOutgoing(options.ssl || {}, options, req, "forward"));
194
+ const forwardError = createErrorHandler(forwardReq, options.forward);
195
+ req.on("error", forwardError);
196
+ forwardReq.on("error", forwardError);
197
+ (options.buffer || req).pipe(forwardReq);
198
+ if (!options.target) {
199
+ res.end();
200
+ return;
201
+ }
202
+ }
203
+ const proxyReq = (options.target.protocol === "https:" ? https$1 : http$1).request(setupOutgoing(options.ssl || {}, options, req));
204
+ proxyReq.on("socket", (socket) => {
205
+ if (server && !proxyReq.getHeader("expect")) server.emit("proxyReq", proxyReq, req, res, options);
206
+ });
207
+ if (options.proxyTimeout) proxyReq.setTimeout(options.proxyTimeout, function() {
208
+ proxyReq.abort();
209
+ });
210
+ req.on("aborted", function() {
211
+ proxyReq.abort();
212
+ });
213
+ const proxyError = createErrorHandler(proxyReq, options.target);
214
+ req.on("error", proxyError);
215
+ proxyReq.on("error", proxyError);
216
+ function createErrorHandler(proxyReq2, url) {
217
+ return function proxyError2(err) {
218
+ if (req.socket.destroyed && err.code === "ECONNRESET") {
219
+ server.emit("econnreset", err, req, res, url);
220
+ return proxyReq2.abort();
221
+ }
222
+ if (callback) callback(err, req, res, url);
223
+ else server.emit("error", err, req, res, url);
224
+ };
225
+ }
226
+ (options.buffer || req).pipe(proxyReq);
227
+ proxyReq.on("response", function(proxyRes) {
228
+ if (server) server.emit("proxyRes", proxyRes, req, res);
229
+ if (!res.headersSent && !options.selfHandleResponse) {
230
+ for (const pass of webOutgoingMiddleware) if (pass(req, res, proxyRes, options)) break;
231
+ }
232
+ if (res.finished) {
233
+ if (server) server.emit("end", req, res, proxyRes);
234
+ } else {
235
+ res.on("close", function() {
236
+ proxyRes.destroy();
237
+ });
238
+ proxyRes.on("end", function() {
239
+ if (server) server.emit("end", req, res, proxyRes);
240
+ });
241
+ if (!options.selfHandleResponse) proxyRes.pipe(res);
242
+ }
243
+ });
244
+ })
245
+ ];
246
+ const websocketIncomingMiddleware = [
247
+ defineProxyMiddleware((req, socket) => {
248
+ if (req.method !== "GET" || !req.headers.upgrade) {
249
+ socket.destroy();
250
+ return true;
251
+ }
252
+ if (req.headers.upgrade.toLowerCase() !== "websocket") {
253
+ socket.destroy();
254
+ return true;
255
+ }
256
+ }),
257
+ defineProxyMiddleware((req, socket, options) => {
258
+ if (!options.xfwd) return;
259
+ const values = {
260
+ for: req.connection.remoteAddress || req.socket.remoteAddress,
261
+ port: getPort(req),
262
+ proto: hasEncryptedConnection(req) ? "wss" : "ws"
263
+ };
264
+ for (const header of [
265
+ "for",
266
+ "port",
267
+ "proto"
268
+ ]) req.headers["x-forwarded-" + header] = (req.headers["x-forwarded-" + header] || "") + (req.headers["x-forwarded-" + header] ? "," : "") + values[header];
269
+ }),
270
+ defineProxyMiddleware((req, socket, options, server, head, callback) => {
271
+ const createHttpHeader = function(line, headers) {
272
+ return Object.keys(headers).reduce(function(head2, key) {
273
+ const value = headers[key];
274
+ if (!Array.isArray(value)) {
275
+ head2.push(key + ": " + value);
276
+ return head2;
277
+ }
278
+ for (const element of value) head2.push(key + ": " + element);
279
+ return head2;
280
+ }, [line]).join("\r\n") + "\r\n\r\n";
281
+ };
282
+ setupSocket(socket);
283
+ if (head && head.length > 0) socket.unshift(head);
284
+ const proxyReq = (isSSL.test(options.target.protocol) ? https : http).request(setupOutgoing(options.ssl || {}, options, req));
285
+ if (server) server.emit("proxyReqWs", proxyReq, req, socket, options, head);
286
+ proxyReq.on("error", onOutgoingError);
287
+ proxyReq.on("response", function(res) {
288
+ if (!res.upgrade) {
289
+ socket.write(createHttpHeader("HTTP/" + res.httpVersion + " " + res.statusCode + " " + res.statusMessage, res.headers));
290
+ res.pipe(socket);
291
+ }
292
+ });
293
+ proxyReq.on("upgrade", function(proxyRes, proxySocket, proxyHead) {
294
+ proxySocket.on("error", onOutgoingError);
295
+ proxySocket.on("end", function() {
296
+ server.emit("close", proxyRes, proxySocket, proxyHead);
297
+ });
298
+ socket.on("error", function() {
299
+ proxySocket.end();
300
+ });
301
+ setupSocket(proxySocket);
302
+ if (proxyHead && proxyHead.length > 0) proxySocket.unshift(proxyHead);
303
+ socket.write(createHttpHeader("HTTP/1.1 101 Switching Protocols", proxyRes.headers));
304
+ proxySocket.pipe(socket).pipe(proxySocket);
305
+ server.emit("open", proxySocket);
306
+ server.emit("proxySocket", proxySocket);
307
+ });
308
+ proxyReq.end();
309
+ function onOutgoingError(err) {
310
+ if (callback) callback(err, req, socket);
311
+ else server.emit("error", err, req, socket);
312
+ socket.end();
313
+ }
314
+ })
315
+ ];
316
+ var ProxyServer = class extends EventEmitter {
317
+ _server;
318
+ _webPasses = [...webIncomingMiddleware];
319
+ _wsPasses = [...websocketIncomingMiddleware];
320
+ options;
321
+ web;
322
+ ws;
323
+ /**
324
+ * Creates the proxy server with specified options.
325
+ * @param options - Config object passed to the proxy
326
+ */
327
+ constructor(options = {}) {
328
+ super();
329
+ this.options = options || {};
330
+ this.options.prependPath = options.prependPath !== false;
331
+ this.web = _createProxyFn("web", this);
332
+ this.ws = _createProxyFn("ws", this);
333
+ }
334
+ /**
335
+ * A function that wraps the object in a webserver, for your convenience
336
+ * @param port - Port to listen on
337
+ * @param hostname - The hostname to listen on
338
+ */
339
+ listen(port, hostname) {
340
+ const closure = (req, res) => {
341
+ this.web(req, res);
342
+ };
343
+ this._server = this.options.ssl ? https.createServer(this.options.ssl, closure) : http.createServer(closure);
344
+ if (this.options.ws) this._server.on("upgrade", (req, socket, head) => {
345
+ this._ws(req, socket, head);
346
+ });
347
+ this._server.listen(port, hostname);
348
+ return this;
349
+ }
350
+ /**
351
+ * A function that closes the inner webserver and stops listening on given port
352
+ */
353
+ close(callback) {
354
+ if (this._server) this._server.close((...args) => {
355
+ this._server = void 0;
356
+ if (callback) Reflect.apply(callback, void 0, args);
357
+ });
358
+ }
359
+ before(type, passName, pass) {
360
+ if (type !== "ws" && type !== "web") throw new Error("type must be `web` or `ws`");
361
+ const passes = type === "ws" ? this._wsPasses : this._webPasses;
362
+ let i = false;
363
+ for (const [idx, v] of passes.entries()) if (v.name === passName) i = idx;
364
+ if (i === false) throw new Error("No such pass");
365
+ passes.splice(i, 0, pass);
366
+ }
367
+ after(type, passName, pass) {
368
+ if (type !== "ws" && type !== "web") throw new Error("type must be `web` or `ws`");
369
+ const passes = type === "ws" ? this._wsPasses : this._webPasses;
370
+ let i = false;
371
+ for (const [idx, v] of passes.entries()) if (v.name === passName) i = idx;
372
+ if (i === false) throw new Error("No such pass");
373
+ passes.splice(i++, 0, pass);
374
+ }
375
+ };
376
+ function createProxyServer(options = {}) {
377
+ return new ProxyServer(options);
378
+ }
379
+ function _createProxyFn(type, server) {
380
+ return function(req, res, opts, head) {
381
+ const requestOptions = {
382
+ ...opts,
383
+ ...server.options
384
+ };
385
+ for (const key of ["target", "forward"]) if (typeof requestOptions[key] === "string") requestOptions[key] = new URL(requestOptions[key]);
386
+ if (!requestOptions.target && !requestOptions.forward) return this.emit("error", /* @__PURE__ */ new Error("Must provide a proper URL as target"));
387
+ let _resolve;
388
+ let _reject;
389
+ const callbackPromise = new Promise((resolve, reject) => {
390
+ _resolve = resolve;
391
+ _reject = reject;
392
+ });
393
+ res.on("close", () => {
394
+ _resolve();
395
+ });
396
+ res.on("error", (error) => {
397
+ _reject(error);
398
+ });
399
+ for (const pass of type === "ws" ? server._wsPasses : server._webPasses) if (pass(req, res, requestOptions, server, head, (error) => {
400
+ _reject(error);
401
+ })) {
402
+ _resolve();
403
+ break;
404
+ }
405
+ return callbackPromise;
406
+ };
407
+ }
408
+
409
+ //#endregion
410
+ export { createProxyServer as t };
@@ -0,0 +1,220 @@
1
+ import { t as __commonJS } from "../_chunks/DXMHy5ca.mjs";
2
+ import { t as require_hasown } from "./hasown.mjs";
3
+
4
+ //#region node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/core.json
5
+ var require_core = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/core.json": ((exports, module) => {
6
+ module.exports = {
7
+ "assert": true,
8
+ "node:assert": [">= 14.18 && < 15", ">= 16"],
9
+ "assert/strict": ">= 15",
10
+ "node:assert/strict": ">= 16",
11
+ "async_hooks": ">= 8",
12
+ "node:async_hooks": [">= 14.18 && < 15", ">= 16"],
13
+ "buffer_ieee754": ">= 0.5 && < 0.9.7",
14
+ "buffer": true,
15
+ "node:buffer": [">= 14.18 && < 15", ">= 16"],
16
+ "child_process": true,
17
+ "node:child_process": [">= 14.18 && < 15", ">= 16"],
18
+ "cluster": ">= 0.5",
19
+ "node:cluster": [">= 14.18 && < 15", ">= 16"],
20
+ "console": true,
21
+ "node:console": [">= 14.18 && < 15", ">= 16"],
22
+ "constants": true,
23
+ "node:constants": [">= 14.18 && < 15", ">= 16"],
24
+ "crypto": true,
25
+ "node:crypto": [">= 14.18 && < 15", ">= 16"],
26
+ "_debug_agent": ">= 1 && < 8",
27
+ "_debugger": "< 8",
28
+ "dgram": true,
29
+ "node:dgram": [">= 14.18 && < 15", ">= 16"],
30
+ "diagnostics_channel": [">= 14.17 && < 15", ">= 15.1"],
31
+ "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
32
+ "dns": true,
33
+ "node:dns": [">= 14.18 && < 15", ">= 16"],
34
+ "dns/promises": ">= 15",
35
+ "node:dns/promises": ">= 16",
36
+ "domain": ">= 0.7.12",
37
+ "node:domain": [">= 14.18 && < 15", ">= 16"],
38
+ "events": true,
39
+ "node:events": [">= 14.18 && < 15", ">= 16"],
40
+ "freelist": "< 6",
41
+ "fs": true,
42
+ "node:fs": [">= 14.18 && < 15", ">= 16"],
43
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
44
+ "node:fs/promises": [">= 14.18 && < 15", ">= 16"],
45
+ "_http_agent": ">= 0.11.1",
46
+ "node:_http_agent": [">= 14.18 && < 15", ">= 16"],
47
+ "_http_client": ">= 0.11.1",
48
+ "node:_http_client": [">= 14.18 && < 15", ">= 16"],
49
+ "_http_common": ">= 0.11.1",
50
+ "node:_http_common": [">= 14.18 && < 15", ">= 16"],
51
+ "_http_incoming": ">= 0.11.1",
52
+ "node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
53
+ "_http_outgoing": ">= 0.11.1",
54
+ "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
55
+ "_http_server": ">= 0.11.1",
56
+ "node:_http_server": [">= 14.18 && < 15", ">= 16"],
57
+ "http": true,
58
+ "node:http": [">= 14.18 && < 15", ">= 16"],
59
+ "http2": ">= 8.8",
60
+ "node:http2": [">= 14.18 && < 15", ">= 16"],
61
+ "https": true,
62
+ "node:https": [">= 14.18 && < 15", ">= 16"],
63
+ "inspector": ">= 8",
64
+ "node:inspector": [">= 14.18 && < 15", ">= 16"],
65
+ "inspector/promises": [">= 19"],
66
+ "node:inspector/promises": [">= 19"],
67
+ "_linklist": "< 8",
68
+ "module": true,
69
+ "node:module": [">= 14.18 && < 15", ">= 16"],
70
+ "net": true,
71
+ "node:net": [">= 14.18 && < 15", ">= 16"],
72
+ "node-inspect/lib/_inspect": ">= 7.6 && < 12",
73
+ "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
74
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
75
+ "os": true,
76
+ "node:os": [">= 14.18 && < 15", ">= 16"],
77
+ "path": true,
78
+ "node:path": [">= 14.18 && < 15", ">= 16"],
79
+ "path/posix": ">= 15.3",
80
+ "node:path/posix": ">= 16",
81
+ "path/win32": ">= 15.3",
82
+ "node:path/win32": ">= 16",
83
+ "perf_hooks": ">= 8.5",
84
+ "node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
85
+ "process": ">= 1",
86
+ "node:process": [">= 14.18 && < 15", ">= 16"],
87
+ "punycode": ">= 0.5",
88
+ "node:punycode": [">= 14.18 && < 15", ">= 16"],
89
+ "querystring": true,
90
+ "node:querystring": [">= 14.18 && < 15", ">= 16"],
91
+ "readline": true,
92
+ "node:readline": [">= 14.18 && < 15", ">= 16"],
93
+ "readline/promises": ">= 17",
94
+ "node:readline/promises": ">= 17",
95
+ "repl": true,
96
+ "node:repl": [">= 14.18 && < 15", ">= 16"],
97
+ "node:sea": [">= 20.12 && < 21", ">= 21.7"],
98
+ "smalloc": ">= 0.11.5 && < 3",
99
+ "node:sqlite": [">= 22.13 && < 23", ">= 23.4"],
100
+ "_stream_duplex": ">= 0.9.4",
101
+ "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
102
+ "_stream_transform": ">= 0.9.4",
103
+ "node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
104
+ "_stream_wrap": ">= 1.4.1",
105
+ "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
106
+ "_stream_passthrough": ">= 0.9.4",
107
+ "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
108
+ "_stream_readable": ">= 0.9.4",
109
+ "node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
110
+ "_stream_writable": ">= 0.9.4",
111
+ "node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
112
+ "stream": true,
113
+ "node:stream": [">= 14.18 && < 15", ">= 16"],
114
+ "stream/consumers": ">= 16.7",
115
+ "node:stream/consumers": ">= 16.7",
116
+ "stream/promises": ">= 15",
117
+ "node:stream/promises": ">= 16",
118
+ "stream/web": ">= 16.5",
119
+ "node:stream/web": ">= 16.5",
120
+ "string_decoder": true,
121
+ "node:string_decoder": [">= 14.18 && < 15", ">= 16"],
122
+ "sys": [">= 0.4 && < 0.7", ">= 0.8"],
123
+ "node:sys": [">= 14.18 && < 15", ">= 16"],
124
+ "test/reporters": ">= 19.9 && < 20.2",
125
+ "node:test/reporters": [
126
+ ">= 18.17 && < 19",
127
+ ">= 19.9",
128
+ ">= 20"
129
+ ],
130
+ "test/mock_loader": ">= 22.3 && < 22.7",
131
+ "node:test/mock_loader": ">= 22.3 && < 22.7",
132
+ "node:test": [">= 16.17 && < 17", ">= 18"],
133
+ "timers": true,
134
+ "node:timers": [">= 14.18 && < 15", ">= 16"],
135
+ "timers/promises": ">= 15",
136
+ "node:timers/promises": ">= 16",
137
+ "_tls_common": ">= 0.11.13",
138
+ "node:_tls_common": [">= 14.18 && < 15", ">= 16"],
139
+ "_tls_legacy": ">= 0.11.3 && < 10",
140
+ "_tls_wrap": ">= 0.11.3",
141
+ "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
142
+ "tls": true,
143
+ "node:tls": [">= 14.18 && < 15", ">= 16"],
144
+ "trace_events": ">= 10",
145
+ "node:trace_events": [">= 14.18 && < 15", ">= 16"],
146
+ "tty": true,
147
+ "node:tty": [">= 14.18 && < 15", ">= 16"],
148
+ "url": true,
149
+ "node:url": [">= 14.18 && < 15", ">= 16"],
150
+ "util": true,
151
+ "node:util": [">= 14.18 && < 15", ">= 16"],
152
+ "util/types": ">= 15.3",
153
+ "node:util/types": ">= 16",
154
+ "v8/tools/arguments": ">= 10 && < 12",
155
+ "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
156
+ "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
157
+ "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
158
+ "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
159
+ "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
160
+ "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
161
+ "v8": ">= 1",
162
+ "node:v8": [">= 14.18 && < 15", ">= 16"],
163
+ "vm": true,
164
+ "node:vm": [">= 14.18 && < 15", ">= 16"],
165
+ "wasi": [
166
+ ">= 13.4 && < 13.5",
167
+ ">= 18.17 && < 19",
168
+ ">= 20"
169
+ ],
170
+ "node:wasi": [">= 18.17 && < 19", ">= 20"],
171
+ "worker_threads": ">= 11.7",
172
+ "node:worker_threads": [">= 14.18 && < 15", ">= 16"],
173
+ "zlib": ">= 0.5",
174
+ "node:zlib": [">= 14.18 && < 15", ">= 16"]
175
+ };
176
+ }) });
177
+
178
+ //#endregion
179
+ //#region node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/index.js
180
+ var require_is_core_module = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/index.js": ((exports, module) => {
181
+ var hasOwn = require_hasown();
182
+ function specifierIncluded(current, specifier) {
183
+ var nodeParts = current.split(".");
184
+ var parts = specifier.split(" ");
185
+ var op = parts.length > 1 ? parts[0] : "=";
186
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split(".");
187
+ for (var i = 0; i < 3; ++i) {
188
+ var cur = parseInt(nodeParts[i] || 0, 10);
189
+ var ver = parseInt(versionParts[i] || 0, 10);
190
+ if (cur === ver) continue;
191
+ if (op === "<") return cur < ver;
192
+ if (op === ">=") return cur >= ver;
193
+ return false;
194
+ }
195
+ return op === ">=";
196
+ }
197
+ function matchesRange(current, range) {
198
+ var specifiers = range.split(/ ?&& ?/);
199
+ if (specifiers.length === 0) return false;
200
+ for (var i = 0; i < specifiers.length; ++i) if (!specifierIncluded(current, specifiers[i])) return false;
201
+ return true;
202
+ }
203
+ function versionIncluded(nodeVersion, specifierValue) {
204
+ if (typeof specifierValue === "boolean") return specifierValue;
205
+ var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion;
206
+ if (typeof current !== "string") throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required");
207
+ if (specifierValue && typeof specifierValue === "object") {
208
+ for (var i = 0; i < specifierValue.length; ++i) if (matchesRange(current, specifierValue[i])) return true;
209
+ return false;
210
+ }
211
+ return matchesRange(current, specifierValue);
212
+ }
213
+ var data = require_core();
214
+ module.exports = function isCore(x, nodeVersion) {
215
+ return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
216
+ };
217
+ }) });
218
+
219
+ //#endregion
220
+ export { require_is_core_module as t };
@@ -0,0 +1,13 @@
1
+ import { t as __commonJS } from "../_chunks/DXMHy5ca.mjs";
2
+
3
+ //#region node_modules/.pnpm/is-module@1.0.0/node_modules/is-module/index.js
4
+ var require_is_module = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/is-module@1.0.0/node_modules/is-module/index.js": ((exports, module) => {
5
+ var ES6ImportExportRegExp = /(?:^\s*|[}{\(\);,\n]\s*)(import\s+['"]|(import|module)\s+[^"'\(\)\n;]+\s+from\s+['"]|export\s+(\*|\{|default|function|var|const|let|[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*))/;
6
+ var ES6AliasRegExp = /(?:^\s*|[}{\(\);,\n]\s*)(export\s*\*\s*from\s*(?:'([^']+)'|"([^"]+)"))/;
7
+ module.exports = function(sauce) {
8
+ return ES6ImportExportRegExp.test(sauce) || ES6AliasRegExp.test(sauce);
9
+ };
10
+ }) });
11
+
12
+ //#endregion
13
+ export { require_is_module as t };
@@ -0,0 +1,32 @@
1
+ import { t as __commonJS } from "../_chunks/DXMHy5ca.mjs";
2
+
3
+ //#region node_modules/.pnpm/is-reference@1.2.1/node_modules/is-reference/dist/is-reference.js
4
+ var require_is_reference = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/is-reference@1.2.1/node_modules/is-reference/dist/is-reference.js": ((exports, module) => {
5
+ (function(global, factory) {
6
+ typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = global || self, global.isReference = factory());
7
+ })(exports, (function() {
8
+ function isReference(node, parent) {
9
+ if (node.type === "MemberExpression") return !node.computed && isReference(node.object, node);
10
+ if (node.type === "Identifier") {
11
+ if (!parent) return true;
12
+ switch (parent.type) {
13
+ case "MemberExpression": return parent.computed || node === parent.object;
14
+ case "MethodDefinition": return parent.computed;
15
+ case "FieldDefinition": return parent.computed || node === parent.value;
16
+ case "Property": return parent.computed || node === parent.value;
17
+ case "ExportSpecifier":
18
+ case "ImportSpecifier": return node === parent.local;
19
+ case "LabeledStatement":
20
+ case "BreakStatement":
21
+ case "ContinueStatement": return false;
22
+ default: return true;
23
+ }
24
+ }
25
+ return false;
26
+ }
27
+ return isReference;
28
+ }));
29
+ }) });
30
+
31
+ //#endregion
32
+ export { require_is_reference as t };