@cmssy/react 19.35.1 → 19.36.0
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 +3 -2
- package/dist/index.js +3 -2
- package/dist/spa.cjs +3 -2
- package/dist/spa.js +3 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -848,11 +848,12 @@ function defineCmssyRouteConfig(config) {
|
|
|
848
848
|
if (typeof window !== "undefined") {
|
|
849
849
|
const carried = [
|
|
850
850
|
...config.draftSecret === void 0 ? [] : ["draftSecret"],
|
|
851
|
-
...config.devToken === void 0 ? [] : ["devToken"]
|
|
851
|
+
...config.devToken === void 0 ? [] : ["devToken"],
|
|
852
|
+
...config.apiToken === void 0 ? [] : ["apiToken"]
|
|
852
853
|
];
|
|
853
854
|
if (carried.length > 0) {
|
|
854
855
|
throw new Error(
|
|
855
|
-
`cmssy: ${carried.join(" and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken is an API credential
|
|
856
|
+
`cmssy: ${carried.join(", ").replace(/, (?=[^,]*$)/, " and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken or apiToken is an API credential for it. Keep them on a server build (@cmssy/next, @cmssy/astro or Vite SSR) and leave them out of a client-side config.`
|
|
856
857
|
);
|
|
857
858
|
}
|
|
858
859
|
}
|
package/dist/index.js
CHANGED
|
@@ -848,11 +848,12 @@ function defineCmssyRouteConfig(config) {
|
|
|
848
848
|
if (typeof window !== "undefined") {
|
|
849
849
|
const carried = [
|
|
850
850
|
...config.draftSecret === void 0 ? [] : ["draftSecret"],
|
|
851
|
-
...config.devToken === void 0 ? [] : ["devToken"]
|
|
851
|
+
...config.devToken === void 0 ? [] : ["devToken"],
|
|
852
|
+
...config.apiToken === void 0 ? [] : ["apiToken"]
|
|
852
853
|
];
|
|
853
854
|
if (carried.length > 0) {
|
|
854
855
|
throw new Error(
|
|
855
|
-
`cmssy: ${carried.join(" and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken is an API credential
|
|
856
|
+
`cmssy: ${carried.join(", ").replace(/, (?=[^,]*$)/, " and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken or apiToken is an API credential for it. Keep them on a server build (@cmssy/next, @cmssy/astro or Vite SSR) and leave them out of a client-side config.`
|
|
856
857
|
);
|
|
857
858
|
}
|
|
858
859
|
}
|
package/dist/spa.cjs
CHANGED
|
@@ -310,11 +310,12 @@ function defineCmssyRouteConfig(config) {
|
|
|
310
310
|
if (typeof window !== "undefined") {
|
|
311
311
|
const carried = [
|
|
312
312
|
...config.draftSecret === void 0 ? [] : ["draftSecret"],
|
|
313
|
-
...config.devToken === void 0 ? [] : ["devToken"]
|
|
313
|
+
...config.devToken === void 0 ? [] : ["devToken"],
|
|
314
|
+
...config.apiToken === void 0 ? [] : ["apiToken"]
|
|
314
315
|
];
|
|
315
316
|
if (carried.length > 0) {
|
|
316
317
|
throw new Error(
|
|
317
|
-
`cmssy: ${carried.join(" and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken is an API credential
|
|
318
|
+
`cmssy: ${carried.join(", ").replace(/, (?=[^,]*$)/, " and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken or apiToken is an API credential for it. Keep them on a server build (@cmssy/next, @cmssy/astro or Vite SSR) and leave them out of a client-side config.`
|
|
318
319
|
);
|
|
319
320
|
}
|
|
320
321
|
}
|
package/dist/spa.js
CHANGED
|
@@ -308,11 +308,12 @@ function defineCmssyRouteConfig(config) {
|
|
|
308
308
|
if (typeof window !== "undefined") {
|
|
309
309
|
const carried = [
|
|
310
310
|
...config.draftSecret === void 0 ? [] : ["draftSecret"],
|
|
311
|
-
...config.devToken === void 0 ? [] : ["devToken"]
|
|
311
|
+
...config.devToken === void 0 ? [] : ["devToken"],
|
|
312
|
+
...config.apiToken === void 0 ? [] : ["apiToken"]
|
|
312
313
|
];
|
|
313
314
|
if (carried.length > 0) {
|
|
314
315
|
throw new Error(
|
|
315
|
-
`cmssy: ${carried.join(" and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken is an API credential
|
|
316
|
+
`cmssy: ${carried.join(", ").replace(/, (?=[^,]*$)/, " and ")} reached the browser. Anyone loading the page can read a value in the bundle: a draft secret opens every unpublished draft in the workspace, and a devToken or apiToken is an API credential for it. Keep them on a server build (@cmssy/next, @cmssy/astro or Vite SSR) and leave them out of a client-side config.`
|
|
316
317
|
);
|
|
317
318
|
}
|
|
318
319
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmssy/react",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.36.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
},
|
|
111
111
|
"dependencies": {
|
|
112
112
|
"@cmssy/types": "0.77.0",
|
|
113
|
-
"@cmssy/core": "19.
|
|
113
|
+
"@cmssy/core": "19.36.0"
|
|
114
114
|
},
|
|
115
115
|
"scripts": {
|
|
116
116
|
"build": "tsup",
|