@akinon/theme-contract 2.0.169-rc.0 → 2.0.170-beta.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 +7 -1
- package/README.md +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# @akinon/theme-contract
|
|
2
2
|
|
|
3
|
-
## 2.0.
|
|
3
|
+
## 2.0.170-beta.0
|
|
4
|
+
|
|
5
|
+
## 2.0.169
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- 00e6deac: ZERO-5526: `/theme-editor/health` also reports whether the storefront has the `/pages/[slug]` route that pages made with the theme editor's "Add page" dialog open on. The answer comes from the build's route list (`src/routes/generated-routes.js`, written by `pz-generate-routes`) as `routes: [{ name: 'custom-pages', path: '/pages/[slug]', ok }]`. A build without a route list leaves the field out, and the existing variable checks are unchanged, so editors that do not read the field keep working as before.
|
|
4
10
|
|
|
5
11
|
## 2.0.168
|
|
6
12
|
|
package/README.md
CHANGED
|
@@ -67,6 +67,14 @@ A storefront edited with the theme editor needs these variables. `@akinon/next`
|
|
|
67
67
|
|
|
68
68
|
The report tells the editor apart by the request's `Origin`, with the same rule the preview applies (`createOriginGuard`): the listed origins, plus localhost outside production.
|
|
69
69
|
|
|
70
|
+
The report also lists the storefront routes that editor features need, under `routes`. It reads them from the route list `pz-generate-routes` writes in predev and prebuild. There is one entry so far:
|
|
71
|
+
|
|
72
|
+
| Route check | Path | Without it |
|
|
73
|
+
| --- | --- | --- |
|
|
74
|
+
| `custom-pages` | `/pages/[slug]` | Pages made with the "Add page" dialog answer 404 in the preview and on the live site. The editor does not block. It warns in the "Add page" dialog and names the fix: `npx @akinon/projectzero@latest --codemod=theme-custom-pages`. |
|
|
75
|
+
|
|
76
|
+
A build without a route list leaves `routes` out, and the editor warns about nothing. An editor that predates the field ignores it.
|
|
77
|
+
|
|
70
78
|
## v1 storefronts
|
|
71
79
|
|
|
72
80
|
There is no 1.x release of this package. A storefront on `@akinon/next` 1.x gets the 2.x release that its `@akinon/pz-theme` depends on, and never lists this package itself. See "Using pz-theme on the v1 line" in the `@akinon/pz-theme` readme for the supported versions and the setup.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/theme-contract",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.170-beta.0",
|
|
4
4
|
"description": "Shared wire contract between the theme editor (pz-theme-editor) and the storefront renderer (@akinon/pz-theme): theme types, postMessage envelope, runtime validation and origin helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/index.ts",
|