canopycms 0.6.0 → 0.7.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/CHANGELOG.md +188 -47
- 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 +699 -130
- 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 +10 -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/git-sync.js +5 -0
- package/dist/worker/github-gateway-http.js +3 -2
- 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-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.1`, built from [`fc7c124`](https://github.com/safeinsights/canopycms/tree/fc7c124fae32a1df226f082b618889ad6c3e8345).
|
|
9
9
|
|
|
10
|
-
Its entries are [0.
|
|
10
|
+
Its entries are [0.7.1](#071), 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/fc7c124fae32a1df226f082b618889ad6c3e8345/.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,141 @@ entries under **Released**.
|
|
|
62
62
|
|
|
63
63
|
## Released
|
|
64
64
|
|
|
65
|
+
### 0.7.1
|
|
66
|
+
|
|
67
|
+
<!-- changeset: worker-platform-ci -->
|
|
68
|
+
|
|
69
|
+
#### An alarm for a running worker whose git syncs all fail
|
|
70
|
+
|
|
71
|
+
<!-- changeset: worker-sync-failing-alarm -->
|
|
72
|
+
|
|
73
|
+
_First in 0.7.1._
|
|
74
|
+
|
|
75
|
+
**What changed.** The worker-down alarm counts the line every git-sync cycle logs as it starts, so a running worker whose every sync failed stayed green. The worker now also logs `Git sync complete` when a cycle runs to its end. With `alarmTopic` set, `CanopyCmsService` adds `workerSyncFailingAlarm`, which notifies the topic, and again on recovery, when cycles keep starting and none completes for an hour. A GitHub outage is the usual cause, and the alarm's description says to check GitHub's status first.
|
|
76
|
+
|
|
77
|
+
**To adopt.** Nothing, in the default asset mode. With `workerCode: { source: 'parameter' }`, roll the bundle within the hour of deploying the template: an older bundle never logs `Git sync complete`, so the alarm fires until it rolls.
|
|
78
|
+
|
|
79
|
+
### 0.7.0
|
|
80
|
+
|
|
81
|
+
<!-- changeset: playwright-1-64-ubuntu-26-04 -->
|
|
82
|
+
|
|
83
|
+
#### The editor opens on the deployment's own default branch — **breaking (client config)**
|
|
84
|
+
|
|
85
|
+
<!-- changeset: editor-starts-on-server-branch -->
|
|
86
|
+
|
|
87
|
+
_First in 0.7.0._
|
|
88
|
+
|
|
89
|
+
**What changed.** `/edit` with no `?branch=` now opens on the branch the server names as its
|
|
90
|
+
default: `defaultActiveBranch`, else the base branch, as that deployment resolves them. Before,
|
|
91
|
+
it opened on the branch the config evaluated in the browser named. In the browser a value read
|
|
92
|
+
from an environment variable falls back to its literal, so a deployment whose base differs from
|
|
93
|
+
that literal opened on the wrong branch. `config.client()` and `CanopyClientConfig` no longer
|
|
94
|
+
carry `defaultBaseBranch` or `defaultActiveBranch`, and `CanopyEditor` without a `branchName`
|
|
95
|
+
starts branchless and adopts the server's default, as `CanopyEditorPage` does. If the branch
|
|
96
|
+
list fails to load, both panes say so and the form offers Retry.
|
|
97
|
+
|
|
98
|
+
**To adopt.** Nothing, unless your code reads `config.client().defaultBaseBranch` or
|
|
99
|
+
`.defaultActiveBranch`. Read the branch from the server config instead (`config.server`, on the
|
|
100
|
+
server), or from the branches API's `defaultBranch` in the browser. To open the editor on a
|
|
101
|
+
particular branch, link to `/edit?branch=<name>`.
|
|
102
|
+
|
|
103
|
+
**Now deletable.** A `NEXT_PUBLIC_` copy of the base-branch variable, or an `/edit` link that adds
|
|
104
|
+
`?branch=` only to work around the editor opening on the wrong branch.
|
|
105
|
+
|
|
106
|
+
#### Pull request bodies show the editor's open comments
|
|
107
|
+
|
|
108
|
+
<!-- changeset: pr-body-comment-state -->
|
|
109
|
+
|
|
110
|
+
_First in 0.7.0._
|
|
111
|
+
|
|
112
|
+
**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.
|
|
113
|
+
|
|
114
|
+
**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/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rolling-the-worker-from-ci).
|
|
115
|
+
|
|
116
|
+
#### Pull request bodies link back to the editor
|
|
117
|
+
|
|
118
|
+
<!-- changeset: pr-body-editor-links -->
|
|
119
|
+
|
|
120
|
+
_First in 0.7.0._
|
|
121
|
+
|
|
122
|
+
**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.
|
|
123
|
+
|
|
124
|
+
**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/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#definecanopyconfig-options).
|
|
125
|
+
|
|
126
|
+
#### CloudFront origin read timeout accepted up to 120 s; the editor waits 135 s
|
|
127
|
+
|
|
128
|
+
<!-- changeset: cdk-origin-read-timeout-120 -->
|
|
129
|
+
|
|
130
|
+
_First in 0.7.0._
|
|
131
|
+
|
|
132
|
+
**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.
|
|
133
|
+
|
|
134
|
+
**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`.
|
|
135
|
+
|
|
136
|
+
#### Approve and Request changes in the editor
|
|
137
|
+
|
|
138
|
+
<!-- changeset: review-approve-request-changes -->
|
|
139
|
+
|
|
140
|
+
_First in 0.7.0._
|
|
141
|
+
|
|
142
|
+
**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.
|
|
143
|
+
|
|
144
|
+
#### Markdown typed in "Edit source" saves in Prettier's markers
|
|
145
|
+
|
|
146
|
+
<!-- changeset: source-mode-markdown-export-style -->
|
|
147
|
+
|
|
148
|
+
_First in 0.7.0._
|
|
149
|
+
|
|
150
|
+
**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).
|
|
151
|
+
|
|
152
|
+
#### Fix the App links `init-github-app create` prints for an organisation
|
|
153
|
+
|
|
154
|
+
<!-- changeset: init-github-app-org-links -->
|
|
155
|
+
|
|
156
|
+
_First in 0.7.0._
|
|
157
|
+
|
|
158
|
+
**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.
|
|
159
|
+
|
|
160
|
+
#### Faster first request to a new editor deployment
|
|
161
|
+
|
|
162
|
+
<!-- changeset: settings-workspace-first-clone -->
|
|
163
|
+
|
|
164
|
+
_First in 0.7.0._
|
|
165
|
+
|
|
166
|
+
**What changed.** A new deployment's first request builds the settings workspace without
|
|
167
|
+
writing the base branch's files into it, so it no longer spends an EFS write and a delete on
|
|
168
|
+
every file of the site, and cold starts arriving together share that one build. If the process building it dies, the others
|
|
169
|
+
build their own after waiting at most 15 seconds. The `provision dir=settings` log line gives the
|
|
170
|
+
time each step took.
|
|
171
|
+
|
|
172
|
+
#### Live preview shows a list reference's picks on load
|
|
173
|
+
|
|
174
|
+
<!-- changeset: preview-list-reference-targets -->
|
|
175
|
+
|
|
176
|
+
_First in 0.7.0._
|
|
177
|
+
|
|
178
|
+
**What changed.** The editor loads an entry with its references resolved, so a `list: true`
|
|
179
|
+
reference arrives as its targets. Live preview used to hand the view `null` for each of them until
|
|
180
|
+
the list was edited; it now passes each loaded target through, as it already did for a single
|
|
181
|
+
reference.
|
|
182
|
+
|
|
183
|
+
#### The worker keeps syncing past one corrupt branch on git 2.56 and later
|
|
184
|
+
|
|
185
|
+
<!-- changeset: worker-fetch-past-a-corrupt-branch -->
|
|
186
|
+
|
|
187
|
+
_First in 0.7.0._
|
|
188
|
+
|
|
189
|
+
**What changed.** From git 2.56, `git bundle unbundle` fails when any branch in `remote.git` has a
|
|
190
|
+
corrupt object in its history. Because the worker used it for every GitHub fetch, one torn
|
|
191
|
+
object on the shared filesystem would have failed every sync cycle until an operator repaired the
|
|
192
|
+
repository. The worker now checks that each prerequisite of the bundle is a commit and indexes
|
|
193
|
+
the pack itself, so the sync skips only the damaged branch, as it did on git 2.55. Three kinds of
|
|
194
|
+
damage still stop every fetch, as they did on 2.55: a corrupt object in `remote.git` that the
|
|
195
|
+
incoming pack also carries, a prerequisite whose object header is torn, and a corrupt commit in
|
|
196
|
+
a branch's first-parent history, which the fetch walks to tell GitHub what `remote.git` already
|
|
197
|
+
has before the first fetch has written its tracking refs
|
|
198
|
+
([#1104](https://github.com/safeinsights/canopycms/issues/1104)).
|
|
199
|
+
|
|
65
200
|
### 0.6.0
|
|
66
201
|
|
|
67
202
|
#### Clerk organizations-as-groups is a deployment setting, and survives a Clerk instance without Organizations — **behaviour change**
|
|
@@ -72,7 +207,7 @@ _First in 0.6.0._
|
|
|
72
207
|
|
|
73
208
|
**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.
|
|
74
209
|
|
|
75
|
-
**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/
|
|
210
|
+
**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/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md).
|
|
76
211
|
|
|
77
212
|
### 0.5.0
|
|
78
213
|
|
|
@@ -84,7 +219,7 @@ _First in 0.5.0._
|
|
|
84
219
|
|
|
85
220
|
**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.
|
|
86
221
|
|
|
87
|
-
**To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/
|
|
222
|
+
**To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#field-types).
|
|
88
223
|
|
|
89
224
|
#### SEO field location moves into config; reference pickers mark hidden entries and take a sort order — **breaking: `createNextCanopyContext({ seo })` and `AIContentConfig.seo` are removed**
|
|
90
225
|
|
|
@@ -94,7 +229,7 @@ _First in 0.5.0._
|
|
|
94
229
|
|
|
95
230
|
**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.
|
|
96
231
|
|
|
97
|
-
**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/
|
|
232
|
+
**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/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#sitemap-and-seo-metadata) and [How References Work in the Editor](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#how-references-work-in-the-editor).
|
|
98
233
|
|
|
99
234
|
**Now deletable.** A shared `seo` constant passed separately to the Next context and the AI content config.
|
|
100
235
|
|
|
@@ -122,7 +257,7 @@ resolved without it.
|
|
|
122
257
|
**To adopt.** Where a reference renders its target's prose, set `includeBody: true` on that
|
|
123
258
|
reference field. Code that reads the body from a link-only reference's resolved type now sees
|
|
124
259
|
`string | undefined`; either set `includeBody: true` or handle the missing value. See
|
|
125
|
-
[Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/
|
|
260
|
+
[Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#resolving-references-in-a-listing).
|
|
126
261
|
|
|
127
262
|
### 0.3.3
|
|
128
263
|
|
|
@@ -194,7 +329,7 @@ button: Save all is the button, and its caret holds Submit or Withdraw. A branch
|
|
|
194
329
|
action draws no caret. The confirm dialog returns focus to the review action, and focus follows
|
|
195
330
|
that action when a submit or withdraw moves it between the caret and a button of its own.
|
|
196
331
|
|
|
197
|
-
#### The branch bar states a locked branch's status, replacing the lock banner — **behaviour change**
|
|
332
|
+
#### The branch bar states a locked branch's status, replacing the lock banner — **breaking (operatingStrategy().supportsStatusBadge removed) / behaviour change**
|
|
198
333
|
|
|
199
334
|
<!-- changeset: branch-bar-status -->
|
|
200
335
|
|
|
@@ -212,7 +347,13 @@ protected base branch; Withdraw from review on a branch in review; Refresh branc
|
|
|
212
347
|
failed to load; and Switch branch… otherwise. Below the `md` breakpoint a locked branch has no
|
|
213
348
|
Save all: its way forward leads, with Submit or Withdraw in its caret unless Withdraw is that way.
|
|
214
349
|
Someone who may not withdraw gets Switch branch…, with the blocked Withdraw and its reason in the
|
|
215
|
-
caret.
|
|
350
|
+
caret. The status badge's feature flag goes with the pill's badge: `supportsStatusBadge()` is
|
|
351
|
+
removed from `ClientSafeStrategy`, so the strategy that `operatingStrategy(mode)` returns from
|
|
352
|
+
`canopycms/server` no longer has it.
|
|
353
|
+
|
|
354
|
+
**To adopt.** Where you call `operatingStrategy(mode).supportsStatusBadge()`, drop the call. It
|
|
355
|
+
is a type error, or a `TypeError` at run time without type checking. The editor shows the status
|
|
356
|
+
itself now.
|
|
216
357
|
|
|
217
358
|
#### The content panel lists unsaved entries under a Changed filter, replacing the pill's list — **behaviour change**
|
|
218
359
|
|
|
@@ -533,7 +674,7 @@ URL.
|
|
|
533
674
|
2. For a branch preview: wrap views with `withCanopyPreview` in a `'use client'` module, add
|
|
534
675
|
`app/preview/[[...path]]/page.server.tsx`, set `editor.previewPrefix: '/preview'`, and serve that
|
|
535
676
|
route with `frame-ancestors 'self'`, not `X-Frame-Options: DENY` (see
|
|
536
|
-
[Live Preview](https://github.com/safeinsights/canopycms/blob/
|
|
677
|
+
[Live Preview](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#live-preview)).
|
|
537
678
|
3. A test reading view content from the route's server HTML must load the page in a browser.
|
|
538
679
|
Server output rendered during a preview request carries the signed-in asset prefix; keep it out
|
|
539
680
|
of cross-request caches (`unstable_cache`, module memos).
|
|
@@ -548,7 +689,7 @@ kept site styles ahead of Mantine's in the preview.
|
|
|
548
689
|
server components. A string path marks the form's spelling (`'a.0.b'` marks `a[0].b`), and an empty
|
|
549
690
|
path marks nothing. The editor counts and logs marks naming no field. `createEntrySchemaRegistry`
|
|
550
691
|
refuses a field name that is empty, all digits or contains `.`, `[` or `]`. See
|
|
551
|
-
[Live Preview](https://github.com/safeinsights/canopycms/blob/
|
|
692
|
+
[Live Preview](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#live-preview).
|
|
552
693
|
|
|
553
694
|
**To adopt.** Fix each path that stops compiling; the error lists valid ones. Rewrite computed paths
|
|
554
695
|
as literal segments, or type that component's prop as plain `FieldProps`. Pass `fieldProps` as
|
|
@@ -630,7 +771,7 @@ or a failed render) renders as its plain text, with no URL; any other form of th
|
|
|
630
771
|
fields are nested or renamed, pass the AI config's `seo` the same object you pass
|
|
631
772
|
`createNextCanopyContext({ seo })`, so the sitemap and AI content read the flag from the same
|
|
632
773
|
place. A field that links to a hidden section by plain URL needs a field transform; the README
|
|
633
|
-
shows [the recipe](https://github.com/safeinsights/canopycms/blob/
|
|
774
|
+
shows [the recipe](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#ai-content-configuration).
|
|
634
775
|
|
|
635
776
|
**Now deletable.** An `exclude.where` that re-read the `noindex` flag by hand.
|
|
636
777
|
|
|
@@ -652,7 +793,7 @@ A `markdown` field with `renderAs: 'mdx'` is checked as MDX, and `mdxAllow` narr
|
|
|
652
793
|
field or site-wide. New: field options `renderAs`, `mdxAllow`; config key `mdxAllow`; type
|
|
653
794
|
`MdxAllowlist`. (int.110) A component prop allowance can be `'string'` (or
|
|
654
795
|
`{ type: 'string', maxLength }`): a quoted value only, never bare or `{…}`. See
|
|
655
|
-
[MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/
|
|
796
|
+
[MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#mdx-content-cannot-run-code).
|
|
656
797
|
|
|
657
798
|
**To adopt.** Set `renderAs: 'mdx'` on each `markdown` field your site compiles as MDX, and
|
|
658
799
|
`mdxAllow` to what your renderer takes. Set `executable: true` only on a field whose editors you
|
|
@@ -789,7 +930,7 @@ a format check.
|
|
|
789
930
|
|
|
790
931
|
- (int.93) Submit commits gain an `Edited-by: Name (id)` trailer; PR bodies gain a section that
|
|
791
932
|
re-submits replace, keeping human text. Options: `gitEditedByTrailers`, `gitCoAuthoredByTrailers`
|
|
792
|
-
([reference](https://github.com/safeinsights/canopycms/blob/
|
|
933
|
+
([reference](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#definecanopyconfig-options)).
|
|
793
934
|
- (int.110) Submit-commit trailers name every user who saved since the last submit commit, and
|
|
794
935
|
the PR-body section every user who edited the branch, not only the submitter; settings commits
|
|
795
936
|
(permissions, groups) carry the acting user's trailer.
|
|
@@ -813,7 +954,7 @@ saves only push the branch, and no failing PR task lands in System health.
|
|
|
813
954
|
that entry type goes unavailable: the editor says so, and its entries answer 503 with
|
|
814
955
|
`code: 'SCHEMA_UNAVAILABLE'`. Builds, static deploys and `generate-ai-content` still fail. The
|
|
815
956
|
worker holds the base branch for up to 30 minutes while that lasts; see
|
|
816
|
-
[New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/
|
|
957
|
+
[New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
|
|
817
958
|
Public types gain optional `unavailable` on `EntryTypeConfig` and `FlatSchemaItem`, optional
|
|
818
959
|
`ApiResponse.code`, and a required `SchemaResolutionResult.issues`.
|
|
819
960
|
|
|
@@ -851,7 +992,7 @@ hang until the drain heartbeat lets termination continue. Its in-flight task is
|
|
|
851
992
|
new stack needs no steps.
|
|
852
993
|
|
|
853
994
|
**What changed.** (int.109) Detailed in
|
|
854
|
-
[The worker instance](https://github.com/safeinsights/canopycms/blob/
|
|
995
|
+
[The worker instance](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
|
|
855
996
|
bundle is one file whose sha256 user data checks, readable as that one object; a file-system policy
|
|
856
997
|
refusing clients without TLS or IAM, replacing the worker's
|
|
857
998
|
`AmazonElasticFileSystemClientReadWriteAccess`; an encrypted gp3 root volume; a boot-time upgrade to
|
|
@@ -905,10 +1046,10 @@ failure and exits non-zero on `selfStopped`, with a code outside `RestartPrevent
|
|
|
905
1046
|
with its hash, as `worker/dist/index.js` and `index.js.sha256`. The default, `'asset'`, is
|
|
906
1047
|
unchanged.
|
|
907
1048
|
- `CanopyCmsService` alarms when the worker logs no git sync for 30 minutes. See
|
|
908
|
-
[Worker-down alarm](https://github.com/safeinsights/canopycms/blob/
|
|
1049
|
+
[Worker-down alarm](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#worker-down-alarm).
|
|
909
1050
|
|
|
910
1051
|
**To adopt.** Optional. For parameter-only change sets, see
|
|
911
|
-
[Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/
|
|
1052
|
+
[Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
|
|
912
1053
|
`alarmTopic`.
|
|
913
1054
|
|
|
914
1055
|
**Now deletable.** A manual `cdk deploy` after each canopycms bump whose only purpose is moving the
|
|
@@ -919,7 +1060,7 @@ worker, and a hand-built alarm on the worker log group.
|
|
|
919
1060
|
**What changed.** (int.112) The boot's `dnf upgrade` could be OOM-killed on every retry. A 1 GiB
|
|
920
1061
|
swap file now goes on first; an upgrade that still fails starts the worker unpatched and notifies
|
|
921
1062
|
`alarmTopic` if set; a retried step names itself when it gives up. See
|
|
922
|
-
[The worker instance](https://github.com/safeinsights/canopycms/blob/
|
|
1063
|
+
[The worker instance](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#the-worker-instance).
|
|
923
1064
|
|
|
924
1065
|
**To adopt.** Deploy, which replaces the worker instance. The bundle needs none of this, so it is
|
|
925
1066
|
not Template first and the worker contract stays at 1.
|
|
@@ -985,7 +1126,7 @@ and operations may reuse GitHub fetches under 30 seconds old.
|
|
|
985
1126
|
|
|
986
1127
|
**To adopt.** Nothing. Seeding `remote.git` stages a copy of the repository beside the gateway's
|
|
987
1128
|
mirror, so the root volume needs room for two
|
|
988
|
-
([details](https://github.com/safeinsights/canopycms/blob/
|
|
1129
|
+
([details](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#the-worker-instance)).
|
|
989
1130
|
|
|
990
1131
|
#### The worker follows a rebased or deleted GitHub branch
|
|
991
1132
|
|
|
@@ -1007,7 +1148,7 @@ changes the template too (the fallback bundle's key and hash), so only the contr
|
|
|
1007
1148
|
bundle-only roll is safe.
|
|
1008
1149
|
|
|
1009
1150
|
**To adopt.** Parameter mode: gate bundle-only rolls on the contract
|
|
1010
|
-
([recipe](https://github.com/safeinsights/canopycms/blob/
|
|
1151
|
+
([recipe](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
|
|
1011
1152
|
`WorkerContract` output, so `cdk deploy` the template once, which adds it. A hand-installed unit
|
|
1012
1153
|
copies its `Environment=CANOPYCMS_WORKER_CONTRACT=` line from `worker/canopy-worker.service`.
|
|
1013
1154
|
|
|
@@ -1024,8 +1165,8 @@ units from the bundle's contract: 2 gets the split, an older bundle the single u
|
|
|
1024
1165
|
template, then roll the bundle; on an older template it stops with `template too old for this
|
|
1025
1166
|
bundle`. Inspect EFS only through `sudo /opt/canopy-worker/canopy-inspect <command>`, never from a root shell. A hand install
|
|
1026
1167
|
takes `worker/`'s three units and `gateway.env.example`
|
|
1027
|
-
([steps](https://github.com/safeinsights/canopycms/blob/
|
|
1028
|
-
[checklist](https://github.com/safeinsights/canopycms/blob/
|
|
1168
|
+
([steps](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
|
|
1169
|
+
[checklist](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#first-deploy-checklist).
|
|
1029
1170
|
|
|
1030
1171
|
#### `canopycms-cdk`: `CanopyCmsService.attachTo`, and editor response headers — **behaviour change if you frame the CMS**
|
|
1031
1172
|
|
|
@@ -1036,7 +1177,7 @@ response headers policy. `CanopyCmsDistribution` sends the same headers: `frame-
|
|
|
1036
1177
|
`X-Frame-Options: SAMEORIGIN`, `nosniff`, HSTS and `X-Robots-Tag: noindex`. Unless your app sends
|
|
1037
1178
|
its own framing headers, no other origin can frame the editor or any page the CMS domain serves. Every such page is
|
|
1038
1179
|
marked `noindex`. The editor's default preview is same-origin and unaffected. See
|
|
1039
|
-
[Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/
|
|
1180
|
+
[Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
|
|
1040
1181
|
|
|
1041
1182
|
**To adopt.** If you wired the Function URL into your own distribution by hand, delete those
|
|
1042
1183
|
behaviors and call `attachTo`, passing your CMS build's `assetPrefix` as `editorAssetPrefix` and a
|
|
@@ -1212,7 +1353,7 @@ one the exclusions leave out. A throw or any other return is logged and treated
|
|
|
1212
1353
|
**To adopt.** If your site's routes, sitemap or bylines decide that some entries have no page,
|
|
1213
1354
|
apply the same rule here, for example `referenceLink: (target, { body }) =>
|
|
1214
1355
|
!body?.trim() ? false : undefined` in `defineAIContentConfig` from `canopycms/ai`. See
|
|
1215
|
-
[AI Content Configuration](https://github.com/safeinsights/canopycms/blob/
|
|
1356
|
+
[AI Content Configuration](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#ai-content-configuration).
|
|
1216
1357
|
|
|
1217
1358
|
**Now deletable.** A `fieldTransforms` entry that re-renders a reference field only to drop or
|
|
1218
1359
|
change its link.
|
|
@@ -1287,7 +1428,7 @@ _First in int.115._
|
|
|
1287
1428
|
entry the base branch also changed, the "updated on the base branch" notice and the branch's
|
|
1288
1429
|
conflict count now stay until the branch merges, so a reviewer still sees which entries replaced a
|
|
1289
1430
|
base change. They used to clear on the next sync, about five minutes later. README's new [Drafts
|
|
1290
|
-
and Unpublishing](https://github.com/safeinsights/canopycms/blob/
|
|
1431
|
+
and Unpublishing](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#drafts-and-unpublishing) section covers long-lived branches and
|
|
1291
1432
|
unpublishing.
|
|
1292
1433
|
|
|
1293
1434
|
#### The editor calls the content drawer "All content"
|
|
@@ -1599,7 +1740,7 @@ editor carries an unsaved draft of a stamped entry onto its stamped version.
|
|
|
1599
1740
|
The flag is refused off a top-level `datetime`, on `list: true`, and with `required: true`.
|
|
1600
1741
|
|
|
1601
1742
|
**To adopt.** Add `stampOnPublish: true` to the date field your site sorts or labels by, such as
|
|
1602
|
-
`{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/
|
|
1743
|
+
`{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#stamping-a-publication-date).
|
|
1603
1744
|
|
|
1604
1745
|
**Now deletable.** A build step or hook that writes a missing publication date into new entries.
|
|
1605
1746
|
|
|
@@ -1646,7 +1787,7 @@ preview/form divider is now keyboard-resizable within the same 15–85% the spli
|
|
|
1646
1787
|
stored at, and `react-split-pane` is no longer a dependency.
|
|
1647
1788
|
`EditorPanes`, `EditorPanesProps`, the `PaneLayout` type and the `SPLIT_PERCENT_*` and `DEFAULT_*_SPLIT_PERCENT` constants are
|
|
1648
1789
|
no longer exported from `canopycms/client`. See
|
|
1649
|
-
[Your root layout](https://github.com/safeinsights/canopycms/blob/
|
|
1790
|
+
[Your root layout](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#editor-customization).
|
|
1650
1791
|
|
|
1651
1792
|
**To adopt.** Nothing, unless you import `EditorPanes` or those constants: render `CanopyEditor`
|
|
1652
1793
|
instead, which lays out its own panes. Hiding your site chrome on the editor route is now
|
|
@@ -1757,7 +1898,7 @@ never ended. `canopycms-auth-clerk` skips it while the editor is mounted, and ex
|
|
|
1757
1898
|
**To adopt.** Nothing for the editor, if your edit page uses `useClerkAuthConfig()` or
|
|
1758
1899
|
`ClerkSignIn`. If your CMS build renders `<SignIn>`, `UserButton` or `OrganizationSwitcher` on your
|
|
1759
1900
|
own pages, mount the hook as in
|
|
1760
|
-
[Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/
|
|
1901
|
+
[Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
|
|
1761
1902
|
Your own Server Actions in the CMS build still 403 behind OAC.
|
|
1762
1903
|
|
|
1763
1904
|
**Now deletable.** Any local patch of `window.__internal_onBeforeSetActive` (or 6.x's
|
|
@@ -1798,12 +1939,12 @@ fast naming the ARN, the field and the keys present, never a value.
|
|
|
1798
1939
|
**To adopt.** Nothing, unless one of those secrets holds a JSON document: then set the matching
|
|
1799
1940
|
prop. The scaffolded stack fills them from the repository _variables_
|
|
1800
1941
|
`CANOPY_GITHUB_TOKEN_SECRET_JSON_FIELD` and `CLERK_SECRET_KEY_SECRET_JSON_FIELD`
|
|
1801
|
-
([why the prefix](https://github.com/safeinsights/canopycms/blob/
|
|
1942
|
+
([why the prefix](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
|
|
1802
1943
|
adds the props to `infrastructure/bin/app.ts` and `infrastructure/lib/cms-stack.ts` and the two `env`
|
|
1803
1944
|
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
|
|
1804
1945
|
(also in `secretsArns`). Don't use CDK's `secretValueFromJson`: it resolves the plaintext into the deployed
|
|
1805
1946
|
resource's configuration, readable by anyone who can describe it. Only `CLERK_SECRET_KEY` goes through Secrets Manager; `CLERK_JWT_KEY` and the publishable
|
|
1806
|
-
key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/
|
|
1947
|
+
key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#security-model)).
|
|
1807
1948
|
|
|
1808
1949
|
**Now deletable.** A wrapper that fetches the secret, parses it and re-exports one field into the
|
|
1809
1950
|
worker's environment, such as a `jq` step in user data or a wrapper entrypoint around
|
|
@@ -1815,7 +1956,7 @@ worker's environment, such as a `jq` step in user data or a wrapper entrypoint a
|
|
|
1815
1956
|
`githubToken` is not deprecated and stays the documented default; `canopycms` neither depends on
|
|
1816
1957
|
nor imports `@octokit/auth-app`. Register one App per site, not one shared across repositories:
|
|
1817
1958
|
anyone holding an App's key can mint a token for any of its installations
|
|
1818
|
-
([why](https://github.com/safeinsights/canopycms/blob/
|
|
1959
|
+
([why](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
|
|
1819
1960
|
|
|
1820
1961
|
**To adopt with `canopycms-cdk`** (existing stacks need no edit). `CanopyCmsServiceProps` takes
|
|
1821
1962
|
`githubAppId`, `githubAppInstallationId`, `githubAppPrivateKeySecretArn` and
|
|
@@ -1828,7 +1969,7 @@ anyone holding an App's key can mint a token for any of its installations
|
|
|
1828
1969
|
`verify` checks an existing installation's permissions: run it, since an App missing a
|
|
1829
1970
|
permission only shows up later, as `sync-failed`. `create` needs an interactive terminal and
|
|
1830
1971
|
never edits an existing JSON secret (create one and point the JSON-field prop at it)
|
|
1831
|
-
([details](https://github.com/safeinsights/canopycms/blob/
|
|
1972
|
+
([details](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
|
|
1832
1973
|
2. Set the three props and **remove `githubTokenSecretArn`** (with its JSON field). A partial set
|
|
1833
1974
|
of the three is refused at synth, and so is an App alongside a token.
|
|
1834
1975
|
3. In the generated workflow, store them as `CANOPY_GITHUB_APP_ID`,
|
|
@@ -1839,7 +1980,7 @@ anyone holding an App's key can mint a token for any of its installations
|
|
|
1839
1980
|
|
|
1840
1981
|
The private key is ARN-only; passing the key itself is refused at synth. Its ARN joins the worker's
|
|
1841
1982
|
IAM policy automatically, so you need not add it to `secretsArns`. See
|
|
1842
|
-
[Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/
|
|
1983
|
+
[Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#authenticating-as-a-github-app).
|
|
1843
1984
|
|
|
1844
1985
|
```bash
|
|
1845
1986
|
canopycms init-github-app create -- \
|
|
@@ -1887,7 +2028,7 @@ downloads the `.pem` from the App's settings page.
|
|
|
1887
2028
|
|
|
1888
2029
|
**What changed.** The worker re-reads a Secrets Manager secret (the GitHub token or the Clerk secret
|
|
1889
2030
|
key) when the operation using it fails. Timings, costs and the store-before-revoke order are in
|
|
1890
|
-
[Rotating a secret](https://github.com/safeinsights/canopycms/blob/
|
|
2031
|
+
[Rotating a secret](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#rotating-a-secret).
|
|
1891
2032
|
|
|
1892
2033
|
**To adopt.** Nothing for credentials from `*_SECRET_ARN`, which is every scaffolded deployment. A
|
|
1893
2034
|
GitHub App private key is still read only at boot: store the new key, replace the instance, and
|
|
@@ -1941,12 +2082,12 @@ also check the bucket policy for its grant.
|
|
|
1941
2082
|
5. `withCanopy()` adds sharp's libvips to Next's file tracing (not for a static export) and, on
|
|
1942
2083
|
Next 16 and later, sets `turbopack: {}` when your config has neither `turbopack` nor your own
|
|
1943
2084
|
`webpack` and it can read your Next version. A webpack build still fails its image transforms
|
|
1944
|
-
([Dual Build Support](https://github.com/safeinsights/canopycms/blob/
|
|
2085
|
+
([Dual Build Support](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#dual-build-support)).
|
|
1945
2086
|
|
|
1946
2087
|
**Breaking:** a stack setting `platform` on `fromImageAsset` without `architecture` gets an arm64
|
|
1947
2088
|
function while `platform` still decides the image, so `Platform.LINUX_AMD64` builds an image the
|
|
1948
2089
|
function cannot run. A stack setting neither moves to arm64 with a matching image, built under QEMU
|
|
1949
|
-
on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/
|
|
2090
|
+
on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#where-the-image-is-built)).
|
|
1950
2091
|
|
|
1951
2092
|
**To adopt.**
|
|
1952
2093
|
|
|
@@ -1975,7 +2116,7 @@ reason; `platform` on `fromImageAsset`; and, with `withCanopy()`, a hand-written
|
|
|
1975
2116
|
|
|
1976
2117
|
**What changed.** `media.uploadUrl` (s3 adapter; an absolute http(s) URL or a site-relative path)
|
|
1977
2118
|
replaces the `url` that `beginUpload()` returns, leaving the presign's `fields` untouched, so
|
|
1978
|
-
uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/
|
|
2119
|
+
uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#media-configuration) for the
|
|
1979
2120
|
CloudFront behavior it expects.
|
|
1980
2121
|
|
|
1981
2122
|
**To adopt.** Optional. Set it from an environment variable: a site-relative value works only where
|
|
@@ -2000,7 +2141,7 @@ needs `lazyPublicTransforms: true`) let you pass a deterministically named role,
|
|
|
2000
2141
|
bucket's stack computes `arn:aws:iam::<account>:role/<name>` from literals instead of a
|
|
2001
2142
|
`Fn::GetStackOutput` reference only the CDK CLI resolves. The constructs re-attach
|
|
2002
2143
|
`AWSLambdaBasicExecutionRole` (and the VPC policy) that `lambda.Function` drops from a role you
|
|
2003
|
-
pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/
|
|
2144
|
+
pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#cross-account-asset-bucket).
|
|
2004
2145
|
|
|
2005
2146
|
**To adopt.** Optional:
|
|
2006
2147
|
|
|
@@ -2110,7 +2251,7 @@ public JWKS PEM, used only to verify signatures.
|
|
|
2110
2251
|
to variables (Settings → Secrets and variables → Actions → Variables); `bin/app.ts` refuses the
|
|
2111
2252
|
deploy at synth while it is unset. Check that `bin/app.ts` passes `CLERK_SECRET_KEY` as
|
|
2112
2253
|
`clerkSecretKeySecretArn` (read by the worker), never in the Lambda's `environment`, unless you keep
|
|
2113
|
-
`clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/
|
|
2254
|
+
`clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/docs/deploying-to-aws.md#security-model)).
|
|
2114
2255
|
|
|
2115
2256
|
#### `readByUrlPath` answers only where `listEntries` publishes — **breaking (routing)**
|
|
2116
2257
|
|
|
@@ -2209,7 +2350,7 @@ basePath: process.env.NEXT_PUBLIC_BASE_PATH,
|
|
|
2209
2350
|
Then pass `baseUrl` to `assetUrl` only if Next serves `/assets` (local adapter, `next dev`, S3 with
|
|
2210
2351
|
no distribution): `assetUrl(image, { width: 960, baseUrl: BASE_PATH })`. Assets on CloudFront via
|
|
2211
2352
|
`AssetSupport` stay at the distribution root; pass no `baseUrl` (mount table under "Where `/assets`
|
|
2212
|
-
is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/
|
|
2353
|
+
is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#media-configuration)). Two traps:
|
|
2213
2354
|
|
|
2214
2355
|
- Don't pass a deployment `basePath` to `contentStaticParams({ basePath })`; that option filters by
|
|
2215
2356
|
a nested route prefix and emits zero params, building green.
|
|
@@ -2368,7 +2509,7 @@ Under `exactOptionalPropertyTypes: true`, omit keys instead of assigning `undefi
|
|
|
2368
2509
|
`withTrailingSlash` and `isAbsoluteUrl` from `canopycms/server`; `defineSeoFieldGroup()` from
|
|
2369
2510
|
`canopycms`; `generateContentSitemap` and `entryToMetadata` from `canopycms-next`, bound on
|
|
2370
2511
|
`createNextCanopyContext`'s result. See
|
|
2371
|
-
[Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/
|
|
2512
|
+
[Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#sitemap-and-seo-metadata). Every routable entry type is in
|
|
2372
2513
|
the sitemap unless `exclude`d or `noindex`; one `noindex` predicate drives both robots metadata and
|
|
2373
2514
|
sitemap exclusion. `trailingSlash` is never inferred. `lastModified` defaults to `updatedAt`, a
|
|
2374
2515
|
filesystem mtime. An empty SEO field counts as unset. `siteUrl` must be absolute, colliding URLs are
|
|
@@ -2425,7 +2566,7 @@ underscore-prefixed files are skipped.
|
|
|
2425
2566
|
|
|
2426
2567
|
**What changed.** New scaffolds write `defaultBranchAccess: 'deny'` and
|
|
2427
2568
|
`defaultPathAccess: { read: 'allow' }`
|
|
2428
|
-
([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/
|
|
2569
|
+
([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#public-read-on-server-deployments)).
|
|
2429
2570
|
|
|
2430
2571
|
**To adopt.** An older scaffold's `defaultBranchAccess: 'allow'` is wider than recommended;
|
|
2431
2572
|
consider `'deny'`. If you deleted `defaultPathAccess: { read: 'allow' }`, anonymous visitors get no content until you
|
|
@@ -2478,7 +2619,7 @@ re-checked an entry's type (a `switch` on `meta.entryType` can merge them into o
|
|
|
2478
2619
|
**What changed.** `BlockComponentRegistry<Blocks>` (types only, from `canopycms`; `BlockValueOf<Blocks, 'hero'>`
|
|
2479
2620
|
gives one template's value type) requires exactly
|
|
2480
2621
|
one component per block template name when written as an object literal. See
|
|
2481
|
-
[Block Component Registries](https://github.com/safeinsights/canopycms/blob/
|
|
2622
|
+
[Block Component Registries](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#block-component-registries) and
|
|
2482
2623
|
`apps/example1/app/components/PostView.tsx`.
|
|
2483
2624
|
|
|
2484
2625
|
```ts
|
|
@@ -2500,7 +2641,7 @@ templates against the schema.
|
|
|
2500
2641
|
|
|
2501
2642
|
**What changed.** Spreading a `const` field array into several schemas, and nesting
|
|
2502
2643
|
`defineInlineFieldGroup()` inside a block template, are documented
|
|
2503
|
-
([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/
|
|
2644
|
+
([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
|
|
2504
2645
|
identity helper for them.
|
|
2505
2646
|
|
|
2506
2647
|
```ts
|
|
@@ -2519,7 +2660,7 @@ field by composing from the same `const` field object.
|
|
|
2519
2660
|
A block template holding a `reference` field is a shared block; `read()`/`readByUrlPath()` resolve
|
|
2520
2661
|
it, and listings do with
|
|
2521
2662
|
[`resolveReferences`](#listings-resolve-references-and-a-resolved-reference-carries-urlpath-and-optionally-its-body-16--breaking-type-level)
|
|
2522
|
-
(0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/
|
|
2663
|
+
(0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#shared--referenced-blocks).
|
|
2523
2664
|
|
|
2524
2665
|
**Now deletable.** A second `read()` in page code to unwrap a shared block's reference.
|
|
2525
2666
|
|
|
@@ -2541,7 +2682,7 @@ Not retro-documented, apart from these:
|
|
|
2541
2682
|
|
|
2542
2683
|
#### The registry is keyed by entry-type name (0.0.42)
|
|
2543
2684
|
|
|
2544
|
-
**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/
|
|
2685
|
+
**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/fc7c124fae32a1df226f082b618889ad6c3e8345/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
|
|
2545
2686
|
|
|
2546
2687
|
**To adopt.**
|
|
2547
2688
|
|
|
@@ -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, {
|