@kasperpeulen/vitest-plugin-nextjs 0.0.0-stage → 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/README.md +249 -2
  2. package/dist/_virtual/_rolldown/runtime.js +14 -0
  3. package/dist/action-ids.d.ts +18 -0
  4. package/dist/action-ids.js +44 -0
  5. package/dist/adapter.d.ts +8 -0
  6. package/dist/adapter.js +12 -0
  7. package/dist/app-requests.d.ts +63 -0
  8. package/dist/app-requests.js +253 -0
  9. package/dist/browser-context.d.ts +24 -0
  10. package/dist/browser-context.js +157 -0
  11. package/dist/build-output.d.ts +68 -0
  12. package/dist/build-output.js +216 -0
  13. package/dist/build.d.ts +26 -0
  14. package/dist/build.js +39 -0
  15. package/dist/built-files.d.ts +9 -0
  16. package/dist/built-files.js +22 -0
  17. package/dist/cache.d.ts +44 -0
  18. package/dist/cache.js +99 -0
  19. package/dist/client-components.d.ts +3 -0
  20. package/dist/client-components.js +4 -0
  21. package/dist/client-file-key.d.ts +5 -0
  22. package/dist/client-file-key.js +5 -0
  23. package/dist/client-files.d.ts +83 -0
  24. package/dist/client-files.js +186 -0
  25. package/dist/client-graph.d.ts +94 -0
  26. package/dist/client-graph.js +266 -0
  27. package/dist/client-modules.d.ts +10 -0
  28. package/dist/client-modules.js +43 -0
  29. package/dist/client.d.ts +42 -0
  30. package/dist/client.js +263 -0
  31. package/dist/commonjs.d.ts +44 -0
  32. package/dist/commonjs.js +111 -0
  33. package/dist/compat/browser/client.d.ts +19 -0
  34. package/dist/compat/browser/client.js +13 -0
  35. package/dist/compat/build.d.ts +145 -0
  36. package/dist/compat/build.js +149 -0
  37. package/dist/compat/checks.d.ts +16 -0
  38. package/dist/compat/checks.js +148 -0
  39. package/dist/compat/patches.d.ts +13 -0
  40. package/dist/compat/patches.js +30 -0
  41. package/dist/compat/paths.d.ts +74 -0
  42. package/dist/compat/paths.js +160 -0
  43. package/dist/compat/rsc/handlers.d.ts +2 -0
  44. package/dist/compat/rsc/handlers.js +2 -0
  45. package/dist/compat/rsc/prerender.d.ts +10 -0
  46. package/dist/compat/rsc/prerender.js +9 -0
  47. package/dist/compat/server/headers.d.ts +3 -0
  48. package/dist/compat/server/headers.js +3 -0
  49. package/dist/compat/ssr/build-output.d.ts +4 -0
  50. package/dist/compat/ssr/build-output.js +3 -0
  51. package/dist/compat/ssr/cache.d.ts +6 -0
  52. package/dist/compat/ssr/cache.js +6 -0
  53. package/dist/compat/ssr/handler.d.ts +8 -0
  54. package/dist/compat/ssr/handler.js +8 -0
  55. package/dist/compat/ssr/node-server.d.ts +5 -0
  56. package/dist/compat/ssr/node-server.js +4 -0
  57. package/dist/compat/ssr/render-errors.d.ts +4 -0
  58. package/dist/compat/ssr/render-errors.js +4 -0
  59. package/dist/compat/ssr/senders.d.ts +6 -0
  60. package/dist/compat/ssr/senders.js +6 -0
  61. package/dist/compat/types.d.ts +8 -0
  62. package/dist/compat/types.js +1 -0
  63. package/dist/compile.d.ts +31 -0
  64. package/dist/compile.js +140 -0
  65. package/dist/disk.d.ts +16 -0
  66. package/dist/disk.js +13 -0
  67. package/dist/document-loads.d.ts +15 -0
  68. package/dist/document-loads.js +53 -0
  69. package/dist/document.d.ts +79 -0
  70. package/dist/document.js +328 -0
  71. package/dist/downloads.d.ts +15 -0
  72. package/dist/downloads.js +71 -0
  73. package/dist/esm-require.d.ts +11 -0
  74. package/dist/esm-require.js +32 -0
  75. package/dist/fast-crypto/index.js +1093 -0
  76. package/dist/fast-crypto.d.ts +20 -0
  77. package/dist/fast-crypto.js +151 -0
  78. package/dist/flight.d.ts +19 -0
  79. package/dist/flight.js +42 -0
  80. package/dist/form-submission.d.ts +15 -0
  81. package/dist/form-submission.js +27 -0
  82. package/dist/from-page.d.ts +5 -0
  83. package/dist/from-page.js +44 -0
  84. package/dist/globals.d.ts +1 -0
  85. package/dist/globals.js +197 -0
  86. package/dist/host-document.d.ts +26 -0
  87. package/dist/host-document.js +34 -0
  88. package/dist/index.d.ts +280 -0
  89. package/dist/index.js +281 -0
  90. package/dist/internal.d.ts +2 -0
  91. package/dist/internal.js +3 -0
  92. package/dist/leftovers.d.ts +11 -0
  93. package/dist/leftovers.js +55 -0
  94. package/dist/mode.d.ts +169 -0
  95. package/dist/mode.js +31 -0
  96. package/dist/node/LICENSES.md +3540 -0
  97. package/dist/node/assert/strict.js +29 -0
  98. package/dist/node/assert.js +3044 -0
  99. package/dist/node/buffer.js +1499 -0
  100. package/dist/node/child_process.js +45 -0
  101. package/dist/node/cluster.js +85 -0
  102. package/dist/node/console.js +96 -0
  103. package/dist/node/constants.js +495 -0
  104. package/dist/node/crypto.js +1388 -0
  105. package/dist/node/dgram.js +78 -0
  106. package/dist/node/diagnostics_channel.js +122 -0
  107. package/dist/node/dns/promises.js +129 -0
  108. package/dist/node/dns.js +137 -0
  109. package/dist/node/domain.js +43 -0
  110. package/dist/node/events.js +1155 -0
  111. package/dist/node/fs/promises.js +40 -0
  112. package/dist/node/fs.js +10375 -0
  113. package/dist/node/http.js +326 -0
  114. package/dist/node/http2.js +305 -0
  115. package/dist/node/https.js +57 -0
  116. package/dist/node/inspector/promises.js +66 -0
  117. package/dist/node/inspector.js +76 -0
  118. package/dist/node/module.js +205 -0
  119. package/dist/node/net.js +392 -0
  120. package/dist/node/os.js +259 -0
  121. package/dist/node/path/posix.js +25 -0
  122. package/dist/node/path/win32.js +25 -0
  123. package/dist/node/path.js +384 -0
  124. package/dist/node/perf_hooks.js +313 -0
  125. package/dist/node/process.js +452 -0
  126. package/dist/node/punycode.js +178 -0
  127. package/dist/node/querystring.js +934 -0
  128. package/dist/node/readline/promises.js +71 -0
  129. package/dist/node/readline.js +56 -0
  130. package/dist/node/repl.js +44 -0
  131. package/dist/node/sqlite.js +22 -0
  132. package/dist/node/stream/consumers.js +47 -0
  133. package/dist/node/stream/promises.js +6 -0
  134. package/dist/node/stream/web.js +52 -0
  135. package/dist/node/stream.js +4323 -0
  136. package/dist/node/string_decoder.js +276 -0
  137. package/dist/node/sys.js +6 -0
  138. package/dist/node/timers/promises.js +71 -0
  139. package/dist/node/timers.js +133 -0
  140. package/dist/node/tls.js +122 -0
  141. package/dist/node/trace_events.js +23 -0
  142. package/dist/node/tty.js +69 -0
  143. package/dist/node/url.js +1426 -0
  144. package/dist/node/util/types.js +1456 -0
  145. package/dist/node/util.js +4807 -0
  146. package/dist/node/v8.js +160 -0
  147. package/dist/node/vm.js +88 -0
  148. package/dist/node/wasi.js +16 -0
  149. package/dist/node/worker_threads.js +123 -0
  150. package/dist/node/zlib.js +1396 -0
  151. package/dist/node-builtins.d.ts +40 -0
  152. package/dist/node-builtins.js +74 -0
  153. package/dist/node-on-page.d.ts +46 -0
  154. package/dist/node-on-page.js +101 -0
  155. package/dist/node-platform.d.ts +36 -0
  156. package/dist/node-platform.js +152 -0
  157. package/dist/node-rendered.d.ts +21 -0
  158. package/dist/node-rendered.js +26 -0
  159. package/dist/node-server.d.ts +46 -0
  160. package/dist/node-server.js +193 -0
  161. package/dist/optimizer-cache-key.d.ts +26 -0
  162. package/dist/optimizer-cache-key.js +73 -0
  163. package/dist/own-package.d.ts +1 -0
  164. package/dist/own-package.js +6 -0
  165. package/dist/page-store.d.ts +33 -0
  166. package/dist/page-store.js +80 -0
  167. package/dist/page-timers.d.ts +22 -0
  168. package/dist/page-timers.js +47 -0
  169. package/dist/page.d.ts +112 -0
  170. package/dist/page.js +549 -0
  171. package/dist/paths.d.ts +13 -0
  172. package/dist/paths.js +47 -0
  173. package/dist/plugin.d.ts +22 -0
  174. package/dist/plugin.js +995 -0
  175. package/dist/prerender-verdict.d.ts +8 -0
  176. package/dist/prerender-verdict.js +67 -0
  177. package/dist/project/context.d.ts +546 -0
  178. package/dist/project/context.js +111 -0
  179. package/dist/project/entries.d.ts +42 -0
  180. package/dist/project/entries.js +189 -0
  181. package/dist/project/env-worker.d.ts +1 -0
  182. package/dist/project/env-worker.js +9 -0
  183. package/dist/project/env.d.ts +36 -0
  184. package/dist/project/env.js +82 -0
  185. package/dist/project/layers.d.ts +31 -0
  186. package/dist/project/layers.js +150 -0
  187. package/dist/project/loaders.d.ts +71 -0
  188. package/dist/project/loaders.js +300 -0
  189. package/dist/project/metadata.d.ts +8 -0
  190. package/dist/project/metadata.js +34 -0
  191. package/dist/project/module-exports.d.ts +29 -0
  192. package/dist/project/module-exports.js +77 -0
  193. package/dist/project/routes.d.ts +19 -0
  194. package/dist/project/routes.js +92 -0
  195. package/dist/project/routing.d.ts +46 -0
  196. package/dist/project/routing.js +280 -0
  197. package/dist/project/transform.d.ts +8 -0
  198. package/dist/project/transform.js +110 -0
  199. package/dist/project/webpack.d.ts +46 -0
  200. package/dist/project/webpack.js +160 -0
  201. package/dist/project.d.ts +264 -0
  202. package/dist/project.js +58 -0
  203. package/dist/registry-global.d.ts +5 -0
  204. package/dist/registry-global.js +5 -0
  205. package/dist/registry.d.ts +241 -0
  206. package/dist/registry.js +30 -0
  207. package/dist/route-chunks.d.ts +13 -0
  208. package/dist/route-chunks.js +32 -0
  209. package/dist/route-lookup.d.ts +34 -0
  210. package/dist/route-lookup.js +207 -0
  211. package/dist/routes-ahead-shared.d.ts +17 -0
  212. package/dist/routes-ahead-shared.js +9 -0
  213. package/dist/routes-ahead.d.ts +10 -0
  214. package/dist/routes-ahead.js +54 -0
  215. package/dist/rsc.d.ts +19 -0
  216. package/dist/rsc.js +171 -0
  217. package/dist/server-action.d.ts +9 -0
  218. package/dist/server-action.js +15 -0
  219. package/dist/server-code.d.ts +176 -0
  220. package/dist/server-code.js +357 -0
  221. package/dist/server-in-front.d.ts +37 -0
  222. package/dist/server-in-front.js +90 -0
  223. package/dist/server-layers.d.ts +22 -0
  224. package/dist/server-layers.js +33 -0
  225. package/dist/setup-browser.d.ts +1 -0
  226. package/dist/setup-browser.js +8 -0
  227. package/dist/setup-node.d.ts +1 -0
  228. package/dist/setup-node.js +6 -0
  229. package/dist/setup.d.ts +8 -0
  230. package/dist/setup.js +62 -0
  231. package/dist/speed-features.d.ts +13 -0
  232. package/dist/speed-features.js +95 -0
  233. package/dist/ssr.d.ts +70 -0
  234. package/dist/ssr.js +480 -0
  235. package/dist/static-build.d.ts +36 -0
  236. package/dist/static-build.js +92 -0
  237. package/dist/storage.d.ts +31 -0
  238. package/dist/storage.js +94 -0
  239. package/dist/styles-shared.d.ts +137 -0
  240. package/dist/styles-shared.js +124 -0
  241. package/dist/styles.d.ts +102 -0
  242. package/dist/styles.js +730 -0
  243. package/dist/stylesheet-versions.d.ts +17 -0
  244. package/dist/stylesheet-versions.js +43 -0
  245. package/dist/tester.html +10 -0
  246. package/dist/use-cache.d.ts +15 -0
  247. package/dist/use-cache.js +93 -0
  248. package/dist/vitest-version.d.ts +6 -0
  249. package/dist/vitest-version.js +12 -0
  250. package/package.json +125 -3
