@cmssy/next 4.0.0 → 4.0.1
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -398,7 +398,7 @@ function resolveBridgeOrigin(editorOrigin) {
|
|
|
398
398
|
}
|
|
399
399
|
return origins.length === 1 ? origins[0] : origins;
|
|
400
400
|
}
|
|
401
|
-
var CMSSY_EDIT_PATH_PREFIX = "/
|
|
401
|
+
var CMSSY_EDIT_PATH_PREFIX = "/cmssy-edit";
|
|
402
402
|
async function cmssyEditRewrite(request2, config) {
|
|
403
403
|
const { pathname, searchParams } = request2.nextUrl;
|
|
404
404
|
if (pathname.startsWith(CMSSY_EDIT_PATH_PREFIX)) return null;
|
package/dist/index.d.cts
CHANGED
|
@@ -101,7 +101,7 @@ interface CatchAllProps {
|
|
|
101
101
|
declare function createCmssyPage(config: CmssyNextConfig, blocks: BlockDefinition[], options?: CreateCmssyPageOptions): ({ params, searchParams, }: CatchAllProps) => Promise<react_jsx_runtime.JSX.Element>;
|
|
102
102
|
/**
|
|
103
103
|
* Editor page for the middleware-rewritten edit route
|
|
104
|
-
* (`app/
|
|
104
|
+
* (`app/cmssy-edit/[[...path]]/page.tsx`, `dynamic = "force-dynamic"`).
|
|
105
105
|
* Re-verifies the `cmssyEdit` + `cmssySecret` pair itself, so a direct hit
|
|
106
106
|
* on the route path (bypassing the middleware) cannot mount the editor.
|
|
107
107
|
*/
|
|
@@ -111,11 +111,11 @@ declare function createCmssyEditPage(config: CmssyNextConfig, blocks: BlockDefin
|
|
|
111
111
|
* Where the middleware rewrites editor-preview traffic. Mount the matching
|
|
112
112
|
* dynamic route in the consumer app:
|
|
113
113
|
*
|
|
114
|
-
* app/
|
|
114
|
+
* app/cmssy-edit/[[...path]]/page.tsx
|
|
115
115
|
* export const dynamic = "force-dynamic";
|
|
116
116
|
* export default createCmssyEditPage(cmssy, blocks, { editor: Editor });
|
|
117
117
|
*/
|
|
118
|
-
declare const CMSSY_EDIT_PATH_PREFIX = "/
|
|
118
|
+
declare const CMSSY_EDIT_PATH_PREFIX = "/cmssy-edit";
|
|
119
119
|
/**
|
|
120
120
|
* Rewrite VERIFIED editor requests (`cmssyEdit=1` + a `cmssySecret` matching
|
|
121
121
|
* the site's draft secret, CMS-948) onto the dedicated dynamic edit route, so
|
package/dist/index.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ interface CatchAllProps {
|
|
|
101
101
|
declare function createCmssyPage(config: CmssyNextConfig, blocks: BlockDefinition[], options?: CreateCmssyPageOptions): ({ params, searchParams, }: CatchAllProps) => Promise<react_jsx_runtime.JSX.Element>;
|
|
102
102
|
/**
|
|
103
103
|
* Editor page for the middleware-rewritten edit route
|
|
104
|
-
* (`app/
|
|
104
|
+
* (`app/cmssy-edit/[[...path]]/page.tsx`, `dynamic = "force-dynamic"`).
|
|
105
105
|
* Re-verifies the `cmssyEdit` + `cmssySecret` pair itself, so a direct hit
|
|
106
106
|
* on the route path (bypassing the middleware) cannot mount the editor.
|
|
107
107
|
*/
|
|
@@ -111,11 +111,11 @@ declare function createCmssyEditPage(config: CmssyNextConfig, blocks: BlockDefin
|
|
|
111
111
|
* Where the middleware rewrites editor-preview traffic. Mount the matching
|
|
112
112
|
* dynamic route in the consumer app:
|
|
113
113
|
*
|
|
114
|
-
* app/
|
|
114
|
+
* app/cmssy-edit/[[...path]]/page.tsx
|
|
115
115
|
* export const dynamic = "force-dynamic";
|
|
116
116
|
* export default createCmssyEditPage(cmssy, blocks, { editor: Editor });
|
|
117
117
|
*/
|
|
118
|
-
declare const CMSSY_EDIT_PATH_PREFIX = "/
|
|
118
|
+
declare const CMSSY_EDIT_PATH_PREFIX = "/cmssy-edit";
|
|
119
119
|
/**
|
|
120
120
|
* Rewrite VERIFIED editor requests (`cmssyEdit=1` + a `cmssySecret` matching
|
|
121
121
|
* the site's draft secret, CMS-948) onto the dedicated dynamic edit route, so
|
package/dist/index.js
CHANGED
|
@@ -397,7 +397,7 @@ function resolveBridgeOrigin(editorOrigin) {
|
|
|
397
397
|
}
|
|
398
398
|
return origins.length === 1 ? origins[0] : origins;
|
|
399
399
|
}
|
|
400
|
-
var CMSSY_EDIT_PATH_PREFIX = "/
|
|
400
|
+
var CMSSY_EDIT_PATH_PREFIX = "/cmssy-edit";
|
|
401
401
|
async function cmssyEditRewrite(request2, config) {
|
|
402
402
|
const { pathname, searchParams } = request2.nextUrl;
|
|
403
403
|
if (pathname.startsWith(CMSSY_EDIT_PATH_PREFIX)) return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/next",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Next.js App Router bindings for cmssy headless sites (createCmssyPage + draft preview)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cmssy",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dist"
|
|
42
42
|
],
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@cmssy/react": "^4.0.
|
|
44
|
+
"@cmssy/react": "^4.0.1",
|
|
45
45
|
"next": ">=15",
|
|
46
46
|
"react": "^18.2.0 || ^19.0.0",
|
|
47
47
|
"react-dom": "^18.2.0 || ^19.0.0"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tsup": "^8.3.0",
|
|
56
56
|
"typescript": "^5.6.0",
|
|
57
57
|
"vitest": "^2.1.0",
|
|
58
|
-
"@cmssy/react": "4.0.
|
|
58
|
+
"@cmssy/react": "4.0.1"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"jose": "^6.2.3",
|