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
|
@@ -15,6 +15,8 @@ const _nodewebstreamshelper = require("../stream-utils/node-web-streams-helper")
|
|
|
15
15
|
const _scheduler = require("../../lib/scheduler");
|
|
16
16
|
const _segmentvalueencoding = require("../../shared/lib/segment-cache/segment-value-encoding");
|
|
17
17
|
const _createerrorhandler = require("./create-error-handler");
|
|
18
|
+
const _prospectiverenderutils = require("./prospective-render-utils");
|
|
19
|
+
const _workasyncstorageexternal = require("./work-async-storage.external");
|
|
18
20
|
const filterStackFrame = process.env.NODE_ENV !== 'production' ? require('../lib/source-maps').filterStackFrameDEV : undefined;
|
|
19
21
|
const findSourceMapURL = process.env.NODE_ENV !== 'production' ? require('../lib/source-maps').findSourceMapURLDEV : undefined;
|
|
20
22
|
function onSegmentPrerenderError(error) {
|
|
@@ -22,8 +24,12 @@ function onSegmentPrerenderError(error) {
|
|
|
22
24
|
if (digest) {
|
|
23
25
|
return digest;
|
|
24
26
|
}
|
|
25
|
-
// We don't need to log the errors because we would have already done that
|
|
26
|
-
// when generating the original Flight stream for the whole page.
|
|
27
|
+
// We don't need to log the errors because we would have already done that
|
|
28
|
+
// when generating the original Flight stream for the whole page.
|
|
29
|
+
if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {
|
|
30
|
+
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
31
|
+
(0, _prospectiverenderutils.printDebugThrownValueForProspectiveRender)(error, (workStore == null ? void 0 : workStore.route) ?? 'unknown route', _prospectiverenderutils.Phase.SegmentCollection);
|
|
32
|
+
}
|
|
27
33
|
}
|
|
28
34
|
async function collectSegmentData(isCacheComponentsEnabled, fullPageDataBuffer, staleTime, clientModules, serverConsumerManifest) {
|
|
29
35
|
// Traverse the router tree and generate a prefetch response for each segment.
|
qalita/_frontend/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js
CHANGED
|
@@ -15,7 +15,7 @@ const _encodeuripath = require("../../shared/lib/encode-uri-path");
|
|
|
15
15
|
const _rendercssresource = require("./render-css-resource");
|
|
16
16
|
async function createComponentStylesAndScripts({ filePath, getComponent, injectedCSS, injectedJS, ctx }) {
|
|
17
17
|
const { componentMod: { createElement } } = ctx;
|
|
18
|
-
const { styles: entryCssFiles, scripts: jsHrefs } = (0, _getcssinlinedlinktags.getLinkAndScriptTags)(
|
|
18
|
+
const { styles: entryCssFiles, scripts: jsHrefs } = (0, _getcssinlinedlinktags.getLinkAndScriptTags)(filePath, injectedCSS, injectedJS);
|
|
19
19
|
const styles = (0, _rendercssresource.renderCssResource)(entryCssFiles, ctx);
|
|
20
20
|
const scripts = jsHrefs ? jsHrefs.map((href, index)=>createElement('script', {
|
|
21
21
|
src: `${ctx.assetPrefix}/_next/${(0, _encodeuripath.encodeURIPath)(href)}${(0, _getassetquerystring.getAssetQueryString)(ctx, true)}`,
|
|
@@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
5
|
0 && (module.exports = {
|
|
6
|
-
createFlightReactServerErrorHandler: null,
|
|
7
6
|
createHTMLErrorHandler: null,
|
|
8
|
-
|
|
7
|
+
createReactServerErrorHandler: null,
|
|
9
8
|
getDigestForWellKnownError: null,
|
|
10
9
|
isUserLandError: null
|
|
11
10
|
});
|
|
@@ -16,14 +15,11 @@ function _export(target, all) {
|
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
17
|
_export(exports, {
|
|
19
|
-
createFlightReactServerErrorHandler: function() {
|
|
20
|
-
return createFlightReactServerErrorHandler;
|
|
21
|
-
},
|
|
22
18
|
createHTMLErrorHandler: function() {
|
|
23
19
|
return createHTMLErrorHandler;
|
|
24
20
|
},
|
|
25
|
-
|
|
26
|
-
return
|
|
21
|
+
createReactServerErrorHandler: function() {
|
|
22
|
+
return createReactServerErrorHandler;
|
|
27
23
|
},
|
|
28
24
|
getDigestForWellKnownError: function() {
|
|
29
25
|
return getDigestForWellKnownError;
|
|
@@ -62,49 +58,7 @@ function getDigestForWellKnownError(error) {
|
|
|
62
58
|
if ((0, _dynamicrendering.isPrerenderInterruptedError)(error)) return error.digest;
|
|
63
59
|
return undefined;
|
|
64
60
|
}
|
|
65
|
-
function
|
|
66
|
-
return (thrownValue)=>{
|
|
67
|
-
if (typeof thrownValue === 'string') {
|
|
68
|
-
// TODO-APP: look at using webcrypto instead. Requires a promise to be awaited.
|
|
69
|
-
return (0, _stringhash.default)(thrownValue).toString();
|
|
70
|
-
}
|
|
71
|
-
// If the response was closed, we don't need to log the error.
|
|
72
|
-
if ((0, _pipereadable.isAbortError)(thrownValue)) return;
|
|
73
|
-
const digest = getDigestForWellKnownError(thrownValue);
|
|
74
|
-
if (digest) {
|
|
75
|
-
return digest;
|
|
76
|
-
}
|
|
77
|
-
if ((0, _reactlargeshellerror.isReactLargeShellError)(thrownValue)) {
|
|
78
|
-
// TODO: Aggregate
|
|
79
|
-
console.error(thrownValue);
|
|
80
|
-
return undefined;
|
|
81
|
-
}
|
|
82
|
-
const err = (0, _iserror.getProperError)(thrownValue);
|
|
83
|
-
// If the error already has a digest, respect the original digest,
|
|
84
|
-
// so it won't get re-generated into another new error.
|
|
85
|
-
if (!err.digest) {
|
|
86
|
-
// TODO-APP: look at using webcrypto instead. Requires a promise to be awaited.
|
|
87
|
-
err.digest = (0, _stringhash.default)(err.message + err.stack || '').toString();
|
|
88
|
-
}
|
|
89
|
-
// Format server errors in development to add more helpful error messages
|
|
90
|
-
if (shouldFormatError) {
|
|
91
|
-
(0, _formatservererror.formatServerError)(err);
|
|
92
|
-
}
|
|
93
|
-
// Record exception in an active span, if available.
|
|
94
|
-
const span = (0, _tracer.getTracer)().getActiveScopeSpan();
|
|
95
|
-
if (span) {
|
|
96
|
-
span.recordException(err);
|
|
97
|
-
span.setAttribute('error.type', err.name);
|
|
98
|
-
span.setStatus({
|
|
99
|
-
code: _tracer.SpanStatusCode.ERROR,
|
|
100
|
-
message: err.message
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
onReactServerRenderError(err);
|
|
104
|
-
return (0, _errortelemetryutils.createDigestWithErrorCode)(thrownValue, err.digest);
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function createHTMLReactServerErrorHandler(shouldFormatError, isNextExport, reactServerErrors, silenceLogger, onReactServerRenderError) {
|
|
61
|
+
function createReactServerErrorHandler(shouldFormatError, isNextExport, reactServerErrors, onReactServerRenderError, spanToRecordOn) {
|
|
108
62
|
return (thrownValue)=>{
|
|
109
63
|
var _err_message;
|
|
110
64
|
if (typeof thrownValue === 'string') {
|
|
@@ -122,12 +76,27 @@ function createHTMLReactServerErrorHandler(shouldFormatError, isNextExport, reac
|
|
|
122
76
|
console.error(thrownValue);
|
|
123
77
|
return undefined;
|
|
124
78
|
}
|
|
125
|
-
|
|
79
|
+
let err = (0, _iserror.getProperError)(thrownValue);
|
|
80
|
+
let silenceLog = false;
|
|
126
81
|
// If the error already has a digest, respect the original digest,
|
|
127
82
|
// so it won't get re-generated into another new error.
|
|
128
|
-
if (
|
|
129
|
-
|
|
130
|
-
|
|
83
|
+
if (err.digest) {
|
|
84
|
+
if (process.env.NODE_ENV === 'production' && reactServerErrors.has(err.digest)) {
|
|
85
|
+
// This error is likely an obfuscated error from another react-server
|
|
86
|
+
// environment (e.g. 'use cache'). We recover the original error here
|
|
87
|
+
// for reporting purposes.
|
|
88
|
+
err = reactServerErrors.get(err.digest);
|
|
89
|
+
// We don't log it again though, as it was already logged in the
|
|
90
|
+
// original environment.
|
|
91
|
+
silenceLog = true;
|
|
92
|
+
} else {
|
|
93
|
+
// Either we're in development (where we want to keep the transported
|
|
94
|
+
// error with environmentName), or the error is not in reactServerErrors
|
|
95
|
+
// but has a digest from other means. Keep the error as-is.
|
|
96
|
+
}
|
|
97
|
+
} else {
|
|
98
|
+
err.digest = (0, _errortelemetryutils.createDigestWithErrorCode)(err, // TODO-APP: look at using webcrypto instead. Requires a promise to be awaited.
|
|
99
|
+
(0, _stringhash.default)(err.message + (err.stack || '')).toString());
|
|
131
100
|
}
|
|
132
101
|
// @TODO by putting this here and not at the top it is possible that
|
|
133
102
|
// we don't error the build in places we actually expect to
|
|
@@ -140,8 +109,8 @@ function createHTMLReactServerErrorHandler(shouldFormatError, isNextExport, reac
|
|
|
140
109
|
}
|
|
141
110
|
// Don't log the suppressed error during export
|
|
142
111
|
if (!(isNextExport && (err == null ? void 0 : (_err_message = err.message) == null ? void 0 : _err_message.includes('The specific message is omitted in production builds to avoid leaking sensitive details.')))) {
|
|
143
|
-
// Record exception
|
|
144
|
-
const span = (0, _tracer.getTracer)().getActiveScopeSpan();
|
|
112
|
+
// Record exception on the provided span if available, otherwise try active span.
|
|
113
|
+
const span = spanToRecordOn ?? (0, _tracer.getTracer)().getActiveScopeSpan();
|
|
145
114
|
if (span) {
|
|
146
115
|
span.recordException(err);
|
|
147
116
|
span.setAttribute('error.type', err.name);
|
|
@@ -150,14 +119,12 @@ function createHTMLReactServerErrorHandler(shouldFormatError, isNextExport, reac
|
|
|
150
119
|
message: err.message
|
|
151
120
|
});
|
|
152
121
|
}
|
|
153
|
-
|
|
154
|
-
onReactServerRenderError == null ? void 0 : onReactServerRenderError(err);
|
|
155
|
-
}
|
|
122
|
+
onReactServerRenderError(err, silenceLog);
|
|
156
123
|
}
|
|
157
|
-
return
|
|
124
|
+
return err.digest;
|
|
158
125
|
};
|
|
159
126
|
}
|
|
160
|
-
function createHTMLErrorHandler(shouldFormatError, isNextExport, reactServerErrors, allCapturedErrors,
|
|
127
|
+
function createHTMLErrorHandler(shouldFormatError, isNextExport, reactServerErrors, allCapturedErrors, onHTMLRenderSSRError, spanToRecordOn) {
|
|
161
128
|
return (thrownValue, errorInfo)=>{
|
|
162
129
|
var _err_message;
|
|
163
130
|
if ((0, _reactlargeshellerror.isReactLargeShellError)(thrownValue)) {
|
|
@@ -187,7 +154,7 @@ function createHTMLErrorHandler(shouldFormatError, isNextExport, reactServerErro
|
|
|
187
154
|
// from other means so we don't need to produce a new one
|
|
188
155
|
}
|
|
189
156
|
} else {
|
|
190
|
-
err.digest = (0, _stringhash.default)(err.message + ((errorInfo == null ? void 0 : errorInfo.componentStack) || err.stack || '')).toString();
|
|
157
|
+
err.digest = (0, _errortelemetryutils.createDigestWithErrorCode)(err, (0, _stringhash.default)(err.message + ((errorInfo == null ? void 0 : errorInfo.componentStack) || err.stack || '')).toString());
|
|
191
158
|
}
|
|
192
159
|
// Format server errors in development to add more helpful error messages
|
|
193
160
|
if (shouldFormatError) {
|
|
@@ -195,22 +162,22 @@ function createHTMLErrorHandler(shouldFormatError, isNextExport, reactServerErro
|
|
|
195
162
|
}
|
|
196
163
|
// Don't log the suppressed error during export
|
|
197
164
|
if (!(isNextExport && (err == null ? void 0 : (_err_message = err.message) == null ? void 0 : _err_message.includes('The specific message is omitted in production builds to avoid leaking sensitive details.')))) {
|
|
198
|
-
//
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
span.
|
|
202
|
-
span
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
165
|
+
// HTML errors contain RSC errors as well, filter them out before reporting
|
|
166
|
+
if (isSSRError) {
|
|
167
|
+
// Record exception on the provided span if available, otherwise try active span.
|
|
168
|
+
const span = spanToRecordOn ?? (0, _tracer.getTracer)().getActiveScopeSpan();
|
|
169
|
+
if (span) {
|
|
170
|
+
span.recordException(err);
|
|
171
|
+
span.setAttribute('error.type', err.name);
|
|
172
|
+
span.setStatus({
|
|
173
|
+
code: _tracer.SpanStatusCode.ERROR,
|
|
174
|
+
message: err.message
|
|
175
|
+
});
|
|
176
|
+
}
|
|
210
177
|
onHTMLRenderSSRError(err, errorInfo);
|
|
211
178
|
}
|
|
212
179
|
}
|
|
213
|
-
return
|
|
180
|
+
return err.digest;
|
|
214
181
|
};
|
|
215
182
|
}
|
|
216
183
|
function isUserLandError(err) {
|
|
@@ -37,6 +37,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
37
37
|
delayUntilRuntimeStage: null,
|
|
38
38
|
formatDynamicAPIAccesses: null,
|
|
39
39
|
getFirstDynamicReason: null,
|
|
40
|
+
getStaticShellDisallowedDynamicReasons: null,
|
|
40
41
|
isDynamicPostpone: null,
|
|
41
42
|
isPrerenderInterruptedError: null,
|
|
42
43
|
logDisallowedDynamicError: null,
|
|
@@ -46,7 +47,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
46
47
|
throwToInterruptStaticGeneration: null,
|
|
47
48
|
trackAllowedDynamicAccess: null,
|
|
48
49
|
trackDynamicDataInDynamicRender: null,
|
|
49
|
-
|
|
50
|
+
trackDynamicHoleInRuntimeShell: null,
|
|
51
|
+
trackDynamicHoleInStaticShell: null,
|
|
50
52
|
useDynamicRouteParams: null,
|
|
51
53
|
useDynamicSearchParams: null
|
|
52
54
|
});
|
|
@@ -99,6 +101,9 @@ _export(exports, {
|
|
|
99
101
|
getFirstDynamicReason: function() {
|
|
100
102
|
return getFirstDynamicReason;
|
|
101
103
|
},
|
|
104
|
+
getStaticShellDisallowedDynamicReasons: function() {
|
|
105
|
+
return getStaticShellDisallowedDynamicReasons;
|
|
106
|
+
},
|
|
102
107
|
isDynamicPostpone: function() {
|
|
103
108
|
return isDynamicPostpone;
|
|
104
109
|
},
|
|
@@ -126,8 +131,11 @@ _export(exports, {
|
|
|
126
131
|
trackDynamicDataInDynamicRender: function() {
|
|
127
132
|
return trackDynamicDataInDynamicRender;
|
|
128
133
|
},
|
|
129
|
-
|
|
130
|
-
return
|
|
134
|
+
trackDynamicHoleInRuntimeShell: function() {
|
|
135
|
+
return trackDynamicHoleInRuntimeShell;
|
|
136
|
+
},
|
|
137
|
+
trackDynamicHoleInStaticShell: function() {
|
|
138
|
+
return trackDynamicHoleInStaticShell;
|
|
131
139
|
},
|
|
132
140
|
useDynamicRouteParams: function() {
|
|
133
141
|
return useDynamicRouteParams;
|
|
@@ -146,7 +154,6 @@ const _boundaryconstants = require("../../lib/framework/boundary-constants");
|
|
|
146
154
|
const _scheduler = require("../../lib/scheduler");
|
|
147
155
|
const _bailouttocsr = require("../../shared/lib/lazy-dynamic/bailout-to-csr");
|
|
148
156
|
const _invarianterror = require("../../shared/lib/invariant-error");
|
|
149
|
-
const _stagedrendering = require("./staged-rendering");
|
|
150
157
|
function _interop_require_default(obj) {
|
|
151
158
|
return obj && obj.__esModule ? obj : {
|
|
152
159
|
default: obj
|
|
@@ -164,6 +171,7 @@ function createDynamicValidationState() {
|
|
|
164
171
|
return {
|
|
165
172
|
hasSuspenseAboveBody: false,
|
|
166
173
|
hasDynamicMetadata: false,
|
|
174
|
+
dynamicMetadata: null,
|
|
167
175
|
hasDynamicViewport: false,
|
|
168
176
|
hasAllowedDynamic: false,
|
|
169
177
|
dynamicErrors: []
|
|
@@ -297,15 +305,6 @@ function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, p
|
|
|
297
305
|
}
|
|
298
306
|
}
|
|
299
307
|
}
|
|
300
|
-
function trackSynchronousPlatformIOAccessInDev(requestStore) {
|
|
301
|
-
// We don't actually have a controller to abort but we do the semantic equivalent by
|
|
302
|
-
// advancing the request store out of the prerender stage
|
|
303
|
-
if (requestStore.stagedRendering) {
|
|
304
|
-
// TODO: error for sync IO in the runtime stage
|
|
305
|
-
// (which is not currently covered by the validation render in `spawnDynamicValidationInDev`)
|
|
306
|
-
requestStore.stagedRendering.advanceStage(_stagedrendering.RenderStage.Dynamic);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
308
|
function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) {
|
|
310
309
|
const prerenderSignal = prerenderStore.controller.signal;
|
|
311
310
|
if (prerenderSignal.aborted === false) {
|
|
@@ -630,6 +629,80 @@ function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation,
|
|
|
630
629
|
return;
|
|
631
630
|
}
|
|
632
631
|
}
|
|
632
|
+
function trackDynamicHoleInRuntimeShell(workStore, componentStack, dynamicValidation, clientDynamic) {
|
|
633
|
+
if (hasOutletRegex.test(componentStack)) {
|
|
634
|
+
// We don't need to track that this is dynamic. It is only so when something else is also dynamic.
|
|
635
|
+
return;
|
|
636
|
+
} else if (hasMetadataRegex.test(componentStack)) {
|
|
637
|
+
const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed inside \`generateMetadata\`. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`;
|
|
638
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
639
|
+
dynamicValidation.dynamicMetadata = error;
|
|
640
|
+
return;
|
|
641
|
+
} else if (hasViewportRegex.test(componentStack)) {
|
|
642
|
+
const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`;
|
|
643
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
644
|
+
dynamicValidation.dynamicErrors.push(error);
|
|
645
|
+
return;
|
|
646
|
+
} else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
|
|
647
|
+
// For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
|
|
648
|
+
// But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
|
|
649
|
+
// is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
|
|
650
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
651
|
+
dynamicValidation.hasSuspenseAboveBody = true;
|
|
652
|
+
return;
|
|
653
|
+
} else if (hasSuspenseRegex.test(componentStack)) {
|
|
654
|
+
// this error had a Suspense boundary above it so we don't need to report it as a source
|
|
655
|
+
// of disallowed
|
|
656
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
657
|
+
return;
|
|
658
|
+
} else if (clientDynamic.syncDynamicErrorWithStack) {
|
|
659
|
+
// This task was the task that called the sync error.
|
|
660
|
+
dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
|
|
661
|
+
return;
|
|
662
|
+
} else {
|
|
663
|
+
const message = `Route "${workStore.route}": Uncached data or \`connection()\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
|
|
664
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
665
|
+
dynamicValidation.dynamicErrors.push(error);
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
function trackDynamicHoleInStaticShell(workStore, componentStack, dynamicValidation, clientDynamic) {
|
|
670
|
+
if (hasOutletRegex.test(componentStack)) {
|
|
671
|
+
// We don't need to track that this is dynamic. It is only so when something else is also dynamic.
|
|
672
|
+
return;
|
|
673
|
+
} else if (hasMetadataRegex.test(componentStack)) {
|
|
674
|
+
const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateMetadata\` or you have file-based metadata such as icons that depend on dynamic params segments. Except for this instance, the page would have been entirely prerenderable which may have been the intended behavior. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`;
|
|
675
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
676
|
+
dynamicValidation.dynamicMetadata = error;
|
|
677
|
+
return;
|
|
678
|
+
} else if (hasViewportRegex.test(componentStack)) {
|
|
679
|
+
const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed inside \`generateViewport\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`;
|
|
680
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
681
|
+
dynamicValidation.dynamicErrors.push(error);
|
|
682
|
+
return;
|
|
683
|
+
} else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
|
|
684
|
+
// For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
|
|
685
|
+
// But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
|
|
686
|
+
// is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
|
|
687
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
688
|
+
dynamicValidation.hasSuspenseAboveBody = true;
|
|
689
|
+
return;
|
|
690
|
+
} else if (hasSuspenseRegex.test(componentStack)) {
|
|
691
|
+
// this error had a Suspense boundary above it so we don't need to report it as a source
|
|
692
|
+
// of disallowed
|
|
693
|
+
dynamicValidation.hasAllowedDynamic = true;
|
|
694
|
+
return;
|
|
695
|
+
} else if (clientDynamic.syncDynamicErrorWithStack) {
|
|
696
|
+
// This task was the task that called the sync error.
|
|
697
|
+
dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack);
|
|
698
|
+
return;
|
|
699
|
+
} else {
|
|
700
|
+
const message = `Route "${workStore.route}": Runtime data such as \`cookies()\`, \`headers()\`, \`params\`, or \`searchParams\` was accessed outside of \`<Suspense>\`. This delays the entire page from rendering, resulting in a slow user experience. Learn more: https://nextjs.org/docs/messages/blocking-route`;
|
|
701
|
+
const error = createErrorWithComponentOrOwnerStack(message, componentStack);
|
|
702
|
+
dynamicValidation.dynamicErrors.push(error);
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
633
706
|
/**
|
|
634
707
|
* In dev mode, we prefer using the owner stack, otherwise the provided
|
|
635
708
|
* component stack is used.
|
|
@@ -640,7 +713,9 @@ function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation,
|
|
|
640
713
|
enumerable: false,
|
|
641
714
|
configurable: true
|
|
642
715
|
});
|
|
643
|
-
|
|
716
|
+
// TODO go back to owner stack here if available. This is temporarily using componentStack to get the right
|
|
717
|
+
//
|
|
718
|
+
error.stack = error.name + ': ' + message + (ownerStack || componentStack);
|
|
644
719
|
return error;
|
|
645
720
|
}
|
|
646
721
|
var PreludeState = /*#__PURE__*/ function(PreludeState) {
|
|
@@ -705,6 +780,44 @@ function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverD
|
|
|
705
780
|
}
|
|
706
781
|
}
|
|
707
782
|
}
|
|
783
|
+
function getStaticShellDisallowedDynamicReasons(workStore, prelude, dynamicValidation) {
|
|
784
|
+
if (dynamicValidation.hasSuspenseAboveBody) {
|
|
785
|
+
// This route has opted into allowing fully dynamic rendering
|
|
786
|
+
// by including a Suspense boundary above the body. In this case
|
|
787
|
+
// a lack of a shell is not considered disallowed so we simply return
|
|
788
|
+
return [];
|
|
789
|
+
}
|
|
790
|
+
if (prelude !== 0) {
|
|
791
|
+
// We didn't have any sync bailouts but there may be user code which
|
|
792
|
+
// blocked the root. We would have captured these during the prerender
|
|
793
|
+
// and can log them here and then terminate the build/validating render
|
|
794
|
+
const dynamicErrors = dynamicValidation.dynamicErrors;
|
|
795
|
+
if (dynamicErrors.length > 0) {
|
|
796
|
+
return dynamicErrors;
|
|
797
|
+
}
|
|
798
|
+
if (prelude === 1) {
|
|
799
|
+
// If we ever get this far then we messed up the tracking of invalid dynamic.
|
|
800
|
+
// We still adhere to the constraint that you must produce a shell but invite the
|
|
801
|
+
// user to report this as a bug in Next.js.
|
|
802
|
+
return [
|
|
803
|
+
Object.defineProperty(new _invarianterror.InvariantError(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason.`), "__NEXT_ERROR_CODE", {
|
|
804
|
+
value: "E936",
|
|
805
|
+
enumerable: false,
|
|
806
|
+
configurable: true
|
|
807
|
+
})
|
|
808
|
+
];
|
|
809
|
+
}
|
|
810
|
+
} else {
|
|
811
|
+
// We have a prelude but we might still have dynamic metadata without any other dynamic access
|
|
812
|
+
if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.dynamicErrors.length === 0 && dynamicValidation.dynamicMetadata) {
|
|
813
|
+
return [
|
|
814
|
+
dynamicValidation.dynamicMetadata
|
|
815
|
+
];
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
// We had a non-empty prelude and there are no dynamic holes
|
|
819
|
+
return [];
|
|
820
|
+
}
|
|
708
821
|
function delayUntilRuntimeStage(prerenderStore, result) {
|
|
709
822
|
if (prerenderStore.runtimeStagePromise) {
|
|
710
823
|
return prerenderStore.runtimeStagePromise.then(()=>result);
|
|
@@ -7,9 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
decrypt: null,
|
|
8
8
|
encrypt: null,
|
|
9
9
|
getActionEncryptionKey: null,
|
|
10
|
-
getClientReferenceManifestForRsc: null,
|
|
11
|
-
getServerModuleMap: null,
|
|
12
|
-
setReferenceManifestsSingleton: null,
|
|
13
10
|
stringToUint8Array: null
|
|
14
11
|
});
|
|
15
12
|
function _export(target, all) {
|
|
@@ -31,22 +28,12 @@ _export(exports, {
|
|
|
31
28
|
getActionEncryptionKey: function() {
|
|
32
29
|
return getActionEncryptionKey;
|
|
33
30
|
},
|
|
34
|
-
getClientReferenceManifestForRsc: function() {
|
|
35
|
-
return getClientReferenceManifestForRsc;
|
|
36
|
-
},
|
|
37
|
-
getServerModuleMap: function() {
|
|
38
|
-
return getServerModuleMap;
|
|
39
|
-
},
|
|
40
|
-
setReferenceManifestsSingleton: function() {
|
|
41
|
-
return setReferenceManifestsSingleton;
|
|
42
|
-
},
|
|
43
31
|
stringToUint8Array: function() {
|
|
44
32
|
return stringToUint8Array;
|
|
45
33
|
}
|
|
46
34
|
});
|
|
47
35
|
const _invarianterror = require("../../shared/lib/invariant-error");
|
|
48
|
-
const
|
|
49
|
-
const _workasyncstorageexternal = require("./work-async-storage.external");
|
|
36
|
+
const _manifestssingleton = require("./manifests-singleton");
|
|
50
37
|
let __next_loaded_action_key;
|
|
51
38
|
function arrayBufferToString(buffer) {
|
|
52
39
|
const bytes = new Uint8Array(buffer);
|
|
@@ -83,81 +70,12 @@ function decrypt(key, iv, data) {
|
|
|
83
70
|
iv
|
|
84
71
|
}, key, data);
|
|
85
72
|
}
|
|
86
|
-
// This is a global singleton that is used to encode/decode the action bound args from
|
|
87
|
-
// the closure. This can't be using a AsyncLocalStorage as it might happen on the module
|
|
88
|
-
// level. Since the client reference manifest won't be mutated, let's use a global singleton
|
|
89
|
-
// to keep it.
|
|
90
|
-
const SERVER_ACTION_MANIFESTS_SINGLETON = Symbol.for('next.server.action-manifests');
|
|
91
|
-
function setReferenceManifestsSingleton({ page, clientReferenceManifest, serverActionsManifest, serverModuleMap }) {
|
|
92
|
-
var _globalThis_SERVER_ACTION_MANIFESTS_SINGLETON;
|
|
93
|
-
// @ts-expect-error
|
|
94
|
-
const clientReferenceManifestsPerPage = (_globalThis_SERVER_ACTION_MANIFESTS_SINGLETON = globalThis[SERVER_ACTION_MANIFESTS_SINGLETON]) == null ? void 0 : _globalThis_SERVER_ACTION_MANIFESTS_SINGLETON.clientReferenceManifestsPerPage;
|
|
95
|
-
// @ts-expect-error
|
|
96
|
-
globalThis[SERVER_ACTION_MANIFESTS_SINGLETON] = {
|
|
97
|
-
clientReferenceManifestsPerPage: {
|
|
98
|
-
...clientReferenceManifestsPerPage,
|
|
99
|
-
[(0, _apppaths.normalizeAppPath)(page)]: clientReferenceManifest
|
|
100
|
-
},
|
|
101
|
-
serverActionsManifest,
|
|
102
|
-
serverModuleMap
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
function getServerModuleMap() {
|
|
106
|
-
const serverActionsManifestSingleton = globalThis[SERVER_ACTION_MANIFESTS_SINGLETON];
|
|
107
|
-
if (!serverActionsManifestSingleton) {
|
|
108
|
-
throw Object.defineProperty(new _invarianterror.InvariantError('Missing manifest for Server Actions.'), "__NEXT_ERROR_CODE", {
|
|
109
|
-
value: "E606",
|
|
110
|
-
enumerable: false,
|
|
111
|
-
configurable: true
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
return serverActionsManifestSingleton.serverModuleMap;
|
|
115
|
-
}
|
|
116
|
-
function getClientReferenceManifestForRsc() {
|
|
117
|
-
const serverActionsManifestSingleton = globalThis[SERVER_ACTION_MANIFESTS_SINGLETON];
|
|
118
|
-
if (!serverActionsManifestSingleton) {
|
|
119
|
-
throw Object.defineProperty(new _invarianterror.InvariantError('Missing manifest for Server Actions.'), "__NEXT_ERROR_CODE", {
|
|
120
|
-
value: "E606",
|
|
121
|
-
enumerable: false,
|
|
122
|
-
configurable: true
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
const { clientReferenceManifestsPerPage } = serverActionsManifestSingleton;
|
|
126
|
-
const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
|
|
127
|
-
if (!workStore) {
|
|
128
|
-
// If there's no work store defined, we can assume that a client reference
|
|
129
|
-
// manifest is needed during module evaluation, e.g. to create a server
|
|
130
|
-
// action using a higher-order function. This might also use client
|
|
131
|
-
// components which need to be serialized by Flight, and therefore client
|
|
132
|
-
// references need to be resolvable. To make this work, we're returning a
|
|
133
|
-
// merged manifest across all pages. This is fine as long as the module IDs
|
|
134
|
-
// are not page specific, which they are not for Webpack. TODO: Fix this in
|
|
135
|
-
// Turbopack.
|
|
136
|
-
return mergeClientReferenceManifests(clientReferenceManifestsPerPage);
|
|
137
|
-
}
|
|
138
|
-
const clientReferenceManifest = clientReferenceManifestsPerPage[workStore.route];
|
|
139
|
-
if (!clientReferenceManifest) {
|
|
140
|
-
throw Object.defineProperty(new _invarianterror.InvariantError(`Missing Client Reference Manifest for ${workStore.route}.`), "__NEXT_ERROR_CODE", {
|
|
141
|
-
value: "E570",
|
|
142
|
-
enumerable: false,
|
|
143
|
-
configurable: true
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
return clientReferenceManifest;
|
|
147
|
-
}
|
|
148
73
|
async function getActionEncryptionKey() {
|
|
149
74
|
if (__next_loaded_action_key) {
|
|
150
75
|
return __next_loaded_action_key;
|
|
151
76
|
}
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
throw Object.defineProperty(new _invarianterror.InvariantError('Missing manifest for Server Actions.'), "__NEXT_ERROR_CODE", {
|
|
155
|
-
value: "E606",
|
|
156
|
-
enumerable: false,
|
|
157
|
-
configurable: true
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
const rawKey = process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY || serverActionsManifestSingleton.serverActionsManifest.encryptionKey;
|
|
77
|
+
const serverActionsManifest = (0, _manifestssingleton.getServerActionsManifest)();
|
|
78
|
+
const rawKey = process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY || serverActionsManifest.encryptionKey;
|
|
161
79
|
if (rawKey === undefined) {
|
|
162
80
|
throw Object.defineProperty(new _invarianterror.InvariantError('Missing encryption key for Server Actions'), "__NEXT_ERROR_CODE", {
|
|
163
81
|
value: "E571",
|
|
@@ -171,28 +89,5 @@ async function getActionEncryptionKey() {
|
|
|
171
89
|
]);
|
|
172
90
|
return __next_loaded_action_key;
|
|
173
91
|
}
|
|
174
|
-
function mergeClientReferenceManifests(clientReferenceManifestsPerPage) {
|
|
175
|
-
const clientReferenceManifests = Object.values(clientReferenceManifestsPerPage);
|
|
176
|
-
const mergedClientReferenceManifest = {
|
|
177
|
-
clientModules: {},
|
|
178
|
-
edgeRscModuleMapping: {},
|
|
179
|
-
rscModuleMapping: {}
|
|
180
|
-
};
|
|
181
|
-
for (const clientReferenceManifest of clientReferenceManifests){
|
|
182
|
-
mergedClientReferenceManifest.clientModules = {
|
|
183
|
-
...mergedClientReferenceManifest.clientModules,
|
|
184
|
-
...clientReferenceManifest.clientModules
|
|
185
|
-
};
|
|
186
|
-
mergedClientReferenceManifest.edgeRscModuleMapping = {
|
|
187
|
-
...mergedClientReferenceManifest.edgeRscModuleMapping,
|
|
188
|
-
...clientReferenceManifest.edgeRscModuleMapping
|
|
189
|
-
};
|
|
190
|
-
mergedClientReferenceManifest.rscModuleMapping = {
|
|
191
|
-
...mergedClientReferenceManifest.rscModuleMapping,
|
|
192
|
-
...clientReferenceManifest.rscModuleMapping
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
return mergedClientReferenceManifest;
|
|
196
|
-
}
|
|
197
92
|
|
|
198
93
|
//# sourceMappingURL=encryption-utils.js.map
|
|
@@ -25,6 +25,7 @@ const _server = require("react-server-dom-webpack/server");
|
|
|
25
25
|
const _client = require("react-server-dom-webpack/client");
|
|
26
26
|
const _nodewebstreamshelper = require("../stream-utils/node-web-streams-helper");
|
|
27
27
|
const _encryptionutils = require("./encryption-utils");
|
|
28
|
+
const _manifestssingleton = require("./manifests-singleton");
|
|
28
29
|
const _workunitasyncstorageexternal = require("./work-unit-async-storage.external");
|
|
29
30
|
const _dynamicrendering = require("./dynamic-rendering");
|
|
30
31
|
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
@@ -91,7 +92,7 @@ var ReadStatus = /*#__PURE__*/ function(ReadStatus) {
|
|
|
91
92
|
const encryptActionBoundArgs = _react.default.cache(async function encryptActionBoundArgs(actionId, ...args) {
|
|
92
93
|
const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
|
|
93
94
|
const cacheSignal = workUnitStore ? (0, _workunitasyncstorageexternal.getCacheSignal)(workUnitStore) : undefined;
|
|
94
|
-
const { clientModules } = (0,
|
|
95
|
+
const { clientModules } = (0, _manifestssingleton.getClientReferenceManifest)();
|
|
95
96
|
// Create an error before any asynchronous calls, to capture the original
|
|
96
97
|
// call stack in case we need it when the serialization errors.
|
|
97
98
|
const error = new Error();
|
|
@@ -189,7 +190,7 @@ async function decryptActionBoundArgs(actionId, encryptedPromise) {
|
|
|
189
190
|
} else {
|
|
190
191
|
decrypted = await decodeActionBoundArg(actionId, encrypted);
|
|
191
192
|
}
|
|
192
|
-
const { edgeRscModuleMapping, rscModuleMapping } = (0,
|
|
193
|
+
const { edgeRscModuleMapping, rscModuleMapping } = (0, _manifestssingleton.getClientReferenceManifest)();
|
|
193
194
|
// Using Flight to deserialize the args from the string.
|
|
194
195
|
const deserialized = await (0, _client.createFromReadableStream)(new ReadableStream({
|
|
195
196
|
start (controller) {
|
|
@@ -228,7 +229,7 @@ async function decryptActionBoundArgs(actionId, encryptedPromise) {
|
|
|
228
229
|
// to be emitted which themselves will handle the preloading.
|
|
229
230
|
moduleLoading: null,
|
|
230
231
|
moduleMap: isEdgeRuntime ? edgeRscModuleMapping : rscModuleMapping,
|
|
231
|
-
serverModuleMap: (0,
|
|
232
|
+
serverModuleMap: (0, _manifestssingleton.getServerModuleMap)()
|
|
232
233
|
}
|
|
233
234
|
});
|
|
234
235
|
return deserialized;
|
|
@@ -16,10 +16,11 @@ function _interop_require_default(obj) {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
class FlightRenderResult extends _renderresult.default {
|
|
19
|
-
constructor(response, metadata = {}){
|
|
19
|
+
constructor(response, metadata = {}, waitUntil){
|
|
20
20
|
super(response, {
|
|
21
21
|
contentType: _approuterheaders.RSC_CONTENT_TYPE_HEADER,
|
|
22
|
-
metadata
|
|
22
|
+
metadata,
|
|
23
|
+
waitUntil
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
26
|
}
|