/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
esm
/
build
/
/opt/canhelp/node_modules/next/dist/esm/build
mkdir
upload
Name
Size
Mode
Actions
adapter/
-
0755
rm
analysis/
-
0755
rm
babel/
-
0755
rm
manifests/
-
0755
rm
next-config-ts/
-
0755
rm
output/
-
0755
rm
polyfills/
-
0755
rm
segment-config/
-
0755
rm
static-paths/
-
0755
rm
swc/
-
0755
rm
templates/
-
0755
rm
turbopack-build/
-
0755
rm
turborepo-access-trace/
-
0755
rm
webpack/
-
0755
rm
webpack-build/
-
0755
rm
webpack-config-rules/
-
0755
rm
after-production-compile.js
1622
0644
edit
dl
rm
after-production-compile.js.map
3139
0644
edit
dl
rm
build-context.js
1353
0644
edit
dl
rm
build-context.js.map
4056
0644
edit
dl
rm
collect-build-traces.js
21598
0644
edit
dl
rm
collect-build-traces.js.map
35392
0644
edit
dl
rm
compiler.js
2884
0644
edit
dl
rm
compiler.js.map
4786
0644
edit
dl
rm
create-compiler-aliases.js
24564
0644
edit
dl
rm
create-compiler-aliases.js.map
39961
0644
edit
dl
rm
define-env.js
14335
0644
edit
dl
rm
define-env.js.map
23166
0644
edit
dl
rm
deployment-id.js
218
0644
edit
dl
rm
deployment-id.js.map
506
0644
edit
dl
rm
duration-to-string.js
544
0644
edit
dl
rm
duration-to-string.js.map
1084
0644
edit
dl
rm
entries.js
36260
0644
edit
dl
rm
entries.js.map
61660
0644
edit
dl
rm
generate-build-id.js
794
0644
edit
dl
rm
generate-build-id.js.map
1198
0644
edit
dl
rm
get-babel-config-file.js
622
0644
edit
dl
rm
get-babel-config-file.js.map
1100
0644
edit
dl
rm
get-babel-loader-config.js
2937
0644
edit
dl
rm
get-babel-loader-config.js.map
4885
0644
edit
dl
rm
handle-entrypoints.js
4571
0644
edit
dl
rm
handle-entrypoints.js.map
7076
0644
edit
dl
rm
handle-externals.js
13623
0644
edit
dl
rm
handle-externals.js.map
21653
0644
edit
dl
rm
index.js
147239
0644
edit
dl
rm
index.js.map
225575
0644
edit
dl
rm
is-writeable.js
262
0644
edit
dl
rm
is-writeable.js.map
635
0644
edit
dl
rm
load-entrypoint.js
1700
0644
edit
dl
rm
load-entrypoint.js.map
3098
0644
edit
dl
rm
load-jsconfig.js
3451
0644
edit
dl
rm
load-jsconfig.js.map
6508
0644
edit
dl
rm
next-dir-paths.js
301
0644
edit
dl
rm
next-dir-paths.js.map
681
0644
edit
dl
rm
normalize-catchall-routes.js
4195
0644
edit
dl
rm
normalize-catchall-routes.js.map
6643
0644
edit
dl
rm
page-extensions-type.js
61
0644
edit
dl
rm
page-extensions-type.js.map
180
0644
edit
dl
rm
preview-key-utils.js
3408
0644
edit
dl
rm
preview-key-utils.js.map
5966
0644
edit
dl
rm
progress.js
2949
0644
edit
dl
rm
progress.js.map
4588
0644
edit
dl
rm
rendering-mode.js
618
0644
edit
dl
rm
rendering-mode.js.map
711
0644
edit
dl
rm
spinner.js
2869
0644
edit
dl
rm
spinner.js.map
4933
0644
edit
dl
rm
type-check.js
5278
0644
edit
dl
rm
type-check.js.map
9251
0644
edit
dl
rm
utils.js
53806
0644
edit
dl
rm
utils.js.map
95393
0644
edit
dl
rm
webpack-config.js
108498
0644
edit
dl
rm
webpack-config.js.map
158206
0644
edit
dl
rm
worker.js
206
0644
edit
dl
rm
worker.js.map
481
0644
edit
dl
rm
write-build-id.js
331
0644
edit
dl
rm
write-build-id.js.map
743
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/esm/build/normalize-catchall-routes.js
(4195B)
import { isInterceptionRouteAppPath } from '../shared/lib/router/utils/interception-routes'; import { AppPathnameNormalizer } from '../server/normalizers/built/app/app-pathname-normalizer'; /** * This function will transform the appPaths in order to support catch-all routes and parallel routes. * It will traverse the appPaths, looking for catch-all routes and try to find parallel routes that could match * the catch-all. If it finds a match, it will add the catch-all to the parallel route's list of possible routes. * * @param appPaths The appPaths to transform */ export function normalizeCatchAllRoutes(appPaths, normalizer = new AppPathnameNormalizer()) { const catchAllRoutes = [ ...new Set(Object.values(appPaths).flat().filter(isCatchAllRoute)// Sorting is important because we want to match the most specific path. .sort((a, b)=>b.split('/').length - a.split('/').length)) ]; // interception routes should only be matched by a single entrypoint // we don't want to push a catch-all route to an interception route // because it would mean the interception would be handled by the wrong page component const filteredAppPaths = Object.keys(appPaths).filter((route)=>!isInterceptionRouteAppPath(route)); for (const appPath of filteredAppPaths){ for (const catchAllRoute of catchAllRoutes){ const normalizedCatchAllRoute = normalizer.normalize(catchAllRoute); const normalizedCatchAllRouteBasePath = normalizedCatchAllRoute.slice(0, normalizedCatchAllRoute.search(catchAllRouteRegex)); if (// check if the appPath could match the catch-all appPath.startsWith(normalizedCatchAllRouteBasePath) && // check if there's not already a slot value that could match the catch-all !appPaths[appPath].some((path)=>hasMatchedSlots(path, catchAllRoute))) { // optional catch-all routes are not currently supported, but leaving this logic in place // for when they are eventually supported. if (isOptionalCatchAll(catchAllRoute)) { // optional catch-all routes should match both the root segment and any segment after it // for example, `/[[...slug]]` should match `/` and `/foo` and `/foo/bar` appPaths[appPath].push(catchAllRoute); } else if (isCatchAll(catchAllRoute)) { // regular catch-all (single bracket) should only match segments after it // for example, `/[...slug]` should match `/foo` and `/foo/bar` but not `/` if (normalizedCatchAllRouteBasePath !== appPath) { appPaths[appPath].push(catchAllRoute); } } } } } } function hasMatchedSlots(path1, path2) { const slots1 = path1.split('/').filter(isMatchableSlot); const slots2 = path2.split('/').filter(isMatchableSlot); // if the catch-all route does not have the same number of slots as the app path, it can't match if (slots1.length !== slots2.length) return false; // compare the slots in both paths. For there to be a match, each slot must be the same for(let i = 0; i < slots1.length; i++){ if (slots1[i] !== slots2[i]) return false; } return true; } /** * Returns true for slots that should be considered when checking for match compatibility. * Excludes children slots because these are similar to having a segment-level `page` * which would cause a slot length mismatch when comparing it to a catch-all route. */ function isMatchableSlot(segment) { return segment.startsWith('@') && segment !== '@children'; } const catchAllRouteRegex = /\[?\[\.\.\./; function isCatchAllRoute(pathname) { // Optional catch-all slots are not currently supported, and as such they are not considered when checking for match compatability. return !isOptionalCatchAll(pathname) && isCatchAll(pathname); } function isOptionalCatchAll(pathname) { return pathname.includes('[[...'); } function isCatchAll(pathname) { return pathname.includes('[...'); } //# sourceMappingURL=normalize-catchall-routes.js.map
Save
cmd:
run