qalita 2.5.4__py3-none-any.whl → 2.6.1__py3-none-any.whl
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.
- qalita/_frontend/.next/static/_0oyfpC7N2IGDMa04TT9R/_clientMiddlewareManifest.json +6 -0
- qalita/_frontend/.next/static/chunks/236f7e5abd6f09ff.js +4 -0
- qalita/_frontend/.next/static/chunks/30ea11065999f7ac.js +1 -0
- qalita/_frontend/.next/static/chunks/4dd28bc3f722184a.js +2 -0
- qalita/_frontend/.next/static/chunks/711d597b816a80c1.js +1 -0
- qalita/_frontend/.next/static/chunks/7340adf74ff47ec0.js +1 -0
- qalita/_frontend/.next/static/chunks/a6dad97d9634a72d.js.map +1 -0
- qalita/_frontend/.next/static/chunks/{e393fec0d8ba175d.js → ecf559101be0ae12.js} +3 -3
- qalita/_frontend/.next/static/chunks/turbopack-25186fc8e1264445.js +4 -0
- qalita/_frontend/node_modules/@img/sharp-libvips-linux-x64/versions.json +30 -0
- qalita/_frontend/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- qalita/_frontend/node_modules/@next/env/package.json +4 -4
- qalita/_frontend/node_modules/next/dist/build/analyze/index.js +242 -0
- qalita/_frontend/node_modules/next/dist/build/define-env.js +22 -13
- qalita/_frontend/node_modules/next/dist/build/entries.js +5 -5
- qalita/_frontend/node_modules/next/dist/build/generate-routes-manifest.js +91 -0
- qalita/_frontend/node_modules/next/dist/build/index.js +172 -223
- qalita/_frontend/node_modules/next/dist/build/output/log.js +4 -7
- qalita/_frontend/node_modules/next/dist/build/segment-config/app/app-segments.js +23 -99
- qalita/_frontend/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +3 -3
- qalita/_frontend/node_modules/next/dist/build/spinner.js +3 -3
- qalita/_frontend/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
- qalita/_frontend/node_modules/next/dist/build/static-paths/app.js +69 -210
- qalita/_frontend/node_modules/next/dist/build/static-paths/utils.js +83 -11
- qalita/_frontend/node_modules/next/dist/build/swc/index.js +10 -6
- qalita/_frontend/node_modules/next/dist/build/templates/app-page.js +21 -14
- qalita/_frontend/node_modules/next/dist/build/templates/app-route.js +8 -10
- qalita/_frontend/node_modules/next/dist/build/templates/edge-app-route.js +7 -10
- qalita/_frontend/node_modules/next/dist/build/templates/edge-ssr-app.js +16 -20
- qalita/_frontend/node_modules/next/dist/build/templates/edge-ssr.js +20 -14
- qalita/_frontend/node_modules/next/dist/build/templates/edge-wrapper.js +24 -0
- qalita/_frontend/node_modules/next/dist/build/templates/middleware.js +7 -6
- qalita/_frontend/node_modules/next/dist/build/templates/pages-edge-api.js +3 -2
- qalita/_frontend/node_modules/next/dist/build/turbopack-analyze/index.js +116 -0
- qalita/_frontend/node_modules/next/dist/build/turbopack-build/impl.js +2 -1
- qalita/_frontend/node_modules/next/dist/build/type-check.js +7 -8
- qalita/_frontend/node_modules/next/dist/build/utils.js +45 -4
- qalita/_frontend/node_modules/next/dist/build/validate-app-paths.js +242 -0
- qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js +20 -2
- qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js +2 -5
- qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js +4 -11
- qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-root-params-loader.js +1 -1
- qalita/_frontend/node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.js +1 -1
- qalita/_frontend/node_modules/next/dist/build/webpack/plugins/middleware-plugin.js +3 -0
- qalita/_frontend/node_modules/next/dist/build/webpack-build/impl.js +1 -0
- qalita/_frontend/node_modules/next/dist/build/webpack-config.js +35 -3
- qalita/_frontend/node_modules/next/dist/cli/next-test.js +3 -5
- qalita/_frontend/node_modules/next/dist/client/components/app-router-headers.js +5 -0
- qalita/_frontend/node_modules/next/dist/client/components/app-router-instance.js +3 -11
- qalita/_frontend/node_modules/next/dist/client/components/app-router.js +8 -28
- qalita/_frontend/node_modules/next/dist/client/components/navigation-devtools.js +5 -7
- qalita/_frontend/node_modules/next/dist/client/components/navigation.js +4 -3
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +3 -22
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +6 -18
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +844 -590
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +4 -76
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +21 -18
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +48 -85
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +25 -10
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +126 -113
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +30 -39
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +0 -1
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/router-reducer.js +2 -2
- qalita/_frontend/node_modules/next/dist/client/components/segment-cache/cache-map.js +13 -18
- qalita/_frontend/node_modules/next/dist/client/components/segment-cache/cache.js +27 -14
- qalita/_frontend/node_modules/next/dist/client/components/segment-cache/lru.js +3 -1
- qalita/_frontend/node_modules/next/dist/client/components/segment-cache/navigation.js +176 -133
- qalita/_frontend/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +12 -12
- qalita/_frontend/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +12 -12
- qalita/_frontend/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +3 -3
- qalita/_frontend/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +10 -10
- qalita/_frontend/node_modules/next/dist/compiled/react-is/package.json +1 -1
- qalita/_frontend/node_modules/next/dist/lib/build-custom-route.js +4 -4
- qalita/_frontend/node_modules/next/dist/lib/constants.js +0 -5
- qalita/_frontend/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
- qalita/_frontend/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +0 -1
- qalita/_frontend/node_modules/next/dist/lib/helpers/get-npx-command.js +3 -3
- qalita/_frontend/node_modules/next/dist/lib/inline-static-env.js +1 -1
- qalita/_frontend/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
- qalita/_frontend/node_modules/next/dist/lib/metadata/metadata.js +17 -11
- qalita/_frontend/node_modules/next/dist/lib/needs-experimental-react.js +2 -2
- qalita/_frontend/node_modules/next/dist/lib/resolve-build-paths.js +44 -76
- qalita/_frontend/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
- qalita/_frontend/node_modules/next/dist/lib/static-env.js +6 -6
- qalita/_frontend/node_modules/next/dist/lib/turbopack-warning.js +3 -5
- qalita/_frontend/node_modules/next/dist/lib/typescript/runTypeCheck.js +61 -5
- qalita/_frontend/node_modules/next/dist/lib/typescript/type-paths.js +56 -0
- qalita/_frontend/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +6 -17
- qalita/_frontend/node_modules/next/dist/lib/verify-typescript-setup.js +10 -2
- qalita/_frontend/node_modules/next/dist/lib/worker.js +17 -9
- qalita/_frontend/node_modules/next/dist/server/app-render/action-handler.js +113 -77
- qalita/_frontend/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +36 -15
- qalita/_frontend/node_modules/next/dist/server/app-render/app-render-render-utils.js +36 -15
- qalita/_frontend/node_modules/next/dist/server/app-render/app-render-scheduling.js +188 -0
- qalita/_frontend/node_modules/next/dist/server/app-render/app-render.js +804 -748
- qalita/_frontend/node_modules/next/dist/server/app-render/collect-segment-data.js +8 -2
- qalita/_frontend/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +1 -1
- qalita/_frontend/node_modules/next/dist/server/app-render/create-error-handler.js +42 -75
- qalita/_frontend/node_modules/next/dist/server/app-render/dynamic-rendering.js +127 -14
- qalita/_frontend/node_modules/next/dist/server/app-render/encryption-utils.js +3 -108
- qalita/_frontend/node_modules/next/dist/server/app-render/encryption.js +4 -3
- qalita/_frontend/node_modules/next/dist/server/app-render/flight-render-result.js +3 -2
- qalita/_frontend/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +9 -8
- qalita/_frontend/node_modules/next/dist/server/app-render/get-layer-assets.js +1 -1
- qalita/_frontend/node_modules/next/dist/server/app-render/manifests-singleton.js +257 -0
- qalita/_frontend/node_modules/next/dist/server/app-render/prospective-render-utils.js +25 -8
- qalita/_frontend/node_modules/next/dist/server/app-render/staged-rendering.js +161 -15
- qalita/_frontend/node_modules/next/dist/server/app-render/use-flight-response.js +67 -20
- qalita/_frontend/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +2 -2
- qalita/_frontend/node_modules/next/dist/server/async-storage/work-store.js +2 -1
- qalita/_frontend/node_modules/next/dist/server/base-server.js +32 -23
- qalita/_frontend/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
- qalita/_frontend/node_modules/next/dist/server/config-schema.js +8 -1
- qalita/_frontend/node_modules/next/dist/server/config-shared.js +83 -2
- qalita/_frontend/node_modules/next/dist/server/config.js +24 -17
- qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
- qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +37 -25
- qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-types.js +1 -0
- qalita/_frontend/node_modules/next/dist/server/dev/hot-reloader-webpack.js +62 -57
- qalita/_frontend/node_modules/next/dist/server/dev/log-requests.js +11 -3
- qalita/_frontend/node_modules/next/dist/server/dev/messages.js +10 -0
- qalita/_frontend/node_modules/next/dist/server/dev/serialized-errors.js +67 -0
- qalita/_frontend/node_modules/next/dist/server/dev/static-paths-worker.js +10 -0
- qalita/_frontend/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- qalita/_frontend/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +2 -2
- qalita/_frontend/node_modules/next/dist/server/lib/dev-bundler-service.js +6 -10
- qalita/_frontend/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +4 -4
- qalita/_frontend/node_modules/next/dist/server/lib/lazy-result.js +1 -1
- qalita/_frontend/node_modules/next/dist/server/lib/patch-fetch.js +9 -9
- qalita/_frontend/node_modules/next/dist/server/lib/router-server.js +43 -29
- qalita/_frontend/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +0 -21
- qalita/_frontend/node_modules/next/dist/server/lib/router-utils/filesystem.js +2 -7
- qalita/_frontend/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +8 -4
- qalita/_frontend/node_modules/next/dist/server/lib/start-server.js +3 -3
- qalita/_frontend/node_modules/next/dist/server/lib/trace/tracer.js +4 -0
- qalita/_frontend/node_modules/next/dist/server/load-components.js +3 -9
- qalita/_frontend/node_modules/next/dist/server/next-server.js +19 -18
- qalita/_frontend/node_modules/next/dist/server/next.js +1 -1
- qalita/_frontend/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +570 -0
- qalita/_frontend/node_modules/next/dist/server/node-environment-extensions/utils.js +60 -3
- qalita/_frontend/node_modules/next/dist/server/node-environment.js +1 -0
- qalita/_frontend/node_modules/next/dist/server/patch-error-inspect.js +7 -4
- qalita/_frontend/node_modules/next/dist/server/request/fallback-params.js +23 -66
- qalita/_frontend/node_modules/next/dist/server/route-modules/app-route/module.js +2 -2
- qalita/_frontend/node_modules/next/dist/server/route-modules/pages/pages-handler.js +6 -3
- qalita/_frontend/node_modules/next/dist/server/route-modules/route-module.js +79 -18
- qalita/_frontend/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +28 -4
- qalita/_frontend/node_modules/next/dist/server/typescript/rules/config.js +50 -6
- qalita/_frontend/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +68 -23
- qalita/_frontend/node_modules/next/dist/server/web/edge-route-module-wrapper.js +7 -5
- qalita/_frontend/node_modules/next/dist/server/web/sandbox/context.js +8 -9
- qalita/_frontend/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +2 -1
- qalita/_frontend/node_modules/next/dist/server/web/spec-extension/revalidate.js +7 -3
- qalita/_frontend/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
- qalita/_frontend/node_modules/next/dist/shared/lib/constants.js +6 -1
- qalita/_frontend/node_modules/next/dist/shared/lib/deployment-id.js +36 -0
- qalita/_frontend/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- qalita/_frontend/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +5 -0
- qalita/_frontend/node_modules/next/dist/shared/lib/router/routes/app.js +122 -0
- qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +20 -49
- qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +6 -6
- qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
- qalita/_frontend/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
- qalita/_frontend/node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js +3 -24
- qalita/_frontend/node_modules/next/dist/shared/lib/segment.js +5 -0
- qalita/_frontend/node_modules/next/dist/shared/lib/turbopack/utils.js +6 -5
- qalita/_frontend/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- qalita/_frontend/node_modules/next/dist/telemetry/events/build.js +11 -0
- qalita/_frontend/node_modules/next/dist/telemetry/events/version.js +2 -2
- qalita/_frontend/node_modules/next/package.json +20 -18
- qalita/_frontend/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/typesMap.json +497 -0
- qalita/_frontend/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- qalita/_frontend/package.json +3 -3
- qalita/_frontend/server.js +1 -1
- qalita/commands/pack.py +3 -3
- qalita/commands/source.py +1 -1
- qalita/internal/utils.py +11 -7
- qalita/web/app.py +20 -4
- {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/METADATA +1 -1
- {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/RECORD +197 -168
- qalita/_frontend/.next/static/chunks/023d923a37d494fc.js +0 -1
- qalita/_frontend/.next/static/chunks/247eb132b7f7b574.js +0 -1
- qalita/_frontend/.next/static/chunks/bba035711c7e37a2.js +0 -4
- qalita/_frontend/.next/static/chunks/c903f9580a4b6572.js +0 -2
- qalita/_frontend/.next/static/chunks/cbd55ab9639e1e66.js +0 -1
- qalita/_frontend/.next/static/chunks/turbopack-1ad58da399056f41.js +0 -3
- qalita/_frontend/node_modules/next/dist/build/deployment-id.js +0 -18
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/apply-flight-data.js +0 -53
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/apply-router-state-patch-to-tree.js +0 -105
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fill-cache-with-new-subtree-data.js +0 -110
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.js +0 -131
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/handle-segment-mismatch.js +0 -25
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/invalidate-cache-by-router-state.js +0 -32
- qalita/_frontend/node_modules/next/dist/client/components/router-reducer/refetch-inactive-parallel-segments.js +0 -104
- qalita/_frontend/node_modules/next/dist/server/app-render/action-utils.js +0 -90
- qalita/_frontend/node_modules/next/dist/server/normalizers/request/prefetch-rsc.js +0 -31
- /qalita/_frontend/.next/static/{X4_AlYMbCyee-ZVLjCYMg → _0oyfpC7N2IGDMa04TT9R}/_buildManifest.js +0 -0
- /qalita/_frontend/.next/static/{X4_AlYMbCyee-ZVLjCYMg → _0oyfpC7N2IGDMa04TT9R}/_ssgManifest.js +0 -0
- {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/WHEEL +0 -0
- {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/entry_points.txt +0 -0
- {qalita-2.5.4.dist-info → qalita-2.6.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -67,7 +67,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
67
67
|
* Since it is impossible to pass a function from main thread to a worker,
|
|
68
68
|
* instead of running "next/lib/typescript/runTypeCheck" in a worker,
|
|
69
69
|
* we will run entire "next/lib/verify-typescript-setup" in a worker instead.
|
|
70
|
-
*/ function verifyTypeScriptSetup(dir, distDir,
|
|
70
|
+
*/ function verifyTypeScriptSetup(dir, distDir, typeCheckPreflight, tsconfigPath, disableStaticImages, cacheDir, enableWorkerThreads, hasAppDir, hasPagesDir, isolatedDevBuild, appDir, pagesDir, debugBuildPaths) {
|
|
71
71
|
const typeCheckWorker = new _worker.Worker(require.resolve('../lib/verify-typescript-setup'), {
|
|
72
72
|
exposedMethods: [
|
|
73
73
|
'verifyTypeScriptSetup'
|
|
@@ -81,14 +81,16 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
81
81
|
return typeCheckWorker.verifyTypeScriptSetup({
|
|
82
82
|
dir,
|
|
83
83
|
distDir,
|
|
84
|
-
intentDirs,
|
|
85
84
|
typeCheckPreflight,
|
|
86
85
|
tsconfigPath,
|
|
87
86
|
disableStaticImages,
|
|
88
87
|
cacheDir,
|
|
89
88
|
hasAppDir,
|
|
90
89
|
hasPagesDir,
|
|
91
|
-
isolatedDevBuild
|
|
90
|
+
isolatedDevBuild,
|
|
91
|
+
appDir,
|
|
92
|
+
pagesDir,
|
|
93
|
+
debugBuildPaths
|
|
92
94
|
}).then((result)=>{
|
|
93
95
|
typeCheckWorker.end();
|
|
94
96
|
return result;
|
|
@@ -98,7 +100,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
98
100
|
process.exit(1);
|
|
99
101
|
});
|
|
100
102
|
}
|
|
101
|
-
async function startTypeChecking({ cacheDir, config, dir, nextBuildSpan, pagesDir, telemetry, appDir }) {
|
|
103
|
+
async function startTypeChecking({ cacheDir, config, dir, nextBuildSpan, pagesDir, telemetry, appDir, debugBuildPaths }) {
|
|
102
104
|
const ignoreTypeScriptErrors = Boolean(config.typescript.ignoreBuildErrors);
|
|
103
105
|
if (ignoreTypeScriptErrors) {
|
|
104
106
|
_log.info('Skipping validation of types');
|
|
@@ -113,10 +115,7 @@ async function startTypeChecking({ cacheDir, config, dir, nextBuildSpan, pagesDi
|
|
|
113
115
|
}
|
|
114
116
|
const typeCheckAndLintStart = process.hrtime();
|
|
115
117
|
try {
|
|
116
|
-
const [verifyResult, typeCheckEnd] = await nextBuildSpan.traceChild('run-typescript').traceAsyncFn(()=>verifyTypeScriptSetup(dir, config.distDir,
|
|
117
|
-
pagesDir,
|
|
118
|
-
appDir
|
|
119
|
-
].filter(Boolean), !ignoreTypeScriptErrors, config.typescript.tsconfigPath, config.images.disableStaticImages, cacheDir, config.experimental.workerThreads, !!appDir, !!pagesDir, config.experimental.isolatedDevBuild).then((resolved)=>{
|
|
118
|
+
const [verifyResult, typeCheckEnd] = await nextBuildSpan.traceChild('run-typescript').traceAsyncFn(()=>verifyTypeScriptSetup(dir, config.distDir, !ignoreTypeScriptErrors, config.typescript.tsconfigPath, config.images.disableStaticImages, cacheDir, config.experimental.workerThreads, !!appDir, !!pagesDir, config.experimental.isolatedDevBuild, appDir, pagesDir, debugBuildPaths).then((resolved)=>{
|
|
120
119
|
const checkEnd = process.hrtime(typeCheckAndLintStart);
|
|
121
120
|
return [
|
|
122
121
|
resolved,
|
|
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
28
28
|
isWebpackBundledLayer: null,
|
|
29
29
|
isWebpackClientOnlyLayer: null,
|
|
30
30
|
isWebpackDefaultLayer: null,
|
|
31
|
+
pageToRoute: null,
|
|
31
32
|
printBuildErrors: null,
|
|
32
33
|
printCustomRoutes: null,
|
|
33
34
|
printTreeView: null,
|
|
@@ -117,6 +118,9 @@ _export(exports, {
|
|
|
117
118
|
isWebpackDefaultLayer: function() {
|
|
118
119
|
return isWebpackDefaultLayer;
|
|
119
120
|
},
|
|
121
|
+
pageToRoute: function() {
|
|
122
|
+
return pageToRoute;
|
|
123
|
+
},
|
|
120
124
|
printBuildErrors: function() {
|
|
121
125
|
return printBuildErrors;
|
|
122
126
|
},
|
|
@@ -137,6 +141,7 @@ _export(exports, {
|
|
|
137
141
|
}
|
|
138
142
|
});
|
|
139
143
|
const _ppr = require("../server/lib/experimental/ppr");
|
|
144
|
+
const _loadcustomroutes = require("../lib/load-custom-routes");
|
|
140
145
|
const _constants = require("../lib/constants");
|
|
141
146
|
require("../server/require-hook");
|
|
142
147
|
require("../server/node-polyfill-crypto");
|
|
@@ -167,6 +172,8 @@ const _app = require("./static-paths/app");
|
|
|
167
172
|
const _pages = require("./static-paths/pages");
|
|
168
173
|
const _format = require("./output/format");
|
|
169
174
|
const _utils = require("../shared/lib/turbopack/utils");
|
|
175
|
+
const _routeregex = require("../shared/lib/router/utils/route-regex");
|
|
176
|
+
const _app1 = require("../shared/lib/router/routes/app");
|
|
170
177
|
function _interop_require_default(obj) {
|
|
171
178
|
return obj && obj.__esModule ? obj : {
|
|
172
179
|
default: obj
|
|
@@ -666,6 +673,7 @@ async function isPageStatic({ dir, page, distDir, configFileName, httpAgentOptio
|
|
|
666
673
|
const Comp = Component;
|
|
667
674
|
let isRoutePPREnabled = false;
|
|
668
675
|
if (pageType === 'app') {
|
|
676
|
+
// @ts-expect-error pageType is app, so we can assume AppPageModule | AppRouteModule
|
|
669
677
|
const ComponentMod = componentsResult.ComponentMod;
|
|
670
678
|
let segments;
|
|
671
679
|
try {
|
|
@@ -696,14 +704,16 @@ async function isPageStatic({ dir, page, distDir, configFileName, httpAgentOptio
|
|
|
696
704
|
if (appConfig.dynamic === 'force-dynamic' && !isRoutePPREnabled) {
|
|
697
705
|
appConfig.revalidate = 0;
|
|
698
706
|
}
|
|
707
|
+
const route = (0, _app1.parseAppRoute)(page, true);
|
|
699
708
|
// If the page is dynamic and we're not in edge runtime, then we need to
|
|
700
709
|
// build the static paths. The edge runtime doesn't support static
|
|
701
710
|
// paths.
|
|
702
|
-
if (
|
|
711
|
+
if (route.dynamicSegments.length > 0 && !pathIsEdgeRuntime) {
|
|
703
712
|
;
|
|
704
713
|
({ prerenderedRoutes, fallbackMode: prerenderFallbackMode } = await (0, _app.buildAppStaticPaths)({
|
|
705
714
|
dir,
|
|
706
715
|
page,
|
|
716
|
+
route,
|
|
707
717
|
cacheComponents,
|
|
708
718
|
authInterrupts,
|
|
709
719
|
segments,
|
|
@@ -858,11 +868,14 @@ async function hasCustomGetInitialProps({ page, distDir, checkingApp, sriEnabled
|
|
|
858
868
|
});
|
|
859
869
|
let mod = ComponentMod;
|
|
860
870
|
if (checkingApp) {
|
|
871
|
+
// @ts-expect-error very dynamic code
|
|
861
872
|
mod = await mod._app || mod.default || mod;
|
|
862
873
|
} else {
|
|
874
|
+
// @ts-expect-error very dynamic code
|
|
863
875
|
mod = mod.default || mod;
|
|
864
876
|
}
|
|
865
877
|
mod = await mod;
|
|
878
|
+
// @ts-expect-error very dynamic code
|
|
866
879
|
return mod.getInitialProps !== mod.origGetInitialProps;
|
|
867
880
|
}
|
|
868
881
|
async function getDefinedNamedExports({ page, distDir, sriEnabled }) {
|
|
@@ -989,9 +1002,25 @@ async function copyTracedFiles(dir, distDir, pageKeys, appPageKeys, tracingRoot,
|
|
|
989
1002
|
if (symlink) {
|
|
990
1003
|
try {
|
|
991
1004
|
await _fs.promises.symlink(symlink, fileOutputPath);
|
|
992
|
-
} catch (
|
|
993
|
-
|
|
994
|
-
|
|
1005
|
+
} catch (err) {
|
|
1006
|
+
// Windows doesn't support creating symlinks without elevated privileges, unless
|
|
1007
|
+
// "Developer Mode" is turned on. If we failed to crate a symlink due to EPERM, try
|
|
1008
|
+
// creating a junction point instead.
|
|
1009
|
+
//
|
|
1010
|
+
// Ideally we'd just preserve the input file type (junction point or symlink), but
|
|
1011
|
+
// there's no API in node.js to differentiate between a junction point and a symlink,
|
|
1012
|
+
// so we just try making a symlink first. Symlinks are preferred because they support
|
|
1013
|
+
// relative paths and non-directory (file) targets.
|
|
1014
|
+
if (process.platform === 'win32' && err.code === 'EPERM' && _path.default.isAbsolute(symlink)) {
|
|
1015
|
+
try {
|
|
1016
|
+
await _fs.promises.symlink(symlink, fileOutputPath, 'junction');
|
|
1017
|
+
} catch (junctionErr) {
|
|
1018
|
+
if (junctionErr.code !== 'EEXIST') {
|
|
1019
|
+
throw junctionErr;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
} else if (err.code !== 'EEXIST') {
|
|
1023
|
+
throw err;
|
|
995
1024
|
}
|
|
996
1025
|
}
|
|
997
1026
|
} else {
|
|
@@ -1216,5 +1245,17 @@ const RSPACK_DEFAULT_LAYERS_REGEX = new RegExp(`^(|${[
|
|
|
1216
1245
|
_constants.WEBPACK_LAYERS.pagesDirEdge,
|
|
1217
1246
|
_constants.WEBPACK_LAYERS.pagesDirNode
|
|
1218
1247
|
].join('|')})$`);
|
|
1248
|
+
function pageToRoute(page, sourcePage) {
|
|
1249
|
+
const routeRegex = (0, _routeregex.getNamedRouteRegex)(page, {
|
|
1250
|
+
prefixRouteKeys: true
|
|
1251
|
+
});
|
|
1252
|
+
return {
|
|
1253
|
+
sourcePage,
|
|
1254
|
+
page,
|
|
1255
|
+
regex: (0, _loadcustomroutes.normalizeRouteRegex)(routeRegex.re.source),
|
|
1256
|
+
routeKeys: routeRegex.routeKeys,
|
|
1257
|
+
namedRegex: routeRegex.namedRegex
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1219
1260
|
|
|
1220
1261
|
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "validateAppPaths", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return validateAppPaths;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _getsegmentparam = require("../shared/lib/router/utils/get-segment-param");
|
|
12
|
+
const _app = require("../shared/lib/router/routes/app");
|
|
13
|
+
/**
|
|
14
|
+
* Validates segment parameters for common syntax errors.
|
|
15
|
+
* Based on validation logic from sorted-routes.ts
|
|
16
|
+
*/ function validateSegmentParam(param, pathname) {
|
|
17
|
+
// Check for empty parameter names
|
|
18
|
+
if (param.paramName.length === 0) {
|
|
19
|
+
throw Object.defineProperty(new Error(`Parameter names cannot be empty in route "${pathname}".`), "__NEXT_ERROR_CODE", {
|
|
20
|
+
value: "E922",
|
|
21
|
+
enumerable: false,
|
|
22
|
+
configurable: true
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// Check for three-dot character (…) instead of ...
|
|
26
|
+
if (param.paramName.includes('…')) {
|
|
27
|
+
throw Object.defineProperty(new Error(`Detected a three-dot character ('…') in parameter "${param.paramName}" in route "${pathname}". Did you mean ('...')?`), "__NEXT_ERROR_CODE", {
|
|
28
|
+
value: "E921",
|
|
29
|
+
enumerable: false,
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
// Check for optional non-catch-all segments (not yet supported)
|
|
34
|
+
if (param.paramType !== 'optional-catchall' && param.paramName.startsWith('[') && param.paramName.endsWith(']')) {
|
|
35
|
+
throw Object.defineProperty(new Error(`Optional route parameters are not yet supported ("[${param.paramName}]") in route "${pathname}".`), "__NEXT_ERROR_CODE", {
|
|
36
|
+
value: "E926",
|
|
37
|
+
enumerable: false,
|
|
38
|
+
configurable: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Check for extra brackets
|
|
42
|
+
if (param.paramName.startsWith('[') || param.paramName.endsWith(']')) {
|
|
43
|
+
throw Object.defineProperty(new Error(`Segment names may not start or end with extra brackets ('${param.paramName}') in route "${pathname}".`), "__NEXT_ERROR_CODE", {
|
|
44
|
+
value: "E916",
|
|
45
|
+
enumerable: false,
|
|
46
|
+
configurable: true
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
// Check for erroneous periods
|
|
50
|
+
if (param.paramName.startsWith('.')) {
|
|
51
|
+
throw Object.defineProperty(new Error(`Segment names may not start with erroneous periods ('${param.paramName}') in route "${pathname}".`), "__NEXT_ERROR_CODE", {
|
|
52
|
+
value: "E920",
|
|
53
|
+
enumerable: false,
|
|
54
|
+
configurable: true
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Validates a Route object for internal consistency.
|
|
60
|
+
* Checks for duplicate slugs, invalid catch-all placement, and other route errors.
|
|
61
|
+
* For interception routes, validates both the intercepting and intercepted routes separately.
|
|
62
|
+
* Returns the validated segment parameters.
|
|
63
|
+
*/ function validateAppRoute(route) {
|
|
64
|
+
// For interception routes, validate the intercepting and intercepted routes separately
|
|
65
|
+
// This allows the same parameter name to appear in both parts
|
|
66
|
+
if ((0, _app.isInterceptionAppRoute)(route)) {
|
|
67
|
+
validateAppRoute(route.interceptingRoute);
|
|
68
|
+
validateAppRoute(route.interceptedRoute);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
// Then validate semantic constraints (duplicates, normalization, positioning)
|
|
72
|
+
const slugNames = new Set();
|
|
73
|
+
const normalizedSegments = new Set();
|
|
74
|
+
let hasCatchAll = false;
|
|
75
|
+
let hasOptionalCatchAllInPath = false;
|
|
76
|
+
let catchAllPosition = -1;
|
|
77
|
+
for(let i = 0; i < route.segments.length; i++){
|
|
78
|
+
const segment = route.segments[i];
|
|
79
|
+
// Type narrowing - only process dynamic segments
|
|
80
|
+
if (segment.type === 'dynamic') {
|
|
81
|
+
// First, validate syntax
|
|
82
|
+
validateSegmentParam(segment.param, route.pathname);
|
|
83
|
+
const properties = (0, _getsegmentparam.getParamProperties)(segment.param.paramType);
|
|
84
|
+
if (properties.repeat) {
|
|
85
|
+
if (properties.optional) {
|
|
86
|
+
hasOptionalCatchAllInPath = true;
|
|
87
|
+
} else {
|
|
88
|
+
hasCatchAll = true;
|
|
89
|
+
}
|
|
90
|
+
catchAllPosition = i;
|
|
91
|
+
}
|
|
92
|
+
// Check to see if the parameter name is already in use.
|
|
93
|
+
if (slugNames.has(segment.param.paramName)) {
|
|
94
|
+
throw Object.defineProperty(new Error(`You cannot have the same slug name "${segment.param.paramName}" repeat within a single dynamic path in route "${route.pathname}".`), "__NEXT_ERROR_CODE", {
|
|
95
|
+
value: "E914",
|
|
96
|
+
enumerable: false,
|
|
97
|
+
configurable: true
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
// Normalize parameter name for comparison by removing all non-word
|
|
101
|
+
// characters.
|
|
102
|
+
const normalizedSegment = segment.param.paramName.replace(/\W/g, '');
|
|
103
|
+
if (normalizedSegments.has(normalizedSegment)) {
|
|
104
|
+
const existing = Array.from(slugNames).find((s)=>{
|
|
105
|
+
return s.replace(/\W/g, '') === normalizedSegment;
|
|
106
|
+
});
|
|
107
|
+
throw Object.defineProperty(new Error(`You cannot have the slug names "${existing}" and "${segment.param.paramName}" differ only by non-word symbols within a single dynamic path in route "${route.pathname}".`), "__NEXT_ERROR_CODE", {
|
|
108
|
+
value: "E919",
|
|
109
|
+
enumerable: false,
|
|
110
|
+
configurable: true
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
slugNames.add(segment.param.paramName);
|
|
114
|
+
normalizedSegments.add(normalizedSegment);
|
|
115
|
+
}
|
|
116
|
+
// Check if catch-all is not at the end
|
|
117
|
+
if (hasCatchAll && i > catchAllPosition) {
|
|
118
|
+
throw Object.defineProperty(new Error(`Catch-all must be the last part of the URL in route "${route.pathname}".`), "__NEXT_ERROR_CODE", {
|
|
119
|
+
value: "E918",
|
|
120
|
+
enumerable: false,
|
|
121
|
+
configurable: true
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (hasOptionalCatchAllInPath && i > catchAllPosition) {
|
|
125
|
+
throw Object.defineProperty(new Error(`Optional catch-all must be the last part of the URL in route "${route.pathname}".`), "__NEXT_ERROR_CODE", {
|
|
126
|
+
value: "E913",
|
|
127
|
+
enumerable: false,
|
|
128
|
+
configurable: true
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// Check for both required and optional catch-all
|
|
133
|
+
if (hasCatchAll && hasOptionalCatchAllInPath) {
|
|
134
|
+
throw Object.defineProperty(new Error(`You cannot use both a required and optional catch-all route at the same level in route "${route.pathname}".`), "__NEXT_ERROR_CODE", {
|
|
135
|
+
value: "E911",
|
|
136
|
+
enumerable: false,
|
|
137
|
+
configurable: true
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Validates a single path for internal consistency and returns its segment parameters.
|
|
143
|
+
*/ function parseAndValidateAppPath(path) {
|
|
144
|
+
// Fast parse the route information. We're expecting this to be a normalized
|
|
145
|
+
// route, so we pass `true` to the `parseAppRoute` function.
|
|
146
|
+
const route = (0, _app.parseAppRoute)(path, true);
|
|
147
|
+
// Slow walk the data from the route in order to validate it.
|
|
148
|
+
validateAppRoute(route);
|
|
149
|
+
return route;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Normalizes segments by replacing dynamic segment names with placeholders.
|
|
153
|
+
* This allows us to compare routes for structural equivalence.
|
|
154
|
+
* Preserves interception markers so that routes with different markers are not considered ambiguous.
|
|
155
|
+
*
|
|
156
|
+
* Examples:
|
|
157
|
+
* - [slug] -> [*]
|
|
158
|
+
* - [modalSlug] -> [*]
|
|
159
|
+
* - [...slug] -> [...*]
|
|
160
|
+
* - [[...slug]] -> [[...*]]
|
|
161
|
+
* - (..)test -> (..)test
|
|
162
|
+
* - (..)[slug] -> (..)[*]
|
|
163
|
+
*/ function normalizeSegments(segments) {
|
|
164
|
+
return '/' + segments.map((segment)=>{
|
|
165
|
+
if (segment.type === 'static') {
|
|
166
|
+
return segment.name;
|
|
167
|
+
}
|
|
168
|
+
// Dynamic segment - normalize the parameter name by replacing the
|
|
169
|
+
// parameter name with a wildcard. The interception marker is already
|
|
170
|
+
// included in the segment name, so no special handling is needed.
|
|
171
|
+
return segment.name.replace(segment.param.paramName, '*');
|
|
172
|
+
}).join('/');
|
|
173
|
+
}
|
|
174
|
+
function validateAppPaths(appPaths) {
|
|
175
|
+
// First, validate each path individually
|
|
176
|
+
const paramsByPath = new Map();
|
|
177
|
+
for (const path of appPaths){
|
|
178
|
+
paramsByPath.set(path, parseAndValidateAppPath(path));
|
|
179
|
+
}
|
|
180
|
+
// Group paths by their normalized structure for ambiguity detection
|
|
181
|
+
const structureMap = new Map();
|
|
182
|
+
for (const [path, route] of paramsByPath){
|
|
183
|
+
// Check if the last segment is an optional catch-all and check to see if
|
|
184
|
+
// there is a route with the same specificity that conflicts with it.
|
|
185
|
+
const lastSegment = route.segments[route.segments.length - 1];
|
|
186
|
+
if ((lastSegment == null ? void 0 : lastSegment.type) === 'dynamic' && lastSegment.param.paramType === 'optional-catchall') {
|
|
187
|
+
const prefixSegments = route.segments.slice(0, -1);
|
|
188
|
+
const normalizedPrefix = normalizeSegments(prefixSegments);
|
|
189
|
+
for (const [appPath, appRoute] of paramsByPath){
|
|
190
|
+
const normalizedAppPath = normalizeSegments(appRoute.segments);
|
|
191
|
+
// Special case: root-level optional catch-all
|
|
192
|
+
// /[[...slug]] has prefix '' which should match '/'
|
|
193
|
+
if (prefixSegments.length === 0 && appPath === '/') {
|
|
194
|
+
throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as an optional catch-all route ("${appPath}" and "/[[...${lastSegment.param.paramName}]]").`), "__NEXT_ERROR_CODE", {
|
|
195
|
+
value: "E925",
|
|
196
|
+
enumerable: false,
|
|
197
|
+
configurable: true
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
// General case: compare normalized structures
|
|
201
|
+
if (normalizedAppPath === normalizedPrefix) {
|
|
202
|
+
throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as an optional catch-all route ("${appPath}" and "${normalizedPrefix}/[[...${lastSegment.param.paramName}]]").`), "__NEXT_ERROR_CODE", {
|
|
203
|
+
value: "E917",
|
|
204
|
+
enumerable: false,
|
|
205
|
+
configurable: true
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// Normalize the route to get its structure
|
|
211
|
+
const structure = normalizeSegments(route.segments);
|
|
212
|
+
// Track which paths map to this structure
|
|
213
|
+
const existingPaths = structureMap.get(structure) ?? [];
|
|
214
|
+
existingPaths.push(path);
|
|
215
|
+
structureMap.set(structure, existingPaths);
|
|
216
|
+
}
|
|
217
|
+
// Check for ambiguous routes (different slug names, same structure)
|
|
218
|
+
const conflicts = [];
|
|
219
|
+
for (const [structure, paths] of structureMap){
|
|
220
|
+
if (paths.length > 1) {
|
|
221
|
+
// Multiple paths map to the same structure - this is ambiguous
|
|
222
|
+
conflicts.push({
|
|
223
|
+
paths,
|
|
224
|
+
normalizedPath: structure
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (conflicts.length > 0) {
|
|
229
|
+
const errorMessages = conflicts.map(({ paths, normalizedPath })=>{
|
|
230
|
+
const pathsList = paths.map((p)=>` - ${p}`).join('\n');
|
|
231
|
+
return `Ambiguous route pattern "${normalizedPath}" matches multiple routes:\n${pathsList}`;
|
|
232
|
+
});
|
|
233
|
+
throw Object.defineProperty(new Error(`Ambiguous app routes detected:\n\n${errorMessages.join('\n\n')}\n\n` + `These routes cannot be distinguished from each other when matching URLs. ` + `Please ensure that dynamic segments have unique patterns or use different static segments.`), "__NEXT_ERROR_CODE", {
|
|
234
|
+
value: "E912",
|
|
235
|
+
enumerable: false,
|
|
236
|
+
configurable: true
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
return Array.from(paramsByPath.values());
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
//# sourceMappingURL=validate-app-paths.js.map
|
|
@@ -25,8 +25,10 @@ const _loadentrypoint = require("../../../load-entrypoint");
|
|
|
25
25
|
const _segment = require("../../../../shared/lib/segment");
|
|
26
26
|
const _getfilesindir = require("../../../../lib/get-files-in-dir");
|
|
27
27
|
const _default = require("../../../../client/components/builtin/default");
|
|
28
|
+
const _defaultnull = require("../../../../client/components/builtin/default-null");
|
|
28
29
|
const _createapproutecode = require("./create-app-route-code");
|
|
29
30
|
const _missingdefaultparallelrouteerror = require("../../../../shared/lib/errors/missing-default-parallel-route-error");
|
|
31
|
+
const _interceptionroutes = require("../../../../shared/lib/router/utils/interception-routes");
|
|
30
32
|
const _normalizepathsep = require("../../../../shared/lib/page-path/normalize-path-sep");
|
|
31
33
|
const _installbindings = require("../../../swc/install-bindings");
|
|
32
34
|
function _interop_require_default(obj) {
|
|
@@ -418,7 +420,18 @@ async function createTreeCodeFromPath(pagePath, { page, resolveDir, resolver, re
|
|
|
418
420
|
let defaultPath = await resolver(`${fullSegmentPath}/default`);
|
|
419
421
|
if (!defaultPath) {
|
|
420
422
|
if (adjacentParallelSegment === 'children') {
|
|
421
|
-
|
|
423
|
+
// When we host applications on Vercel, the status code affects the
|
|
424
|
+
// underlying behavior of the route, which when we are missing the
|
|
425
|
+
// children slot of an interception route, will yield a full 404
|
|
426
|
+
// response for the RSC request instead. For this reason, we expect
|
|
427
|
+
// that if a default file is missing when we're rendering an
|
|
428
|
+
// interception route, we instead always render null for the default
|
|
429
|
+
// slot to avoid the full 404 response.
|
|
430
|
+
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(page)) {
|
|
431
|
+
defaultPath = _defaultnull.PARALLEL_ROUTE_DEFAULT_NULL_PATH;
|
|
432
|
+
} else {
|
|
433
|
+
defaultPath = _default.PARALLEL_ROUTE_DEFAULT_PATH;
|
|
434
|
+
}
|
|
422
435
|
} else {
|
|
423
436
|
// Check if we're inside a catch-all route (i.e., the parallel route is a child
|
|
424
437
|
// of a catch-all segment). Only skip validation if the slot is UNDER a catch-all.
|
|
@@ -491,7 +504,12 @@ const nextAppLoader = async function nextAppLoader() {
|
|
|
491
504
|
}
|
|
492
505
|
const buildInfo = (0, _getmodulebuildinfo.getModuleBuildInfo)(this._module);
|
|
493
506
|
const collectedDeclarations = [];
|
|
494
|
-
|
|
507
|
+
// Use the page from loaderOptions directly instead of deriving it from name.
|
|
508
|
+
// The name (bundlePath) may have been normalized with normalizePagePath()
|
|
509
|
+
// which is designed for Pages Router and incorrectly duplicates /index paths
|
|
510
|
+
// (e.g., /index/page -> /index/index/page). The page parameter contains the
|
|
511
|
+
// correct unnormalized value.
|
|
512
|
+
const page = loaderOptions.page;
|
|
495
513
|
const middlewareConfig = JSON.parse(Buffer.from(middlewareConfigBase64, 'base64').toString());
|
|
496
514
|
buildInfo.route = {
|
|
497
515
|
page,
|
qalita/_frontend/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js
CHANGED
|
@@ -14,7 +14,7 @@ const _constants = require("../../../../lib/constants");
|
|
|
14
14
|
const _loadentrypoint = require("../../../load-entrypoint");
|
|
15
15
|
const _ismetadataroute = require("../../../../lib/metadata/is-metadata-route");
|
|
16
16
|
const EdgeAppRouteLoader = async function() {
|
|
17
|
-
const { page, absolutePagePath, preferredRegion, appDirLoader: appDirLoaderBase64 = '', middlewareConfig: middlewareConfigBase64 = '',
|
|
17
|
+
const { page, absolutePagePath, preferredRegion, appDirLoader: appDirLoaderBase64 = '', middlewareConfig: middlewareConfigBase64 = '', cacheHandlers: cacheHandlersStringified } = this.getOptions();
|
|
18
18
|
const appDirLoader = Buffer.from(appDirLoaderBase64, 'base64').toString();
|
|
19
19
|
const middlewareConfig = JSON.parse(Buffer.from(middlewareConfigBase64, 'base64').toString());
|
|
20
20
|
const cacheHandlers = JSON.parse(cacheHandlersStringified || '{}');
|
|
@@ -41,13 +41,10 @@ const EdgeAppRouteLoader = async function() {
|
|
|
41
41
|
};
|
|
42
42
|
const stringifiedPagePath = (0, _stringifyrequest.stringifyRequest)(this, absolutePagePath);
|
|
43
43
|
const modulePath = `${appDirLoader}${stringifiedPagePath.substring(1, stringifiedPagePath.length - 1)}?${_constants.WEBPACK_RESOURCE_QUERIES.edgeSSREntry}`;
|
|
44
|
-
const stringifiedConfig = Buffer.from(nextConfigBase64 || '', 'base64').toString();
|
|
45
44
|
return await (0, _loadentrypoint.loadEntrypoint)('edge-app-route', {
|
|
46
45
|
VAR_USERLAND: modulePath,
|
|
47
46
|
VAR_PAGE: page
|
|
48
|
-
}, {
|
|
49
|
-
nextConfig: stringifiedConfig
|
|
50
|
-
});
|
|
47
|
+
}, {});
|
|
51
48
|
};
|
|
52
49
|
const _default = EdgeAppRouteLoader;
|
|
53
50
|
|
|
@@ -32,21 +32,17 @@ function getRouteModuleOptions(page) {
|
|
|
32
32
|
// The following aren't used in production.
|
|
33
33
|
bundlePath: '',
|
|
34
34
|
filename: ''
|
|
35
|
-
}
|
|
36
|
-
// edge runtime doesn't read from distDir or projectDir
|
|
37
|
-
distDir: '',
|
|
38
|
-
relativeProjectDir: ''
|
|
35
|
+
}
|
|
39
36
|
};
|
|
40
37
|
return options;
|
|
41
38
|
}
|
|
42
39
|
const edgeSSRLoader = async function edgeSSRLoader() {
|
|
43
|
-
const { page, absolutePagePath, absoluteAppPath, absoluteDocumentPath, absolute500Path, absoluteErrorPath, isServerComponent,
|
|
40
|
+
const { page, absolutePagePath, absoluteAppPath, absoluteDocumentPath, absolute500Path, absoluteErrorPath, isServerComponent, appDirLoader: appDirLoaderBase64, pagesType, cacheHandler, cacheHandlers: cacheHandlersStringified, preferredRegion, middlewareConfig: middlewareConfigBase64 } = this.getOptions();
|
|
44
41
|
const cacheHandlers = JSON.parse(cacheHandlersStringified || '{}');
|
|
45
42
|
if (!cacheHandlers.default) {
|
|
46
43
|
cacheHandlers.default = require.resolve('../../../../server/lib/cache-handlers/default.external');
|
|
47
44
|
}
|
|
48
45
|
const middlewareConfig = JSON.parse(Buffer.from(middlewareConfigBase64, 'base64').toString());
|
|
49
|
-
const stringifiedConfig = Buffer.from(stringifiedConfigBase64 || '', 'base64').toString();
|
|
50
46
|
const appDirLoader = Buffer.from(appDirLoaderBase64 || '', 'base64').toString();
|
|
51
47
|
const isAppDir = pagesType === 'app';
|
|
52
48
|
const buildInfo = (0, _getmodulebuildinfo.getModuleBuildInfo)(this._module);
|
|
@@ -72,20 +68,17 @@ const edgeSSRLoader = async function edgeSSRLoader() {
|
|
|
72
68
|
return await (0, _loadentrypoint.loadEntrypoint)('edge-ssr-app', {
|
|
73
69
|
VAR_USERLAND: pageModPath,
|
|
74
70
|
VAR_PAGE: page
|
|
75
|
-
}, {
|
|
76
|
-
nextConfig: stringifiedConfig
|
|
77
|
-
}, {
|
|
71
|
+
}, {}, {
|
|
78
72
|
incrementalCacheHandler: cacheHandler ?? null
|
|
79
73
|
});
|
|
80
74
|
} else {
|
|
81
75
|
return await (0, _loadentrypoint.loadEntrypoint)('edge-ssr', {
|
|
82
76
|
VAR_USERLAND: pageModPath,
|
|
83
|
-
|
|
77
|
+
VAR_DEFINITION_PATHNAME: page,
|
|
84
78
|
VAR_MODULE_DOCUMENT: documentPath,
|
|
85
79
|
VAR_MODULE_APP: appPath,
|
|
86
80
|
VAR_MODULE_GLOBAL_ERROR: errorPath
|
|
87
81
|
}, {
|
|
88
|
-
nextConfig: stringifiedConfig,
|
|
89
82
|
pageRouteModuleOptions: JSON.stringify(getRouteModuleOptions(page)),
|
|
90
83
|
errorRouteModuleOptions: JSON.stringify(getRouteModuleOptions('/_error')),
|
|
91
84
|
user500RouteModuleOptions: JSON.stringify(getRouteModuleOptions('/500'))
|
|
@@ -155,7 +155,7 @@ function getParamsFromLayoutFilePath({ appDir, layoutFilePath }) {
|
|
|
155
155
|
for (const segment of segments){
|
|
156
156
|
const param = (0, _getsegmentparam.getSegmentParam)(segment);
|
|
157
157
|
if (param !== null) {
|
|
158
|
-
paramNames.push(param.
|
|
158
|
+
paramNames.push(param.paramName);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
return paramNames;
|
|
@@ -19,7 +19,7 @@ const _constants = require("../../../shared/lib/constants");
|
|
|
19
19
|
const _buildcontext = require("../../build-context");
|
|
20
20
|
const _constants1 = require("../../../lib/constants");
|
|
21
21
|
const _normalizepagepath = require("../../../shared/lib/page-path/normalize-page-path");
|
|
22
|
-
const _deploymentid = require("
|
|
22
|
+
const _deploymentid = require("../../../shared/lib/deployment-id");
|
|
23
23
|
const _utils = require("../utils");
|
|
24
24
|
const _encodeuripath = require("../../../shared/lib/encode-uri-path");
|
|
25
25
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -81,6 +81,9 @@ function getEntryFiles(entryFiles, meta, hasInstrumentationHook, opts) {
|
|
|
81
81
|
files.push(`server/${_constants.DYNAMIC_CSS_MANIFEST}.js`);
|
|
82
82
|
}
|
|
83
83
|
files.push(`server/${_constants.MIDDLEWARE_BUILD_MANIFEST}.js`, `server/${_constants.MIDDLEWARE_REACT_LOADABLE_MANIFEST}.js`, `server/${_constants.NEXT_FONT_MANIFEST}.js`, `server/${_constants.INTERCEPTION_ROUTE_REWRITE_MANIFEST}.js`);
|
|
84
|
+
if (!opts.dev) {
|
|
85
|
+
files.push(`${_constants.SERVER_FILES_MANIFEST}.js`);
|
|
86
|
+
}
|
|
84
87
|
}
|
|
85
88
|
if (hasInstrumentationHook) {
|
|
86
89
|
files.push(`server/edge-${_constants1.INSTRUMENTATION_HOOK_FILENAME}.js`);
|
|
@@ -371,6 +371,7 @@ async function workerMain(workerData) {
|
|
|
371
371
|
result.buildTraceContext.chunksTrace.entryNameFilesMap = entryNameFilesMap;
|
|
372
372
|
}
|
|
373
373
|
_buildcontext.NextBuildContext.nextBuildSpan.stop();
|
|
374
|
+
await telemetry.flush();
|
|
374
375
|
return {
|
|
375
376
|
...result,
|
|
376
377
|
debugTraceEvents: (0, _trace.getTraceEvents)()
|
|
@@ -62,6 +62,7 @@ const _picocolors = require("../lib/picocolors");
|
|
|
62
62
|
const _crypto = /*#__PURE__*/ _interop_require_default(require("crypto"));
|
|
63
63
|
const _webpack = require("next/dist/compiled/webpack/webpack");
|
|
64
64
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
65
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
65
66
|
const _defineenv = require("./define-env");
|
|
66
67
|
const _escaperegexp = require("../shared/lib/escape-regexp");
|
|
67
68
|
const _constants = require("../lib/constants");
|
|
@@ -103,6 +104,7 @@ const _getrspack = require("../shared/lib/get-rspack");
|
|
|
103
104
|
const _rspackprofilingplugin = require("./webpack/plugins/rspack-profiling-plugin");
|
|
104
105
|
const _getwebpackbundler = /*#__PURE__*/ _interop_require_default(require("../shared/lib/get-webpack-bundler"));
|
|
105
106
|
const _requirehook = require("../server/require-hook");
|
|
107
|
+
const _json5 = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/json5"));
|
|
106
108
|
function _interop_require_default(obj) {
|
|
107
109
|
return obj && obj.__esModule ? obj : {
|
|
108
110
|
default: obj
|
|
@@ -149,7 +151,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
149
151
|
}
|
|
150
152
|
return newObj;
|
|
151
153
|
}
|
|
152
|
-
const EXTERNAL_PACKAGES =
|
|
154
|
+
const EXTERNAL_PACKAGES = _json5.default.parse(_fs.default.readFileSync(_path.default.join(__dirname, '../lib/server-external-packages.jsonc'), 'utf8'));
|
|
153
155
|
const DEFAULT_TRANSPILED_PACKAGES = require('../lib/default-transpiled-packages.json');
|
|
154
156
|
if (parseInt(_react.default.version) < 18) {
|
|
155
157
|
throw Object.defineProperty(new Error('Next.js requires react >= 18.2.0 to be installed.'), "__NEXT_ERROR_CODE", {
|
|
@@ -1723,7 +1725,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1723
1725
|
isClient && new _copyfileplugin.CopyFilePlugin({
|
|
1724
1726
|
// file path to build output of `@next/polyfill-nomodule`
|
|
1725
1727
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
|
1726
|
-
cacheKey: "16.
|
|
1728
|
+
cacheKey: "16.1.1",
|
|
1727
1729
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
|
1728
1730
|
minimize: false,
|
|
1729
1731
|
info: {
|
|
@@ -1819,6 +1821,14 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1819
1821
|
if (isRspack) {
|
|
1820
1822
|
// The layers experiment is now stable in Rspack
|
|
1821
1823
|
delete webpack5Config.experiments.layers;
|
|
1824
|
+
if (!webpack5Config.node) {
|
|
1825
|
+
webpack5Config.node = {};
|
|
1826
|
+
}
|
|
1827
|
+
// NOTE: Rspack's defaults differ from webpack.
|
|
1828
|
+
if (isClient || isEdgeServer) {
|
|
1829
|
+
webpack5Config.node.__dirname = 'mock';
|
|
1830
|
+
webpack5Config.node.__filename = 'mock';
|
|
1831
|
+
}
|
|
1822
1832
|
}
|
|
1823
1833
|
webpack5Config.module.parser = {
|
|
1824
1834
|
javascript: {
|
|
@@ -1909,7 +1919,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1909
1919
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
|
1910
1920
|
// - Next.js version
|
|
1911
1921
|
// - next.config.js keys that affect compilation
|
|
1912
|
-
version: `${__dirname}|${"16.
|
|
1922
|
+
version: `${__dirname}|${"16.1.1"}|${configVars}`,
|
|
1913
1923
|
cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
|
|
1914
1924
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
|
1915
1925
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
|
@@ -1946,6 +1956,28 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1946
1956
|
});
|
|
1947
1957
|
});
|
|
1948
1958
|
webpack5Config.cache = cache;
|
|
1959
|
+
if (isRspack) {
|
|
1960
|
+
const buildDependencies = [];
|
|
1961
|
+
if (config.configFile) {
|
|
1962
|
+
buildDependencies.push(config.configFile);
|
|
1963
|
+
}
|
|
1964
|
+
if (babelConfigFile) {
|
|
1965
|
+
buildDependencies.push(babelConfigFile);
|
|
1966
|
+
}
|
|
1967
|
+
if (jsConfigPath) {
|
|
1968
|
+
buildDependencies.push(jsConfigPath);
|
|
1969
|
+
}
|
|
1970
|
+
// @ts-ignore
|
|
1971
|
+
webpack5Config.experiments.cache = {
|
|
1972
|
+
type: 'persistent',
|
|
1973
|
+
buildDependencies,
|
|
1974
|
+
storage: {
|
|
1975
|
+
type: 'filesystem',
|
|
1976
|
+
directory: cache.cacheDirectory
|
|
1977
|
+
},
|
|
1978
|
+
version: `${__dirname}|${"16.1.1"}|${configVars}`
|
|
1979
|
+
};
|
|
1980
|
+
}
|
|
1949
1981
|
if (process.env.NEXT_WEBPACK_LOGGING) {
|
|
1950
1982
|
const infra = process.env.NEXT_WEBPACK_LOGGING.includes('infrastructure');
|
|
1951
1983
|
const profileClient = process.env.NEXT_WEBPACK_LOGGING.includes('profile-client');
|