@se-studio/contentful-cms 3.7.2 → 3.7.4

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @se-studio/contentful-cms Changelog
2
2
 
3
+ ## 3.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - f554522: cms-edit host scaffold: declare Next 16 `proxy` `config` inline. Next cannot re-export that field.
8
+
9
+ ## 3.7.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 3ff9382: cms-edit host: add a Next 16 passthrough `proxy.ts` so Vercel does not compile the parent marketing site's A/B `src/proxy.ts`.
14
+
3
15
  ## 3.7.2
4
16
 
5
17
  ### Patch Changes
@@ -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;AA8EzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0BlE"}
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;AA0FzC,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0BlE"}
@@ -3,6 +3,18 @@ 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': `import { type NextRequest, NextResponse } from 'next/server';
7
+
8
+ export function proxy(_request: NextRequest): NextResponse {
9
+ return NextResponse.next();
10
+ }
11
+
12
+ export const config = {
13
+ matcher: [
14
+ '/((?!_next/static|_next/image|favicon.ico|.*\\\\.(?:svg|png|jpg|jpeg|gif|webp|ico|txt|xml)$).*)',
15
+ ],
16
+ };
17
+ `,
6
18
  'src/app/layout.tsx': `export default function RootLayout({ children }: { children: React.ReactNode }) {
7
19
  return (
8
20
  <html lang="en">
@@ -1 +1 @@
1
- {"version":3,"file":"host-scaffold.js","sourceRoot":"","sources":["../../src/commands/host-scaffold.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,cAAc,GAA2B;IAC7C,oBAAoB,EAAE;;;;;;;CAOvB;IACC,kBAAkB,EAAE;CACrB;IACC,2BAA2B,EAAE;CAC9B;IACC,qCAAqC,EAAE;CACxC;IACC,gDAAgD,EAAE;CACnD;IACC,+BAA+B,EAAE;CAClC;IACC,0CAA0C,EAAE;CAC7C;IACC,0BAA0B,EAAE;CAC7B;IACC,4CAA4C,EAAE;CAC/C;IACC,kCAAkC,EAAE;CACrC;IACC,8BAA8B,EAAE;CACjC;IACC,iCAAiC,EAAE;CACpC;IACC,0BAA0B,EAAE;CAC7B;IACC,6BAA6B,EAAE;CAChC;IACC,oCAAoC,EAAE;CACvC;IACC,4CAA4C,EAAE;CAC/C;IACC,yDAAyD,EAAE;CAC5D;IACC,uDAAuD,EAAE;CAC1D;IACC,wBAAwB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B3B;CACA,CAAC;AAEF,MAAM,UAAU,2BAA2B,CAAC,OAAgB;IAC1D,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,oEAAoE,CAAC;SACjF,MAAM,CAAC,mBAAmB,EAAE,sCAAsC,CAAC;SACnE,MAAM,CAAC,SAAS,EAAE,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,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;gBACxC,SAAS;YACX,CAAC;YACD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAClD,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";
2
+ export declare const CMA_APPLICATION = "cms-edit/3.7.4";
3
3
  export declare function cmaClientOptions(accessToken: string): {
4
4
  accessToken: string;
5
5
  application: string;
@@ -1,3 +1,3 @@
1
1
  export declare const CMS_EDIT_PACKAGE_NAME = "@se-studio/contentful-cms";
2
- export declare const CMS_EDIT_VERSION = "3.7.2";
2
+ export declare const CMS_EDIT_VERSION = "3.7.4";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Generated by scripts/generate-embedded-assets.mjs — do not edit manually.
2
2
  export const CMS_EDIT_PACKAGE_NAME = "@se-studio/contentful-cms";
3
- export const CMS_EDIT_VERSION = "3.7.2";
3
+ export const CMS_EDIT_VERSION = "3.7.4";
4
4
  //# sourceMappingURL=version.js.map
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-cms",
3
- "version": "3.7.2",
3
+ "version": "3.7.4",
4
4
  "description": "CLI tool for AI agents to read and edit Contentful draft content without publish permissions",
5
5
  "repository": {
6
6
  "type": "git",