canopycms 0.5.0 → 0.7.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 +185 -46
- package/dist/api/branch-review.d.ts +11 -1
- package/dist/api/branch-review.js +96 -18
- package/dist/api/branch-status.d.ts +26 -2
- package/dist/api/branch-status.js +38 -2
- package/dist/api/branch-withdraw.js +4 -7
- package/dist/api/branch.d.ts +2 -0
- package/dist/api/client.d.ts +3 -3
- package/dist/api/client.js +4 -4
- package/dist/api/comments.d.ts +2 -2
- package/dist/api/comments.js +4 -0
- package/dist/api/content.d.ts +2 -2
- package/dist/api/github-sync.d.ts +4 -0
- package/dist/api/github-sync.js +38 -6
- package/dist/api/pr-comment-sync.d.ts +18 -0
- package/dist/api/pr-comment-sync.js +77 -0
- package/dist/api/request-deadline.d.ts +15 -7
- package/dist/api/request-deadline.js +15 -7
- package/dist/api/schema.d.ts +16 -16
- package/dist/authorization/review-role.d.ts +33 -0
- package/dist/authorization/review-role.js +17 -0
- package/dist/branch-metadata-file.d.ts +3 -0
- package/dist/branch-metadata-file.js +1 -0
- package/dist/cli/cli.js +704 -131
- package/dist/cli/generate-ai-content.js +524 -59
- package/dist/cli/github-app-output.d.ts +34 -0
- package/dist/cli/github-app-output.js +85 -0
- package/dist/cli/init-github-app.d.ts +18 -0
- package/dist/cli/init-github-app.js +66 -58
- package/dist/cli/init.js +15 -2
- package/dist/cli/template-files/cms-stack.ts.template +3 -0
- package/dist/cli/templates.js +5 -1
- package/dist/comment-store.d.ts +5 -0
- package/dist/comment-store.js +24 -0
- package/dist/config/helpers.js +1 -3
- package/dist/config/schemas/collection.d.ts +2 -2
- package/dist/config/schemas/config.d.ts +3 -0
- package/dist/config/schemas/config.js +2 -1
- package/dist/config/schemas/url.d.ts +6 -0
- package/dist/config/schemas/url.js +16 -0
- package/dist/config/types.d.ts +12 -1
- package/dist/content-id-index.d.ts +9 -0
- package/dist/content-id-index.js +31 -0
- package/dist/editor/BranchManager.d.ts +3 -0
- package/dist/editor/BranchManager.js +75 -44
- package/dist/editor/CanopyEditor.js +2 -2
- package/dist/editor/CanopyEditorPage.js +3 -4
- package/dist/editor/Editor.js +47 -8
- package/dist/editor/branch-lock.d.ts +7 -0
- package/dist/editor/branch-lock.js +9 -2
- package/dist/editor/client-reference-resolver.d.ts +5 -3
- package/dist/editor/client-reference-resolver.js +10 -5
- package/dist/editor/components/BranchesLoadFailedNotice.d.ts +13 -0
- package/dist/editor/components/BranchesLoadFailedNotice.js +12 -0
- package/dist/editor/components/EditorHeader.d.ts +10 -4
- package/dist/editor/components/EditorHeader.js +108 -28
- package/dist/editor/components/EntryHeader.d.ts +5 -1
- package/dist/editor/components/EntryHeader.js +3 -1
- package/dist/editor/components/ReasonedMenuItem.d.ts +8 -0
- package/dist/editor/components/ReasonedMenuItem.js +2 -2
- package/dist/editor/components/ReviewDialogs.d.ts +19 -0
- package/dist/editor/components/ReviewDialogs.js +41 -0
- package/dist/editor/copy.d.ts +4 -0
- package/dist/editor/copy.js +4 -0
- package/dist/editor/fields/MarkdownField.js +1 -1
- package/dist/editor/hooks/create-branch-request.d.ts +6 -2
- package/dist/editor/hooks/create-branch-request.js +7 -2
- package/dist/editor/hooks/useBranchManager.d.ts +7 -2
- package/dist/editor/hooks/useBranchManager.js +252 -37
- package/dist/editor-url.d.ts +20 -0
- package/dist/editor-url.js +71 -0
- package/dist/git-manager.js +10 -6
- package/dist/github-service.d.ts +2 -2
- package/dist/github-service.js +4 -2
- package/dist/pr-comments.d.ts +33 -0
- package/dist/pr-comments.js +41 -0
- package/dist/schema/schema-store.d.ts +8 -8
- package/dist/services.d.ts +2 -17
- package/dist/services.js +38 -1
- package/dist/settings-workspace.d.ts +21 -7
- package/dist/settings-workspace.js +91 -16
- package/dist/submission-attribution.d.ts +38 -1
- package/dist/submission-attribution.js +197 -18
- package/dist/task-queue/cms-task-queue.d.ts +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/utils/content-serialize.js +7 -6
- package/dist/utils/markdown-body-splice.d.ts +15 -10
- package/dist/utils/markdown-body-splice.js +71 -28
- package/dist/utils/markdown-export-options.d.ts +13 -0
- package/dist/utils/markdown-export-options.js +13 -0
- package/dist/utils/markdown-restyle.d.ts +58 -0
- package/dist/utils/markdown-restyle.js +482 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/bundle-header.d.ts +13 -9
- package/dist/worker/bundle-header.js +17 -11
- package/dist/worker/git-process.d.ts +2 -2
- package/dist/worker/github-gateway-http.js +5 -4
- package/dist/worker/github-gateway-wire.d.ts +3 -0
- package/dist/worker/github-gateway-wire.js +1 -0
- package/dist/worker/github-gateway.d.ts +1 -1
- package/dist/worker/github-gateway.js +2 -2
- package/dist/worker/github-transfer.js +72 -2
- package/dist/worker/task-runner.js +53 -3
- package/package.json +2 -2
- package/dist/editor/fields/markdown-export-options.d.ts +0 -2
- package/dist/editor/fields/markdown-export-options.js +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -5,9 +5,9 @@ packages release together, at one version.
|
|
|
5
5
|
|
|
6
6
|
## This build
|
|
7
7
|
|
|
8
|
-
Version `0.
|
|
8
|
+
Version `0.7.0`, built from [`628670d`](https://github.com/safeinsights/canopycms/tree/628670db4d927cf37c1a5037467a0fa10f1f06b0).
|
|
9
9
|
|
|
10
|
-
Its entries are [0.
|
|
10
|
+
Its entries are [0.7.0](#070), under **Released**.
|
|
11
11
|
|
|
12
12
|
If you upgraded from a build on another branch, compare the `<!-- changeset: … -->` slugs in your previous build's `CHANGELOG.md` (`npm pack canopycms@<old>` fetches it) with this one's: entries whose slug your old file lacks are new to you.
|
|
13
13
|
|
|
@@ -24,7 +24,7 @@ Each entry has up to three parts:
|
|
|
24
24
|
`node_modules/canopycms/CHANGELOG.md`, assembled for that build: its **This build** section lists
|
|
25
25
|
what is new since the previous int on the same branch, or on a stable release links its entries, and its links point at the commit the build
|
|
26
26
|
came from. The copy in the repository holds released history and the entries from before changesets;
|
|
27
|
-
every entry written since is a file in [`.changeset/`](https://github.com/safeinsights/canopycms/blob/
|
|
27
|
+
every entry written since is a file in [`.changeset/`](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/.changeset/README.md) until a stable release
|
|
28
28
|
moves it here.
|
|
29
29
|
|
|
30
30
|
**Find your starting point.** From a stable pin, start at the first version under **Released**
|
|
@@ -62,6 +62,139 @@ entries under **Released**.
|
|
|
62
62
|
|
|
63
63
|
## Released
|
|
64
64
|
|
|
65
|
+
### 0.7.0
|
|
66
|
+
|
|
67
|
+
<!-- changeset: playwright-1-64-ubuntu-26-04 -->
|
|
68
|
+
|
|
69
|
+
#### The editor opens on the deployment's own default branch — **breaking (client config)**
|
|
70
|
+
|
|
71
|
+
<!-- changeset: editor-starts-on-server-branch -->
|
|
72
|
+
|
|
73
|
+
_First in 0.7.0._
|
|
74
|
+
|
|
75
|
+
**What changed.** `/edit` with no `?branch=` now opens on the branch the server names as its
|
|
76
|
+
default: `defaultActiveBranch`, else the base branch, as that deployment resolves them. Before,
|
|
77
|
+
it opened on the branch the config evaluated in the browser named. In the browser a value read
|
|
78
|
+
from an environment variable falls back to its literal, so a deployment whose base differs from
|
|
79
|
+
that literal opened on the wrong branch. `config.client()` and `CanopyClientConfig` no longer
|
|
80
|
+
carry `defaultBaseBranch` or `defaultActiveBranch`, and `CanopyEditor` without a `branchName`
|
|
81
|
+
starts branchless and adopts the server's default, as `CanopyEditorPage` does. If the branch
|
|
82
|
+
list fails to load, both panes say so and the form offers Retry.
|
|
83
|
+
|
|
84
|
+
**To adopt.** Nothing, unless your code reads `config.client().defaultBaseBranch` or
|
|
85
|
+
`.defaultActiveBranch`. Read the branch from the server config instead (`config.server`, on the
|
|
86
|
+
server), or from the branches API's `defaultBranch` in the browser. To open the editor on a
|
|
87
|
+
particular branch, link to `/edit?branch=<name>`.
|
|
88
|
+
|
|
89
|
+
**Now deletable.** A `NEXT_PUBLIC_` copy of the base-branch variable, or an `/edit` link that adds
|
|
90
|
+
`?branch=` only to work around the editor opening on the wrong branch.
|
|
91
|
+
|
|
92
|
+
#### Pull request bodies show the editor's open comments
|
|
93
|
+
|
|
94
|
+
<!-- changeset: pr-body-comment-state -->
|
|
95
|
+
|
|
96
|
+
_First in 0.7.0._
|
|
97
|
+
|
|
98
|
+
**What changed.** The pull request a submit opens now lists the branch's unresolved editor comment threads: where each one is, the first line of its first comment (80 characters at most) and a link to it in the editor. Once every thread is resolved, it says so. The list is updated whenever a comment is added, replied to or resolved, as well as on submit. Comment excerpts are visible to everyone who can read the pull request, which on a public repository means everyone. Open threads do not block the merge or keep the pull request in draft. A pull request opened before this release shows no list until its branch is next submitted.
|
|
99
|
+
|
|
100
|
+
**To adopt.** Nothing, if your deploy replaces the worker along with the CMS, as `cdk deploy` of the canopycms-cdk stack does with the default `workerCode`. A worker on an earlier release fails each update of the list and marks the branch's sync failed until a later task succeeds, so a pipeline that leaves the worker behind must roll it no later than the CMS: see [Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#rolling-the-worker-from-ci).
|
|
101
|
+
|
|
102
|
+
#### Pull request bodies link back to the editor
|
|
103
|
+
|
|
104
|
+
<!-- changeset: pr-body-editor-links -->
|
|
105
|
+
|
|
106
|
+
_First in 0.7.0._
|
|
107
|
+
|
|
108
|
+
**What changed.** The pull request a submit opens links to the branch in the editor, and each changed entry to that entry. A notice tells reviewers that comments on the pull request do not reach the editor, so the author will not see them. The links use the editor's URL from the submit, accepted only when its host is the one the request was addressed to (`X-Forwarded-Host`, else `Host`), which holds behind `canopycms-cdk`'s CloudFront distribution as it stands.
|
|
109
|
+
|
|
110
|
+
**To adopt.** Nothing, unless a proxy in front of the CMS sets neither header to the editor's public host: then set `editorUrl` in your Canopy config to the editor page's URL, e.g. `editorUrl: 'https://cms.example.org/edit'`. See [the config reference](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#definecanopyconfig-options).
|
|
111
|
+
|
|
112
|
+
#### CloudFront origin read timeout accepted up to 120 s; the editor waits 135 s
|
|
113
|
+
|
|
114
|
+
<!-- changeset: cdk-origin-read-timeout-120 -->
|
|
115
|
+
|
|
116
|
+
_First in 0.7.0._
|
|
117
|
+
|
|
118
|
+
**What changed.** `CanopyCmsDistribution` and `attachTo` accepted an origin read timeout of at most 60 s, but CloudFront's default quota for "Response timeout per origin" is 120 s. Both now accept up to 120 s and refuse more at synth, with an error that names the quota. A raised quota does not lift the limit, because the editor's request deadline is set just above it: the standard deadline is now 135 s and a branch create's is 150 s, so a standard request that never answers shows its timeout message after 135 s rather than 75 s. Long requests, such as submit, admin scans and an upload the CMS proxies, still wait 180 s.
|
|
119
|
+
|
|
120
|
+
**To adopt.** Nothing is required; the default Lambda timeout is still 60 s. To allow slower requests, pass `timeout: Duration.seconds(120)` (at most) to `CanopyCmsService` and `originReadTimeout: cmsService.timeout` to `CanopyCmsDistribution`.
|
|
121
|
+
|
|
122
|
+
#### Approve and Request changes in the editor
|
|
123
|
+
|
|
124
|
+
<!-- changeset: review-approve-request-changes -->
|
|
125
|
+
|
|
126
|
+
_First in 0.7.0._
|
|
127
|
+
|
|
128
|
+
**What changed.** Reviewers and admins can now Approve a submitted branch, and Request changes with an optional note, from the top bar and the branch card. The branch's creator never gets them, and a reviewer on the branch's access list finds them only in the branch card's menu. Approve is a CanopyCMS status and does not approve the pull request on GitHub, which stays open for someone with access to merge. Request changes also works on an approved branch. It converts the pull request to a draft, and its note is saved as a comment on the branch.
|
|
129
|
+
|
|
130
|
+
#### Markdown typed in "Edit source" saves in Prettier's markers
|
|
131
|
+
|
|
132
|
+
<!-- changeset: source-mode-markdown-export-style -->
|
|
133
|
+
|
|
134
|
+
_First in 0.7.0._
|
|
135
|
+
|
|
136
|
+
**What changed.** A markdown body typed in a markdown field's "Edit source" mode used to be written as typed, so `*italic*` and `*` bullets failed a required `prettier --check`. A save now restyles every new or edited block in place to Prettier's style: `-` bullets, `_` emphasis, `**` strong, `---` rules, `#` headings, backtick fences, padded tables, and one blank line between blocks. This applies whichever editor mode produced the block, and to a new entry's body. Only markers and whitespace change, plus an escaped `_` between two letters, which Prettier also unescapes. Text, links, entities and other escapes stay as typed. Untouched blocks keep their bytes, and a block is restyled only if it still means exactly what was typed. Cases Prettier still flags are listed in [#1116](https://github.com/safeinsights/canopycms/issues/1116).
|
|
137
|
+
|
|
138
|
+
#### Fix the App links `init-github-app create` prints for an organisation
|
|
139
|
+
|
|
140
|
+
<!-- changeset: init-github-app-org-links -->
|
|
141
|
+
|
|
142
|
+
_First in 0.7.0._
|
|
143
|
+
|
|
144
|
+
**What changed.** For an organisation-owned repository, `canopycms init-github-app create` printed App settings and install links under `github.com/settings/apps/…`, which 404 for an organisation's App. It now prints the `github.com/organizations/<owner>/settings/apps/…` form; user-owned repositories are unchanged. The command's output is also laid out for scanning, with bold headings, a permissions list, green ticks for progress and red crosses for failures, and is plain text on a stream that is piped (unless `FORCE_COLOR` turns colour on) or when `NO_COLOR` is set.
|
|
145
|
+
|
|
146
|
+
#### Faster first request to a new editor deployment
|
|
147
|
+
|
|
148
|
+
<!-- changeset: settings-workspace-first-clone -->
|
|
149
|
+
|
|
150
|
+
_First in 0.7.0._
|
|
151
|
+
|
|
152
|
+
**What changed.** A new deployment's first request builds the settings workspace without
|
|
153
|
+
writing the base branch's files into it, so it no longer spends an EFS write and a delete on
|
|
154
|
+
every file of the site, and cold starts arriving together share that one build. If the process building it dies, the others
|
|
155
|
+
build their own after waiting at most 15 seconds. The `provision dir=settings` log line gives the
|
|
156
|
+
time each step took.
|
|
157
|
+
|
|
158
|
+
#### Live preview shows a list reference's picks on load
|
|
159
|
+
|
|
160
|
+
<!-- changeset: preview-list-reference-targets -->
|
|
161
|
+
|
|
162
|
+
_First in 0.7.0._
|
|
163
|
+
|
|
164
|
+
**What changed.** The editor loads an entry with its references resolved, so a `list: true`
|
|
165
|
+
reference arrives as its targets. Live preview used to hand the view `null` for each of them until
|
|
166
|
+
the list was edited; it now passes each loaded target through, as it already did for a single
|
|
167
|
+
reference.
|
|
168
|
+
|
|
169
|
+
#### The worker keeps syncing past one corrupt branch on git 2.56 and later
|
|
170
|
+
|
|
171
|
+
<!-- changeset: worker-fetch-past-a-corrupt-branch -->
|
|
172
|
+
|
|
173
|
+
_First in 0.7.0._
|
|
174
|
+
|
|
175
|
+
**What changed.** From git 2.56, `git bundle unbundle` fails when any branch in `remote.git` has a
|
|
176
|
+
corrupt object in its history. Because the worker used it for every GitHub fetch, one torn
|
|
177
|
+
object on the shared filesystem would have failed every sync cycle until an operator repaired the
|
|
178
|
+
repository. The worker now checks that each prerequisite of the bundle is a commit and indexes
|
|
179
|
+
the pack itself, so the sync skips only the damaged branch, as it did on git 2.55. Three kinds of
|
|
180
|
+
damage still stop every fetch, as they did on 2.55: a corrupt object in `remote.git` that the
|
|
181
|
+
incoming pack also carries, a prerequisite whose object header is torn, and a corrupt commit in
|
|
182
|
+
a branch's first-parent history, which the fetch walks to tell GitHub what `remote.git` already
|
|
183
|
+
has before the first fetch has written its tracking refs
|
|
184
|
+
([#1104](https://github.com/safeinsights/canopycms/issues/1104)).
|
|
185
|
+
|
|
186
|
+
### 0.6.0
|
|
187
|
+
|
|
188
|
+
#### Clerk organizations-as-groups is a deployment setting, and survives a Clerk instance without Organizations — **behaviour change**
|
|
189
|
+
|
|
190
|
+
<!-- changeset: clerk-orgs-as-groups -->
|
|
191
|
+
|
|
192
|
+
_First in 0.6.0._
|
|
193
|
+
|
|
194
|
+
**What changed.** `CanopyCmsService` takes `clerkOrganizationsAsGroups` (default `true`, unchanged), which the worker honours; in a deployment it, not the plugin's `useOrganizationsAsGroups`, decides the groups. When Clerk refuses the organization list with a 403 (Organizations disabled), the refresh now writes users with no groups and logs a warning, instead of failing whole; any other failure still keeps the last snapshot. Memberships are fetched instance-wide rather than per user. The scaffolds write `false` explicitly: `useOrganizationsAsGroups` in `canopycms init`'s `canopy.ts`, and `clerkOrganizationsAsGroups` in `canopycms init-deploy aws`'s CDK stack.
|
|
195
|
+
|
|
196
|
+
**To adopt.** On a Clerk instance without Organizations, set `clerkOrganizationsAsGroups: false` on `CanopyCmsService` and `useOrganizationsAsGroups: false` in `createClerkAuthPlugin`. See [Deploying to AWS](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md).
|
|
197
|
+
|
|
65
198
|
### 0.5.0
|
|
66
199
|
|
|
67
200
|
#### Reorderable list references, and `maxItems` on list fields — **behaviour change: a build fails on a list over its cap**
|
|
@@ -72,7 +205,7 @@ _First in 0.5.0._
|
|
|
72
205
|
|
|
73
206
|
**What changed.** A `type: 'reference', list: true` field now edits as rows in stored order, like an `object` list: drag a row or use its "…" menu to move or remove it, open a row to swap its entry in place, and pick from Add under the rows to append. Neither control offers an entry the list already holds. Any `list: true` field, and any `block` field, takes `maxItems`. The editor stops adding at the cap and says why, a save over it is refused, and a production build fails on an entry over it, naming the entry, field, count and cap. Adding `maxItems` to a list that already holds more therefore fails the build until an editor removes the extra items. `maxItems` on a field that holds no items is refused when the entry schema registry is created.
|
|
74
207
|
|
|
75
|
-
**To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/
|
|
208
|
+
**To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#field-types).
|
|
76
209
|
|
|
77
210
|
#### SEO field location moves into config; reference pickers mark hidden entries and take a sort order — **breaking: `createNextCanopyContext({ seo })` and `AIContentConfig.seo` are removed**
|
|
78
211
|
|
|
@@ -82,7 +215,7 @@ _First in 0.5.0._
|
|
|
82
215
|
|
|
83
216
|
**What changed.** `defineCanopyConfig` takes `seo: { group?, fields? }`, the one place every surface reads an entry's `noindex` flag: the sitemap and `entryToMetadata` that `createNextCanopyContext` returns, AI content and the editor's reference picker. A per-call `seo`/`group`/`fields` still overrides it. The free `generateContentSitemap` takes `seo` as an argument and refuses to run without it when the config sets one; `createNextCanopyContext` and the AI content config refuse a leftover `seo`. A reference picker now badges an entry hidden from search as "Hidden from search", and picking one adds a note naming the setting on that entry's form, since a page listing only indexed entries won't show it. A reference field takes `optionSort`: `'label'` (the default), `'collection'`, or `{ field, direction }`. Point `field` at an ISO date, since strings compare as text.
|
|
84
217
|
|
|
85
|
-
**To adopt.** Move `seo` from `createNextCanopyContext({ seo })` and from `defineAIContentConfig({ seo })` into `defineCanopyConfig({ seo })`. See [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/
|
|
218
|
+
**To adopt.** Move `seo` from `createNextCanopyContext({ seo })` and from `defineAIContentConfig({ seo })` into `defineCanopyConfig({ seo })`. See [Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#sitemap-and-seo-metadata) and [How References Work in the Editor](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#how-references-work-in-the-editor).
|
|
86
219
|
|
|
87
220
|
**Now deletable.** A shared `seo` constant passed separately to the Next context and the AI content config.
|
|
88
221
|
|
|
@@ -110,7 +243,7 @@ resolved without it.
|
|
|
110
243
|
**To adopt.** Where a reference renders its target's prose, set `includeBody: true` on that
|
|
111
244
|
reference field. Code that reads the body from a link-only reference's resolved type now sees
|
|
112
245
|
`string | undefined`; either set `includeBody: true` or handle the missing value. See
|
|
113
|
-
[Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/
|
|
246
|
+
[Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#resolving-references-in-a-listing).
|
|
114
247
|
|
|
115
248
|
### 0.3.3
|
|
116
249
|
|
|
@@ -182,7 +315,7 @@ button: Save all is the button, and its caret holds Submit or Withdraw. A branch
|
|
|
182
315
|
action draws no caret. The confirm dialog returns focus to the review action, and focus follows
|
|
183
316
|
that action when a submit or withdraw moves it between the caret and a button of its own.
|
|
184
317
|
|
|
185
|
-
#### The branch bar states a locked branch's status, replacing the lock banner — **behaviour change**
|
|
318
|
+
#### The branch bar states a locked branch's status, replacing the lock banner — **breaking (operatingStrategy().supportsStatusBadge removed) / behaviour change**
|
|
186
319
|
|
|
187
320
|
<!-- changeset: branch-bar-status -->
|
|
188
321
|
|
|
@@ -200,7 +333,13 @@ protected base branch; Withdraw from review on a branch in review; Refresh branc
|
|
|
200
333
|
failed to load; and Switch branch… otherwise. Below the `md` breakpoint a locked branch has no
|
|
201
334
|
Save all: its way forward leads, with Submit or Withdraw in its caret unless Withdraw is that way.
|
|
202
335
|
Someone who may not withdraw gets Switch branch…, with the blocked Withdraw and its reason in the
|
|
203
|
-
caret.
|
|
336
|
+
caret. The status badge's feature flag goes with the pill's badge: `supportsStatusBadge()` is
|
|
337
|
+
removed from `ClientSafeStrategy`, so the strategy that `operatingStrategy(mode)` returns from
|
|
338
|
+
`canopycms/server` no longer has it.
|
|
339
|
+
|
|
340
|
+
**To adopt.** Where you call `operatingStrategy(mode).supportsStatusBadge()`, drop the call. It
|
|
341
|
+
is a type error, or a `TypeError` at run time without type checking. The editor shows the status
|
|
342
|
+
itself now.
|
|
204
343
|
|
|
205
344
|
#### The content panel lists unsaved entries under a Changed filter, replacing the pill's list — **behaviour change**
|
|
206
345
|
|
|
@@ -521,7 +660,7 @@ URL.
|
|
|
521
660
|
2. For a branch preview: wrap views with `withCanopyPreview` in a `'use client'` module, add
|
|
522
661
|
`app/preview/[[...path]]/page.server.tsx`, set `editor.previewPrefix: '/preview'`, and serve that
|
|
523
662
|
route with `frame-ancestors 'self'`, not `X-Frame-Options: DENY` (see
|
|
524
|
-
[Live Preview](https://github.com/safeinsights/canopycms/blob/
|
|
663
|
+
[Live Preview](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#live-preview)).
|
|
525
664
|
3. A test reading view content from the route's server HTML must load the page in a browser.
|
|
526
665
|
Server output rendered during a preview request carries the signed-in asset prefix; keep it out
|
|
527
666
|
of cross-request caches (`unstable_cache`, module memos).
|
|
@@ -536,7 +675,7 @@ kept site styles ahead of Mantine's in the preview.
|
|
|
536
675
|
server components. A string path marks the form's spelling (`'a.0.b'` marks `a[0].b`), and an empty
|
|
537
676
|
path marks nothing. The editor counts and logs marks naming no field. `createEntrySchemaRegistry`
|
|
538
677
|
refuses a field name that is empty, all digits or contains `.`, `[` or `]`. See
|
|
539
|
-
[Live Preview](https://github.com/safeinsights/canopycms/blob/
|
|
678
|
+
[Live Preview](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#live-preview).
|
|
540
679
|
|
|
541
680
|
**To adopt.** Fix each path that stops compiling; the error lists valid ones. Rewrite computed paths
|
|
542
681
|
as literal segments, or type that component's prop as plain `FieldProps`. Pass `fieldProps` as
|
|
@@ -618,7 +757,7 @@ or a failed render) renders as its plain text, with no URL; any other form of th
|
|
|
618
757
|
fields are nested or renamed, pass the AI config's `seo` the same object you pass
|
|
619
758
|
`createNextCanopyContext({ seo })`, so the sitemap and AI content read the flag from the same
|
|
620
759
|
place. A field that links to a hidden section by plain URL needs a field transform; the README
|
|
621
|
-
shows [the recipe](https://github.com/safeinsights/canopycms/blob/
|
|
760
|
+
shows [the recipe](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#ai-content-configuration).
|
|
622
761
|
|
|
623
762
|
**Now deletable.** An `exclude.where` that re-read the `noindex` flag by hand.
|
|
624
763
|
|
|
@@ -640,7 +779,7 @@ A `markdown` field with `renderAs: 'mdx'` is checked as MDX, and `mdxAllow` narr
|
|
|
640
779
|
field or site-wide. New: field options `renderAs`, `mdxAllow`; config key `mdxAllow`; type
|
|
641
780
|
`MdxAllowlist`. (int.110) A component prop allowance can be `'string'` (or
|
|
642
781
|
`{ type: 'string', maxLength }`): a quoted value only, never bare or `{…}`. See
|
|
643
|
-
[MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/
|
|
782
|
+
[MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#mdx-content-cannot-run-code).
|
|
644
783
|
|
|
645
784
|
**To adopt.** Set `renderAs: 'mdx'` on each `markdown` field your site compiles as MDX, and
|
|
646
785
|
`mdxAllow` to what your renderer takes. Set `executable: true` only on a field whose editors you
|
|
@@ -777,7 +916,7 @@ a format check.
|
|
|
777
916
|
|
|
778
917
|
- (int.93) Submit commits gain an `Edited-by: Name (id)` trailer; PR bodies gain a section that
|
|
779
918
|
re-submits replace, keeping human text. Options: `gitEditedByTrailers`, `gitCoAuthoredByTrailers`
|
|
780
|
-
([reference](https://github.com/safeinsights/canopycms/blob/
|
|
919
|
+
([reference](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#definecanopyconfig-options)).
|
|
781
920
|
- (int.110) Submit-commit trailers name every user who saved since the last submit commit, and
|
|
782
921
|
the PR-body section every user who edited the branch, not only the submitter; settings commits
|
|
783
922
|
(permissions, groups) carry the acting user's trailer.
|
|
@@ -801,7 +940,7 @@ saves only push the branch, and no failing PR task lands in System health.
|
|
|
801
940
|
that entry type goes unavailable: the editor says so, and its entries answer 503 with
|
|
802
941
|
`code: 'SCHEMA_UNAVAILABLE'`. Builds, static deploys and `generate-ai-content` still fail. The
|
|
803
942
|
worker holds the base branch for up to 30 minutes while that lasts; see
|
|
804
|
-
[New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/
|
|
943
|
+
[New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
|
|
805
944
|
Public types gain optional `unavailable` on `EntryTypeConfig` and `FlatSchemaItem`, optional
|
|
806
945
|
`ApiResponse.code`, and a required `SchemaResolutionResult.issues`.
|
|
807
946
|
|
|
@@ -839,7 +978,7 @@ hang until the drain heartbeat lets termination continue. Its in-flight task is
|
|
|
839
978
|
new stack needs no steps.
|
|
840
979
|
|
|
841
980
|
**What changed.** (int.109) Detailed in
|
|
842
|
-
[The worker instance](https://github.com/safeinsights/canopycms/blob/
|
|
981
|
+
[The worker instance](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
|
|
843
982
|
bundle is one file whose sha256 user data checks, readable as that one object; a file-system policy
|
|
844
983
|
refusing clients without TLS or IAM, replacing the worker's
|
|
845
984
|
`AmazonElasticFileSystemClientReadWriteAccess`; an encrypted gp3 root volume; a boot-time upgrade to
|
|
@@ -893,10 +1032,10 @@ failure and exits non-zero on `selfStopped`, with a code outside `RestartPrevent
|
|
|
893
1032
|
with its hash, as `worker/dist/index.js` and `index.js.sha256`. The default, `'asset'`, is
|
|
894
1033
|
unchanged.
|
|
895
1034
|
- `CanopyCmsService` alarms when the worker logs no git sync for 30 minutes. See
|
|
896
|
-
[Worker-down alarm](https://github.com/safeinsights/canopycms/blob/
|
|
1035
|
+
[Worker-down alarm](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#worker-down-alarm).
|
|
897
1036
|
|
|
898
1037
|
**To adopt.** Optional. For parameter-only change sets, see
|
|
899
|
-
[Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/
|
|
1038
|
+
[Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
|
|
900
1039
|
`alarmTopic`.
|
|
901
1040
|
|
|
902
1041
|
**Now deletable.** A manual `cdk deploy` after each canopycms bump whose only purpose is moving the
|
|
@@ -907,7 +1046,7 @@ worker, and a hand-built alarm on the worker log group.
|
|
|
907
1046
|
**What changed.** (int.112) The boot's `dnf upgrade` could be OOM-killed on every retry. A 1 GiB
|
|
908
1047
|
swap file now goes on first; an upgrade that still fails starts the worker unpatched and notifies
|
|
909
1048
|
`alarmTopic` if set; a retried step names itself when it gives up. See
|
|
910
|
-
[The worker instance](https://github.com/safeinsights/canopycms/blob/
|
|
1049
|
+
[The worker instance](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#the-worker-instance).
|
|
911
1050
|
|
|
912
1051
|
**To adopt.** Deploy, which replaces the worker instance. The bundle needs none of this, so it is
|
|
913
1052
|
not Template first and the worker contract stays at 1.
|
|
@@ -973,7 +1112,7 @@ and operations may reuse GitHub fetches under 30 seconds old.
|
|
|
973
1112
|
|
|
974
1113
|
**To adopt.** Nothing. Seeding `remote.git` stages a copy of the repository beside the gateway's
|
|
975
1114
|
mirror, so the root volume needs room for two
|
|
976
|
-
([details](https://github.com/safeinsights/canopycms/blob/
|
|
1115
|
+
([details](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#the-worker-instance)).
|
|
977
1116
|
|
|
978
1117
|
#### The worker follows a rebased or deleted GitHub branch
|
|
979
1118
|
|
|
@@ -995,7 +1134,7 @@ changes the template too (the fallback bundle's key and hash), so only the contr
|
|
|
995
1134
|
bundle-only roll is safe.
|
|
996
1135
|
|
|
997
1136
|
**To adopt.** Parameter mode: gate bundle-only rolls on the contract
|
|
998
|
-
([recipe](https://github.com/safeinsights/canopycms/blob/
|
|
1137
|
+
([recipe](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
|
|
999
1138
|
`WorkerContract` output, so `cdk deploy` the template once, which adds it. A hand-installed unit
|
|
1000
1139
|
copies its `Environment=CANOPYCMS_WORKER_CONTRACT=` line from `worker/canopy-worker.service`.
|
|
1001
1140
|
|
|
@@ -1012,8 +1151,8 @@ units from the bundle's contract: 2 gets the split, an older bundle the single u
|
|
|
1012
1151
|
template, then roll the bundle; on an older template it stops with `template too old for this
|
|
1013
1152
|
bundle`. Inspect EFS only through `sudo /opt/canopy-worker/canopy-inspect <command>`, never from a root shell. A hand install
|
|
1014
1153
|
takes `worker/`'s three units and `gateway.env.example`
|
|
1015
|
-
([steps](https://github.com/safeinsights/canopycms/blob/
|
|
1016
|
-
[checklist](https://github.com/safeinsights/canopycms/blob/
|
|
1154
|
+
([steps](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
|
|
1155
|
+
[checklist](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#first-deploy-checklist).
|
|
1017
1156
|
|
|
1018
1157
|
#### `canopycms-cdk`: `CanopyCmsService.attachTo`, and editor response headers — **behaviour change if you frame the CMS**
|
|
1019
1158
|
|
|
@@ -1024,7 +1163,7 @@ response headers policy. `CanopyCmsDistribution` sends the same headers: `frame-
|
|
|
1024
1163
|
`X-Frame-Options: SAMEORIGIN`, `nosniff`, HSTS and `X-Robots-Tag: noindex`. Unless your app sends
|
|
1025
1164
|
its own framing headers, no other origin can frame the editor or any page the CMS domain serves. Every such page is
|
|
1026
1165
|
marked `noindex`. The editor's default preview is same-origin and unaffected. See
|
|
1027
|
-
[Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/
|
|
1166
|
+
[Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
|
|
1028
1167
|
|
|
1029
1168
|
**To adopt.** If you wired the Function URL into your own distribution by hand, delete those
|
|
1030
1169
|
behaviors and call `attachTo`, passing your CMS build's `assetPrefix` as `editorAssetPrefix` and a
|
|
@@ -1200,7 +1339,7 @@ one the exclusions leave out. A throw or any other return is logged and treated
|
|
|
1200
1339
|
**To adopt.** If your site's routes, sitemap or bylines decide that some entries have no page,
|
|
1201
1340
|
apply the same rule here, for example `referenceLink: (target, { body }) =>
|
|
1202
1341
|
!body?.trim() ? false : undefined` in `defineAIContentConfig` from `canopycms/ai`. See
|
|
1203
|
-
[AI Content Configuration](https://github.com/safeinsights/canopycms/blob/
|
|
1342
|
+
[AI Content Configuration](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#ai-content-configuration).
|
|
1204
1343
|
|
|
1205
1344
|
**Now deletable.** A `fieldTransforms` entry that re-renders a reference field only to drop or
|
|
1206
1345
|
change its link.
|
|
@@ -1275,7 +1414,7 @@ _First in int.115._
|
|
|
1275
1414
|
entry the base branch also changed, the "updated on the base branch" notice and the branch's
|
|
1276
1415
|
conflict count now stay until the branch merges, so a reviewer still sees which entries replaced a
|
|
1277
1416
|
base change. They used to clear on the next sync, about five minutes later. README's new [Drafts
|
|
1278
|
-
and Unpublishing](https://github.com/safeinsights/canopycms/blob/
|
|
1417
|
+
and Unpublishing](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#drafts-and-unpublishing) section covers long-lived branches and
|
|
1279
1418
|
unpublishing.
|
|
1280
1419
|
|
|
1281
1420
|
#### The editor calls the content drawer "All content"
|
|
@@ -1587,7 +1726,7 @@ editor carries an unsaved draft of a stamped entry onto its stamped version.
|
|
|
1587
1726
|
The flag is refused off a top-level `datetime`, on `list: true`, and with `required: true`.
|
|
1588
1727
|
|
|
1589
1728
|
**To adopt.** Add `stampOnPublish: true` to the date field your site sorts or labels by, such as
|
|
1590
|
-
`{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/
|
|
1729
|
+
`{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#stamping-a-publication-date).
|
|
1591
1730
|
|
|
1592
1731
|
**Now deletable.** A build step or hook that writes a missing publication date into new entries.
|
|
1593
1732
|
|
|
@@ -1634,7 +1773,7 @@ preview/form divider is now keyboard-resizable within the same 15–85% the spli
|
|
|
1634
1773
|
stored at, and `react-split-pane` is no longer a dependency.
|
|
1635
1774
|
`EditorPanes`, `EditorPanesProps`, the `PaneLayout` type and the `SPLIT_PERCENT_*` and `DEFAULT_*_SPLIT_PERCENT` constants are
|
|
1636
1775
|
no longer exported from `canopycms/client`. See
|
|
1637
|
-
[Your root layout](https://github.com/safeinsights/canopycms/blob/
|
|
1776
|
+
[Your root layout](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#editor-customization).
|
|
1638
1777
|
|
|
1639
1778
|
**To adopt.** Nothing, unless you import `EditorPanes` or those constants: render `CanopyEditor`
|
|
1640
1779
|
instead, which lays out its own panes. Hiding your site chrome on the editor route is now
|
|
@@ -1745,7 +1884,7 @@ never ended. `canopycms-auth-clerk` skips it while the editor is mounted, and ex
|
|
|
1745
1884
|
**To adopt.** Nothing for the editor, if your edit page uses `useClerkAuthConfig()` or
|
|
1746
1885
|
`ClerkSignIn`. If your CMS build renders `<SignIn>`, `UserButton` or `OrganizationSwitcher` on your
|
|
1747
1886
|
own pages, mount the hook as in
|
|
1748
|
-
[Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/
|
|
1887
|
+
[Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
|
|
1749
1888
|
Your own Server Actions in the CMS build still 403 behind OAC.
|
|
1750
1889
|
|
|
1751
1890
|
**Now deletable.** Any local patch of `window.__internal_onBeforeSetActive` (or 6.x's
|
|
@@ -1786,12 +1925,12 @@ fast naming the ARN, the field and the keys present, never a value.
|
|
|
1786
1925
|
**To adopt.** Nothing, unless one of those secrets holds a JSON document: then set the matching
|
|
1787
1926
|
prop. The scaffolded stack fills them from the repository _variables_
|
|
1788
1927
|
`CANOPY_GITHUB_TOKEN_SECRET_JSON_FIELD` and `CLERK_SECRET_KEY_SECRET_JSON_FIELD`
|
|
1789
|
-
([why the prefix](https://github.com/safeinsights/canopycms/blob/
|
|
1928
|
+
([why the prefix](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
|
|
1790
1929
|
adds the props to `infrastructure/bin/app.ts` and `infrastructure/lib/cms-stack.ts` and the two `env`
|
|
1791
1930
|
lines to `.github/workflows/deploy-cms.yml`, or re-runs the generator and diffs. `cdk synth` refuses a `…JsonField` prop without its `…SecretArn`, and an ARN carrying the ECS `:KEY::` suffix
|
|
1792
1931
|
(also in `secretsArns`). Don't use CDK's `secretValueFromJson`: it resolves the plaintext into the deployed
|
|
1793
1932
|
resource's configuration, readable by anyone who can describe it. Only `CLERK_SECRET_KEY` goes through Secrets Manager; `CLERK_JWT_KEY` and the publishable
|
|
1794
|
-
key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/
|
|
1933
|
+
key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#security-model)).
|
|
1795
1934
|
|
|
1796
1935
|
**Now deletable.** A wrapper that fetches the secret, parses it and re-exports one field into the
|
|
1797
1936
|
worker's environment, such as a `jq` step in user data or a wrapper entrypoint around
|
|
@@ -1803,7 +1942,7 @@ worker's environment, such as a `jq` step in user data or a wrapper entrypoint a
|
|
|
1803
1942
|
`githubToken` is not deprecated and stays the documented default; `canopycms` neither depends on
|
|
1804
1943
|
nor imports `@octokit/auth-app`. Register one App per site, not one shared across repositories:
|
|
1805
1944
|
anyone holding an App's key can mint a token for any of its installations
|
|
1806
|
-
([why](https://github.com/safeinsights/canopycms/blob/
|
|
1945
|
+
([why](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
|
|
1807
1946
|
|
|
1808
1947
|
**To adopt with `canopycms-cdk`** (existing stacks need no edit). `CanopyCmsServiceProps` takes
|
|
1809
1948
|
`githubAppId`, `githubAppInstallationId`, `githubAppPrivateKeySecretArn` and
|
|
@@ -1816,7 +1955,7 @@ anyone holding an App's key can mint a token for any of its installations
|
|
|
1816
1955
|
`verify` checks an existing installation's permissions: run it, since an App missing a
|
|
1817
1956
|
permission only shows up later, as `sync-failed`. `create` needs an interactive terminal and
|
|
1818
1957
|
never edits an existing JSON secret (create one and point the JSON-field prop at it)
|
|
1819
|
-
([details](https://github.com/safeinsights/canopycms/blob/
|
|
1958
|
+
([details](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
|
|
1820
1959
|
2. Set the three props and **remove `githubTokenSecretArn`** (with its JSON field). A partial set
|
|
1821
1960
|
of the three is refused at synth, and so is an App alongside a token.
|
|
1822
1961
|
3. In the generated workflow, store them as `CANOPY_GITHUB_APP_ID`,
|
|
@@ -1827,7 +1966,7 @@ anyone holding an App's key can mint a token for any of its installations
|
|
|
1827
1966
|
|
|
1828
1967
|
The private key is ARN-only; passing the key itself is refused at synth. Its ARN joins the worker's
|
|
1829
1968
|
IAM policy automatically, so you need not add it to `secretsArns`. See
|
|
1830
|
-
[Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/
|
|
1969
|
+
[Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#authenticating-as-a-github-app).
|
|
1831
1970
|
|
|
1832
1971
|
```bash
|
|
1833
1972
|
canopycms init-github-app create -- \
|
|
@@ -1875,7 +2014,7 @@ downloads the `.pem` from the App's settings page.
|
|
|
1875
2014
|
|
|
1876
2015
|
**What changed.** The worker re-reads a Secrets Manager secret (the GitHub token or the Clerk secret
|
|
1877
2016
|
key) when the operation using it fails. Timings, costs and the store-before-revoke order are in
|
|
1878
|
-
[Rotating a secret](https://github.com/safeinsights/canopycms/blob/
|
|
2017
|
+
[Rotating a secret](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#rotating-a-secret).
|
|
1879
2018
|
|
|
1880
2019
|
**To adopt.** Nothing for credentials from `*_SECRET_ARN`, which is every scaffolded deployment. A
|
|
1881
2020
|
GitHub App private key is still read only at boot: store the new key, replace the instance, and
|
|
@@ -1929,12 +2068,12 @@ also check the bucket policy for its grant.
|
|
|
1929
2068
|
5. `withCanopy()` adds sharp's libvips to Next's file tracing (not for a static export) and, on
|
|
1930
2069
|
Next 16 and later, sets `turbopack: {}` when your config has neither `turbopack` nor your own
|
|
1931
2070
|
`webpack` and it can read your Next version. A webpack build still fails its image transforms
|
|
1932
|
-
([Dual Build Support](https://github.com/safeinsights/canopycms/blob/
|
|
2071
|
+
([Dual Build Support](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#dual-build-support)).
|
|
1933
2072
|
|
|
1934
2073
|
**Breaking:** a stack setting `platform` on `fromImageAsset` without `architecture` gets an arm64
|
|
1935
2074
|
function while `platform` still decides the image, so `Platform.LINUX_AMD64` builds an image the
|
|
1936
2075
|
function cannot run. A stack setting neither moves to arm64 with a matching image, built under QEMU
|
|
1937
|
-
on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/
|
|
2076
|
+
on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#where-the-image-is-built)).
|
|
1938
2077
|
|
|
1939
2078
|
**To adopt.**
|
|
1940
2079
|
|
|
@@ -1963,7 +2102,7 @@ reason; `platform` on `fromImageAsset`; and, with `withCanopy()`, a hand-written
|
|
|
1963
2102
|
|
|
1964
2103
|
**What changed.** `media.uploadUrl` (s3 adapter; an absolute http(s) URL or a site-relative path)
|
|
1965
2104
|
replaces the `url` that `beginUpload()` returns, leaving the presign's `fields` untouched, so
|
|
1966
|
-
uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/
|
|
2105
|
+
uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#media-configuration) for the
|
|
1967
2106
|
CloudFront behavior it expects.
|
|
1968
2107
|
|
|
1969
2108
|
**To adopt.** Optional. Set it from an environment variable: a site-relative value works only where
|
|
@@ -1988,7 +2127,7 @@ needs `lazyPublicTransforms: true`) let you pass a deterministically named role,
|
|
|
1988
2127
|
bucket's stack computes `arn:aws:iam::<account>:role/<name>` from literals instead of a
|
|
1989
2128
|
`Fn::GetStackOutput` reference only the CDK CLI resolves. The constructs re-attach
|
|
1990
2129
|
`AWSLambdaBasicExecutionRole` (and the VPC policy) that `lambda.Function` drops from a role you
|
|
1991
|
-
pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/
|
|
2130
|
+
pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#cross-account-asset-bucket).
|
|
1992
2131
|
|
|
1993
2132
|
**To adopt.** Optional:
|
|
1994
2133
|
|
|
@@ -2098,7 +2237,7 @@ public JWKS PEM, used only to verify signatures.
|
|
|
2098
2237
|
to variables (Settings → Secrets and variables → Actions → Variables); `bin/app.ts` refuses the
|
|
2099
2238
|
deploy at synth while it is unset. Check that `bin/app.ts` passes `CLERK_SECRET_KEY` as
|
|
2100
2239
|
`clerkSecretKeySecretArn` (read by the worker), never in the Lambda's `environment`, unless you keep
|
|
2101
|
-
`clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/
|
|
2240
|
+
`clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/docs/deploying-to-aws.md#security-model)).
|
|
2102
2241
|
|
|
2103
2242
|
#### `readByUrlPath` answers only where `listEntries` publishes — **breaking (routing)**
|
|
2104
2243
|
|
|
@@ -2197,7 +2336,7 @@ basePath: process.env.NEXT_PUBLIC_BASE_PATH,
|
|
|
2197
2336
|
Then pass `baseUrl` to `assetUrl` only if Next serves `/assets` (local adapter, `next dev`, S3 with
|
|
2198
2337
|
no distribution): `assetUrl(image, { width: 960, baseUrl: BASE_PATH })`. Assets on CloudFront via
|
|
2199
2338
|
`AssetSupport` stay at the distribution root; pass no `baseUrl` (mount table under "Where `/assets`
|
|
2200
|
-
is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/
|
|
2339
|
+
is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#media-configuration)). Two traps:
|
|
2201
2340
|
|
|
2202
2341
|
- Don't pass a deployment `basePath` to `contentStaticParams({ basePath })`; that option filters by
|
|
2203
2342
|
a nested route prefix and emits zero params, building green.
|
|
@@ -2356,7 +2495,7 @@ Under `exactOptionalPropertyTypes: true`, omit keys instead of assigning `undefi
|
|
|
2356
2495
|
`withTrailingSlash` and `isAbsoluteUrl` from `canopycms/server`; `defineSeoFieldGroup()` from
|
|
2357
2496
|
`canopycms`; `generateContentSitemap` and `entryToMetadata` from `canopycms-next`, bound on
|
|
2358
2497
|
`createNextCanopyContext`'s result. See
|
|
2359
|
-
[Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/
|
|
2498
|
+
[Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#sitemap-and-seo-metadata). Every routable entry type is in
|
|
2360
2499
|
the sitemap unless `exclude`d or `noindex`; one `noindex` predicate drives both robots metadata and
|
|
2361
2500
|
sitemap exclusion. `trailingSlash` is never inferred. `lastModified` defaults to `updatedAt`, a
|
|
2362
2501
|
filesystem mtime. An empty SEO field counts as unset. `siteUrl` must be absolute, colliding URLs are
|
|
@@ -2413,7 +2552,7 @@ underscore-prefixed files are skipped.
|
|
|
2413
2552
|
|
|
2414
2553
|
**What changed.** New scaffolds write `defaultBranchAccess: 'deny'` and
|
|
2415
2554
|
`defaultPathAccess: { read: 'allow' }`
|
|
2416
|
-
([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/
|
|
2555
|
+
([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#public-read-on-server-deployments)).
|
|
2417
2556
|
|
|
2418
2557
|
**To adopt.** An older scaffold's `defaultBranchAccess: 'allow'` is wider than recommended;
|
|
2419
2558
|
consider `'deny'`. If you deleted `defaultPathAccess: { read: 'allow' }`, anonymous visitors get no content until you
|
|
@@ -2466,7 +2605,7 @@ re-checked an entry's type (a `switch` on `meta.entryType` can merge them into o
|
|
|
2466
2605
|
**What changed.** `BlockComponentRegistry<Blocks>` (types only, from `canopycms`; `BlockValueOf<Blocks, 'hero'>`
|
|
2467
2606
|
gives one template's value type) requires exactly
|
|
2468
2607
|
one component per block template name when written as an object literal. See
|
|
2469
|
-
[Block Component Registries](https://github.com/safeinsights/canopycms/blob/
|
|
2608
|
+
[Block Component Registries](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#block-component-registries) and
|
|
2470
2609
|
`apps/example1/app/components/PostView.tsx`.
|
|
2471
2610
|
|
|
2472
2611
|
```ts
|
|
@@ -2488,7 +2627,7 @@ templates against the schema.
|
|
|
2488
2627
|
|
|
2489
2628
|
**What changed.** Spreading a `const` field array into several schemas, and nesting
|
|
2490
2629
|
`defineInlineFieldGroup()` inside a block template, are documented
|
|
2491
|
-
([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/
|
|
2630
|
+
([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
|
|
2492
2631
|
identity helper for them.
|
|
2493
2632
|
|
|
2494
2633
|
```ts
|
|
@@ -2507,7 +2646,7 @@ field by composing from the same `const` field object.
|
|
|
2507
2646
|
A block template holding a `reference` field is a shared block; `read()`/`readByUrlPath()` resolve
|
|
2508
2647
|
it, and listings do with
|
|
2509
2648
|
[`resolveReferences`](#listings-resolve-references-and-a-resolved-reference-carries-urlpath-and-optionally-its-body-16--breaking-type-level)
|
|
2510
|
-
(0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/
|
|
2649
|
+
(0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#shared--referenced-blocks).
|
|
2511
2650
|
|
|
2512
2651
|
**Now deletable.** A second `read()` in page code to unwrap a shared block's reference.
|
|
2513
2652
|
|
|
@@ -2529,7 +2668,7 @@ Not retro-documented, apart from these:
|
|
|
2529
2668
|
|
|
2530
2669
|
#### The registry is keyed by entry-type name (0.0.42)
|
|
2531
2670
|
|
|
2532
|
-
**What changed.** `createEntrySchemaRegistry` keys are the entry-type names that `.collection.json` files name in `entry.schema`, and `EntryTypesFromRegistry` derives the typed entry-type map from them. Schema-variable keys (`{ postSchema }`) still work but derive nothing; [README's registry convention](https://github.com/safeinsights/canopycms/blob/
|
|
2671
|
+
**What changed.** `createEntrySchemaRegistry` keys are the entry-type names that `.collection.json` files name in `entry.schema`, and `EntryTypesFromRegistry` derives the typed entry-type map from them. Schema-variable keys (`{ postSchema }`) still work but derive nothing; [README's registry convention](https://github.com/safeinsights/canopycms/blob/628670db4d927cf37c1a5037467a0fa10f1f06b0/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
|
|
2533
2672
|
|
|
2534
2673
|
**To adopt.**
|
|
2535
2674
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type BranchListItemResponse } from './branch.js';
|
|
3
|
+
export interface RequestChangesBody {
|
|
4
|
+
/** Saved as a branch comment; trimmed before its length is checked, and ignored when empty. */
|
|
5
|
+
note?: string;
|
|
6
|
+
}
|
|
3
7
|
export declare const requestChanges: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
4
8
|
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
5
9
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -10,7 +14,13 @@ export declare const requestChanges: import("./route-builder.js").RouteDefinitio
|
|
|
10
14
|
branch: string & {
|
|
11
15
|
readonly __brand: "BranchName";
|
|
12
16
|
};
|
|
13
|
-
}>,
|
|
17
|
+
}>, z.ZodOptional<z.ZodObject<{
|
|
18
|
+
note: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
note?: string | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
note?: string | undefined;
|
|
23
|
+
}>>, BranchListItemResponse>;
|
|
14
24
|
export declare const approveBranch: import("./route-builder.js").RouteDefinition<z.ZodObject<{
|
|
15
25
|
branch: z.ZodType<import("../paths/index.js").BranchName, z.ZodTypeDef, import("../paths/index.js").BranchName>;
|
|
16
26
|
}, "strip", z.ZodTypeAny, {
|