@kasperpeulen/vitest-plugin-nextjs 0.0.0-alpha.0 → 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.
- package/README.md +249 -2
- package/dist/_virtual/_rolldown/runtime.js +14 -0
- package/dist/action-ids.d.ts +18 -0
- package/dist/action-ids.js +44 -0
- package/dist/adapter.d.ts +8 -0
- package/dist/adapter.js +12 -0
- package/dist/app-requests.d.ts +63 -0
- package/dist/app-requests.js +253 -0
- package/dist/browser-context.d.ts +24 -0
- package/dist/browser-context.js +157 -0
- package/dist/build-output.d.ts +68 -0
- package/dist/build-output.js +216 -0
- package/dist/build.d.ts +26 -0
- package/dist/build.js +39 -0
- package/dist/built-files.d.ts +9 -0
- package/dist/built-files.js +22 -0
- package/dist/cache.d.ts +44 -0
- package/dist/cache.js +99 -0
- package/dist/client-components.d.ts +3 -0
- package/dist/client-components.js +4 -0
- package/dist/client-file-key.d.ts +5 -0
- package/dist/client-file-key.js +5 -0
- package/dist/client-files.d.ts +83 -0
- package/dist/client-files.js +186 -0
- package/dist/client-graph.d.ts +94 -0
- package/dist/client-graph.js +266 -0
- package/dist/client-modules.d.ts +10 -0
- package/dist/client-modules.js +43 -0
- package/dist/client.d.ts +42 -0
- package/dist/client.js +263 -0
- package/dist/commonjs.d.ts +44 -0
- package/dist/commonjs.js +111 -0
- package/dist/compat/browser/client.d.ts +19 -0
- package/dist/compat/browser/client.js +13 -0
- package/dist/compat/build.d.ts +145 -0
- package/dist/compat/build.js +149 -0
- package/dist/compat/checks.d.ts +16 -0
- package/dist/compat/checks.js +148 -0
- package/dist/compat/patches.d.ts +13 -0
- package/dist/compat/patches.js +30 -0
- package/dist/compat/paths.d.ts +74 -0
- package/dist/compat/paths.js +160 -0
- package/dist/compat/rsc/handlers.d.ts +2 -0
- package/dist/compat/rsc/handlers.js +2 -0
- package/dist/compat/rsc/prerender.d.ts +10 -0
- package/dist/compat/rsc/prerender.js +9 -0
- package/dist/compat/server/headers.d.ts +3 -0
- package/dist/compat/server/headers.js +3 -0
- package/dist/compat/ssr/build-output.d.ts +4 -0
- package/dist/compat/ssr/build-output.js +3 -0
- package/dist/compat/ssr/cache.d.ts +6 -0
- package/dist/compat/ssr/cache.js +6 -0
- package/dist/compat/ssr/handler.d.ts +8 -0
- package/dist/compat/ssr/handler.js +8 -0
- package/dist/compat/ssr/node-server.d.ts +5 -0
- package/dist/compat/ssr/node-server.js +4 -0
- package/dist/compat/ssr/render-errors.d.ts +4 -0
- package/dist/compat/ssr/render-errors.js +4 -0
- package/dist/compat/ssr/senders.d.ts +6 -0
- package/dist/compat/ssr/senders.js +6 -0
- package/dist/compat/types.d.ts +8 -0
- package/dist/compat/types.js +1 -0
- package/dist/compile.d.ts +31 -0
- package/dist/compile.js +140 -0
- package/dist/disk.d.ts +16 -0
- package/dist/disk.js +13 -0
- package/dist/document-loads.d.ts +15 -0
- package/dist/document-loads.js +53 -0
- package/dist/document.d.ts +79 -0
- package/dist/document.js +328 -0
- package/dist/downloads.d.ts +15 -0
- package/dist/downloads.js +71 -0
- package/dist/esm-require.d.ts +11 -0
- package/dist/esm-require.js +32 -0
- package/dist/fast-crypto/index.js +1093 -0
- package/dist/fast-crypto.d.ts +20 -0
- package/dist/fast-crypto.js +151 -0
- package/dist/flight.d.ts +19 -0
- package/dist/flight.js +42 -0
- package/dist/form-submission.d.ts +15 -0
- package/dist/form-submission.js +27 -0
- package/dist/from-page.d.ts +5 -0
- package/dist/from-page.js +44 -0
- package/dist/globals.d.ts +1 -0
- package/dist/globals.js +197 -0
- package/dist/host-document.d.ts +26 -0
- package/dist/host-document.js +34 -0
- package/dist/index.d.ts +280 -0
- package/dist/index.js +281 -0
- package/dist/internal.d.ts +2 -0
- package/dist/internal.js +3 -0
- package/dist/leftovers.d.ts +11 -0
- package/dist/leftovers.js +55 -0
- package/dist/mode.d.ts +169 -0
- package/dist/mode.js +31 -0
- package/dist/node/LICENSES.md +3540 -0
- package/dist/node/assert/strict.js +29 -0
- package/dist/node/assert.js +3044 -0
- package/dist/node/buffer.js +1499 -0
- package/dist/node/child_process.js +45 -0
- package/dist/node/cluster.js +85 -0
- package/dist/node/console.js +96 -0
- package/dist/node/constants.js +495 -0
- package/dist/node/crypto.js +1388 -0
- package/dist/node/dgram.js +78 -0
- package/dist/node/diagnostics_channel.js +122 -0
- package/dist/node/dns/promises.js +129 -0
- package/dist/node/dns.js +137 -0
- package/dist/node/domain.js +43 -0
- package/dist/node/events.js +1155 -0
- package/dist/node/fs/promises.js +40 -0
- package/dist/node/fs.js +10375 -0
- package/dist/node/http.js +326 -0
- package/dist/node/http2.js +305 -0
- package/dist/node/https.js +57 -0
- package/dist/node/inspector/promises.js +66 -0
- package/dist/node/inspector.js +76 -0
- package/dist/node/module.js +205 -0
- package/dist/node/net.js +392 -0
- package/dist/node/os.js +259 -0
- package/dist/node/path/posix.js +25 -0
- package/dist/node/path/win32.js +25 -0
- package/dist/node/path.js +384 -0
- package/dist/node/perf_hooks.js +313 -0
- package/dist/node/process.js +452 -0
- package/dist/node/punycode.js +178 -0
- package/dist/node/querystring.js +934 -0
- package/dist/node/readline/promises.js +71 -0
- package/dist/node/readline.js +56 -0
- package/dist/node/repl.js +44 -0
- package/dist/node/sqlite.js +22 -0
- package/dist/node/stream/consumers.js +47 -0
- package/dist/node/stream/promises.js +6 -0
- package/dist/node/stream/web.js +52 -0
- package/dist/node/stream.js +4323 -0
- package/dist/node/string_decoder.js +276 -0
- package/dist/node/sys.js +6 -0
- package/dist/node/timers/promises.js +71 -0
- package/dist/node/timers.js +133 -0
- package/dist/node/tls.js +122 -0
- package/dist/node/trace_events.js +23 -0
- package/dist/node/tty.js +69 -0
- package/dist/node/url.js +1426 -0
- package/dist/node/util/types.js +1456 -0
- package/dist/node/util.js +4807 -0
- package/dist/node/v8.js +160 -0
- package/dist/node/vm.js +88 -0
- package/dist/node/wasi.js +16 -0
- package/dist/node/worker_threads.js +123 -0
- package/dist/node/zlib.js +1396 -0
- package/dist/node-builtins.d.ts +40 -0
- package/dist/node-builtins.js +74 -0
- package/dist/node-on-page.d.ts +46 -0
- package/dist/node-on-page.js +101 -0
- package/dist/node-platform.d.ts +36 -0
- package/dist/node-platform.js +152 -0
- package/dist/node-rendered.d.ts +21 -0
- package/dist/node-rendered.js +26 -0
- package/dist/node-server.d.ts +46 -0
- package/dist/node-server.js +193 -0
- package/dist/optimizer-cache-key.d.ts +26 -0
- package/dist/optimizer-cache-key.js +73 -0
- package/dist/own-package.d.ts +1 -0
- package/dist/own-package.js +6 -0
- package/dist/page-store.d.ts +33 -0
- package/dist/page-store.js +80 -0
- package/dist/page-timers.d.ts +22 -0
- package/dist/page-timers.js +47 -0
- package/dist/page.d.ts +112 -0
- package/dist/page.js +549 -0
- package/dist/paths.d.ts +13 -0
- package/dist/paths.js +47 -0
- package/dist/plugin.d.ts +22 -0
- package/dist/plugin.js +995 -0
- package/dist/prerender-verdict.d.ts +8 -0
- package/dist/prerender-verdict.js +67 -0
- package/dist/project/context.d.ts +546 -0
- package/dist/project/context.js +111 -0
- package/dist/project/entries.d.ts +42 -0
- package/dist/project/entries.js +189 -0
- package/dist/project/env-worker.d.ts +1 -0
- package/dist/project/env-worker.js +9 -0
- package/dist/project/env.d.ts +36 -0
- package/dist/project/env.js +82 -0
- package/dist/project/layers.d.ts +31 -0
- package/dist/project/layers.js +150 -0
- package/dist/project/loaders.d.ts +71 -0
- package/dist/project/loaders.js +300 -0
- package/dist/project/metadata.d.ts +8 -0
- package/dist/project/metadata.js +34 -0
- package/dist/project/module-exports.d.ts +29 -0
- package/dist/project/module-exports.js +77 -0
- package/dist/project/routes.d.ts +19 -0
- package/dist/project/routes.js +92 -0
- package/dist/project/routing.d.ts +46 -0
- package/dist/project/routing.js +280 -0
- package/dist/project/transform.d.ts +8 -0
- package/dist/project/transform.js +110 -0
- package/dist/project/webpack.d.ts +46 -0
- package/dist/project/webpack.js +160 -0
- package/dist/project.d.ts +264 -0
- package/dist/project.js +58 -0
- package/dist/registry-global.d.ts +5 -0
- package/dist/registry-global.js +5 -0
- package/dist/registry.d.ts +241 -0
- package/dist/registry.js +30 -0
- package/dist/route-chunks.d.ts +13 -0
- package/dist/route-chunks.js +32 -0
- package/dist/route-lookup.d.ts +34 -0
- package/dist/route-lookup.js +207 -0
- package/dist/routes-ahead-shared.d.ts +17 -0
- package/dist/routes-ahead-shared.js +9 -0
- package/dist/routes-ahead.d.ts +10 -0
- package/dist/routes-ahead.js +54 -0
- package/dist/rsc.d.ts +19 -0
- package/dist/rsc.js +171 -0
- package/dist/server-action.d.ts +9 -0
- package/dist/server-action.js +15 -0
- package/dist/server-code.d.ts +176 -0
- package/dist/server-code.js +357 -0
- package/dist/server-in-front.d.ts +37 -0
- package/dist/server-in-front.js +90 -0
- package/dist/server-layers.d.ts +22 -0
- package/dist/server-layers.js +33 -0
- package/dist/setup-browser.d.ts +1 -0
- package/dist/setup-browser.js +8 -0
- package/dist/setup-node.d.ts +1 -0
- package/dist/setup-node.js +6 -0
- package/dist/setup.d.ts +8 -0
- package/dist/setup.js +62 -0
- package/dist/speed-features.d.ts +13 -0
- package/dist/speed-features.js +95 -0
- package/dist/ssr.d.ts +70 -0
- package/dist/ssr.js +480 -0
- package/dist/static-build.d.ts +36 -0
- package/dist/static-build.js +92 -0
- package/dist/storage.d.ts +31 -0
- package/dist/storage.js +94 -0
- package/dist/styles-shared.d.ts +137 -0
- package/dist/styles-shared.js +124 -0
- package/dist/styles.d.ts +102 -0
- package/dist/styles.js +730 -0
- package/dist/stylesheet-versions.d.ts +17 -0
- package/dist/stylesheet-versions.js +43 -0
- package/dist/tester.html +10 -0
- package/dist/use-cache.d.ts +15 -0
- package/dist/use-cache.js +93 -0
- package/dist/vitest-version.d.ts +6 -0
- package/dist/vitest-version.js +12 -0
- package/package.json +125 -4
package/dist/node/v8.js
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Readable } from "node:stream";
|
|
2
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/mock/noop.mjs
|
|
3
|
+
var noop_default = Object.assign(() => {}, { __unenv__: true });
|
|
4
|
+
//#endregion
|
|
5
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/v8/deserializer.mjs
|
|
6
|
+
var Deserializer = class {
|
|
7
|
+
readHeader() {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
readValue() {}
|
|
11
|
+
transferArrayBuffer(id, arrayBuffer) {}
|
|
12
|
+
getWireFormatVersion() {
|
|
13
|
+
return 0;
|
|
14
|
+
}
|
|
15
|
+
readUint32() {
|
|
16
|
+
return 0;
|
|
17
|
+
}
|
|
18
|
+
readUint64() {
|
|
19
|
+
return [0, 0];
|
|
20
|
+
}
|
|
21
|
+
readDouble() {
|
|
22
|
+
return 0;
|
|
23
|
+
}
|
|
24
|
+
readRawBytes(length) {
|
|
25
|
+
return Buffer.from("");
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var DefaultDeserializer = class extends Deserializer {};
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/v8/serializer.mjs
|
|
31
|
+
var Serializer = class {
|
|
32
|
+
writeHeader() {}
|
|
33
|
+
writeValue(val) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
releaseBuffer() {
|
|
37
|
+
return Buffer.from("");
|
|
38
|
+
}
|
|
39
|
+
transferArrayBuffer(id, arrayBuffer) {}
|
|
40
|
+
writeDouble(value) {}
|
|
41
|
+
writeUint32(value) {}
|
|
42
|
+
writeUint64(hi, lo) {}
|
|
43
|
+
writeRawBytes(buffer) {}
|
|
44
|
+
};
|
|
45
|
+
var DefaultSerializer = class extends Serializer {};
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/v8/profiler.mjs
|
|
48
|
+
var GCProfiler = class {
|
|
49
|
+
start() {}
|
|
50
|
+
stop() {
|
|
51
|
+
return {
|
|
52
|
+
version: 1,
|
|
53
|
+
startTime: 0,
|
|
54
|
+
endTime: 0,
|
|
55
|
+
statistics: []
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/v8.mjs
|
|
61
|
+
const getMockHeapSpaceStats = (name) => ({
|
|
62
|
+
space_name: name,
|
|
63
|
+
space_size: 0,
|
|
64
|
+
space_used_size: 0,
|
|
65
|
+
space_available_size: 0,
|
|
66
|
+
physical_space_size: 0
|
|
67
|
+
});
|
|
68
|
+
const cachedDataVersionTag = () => 0;
|
|
69
|
+
const deserialize = noop_default;
|
|
70
|
+
const getHeapCodeStatistics = () => ({
|
|
71
|
+
code_and_metadata_size: 0,
|
|
72
|
+
bytecode_and_metadata_size: 0,
|
|
73
|
+
external_script_source_size: 0,
|
|
74
|
+
cpu_profiler_metadata_size: 0
|
|
75
|
+
});
|
|
76
|
+
const getHeapSpaceStatistics = () => [
|
|
77
|
+
"read_only_space",
|
|
78
|
+
"new_space",
|
|
79
|
+
"old_space",
|
|
80
|
+
"code_space",
|
|
81
|
+
"map_space",
|
|
82
|
+
"large_object_space",
|
|
83
|
+
"code_large_object_space",
|
|
84
|
+
"new_large_object_space"
|
|
85
|
+
].map((space) => getMockHeapSpaceStats(space));
|
|
86
|
+
const getHeapStatistics = () => ({
|
|
87
|
+
total_heap_size: 0,
|
|
88
|
+
total_heap_size_executable: 0,
|
|
89
|
+
total_physical_size: 0,
|
|
90
|
+
total_available_size: 0,
|
|
91
|
+
used_heap_size: 0,
|
|
92
|
+
heap_size_limit: 0,
|
|
93
|
+
malloced_memory: 0,
|
|
94
|
+
peak_malloced_memory: 0,
|
|
95
|
+
does_zap_garbage: 0,
|
|
96
|
+
number_of_native_contexts: 0,
|
|
97
|
+
number_of_detached_contexts: 0,
|
|
98
|
+
total_global_handles_size: 0,
|
|
99
|
+
used_global_handles_size: 0,
|
|
100
|
+
external_memory: 0
|
|
101
|
+
});
|
|
102
|
+
const getHeapSnapshot = () => {
|
|
103
|
+
return Readable.from(`{
|
|
104
|
+
snapshot: {},
|
|
105
|
+
nodes: [],
|
|
106
|
+
edges: [],
|
|
107
|
+
trace_function_infos: [],
|
|
108
|
+
trace_tree: [],
|
|
109
|
+
samples: [],
|
|
110
|
+
locations: [],
|
|
111
|
+
strings: [],
|
|
112
|
+
}`);
|
|
113
|
+
};
|
|
114
|
+
const promiseHooks = {
|
|
115
|
+
onInit: () => noop_default,
|
|
116
|
+
onSettled: () => noop_default,
|
|
117
|
+
onBefore: () => noop_default,
|
|
118
|
+
onAfter: () => noop_default,
|
|
119
|
+
createHook: () => noop_default
|
|
120
|
+
};
|
|
121
|
+
const serialize = (value) => Buffer.from(value);
|
|
122
|
+
const setFlagsFromString = noop_default;
|
|
123
|
+
const setHeapSnapshotNearHeapLimit = noop_default;
|
|
124
|
+
const startupSnapshot = {
|
|
125
|
+
addDeserializeCallback: noop_default,
|
|
126
|
+
addSerializeCallback: noop_default,
|
|
127
|
+
setDeserializeMainFunction: noop_default,
|
|
128
|
+
isBuildingSnapshot: () => false
|
|
129
|
+
};
|
|
130
|
+
const stopCoverage = noop_default;
|
|
131
|
+
const takeCoverage = noop_default;
|
|
132
|
+
const writeHeapSnapshot = () => "";
|
|
133
|
+
function queryObjects(_ctor, options) {
|
|
134
|
+
if (options?.format === "count") return 0;
|
|
135
|
+
return [];
|
|
136
|
+
}
|
|
137
|
+
var v8_default = {
|
|
138
|
+
DefaultDeserializer,
|
|
139
|
+
Deserializer,
|
|
140
|
+
GCProfiler,
|
|
141
|
+
DefaultSerializer,
|
|
142
|
+
Serializer,
|
|
143
|
+
cachedDataVersionTag,
|
|
144
|
+
deserialize,
|
|
145
|
+
getHeapCodeStatistics,
|
|
146
|
+
getHeapSnapshot,
|
|
147
|
+
getHeapSpaceStatistics,
|
|
148
|
+
getHeapStatistics,
|
|
149
|
+
promiseHooks,
|
|
150
|
+
serialize,
|
|
151
|
+
setFlagsFromString,
|
|
152
|
+
setHeapSnapshotNearHeapLimit,
|
|
153
|
+
startupSnapshot,
|
|
154
|
+
stopCoverage,
|
|
155
|
+
takeCoverage,
|
|
156
|
+
writeHeapSnapshot,
|
|
157
|
+
queryObjects
|
|
158
|
+
};
|
|
159
|
+
//#endregion
|
|
160
|
+
export { DefaultDeserializer, DefaultSerializer, Deserializer, GCProfiler, Serializer, cachedDataVersionTag, v8_default as default, deserialize, getHeapCodeStatistics, getHeapSnapshot, getHeapSpaceStatistics, getHeapStatistics, promiseHooks, queryObjects, serialize, setFlagsFromString, setHeapSnapshotNearHeapLimit, startupSnapshot, stopCoverage, takeCoverage, writeHeapSnapshot };
|
package/dist/node/vm.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/_internal/utils.mjs
|
|
14
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
15
|
+
function createNotImplementedError(name) {
|
|
16
|
+
return /* @__PURE__ */ new Error(`[unenv] ${name} is not implemented yet!`);
|
|
17
|
+
}
|
|
18
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
19
|
+
function notImplemented(name) {
|
|
20
|
+
const fn = () => {
|
|
21
|
+
throw /* @__PURE__ */ createNotImplementedError(name);
|
|
22
|
+
};
|
|
23
|
+
return Object.assign(fn, { __unenv__: true });
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/vm/script.mjs
|
|
27
|
+
var Script = class {
|
|
28
|
+
runInContext(contextifiedObject, options) {
|
|
29
|
+
throw /* @__PURE__ */ createNotImplementedError("Script.runInContext");
|
|
30
|
+
}
|
|
31
|
+
runInNewContext(contextObject, options) {
|
|
32
|
+
throw /* @__PURE__ */ createNotImplementedError("Script.runInNewContext");
|
|
33
|
+
}
|
|
34
|
+
runInThisContext(options) {
|
|
35
|
+
throw /* @__PURE__ */ createNotImplementedError("Script.runInThisContext");
|
|
36
|
+
}
|
|
37
|
+
createCachedData() {
|
|
38
|
+
throw /* @__PURE__ */ createNotImplementedError("Script.createCachedData");
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/vm/constants.mjs
|
|
43
|
+
var constants_exports = /* @__PURE__ */ __exportAll({
|
|
44
|
+
DONT_CONTEXTIFY: () => DONT_CONTEXTIFY,
|
|
45
|
+
USE_MAIN_CONTEXT_DEFAULT_LOADER: () => USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
46
|
+
});
|
|
47
|
+
const USE_MAIN_CONTEXT_DEFAULT_LOADER = /* @__PURE__ */ Symbol("vm_dynamic_import_main_context_default");
|
|
48
|
+
const DONT_CONTEXTIFY = /* @__PURE__ */ Symbol("vm_context_no_contextify");
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/vm.mjs
|
|
51
|
+
const compileFunction = /* @__PURE__ */ notImplemented("vm.compileFunction");
|
|
52
|
+
const _contextSymbol = /* @__PURE__ */ Symbol("uenv.vm.context");
|
|
53
|
+
const createContext = function createContext() {
|
|
54
|
+
return Object.create(null, { [_contextSymbol]: { value: true } });
|
|
55
|
+
};
|
|
56
|
+
const createScript = function createScript() {
|
|
57
|
+
return new Script();
|
|
58
|
+
};
|
|
59
|
+
const isContext = (context) => {
|
|
60
|
+
return context && context[_contextSymbol] === true;
|
|
61
|
+
};
|
|
62
|
+
const measureMemory = () => Promise.resolve({
|
|
63
|
+
total: {
|
|
64
|
+
jsMemoryEstimate: 0,
|
|
65
|
+
jsMemoryRange: [1, 2]
|
|
66
|
+
},
|
|
67
|
+
WebAssembly: {
|
|
68
|
+
code: 0,
|
|
69
|
+
metadata: 0
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const runInContext = /* @__PURE__ */ notImplemented("vm.runInContext");
|
|
73
|
+
const runInNewContext = /* @__PURE__ */ notImplemented("vm.runInNewContext");
|
|
74
|
+
const runInThisContext = /* @__PURE__ */ notImplemented("vm.runInThisContext");
|
|
75
|
+
var vm_default = {
|
|
76
|
+
Script,
|
|
77
|
+
compileFunction,
|
|
78
|
+
constants: constants_exports,
|
|
79
|
+
createContext,
|
|
80
|
+
isContext,
|
|
81
|
+
measureMemory,
|
|
82
|
+
runInContext,
|
|
83
|
+
runInNewContext,
|
|
84
|
+
runInThisContext,
|
|
85
|
+
createScript
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Script, compileFunction, constants_exports as constants, createContext, createScript, vm_default as default, isContext, measureMemory, runInContext, runInNewContext, runInThisContext };
|
|
@@ -0,0 +1,16 @@
|
|
|
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 notImplementedClass(name) {
|
|
4
|
+
return class {
|
|
5
|
+
__unenv__ = true;
|
|
6
|
+
constructor() {
|
|
7
|
+
throw new Error(`[unenv] ${name} is not implemented yet!`);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/wasi.mjs
|
|
13
|
+
const WASI = /* @__PURE__ */ notImplementedClass("wasi.WASI");
|
|
14
|
+
var wasi_default = { WASI };
|
|
15
|
+
//#endregion
|
|
16
|
+
export { WASI, wasi_default as default };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import { Readable } from "node:stream";
|
|
3
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/worker_threads/broadcast-channel.mjs
|
|
4
|
+
var BroadcastChannel = class {
|
|
5
|
+
name = "";
|
|
6
|
+
onmessage = (message) => {};
|
|
7
|
+
onmessageerror = (message) => {};
|
|
8
|
+
close() {}
|
|
9
|
+
postMessage(message) {}
|
|
10
|
+
ref() {
|
|
11
|
+
return this;
|
|
12
|
+
}
|
|
13
|
+
unref() {
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/worker_threads/message-port.mjs
|
|
19
|
+
var MessagePort = class extends EventEmitter {
|
|
20
|
+
close() {}
|
|
21
|
+
postMessage(value, transferList) {}
|
|
22
|
+
ref() {}
|
|
23
|
+
unref() {}
|
|
24
|
+
start() {}
|
|
25
|
+
addEventListener(type, listener) {
|
|
26
|
+
this.on(type, listener);
|
|
27
|
+
}
|
|
28
|
+
removeEventListener(type, listener) {
|
|
29
|
+
this.off(type, listener);
|
|
30
|
+
}
|
|
31
|
+
dispatchEvent(event) {
|
|
32
|
+
return this.emit(event.type, event);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/worker_threads/message-channel.mjs
|
|
37
|
+
var MessageChannel = class {
|
|
38
|
+
port1 = new MessagePort();
|
|
39
|
+
port2 = new MessagePort();
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/internal/worker_threads/worker.mjs
|
|
43
|
+
var Worker = class extends EventEmitter {
|
|
44
|
+
stdin = null;
|
|
45
|
+
stdout = new Readable();
|
|
46
|
+
stderr = new Readable();
|
|
47
|
+
threadId = 0;
|
|
48
|
+
performance = { eventLoopUtilization: () => ({
|
|
49
|
+
idle: 0,
|
|
50
|
+
active: 0,
|
|
51
|
+
utilization: 0
|
|
52
|
+
}) };
|
|
53
|
+
postMessage(_value, _transferList) {}
|
|
54
|
+
postMessageToThread(_threadId, _value, _transferList, _timeout) {
|
|
55
|
+
return Promise.resolve();
|
|
56
|
+
}
|
|
57
|
+
ref() {}
|
|
58
|
+
unref() {}
|
|
59
|
+
terminate() {
|
|
60
|
+
return Promise.resolve(0);
|
|
61
|
+
}
|
|
62
|
+
getHeapSnapshot() {
|
|
63
|
+
return Promise.resolve(new Readable());
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/_internal/utils.mjs
|
|
68
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
69
|
+
function createNotImplementedError(name) {
|
|
70
|
+
return /* @__PURE__ */ new Error(`[unenv] ${name} is not implemented yet!`);
|
|
71
|
+
}
|
|
72
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
73
|
+
function notImplemented(name) {
|
|
74
|
+
const fn = () => {
|
|
75
|
+
throw /* @__PURE__ */ createNotImplementedError(name);
|
|
76
|
+
};
|
|
77
|
+
return Object.assign(fn, { __unenv__: true });
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region ../../node_modules/.pnpm/unenv@2.0.0-rc.24/node_modules/unenv/dist/runtime/node/worker_threads.mjs
|
|
81
|
+
const _environmentData = /* @__PURE__ */ new Map();
|
|
82
|
+
const getEnvironmentData = function getEnvironmentData(key) {
|
|
83
|
+
return _environmentData.get(key);
|
|
84
|
+
};
|
|
85
|
+
const setEnvironmentData = function setEnvironmentData(key, value) {
|
|
86
|
+
_environmentData.set(key, value);
|
|
87
|
+
};
|
|
88
|
+
const isMainThread = true;
|
|
89
|
+
const isMarkedAsUntransferable = () => false;
|
|
90
|
+
const markAsUntransferable = function markAsUntransferable(value) {};
|
|
91
|
+
const markAsUncloneable = () => {};
|
|
92
|
+
const moveMessagePortToContext = () => new MessagePort();
|
|
93
|
+
const parentPort = null;
|
|
94
|
+
const receiveMessageOnPort = () => void 0;
|
|
95
|
+
const SHARE_ENV = /* @__PURE__ */ Symbol.for("nodejs.worker_threads.SHARE_ENV");
|
|
96
|
+
const resourceLimits = {};
|
|
97
|
+
const threadId = 0;
|
|
98
|
+
const workerData = null;
|
|
99
|
+
const postMessageToThread = /* @__PURE__ */ notImplemented("worker_threads.postMessageToThread");
|
|
100
|
+
const isInternalThread = false;
|
|
101
|
+
var worker_threads_default = {
|
|
102
|
+
BroadcastChannel,
|
|
103
|
+
MessageChannel,
|
|
104
|
+
MessagePort,
|
|
105
|
+
Worker,
|
|
106
|
+
SHARE_ENV,
|
|
107
|
+
getEnvironmentData,
|
|
108
|
+
isMainThread: true,
|
|
109
|
+
isMarkedAsUntransferable,
|
|
110
|
+
markAsUntransferable,
|
|
111
|
+
markAsUncloneable,
|
|
112
|
+
moveMessagePortToContext,
|
|
113
|
+
parentPort: null,
|
|
114
|
+
receiveMessageOnPort,
|
|
115
|
+
resourceLimits,
|
|
116
|
+
setEnvironmentData,
|
|
117
|
+
postMessageToThread,
|
|
118
|
+
threadId: 0,
|
|
119
|
+
workerData: null,
|
|
120
|
+
isInternalThread: false
|
|
121
|
+
};
|
|
122
|
+
//#endregion
|
|
123
|
+
export { BroadcastChannel, MessageChannel, MessagePort, SHARE_ENV, Worker, worker_threads_default as default, getEnvironmentData, isInternalThread, isMainThread, isMarkedAsUntransferable, markAsUncloneable, markAsUntransferable, moveMessagePortToContext, parentPort, postMessageToThread, receiveMessageOnPort, resourceLimits, setEnvironmentData, threadId, workerData };
|