@kurumera/editable 0.4.0 → 0.5.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/CHANGELOG.md +17 -0
- package/dist/server/resolve.js +8 -0
- package/package.json +21 -7
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# @kurumera/editable — changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0 — 2026-10-16
|
|
4
|
+
|
|
5
|
+
`resolveEditableContent()` now forwards the visitor's `x-forwarded-for` and
|
|
6
|
+
`cf-connecting-ip`, as received, on its platform call — the same change as
|
|
7
|
+
`@kurumera/storefront` 0.9.0's `forwardHeaders`.
|
|
8
|
+
|
|
9
|
+
It runs from the root layout on every page, and it never throws by design, so a
|
|
10
|
+
call the platform throttled did not fail the page: it quietly rendered without
|
|
11
|
+
the merchant's edited content. Without the visitor's address every page view on
|
|
12
|
+
a server looked like one visitor, and a single crawler was enough to cause that.
|
|
13
|
+
|
|
14
|
+
**Dependency change:** `@kurumera/storefront` is now `^0.9.0`, was `^0.3.0`. The
|
|
15
|
+
old range made every theme install a separate nested 0.3.x copy of the SDK just
|
|
16
|
+
for this package; with it, the forwarding above would have been silently
|
|
17
|
+
ignored. Update both packages together.
|
package/dist/server/resolve.js
CHANGED
|
@@ -36,6 +36,14 @@ export const resolveEditableContent = cache(async () => {
|
|
|
36
36
|
domain: domain || undefined,
|
|
37
37
|
apiUrl,
|
|
38
38
|
editSessionToken: editToken || undefined,
|
|
39
|
+
// The visitor, as received — same reason as getStore() in the theme.
|
|
40
|
+
// This runs from the root layout on EVERY page, and the never-throws
|
|
41
|
+
// rule above means a throttled call here does not fail the page: it
|
|
42
|
+
// silently renders without the merchant's edited content instead.
|
|
43
|
+
forwardHeaders: {
|
|
44
|
+
"x-forwarded-for": h.get("x-forwarded-for"),
|
|
45
|
+
"cf-connecting-ip": h.get("cf-connecting-ip"),
|
|
46
|
+
},
|
|
39
47
|
});
|
|
40
48
|
const res = await client.content.getAll();
|
|
41
49
|
const mode = !res.editable ? "off" : modeParam === "preview" ? "preview" : "edit";
|
package/package.json
CHANGED
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kurumera/editable",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Kurumera Editable Components — inline, draft/publish, no-rebuild content editing for code themes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./client": {
|
|
14
|
+
"types": "./dist/client.d.ts",
|
|
15
|
+
"import": "./dist/client.js"
|
|
16
|
+
},
|
|
17
|
+
"./server": {
|
|
18
|
+
"types": "./dist/server.d.ts",
|
|
19
|
+
"import": "./dist/server.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"CHANGELOG.md"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
12
28
|
},
|
|
13
|
-
"files": ["dist"],
|
|
14
|
-
"publishConfig": { "access": "public" },
|
|
15
29
|
"scripts": {
|
|
16
30
|
"build": "tsc -p tsconfig.json",
|
|
17
31
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
@@ -23,7 +37,7 @@
|
|
|
23
37
|
"react-dom": "^19.0.0"
|
|
24
38
|
},
|
|
25
39
|
"dependencies": {
|
|
26
|
-
"@kurumera/storefront": "^0.
|
|
40
|
+
"@kurumera/storefront": "^0.9.0"
|
|
27
41
|
},
|
|
28
42
|
"devDependencies": {
|
|
29
43
|
"@types/react": "^19.0.0",
|