@se-studio/contentful-cms 3.7.2 → 3.7.3
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 +6 -0
- package/dist/commands/host-scaffold.d.ts.map +1 -1
- package/dist/commands/host-scaffold.js +2 -0
- package/dist/commands/host-scaffold.js.map +1 -1
- package/dist/contentful/cma-user-agent.d.ts +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/hosted/next/proxy.d.ts +16 -0
- package/dist/hosted/next/proxy.d.ts.map +1 -0
- package/dist/hosted/next/proxy.js +22 -0
- package/dist/hosted/next/proxy.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-scaffold.d.ts","sourceRoot":"","sources":["../../src/commands/host-scaffold.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAIvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"host-scaffold.d.ts","sourceRoot":"","sources":["../../src/commands/host-scaffold.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAIvF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgFzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0BlE"}
|
|
@@ -3,6 +3,8 @@ import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
|
3
3
|
import { dirname, join, resolve } from 'node:path';
|
|
4
4
|
import { isJsonMode } from '../output/mode.js';
|
|
5
5
|
const SCAFFOLD_FILES = {
|
|
6
|
+
'src/proxy.ts': `export { config, proxy } from '@se-studio/contentful-cms/hosted/next/proxy';
|
|
7
|
+
`,
|
|
6
8
|
'src/app/layout.tsx': `export default function RootLayout({ children }: { children: React.ReactNode }) {
|
|
7
9
|
return (
|
|
8
10
|
<html lang="en">
|
|
@@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ClD,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;YACjC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,UAAU,EAAE,EAAE,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;YAC5D,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,cAAc,OAAO,CAAC,MAAM,aAAa,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** SDK `application` value. Becomes `app cms-edit/<version>` in X-Contentful-User-Agent. */
|
|
2
|
-
export declare const CMA_APPLICATION = "cms-edit/3.7.
|
|
2
|
+
export declare const CMA_APPLICATION = "cms-edit/3.7.3";
|
|
3
3
|
export declare function cmaClientOptions(accessToken: string): {
|
|
4
4
|
accessToken: string;
|
|
5
5
|
application: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Next.js 16 `src/proxy.ts` for cms-edit/host.
|
|
3
|
+
*
|
|
4
|
+
* Hosts sit in a marketing-site repo with `outputFileTracingRoot` (and Turbopack
|
|
5
|
+
* git root) at the repo root. Without a host-local proxy file, Next 16 compiles
|
|
6
|
+
* the site `src/proxy.ts` (A/B tests, CMS redirects) into the host build and
|
|
7
|
+
* fails on `@/generated/abTests`.
|
|
8
|
+
*
|
|
9
|
+
* Passthrough only — cms-edit does not run experiments. `x-middleware-next`
|
|
10
|
+
* is the same header `NextResponse.next()` sends.
|
|
11
|
+
*/
|
|
12
|
+
export declare function proxy(_request: Request): Response;
|
|
13
|
+
export declare const config: {
|
|
14
|
+
matcher: string[];
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../../src/hosted/next/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,CAIjD;AAED,eAAO,MAAM,MAAM;IACjB,OAAO;CAGR,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Next.js 16 `src/proxy.ts` for cms-edit/host.
|
|
3
|
+
*
|
|
4
|
+
* Hosts sit in a marketing-site repo with `outputFileTracingRoot` (and Turbopack
|
|
5
|
+
* git root) at the repo root. Without a host-local proxy file, Next 16 compiles
|
|
6
|
+
* the site `src/proxy.ts` (A/B tests, CMS redirects) into the host build and
|
|
7
|
+
* fails on `@/generated/abTests`.
|
|
8
|
+
*
|
|
9
|
+
* Passthrough only — cms-edit does not run experiments. `x-middleware-next`
|
|
10
|
+
* is the same header `NextResponse.next()` sends.
|
|
11
|
+
*/
|
|
12
|
+
export function proxy(_request) {
|
|
13
|
+
const headers = new Headers();
|
|
14
|
+
headers.set('x-middleware-next', '1');
|
|
15
|
+
return new Response(null, { status: 200, headers });
|
|
16
|
+
}
|
|
17
|
+
export const config = {
|
|
18
|
+
matcher: [
|
|
19
|
+
'/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|ico|txt|xml)$).*)',
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../../src/hosted/next/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,UAAU,KAAK,CAAC,QAAiB;IACrC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAC9B,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;IACtC,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE;QACP,+FAA+F;KAChG;CACF,CAAC"}
|