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
|
@@ -2,21 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
9
|
-
function _export(target, all) {
|
|
10
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: all[name]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
_export(exports, {
|
|
16
|
-
collectFallbackRouteParams: function() {
|
|
17
|
-
return collectFallbackRouteParams;
|
|
18
|
-
},
|
|
19
|
-
collectSegments: function() {
|
|
5
|
+
Object.defineProperty(exports, "collectSegments", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
20
8
|
return collectSegments;
|
|
21
9
|
}
|
|
22
10
|
});
|
|
@@ -26,8 +14,6 @@ const _checks = require("../../../server/route-modules/checks");
|
|
|
26
14
|
const _clientandserverreferences = require("../../../lib/client-and-server-references");
|
|
27
15
|
const _getsegmentparam = require("../../../shared/lib/router/utils/get-segment-param");
|
|
28
16
|
const _appdirmodule = require("../../../server/lib/app-dir-module");
|
|
29
|
-
const _segment = require("../../../shared/lib/segment");
|
|
30
|
-
const _utils = require("../../static-paths/utils");
|
|
31
17
|
/**
|
|
32
18
|
* Parses the app config and attaches it to the segment.
|
|
33
19
|
*/ function attach(segment, userland, route) {
|
|
@@ -62,70 +48,42 @@ const _utils = require("../../static-paths/utils");
|
|
|
62
48
|
*/ async function collectAppPageSegments(routeModule) {
|
|
63
49
|
// We keep track of unique segments, since with parallel routes, it's possible
|
|
64
50
|
// to see the same segment multiple times.
|
|
65
|
-
const
|
|
51
|
+
const segments = [];
|
|
52
|
+
// Queue will store loader trees.
|
|
66
53
|
const queue = [
|
|
67
|
-
|
|
68
|
-
routeModule.userland.loaderTree,
|
|
69
|
-
[],
|
|
70
|
-
false
|
|
71
|
-
]
|
|
54
|
+
routeModule.userland.loaderTree
|
|
72
55
|
];
|
|
73
56
|
while(queue.length > 0){
|
|
74
|
-
const
|
|
57
|
+
const loaderTree = queue.shift();
|
|
75
58
|
const [name, parallelRoutes] = loaderTree;
|
|
76
59
|
// Process current node
|
|
77
60
|
const { mod: userland, filePath } = await (0, _appdirmodule.getLayoutOrPageModule)(loaderTree);
|
|
78
61
|
const isClientComponent = userland && (0, _clientandserverreferences.isClientReference)(userland);
|
|
79
|
-
const
|
|
62
|
+
const param = (0, _getsegmentparam.getSegmentParam)(name);
|
|
80
63
|
const segment = {
|
|
81
64
|
name,
|
|
82
|
-
paramName,
|
|
83
|
-
paramType,
|
|
65
|
+
paramName: param == null ? void 0 : param.paramName,
|
|
66
|
+
paramType: param == null ? void 0 : param.paramType,
|
|
84
67
|
filePath,
|
|
85
68
|
config: undefined,
|
|
86
|
-
|
|
87
|
-
generateStaticParams: undefined,
|
|
88
|
-
isParallelRouteSegment
|
|
69
|
+
generateStaticParams: undefined
|
|
89
70
|
};
|
|
90
71
|
// Only server components can have app segment configurations
|
|
91
72
|
if (!isClientComponent) {
|
|
92
73
|
attach(segment, userland, routeModule.definition.pathname);
|
|
93
74
|
}
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const updatedSegments = [
|
|
100
|
-
...currentSegments,
|
|
101
|
-
segment
|
|
102
|
-
];
|
|
103
|
-
// If this is a page segment, we've reached a leaf node
|
|
104
|
-
if (name === _segment.PAGE_SEGMENT_KEY) {
|
|
105
|
-
// Add all segments in the current path, preferring non-parallel segments
|
|
106
|
-
updatedSegments.forEach((seg)=>{
|
|
107
|
-
const key = getSegmentKey(seg);
|
|
108
|
-
if (!uniqueSegments.has(key)) {
|
|
109
|
-
uniqueSegments.set(key, seg);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
75
|
+
// If this segment doesn't already exist, then add it to the segments array.
|
|
76
|
+
// The list of segments is short so we just use a list traversal to check
|
|
77
|
+
// for duplicates and spare us needing to maintain the string key.
|
|
78
|
+
if (segments.every((s)=>s.name !== segment.name || s.paramName !== segment.paramName || s.paramType !== segment.paramType || s.filePath !== segment.filePath)) {
|
|
79
|
+
segments.push(segment);
|
|
112
80
|
}
|
|
113
81
|
// Add all parallel routes to the queue
|
|
114
|
-
for(const
|
|
115
|
-
|
|
116
|
-
queue.push([
|
|
117
|
-
parallelRoute,
|
|
118
|
-
updatedSegments,
|
|
119
|
-
// A parallel route segment is one that descends from a segment that is
|
|
120
|
-
// not children or descends from a parallel route segment.
|
|
121
|
-
isParallelRouteSegment || parallelRouteKey !== 'children'
|
|
122
|
-
]);
|
|
82
|
+
for (const parallelRoute of Object.values(parallelRoutes)){
|
|
83
|
+
queue.push(parallelRoute);
|
|
123
84
|
}
|
|
124
85
|
}
|
|
125
|
-
return
|
|
126
|
-
}
|
|
127
|
-
function getSegmentKey(segment) {
|
|
128
|
-
return `${segment.name}-${segment.filePath ?? ''}-${segment.paramName ?? ''}-${segment.isParallelRouteSegment ? 'pr' : 'np'}`;
|
|
86
|
+
return segments;
|
|
129
87
|
}
|
|
130
88
|
/**
|
|
131
89
|
* Collects the segments for a given app route module.
|
|
@@ -144,16 +102,14 @@ function getSegmentKey(segment) {
|
|
|
144
102
|
}
|
|
145
103
|
// Generate all the segments.
|
|
146
104
|
const segments = parts.map((name)=>{
|
|
147
|
-
const
|
|
105
|
+
const param = (0, _getsegmentparam.getSegmentParam)(name);
|
|
148
106
|
return {
|
|
149
107
|
name,
|
|
150
|
-
paramName,
|
|
151
|
-
paramType,
|
|
108
|
+
paramName: param == null ? void 0 : param.paramName,
|
|
109
|
+
paramType: param == null ? void 0 : param.paramType,
|
|
152
110
|
filePath: undefined,
|
|
153
|
-
isDynamicSegment: !!paramName,
|
|
154
111
|
config: undefined,
|
|
155
|
-
generateStaticParams: undefined
|
|
156
|
-
isParallelRouteSegment: undefined
|
|
112
|
+
generateStaticParams: undefined
|
|
157
113
|
};
|
|
158
114
|
});
|
|
159
115
|
// We know we have at least one, we verified this above. We should get the
|
|
@@ -177,37 +133,5 @@ function collectSegments(routeModule) {
|
|
|
177
133
|
configurable: true
|
|
178
134
|
});
|
|
179
135
|
}
|
|
180
|
-
function collectFallbackRouteParams(routeModule) {
|
|
181
|
-
const uniqueSegments = new Map();
|
|
182
|
-
const queue = [
|
|
183
|
-
[
|
|
184
|
-
routeModule.userland.loaderTree,
|
|
185
|
-
false
|
|
186
|
-
]
|
|
187
|
-
];
|
|
188
|
-
while(queue.length > 0){
|
|
189
|
-
const [loaderTree, isParallelRouteSegment] = queue.shift();
|
|
190
|
-
const [name, parallelRoutes] = loaderTree;
|
|
191
|
-
// Handle this segment (if it's a dynamic segment param).
|
|
192
|
-
const segmentParam = (0, _getsegmentparam.getSegmentParam)(name);
|
|
193
|
-
if (segmentParam) {
|
|
194
|
-
const key = `${name}-${segmentParam.param}-${isParallelRouteSegment ? 'pr' : 'np'}`;
|
|
195
|
-
if (!uniqueSegments.has(key)) {
|
|
196
|
-
uniqueSegments.set(key, (0, _utils.createFallbackRouteParam)(segmentParam.param, segmentParam.type, isParallelRouteSegment));
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
// Add all of this segment's parallel routes to the queue.
|
|
200
|
-
for(const parallelRouteKey in parallelRoutes){
|
|
201
|
-
const parallelRoute = parallelRoutes[parallelRouteKey];
|
|
202
|
-
queue.push([
|
|
203
|
-
parallelRoute,
|
|
204
|
-
// A parallel route segment is one that descends from a segment that is
|
|
205
|
-
// not children or descends from a parallel route segment.
|
|
206
|
-
isParallelRouteSegment || parallelRouteKey !== 'children'
|
|
207
|
-
]);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
return Array.from(uniqueSegments.values());
|
|
211
|
-
}
|
|
212
136
|
|
|
213
137
|
//# sourceMappingURL=app-segments.js.map
|
|
@@ -18,9 +18,9 @@ function collectAppPageRootParamKeys(routeModule) {
|
|
|
18
18
|
var _getSegmentParam;
|
|
19
19
|
const [name, parallelRoutes, modules] = current;
|
|
20
20
|
// If this is a dynamic segment, then we collect the param.
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
rootParams.push(
|
|
21
|
+
const paramName = (_getSegmentParam = (0, _getsegmentparam.getSegmentParam)(name)) == null ? void 0 : _getSegmentParam.paramName;
|
|
22
|
+
if (paramName) {
|
|
23
|
+
rootParams.push(paramName);
|
|
24
24
|
}
|
|
25
25
|
// If this has a layout module, then we've found the root layout because
|
|
26
26
|
// we return once we found the first layout.
|
|
@@ -66,7 +66,7 @@ const dotsSpinner = {
|
|
|
66
66
|
};
|
|
67
67
|
function createSpinner(text, options = {}, logFn = console.log) {
|
|
68
68
|
let spinner;
|
|
69
|
-
let prefixText =
|
|
69
|
+
let prefixText = `${_log.prefixes.info} ${text} `;
|
|
70
70
|
if (process.stdout.isTTY) {
|
|
71
71
|
spinner = (0, _ora.default)({
|
|
72
72
|
text: undefined,
|
|
@@ -108,7 +108,7 @@ function createSpinner(text, options = {}, logFn = console.log) {
|
|
|
108
108
|
};
|
|
109
109
|
spinner.setText = (newText)=>{
|
|
110
110
|
text = newText;
|
|
111
|
-
prefixText =
|
|
111
|
+
prefixText = `${_log.prefixes.info} ${newText} `;
|
|
112
112
|
spinner.prefixText = prefixText;
|
|
113
113
|
return spinner;
|
|
114
114
|
};
|
|
@@ -119,7 +119,7 @@ function createSpinner(text, options = {}, logFn = console.log) {
|
|
|
119
119
|
};
|
|
120
120
|
spinner.stopAndPersist = ()=>{
|
|
121
121
|
// Add \r at beginning to reset the current line of loading status text
|
|
122
|
-
const suffixText = `\r
|
|
122
|
+
const suffixText = `\r${_log.prefixes.event} ${text} `;
|
|
123
123
|
if (spinner) {
|
|
124
124
|
spinner.text = suffixText;
|
|
125
125
|
} else {
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "extractPathnameRouteParamSegmentsFromLoaderTree", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return extractPathnameRouteParamSegmentsFromLoaderTree;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _app = require("../../../shared/lib/router/routes/app");
|
|
12
|
+
const _parseloadertree = require("../../../shared/lib/router/utils/parse-loader-tree");
|
|
13
|
+
const _resolveparamvalue = require("../../../shared/lib/router/utils/resolve-param-value");
|
|
14
|
+
/**
|
|
15
|
+
* Validates that the static segments in currentPath match the corresponding
|
|
16
|
+
* segments in targetSegments. This ensures we only extract dynamic parameters
|
|
17
|
+
* that are part of the target pathname structure.
|
|
18
|
+
*
|
|
19
|
+
* Segments are compared literally - interception markers like "(.)photo" are
|
|
20
|
+
* part of the pathname and must match exactly.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // Matching paths
|
|
24
|
+
* currentPath: ['blog', '(.)photo']
|
|
25
|
+
* targetSegments: ['blog', '(.)photo', '[id]']
|
|
26
|
+
* → Returns true (both static segments match exactly)
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // Non-matching paths
|
|
30
|
+
* currentPath: ['blog', '(.)photo']
|
|
31
|
+
* targetSegments: ['blog', 'photo', '[id]']
|
|
32
|
+
* → Returns false (segments don't match - marker is part of pathname)
|
|
33
|
+
*
|
|
34
|
+
* @param currentPath - The accumulated path segments from the loader tree
|
|
35
|
+
* @param targetSegments - The target pathname split into segments
|
|
36
|
+
* @returns true if all static segments match, false otherwise
|
|
37
|
+
*/ function validatePrefixMatch(currentPath, route) {
|
|
38
|
+
for(let i = 0; i < currentPath.length; i++){
|
|
39
|
+
const pathSegment = currentPath[i];
|
|
40
|
+
const targetPathSegment = route.segments[i];
|
|
41
|
+
// Type mismatch - one is static, one is dynamic
|
|
42
|
+
if (pathSegment.type !== targetPathSegment.type) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
// One has an interception marker, the other doesn't.
|
|
46
|
+
if (pathSegment.interceptionMarker !== targetPathSegment.interceptionMarker) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
// Both are static but names don't match
|
|
50
|
+
if (pathSegment.type === 'static' && targetPathSegment.type === 'static' && pathSegment.name !== targetPathSegment.name) {
|
|
51
|
+
return false;
|
|
52
|
+
} else if (pathSegment.type === 'dynamic' && targetPathSegment.type === 'dynamic' && pathSegment.param.paramType !== targetPathSegment.param.paramType && pathSegment.param.paramName !== targetPathSegment.param.paramName) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
function extractPathnameRouteParamSegmentsFromLoaderTree(loaderTree, route) {
|
|
59
|
+
const pathnameRouteParamSegments = [];
|
|
60
|
+
const params = {};
|
|
61
|
+
// BFS traversal with depth and path tracking
|
|
62
|
+
const queue = [
|
|
63
|
+
{
|
|
64
|
+
tree: loaderTree,
|
|
65
|
+
depth: 0,
|
|
66
|
+
currentPath: []
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
while(queue.length > 0){
|
|
70
|
+
const { tree, depth, currentPath } = queue.shift();
|
|
71
|
+
const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
|
|
72
|
+
// Build the path for the current node
|
|
73
|
+
let updatedPath = currentPath;
|
|
74
|
+
let nextDepth = depth;
|
|
75
|
+
const appSegment = (0, _app.parseAppRouteSegment)(segment);
|
|
76
|
+
// Only add to path if it's a real segment that appears in the URL
|
|
77
|
+
// Route groups and parallel markers don't contribute to URL pathname
|
|
78
|
+
if (appSegment && appSegment.type !== 'route-group' && appSegment.type !== 'parallel-route') {
|
|
79
|
+
updatedPath = [
|
|
80
|
+
...currentPath,
|
|
81
|
+
appSegment
|
|
82
|
+
];
|
|
83
|
+
nextDepth = depth + 1;
|
|
84
|
+
}
|
|
85
|
+
// Check if this segment has a param and matches the target pathname at this depth
|
|
86
|
+
if ((appSegment == null ? void 0 : appSegment.type) === 'dynamic') {
|
|
87
|
+
const { paramName, paramType } = appSegment.param;
|
|
88
|
+
// Check if this segment is at the correct depth in the target pathname
|
|
89
|
+
// A segment matches if:
|
|
90
|
+
// 1. There's a dynamic segment at this depth in the pathname
|
|
91
|
+
// 2. The parameter names match (e.g., [id] matches [id], not [category])
|
|
92
|
+
// 3. The static segments leading up to this point match (prefix check)
|
|
93
|
+
if (depth < route.segments.length) {
|
|
94
|
+
const targetSegment = route.segments[depth];
|
|
95
|
+
// Match if the target pathname has a dynamic segment at this depth
|
|
96
|
+
if (targetSegment.type === 'dynamic') {
|
|
97
|
+
// Check that parameter names match exactly
|
|
98
|
+
// This prevents [category] from matching against /[id]
|
|
99
|
+
if (paramName !== targetSegment.param.paramName) {
|
|
100
|
+
continue; // Different param names, skip this segment
|
|
101
|
+
}
|
|
102
|
+
// Validate that the path leading up to this dynamic segment matches
|
|
103
|
+
// the target pathname. This prevents false matches like extracting
|
|
104
|
+
// [slug] from "/news/[slug]" when the tree has "/blog/[slug]"
|
|
105
|
+
if (validatePrefixMatch(currentPath, route)) {
|
|
106
|
+
pathnameRouteParamSegments.push({
|
|
107
|
+
name: segment,
|
|
108
|
+
paramName,
|
|
109
|
+
paramType
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
// Resolve parameter value if it's not already known.
|
|
115
|
+
if (!params.hasOwnProperty(paramName)) {
|
|
116
|
+
const paramValue = (0, _resolveparamvalue.resolveParamValue)(paramName, paramType, depth, route, params);
|
|
117
|
+
if (paramValue !== undefined) {
|
|
118
|
+
params[paramName] = paramValue;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// Continue traversing all parallel routes to find matching segments
|
|
123
|
+
for (const parallelRoute of Object.values(parallelRoutes)){
|
|
124
|
+
queue.push({
|
|
125
|
+
tree: parallelRoute,
|
|
126
|
+
depth: nextDepth,
|
|
127
|
+
currentPath: updatedPath
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
pathnameRouteParamSegments,
|
|
133
|
+
params
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=extract-pathname-route-param-segments-from-loader-tree.js.map
|