nitropack-nightly 2.11.0-20250228-190633.b15db0a7 → 2.11.0-20250228-233255.f2f95bc7
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/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.mjs +1 -1
- package/dist/presets/_unenv/node-compat/vercel.d.ts +1 -1
- package/dist/presets/_unenv/node-compat/vercel.mjs +30 -37
- package/dist/presets/_unenv/preset-deno.mjs +2 -11
- package/dist/presets/_unenv/preset-workerd.mjs +1 -11
- package/dist/presets/deno/runtime/deno-deploy.d.ts +0 -1
- package/dist/presets/deno/runtime/deno-deploy.mjs +0 -1
- package/dist/presets/netlify/runtime/netlify-edge.d.ts +0 -1
- package/dist/presets/netlify/runtime/netlify-edge.mjs +0 -1
- package/dist/presets/vercel/preset.mjs +12 -3
- package/dist/rollup/index.mjs +16 -10
- package/package.json +2 -2
- package/dist/presets/netlify/runtime/_deno-env-polyfill.d.ts +0 -0
- package/dist/presets/netlify/runtime/_deno-env-polyfill.mjs +0 -1
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/meta/index.mjs
CHANGED
|
@@ -1,50 +1,14 @@
|
|
|
1
1
|
export const builtnNodeModules = [
|
|
2
|
-
"_stream_duplex",
|
|
3
|
-
"_stream_passthrough",
|
|
4
|
-
"_stream_readable",
|
|
5
|
-
"_stream_transform",
|
|
6
|
-
"_stream_writable",
|
|
7
2
|
"assert",
|
|
8
3
|
// Missing exports: CallTracker, partialDeepStrictEqual
|
|
9
|
-
"assert/strict",
|
|
10
|
-
// Missing exports: CallTracker, partialDeepStrictEqual
|
|
11
4
|
"async_hooks",
|
|
12
5
|
"buffer",
|
|
13
|
-
"diagnostics_channel",
|
|
14
|
-
"dns",
|
|
15
|
-
"dns/promises",
|
|
16
6
|
"events",
|
|
17
7
|
// Missing exports: captureRejections, init
|
|
18
|
-
"net",
|
|
19
|
-
// Missing exports: Stream
|
|
20
|
-
"path",
|
|
21
|
-
"path/posix",
|
|
22
|
-
"path/win32",
|
|
23
|
-
"querystring",
|
|
24
|
-
"stream",
|
|
25
|
-
// Missing exports: duplexPair
|
|
26
|
-
"stream/consumers",
|
|
27
|
-
"stream/promises",
|
|
28
|
-
"stream/web",
|
|
29
|
-
"string_decoder",
|
|
30
|
-
"timers",
|
|
31
|
-
"timers/promises",
|
|
32
|
-
"url",
|
|
33
|
-
"util/types",
|
|
34
|
-
"zlib"
|
|
35
|
-
];
|
|
36
|
-
export const hybridNodeModules = [
|
|
37
|
-
"console",
|
|
38
|
-
"crypto",
|
|
39
|
-
// Missing exports: Cipher, Cipheriv, Decipher, Decipheriv, ECDH, Sign, Verify, constants, createCipheriv, createDecipheriv, createECDH, createSign, createVerify, getCipherInfo, hash, privateDecrypt, privateEncrypt, publicDecrypt, publicEncrypt, sign, verify
|
|
40
|
-
"module",
|
|
41
|
-
// Missing exports: Module, SourceMap, constants, enableCompileCache, findPackageJSON, findSourceMap, flushCompileCache, getCompileCacheDir, getSourceMapsSupport, globalPaths, register, runMain, setSourceMapsSupport, stripTypeScriptTypes, syncBuiltinESMExports
|
|
42
|
-
"perf_hooks",
|
|
43
|
-
"process",
|
|
44
|
-
// Missing exports: abort, allowedNodeEnvironmentFlags, arch, argv, argv0, assert, availableMemory, binding, chdir, config, constrainedMemory, cpuUsage, cwd, debugPort, dlopen, domain, emitWarning, execArgv, execPath, exitCode, features, finalization, getActiveResourcesInfo, getegid, geteuid, getgid, getgroups, getuid, hasUncaughtExceptionCaptureCallback, hrtime, initgroups, kill, loadEnvFile, memoryUsage, moduleLoadList, openStdin, pid, ppid, reallyExit, ref, release, report, resourceUsage, setSourceMapsEnabled, setUncaughtExceptionCaptureCallback, setegid, seteuid, setgid, setgroups, setuid, sourceMapsEnabled, stderr, stdin, stdout, title, umask, unref, uptime, version, versions
|
|
45
8
|
"util"
|
|
46
9
|
// Missing exports: isBoolean, isBuffer, isDate, isError, isFunction, isNull, isNullOrUndefined, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isUndefined
|
|
47
10
|
];
|
|
11
|
+
export const hybridNodeModules = [];
|
|
48
12
|
export const unsupportedNodeModules = [
|
|
49
13
|
"_http_agent",
|
|
50
14
|
"_http_client",
|
|
@@ -52,13 +16,24 @@ export const unsupportedNodeModules = [
|
|
|
52
16
|
"_http_incoming",
|
|
53
17
|
"_http_outgoing",
|
|
54
18
|
"_http_server",
|
|
19
|
+
"_stream_duplex",
|
|
20
|
+
"_stream_passthrough",
|
|
21
|
+
"_stream_readable",
|
|
22
|
+
"_stream_transform",
|
|
55
23
|
"_stream_wrap",
|
|
24
|
+
"_stream_writable",
|
|
56
25
|
"_tls_common",
|
|
57
26
|
"_tls_wrap",
|
|
27
|
+
"assert/strict",
|
|
58
28
|
"child_process",
|
|
59
29
|
"cluster",
|
|
30
|
+
"console",
|
|
60
31
|
"constants",
|
|
32
|
+
"crypto",
|
|
61
33
|
"dgram",
|
|
34
|
+
"diagnostics_channel",
|
|
35
|
+
"dns",
|
|
36
|
+
"dns/promises",
|
|
62
37
|
"domain",
|
|
63
38
|
"fs",
|
|
64
39
|
"fs/promises",
|
|
@@ -67,18 +42,36 @@ export const unsupportedNodeModules = [
|
|
|
67
42
|
"https",
|
|
68
43
|
"inspector",
|
|
69
44
|
"inspector/promises",
|
|
45
|
+
"module",
|
|
46
|
+
"net",
|
|
70
47
|
"os",
|
|
48
|
+
"path",
|
|
49
|
+
"path/posix",
|
|
50
|
+
"path/win32",
|
|
51
|
+
"perf_hooks",
|
|
52
|
+
"process",
|
|
71
53
|
"punycode",
|
|
54
|
+
"querystring",
|
|
72
55
|
"readline",
|
|
73
56
|
"readline/promises",
|
|
74
57
|
"repl",
|
|
58
|
+
"stream",
|
|
59
|
+
"stream/consumers",
|
|
60
|
+
"stream/promises",
|
|
61
|
+
"stream/web",
|
|
62
|
+
"string_decoder",
|
|
75
63
|
"sys",
|
|
64
|
+
"timers",
|
|
65
|
+
"timers/promises",
|
|
76
66
|
"tls",
|
|
77
67
|
"trace_events",
|
|
78
68
|
"tty",
|
|
69
|
+
"url",
|
|
70
|
+
"util/types",
|
|
79
71
|
"v8",
|
|
80
72
|
"vm",
|
|
81
73
|
"wasi",
|
|
82
74
|
"worker_threads",
|
|
75
|
+
"zlib",
|
|
83
76
|
"sqlite"
|
|
84
77
|
];
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { fileURLToPath } from "mlly";
|
|
2
|
-
import { join } from "pathe";
|
|
3
1
|
import { builtnNodeModules } from "./node-compat/deno.mjs";
|
|
4
|
-
const presetRuntimeDir = fileURLToPath(new URL("runtime/", import.meta.url));
|
|
5
|
-
const resolvePresetRuntime = (m) => join(presetRuntimeDir, `${m}.mjs`);
|
|
6
2
|
export const unenvDenoPreset = {
|
|
7
3
|
external: builtnNodeModules.map((m) => `node:${m}`),
|
|
8
4
|
alias: {
|
|
@@ -12,14 +8,9 @@ export const unenvDenoPreset = {
|
|
|
12
8
|
[m, `node:${m}`],
|
|
13
9
|
[`node:${m}`, `node:${m}`]
|
|
14
10
|
])
|
|
15
|
-
)
|
|
16
|
-
"node-mock-http/_polyfill/events": "node:events",
|
|
17
|
-
"node-mock-http/_polyfill/buffer": "node:buffer"
|
|
11
|
+
)
|
|
18
12
|
},
|
|
19
13
|
inject: {
|
|
20
|
-
|
|
21
|
-
Buffer: ["node:buffer", "Buffer"],
|
|
22
|
-
"global.Buffer": ["node:buffer", "Buffer"],
|
|
23
|
-
"globalThis.Buffer": ["node:buffer", "Buffer"]
|
|
14
|
+
performance: false
|
|
24
15
|
}
|
|
25
16
|
};
|
|
@@ -22,17 +22,7 @@ export const unenvWorkerdPreset = {
|
|
|
22
22
|
[m, resolved]
|
|
23
23
|
];
|
|
24
24
|
})
|
|
25
|
-
)
|
|
26
|
-
sys: resolvePresetRuntime("util"),
|
|
27
|
-
"node:sys": resolvePresetRuntime("util"),
|
|
28
|
-
"node-mock-http/_polyfill/events": "node:events",
|
|
29
|
-
"node-mock-http/_polyfill/buffer": "node:buffer"
|
|
30
|
-
},
|
|
31
|
-
inject: {
|
|
32
|
-
process: resolvePresetRuntime("process"),
|
|
33
|
-
Buffer: ["node:buffer", "Buffer"],
|
|
34
|
-
"global.Buffer": ["node:buffer", "Buffer"],
|
|
35
|
-
"globalThis.Buffer": ["node:buffer", "Buffer"]
|
|
25
|
+
)
|
|
36
26
|
}
|
|
37
27
|
};
|
|
38
28
|
export const hybridNodePlugin = {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
generateFunctionFiles,
|
|
6
6
|
generateStaticFiles
|
|
7
7
|
} from "./utils.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { builtnNodeModules } from "../_unenv/node-compat/vercel.mjs";
|
|
9
9
|
const vercel = defineNitroPreset(
|
|
10
10
|
{
|
|
11
11
|
extends: "node",
|
|
@@ -48,9 +48,18 @@ const vercelEdge = defineNitroPreset(
|
|
|
48
48
|
deploy: "",
|
|
49
49
|
preview: ""
|
|
50
50
|
},
|
|
51
|
-
unenv:
|
|
51
|
+
unenv: {
|
|
52
|
+
external: builtnNodeModules.flatMap((m) => `node:${m}`),
|
|
53
|
+
alias: {
|
|
54
|
+
...Object.fromEntries(
|
|
55
|
+
builtnNodeModules.flatMap((m) => [
|
|
56
|
+
[m, `node:${m}`],
|
|
57
|
+
[`node:${m}`, `node:${m}`]
|
|
58
|
+
])
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
},
|
|
52
62
|
rollupConfig: {
|
|
53
|
-
plugins: [hybridNodePlugin],
|
|
54
63
|
output: {
|
|
55
64
|
format: "module"
|
|
56
65
|
}
|
package/dist/rollup/index.mjs
CHANGED
|
@@ -38,25 +38,31 @@ import { normalizeKey, builtinDrivers } from 'unstorage';
|
|
|
38
38
|
|
|
39
39
|
const common = {
|
|
40
40
|
alias: {
|
|
41
|
+
"node-mock-http/_polyfill/events": "node:events",
|
|
42
|
+
"node-mock-http/_polyfill/buffer": "node:buffer",
|
|
41
43
|
"buffer/": "node:buffer",
|
|
42
44
|
"buffer/index": "node:buffer",
|
|
43
45
|
"buffer/index.js": "node:buffer"
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
|
-
const node = {
|
|
47
|
-
alias: {
|
|
48
|
-
"node-mock-http/_polyfill/events": "node:events",
|
|
49
|
-
"node-mock-http/_polyfill/buffer": "node:buffer"
|
|
50
|
-
}
|
|
51
|
-
};
|
|
48
|
+
const node = {};
|
|
52
49
|
const nodeless = {
|
|
53
|
-
alias: {},
|
|
54
50
|
inject: {
|
|
51
|
+
global: "unenv/polyfill/globalthis",
|
|
52
|
+
process: "node:process",
|
|
53
|
+
Buffer: ["node:buffer", "Buffer"],
|
|
54
|
+
clearImmediate: ["node:timers", "clearImmediate"],
|
|
55
|
+
setImmediate: ["node:timers", "setImmediate"],
|
|
55
56
|
performance: "unenv/polyfill/performance",
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
PerformanceObserver: ["node:perf_hooks", "PerformanceObserver"],
|
|
58
|
+
BroadcastChannel: "node:node:worker_threads"
|
|
58
59
|
},
|
|
59
|
-
polyfill: [
|
|
60
|
+
polyfill: [
|
|
61
|
+
"unenv/polyfill/globalthis-global",
|
|
62
|
+
"unenv/polyfill/process",
|
|
63
|
+
"unenv/polyfill/buffer",
|
|
64
|
+
"unenv/polyfill/timers"
|
|
65
|
+
]
|
|
60
66
|
};
|
|
61
67
|
|
|
62
68
|
const PREFIX = "\0virtual:";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitropack-nightly",
|
|
3
|
-
"version": "2.11.0-20250228-
|
|
3
|
+
"version": "2.11.0-20250228-233255.f2f95bc7",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"repository": "nitrojs/nitro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"ultrahtml": "^1.5.3",
|
|
165
165
|
"uncrypto": "^0.1.3",
|
|
166
166
|
"unctx": "^2.4.1",
|
|
167
|
-
"unenv": "2.0.0-rc.
|
|
167
|
+
"unenv": "2.0.0-rc.9",
|
|
168
168
|
"unimport": "^4.1.2",
|
|
169
169
|
"unplugin-utils": "^0.2.4",
|
|
170
170
|
"unstorage": "^1.15.0",
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.assign(process.env, Deno.env.toObject());
|