next 15.3.0-canary.17 → 15.3.0-canary.19
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/bin/next +1 -1
- package/dist/build/index.js +2 -2
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack-config.js +2 -2
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/esm/build/index.js +2 -2
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack-config.js +2 -2
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/lib/require-instrumentation-client.js +14 -1
- package/dist/esm/lib/require-instrumentation-client.js.map +1 -1
- package/dist/esm/server/config-shared.js +1 -1
- package/dist/esm/server/config-shared.js.map +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/router-server.js +2 -10
- package/dist/esm/server/lib/router-server.js.map +1 -1
- package/dist/esm/server/lib/router-utils/block-cross-site.js +28 -14
- package/dist/esm/server/lib/router-utils/block-cross-site.js.map +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/shared/lib/canary-only.js +1 -1
- package/dist/lib/require-instrumentation-client.js +14 -1
- package/dist/lib/require-instrumentation-client.js.map +1 -1
- package/dist/server/config-shared.js +1 -1
- package/dist/server/config-shared.js.map +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/router-server.js +2 -10
- package/dist/server/lib/router-server.js.map +1 -1
- package/dist/server/lib/router-utils/block-cross-site.d.ts +1 -1
- package/dist/server/lib/router-utils/block-cross-site.js +28 -14
- package/dist/server/lib/router-utils/block-cross-site.js.map +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/shared/lib/canary-only.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../../src/server/lib/router-utils/block-cross-site.ts"],"sourcesContent":["import type { Duplex } from 'stream'\nimport type { IncomingMessage, ServerResponse } from 'webpack-dev-server'\nimport { parseUrl } from '../../../lib/url'\nimport net from 'net'\nimport { warnOnce } from '../../../build/output/log'\nimport { isCsrfOriginAllowed } from '../../app-render/csrf-protection'\n\nexport const blockCrossSite = (\n req: IncomingMessage,\n res: ServerResponse | Duplex,\n
|
1
|
+
{"version":3,"sources":["../../../../src/server/lib/router-utils/block-cross-site.ts"],"sourcesContent":["import type { Duplex } from 'stream'\nimport type { IncomingMessage, ServerResponse } from 'webpack-dev-server'\nimport { parseUrl } from '../../../lib/url'\nimport net from 'net'\nimport { warnOnce } from '../../../build/output/log'\nimport { isCsrfOriginAllowed } from '../../app-render/csrf-protection'\n\nfunction warnOrBlockRequest(\n res: ServerResponse | Duplex,\n origin: string | undefined,\n mode: 'warn' | 'block'\n): boolean {\n const originString = origin ? `from ${origin}` : ''\n if (mode === 'warn') {\n warnOnce(\n `Cross origin request detected ${originString} to /_next/* resource. In a future major version of Next.js, you will need to explicitly configure \"allowedDevOrigins\" in next.config to allow this.\\nRead more: https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins`\n )\n\n return false\n }\n\n warnOnce(\n `Blocked cross-origin request ${originString} to /_next/* resource. To allow this, configure \"allowedDevOrigins\" in next.config\\nRead more: https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins`\n )\n\n if ('statusCode' in res) {\n res.statusCode = 403\n }\n\n res.end('Unauthorized')\n\n return true\n}\n\nexport const blockCrossSite = (\n req: IncomingMessage,\n res: ServerResponse | Duplex,\n allowedDevOrigins: string[] | undefined,\n hostname: string | undefined,\n activePort: string\n): boolean => {\n // in the future, these will be blocked by default when allowed origins aren't configured.\n // for now, we warn when allowed origins aren't configured\n const mode = typeof allowedDevOrigins === 'undefined' ? 'warn' : 'block'\n\n const allowedOrigins = [\n '*.localhost',\n 'localhost',\n ...(allowedDevOrigins || []),\n ]\n if (hostname) {\n allowedOrigins.push(hostname)\n }\n\n // only process _next URLs when\n if (!req.url?.includes('/_next')) {\n return false\n }\n // block non-cors request from cross-site e.g. script tag on\n // different host\n if (\n req.headers['sec-fetch-mode'] === 'no-cors' &&\n req.headers['sec-fetch-site'] === 'cross-site'\n ) {\n return warnOrBlockRequest(res, undefined, mode)\n }\n\n // ensure websocket requests from allowed origin\n const rawOrigin = req.headers['origin']\n\n if (rawOrigin) {\n const parsedOrigin = parseUrl(rawOrigin)\n\n if (parsedOrigin) {\n const originLowerCase = parsedOrigin.hostname.toLowerCase()\n const isMatchingPort = parsedOrigin.port === activePort\n const isIpRequest =\n net.isIPv4(originLowerCase) || net.isIPv6(originLowerCase)\n\n if (\n // allow requests if direct IP and matching port and\n // allow if any of the allowed origins match\n !(isIpRequest && isMatchingPort) &&\n !isCsrfOriginAllowed(originLowerCase, allowedOrigins)\n ) {\n return warnOrBlockRequest(res, originLowerCase, mode)\n }\n }\n }\n\n return false\n}\n"],"names":["blockCrossSite","warnOrBlockRequest","res","origin","mode","originString","warnOnce","statusCode","end","req","allowedDevOrigins","hostname","activePort","allowedOrigins","push","url","includes","headers","undefined","rawOrigin","parsedOrigin","parseUrl","originLowerCase","toLowerCase","isMatchingPort","port","isIpRequest","net","isIPv4","isIPv6","isCsrfOriginAllowed"],"mappings":";;;;+BAkCaA;;;eAAAA;;;qBAhCY;4DACT;qBACS;gCACW;;;;;;AAEpC,SAASC,mBACPC,GAA4B,EAC5BC,MAA0B,EAC1BC,IAAsB;IAEtB,MAAMC,eAAeF,SAAS,CAAC,KAAK,EAAEA,QAAQ,GAAG;IACjD,IAAIC,SAAS,QAAQ;QACnBE,IAAAA,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oB,iBAAiBlB;YAClD;QACF;IACF;IAEA,OAAO;AACT"}
|
@@ -111,7 +111,7 @@ async function getRequestHandlers({ dir, port, isDev, onDevServerCleanup, server
|
|
111
111
|
async function startServer(serverOptions) {
|
112
112
|
const { dir, isDev, hostname, minimalMode, allowRetry, keepAliveTimeout, selfSignedCertificate } = serverOptions;
|
113
113
|
let { port } = serverOptions;
|
114
|
-
process.title = `next-server (v${"15.3.0-canary.
|
114
|
+
process.title = `next-server (v${"15.3.0-canary.19"})`;
|
115
115
|
let handlersReady = ()=>{};
|
116
116
|
let handlersError = ()=>{};
|
117
117
|
let handlersPromise = new Promise((resolve, reject)=>{
|
@@ -22,7 +22,7 @@ _export(exports, {
|
|
22
22
|
});
|
23
23
|
function isStableBuild() {
|
24
24
|
var _process_env___NEXT_VERSION;
|
25
|
-
return !((_process_env___NEXT_VERSION = "15.3.0-canary.
|
25
|
+
return !((_process_env___NEXT_VERSION = "15.3.0-canary.19") == null ? void 0 : _process_env___NEXT_VERSION.includes('canary')) && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
|
26
26
|
}
|
27
27
|
class CanaryOnlyError extends Error {
|
28
28
|
constructor(arg){
|
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "eventCliSessionStopped", {
|
|
11
11
|
const EVENT_VERSION = 'NEXT_CLI_SESSION_STOPPED';
|
12
12
|
function eventCliSessionStopped(event) {
|
13
13
|
// This should be an invariant, if it fails our build tooling is broken.
|
14
|
-
if (typeof "15.3.0-canary.
|
14
|
+
if (typeof "15.3.0-canary.19" !== 'string') {
|
15
15
|
return [];
|
16
16
|
}
|
17
17
|
const payload = {
|
18
|
-
nextVersion: "15.3.0-canary.
|
18
|
+
nextVersion: "15.3.0-canary.19",
|
19
19
|
nodeVersion: process.version,
|
20
20
|
cliCommand: event.cliCommand,
|
21
21
|
durationMilliseconds: event.durationMilliseconds,
|
@@ -36,12 +36,12 @@ function hasBabelConfig(dir) {
|
|
36
36
|
function eventCliSession(dir, nextConfig, event) {
|
37
37
|
var _nextConfig_experimental_staleTimes, _nextConfig_experimental_staleTimes1, _nextConfig_experimental_reactCompiler, _nextConfig_experimental_reactCompiler1;
|
38
38
|
// This should be an invariant, if it fails our build tooling is broken.
|
39
|
-
if (typeof "15.3.0-canary.
|
39
|
+
if (typeof "15.3.0-canary.19" !== 'string') {
|
40
40
|
return [];
|
41
41
|
}
|
42
42
|
const { images, i18n } = nextConfig || {};
|
43
43
|
const payload = {
|
44
|
-
nextVersion: "15.3.0-canary.
|
44
|
+
nextVersion: "15.3.0-canary.19",
|
45
45
|
nodeVersion: process.version,
|
46
46
|
cliCommand: event.cliCommand,
|
47
47
|
isSrcDir: event.isSrcDir,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "next",
|
3
|
-
"version": "15.3.0-canary.
|
3
|
+
"version": "15.3.0-canary.19",
|
4
4
|
"description": "The React Framework",
|
5
5
|
"main": "./dist/server/next.js",
|
6
6
|
"license": "MIT",
|
@@ -100,7 +100,7 @@
|
|
100
100
|
]
|
101
101
|
},
|
102
102
|
"dependencies": {
|
103
|
-
"@next/env": "15.3.0-canary.
|
103
|
+
"@next/env": "15.3.0-canary.19",
|
104
104
|
"@swc/counter": "0.1.3",
|
105
105
|
"@swc/helpers": "0.5.15",
|
106
106
|
"busboy": "1.6.0",
|
@@ -132,14 +132,14 @@
|
|
132
132
|
},
|
133
133
|
"optionalDependencies": {
|
134
134
|
"sharp": "^0.33.5",
|
135
|
-
"@next/swc-darwin-arm64": "15.3.0-canary.
|
136
|
-
"@next/swc-darwin-x64": "15.3.0-canary.
|
137
|
-
"@next/swc-linux-arm64-gnu": "15.3.0-canary.
|
138
|
-
"@next/swc-linux-arm64-musl": "15.3.0-canary.
|
139
|
-
"@next/swc-linux-x64-gnu": "15.3.0-canary.
|
140
|
-
"@next/swc-linux-x64-musl": "15.3.0-canary.
|
141
|
-
"@next/swc-win32-arm64-msvc": "15.3.0-canary.
|
142
|
-
"@next/swc-win32-x64-msvc": "15.3.0-canary.
|
135
|
+
"@next/swc-darwin-arm64": "15.3.0-canary.19",
|
136
|
+
"@next/swc-darwin-x64": "15.3.0-canary.19",
|
137
|
+
"@next/swc-linux-arm64-gnu": "15.3.0-canary.19",
|
138
|
+
"@next/swc-linux-arm64-musl": "15.3.0-canary.19",
|
139
|
+
"@next/swc-linux-x64-gnu": "15.3.0-canary.19",
|
140
|
+
"@next/swc-linux-x64-musl": "15.3.0-canary.19",
|
141
|
+
"@next/swc-win32-arm64-msvc": "15.3.0-canary.19",
|
142
|
+
"@next/swc-win32-x64-msvc": "15.3.0-canary.19"
|
143
143
|
},
|
144
144
|
"devDependencies": {
|
145
145
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
@@ -172,11 +172,11 @@
|
|
172
172
|
"@jest/types": "29.5.0",
|
173
173
|
"@mswjs/interceptors": "0.23.0",
|
174
174
|
"@napi-rs/triples": "1.2.0",
|
175
|
-
"@next/font": "15.3.0-canary.
|
176
|
-
"@next/polyfill-module": "15.3.0-canary.
|
177
|
-
"@next/polyfill-nomodule": "15.3.0-canary.
|
178
|
-
"@next/react-refresh-utils": "15.3.0-canary.
|
179
|
-
"@next/swc": "15.3.0-canary.
|
175
|
+
"@next/font": "15.3.0-canary.19",
|
176
|
+
"@next/polyfill-module": "15.3.0-canary.19",
|
177
|
+
"@next/polyfill-nomodule": "15.3.0-canary.19",
|
178
|
+
"@next/react-refresh-utils": "15.3.0-canary.19",
|
179
|
+
"@next/swc": "15.3.0-canary.19",
|
180
180
|
"@opentelemetry/api": "1.6.0",
|
181
181
|
"@playwright/test": "1.41.2",
|
182
182
|
"@storybook/addon-a11y": "8.6.0",
|