@websolutespa/bom-next 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +24 -0
- package/dist/client/client.d.ts +9 -0
- package/dist/client/client.d.ts.map +1 -0
- package/dist/client/client.js +18 -0
- package/dist/client/client.js.map +1 -0
- package/dist/client/extra.d.ts +17 -0
- package/dist/client/extra.d.ts.map +1 -0
- package/dist/client/extra.js +13 -0
- package/dist/client/extra.js.map +1 -0
- package/dist/client/label.d.ts +15 -0
- package/dist/client/label.d.ts.map +1 -0
- package/dist/client/label.js +20 -0
- package/dist/client/label.js.map +1 -0
- package/dist/client/layout.d.ts +18 -0
- package/dist/client/layout.d.ts.map +1 -0
- package/dist/client/layout.js +13 -0
- package/dist/client/layout.js.map +1 -0
- package/dist/client/local.collection.d.ts +32 -0
- package/dist/client/local.collection.d.ts.map +1 -0
- package/dist/client/local.collection.js +49 -0
- package/dist/client/local.collection.js.map +1 -0
- package/dist/client/metadata.d.ts +43 -0
- package/dist/client/metadata.d.ts.map +1 -0
- package/dist/client/metadata.js +146 -0
- package/dist/client/metadata.js.map +1 -0
- package/dist/client/page.d.ts +404 -0
- package/dist/client/page.d.ts.map +1 -0
- package/dist/client/page.js +13 -0
- package/dist/client/page.js.map +1 -0
- package/dist/client/useApi.d.ts +21 -0
- package/dist/client/useApi.d.ts.map +1 -0
- package/dist/client/useApi.js +65 -0
- package/dist/client/useApi.js.map +1 -0
- package/dist/client/useCollectionApi.d.ts +21 -0
- package/dist/client/useCollectionApi.d.ts.map +1 -0
- package/dist/client/useCollectionApi.js +65 -0
- package/dist/client/useCollectionApi.js.map +1 -0
- package/dist/client/useExtra.d.ts +9 -0
- package/dist/client/useExtra.d.ts.map +1 -0
- package/dist/client/useExtra.js +13 -0
- package/dist/client/useExtra.js.map +1 -0
- package/dist/client/useHttp.d.ts +15 -0
- package/dist/client/useHttp.d.ts.map +1 -0
- package/dist/client/useHttp.js +70 -0
- package/dist/client/useHttp.js.map +1 -0
- package/dist/client/useLabel.d.ts +9 -0
- package/dist/client/useLabel.d.ts.map +1 -0
- package/dist/client/useLabel.js +13 -0
- package/dist/client/useLabel.js.map +1 -0
- package/dist/client/useLayout.d.ts +9 -0
- package/dist/client/useLayout.d.ts.map +1 -0
- package/dist/client/useLayout.js +13 -0
- package/dist/client/useLayout.js.map +1 -0
- package/dist/client/useLink.d.ts +7 -0
- package/dist/client/useLink.d.ts.map +1 -0
- package/dist/client/useLink.js +15 -0
- package/dist/client/useLink.js.map +1 -0
- package/dist/client/useMetaData.d.ts +9 -0
- package/dist/client/useMetaData.d.ts.map +1 -0
- package/dist/client/useMetaData.js +13 -0
- package/dist/client/useMetaData.js.map +1 -0
- package/dist/client/usePage.d.ts +394 -0
- package/dist/client/usePage.d.ts.map +1 -0
- package/dist/client/usePage.js +13 -0
- package/dist/client/usePage.js.map +1 -0
- package/dist/client/useUser.d.ts +9 -0
- package/dist/client/useUser.d.ts.map +1 -0
- package/dist/client/useUser.js +13 -0
- package/dist/client/useUser.js.map +1 -0
- package/dist/client/user.d.ts +20 -0
- package/dist/client/user.d.ts.map +1 -0
- package/dist/client/user.js +33 -0
- package/dist/client/user.js.map +1 -0
- package/dist/exports/client.d.ts +20 -0
- package/dist/exports/client.js +19 -5734
- package/dist/exports/instrumentation.d.ts +2 -0
- package/dist/exports/instrumentation.js +1 -24
- package/dist/exports/proxy.d.ts +5 -0
- package/dist/exports/proxy.js +4 -253
- package/dist/exports/server.d.ts +19 -0
- package/dist/exports/server.js +18 -1973
- package/dist/index.d.ts +18 -0
- package/dist/index.js +10 -200
- package/dist/instrumentation/client.d.ts +8 -0
- package/dist/instrumentation/client.d.ts.map +1 -0
- package/dist/instrumentation/client.js +15 -0
- package/dist/instrumentation/client.js.map +1 -0
- package/dist/instrumentation/sentry/capture.requestError.js +10 -0
- package/dist/instrumentation/sentry/capture.requestError.js.map +1 -0
- package/dist/instrumentation/sentry/capture.routerTransitionStart.js +7 -0
- package/dist/instrumentation/sentry/capture.routerTransitionStart.js.map +1 -0
- package/dist/{exports/instrumentation-DBO6QH4d.d.ts → instrumentation/server.d.ts} +2 -2
- package/dist/instrumentation/server.d.ts.map +1 -0
- package/dist/instrumentation/server.js +19 -0
- package/dist/instrumentation/server.js.map +1 -0
- package/dist/{types-BatUTdbZ.d.ts → instrumentation/types.d.ts} +2 -2
- package/dist/instrumentation/types.d.ts.map +1 -0
- package/dist/lib/breadcrumb.d.ts +15 -0
- package/dist/lib/breadcrumb.d.ts.map +1 -0
- package/dist/lib/breadcrumb.js +20 -0
- package/dist/lib/breadcrumb.js.map +1 -0
- package/dist/lib/const.d.ts +9 -0
- package/dist/lib/const.d.ts.map +1 -0
- package/dist/lib/const.js +9 -0
- package/dist/lib/const.js.map +1 -0
- package/dist/lib/http.d.ts +36 -0
- package/dist/lib/http.d.ts.map +1 -0
- package/dist/{http-_2M-UFRx.js → lib/http.js} +2 -2
- package/dist/lib/http.js.map +1 -0
- package/dist/lib/label.d.ts +16 -0
- package/dist/lib/label.d.ts.map +1 -0
- package/dist/lib/label.js +33 -0
- package/dist/lib/label.js.map +1 -0
- package/dist/lib/layout.defaults.d.ts +9 -0
- package/dist/lib/layout.defaults.d.ts.map +1 -0
- package/dist/lib/layout.defaults.js +161 -0
- package/dist/lib/layout.defaults.js.map +1 -0
- package/dist/lib/link.d.ts +9 -0
- package/dist/lib/link.d.ts.map +1 -0
- package/dist/lib/link.js +16 -0
- package/dist/lib/link.js.map +1 -0
- package/dist/lib/meta-data.d.ts +56 -0
- package/dist/lib/meta-data.d.ts.map +1 -0
- package/dist/lib/open-graph.d.ts +143 -0
- package/dist/lib/open-graph.d.ts.map +1 -0
- package/dist/lib/pagination.d.ts +27 -0
- package/dist/lib/pagination.d.ts.map +1 -0
- package/dist/lib/pagination.js +39 -0
- package/dist/lib/pagination.js.map +1 -0
- package/dist/lib/route.d.ts +17 -0
- package/dist/lib/route.d.ts.map +1 -0
- package/dist/{route-DzFwERQP.js → lib/route.js} +2 -2
- package/dist/lib/route.js.map +1 -0
- package/dist/lib/store.d.ts +27 -0
- package/dist/lib/store.d.ts.map +1 -0
- package/dist/{store-CJzqrHsl.js → lib/store.js} +2 -25
- package/dist/lib/store.js.map +1 -0
- package/dist/lib/structured-data.d.ts +9 -0
- package/dist/lib/structured-data.d.ts.map +1 -0
- package/dist/lib/twitter-card.d.ts +43 -0
- package/dist/lib/twitter-card.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +13 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +35 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/mock.d.ts +127 -0
- package/dist/mock.d.ts.map +1 -0
- package/dist/node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.js +75 -0
- package/dist/node_modules/@selderee/plugin-htmlparser2/lib/hp2-builder.js.map +1 -0
- package/dist/node_modules/deepmerge/dist/cjs.js +86 -0
- package/dist/node_modules/deepmerge/dist/cjs.js.map +1 -0
- package/dist/node_modules/dom-serializer/lib/esm/foreignNames.js +105 -0
- package/dist/node_modules/dom-serializer/lib/esm/foreignNames.js.map +1 -0
- package/dist/node_modules/dom-serializer/lib/esm/index.js +146 -0
- package/dist/node_modules/dom-serializer/lib/esm/index.js.map +1 -0
- package/dist/node_modules/domelementtype/lib/esm/index.js +53 -0
- package/dist/node_modules/domelementtype/lib/esm/index.js.map +1 -0
- package/dist/node_modules/domhandler/lib/esm/index.js +130 -0
- package/dist/node_modules/domhandler/lib/esm/index.js.map +1 -0
- package/dist/node_modules/domhandler/lib/esm/node.js +307 -0
- package/dist/node_modules/domhandler/lib/esm/node.js.map +1 -0
- package/dist/node_modules/entities/lib/esm/decode.js +363 -0
- package/dist/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/dist/node_modules/entities/lib/esm/decode_codepoint.js +59 -0
- package/dist/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/dist/node_modules/entities/lib/esm/escape.js +85 -0
- package/dist/node_modules/entities/lib/esm/escape.js.map +1 -0
- package/dist/node_modules/entities/lib/esm/generated/decode-data-html.js +6 -0
- package/dist/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/dist/node_modules/entities/lib/esm/generated/decode-data-xml.js +6 -0
- package/dist/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/dist/node_modules/html-to-text/lib/html-to-text.js +1816 -0
- package/dist/node_modules/html-to-text/lib/html-to-text.js.map +1 -0
- package/dist/node_modules/html-to-text/node_modules/htmlparser2/lib/esm/Parser.js +435 -0
- package/dist/node_modules/html-to-text/node_modules/htmlparser2/lib/esm/Parser.js.map +1 -0
- package/dist/node_modules/html-to-text/node_modules/htmlparser2/lib/esm/Tokenizer.js +736 -0
- package/dist/node_modules/html-to-text/node_modules/htmlparser2/lib/esm/Tokenizer.js.map +1 -0
- package/dist/node_modules/html-to-text/node_modules/htmlparser2/lib/esm/index.js +19 -0
- package/dist/node_modules/html-to-text/node_modules/htmlparser2/lib/esm/index.js.map +1 -0
- package/dist/node_modules/leac/lib/leac.js +101 -0
- package/dist/node_modules/leac/lib/leac.js.map +1 -0
- package/dist/node_modules/parseley/lib/parseley.js +310 -0
- package/dist/node_modules/parseley/lib/parseley.js.map +1 -0
- package/dist/node_modules/peberminta/lib/core.js +149 -0
- package/dist/node_modules/peberminta/lib/core.js.map +1 -0
- package/dist/node_modules/selderee/lib/selderee.js +319 -0
- package/dist/node_modules/selderee/lib/selderee.js.map +1 -0
- package/dist/proxy/protected-route.d.ts +9 -0
- package/dist/proxy/protected-route.d.ts.map +1 -0
- package/dist/proxy/protected-route.js +40 -0
- package/dist/proxy/protected-route.js.map +1 -0
- package/dist/proxy/proxy.d.ts +31 -0
- package/dist/proxy/proxy.d.ts.map +1 -0
- package/dist/proxy/proxy.js +49 -0
- package/dist/proxy/proxy.js.map +1 -0
- package/dist/proxy/route-auto-detection.d.ts +12 -0
- package/dist/proxy/route-auto-detection.d.ts.map +1 -0
- package/dist/proxy/route-auto-detection.js +82 -0
- package/dist/proxy/route-auto-detection.js.map +1 -0
- package/dist/proxy/route-proxy.d.ts +36 -0
- package/dist/proxy/route-proxy.d.ts.map +1 -0
- package/dist/proxy/route-proxy.js +103 -0
- package/dist/proxy/route-proxy.js.map +1 -0
- package/dist/server/context.d.ts +30 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +106 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/handlers/auth.handler.d.ts +10 -0
- package/dist/server/handlers/auth.handler.d.ts.map +1 -0
- package/dist/server/handlers/auth.handler.js +29 -0
- package/dist/server/handlers/auth.handler.js.map +1 -0
- package/dist/server/handlers/captions.handler.d.ts +10 -0
- package/dist/server/handlers/captions.handler.d.ts.map +1 -0
- package/dist/server/handlers/captions.handler.js +33 -0
- package/dist/server/handlers/captions.handler.js.map +1 -0
- package/dist/server/handlers/collection.handler.d.ts +36 -0
- package/dist/server/handlers/collection.handler.d.ts.map +1 -0
- package/dist/server/handlers/collection.handler.js +166 -0
- package/dist/server/handlers/collection.handler.js.map +1 -0
- package/dist/server/handlers/error-response.js +24 -0
- package/dist/server/handlers/error-response.js.map +1 -0
- package/dist/server/handlers/index.handler.d.ts +9 -0
- package/dist/server/handlers/index.handler.d.ts.map +1 -0
- package/dist/server/handlers/index.handler.js +145 -0
- package/dist/server/handlers/index.handler.js.map +1 -0
- package/dist/server/handlers/preview.handler.d.ts +9 -0
- package/dist/server/handlers/preview.handler.d.ts.map +1 -0
- package/dist/server/handlers/preview.handler.js +15 -0
- package/dist/server/handlers/preview.handler.js.map +1 -0
- package/dist/server/handlers/registry.handler.d.ts +16 -0
- package/dist/server/handlers/registry.handler.d.ts.map +1 -0
- package/dist/server/handlers/registry.handler.js +260 -0
- package/dist/server/handlers/registry.handler.js.map +1 -0
- package/dist/server/handlers/route.handler.d.ts +20 -0
- package/dist/server/handlers/route.handler.d.ts.map +1 -0
- package/dist/server/handlers/route.handler.js +122 -0
- package/dist/server/handlers/route.handler.js.map +1 -0
- package/dist/server/handlers/sitemap.handler.d.ts +30 -0
- package/dist/server/handlers/sitemap.handler.d.ts.map +1 -0
- package/dist/server/handlers/sitemap.handler.js +338 -0
- package/dist/server/handlers/sitemap.handler.js.map +1 -0
- package/dist/server/handlers/static-params.handler.d.ts +24 -0
- package/dist/server/handlers/static-params.handler.d.ts.map +1 -0
- package/dist/server/handlers/static-params.handler.js +56 -0
- package/dist/server/handlers/static-params.handler.js.map +1 -0
- package/dist/server/handlers/vars.handler.d.ts +10 -0
- package/dist/server/handlers/vars.handler.d.ts.map +1 -0
- package/dist/server/handlers/vars.handler.js +159 -0
- package/dist/server/handlers/vars.handler.js.map +1 -0
- package/dist/server/layout.js +88 -0
- package/dist/server/layout.js.map +1 -0
- package/dist/server/lazy.d.ts +11 -0
- package/dist/server/lazy.d.ts.map +1 -0
- package/dist/server/lazy.js +33 -0
- package/dist/server/lazy.js.map +1 -0
- package/dist/server/local-api.d.ts +9 -0
- package/dist/server/local-api.d.ts.map +1 -0
- package/dist/server/local-api.js +60 -0
- package/dist/server/local-api.js.map +1 -0
- package/dist/server/metadata.d.ts +21 -0
- package/dist/server/metadata.d.ts.map +1 -0
- package/dist/server/metadata.js +20 -0
- package/dist/server/metadata.js.map +1 -0
- package/dist/server/mixer-payload.d.ts +63 -0
- package/dist/server/mixer-payload.d.ts.map +1 -0
- package/dist/server/mixer.d.ts +214 -0
- package/dist/server/mixer.d.ts.map +1 -0
- package/dist/server/mixer.js +355 -0
- package/dist/server/mixer.js.map +1 -0
- package/dist/server/page.d.ts +22 -0
- package/dist/server/page.d.ts.map +1 -0
- package/dist/server/page.js +57 -0
- package/dist/server/page.js.map +1 -0
- package/dist/server/utils.d.ts +12 -0
- package/dist/server/utils.d.ts.map +1 -0
- package/dist/{utils-YwteTbk7.js → server/utils.js} +3 -3
- package/dist/server/utils.js.map +1 -0
- package/dist/server/utmz.d.ts +9 -0
- package/dist/server/utmz.d.ts.map +1 -0
- package/dist/server/utmz.js +14 -0
- package/dist/server/utmz.js.map +1 -0
- package/dist/types.d.ts +136 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +0 -1
- package/dist/exports/client-xcFJNcG7.d.ts +0 -979
- package/dist/exports/client-xcFJNcG7.d.ts.map +0 -1
- package/dist/exports/client.js.map +0 -1
- package/dist/exports/instrumentation-DBO6QH4d.d.ts.map +0 -1
- package/dist/exports/instrumentation.js.map +0 -1
- package/dist/exports/proxy-Cv7QFVci.d.ts +0 -71
- package/dist/exports/proxy-Cv7QFVci.d.ts.map +0 -1
- package/dist/exports/proxy.js.map +0 -1
- package/dist/exports/server-BHObJHJ6.d.ts +0 -402
- package/dist/exports/server-BHObJHJ6.d.ts.map +0 -1
- package/dist/exports/server.js.map +0 -1
- package/dist/http-_2M-UFRx.js.map +0 -1
- package/dist/index-CdYcvudT.d.ts +0 -4
- package/dist/index-CtfAJ0y7.d.ts +0 -499
- package/dist/index-CtfAJ0y7.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/route-DzFwERQP.js.map +0 -1
- package/dist/store-CJzqrHsl.js.map +0 -1
- package/dist/types-BatUTdbZ.d.ts.map +0 -1
- package/dist/types-D29_snYY.d.ts +0 -191
- package/dist/types-D29_snYY.d.ts.map +0 -1
- package/dist/utils-Ca7xh5mm.js +0 -78
- package/dist/utils-Ca7xh5mm.js.map +0 -1
- package/dist/utils-YwteTbk7.js.map +0 -1
- /package/dist/{config.client-B8As5DY0.js → instrumentation/sentry/config.client.js} +0 -0
- /package/dist/{config.edge-B8As5DY0.js → instrumentation/sentry/config.edge.js} +0 -0
- /package/dist/{config.server-B8As5DY0.js → instrumentation/sentry/config.server.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation-DBO6QH4d.d.ts","names":[],"sources":["../../src/instrumentation/server.ts"],"mappings":";;;iBAGsB,sBAAA,CAAA,GAAsB;;AAA5C;AAcA;AAAmC,iBAAnB,mBAAA,CAAmB,KAAA,EAAA,OAAA,EAAA,OAAA,EAA0B,WAA1B,EAAA,YAAA,EAAqD,YAArD,CAAA,EAAA,IAAA;AAA0B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","names":["captureRequestError","sentryCaptureRequestError"],"sources":["../../src/instrumentation/sentry/capture.requestError.ts","../../src/instrumentation/server.ts"],"sourcesContent":["import * as Sentry from '@sentry/nextjs';\r\n\r\n/**\r\n * Reports errors passed to the the Next.js `onRequestError` instrumentation hook.\r\n */\r\nexport const captureRequestError = Sentry.captureRequestError;\r\n","import { captureRequestError as sentryCaptureRequestError } from './sentry/capture.requestError';\r\nimport { ErrorContext, RequestInfo } from './types';\r\n\r\nexport async function registerIntrumentation() {\r\n if (process.env.NEXT_PUBLIC_SENTRY_DSN) {\r\n if (process.env.NEXT_RUNTIME === 'nodejs') {\r\n await import('./sentry/config.server');\r\n }\r\n if (process.env.NEXT_RUNTIME === 'edge') {\r\n await import('./sentry/config.edge');\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Reports errors passed to the the Next.js `onRequestError` instrumentation hook.\r\n */\r\nexport function captureRequestError(error: unknown, request: RequestInfo, errorContext: ErrorContext): void {\r\n if (process.env.NEXT_PUBLIC_SENTRY_DSN) {\r\n return sentryCaptureRequestError(error, request, errorContext);\r\n } else {\r\n console.log('Instrumentation.captureRequestError', error, errorContext);\r\n }\r\n}\r\n"],"mappings":";;;;;AAKA,MAAaA,wBAAsB,OAAO;;;ACF1C,eAAsB,yBAAyB;CAC7C,IAAI,QAAQ,IAAI,wBAAwB;EACtC,IAAI,QAAQ,IAAI,iBAAiB,UAC/B,MAAM,OAAO;EAEf,IAAI,QAAQ,IAAI,iBAAiB,QAC/B,MAAM,OAAO;CAEjB;AACF;;;;AAKA,SAAgB,oBAAoB,OAAgB,SAAsB,cAAkC;CAC1G,IAAI,QAAQ,IAAI,wBACd,OAAOC,sBAA0B,OAAO,SAAS,YAAY;MAE7D,QAAQ,IAAI,uCAAuC,OAAO,YAAY;AAE1E"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { IRoute } from "@websolutespa/bom-core";
|
|
2
|
-
import { NextFetchEvent, NextRequest } from "next/server";
|
|
3
|
-
import { NextMiddlewareResult } from "next/dist/server/web/types";
|
|
4
|
-
|
|
5
|
-
//#region src/proxy/proxy.d.ts
|
|
6
|
-
type MiddlewareOptions = {
|
|
7
|
-
request: NextRequest;
|
|
8
|
-
next: NextFetchEvent;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
};
|
|
11
|
-
type Middleware = (props: MiddlewareOptions) => NextMiddlewareResult | Promise<NextMiddlewareResult>;
|
|
12
|
-
/**
|
|
13
|
-
* Returns the externally visible origin for an internal middleware request.
|
|
14
|
-
*
|
|
15
|
-
* Deployments commonly terminate TLS or change ports before forwarding to
|
|
16
|
-
* Next.js. Honoring valid forwarded headers keeps resolver requests on the
|
|
17
|
-
* public host and prevents an avoidable proxy redirect; direct-origin fallback
|
|
18
|
-
* keeps local development and untrusted/invalid header values deterministic.
|
|
19
|
-
*/
|
|
20
|
-
declare function getRequestOrigin(request: NextRequest): string;
|
|
21
|
-
/**
|
|
22
|
-
* Composes middleware into an ordered, short-circuiting proxy pipeline.
|
|
23
|
-
*
|
|
24
|
-
* A disabled proxy returns immediately, avoiding all downstream request work.
|
|
25
|
-
* Otherwise each middleware can claim the response; stopping at its first
|
|
26
|
-
* result prevents duplicate rewrites, redirects, and expensive policy checks.
|
|
27
|
-
*/
|
|
28
|
-
declare function createProxy(...proxies: Middleware[]): Middleware;
|
|
29
|
-
//# sourceMappingURL=proxy.d.ts.map
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/proxy/route-proxy.d.ts
|
|
32
|
-
type Proxy = (request: NextRequest, next: NextFetchEvent) => Promise<NextMiddlewareResult>;
|
|
33
|
-
type RouteMiddlewareOptions = {
|
|
34
|
-
request: NextRequest;
|
|
35
|
-
next: NextFetchEvent;
|
|
36
|
-
route: IRoute;
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
};
|
|
39
|
-
type RouteMiddleware = (props: RouteMiddlewareOptions) => NextMiddlewareResult | Promise<NextMiddlewareResult>;
|
|
40
|
-
type RouteInterceptorProxy = (route: IRoute, request: NextRequest, next: NextFetchEvent) => Promise<NextMiddlewareResult>;
|
|
41
|
-
type ResolvedRoute = IRoute & {
|
|
42
|
-
splat?: string;
|
|
43
|
-
};
|
|
44
|
-
type RouteResolverResponse = {
|
|
45
|
-
parent?: IRoute;
|
|
46
|
-
route?: ResolvedRoute;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Resolves a public request to a CMS route, then rewrites it to the internal
|
|
50
|
-
* Next.js page while preserving the original browser URL.
|
|
51
|
-
*
|
|
52
|
-
* The resolver call is deliberately made to this request's public origin so it
|
|
53
|
-
* works behind reverse proxies and deployment hosts. A rewrite keeps routing
|
|
54
|
-
* server-side, avoiding an extra browser round trip that a redirect would add.
|
|
55
|
-
*/
|
|
56
|
-
declare function createRouteProxy(...middlewares: RouteMiddleware[]): Middleware;
|
|
57
|
-
//# sourceMappingURL=route-proxy.d.ts.map
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/proxy/protected-route.d.ts
|
|
60
|
-
declare const protectedRouteProxy: RouteMiddleware;
|
|
61
|
-
//# sourceMappingURL=protected-route.d.ts.map
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/proxy/route-auto-detection.d.ts
|
|
64
|
-
declare function detectLocale(request: NextRequest, defaultLocale?: string): Promise<string>;
|
|
65
|
-
declare function detectCountry(request: NextRequest, defaultMarket?: string): Promise<string | undefined>;
|
|
66
|
-
declare const routeAutoDetection: Middleware;
|
|
67
|
-
//# sourceMappingURL=route-auto-detection.d.ts.map
|
|
68
|
-
|
|
69
|
-
//#endregion
|
|
70
|
-
export { Middleware, MiddlewareOptions, Proxy, ResolvedRoute, RouteInterceptorProxy, RouteMiddleware, RouteMiddlewareOptions, RouteResolverResponse, createProxy, createRouteProxy, detectCountry, detectLocale, getRequestOrigin, protectedRouteProxy, routeAutoDetection };
|
|
71
|
-
//# sourceMappingURL=proxy-Cv7QFVci.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-Cv7QFVci.d.ts","names":[],"sources":["../../src/proxy/proxy.ts","../../src/proxy/route-proxy.ts","../../src/proxy/protected-route.ts","../../src/proxy/route-auto-detection.ts"],"mappings":";;;;;KAKY,iBAAA;WACD;QACH;EAFI,QAAA,CAAA,EAAA,OAAA;AAAiB,CAAA;AAClB,KAIC,UAAA,GAJD,CAAA,KAAA,EAIsB,iBAJtB,EAAA,GAI4C,oBAJ5C,GAImE,OAJnE,CAI2E,oBAJ3E,CAAA;AACH;AAAc;AAGtB;AAAsB;AAAW;AAAsB;AAA+B;AAAR;AAAO,iBAUrE,gBAAA,CAVqE,OAAA,EAU3C,WAV2C,CAAA,EAAA,MAAA;AAUrF;AAwBA;AAA2B;AAAa;AAAe;AAAU;;iBAAjD,WAAA,aAAwB,eAAe;;;;KCrC3C,KAAA,aAAkB,mBAAmB,mBAAmB,QAAQ;ADFhE,KCIA,sBAAA,GDJiB;EAAA,OAAA,ECKlB,WDLkB;EAClB,IAAA,ECKH,cDLG;EACH,KAAA,ECKC,MDLD;EAAc,QAAA,CAAA,EAAA,OAAA;AAGtB,CAAA;AAAsB,KCKV,eAAA,GDLU,CAAA,KAAA,ECKgB,sBDLhB,EAAA,GCK2C,oBDL3C,GCKkE,ODLlE,CCK0E,oBDL1E,CAAA;AAAW,KCOrB,qBAAA,GDPqB,CAAA,KAAA,ECOW,MDPX,EAAA,OAAA,ECO4B,WDP5B,EAAA,IAAA,ECO+C,cDP/C,EAAA,GCOkE,ODPlE,CCO0E,oBDP1E,CAAA;AAAsB,KCS3C,aAAA,GAAgB,MDT2B,GAAA;EAA+B,KAAA,CAAA,EAAA,MAAA;AAAR,CAAA;AAAO,KCUzE,qBAAA,GDVyE;EAUrE,MAAA,CAAA,ECCL,MDDK;EAwBA,KAAA,CAAA,ECtBN,aDsBiB;AAAA,CAAA;AAAa;AAAe;AAAU;;;;ACrCjE;AAAiB;AAAa,iBA0Bd,gBAAA,CA1Bc,GAAA,WAAA,EA0BmB,eA1BnB,EAAA,CAAA,EA0BuC,UA1BvC;AAAmB;;;cCOpC,qBAAqB;;;;iBCPZ,YAAA,UAAsB,sCAAmC;iBAMzD,aAAA,UAAuB,sCAAmC;cAqCnE,oBAAoB;AH7CjC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.js","names":[],"sources":["../../src/proxy/proxy.ts","../../src/proxy/protected-route.ts","../../src/proxy/route-auto-detection.ts","../../src/proxy/route-proxy.ts"],"sourcesContent":["import { NextMiddlewareResult } from 'next/dist/server/web/types';\r\nimport { NextFetchEvent, NextRequest, NextResponse } from 'next/server';\r\n\r\n// export type Middleware = (request: NextRequest, next: NextFetchEvent) => Promise<NextMiddlewareResult>;\r\n\r\nexport type MiddlewareOptions = {\r\n request: NextRequest,\r\n next: NextFetchEvent,\r\n disabled?: boolean,\r\n};\r\nexport type Middleware = (props: MiddlewareOptions) => NextMiddlewareResult | Promise<NextMiddlewareResult>;\r\n\r\n/**\r\n * Returns the externally visible origin for an internal middleware request.\r\n *\r\n * Deployments commonly terminate TLS or change ports before forwarding to\r\n * Next.js. Honoring valid forwarded headers keeps resolver requests on the\r\n * public host and prevents an avoidable proxy redirect; direct-origin fallback\r\n * keeps local development and untrusted/invalid header values deterministic.\r\n */\r\nexport function getRequestOrigin(request: NextRequest): string {\r\n const forwardedHost = request.headers.get('x-forwarded-host')?.split(',')[0]?.trim();\r\n const forwardedProtocol = request.headers.get('x-forwarded-proto')?.split(',')[0]?.trim();\r\n const forwardedPort = request.headers.get('x-forwarded-port')?.split(',')[0]?.trim();\r\n\r\n if (!forwardedHost || !['http', 'https'].includes(forwardedProtocol || '')) {\r\n return request.nextUrl.origin;\r\n }\r\n\r\n const protocol = forwardedProtocol!;\r\n const defaultPort = protocol === 'https' ? '443' : '80';\r\n const includesPort = forwardedHost.startsWith('[') ? forwardedHost.includes(']:') : forwardedHost.includes(':');\r\n const authority = forwardedPort && forwardedPort !== defaultPort && !includesPort ? `${forwardedHost}:${forwardedPort}` : forwardedHost;\r\n\r\n return `${protocol}://${authority}`;\r\n}\r\n\r\n/**\r\n * Composes middleware into an ordered, short-circuiting proxy pipeline.\r\n *\r\n * A disabled proxy returns immediately, avoiding all downstream request work.\r\n * Otherwise each middleware can claim the response; stopping at its first\r\n * result prevents duplicate rewrites, redirects, and expensive policy checks.\r\n */\r\nexport function createProxy(...proxies: Middleware[]): Middleware {\r\n return async function ({ request, next, disabled }: MiddlewareOptions) {\r\n if (disabled) {\r\n return NextResponse.next();\r\n }\r\n let proxyResponse, i = 0;\r\n while (i < proxies.length && !proxyResponse) {\r\n const proxy = proxies[i] as Middleware;\r\n // console.log('createProxy.proxies', proxies.length, typeof proxy === 'function');\r\n if (typeof proxy === 'function') {\r\n proxyResponse = await proxy({ request, next });\r\n if (proxyResponse) {\r\n return proxyResponse;\r\n }\r\n }\r\n i++;\r\n }\r\n return NextResponse.next();\r\n };\r\n}\r\n","import { NextResponse } from 'next/server';\r\nimport { localApiGet } from '../lib/http';\r\nimport { getNextUrl } from '../server/utils';\r\nimport { getRequestOrigin } from './proxy';\r\nimport type { RouteMiddleware, RouteMiddlewareOptions, RouteResolverResponse } from './route-proxy';\r\n\r\nfunction getPublicRedirectUrl(request: RouteMiddlewareOptions['request'], href: string): URL | undefined {\r\n if (!href.startsWith('/') || href.startsWith('//')) {\r\n return undefined;\r\n }\r\n const url = new URL(href, getRequestOrigin(request));\r\n return url.pathname === request.nextUrl.pathname ? undefined : url;\r\n}\r\n\r\nexport const protectedRouteProxy: RouteMiddleware = async ({ request, route }: RouteMiddlewareOptions) => {\r\n // console.log('protectedRouteProxy', 'token', token);\r\n if (route.isProtected) {\r\n const token = request.cookies.get('payload-token');\r\n const isAuthenticated = token; // await hasValidSession();\r\n console.log('protectedRouteProxy.isAuthenticated', isAuthenticated);\r\n if (!isAuthenticated) {\r\n if (route.publicRedirect) {\r\n const redirectUrl = getPublicRedirectUrl(request, route.publicRedirect);\r\n if (redirectUrl) {\r\n return NextResponse.redirect(redirectUrl);\r\n }\r\n }\r\n const url = request.nextUrl;\r\n const { pathname } = url;\r\n const reqHeaders = new Headers(request.headers);\r\n reqHeaders.set('x-pathname', pathname);\r\n const resolution = await localApiGet<RouteResolverResponse>(\r\n `/-route?schema=login&market=${encodeURIComponent(route.market)}&locale=${encodeURIComponent(route.locale)}`,\r\n {},\r\n undefined,\r\n getRequestOrigin(request)\r\n );\r\n const nextRoute = resolution?.route;\r\n if (nextRoute) {\r\n const nextUrl = getNextUrl(request, nextRoute);\r\n reqHeaders.set('x-market', nextRoute.market);\r\n reqHeaders.set('x-locale', nextRoute.locale);\r\n reqHeaders.set('x-schema', nextRoute.schema);\r\n reqHeaders.set('x-id', String(nextRoute.page));\r\n reqHeaders.set('x-forwarded-pathname', nextUrl.pathname);\r\n console.log('protectedRouteProxy.Protected', pathname, '>', nextUrl.pathname);\r\n const response = NextResponse\r\n .rewrite(nextUrl, {\r\n request: {\r\n headers: reqHeaders,\r\n },\r\n });\r\n return response;\r\n }\r\n }\r\n }\r\n};\r\n","'use server';\r\n\r\nimport { asEquatable, defaultLocale, defaultMarket, IMarket, IRoute } from '@websolutespa/bom-core';\r\nimport { NextRequest, NextResponse } from 'next/server';\r\nimport { localApiGet } from '../lib/http';\r\nimport { getRequestOrigin, Middleware, MiddlewareOptions } from './proxy';\r\n\r\nexport async function detectLocale(request: NextRequest, defaultLocale?: string) {\r\n const acceptLanguage = request.headers.get('accept-language')?.split(',')[0];\r\n const detectedLocale = request.cookies.get('NEXT_LOCALE')?.value || acceptLanguage || defaultLocale || process.env.DEFAULT_LOCALE;\r\n return detectedLocale as string;\r\n}\r\n\r\nexport async function detectCountry(request: NextRequest, defaultMarket?: string) {\r\n let ip = request.headers.get('x-forwarded-for') || request.headers.get('x-real-ip');\r\n if (ip) {\r\n ip = ip.split(',')[0];\r\n }\r\n const isValidIp = ip?.match(/^(\\d+?)\\.(\\d+?)\\.(\\d+?)\\.(\\d+?)$/);\r\n let detectedCountry = '';\r\n try {\r\n const token = process.env.IPINFO_TOKEN;\r\n if (token) {\r\n const url = isValidIp ?\r\n `https://api.ipinfo.io/lite/${ip}/country_code?token=${token}` :\r\n `https://api.ipinfo.io/lite/me/country_code?token=${token}`;\r\n const response = await fetch(url);\r\n if (response.ok) {\r\n const data = await response.text();\r\n detectedCountry = data.toLowerCase();\r\n }\r\n } else {\r\n const url = `https://geoip.websolute.it/Ip2Location/get_info.aspx?ipaddress=${isValidIp ? ip : ''}`;\r\n const response = await fetch(url);\r\n if (response.ok) {\r\n const xml = await response.text();\r\n detectedCountry = (\r\n ((xml.split('<CountryCode><![CDATA[')[1] || '').split(']]></CountryCode>')[0] || '')\r\n ).replace('-', '').toLowerCase();\r\n // console.log('detectedCountry', detectedCountry);\r\n }\r\n }\r\n // console.log('routeInterceptor.detectCountry', detectedCountry);\r\n return detectedCountry || defaultMarket || process.env.DEFAULT_MARKET;\r\n } catch (error) {\r\n console.log('routeInterceptor.detectCountry.error', error);\r\n }\r\n return (defaultMarket || process.env.DEFAULT_MARKET) as string;\r\n}\r\n\r\nexport const routeAutoDetection: Middleware = async ({ request }: MiddlewareOptions) => {\r\n let redirectUrl: string | undefined = undefined;\r\n const url = request.nextUrl;\r\n const origin = getRequestOrigin(request);\r\n if (url.pathname === '/') {\r\n const cookie = request.cookies.get('detectedRoute');\r\n if (cookie?.value) {\r\n redirectUrl = cookie.value;\r\n }\r\n // console.log('routeInterceptor.routeAutoDetection', url.pathname);\r\n const rootRoutes: IRoute[] = await localApiGet('/-route?where[isRoot][equals]=true', {}, undefined, origin);\r\n // console.log('routeInterceptor.routeAutoDetection.rootRoutes', rootRoutes);\r\n const defaultRoute = rootRoutes.find(x => x.id === '/');\r\n // console.log('routeInterceptor.routeAutoDetection.defaultRoute', defaultRoute);\r\n if (defaultRoute) {\r\n return;\r\n }\r\n const markets: IMarket[] = await localApiGet('/market?pagination=false', {}, undefined, origin);\r\n // console.log('routeInterceptor.routeAutoDetection.markets', markets);\r\n const market = markets.find(x => x.isDefault) || markets.find(x => x.id === defaultMarket) || markets[0];\r\n // console.log('routeInterceptor.routeAutoDetection.market', market);\r\n const detectedCountry = await detectCountry(request, market.id);\r\n // console.log('routeInterceptor.routeAutoDetection.detectedCountry', detectedCountry);\r\n const detectedMarket = detectedCountry ? (\r\n markets.filter(x => Array.isArray(x.countries)).find(x => {\r\n const countries: string[] = (x.countries || []).map(x => typeof x === 'string' ? x : x.id as string);\r\n return countries.includes(detectedCountry);\r\n }) ||\r\n markets.find(x => !Array.isArray(x.countries))\r\n ) : undefined;\r\n // console.log('routeInterceptor.routeAutoDetection.detectedMarket', detectedMarket);\r\n let detectedMarketRoutes = rootRoutes.filter(x => x.market === detectedMarket?.id);\r\n if (detectedMarketRoutes.length === 0) {\r\n detectedMarketRoutes = rootRoutes.filter(x => x.market === market.id);\r\n }\r\n // console.log('routeInterceptor.routeAutoDetection.detectedMarketRoutes', detectedMarketRoutes);\r\n const defaultMarketLocale = market.defaultLanguage ? (\r\n typeof market.defaultLanguage === 'string' ? market.defaultLanguage : market.defaultLanguage.id\r\n ) as string : defaultLocale;\r\n // console.log('routeInterceptor.routeAutoDetection.defaultMarketLocale', defaultMarketLocale);\r\n const detectedLocale = await detectLocale(request, defaultMarketLocale);\r\n // console.log('routeInterceptor.routeAutoDetection.detectedLocale', detectedLocale);\r\n const detectedLocaleRoutes = detectedMarketRoutes.filter(x => x.locale === detectedLocale);\r\n const detectedRoute =\r\n detectedLocaleRoutes.length > 0 ?\r\n detectedLocaleRoutes[0]! :\r\n detectedMarketRoutes.find(x => {\r\n const market = markets.find(m => m.id === x.market)!;\r\n const marketLocale = (market.defaultLanguage ? asEquatable(market.defaultLanguage as string) : defaultMarketLocale);\r\n return x.locale === marketLocale;\r\n })!;\r\n // console.log('routeInterceptor.routeAutoDetection.detectedRoute', detectedRoute);\r\n if (detectedRoute && detectedRoute.id !== url.pathname) {\r\n console.log('routeInterceptor.routeAutoDetection', detectedLocale, detectedCountry, detectedRoute.id);\r\n redirectUrl = detectedRoute.id;\r\n }\r\n // console.log('routeInterceptor.routeAutoDetection', locale, detectedCountry, rootRoutes);\r\n }\r\n if (redirectUrl) {\r\n // console.log('routeInterceptor', 'redirectUrl', redirectUrl);\r\n const resolvedUrl = new URL(redirectUrl, origin).href;\r\n // console.log('routeInterceptor', 'resolvedUrl', resolvedUrl);\r\n const search = request.nextUrl.search;\r\n const response = NextResponse.redirect(resolvedUrl + search, { status: 307 });\r\n response.cookies.set({\r\n expires: new Date(Date.now() + 1 * 24 * 60 * 60 * 1000),\r\n httpOnly: true,\r\n name: 'detectedRoute',\r\n path: '/',\r\n sameSite: 'lax',\r\n secure: true,\r\n value: redirectUrl,\r\n });\r\n return response;\r\n }\r\n};\r\n","import { defaultLocale, defaultMarket, IRoute } from '@websolutespa/bom-core';\r\nimport { NextMiddlewareResult } from 'next/dist/server/web/types';\r\nimport { NextFetchEvent, NextRequest, NextResponse } from 'next/server';\r\nimport { localApiGet } from '../lib/http';\r\nimport { getHrefBeforeRedirect, getNextUrl } from '../server/utils';\r\nimport { getRequestOrigin, Middleware, MiddlewareOptions } from './proxy';\r\n\r\nexport type Proxy = (request: NextRequest, next: NextFetchEvent) => Promise<NextMiddlewareResult>;\r\n\r\nexport type RouteMiddlewareOptions = {\r\n request: NextRequest,\r\n next: NextFetchEvent,\r\n route: IRoute,\r\n disabled?: boolean,\r\n};\r\nexport type RouteMiddleware = (props: RouteMiddlewareOptions) => NextMiddlewareResult | Promise<NextMiddlewareResult>;\r\n\r\nexport type RouteInterceptorProxy = (route: IRoute, request: NextRequest, next: NextFetchEvent) => Promise<NextMiddlewareResult>;\r\n\r\nexport type ResolvedRoute = IRoute & { splat?: string };\r\nexport type RouteResolverResponse = {\r\n parent?: IRoute;\r\n route?: ResolvedRoute;\r\n};\r\n\r\n/**\r\n * Resolves a public request to a CMS route, then rewrites it to the internal\r\n * Next.js page while preserving the original browser URL.\r\n *\r\n * The resolver call is deliberately made to this request's public origin so it\r\n * works behind reverse proxies and deployment hosts. A rewrite keeps routing\r\n * server-side, avoiding an extra browser round trip that a redirect would add.\r\n */\r\nexport function createRouteProxy(...middlewares: RouteMiddleware[]): Middleware {\r\n return async function ({ request, next }: MiddlewareOptions) {\r\n const url = request.nextUrl;\r\n const origin = getRequestOrigin(request);\r\n const hrefBeforeRedirect = getHrefBeforeRedirect(request);\r\n const { pathname } = url;\r\n const headers = new Headers(request.headers);\r\n headers.set('x-pathname', pathname);\r\n try {\r\n const draftMode = request.cookies.has('__prerender_bypass');\r\n console.log('draftMode', draftMode);\r\n if (draftMode) {\r\n // Draft requests need Payload's native preview behavior, so skip the\r\n // route lookup and its database/cache work entirely.\r\n return;\r\n }\r\n // Resolve once before invoking route middleware. This shares the route\r\n // snapshot result across all middleware rather than letting each one\r\n // repeat the internal API request.\r\n const resolution = await localApiGet<RouteResolverResponse>(\r\n `/-route?pathname=${url.pathname}&href=${url.href}&hrefBeforeRedirect=${hrefBeforeRedirect}`,\r\n {},\r\n undefined,\r\n origin\r\n );\r\n const route = resolution?.route;\r\n // console.log('createRouteProxy', route);\r\n if (route) {\r\n let middlewareResponse, i = 0;\r\n // Run in registration order and stop at the first response. Later\r\n // middleware cannot affect a committed rewrite, so short-circuiting\r\n // avoids unnecessary authentication or policy checks.\r\n while (i < middlewares.length && !middlewareResponse) {\r\n const middleware = middlewares[i] as RouteMiddleware;\r\n // console.log('createRouteProxy.middlewares', middlewares.length, typeof middleware === 'function');\r\n if (typeof middleware === 'function') {\r\n middlewareResponse = await middleware({ request, next, route });\r\n if (middlewareResponse) {\r\n return middlewareResponse;\r\n }\r\n }\r\n i++;\r\n }\r\n const nextUrl = getNextUrl(request, route);\r\n console.log('createRouteProxy.Found', pathname, '>', nextUrl.pathname);\r\n // Pass the resolved route as request headers so the internal page can\r\n // render without performing a second route-resolution lookup.\r\n headers.set('x-market', route.market);\r\n headers.set('x-locale', route.locale);\r\n headers.set('x-schema', route.schema);\r\n headers.set('x-id', String(route.page));\r\n headers.set('x-forwarded-pathname', nextUrl.pathname);\r\n const response = NextResponse.rewrite(nextUrl, {\r\n request: {\r\n headers,\r\n },\r\n });\r\n // const response = NextResponse.redirect(url);\r\n return response;\r\n } else {\r\n const parentRoute = resolution?.parent;\r\n // The resolver returns the nearest parent even when no leaf route\r\n // matches. Reusing its market and locale makes the 404 contextual\r\n // without another lookup; defaults cover an entirely unknown path.\r\n const market = parentRoute?.market || defaultMarket;\r\n const locale = parentRoute?.locale || defaultLocale;\r\n const nextUrl = request.nextUrl.clone();\r\n nextUrl.pathname = `/${market}/${locale}/404`;\r\n headers.set('x-market', market);\r\n headers.set('x-locale', locale);\r\n headers.set('x-schema', 'not_found');\r\n headers.set('x-id', '404');\r\n headers.set('x-forwarded-pathname', nextUrl.pathname);\r\n console.log('createRouteProxy.NotFound', pathname);\r\n const response = NextResponse\r\n .rewrite(nextUrl, {\r\n request: {\r\n headers,\r\n },\r\n });\r\n return response;\r\n }\r\n } catch (error: unknown) {\r\n const routeError = error && typeof error === 'object'\r\n ? error as { status?: number; statusText?: string; url?: string }\r\n : {};\r\n\r\n if (routeError.status && routeError.status >= 300 && routeError.status < 400) {\r\n console.log('createRouteProxy.3xx', url.pathname, routeError.status, routeError.statusText);\r\n const nextUrl = request.nextUrl.clone();\r\n // The handler has already validated the redirect target. Redirect the\r\n // browser once so its address bar changes, rather than rewriting a\r\n // route whose canonical URL is different.\r\n nextUrl.pathname = '/';\r\n headers.set('x-forwarded-pathname', nextUrl.pathname);\r\n const response = NextResponse.redirect(nextUrl, 307);\r\n return response;\r\n } else if (routeError.status && routeError.status >= 400 && routeError.status < 500) {\r\n if (routeError.status === 404) {\r\n /**\r\n * A resolver miss is not necessarily a CMS 404: it may be a Next.js\r\n * file-system route such as an API endpoint or static asset. Letting\r\n * Next continue avoids routing those requests through a fallback\r\n * render and keeps their fast native handling intact.\r\n */\r\n // console.log('createRouteProxy.route.notfound', url.pathname);\r\n return;\r\n }\r\n console.log('createRouteProxy.4xx', url.pathname, routeError.status, routeError.statusText);\r\n // Other client errors are terminal CMS outcomes, so render the shared\r\n // 404 page directly instead of issuing a separate client navigation.\r\n const market = defaultMarket;\r\n const locale = defaultLocale;\r\n const nextUrl = request.nextUrl.clone();\r\n nextUrl.pathname = `/${market}/${locale}/404`;\r\n headers.set('x-market', market);\r\n headers.set('x-locale', locale);\r\n headers.set('x-schema', 'not_found');\r\n headers.set('x-id', '404');\r\n headers.set('x-forwarded-pathname', nextUrl.pathname);\r\n console.log('createRouteProxy.NotFound', pathname);\r\n const response = NextResponse\r\n .rewrite(nextUrl, {\r\n request: {\r\n headers,\r\n },\r\n });\r\n return response;\r\n /*\r\n const response = NextResponse.next({\r\n status: routeError.status,\r\n statusText: routeError.statusText,\r\n headers,\r\n });\r\n return response;\r\n */\r\n }\r\n // A resolver failure must not block unrelated Next.js routes. Returning\r\n // undefined delegates to the normal pipeline and avoids masking a\r\n // transient upstream failure with a misleading synthetic response.\r\n console.log('createRouteProxy.error.5xx', url.pathname, routeError.url, routeError.status, routeError.statusText || error);\r\n return;\r\n }\r\n };\r\n}\r\n\r\n/*\r\n\r\nexport const routeInterceptor: Proxy = async function (request: NextRequest, next: NextFetchEvent) {\r\n const middleware = await createRouteProxy();\r\n return await middleware(request, next);\r\n};\r\n\r\n*/\r\n"],"mappings":";;;;;;;;;;;;;AAoBA,SAAgB,iBAAiB,SAA8B;CAC7D,MAAM,gBAAgB,QAAQ,QAAQ,IAAI,kBAAkB,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK;CACnF,MAAM,oBAAoB,QAAQ,QAAQ,IAAI,mBAAmB,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK;CACxF,MAA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IACzB,QAAQ,IAAI,wBAAwB,QAAQ,QAAQ;IACpD,QAAQ,IAAI,6BAA6B,QAAQ;IAOjD,OANiB,aACd,QAAQ,SAAS,EAChB,SAAS,EACP,QACF,EACF,CACY;GAShB;GAIA,QAAQ,IAAI,8BAA8B,IAAI,UAAU,WAAW,KAAK,WAAW,QAAQ,WAAW,cAAc,KAAK;GACzH;EACF;CACF;AACF"}
|
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
import { A as ReadonlyHeaders, M as TypedPage, N as TypedPageContext, O as PageParams, P as MixerPayload, S as MixerContext, _ as IPageContext, i as IContext, p as ILazyStaticPropsFunc, t as BaseOptions } from "../types-D29_snYY.js";
|
|
2
|
-
import { IComponent, IRoute } from "@websolutespa/bom-core";
|
|
3
|
-
import { NextRequest, NextResponse } from "next/server";
|
|
4
|
-
import * as _websolutespa_payload_plugin_bowl0 from "@websolutespa/payload-plugin-bowl";
|
|
5
|
-
import { Config, User } from "@websolutespa/payload-plugin-bowl";
|
|
6
|
-
import { BasePayload, CollectionSlug, SanitizedConfig, TypedFallbackLocale, TypedLocale } from "payload";
|
|
7
|
-
import { headers as headers$1 } from "next/headers";
|
|
8
|
-
import { NextApiRequest, ResolvingMetadata } from "next";
|
|
9
|
-
import * as next_dist_server_web_next_url0 from "next/dist/server/web/next-url";
|
|
10
|
-
|
|
11
|
-
//#region src/server/context.d.ts
|
|
12
|
-
declare function getPageContext<TSlug extends CollectionSlug = CollectionSlug>(): Promise<TypedPageContext<TSlug>>;
|
|
13
|
-
declare function setPageContext<TSlug extends CollectionSlug>(data: TypedPageContext<TSlug>): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Same as createPageContext but without draft mode — used for error/not-found pages
|
|
16
|
-
* that should always show published content regardless of draft mode state.
|
|
17
|
-
*/
|
|
18
|
-
declare function createNotFoundContext<TSlug extends CollectionSlug>(market: string, locale: string, slug: TSlug, id: string, config: Promise<SanitizedConfig>, headers?: Awaited<ReturnType<typeof headers$1>>): Promise<TypedPageContext<TSlug>>;
|
|
19
|
-
/**
|
|
20
|
-
* Initialises the full page context using Payload local API.
|
|
21
|
-
*
|
|
22
|
-
* Replaces the @websolutespa/bom-next/server createPageContext that goes through the store
|
|
23
|
-
* abstraction. All data is fetched directly from Payload; the mixer context
|
|
24
|
-
* (routes + categories) is passed to every payload.find call so that
|
|
25
|
-
* payload-plugin-bowl can enrich responses.
|
|
26
|
-
*/
|
|
27
|
-
declare function createPageContext<TSlug extends CollectionSlug>(market: string, locale: string, slug: TSlug, id: string, config: Promise<SanitizedConfig>, headers?: Awaited<ReturnType<typeof headers$1>>): Promise<TypedPageContext<TSlug>>;
|
|
28
|
-
/**
|
|
29
|
-
* Layout-only context — no page fetch. Used by RootLayout server components.
|
|
30
|
-
*/
|
|
31
|
-
declare function createLayoutContext(market: string, locale: string, config: Promise<SanitizedConfig>, headers?: Awaited<ReturnType<typeof headers$1>>): Promise<IPageContext>;
|
|
32
|
-
//# sourceMappingURL=context.d.ts.map
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region src/server/handlers/auth.handler.d.ts
|
|
35
|
-
declare function getAuthMeHandler(config: Promise<SanitizedConfig>): (request: NextRequest) => Promise<Response>;
|
|
36
|
-
//# sourceMappingURL=auth.handler.d.ts.map
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/server/handlers/captions.handler.d.ts
|
|
39
|
-
declare function getCaptionsVTT(config: Promise<SanitizedConfig>): (request: NextRequest) => Promise<Response>;
|
|
40
|
-
//# sourceMappingURL=captions.handler.d.ts.map
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/server/handlers/collection.handler.d.ts
|
|
43
|
-
declare function collectionGetHandler(config: Promise<SanitizedConfig>): (request: Request, {
|
|
44
|
-
params: getParams
|
|
45
|
-
}: {
|
|
46
|
-
params: Promise<{
|
|
47
|
-
collections: string[];
|
|
48
|
-
}>;
|
|
49
|
-
}) => Promise<Response>;
|
|
50
|
-
declare function collectionPostHandler(config: Promise<SanitizedConfig>): (request: Request, {
|
|
51
|
-
params: getParams
|
|
52
|
-
}: {
|
|
53
|
-
params: Promise<{
|
|
54
|
-
collections: string[];
|
|
55
|
-
}>;
|
|
56
|
-
}) => Promise<Response | undefined>;
|
|
57
|
-
declare function collectionPatchHandler(config: Promise<SanitizedConfig>): (request: Request, {
|
|
58
|
-
params: getParams
|
|
59
|
-
}: {
|
|
60
|
-
params: Promise<{
|
|
61
|
-
collections: string[];
|
|
62
|
-
}>;
|
|
63
|
-
}) => Promise<Response | undefined>;
|
|
64
|
-
declare function collectionDeleteHandler(config: Promise<SanitizedConfig>): (request: Request, {
|
|
65
|
-
params: getParams
|
|
66
|
-
}: {
|
|
67
|
-
params: Promise<{
|
|
68
|
-
collections: string[];
|
|
69
|
-
}>;
|
|
70
|
-
}) => Promise<Response | undefined>;
|
|
71
|
-
//# sourceMappingURL=collection.handler.d.ts.map
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/server/handlers/index.handler.d.ts
|
|
74
|
-
declare function indexGetHandler(config: Promise<SanitizedConfig>): (request: Request) => Promise<Response>;
|
|
75
|
-
//# sourceMappingURL=index.handler.d.ts.map
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region src/server/handlers/preview.handler.d.ts
|
|
78
|
-
declare function previewHandler(request: NextRequest): Promise<NextResponse<unknown>>;
|
|
79
|
-
//# sourceMappingURL=preview.handler.d.ts.map
|
|
80
|
-
//#endregion
|
|
81
|
-
//#region src/server/handlers/registry.handler.d.ts
|
|
82
|
-
declare function getRegistry(): (request: NextRequest) => Promise<Response>;
|
|
83
|
-
declare function getRegistryItem(): (request: NextRequest, {
|
|
84
|
-
params: getParams
|
|
85
|
-
}: {
|
|
86
|
-
params: Promise<{
|
|
87
|
-
slug: string[];
|
|
88
|
-
}>;
|
|
89
|
-
}) => Promise<Response>;
|
|
90
|
-
//# sourceMappingURL=registry.handler.d.ts.map
|
|
91
|
-
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/server/handlers/route.handler.d.ts
|
|
94
|
-
/**
|
|
95
|
-
* Creates the internal `/-route` GET handler used by middleware to resolve CMS
|
|
96
|
-
* paths, route schemas, and redirects before a page is rendered.
|
|
97
|
-
*
|
|
98
|
-
* One Payload request is created per incoming API request so authentication and
|
|
99
|
-
* query context are shared by every route operation. The route service then
|
|
100
|
-
* reuses its snapshot cache, which avoids rebuilding the complete route graph
|
|
101
|
-
* for repeated market, locale, and access contexts.
|
|
102
|
-
*/
|
|
103
|
-
declare function getRouteHandler(config: Promise<SanitizedConfig>): (request: NextRequest) => Promise<Response>;
|
|
104
|
-
//# sourceMappingURL=route.handler.d.ts.map
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region src/server/handlers/sitemap.handler.d.ts
|
|
107
|
-
type ISiteMap = {
|
|
108
|
-
id: string;
|
|
109
|
-
updatedAt?: string | Date;
|
|
110
|
-
};
|
|
111
|
-
declare function getSiteMapIndex(config: Promise<SanitizedConfig>): (request: NextRequest) => Promise<Response>;
|
|
112
|
-
declare function getSiteMapXML(config: Promise<SanitizedConfig>): (request: NextRequest, {
|
|
113
|
-
params: getParams
|
|
114
|
-
}: {
|
|
115
|
-
params: Promise<{
|
|
116
|
-
market?: string;
|
|
117
|
-
locale?: string;
|
|
118
|
-
}>;
|
|
119
|
-
}) => Promise<Response>;
|
|
120
|
-
declare function getSiteMapXSL(config: Promise<SanitizedConfig>): (request: NextRequest, {
|
|
121
|
-
params: getParams
|
|
122
|
-
}: {
|
|
123
|
-
params: Promise<{
|
|
124
|
-
market?: string;
|
|
125
|
-
locale?: string;
|
|
126
|
-
}>;
|
|
127
|
-
}) => Promise<Response>;
|
|
128
|
-
//# sourceMappingURL=sitemap.handler.d.ts.map
|
|
129
|
-
//#endregion
|
|
130
|
-
//#region src/server/handlers/static-params.handler.d.ts
|
|
131
|
-
/**
|
|
132
|
-
* Returns a generateStaticParams function for a given page collection slug.
|
|
133
|
-
*/
|
|
134
|
-
declare function getStaticParams<TSlug extends CollectionSlug>(slug: TSlug, config: Promise<SanitizedConfig>): () => Promise<PageParams[]>;
|
|
135
|
-
declare function getStaticParams_(schema: string): () => Promise<{
|
|
136
|
-
market: string;
|
|
137
|
-
locale: string;
|
|
138
|
-
id: string;
|
|
139
|
-
}[]>;
|
|
140
|
-
declare function getStaticParamsFromPayload(schema: string, config: Promise<SanitizedConfig>): () => Promise<{
|
|
141
|
-
market: string;
|
|
142
|
-
locale: string;
|
|
143
|
-
id: string;
|
|
144
|
-
}[]>;
|
|
145
|
-
//# sourceMappingURL=static-params.handler.d.ts.map
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region src/server/handlers/vars.handler.d.ts
|
|
148
|
-
declare function getVarsHandler(config: Promise<SanitizedConfig>): (request: NextRequest) => Promise<Response>;
|
|
149
|
-
//# sourceMappingURL=vars.handler.d.ts.map
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/server/lazy.d.ts
|
|
152
|
-
declare function withLazyProps<T>(key: string, getComponentProps: ILazyStaticPropsFunc<T>): Promise<void>;
|
|
153
|
-
declare function decorateLazyComponents(extraComponents?: IComponent[]): Promise<void>;
|
|
154
|
-
//# sourceMappingURL=lazy.d.ts.map
|
|
155
|
-
//#endregion
|
|
156
|
-
//#region src/server/local-api.d.ts
|
|
157
|
-
declare function getLocalApi(config: Promise<SanitizedConfig>, slug: string): Promise<any>;
|
|
158
|
-
//# sourceMappingURL=local-api.d.ts.map
|
|
159
|
-
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region src/server/metadata.d.ts
|
|
162
|
-
/**
|
|
163
|
-
* Returns a generateMetadata function for a given page collection slug.
|
|
164
|
-
* Uses bowl's createPageContext (Payload local API) instead of the store abstraction.
|
|
165
|
-
*/
|
|
166
|
-
declare function getMetadata<TSlug extends CollectionSlug>(slug: TSlug, config: Promise<SanitizedConfig>): (props: Readonly<{
|
|
167
|
-
params: Promise<PageParams>;
|
|
168
|
-
}>, parent: ResolvingMetadata) => Promise<{
|
|
169
|
-
title: string;
|
|
170
|
-
description: string | undefined;
|
|
171
|
-
}>;
|
|
172
|
-
//# sourceMappingURL=metadata.d.ts.map
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/server/mixer.d.ts
|
|
175
|
-
declare function getCacheKey({
|
|
176
|
-
market,
|
|
177
|
-
locale,
|
|
178
|
-
user,
|
|
179
|
-
draft
|
|
180
|
-
}: {
|
|
181
|
-
market?: string;
|
|
182
|
-
locale?: string;
|
|
183
|
-
user?: User & Config['user'];
|
|
184
|
-
draft?: string;
|
|
185
|
-
}): string;
|
|
186
|
-
declare function getContext(): Promise<IContext>;
|
|
187
|
-
declare function setContext(data: Partial<IContext>): Promise<void>;
|
|
188
|
-
declare function getSearchParams(request: NextRequest): {
|
|
189
|
-
market: string;
|
|
190
|
-
locale: string;
|
|
191
|
-
defaultMarket: string;
|
|
192
|
-
defaultLocale: string;
|
|
193
|
-
params: {
|
|
194
|
-
[k: string]: string;
|
|
195
|
-
};
|
|
196
|
-
searchParams: URLSearchParams;
|
|
197
|
-
};
|
|
198
|
-
declare const getPayloadInstance: (props: {
|
|
199
|
-
config: SanitizedConfig | Promise<SanitizedConfig>;
|
|
200
|
-
}) => Promise<BasePayload>;
|
|
201
|
-
declare function getOptions({
|
|
202
|
-
locale,
|
|
203
|
-
user,
|
|
204
|
-
draft
|
|
205
|
-
}: {
|
|
206
|
-
locale?: string;
|
|
207
|
-
user?: User & Config['user'];
|
|
208
|
-
draft?: boolean;
|
|
209
|
-
}): {
|
|
210
|
-
localized: BaseOptions;
|
|
211
|
-
unlocalized: BaseOptions;
|
|
212
|
-
};
|
|
213
|
-
declare function getRoutes({
|
|
214
|
-
payload,
|
|
215
|
-
market,
|
|
216
|
-
locale,
|
|
217
|
-
user,
|
|
218
|
-
draft
|
|
219
|
-
}: {
|
|
220
|
-
payload: BasePayload;
|
|
221
|
-
market?: string;
|
|
222
|
-
locale?: string;
|
|
223
|
-
user?: User & Config['user'];
|
|
224
|
-
draft?: boolean;
|
|
225
|
-
}): Promise<IRoute[]>;
|
|
226
|
-
declare function getMixerContext({
|
|
227
|
-
payload,
|
|
228
|
-
market,
|
|
229
|
-
locale,
|
|
230
|
-
user,
|
|
231
|
-
draft
|
|
232
|
-
}: {
|
|
233
|
-
payload: BasePayload;
|
|
234
|
-
market: string;
|
|
235
|
-
locale: string;
|
|
236
|
-
user?: User & Config['user'];
|
|
237
|
-
draft?: boolean;
|
|
238
|
-
}): Promise<MixerContext>;
|
|
239
|
-
/**
|
|
240
|
-
* Runtime (request-time) payload accessor.
|
|
241
|
-
*
|
|
242
|
-
* By default, operates as the guest user for static generation. For auth:
|
|
243
|
-
* call getHeaders() directly in your page/route/layout, then pass it here.
|
|
244
|
-
*
|
|
245
|
-
* Example:
|
|
246
|
-
* const headers = await getHeaders();
|
|
247
|
-
* const { payload, user, getContext } = await getPayload({ config, headers });
|
|
248
|
-
*/
|
|
249
|
-
declare function getPayload({
|
|
250
|
-
config,
|
|
251
|
-
headers
|
|
252
|
-
}: {
|
|
253
|
-
config: Promise<SanitizedConfig>;
|
|
254
|
-
headers?: ReadonlyHeaders;
|
|
255
|
-
}): Promise<{
|
|
256
|
-
payload: MixerPayload;
|
|
257
|
-
user: (User & {
|
|
258
|
-
collection: "users";
|
|
259
|
-
}) | (User & _websolutespa_payload_plugin_bowl0.EndUser & {
|
|
260
|
-
collection: "end_users";
|
|
261
|
-
});
|
|
262
|
-
getContext: (market: string, locale: string) => Promise<MixerContext>;
|
|
263
|
-
}>;
|
|
264
|
-
declare function filterRoutes(routes: IRoute[], market: string, locale: string): IRoute[];
|
|
265
|
-
declare function getAuthHeaders(token: {
|
|
266
|
-
value: string;
|
|
267
|
-
} | undefined): Headers;
|
|
268
|
-
/**
|
|
269
|
-
* Produces the common option block shared across all payload.find / payload.findGlobal calls.
|
|
270
|
-
* For payload.find, add pagination: false and limit: 10000 at the call site.
|
|
271
|
-
* For payload.findByID, spread directly — extra find-only fields are ignored.
|
|
272
|
-
*/
|
|
273
|
-
declare function buildBaseOptions(user: any, locale: string, draft?: boolean): {
|
|
274
|
-
locale: TypedLocale;
|
|
275
|
-
fallbackLocale: TypedFallbackLocale;
|
|
276
|
-
draft: boolean;
|
|
277
|
-
depth: number;
|
|
278
|
-
user: any;
|
|
279
|
-
overrideAccess: boolean;
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* Payload proxy example
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
* import type { Payload, PayloadRequest } from '../types/index.js'
|
|
286
|
-
|
|
287
|
-
import { commitTransaction } from './commitTransaction.js'
|
|
288
|
-
import { initTransaction } from './initTransaction.js'
|
|
289
|
-
import { killTransaction } from './killTransaction.js'
|
|
290
|
-
|
|
291
|
-
const localOperations = [
|
|
292
|
-
'count',
|
|
293
|
-
'countGlobalVersions',
|
|
294
|
-
'countVersions',
|
|
295
|
-
'create',
|
|
296
|
-
'delete',
|
|
297
|
-
'duplicate',
|
|
298
|
-
'find',
|
|
299
|
-
'findByID',
|
|
300
|
-
'delete',
|
|
301
|
-
'duplicate',
|
|
302
|
-
'find',
|
|
303
|
-
'findByID',
|
|
304
|
-
'findGlobal',
|
|
305
|
-
'findGlobalVersionByID',
|
|
306
|
-
'findGlobalVersions',
|
|
307
|
-
'findVersionByID',
|
|
308
|
-
'findVersionByID',
|
|
309
|
-
'login',
|
|
310
|
-
'update',
|
|
311
|
-
'updateGlobal',
|
|
312
|
-
'restoreVersion',
|
|
313
|
-
'restoreGlobalVersion',
|
|
314
|
-
] satisfies (keyof Payload)[]
|
|
315
|
-
|
|
316
|
-
type LocalOperation = (typeof localOperations)[number]
|
|
317
|
-
|
|
318
|
-
const isLocalOperation = (key: string): key is LocalOperation => {
|
|
319
|
-
return localOperations.includes(key as LocalOperation)
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
export const withTransaction = async <T>(
|
|
323
|
-
payload: Payload,
|
|
324
|
-
callback: (transaction: Payload) => Promise<T>,
|
|
325
|
-
) => {
|
|
326
|
-
const transactionReq = { payload } as PayloadRequest
|
|
327
|
-
await initTransaction(transactionReq)
|
|
328
|
-
|
|
329
|
-
const proxy = new Proxy(payload, {
|
|
330
|
-
get(target, property: keyof Payload, receiver) {
|
|
331
|
-
if (isLocalOperation(property)) {
|
|
332
|
-
const operation = Reflect.get(target, property, receiver)
|
|
333
|
-
|
|
334
|
-
return function (options) {
|
|
335
|
-
let req: Partial<PayloadRequest> = options.req
|
|
336
|
-
|
|
337
|
-
if (!req) {
|
|
338
|
-
req = {}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
if (!req.transactionID) {
|
|
342
|
-
req = { ...req, transactionID: transactionReq.transactionID }
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
return (operation as (...args: unknown[]) => void)({
|
|
346
|
-
...options,
|
|
347
|
-
req,
|
|
348
|
-
})
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
return Reflect.get(target, property, receiver)
|
|
353
|
-
},
|
|
354
|
-
})
|
|
355
|
-
|
|
356
|
-
try {
|
|
357
|
-
const result = await callback(proxy)
|
|
358
|
-
await commitTransaction(transactionReq)
|
|
359
|
-
return result
|
|
360
|
-
} catch (e) {
|
|
361
|
-
await killTransaction(transactionReq)
|
|
362
|
-
throw e
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// -----------------
|
|
367
|
-
|
|
368
|
-
const { one, two } = await withTransaction(payload, async (transaction) => {
|
|
369
|
-
const one = await transaction.create({ collection: 'posts', data: { title: 'one' } })
|
|
370
|
-
const two = await transaction.create({ collection: 'posts', data: { title: 'two' } })
|
|
371
|
-
|
|
372
|
-
return { one, two }
|
|
373
|
-
})
|
|
374
|
-
|
|
375
|
-
*/
|
|
376
|
-
//# sourceMappingURL=mixer.d.ts.map
|
|
377
|
-
//#endregion
|
|
378
|
-
//#region src/server/page.d.ts
|
|
379
|
-
/**
|
|
380
|
-
* Fetches a single page document by ID using Payload local API and assembles
|
|
381
|
-
* the IPage envelope (routes, alternates, breadcrumb, parentRoute).
|
|
382
|
-
*
|
|
383
|
-
* All data required for the envelope comes from mixerContext — no store calls.
|
|
384
|
-
* - routes/alternates : mixerContext.routes filtered by schema+id
|
|
385
|
-
* - segments : getCategorySegments() from bom-core (pure)
|
|
386
|
-
* - breadcrumb : findRouteOfCategory() from bom-core + mixerContext.currentRoutes
|
|
387
|
-
*/
|
|
388
|
-
declare function getPage<TSlug extends CollectionSlug>(slug: TSlug, id: string, market: string, locale: string, payload: MixerPayload, user: User, mixerContext: MixerContext, draftMode?: boolean): Promise<TypedPage<TSlug> | undefined>;
|
|
389
|
-
//# sourceMappingURL=page.d.ts.map
|
|
390
|
-
//#endregion
|
|
391
|
-
//#region src/server/utils.d.ts
|
|
392
|
-
declare function getNextUrl(request: NextRequest, route: IRoute): next_dist_server_web_next_url0.NextURL;
|
|
393
|
-
declare function getHrefBeforeRedirect(request: NextRequest): string | null;
|
|
394
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region src/server/utmz.d.ts
|
|
397
|
-
declare function getUtmz(request: NextApiRequest): string;
|
|
398
|
-
//# sourceMappingURL=utmz.d.ts.map
|
|
399
|
-
|
|
400
|
-
//#endregion
|
|
401
|
-
export { ISiteMap, buildBaseOptions, collectionDeleteHandler, collectionGetHandler, collectionPatchHandler, collectionPostHandler, createLayoutContext, createNotFoundContext, createPageContext, decorateLazyComponents, filterRoutes, getAuthHeaders, getAuthMeHandler, getCacheKey, getCaptionsVTT, getContext, getHrefBeforeRedirect, getLocalApi, getMetadata, getMixerContext, getNextUrl, getOptions, getPage, getPageContext, getPayload, getPayloadInstance, getRegistry, getRegistryItem, getRouteHandler, getRoutes, getSearchParams, getSiteMapIndex, getSiteMapXML, getSiteMapXSL, getStaticParams, getStaticParamsFromPayload, getStaticParams_, getUtmz, getVarsHandler, indexGetHandler, previewHandler, setContext, setPageContext, withLazyProps };
|
|
402
|
-
//# sourceMappingURL=server-BHObJHJ6.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server-BHObJHJ6.d.ts","names":[],"sources":["../../src/server/context.ts","../../src/server/handlers/auth.handler.ts","../../src/server/handlers/captions.handler.ts","../../src/server/handlers/collection.handler.ts","../../src/server/handlers/index.handler.ts","../../src/server/handlers/preview.handler.ts","../../src/server/handlers/registry.handler.ts","../../src/server/handlers/route.handler.ts","../../src/server/handlers/sitemap.handler.ts","../../src/server/handlers/static-params.handler.ts","../../src/server/handlers/vars.handler.ts","../../src/server/lazy.ts","../../src/server/local-api.ts","../../src/server/metadata.ts","../../src/server/mixer.ts","../../src/server/page.ts","../../src/server/utils.ts","../../src/server/utmz.ts"],"mappings":";;;;;;;;;;;iBAoBsB,6BAA6B,iBAAiB,mBAAmB,QAAQ,iBAAiB;iBAU1F,6BAA6B,sBAAsB,iBAAiB,SAAM;;;;;iBAW1E,oCAAoC,sDAGlD,2BAEE,QAAQ,4BACN,QAAQ,kBAAkB,cACnC,QAAQ,iBAAiB;;AA5B5B;AAAoC;AAAe;AAAiB;AAA4C;AAAjB;AAAR;AAAO,iBA2DxE,iBA3DwE,CAAA,cA2DxC,cA3DwC,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,IAAA,EA8DtF,KA9DsF,EAAA,EAAA,EAAA,MAAA,EAAA,MAAA,EAgEpF,OAhEoF,CAgE5E,eAhE4E,CAAA,EAAA,OAAA,CAAA,EAiElF,OAjEkF,CAiE1E,UAjE0E,CAAA,OAiExD,SAjEwD,CAAA,CAAA,CAAA,EAkE3F,OAlE2F,CAkEnF,gBAlEmF,CAkElE,KAlEkE,CAAA,CAAA;AAU9F;AAAoC;AAAe;AAAuC,iBA4FpE,mBAAA,CA5FoE,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EA+FhF,OA/FgF,CA+FxE,eA/FwE,CAAA,EAAA,OAAA,CAAA,EAgG9E,OAhG8E,CAgGtE,UAhGsE,CAAA,OAgGpD,SAhGoD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