@timber-js/app 0.2.0-alpha.104 → 0.2.0-alpha.107
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/server/internal.js +3 -1
- package/dist/server/internal.js.map +1 -1
- package/dist/server/pipeline-phases.d.ts.map +1 -1
- package/dist/server/route-element-builder.d.ts.map +1 -1
- package/dist/server/rsc-entry/render-route.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/server/pipeline-phases.ts +10 -0
- package/src/server/route-element-builder.ts +9 -1
- package/src/server/rsc-entry/render-route.ts +3 -0
package/dist/server/internal.js
CHANGED
|
@@ -1814,7 +1814,8 @@ async function runRenderPhase(config, req, match, responseHeaders, requestHeader
|
|
|
1814
1814
|
*/
|
|
1815
1815
|
async function handleRequest(config, req, method, path) {
|
|
1816
1816
|
const stripTrailingSlash = config.stripTrailingSlash ?? true;
|
|
1817
|
-
const
|
|
1817
|
+
const url = new URL(req.url);
|
|
1818
|
+
const result = canonicalize(url.pathname, stripTrailingSlash);
|
|
1818
1819
|
if (!result.ok) return new Response(null, { status: result.status });
|
|
1819
1820
|
const canonicalPathname = result.pathname;
|
|
1820
1821
|
if (config.matchMetadataRoute) {
|
|
@@ -1881,6 +1882,7 @@ async function handleRequest(config, req, method, path) {
|
|
|
1881
1882
|
}
|
|
1882
1883
|
}
|
|
1883
1884
|
if (!match) {
|
|
1885
|
+
if (isDebug()) console.warn(`[timber] No route matched for pathname: ${canonicalPathname}\n Raw URL: ${url.pathname}\n Method: ${method}`);
|
|
1884
1886
|
if (config.renderNoMatch) {
|
|
1885
1887
|
const responseHeaders = new Headers();
|
|
1886
1888
|
return cloneWithMutableHeaders(await config.renderNoMatch(req, responseHeaders));
|