@@ -0,0 +1,384 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ const { basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, relative, resolve, sep } = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
24
+ function assertPath(path) {
25
+ if (typeof path !== "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(path));
26
+ }
27
+ function normalizeStringPosix(path, allowAboveRoot) {
28
+ var res = "";
29
+ var lastSegmentLength = 0;
30
+ var lastSlash = -1;
31
+ var dots = 0;
32
+ var code;
33
+ for (var i = 0; i <= path.length; ++i) {
34
+ if (i < path.length) code = path.charCodeAt(i);
35
+ else if (code === 47) break;
36
+ else code = 47;
37
+ if (code === 47) {
38
+ if (lastSlash === i - 1 || dots === 1) {} else if (lastSlash !== i - 1 && dots === 2) {
39
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
40
+ if (res.length > 2) {
41
+ var lastSlashIndex = res.lastIndexOf("/");
42
+ if (lastSlashIndex !== res.length - 1) {
43
+ if (lastSlashIndex === -1) {
44
+ res = "";
45
+ lastSegmentLength = 0;
46
+ } else {
47
+ res = res.slice(0, lastSlashIndex);
48
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
49
+ }
50
+ lastSlash = i;
51
+ dots = 0;
52
+ continue;
53
+ }
54
+ } else if (res.length === 2 || res.length === 1) {
55
+ res = "";
56
+ lastSegmentLength = 0;
57
+ lastSlash = i;
58
+ dots = 0;
59
+ continue;
60
+ }
61
+ }
62
+ if (allowAboveRoot) {
63
+ if (res.length > 0) res += "/..";
64
+ else res = "..";
65
+ lastSegmentLength = 2;
66
+ }
67
+ } else {
68
+ if (res.length > 0) res += "/" + path.slice(lastSlash + 1, i);
69
+ else res = path.slice(lastSlash + 1, i);
70
+ lastSegmentLength = i - lastSlash - 1;
71
+ }
72
+ lastSlash = i;
73
+ dots = 0;
74
+ } else if (code === 46 && dots !== -1) ++dots;
75
+ else dots = -1;
76
+ }
77
+ return res;
78
+ }
79
+ function _format(sep, pathObject) {
80
+ var dir = pathObject.dir || pathObject.root;
81
+ var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
82
+ if (!dir) return base;
83
+ if (dir === pathObject.root) return dir + base;
84
+ return dir + sep + base;
85
+ }
86
+ var posix = {
87
+ resolve: function resolve() {
88
+ var resolvedPath = "";
89
+ var resolvedAbsolute = false;
90
+ var cwd;
91
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
92
+ var path;
93
+ if (i >= 0) path = arguments[i];
94
+ else {
95
+ if (cwd === void 0) cwd = process.cwd();
96
+ path = cwd;
97
+ }
98
+ assertPath(path);
99
+ if (path.length === 0) continue;
100
+ resolvedPath = path + "/" + resolvedPath;
101
+ resolvedAbsolute = path.charCodeAt(0) === 47;
102
+ }
103
+ resolvedPath = normalizeStringPosix(resolvedPath, !resolvedAbsolute);
104
+ if (resolvedAbsolute) {
105
+ if (resolvedPath.length > 0) return "/" + resolvedPath;
106
+ else return "/";
107
+ } else if (resolvedPath.length > 0) return resolvedPath;
108
+ else return ".";
109
+ },
110
+ normalize: function normalize(path) {
111
+ assertPath(path);
112
+ if (path.length === 0) return ".";
113
+ var isAbsolute = path.charCodeAt(0) === 47;
114
+ var trailingSeparator = path.charCodeAt(path.length - 1) === 47;
115
+ path = normalizeStringPosix(path, !isAbsolute);
116
+ if (path.length === 0 && !isAbsolute) path = ".";
117
+ if (path.length > 0 && trailingSeparator) path += "/";
118
+ if (isAbsolute) return "/" + path;
119
+ return path;
120
+ },
121
+ isAbsolute: function isAbsolute(path) {
122
+ assertPath(path);
123
+ return path.length > 0 && path.charCodeAt(0) === 47;
124
+ },
125
+ join: function join() {
126
+ if (arguments.length === 0) return ".";
127
+ var joined;
128
+ for (var i = 0; i < arguments.length; ++i) {
129
+ var arg = arguments[i];
130
+ assertPath(arg);
131
+ if (arg.length > 0) {
132
+ if (joined === void 0) joined = arg;
133
+ else joined += "/" + arg;
134
+ }
135
+ }
136
+ if (joined === void 0) return ".";
137
+ return posix.normalize(joined);
138
+ },
139
+ relative: function relative(from, to) {
140
+ assertPath(from);
141
+ assertPath(to);
142
+ if (from === to) return "";
143
+ from = posix.resolve(from);
144
+ to = posix.resolve(to);
145
+ if (from === to) return "";
146
+ var fromStart = 1;
147
+ for (; fromStart < from.length; ++fromStart) if (from.charCodeAt(fromStart) !== 47) break;
148
+ var fromEnd = from.length;
149
+ var fromLen = fromEnd - fromStart;
150
+ var toStart = 1;
151
+ for (; toStart < to.length; ++toStart) if (to.charCodeAt(toStart) !== 47) break;
152
+ var toLen = to.length - toStart;
153
+ var length = fromLen < toLen ? fromLen : toLen;
154
+ var lastCommonSep = -1;
155
+ var i = 0;
156
+ for (; i <= length; ++i) {
157
+ if (i === length) {
158
+ if (toLen > length) {
159
+ if (to.charCodeAt(toStart + i) === 47) return to.slice(toStart + i + 1);
160
+ else if (i === 0) return to.slice(toStart + i);
161
+ } else if (fromLen > length) {
162
+ if (from.charCodeAt(fromStart + i) === 47) lastCommonSep = i;
163
+ else if (i === 0) lastCommonSep = 0;
164
+ }
165
+ break;
166
+ }
167
+ var fromCode = from.charCodeAt(fromStart + i);
168
+ if (fromCode !== to.charCodeAt(toStart + i)) break;
169
+ else if (fromCode === 47) lastCommonSep = i;
170
+ }
171
+ var out = "";
172
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) if (i === fromEnd || from.charCodeAt(i) === 47) {
173
+ if (out.length === 0) out += "..";
174
+ else out += "/..";
175
+ }
176
+ if (out.length > 0) return out + to.slice(toStart + lastCommonSep);
177
+ else {
178
+ toStart += lastCommonSep;
179
+ if (to.charCodeAt(toStart) === 47) ++toStart;
180
+ return to.slice(toStart);
181
+ }
182
+ },
183
+ _makeLong: function _makeLong(path) {
184
+ return path;
185
+ },
186
+ dirname: function dirname(path) {
187
+ assertPath(path);
188
+ if (path.length === 0) return ".";
189
+ var code = path.charCodeAt(0);
190
+ var hasRoot = code === 47;
191
+ var end = -1;
192
+ var matchedSlash = true;
193
+ for (var i = path.length - 1; i >= 1; --i) {
194
+ code = path.charCodeAt(i);
195
+ if (code === 47) {
196
+ if (!matchedSlash) {
197
+ end = i;
198
+ break;
199
+ }
200
+ } else matchedSlash = false;
201
+ }
202
+ if (end === -1) return hasRoot ? "/" : ".";
203
+ if (hasRoot && end === 1) return "//";
204
+ return path.slice(0, end);
205
+ },
206
+ basename: function basename(path, ext) {
207
+ if (ext !== void 0 && typeof ext !== "string") throw new TypeError("\"ext\" argument must be a string");
208
+ assertPath(path);
209
+ var start = 0;
210
+ var end = -1;
211
+ var matchedSlash = true;
212
+ var i;
213
+ if (ext !== void 0 && ext.length > 0 && ext.length <= path.length) {
214
+ if (ext.length === path.length && ext === path) return "";
215
+ var extIdx = ext.length - 1;
216
+ var firstNonSlashEnd = -1;
217
+ for (i = path.length - 1; i >= 0; --i) {
218
+ var code = path.charCodeAt(i);
219
+ if (code === 47) {
220
+ if (!matchedSlash) {
221
+ start = i + 1;
222
+ break;
223
+ }
224
+ } else {
225
+ if (firstNonSlashEnd === -1) {
226
+ matchedSlash = false;
227
+ firstNonSlashEnd = i + 1;
228
+ }
229
+ if (extIdx >= 0) {
230
+ if (code === ext.charCodeAt(extIdx)) {
231
+ if (--extIdx === -1) end = i;
232
+ } else {
233
+ extIdx = -1;
234
+ end = firstNonSlashEnd;
235
+ }
236
+ }
237
+ }
238
+ }
239
+ if (start === end) end = firstNonSlashEnd;
240
+ else if (end === -1) end = path.length;
241
+ return path.slice(start, end);
242
+ } else {
243
+ for (i = path.length - 1; i >= 0; --i) if (path.charCodeAt(i) === 47) {
244
+ if (!matchedSlash) {
245
+ start = i + 1;
246
+ break;
247
+ }
248
+ } else if (end === -1) {
249
+ matchedSlash = false;
250
+ end = i + 1;
251
+ }
252
+ if (end === -1) return "";
253
+ return path.slice(start, end);
254
+ }
255
+ },
256
+ extname: function extname(path) {
257
+ assertPath(path);
258
+ var startDot = -1;
259
+ var startPart = 0;
260
+ var end = -1;
261
+ var matchedSlash = true;
262
+ var preDotState = 0;
263
+ for (var i = path.length - 1; i >= 0; --i) {
264
+ var code = path.charCodeAt(i);
265
+ if (code === 47) {
266
+ if (!matchedSlash) {
267
+ startPart = i + 1;
268
+ break;
269
+ }
270
+ continue;
271
+ }
272
+ if (end === -1) {
273
+ matchedSlash = false;
274
+ end = i + 1;
275
+ }
276
+ if (code === 46) {
277
+ if (startDot === -1) startDot = i;
278
+ else if (preDotState !== 1) preDotState = 1;
279
+ } else if (startDot !== -1) preDotState = -1;
280
+ }
281
+ if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) return "";
282
+ return path.slice(startDot, end);
283
+ },
284
+ format: function format(pathObject) {
285
+ if (pathObject === null || typeof pathObject !== "object") throw new TypeError("The \"pathObject\" argument must be of type Object. Received type " + typeof pathObject);
286
+ return _format("/", pathObject);
287
+ },
288
+ parse: function parse(path) {
289
+ assertPath(path);
290
+ var ret = {
291
+ root: "",
292
+ dir: "",
293
+ base: "",
294
+ ext: "",
295
+ name: ""
296
+ };
297
+ if (path.length === 0) return ret;
298
+ var code = path.charCodeAt(0);
299
+ var isAbsolute = code === 47;
300
+ var start;
301
+ if (isAbsolute) {
302
+ ret.root = "/";
303
+ start = 1;
304
+ } else start = 0;
305
+ var startDot = -1;
306
+ var startPart = 0;
307
+ var end = -1;
308
+ var matchedSlash = true;
309
+ var i = path.length - 1;
310
+ var preDotState = 0;
311
+ for (; i >= start; --i) {
312
+ code = path.charCodeAt(i);
313
+ if (code === 47) {
314
+ if (!matchedSlash) {
315
+ startPart = i + 1;
316
+ break;
317
+ }
318
+ continue;
319
+ }
320
+ if (end === -1) {
321
+ matchedSlash = false;
322
+ end = i + 1;
323
+ }
324
+ if (code === 46) {
325
+ if (startDot === -1) startDot = i;
326
+ else if (preDotState !== 1) preDotState = 1;
327
+ } else if (startDot !== -1) preDotState = -1;
328
+ }
329
+ if (startDot === -1 || end === -1 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
330
+ if (end !== -1) {
331
+ if (startPart === 0 && isAbsolute) ret.base = ret.name = path.slice(1, end);
332
+ else ret.base = ret.name = path.slice(startPart, end);
333
+ }
334
+ } else {
335
+ if (startPart === 0 && isAbsolute) {
336
+ ret.name = path.slice(1, startDot);
337
+ ret.base = path.slice(1, end);
338
+ } else {
339
+ ret.name = path.slice(startPart, startDot);
340
+ ret.base = path.slice(startPart, end);
341
+ }
342
+ ret.ext = path.slice(startDot, end);
343
+ }
344
+ if (startPart > 0) ret.dir = path.slice(0, startPart - 1);
345
+ else if (isAbsolute) ret.dir = "/";
346
+ return ret;
347
+ },
348
+ sep: "/",
349
+ delimiter: ":",
350
+ win32: null,
351
+ posix: null
352
+ };
353
+ posix.posix = posix;
354
+ module.exports = posix;
355
+ })))(), 1)).default;
356
+ const toNamespacedPath = (file) => file;
357
+ const posix = {
358
+ basename,
359
+ delimiter,
360
+ dirname,
361
+ extname,
362
+ format,
363
+ isAbsolute,
364
+ join,
365
+ normalize,
366
+ parse,
367
+ relative,
368
+ resolve,
369
+ sep,
370
+ toNamespacedPath
371
+ };
372
+ Object.assign(posix, {
373
+ posix,
374
+ win32: posix,
375
+ _makeLong: toNamespacedPath
376
+ });
377
+ const win32 = posix;
378
+ var path_default = {
379
+ ...posix,
380
+ posix,
381
+ win32
382
+ };
383
+ //#endregion
384
+ export { basename, path_default as default, delimiter, dirname, extname, format, isAbsolute, join, normalize, parse, posix, relative, resolve, sep, toNamespacedPath, win32 };
@@ -0,0 +1,313 @@
1
+ //#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/_internal/utils.mjs
2
+ /* @__NO_SIDE_EFFECTS__ */
3
+ function createNotImplementedError(name) {
4
+ return /* @__PURE__ */ new Error(`[unenv] ${name} is not implemented yet!`);
5
+ }
6
+ //#endregion
7
+ //#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/perf_hooks/histogram.mjs
8
+ var Histogram = class {
9
+ min = 0x8000000000000000;
10
+ max = 0;
11
+ mean = NaN;
12
+ exceeds = 0;
13
+ stddev = NaN;
14
+ count = 0;
15
+ countBigInt = BigInt(0);
16
+ exceedsBigInt = BigInt(0);
17
+ maxBigInt = 0;
18
+ minBigInt = BigInt(9223372036854775807n);
19
+ percentiles = /* @__PURE__ */ new Map();
20
+ percentilesBigInt = /* @__PURE__ */ new Map();
21
+ percentileBigInt(_percentile) {
22
+ throw /* @__PURE__ */ createNotImplementedError("Histogram.percentileBigInt");
23
+ }
24
+ percentile(percentile) {
25
+ return this.percentiles.get(percentile) ?? NaN;
26
+ }
27
+ reset() {
28
+ throw /* @__PURE__ */ createNotImplementedError("Histogram.reset");
29
+ }
30
+ };
31
+ var IntervalHistogram = class extends Histogram {
32
+ enable() {
33
+ return true;
34
+ }
35
+ disable() {
36
+ return true;
37
+ }
38
+ };
39
+ var RecordableHistogram = class extends Histogram {
40
+ record(val) {
41
+ throw /* @__PURE__ */ createNotImplementedError("RecordableHistogram.record");
42
+ }
43
+ recordDelta() {
44
+ throw /* @__PURE__ */ createNotImplementedError("RecordableHistogram.recordDelta");
45
+ }
46
+ add(other) {
47
+ throw /* @__PURE__ */ createNotImplementedError("RecordableHistogram.add");
48
+ }
49
+ };
50
+ //#endregion
51
+ //#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/perf_hooks/performance.mjs
52
+ const _timeOrigin = globalThis.performance?.timeOrigin ?? Date.now();
53
+ const _performanceNow = globalThis.performance?.now ? globalThis.performance.now.bind(globalThis.performance) : () => Date.now() - _timeOrigin;
54
+ const nodeTiming = {
55
+ name: "node",
56
+ entryType: "node",
57
+ startTime: 0,
58
+ duration: 0,
59
+ nodeStart: 0,
60
+ v8Start: 0,
61
+ bootstrapComplete: 0,
62
+ environment: 0,
63
+ loopStart: 0,
64
+ loopExit: 0,
65
+ idleTime: 0,
66
+ uvMetricsInfo: {
67
+ loopCount: 0,
68
+ events: 0,
69
+ eventsWaiting: 0
70
+ },
71
+ detail: void 0,
72
+ toJSON() {
73
+ return this;
74
+ }
75
+ };
76
+ var PerformanceEntry = class {
77
+ __unenv__ = true;
78
+ detail;
79
+ entryType = "event";
80
+ name;
81
+ startTime;
82
+ constructor(name, options) {
83
+ this.name = name;
84
+ this.startTime = options?.startTime || _performanceNow();
85
+ this.detail = options?.detail;
86
+ }
87
+ get duration() {
88
+ return _performanceNow() - this.startTime;
89
+ }
90
+ toJSON() {
91
+ return {
92
+ name: this.name,
93
+ entryType: this.entryType,
94
+ startTime: this.startTime,
95
+ duration: this.duration,
96
+ detail: this.detail
97
+ };
98
+ }
99
+ };
100
+ const PerformanceMark = class PerformanceMark extends PerformanceEntry {
101
+ entryType = "mark";
102
+ constructor() {
103
+ super(...arguments);
104
+ }
105
+ get duration() {
106
+ return 0;
107
+ }
108
+ };
109
+ var PerformanceMeasure = class extends PerformanceEntry {
110
+ entryType = "measure";
111
+ };
112
+ var PerformanceResourceTiming = class extends PerformanceEntry {
113
+ entryType = "resource";
114
+ serverTiming = [];
115
+ connectEnd = 0;
116
+ connectStart = 0;
117
+ decodedBodySize = 0;
118
+ domainLookupEnd = 0;
119
+ domainLookupStart = 0;
120
+ encodedBodySize = 0;
121
+ fetchStart = 0;
122
+ initiatorType = "";
123
+ name = "";
124
+ nextHopProtocol = "";
125
+ redirectEnd = 0;
126
+ redirectStart = 0;
127
+ requestStart = 0;
128
+ responseEnd = 0;
129
+ responseStart = 0;
130
+ secureConnectionStart = 0;
131
+ startTime = 0;
132
+ transferSize = 0;
133
+ workerStart = 0;
134
+ responseStatus = 0;
135
+ };
136
+ var PerformanceObserverEntryList = class {
137
+ __unenv__ = true;
138
+ getEntries() {
139
+ return [];
140
+ }
141
+ getEntriesByName(_name, _type) {
142
+ return [];
143
+ }
144
+ getEntriesByType(type) {
145
+ return [];
146
+ }
147
+ };
148
+ var Performance = class {
149
+ __unenv__ = true;
150
+ timeOrigin = _timeOrigin;
151
+ eventCounts = /* @__PURE__ */ new Map();
152
+ _entries = [];
153
+ _resourceTimingBufferSize = 0;
154
+ navigation = void 0;
155
+ timing = void 0;
156
+ timerify(_fn, _options) {
157
+ throw /* @__PURE__ */ createNotImplementedError("Performance.timerify");
158
+ }
159
+ get nodeTiming() {
160
+ return nodeTiming;
161
+ }
162
+ eventLoopUtilization() {
163
+ return {};
164
+ }
165
+ markResourceTiming() {
166
+ return new PerformanceResourceTiming("");
167
+ }
168
+ onresourcetimingbufferfull = null;
169
+ now() {
170
+ if (this.timeOrigin === _timeOrigin) return _performanceNow();
171
+ return Date.now() - this.timeOrigin;
172
+ }
173
+ clearMarks(markName) {
174
+ this._entries = markName ? this._entries.filter((e) => e.name !== markName) : this._entries.filter((e) => e.entryType !== "mark");
175
+ }
176
+ clearMeasures(measureName) {
177
+ this._entries = measureName ? this._entries.filter((e) => e.name !== measureName) : this._entries.filter((e) => e.entryType !== "measure");
178
+ }
179
+ clearResourceTimings() {
180
+ this._entries = this._entries.filter((e) => e.entryType !== "resource" || e.entryType !== "navigation");
181
+ }
182
+ getEntries() {
183
+ return this._entries;
184
+ }
185
+ getEntriesByName(name, type) {
186
+ return this._entries.filter((e) => e.name === name && (!type || e.entryType === type));
187
+ }
188
+ getEntriesByType(type) {
189
+ return this._entries.filter((e) => e.entryType === type);
190
+ }
191
+ mark(name, options) {
192
+ const entry = new PerformanceMark(name, options);
193
+ this._entries.push(entry);
194
+ return entry;
195
+ }
196
+ measure(measureName, startOrMeasureOptions, endMark) {
197
+ let start;
198
+ let end;
199
+ if (typeof startOrMeasureOptions === "string") {
200
+ start = this.getEntriesByName(startOrMeasureOptions, "mark")[0]?.startTime;
201
+ end = this.getEntriesByName(endMark, "mark")[0]?.startTime;
202
+ } else {
203
+ start = Number.parseFloat(startOrMeasureOptions?.start) || this.now();
204
+ end = Number.parseFloat(startOrMeasureOptions?.end) || this.now();
205
+ }
206
+ const entry = new PerformanceMeasure(measureName, {
207
+ startTime: start,
208
+ detail: {
209
+ start,
210
+ end
211
+ }
212
+ });
213
+ this._entries.push(entry);
214
+ return entry;
215
+ }
216
+ setResourceTimingBufferSize(maxSize) {
217
+ this._resourceTimingBufferSize = maxSize;
218
+ }
219
+ addEventListener(type, listener, options) {
220
+ throw /* @__PURE__ */ createNotImplementedError("Performance.addEventListener");
221
+ }
222
+ removeEventListener(type, listener, options) {
223
+ throw /* @__PURE__ */ createNotImplementedError("Performance.removeEventListener");
224
+ }
225
+ dispatchEvent(event) {
226
+ throw /* @__PURE__ */ createNotImplementedError("Performance.dispatchEvent");
227
+ }
228
+ toJSON() {
229
+ return this;
230
+ }
231
+ };
232
+ var PerformanceObserver = class {
233
+ __unenv__ = true;
234
+ static supportedEntryTypes = [];
235
+ _callback = null;
236
+ constructor(callback) {
237
+ this._callback = callback;
238
+ }
239
+ takeRecords() {
240
+ return [];
241
+ }
242
+ disconnect() {
243
+ throw /* @__PURE__ */ createNotImplementedError("PerformanceObserver.disconnect");
244
+ }
245
+ observe(options) {
246
+ throw /* @__PURE__ */ createNotImplementedError("PerformanceObserver.observe");
247
+ }
248
+ bind(fn) {
249
+ return fn;
250
+ }
251
+ runInAsyncScope(fn, thisArg, ...args) {
252
+ return fn.call(thisArg, ...args);
253
+ }
254
+ asyncId() {
255
+ return 0;
256
+ }
257
+ triggerAsyncId() {
258
+ return 0;
259
+ }
260
+ emitDestroy() {
261
+ return this;
262
+ }
263
+ };
264
+ const performance = globalThis.performance && "addEventListener" in globalThis.performance ? globalThis.performance : new Performance();
265
+ //#endregion
266
+ //#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/perf_hooks.mjs
267
+ const constants = {
268
+ NODE_PERFORMANCE_GC_MAJOR: 4,
269
+ NODE_PERFORMANCE_GC_MINOR: 1,
270
+ NODE_PERFORMANCE_GC_INCREMENTAL: 8,
271
+ NODE_PERFORMANCE_GC_WEAKCB: 16,
272
+ NODE_PERFORMANCE_GC_FLAGS_NO: 0,
273
+ NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: 2,
274
+ NODE_PERFORMANCE_GC_FLAGS_FORCED: 4,
275
+ NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: 8,
276
+ NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: 16,
277
+ NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: 32,
278
+ NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: 64,
279
+ NODE_PERFORMANCE_ENTRY_TYPE_GC: 0,
280
+ NODE_PERFORMANCE_ENTRY_TYPE_HTTP: 1,
281
+ NODE_PERFORMANCE_ENTRY_TYPE_HTTP2: 2,
282
+ NODE_PERFORMANCE_ENTRY_TYPE_NET: 3,
283
+ NODE_PERFORMANCE_ENTRY_TYPE_DNS: 4,
284
+ NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN_TIMESTAMP: 0,
285
+ NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN: 1,
286
+ NODE_PERFORMANCE_MILESTONE_ENVIRONMENT: 2,
287
+ NODE_PERFORMANCE_MILESTONE_NODE_START: 3,
288
+ NODE_PERFORMANCE_MILESTONE_V8_START: 4,
289
+ NODE_PERFORMANCE_MILESTONE_LOOP_START: 5,
290
+ NODE_PERFORMANCE_MILESTONE_LOOP_EXIT: 6,
291
+ NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE: 7
292
+ };
293
+ const monitorEventLoopDelay = function(_options) {
294
+ return new IntervalHistogram();
295
+ };
296
+ const createHistogram = function(_options) {
297
+ return new RecordableHistogram();
298
+ };
299
+ var perf_hooks_default = {
300
+ Performance,
301
+ PerformanceMark,
302
+ PerformanceEntry,
303
+ PerformanceMeasure,
304
+ PerformanceObserverEntryList,
305
+ PerformanceObserver,
306
+ PerformanceResourceTiming,
307
+ performance,
308
+ constants,
309
+ createHistogram,
310
+ monitorEventLoopDelay
311
+ };
312
+ //#endregion
313
+ export { Performance, PerformanceEntry, PerformanceMark, PerformanceMeasure, PerformanceObserver, PerformanceObserverEntryList, PerformanceResourceTiming, constants, createHistogram, perf_hooks_default as default, monitorEventLoopDelay, performance };