nitropack-nightly 2.12.5-20250726-101003.c3121977 → 2.12.5-20250819-193746.dc4f1a95

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.
@@ -2506,7 +2506,14 @@ function fmtFrame(frame) {
2506
2506
 
2507
2507
  function createVFSHandler(nitro) {
2508
2508
  return eventHandler(async (event) => {
2509
- const ip = getRequestIP(event, { xForwardedFor: false });
2509
+ const { socket } = event.node.req;
2510
+ const isUnixSocket = (
2511
+ // No network addresses
2512
+ !socket?.remoteAddress && !socket?.localAddress && // Empty address object
2513
+ Object.keys(socket?.address?.() || {}).length === 0 && // Socket is readable/writable but has no port info
2514
+ socket?.readable && socket?.writable && !socket?.remotePort
2515
+ );
2516
+ const ip = getRequestIP(event, { xForwardedFor: isUnixSocket });
2510
2517
  const isLocalRequest = ip && /^::1$|^127\.\d+\.\d+\.\d+$/.test(ip);
2511
2518
  if (!isLocalRequest) {
2512
2519
  throw createError({
@@ -1,4 +1,4 @@
1
- const version = "2.12.5-20250726-101003.c3121977";
1
+ const version = "2.12.5-20250819-193746.dc4f1a95";
2
2
 
3
3
  const compatibilityChanges = [
4
4
  {
@@ -14,7 +14,7 @@ export const handler = async function handler2(event, context) {
14
14
  (r) => r.builder || r.default.builder
15
15
  );
16
16
  const ttl = typeof routeRules.isr === "number" ? routeRules.isr : false;
17
- const builderHandler = ttl ? (event2, context2) => lambda(event2, context2).then((r) => ({ ...r, ttl })) : lambda;
17
+ const builderHandler = ttl ? ((event2, context2) => lambda(event2, context2).then((r) => ({ ...r, ttl }))) : lambda;
18
18
  return builder(builderHandler)(event, context);
19
19
  }
20
20
  return lambda(event, context);
@@ -46,17 +46,33 @@ export interface VercelBuildConfigV3 {
46
46
  }[];
47
47
  }
48
48
  /**
49
- * https://vercel.com/docs/build-output-api/v3/primitives#serverless-function-configuration
49
+ * https://vercel.com/docs/build-output-api/primitives#serverless-function-configuration
50
+ * https://vercel.com/docs/build-output-api/primitives#node.js-config
50
51
  */
51
52
  export interface VercelServerlessFunctionConfig {
52
53
  /**
53
54
  * Amount of memory (RAM in MB) that will be allocated to the Serverless Function.
54
55
  */
55
56
  memory?: number;
57
+ /**
58
+ * Specifies the instruction set "architecture" the Vercel Function supports.
59
+ *
60
+ * Either `x86_64` or `arm64`. The default value is `x86_64`
61
+ */
62
+ architecture?: "x86_64" | "arm64";
56
63
  /**
57
64
  * Maximum execution duration (in seconds) that will be allowed for the Serverless Function.
58
65
  */
59
66
  maxDuration?: number;
67
+ /**
68
+ * Map of additional environment variables that will be available to the Vercel Function,
69
+ * in addition to the env vars specified in the Project Settings.
70
+ */
71
+ environment?: Record<string, string>;
72
+ /**
73
+ * List of Vercel Regions where the Vercel Function will be deployed to.
74
+ */
75
+ regions?: string[];
60
76
  /**
61
77
  * True if a custom runtime has support for Lambda runtime wrappers.
62
78
  */
@@ -65,6 +81,10 @@ export interface VercelServerlessFunctionConfig {
65
81
  * When true, the Serverless Function will stream the response to the client.
66
82
  */
67
83
  supportsResponseStreaming?: boolean;
84
+ /**
85
+ * Enables source map generation.
86
+ */
87
+ shouldAddSourcemapSupport?: boolean;
68
88
  [key: string]: unknown;
69
89
  }
70
90
  export interface VercelOptions {
@@ -702,17 +702,17 @@ function normalizeMatcher(input) {
702
702
  return input;
703
703
  }
704
704
  if (input instanceof RegExp) {
705
- const matcher = (id) => input.test(id);
705
+ const matcher = ((id) => input.test(id));
706
706
  matcher.score = input.toString().length;
707
707
  Object.defineProperty(matcher, "name", { value: `match(${input})` });
708
708
  return matcher;
709
709
  }
710
710
  if (typeof input === "string") {
711
711
  const pattern = normalize(input);
712
- const matcher = (id) => {
712
+ const matcher = ((id) => {
713
713
  const idWithoutNodeModules = id.split("node_modules/").pop();
714
714
  return id.startsWith(pattern) || idWithoutNodeModules?.startsWith(pattern);
715
- };
715
+ });
716
716
  matcher.score = input.length;
717
717
  if (!isAbsolute(input) && input[0] !== ".") {
718
718
  matcher.score += 1e3;
@@ -93,7 +93,10 @@ function createNitroApp() {
93
93
  preemptive: true
94
94
  });
95
95
  const nodeHandler = toNodeListener(h3App);
96
- const localCall = (aRequest) => callNodeRequestHandler(nodeHandler, aRequest);
96
+ const localCall = (aRequest) => callNodeRequestHandler(
97
+ nodeHandler,
98
+ aRequest
99
+ );
97
100
  const localFetch = (input, init) => {
98
101
  if (!input.toString().startsWith("/")) {
99
102
  return globalThis.fetch(input, init);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitropack-nightly",
3
- "version": "2.12.5-20250726-101003.c3121977",
3
+ "version": "2.12.5-20250819-193746.dc4f1a95",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "repository": "nitrojs/nitro",
6
6
  "license": "MIT",
@@ -107,9 +107,9 @@
107
107
  "@rollup/plugin-node-resolve": "^16.0.1",
108
108
  "@rollup/plugin-replace": "^6.0.2",
109
109
  "@rollup/plugin-terser": "^0.4.4",
110
- "@vercel/nft": "^0.29.4",
110
+ "@vercel/nft": "^0.30.0",
111
111
  "archiver": "^7.0.1",
112
- "c12": "^3.1.0",
112
+ "c12": "^3.2.0",
113
113
  "chokidar": "^4.0.3",
114
114
  "citty": "^0.1.6",
115
115
  "compatx": "^0.2.0",
@@ -122,7 +122,7 @@
122
122
  "defu": "^6.1.4",
123
123
  "destr": "^2.0.5",
124
124
  "dot-prop": "^9.0.0",
125
- "esbuild": "^0.25.6",
125
+ "esbuild": "^0.25.9",
126
126
  "escape-string-regexp": "^5.0.0",
127
127
  "etag": "^1.8.1",
128
128
  "exsolve": "^1.0.7",
@@ -131,8 +131,8 @@
131
131
  "h3": "npm:h3-nightly@latest",
132
132
  "hookable": "^5.5.3",
133
133
  "httpxy": "^0.1.7",
134
- "ioredis": "^5.6.1",
135
- "jiti": "^2.4.2",
134
+ "ioredis": "^5.7.0",
135
+ "jiti": "^2.5.1",
136
136
  "klona": "^2.0.6",
137
137
  "knitwork": "^1.2.0",
138
138
  "listhen": "^1.9.0",
@@ -140,8 +140,8 @@
140
140
  "magicast": "^0.3.5",
141
141
  "mime": "^4.0.7",
142
142
  "mlly": "^1.7.4",
143
- "node-fetch-native": "^1.6.6",
144
- "node-mock-http": "^1.0.1",
143
+ "node-fetch-native": "^1.6.7",
144
+ "node-mock-http": "^1.0.2",
145
145
  "ofetch": "^1.4.1",
146
146
  "ohash": "^2.0.11",
147
147
  "pathe": "^2.0.3",
@@ -149,40 +149,40 @@
149
149
  "pkg-types": "^2.2.0",
150
150
  "pretty-bytes": "^6.1.1",
151
151
  "radix3": "^1.1.2",
152
- "rollup": "^4.45.0",
152
+ "rollup": "^4.46.3",
153
153
  "rollup-plugin-visualizer": "^6.0.3",
154
154
  "scule": "^1.3.0",
155
155
  "semver": "^7.7.2",
156
156
  "serve-placeholder": "^2.0.2",
157
157
  "serve-static": "^2.2.0",
158
- "source-map": "^0.7.4",
158
+ "source-map": "^0.7.6",
159
159
  "std-env": "^3.9.0",
160
160
  "ufo": "^1.6.1",
161
161
  "ultrahtml": "^1.6.0",
162
162
  "uncrypto": "^0.1.3",
163
163
  "unctx": "^2.4.1",
164
- "unenv": "^2.0.0-rc.18",
165
- "unimport": "^5.1.0",
166
- "unplugin-utils": "^0.2.4",
164
+ "unenv": "2.0.0-rc.19",
165
+ "unimport": "^5.2.0",
166
+ "unplugin-utils": "^0.2.5",
167
167
  "unstorage": "^1.16.1",
168
168
  "untyped": "^2.0.0",
169
- "unwasm": "^0.3.9",
169
+ "unwasm": "^0.3.11",
170
170
  "youch": "4.1.0-beta.8",
171
171
  "youch-core": "^0.3.3"
172
172
  },
173
173
  "devDependencies": {
174
174
  "@azure/functions": "^3.5.1",
175
175
  "@azure/static-web-apps-cli": "^2.0.6",
176
- "@cloudflare/workers-types": "^4.20250712.0",
176
+ "@cloudflare/workers-types": "^4.20250819.0",
177
177
  "@deno/types": "^0.0.1",
178
- "@netlify/edge-functions": "^2.15.6",
179
- "@scalar/api-reference": "^1.32.7",
178
+ "@netlify/edge-functions": "^2.17.1",
179
+ "@scalar/api-reference": "^1.34.2",
180
180
  "@types/archiver": "^6.0.3",
181
- "@types/aws-lambda": "^8.10.150",
181
+ "@types/aws-lambda": "^8.10.152",
182
182
  "@types/estree": "^1.0.8",
183
183
  "@types/etag": "^1.8.4",
184
184
  "@types/fs-extra": "^11.0.4",
185
- "@types/node-fetch": "^2.6.12",
185
+ "@types/node-fetch": "^2.6.13",
186
186
  "@types/semver": "^7.7.0",
187
187
  "@types/serve-static": "^1.15.8",
188
188
  "@types/xml2js": "^0.4.14",
@@ -190,21 +190,21 @@
190
190
  "automd": "^0.4.0",
191
191
  "changelogen": "^0.6.2",
192
192
  "edge-runtime": "^4.0.1",
193
- "eslint": "^9.31.0",
193
+ "eslint": "^9.33.0",
194
194
  "eslint-config-unjs": "^0.5.0",
195
195
  "execa": "^9.6.0",
196
196
  "expect-type": "^1.2.2",
197
197
  "firebase-admin": "^12.7.0",
198
198
  "firebase-functions": "^4.9.0",
199
199
  "get-port-please": "^3.2.0",
200
- "miniflare": "^4.20250709.0",
200
+ "miniflare": "^4.20250816.0",
201
201
  "ohash-v1": "npm:ohash@^1.1.6",
202
202
  "prettier": "^3.6.2",
203
- "typescript": "^5.8.3",
204
- "unbuild": "^3.5.0",
205
- "undici": "^7.11.0",
203
+ "typescript": "^5.9.2",
204
+ "unbuild": "^3.6.1",
205
+ "undici": "^7.14.0",
206
206
  "vitest": "^3.2.4",
207
- "wrangler": "^4.24.3",
207
+ "wrangler": "^4.31.0",
208
208
  "xml2js": "^0.6.2"
209
209
  },
210
210
  "peerDependencies": {