canopycms 0.5.0 → 0.6.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 +56 -44
- package/dist/cli/cli.js +5 -1
- package/dist/cli/init.js +5 -1
- package/dist/cli/template-files/cms-stack.ts.template +3 -0
- package/dist/cli/templates.js +5 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/worker/github-gateway-http.js +2 -2
- package/dist/worker/github-gateway.js +2 -2
- package/package.json +1 -1
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.6.0`, built from [`83be4af`](https://github.com/safeinsights/canopycms/tree/83be4af22312c30e8b89a5f14a7eb51d2af2944e).
|
|
9
9
|
|
|
10
|
-
Its entries are [0.
|
|
10
|
+
Its entries are [0.6.0](#060), 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/83be4af22312c30e8b89a5f14a7eb51d2af2944e/.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,18 @@ entries under **Released**.
|
|
|
62
62
|
|
|
63
63
|
## Released
|
|
64
64
|
|
|
65
|
+
### 0.6.0
|
|
66
|
+
|
|
67
|
+
#### Clerk organizations-as-groups is a deployment setting, and survives a Clerk instance without Organizations — **behaviour change**
|
|
68
|
+
|
|
69
|
+
<!-- changeset: clerk-orgs-as-groups -->
|
|
70
|
+
|
|
71
|
+
_First in 0.6.0._
|
|
72
|
+
|
|
73
|
+
**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
|
+
|
|
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/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md).
|
|
76
|
+
|
|
65
77
|
### 0.5.0
|
|
66
78
|
|
|
67
79
|
#### Reorderable list references, and `maxItems` on list fields — **behaviour change: a build fails on a list over its cap**
|
|
@@ -72,7 +84,7 @@ _First in 0.5.0._
|
|
|
72
84
|
|
|
73
85
|
**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
86
|
|
|
75
|
-
**To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/
|
|
87
|
+
**To adopt.** Set `maxItems: 3` on the list field in its entry schema. See [Field Types](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#field-types).
|
|
76
88
|
|
|
77
89
|
#### 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
90
|
|
|
@@ -82,7 +94,7 @@ _First in 0.5.0._
|
|
|
82
94
|
|
|
83
95
|
**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
96
|
|
|
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/
|
|
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/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#sitemap-and-seo-metadata) and [How References Work in the Editor](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#how-references-work-in-the-editor).
|
|
86
98
|
|
|
87
99
|
**Now deletable.** A shared `seo` constant passed separately to the Next context and the AI content config.
|
|
88
100
|
|
|
@@ -110,7 +122,7 @@ resolved without it.
|
|
|
110
122
|
**To adopt.** Where a reference renders its target's prose, set `includeBody: true` on that
|
|
111
123
|
reference field. Code that reads the body from a link-only reference's resolved type now sees
|
|
112
124
|
`string | undefined`; either set `includeBody: true` or handle the missing value. See
|
|
113
|
-
[Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/
|
|
125
|
+
[Resolving References in a Listing](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#resolving-references-in-a-listing).
|
|
114
126
|
|
|
115
127
|
### 0.3.3
|
|
116
128
|
|
|
@@ -521,7 +533,7 @@ URL.
|
|
|
521
533
|
2. For a branch preview: wrap views with `withCanopyPreview` in a `'use client'` module, add
|
|
522
534
|
`app/preview/[[...path]]/page.server.tsx`, set `editor.previewPrefix: '/preview'`, and serve that
|
|
523
535
|
route with `frame-ancestors 'self'`, not `X-Frame-Options: DENY` (see
|
|
524
|
-
[Live Preview](https://github.com/safeinsights/canopycms/blob/
|
|
536
|
+
[Live Preview](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#live-preview)).
|
|
525
537
|
3. A test reading view content from the route's server HTML must load the page in a browser.
|
|
526
538
|
Server output rendered during a preview request carries the signed-in asset prefix; keep it out
|
|
527
539
|
of cross-request caches (`unstable_cache`, module memos).
|
|
@@ -536,7 +548,7 @@ kept site styles ahead of Mantine's in the preview.
|
|
|
536
548
|
server components. A string path marks the form's spelling (`'a.0.b'` marks `a[0].b`), and an empty
|
|
537
549
|
path marks nothing. The editor counts and logs marks naming no field. `createEntrySchemaRegistry`
|
|
538
550
|
refuses a field name that is empty, all digits or contains `.`, `[` or `]`. See
|
|
539
|
-
[Live Preview](https://github.com/safeinsights/canopycms/blob/
|
|
551
|
+
[Live Preview](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#live-preview).
|
|
540
552
|
|
|
541
553
|
**To adopt.** Fix each path that stops compiling; the error lists valid ones. Rewrite computed paths
|
|
542
554
|
as literal segments, or type that component's prop as plain `FieldProps`. Pass `fieldProps` as
|
|
@@ -618,7 +630,7 @@ or a failed render) renders as its plain text, with no URL; any other form of th
|
|
|
618
630
|
fields are nested or renamed, pass the AI config's `seo` the same object you pass
|
|
619
631
|
`createNextCanopyContext({ seo })`, so the sitemap and AI content read the flag from the same
|
|
620
632
|
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/
|
|
633
|
+
shows [the recipe](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#ai-content-configuration).
|
|
622
634
|
|
|
623
635
|
**Now deletable.** An `exclude.where` that re-read the `noindex` flag by hand.
|
|
624
636
|
|
|
@@ -640,7 +652,7 @@ A `markdown` field with `renderAs: 'mdx'` is checked as MDX, and `mdxAllow` narr
|
|
|
640
652
|
field or site-wide. New: field options `renderAs`, `mdxAllow`; config key `mdxAllow`; type
|
|
641
653
|
`MdxAllowlist`. (int.110) A component prop allowance can be `'string'` (or
|
|
642
654
|
`{ type: 'string', maxLength }`): a quoted value only, never bare or `{…}`. See
|
|
643
|
-
[MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/
|
|
655
|
+
[MDX content cannot run code](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#mdx-content-cannot-run-code).
|
|
644
656
|
|
|
645
657
|
**To adopt.** Set `renderAs: 'mdx'` on each `markdown` field your site compiles as MDX, and
|
|
646
658
|
`mdxAllow` to what your renderer takes. Set `executable: true` only on a field whose editors you
|
|
@@ -777,7 +789,7 @@ a format check.
|
|
|
777
789
|
|
|
778
790
|
- (int.93) Submit commits gain an `Edited-by: Name (id)` trailer; PR bodies gain a section that
|
|
779
791
|
re-submits replace, keeping human text. Options: `gitEditedByTrailers`, `gitCoAuthoredByTrailers`
|
|
780
|
-
([reference](https://github.com/safeinsights/canopycms/blob/
|
|
792
|
+
([reference](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#definecanopyconfig-options)).
|
|
781
793
|
- (int.110) Submit-commit trailers name every user who saved since the last submit commit, and
|
|
782
794
|
the PR-body section every user who edited the branch, not only the submitter; settings commits
|
|
783
795
|
(permissions, groups) carry the acting user's trailer.
|
|
@@ -801,7 +813,7 @@ saves only push the branch, and no failing PR task lands in System health.
|
|
|
801
813
|
that entry type goes unavailable: the editor says so, and its entries answer 503 with
|
|
802
814
|
`code: 'SCHEMA_UNAVAILABLE'`. Builds, static deploys and `generate-ai-content` still fail. The
|
|
803
815
|
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/
|
|
816
|
+
[New schemas wait for the editor deploy](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#new-schemas-wait-for-the-editor-deploy).
|
|
805
817
|
Public types gain optional `unavailable` on `EntryTypeConfig` and `FlatSchemaItem`, optional
|
|
806
818
|
`ApiResponse.code`, and a required `SchemaResolutionResult.issues`.
|
|
807
819
|
|
|
@@ -839,7 +851,7 @@ hang until the drain heartbeat lets termination continue. Its in-flight task is
|
|
|
839
851
|
new stack needs no steps.
|
|
840
852
|
|
|
841
853
|
**What changed.** (int.109) Detailed in
|
|
842
|
-
[The worker instance](https://github.com/safeinsights/canopycms/blob/
|
|
854
|
+
[The worker instance](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#the-worker-instance): IMDSv2 with a hop limit of 1; the
|
|
843
855
|
bundle is one file whose sha256 user data checks, readable as that one object; a file-system policy
|
|
844
856
|
refusing clients without TLS or IAM, replacing the worker's
|
|
845
857
|
`AmazonElasticFileSystemClientReadWriteAccess`; an encrypted gp3 root volume; a boot-time upgrade to
|
|
@@ -893,10 +905,10 @@ failure and exits non-zero on `selfStopped`, with a code outside `RestartPrevent
|
|
|
893
905
|
with its hash, as `worker/dist/index.js` and `index.js.sha256`. The default, `'asset'`, is
|
|
894
906
|
unchanged.
|
|
895
907
|
- `CanopyCmsService` alarms when the worker logs no git sync for 30 minutes. See
|
|
896
|
-
[Worker-down alarm](https://github.com/safeinsights/canopycms/blob/
|
|
908
|
+
[Worker-down alarm](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#worker-down-alarm).
|
|
897
909
|
|
|
898
910
|
**To adopt.** Optional. For parameter-only change sets, see
|
|
899
|
-
[Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/
|
|
911
|
+
[Rolling the worker from CI](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#rolling-the-worker-from-ci). For the alarm, pass
|
|
900
912
|
`alarmTopic`.
|
|
901
913
|
|
|
902
914
|
**Now deletable.** A manual `cdk deploy` after each canopycms bump whose only purpose is moving the
|
|
@@ -907,7 +919,7 @@ worker, and a hand-built alarm on the worker log group.
|
|
|
907
919
|
**What changed.** (int.112) The boot's `dnf upgrade` could be OOM-killed on every retry. A 1 GiB
|
|
908
920
|
swap file now goes on first; an upgrade that still fails starts the worker unpatched and notifies
|
|
909
921
|
`alarmTopic` if set; a retried step names itself when it gives up. See
|
|
910
|
-
[The worker instance](https://github.com/safeinsights/canopycms/blob/
|
|
922
|
+
[The worker instance](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#the-worker-instance).
|
|
911
923
|
|
|
912
924
|
**To adopt.** Deploy, which replaces the worker instance. The bundle needs none of this, so it is
|
|
913
925
|
not Template first and the worker contract stays at 1.
|
|
@@ -973,7 +985,7 @@ and operations may reuse GitHub fetches under 30 seconds old.
|
|
|
973
985
|
|
|
974
986
|
**To adopt.** Nothing. Seeding `remote.git` stages a copy of the repository beside the gateway's
|
|
975
987
|
mirror, so the root volume needs room for two
|
|
976
|
-
([details](https://github.com/safeinsights/canopycms/blob/
|
|
988
|
+
([details](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#the-worker-instance)).
|
|
977
989
|
|
|
978
990
|
#### The worker follows a rebased or deleted GitHub branch
|
|
979
991
|
|
|
@@ -995,7 +1007,7 @@ changes the template too (the fallback bundle's key and hash), so only the contr
|
|
|
995
1007
|
bundle-only roll is safe.
|
|
996
1008
|
|
|
997
1009
|
**To adopt.** Parameter mode: gate bundle-only rolls on the contract
|
|
998
|
-
([recipe](https://github.com/safeinsights/canopycms/blob/
|
|
1010
|
+
([recipe](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#rolling-the-worker-from-ci)). The gate refuses a stack without the
|
|
999
1011
|
`WorkerContract` output, so `cdk deploy` the template once, which adds it. A hand-installed unit
|
|
1000
1012
|
copies its `Environment=CANOPYCMS_WORKER_CONTRACT=` line from `worker/canopy-worker.service`.
|
|
1001
1013
|
|
|
@@ -1012,8 +1024,8 @@ units from the bundle's contract: 2 gets the split, an older bundle the single u
|
|
|
1012
1024
|
template, then roll the bundle; on an older template it stops with `template too old for this
|
|
1013
1025
|
bundle`. Inspect EFS only through `sudo /opt/canopy-worker/canopy-inspect <command>`, never from a root shell. A hand install
|
|
1014
1026
|
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/
|
|
1027
|
+
([steps](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#installing-the-units-by-hand)). After the first deploy, run the
|
|
1028
|
+
[checklist](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#first-deploy-checklist).
|
|
1017
1029
|
|
|
1018
1030
|
#### `canopycms-cdk`: `CanopyCmsService.attachTo`, and editor response headers — **behaviour change if you frame the CMS**
|
|
1019
1031
|
|
|
@@ -1024,7 +1036,7 @@ response headers policy. `CanopyCmsDistribution` sends the same headers: `frame-
|
|
|
1024
1036
|
`X-Frame-Options: SAMEORIGIN`, `nosniff`, HSTS and `X-Robots-Tag: noindex`. Unless your app sends
|
|
1025
1037
|
its own framing headers, no other origin can frame the editor or any page the CMS domain serves. Every such page is
|
|
1026
1038
|
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/
|
|
1039
|
+
[Serving the editor from a distribution you already own](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#serving-the-editor-from-a-distribution-you-already-own).
|
|
1028
1040
|
|
|
1029
1041
|
**To adopt.** If you wired the Function URL into your own distribution by hand, delete those
|
|
1030
1042
|
behaviors and call `attachTo`, passing your CMS build's `assetPrefix` as `editorAssetPrefix` and a
|
|
@@ -1200,7 +1212,7 @@ one the exclusions leave out. A throw or any other return is logged and treated
|
|
|
1200
1212
|
**To adopt.** If your site's routes, sitemap or bylines decide that some entries have no page,
|
|
1201
1213
|
apply the same rule here, for example `referenceLink: (target, { body }) =>
|
|
1202
1214
|
!body?.trim() ? false : undefined` in `defineAIContentConfig` from `canopycms/ai`. See
|
|
1203
|
-
[AI Content Configuration](https://github.com/safeinsights/canopycms/blob/
|
|
1215
|
+
[AI Content Configuration](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#ai-content-configuration).
|
|
1204
1216
|
|
|
1205
1217
|
**Now deletable.** A `fieldTransforms` entry that re-renders a reference field only to drop or
|
|
1206
1218
|
change its link.
|
|
@@ -1275,7 +1287,7 @@ _First in int.115._
|
|
|
1275
1287
|
entry the base branch also changed, the "updated on the base branch" notice and the branch's
|
|
1276
1288
|
conflict count now stay until the branch merges, so a reviewer still sees which entries replaced a
|
|
1277
1289
|
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/
|
|
1290
|
+
and Unpublishing](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#drafts-and-unpublishing) section covers long-lived branches and
|
|
1279
1291
|
unpublishing.
|
|
1280
1292
|
|
|
1281
1293
|
#### The editor calls the content drawer "All content"
|
|
@@ -1587,7 +1599,7 @@ editor carries an unsaved draft of a stamped entry onto its stamped version.
|
|
|
1587
1599
|
The flag is refused off a top-level `datetime`, on `list: true`, and with `required: true`.
|
|
1588
1600
|
|
|
1589
1601
|
**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/
|
|
1602
|
+
`{ name: 'publishedAt', type: 'datetime', stampOnPublish: true }`. See [Stamping a publication date](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#stamping-a-publication-date).
|
|
1591
1603
|
|
|
1592
1604
|
**Now deletable.** A build step or hook that writes a missing publication date into new entries.
|
|
1593
1605
|
|
|
@@ -1634,7 +1646,7 @@ preview/form divider is now keyboard-resizable within the same 15–85% the spli
|
|
|
1634
1646
|
stored at, and `react-split-pane` is no longer a dependency.
|
|
1635
1647
|
`EditorPanes`, `EditorPanesProps`, the `PaneLayout` type and the `SPLIT_PERCENT_*` and `DEFAULT_*_SPLIT_PERCENT` constants are
|
|
1636
1648
|
no longer exported from `canopycms/client`. See
|
|
1637
|
-
[Your root layout](https://github.com/safeinsights/canopycms/blob/
|
|
1649
|
+
[Your root layout](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#editor-customization).
|
|
1638
1650
|
|
|
1639
1651
|
**To adopt.** Nothing, unless you import `EditorPanes` or those constants: render `CanopyEditor`
|
|
1640
1652
|
instead, which lays out its own panes. Hiding your site chrome on the editor route is now
|
|
@@ -1745,7 +1757,7 @@ never ended. `canopycms-auth-clerk` skips it while the editor is mounted, and ex
|
|
|
1745
1757
|
**To adopt.** Nothing for the editor, if your edit page uses `useClerkAuthConfig()` or
|
|
1746
1758
|
`ClerkSignIn`. If your CMS build renders `<SignIn>`, `UserButton` or `OrganizationSwitcher` on your
|
|
1747
1759
|
own pages, mount the hook as in
|
|
1748
|
-
[Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/
|
|
1760
|
+
[Clerk components on your own pages](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/packages/canopycms-auth-clerk/README.md#clerk-components-on-your-own-pages).
|
|
1749
1761
|
Your own Server Actions in the CMS build still 403 behind OAC.
|
|
1750
1762
|
|
|
1751
1763
|
**Now deletable.** Any local patch of `window.__internal_onBeforeSetActive` (or 6.x's
|
|
@@ -1786,12 +1798,12 @@ fast naming the ARN, the field and the keys present, never a value.
|
|
|
1786
1798
|
**To adopt.** Nothing, unless one of those secrets holds a JSON document: then set the matching
|
|
1787
1799
|
prop. The scaffolded stack fills them from the repository _variables_
|
|
1788
1800
|
`CANOPY_GITHUB_TOKEN_SECRET_JSON_FIELD` and `CLERK_SECRET_KEY_SECRET_JSON_FIELD`
|
|
1789
|
-
([why the prefix](https://github.com/safeinsights/canopycms/blob/
|
|
1801
|
+
([why the prefix](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#repository-secrets-and-variables)); a stack scaffolded earlier
|
|
1790
1802
|
adds the props to `infrastructure/bin/app.ts` and `infrastructure/lib/cms-stack.ts` and the two `env`
|
|
1791
1803
|
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
1804
|
(also in `secretsArns`). Don't use CDK's `secretValueFromJson`: it resolves the plaintext into the deployed
|
|
1793
1805
|
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/
|
|
1806
|
+
key are public material ([Security Model](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#security-model)).
|
|
1795
1807
|
|
|
1796
1808
|
**Now deletable.** A wrapper that fetches the secret, parses it and re-exports one field into the
|
|
1797
1809
|
worker's environment, such as a `jq` step in user data or a wrapper entrypoint around
|
|
@@ -1803,7 +1815,7 @@ worker's environment, such as a `jq` step in user data or a wrapper entrypoint a
|
|
|
1803
1815
|
`githubToken` is not deprecated and stays the documented default; `canopycms` neither depends on
|
|
1804
1816
|
nor imports `@octokit/auth-app`. Register one App per site, not one shared across repositories:
|
|
1805
1817
|
anyone holding an App's key can mint a token for any of its installations
|
|
1806
|
-
([why](https://github.com/safeinsights/canopycms/blob/
|
|
1818
|
+
([why](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/ARCHITECTURE.md#why-one-github-app-per-site-not-one-shared-across-an-organisation)).
|
|
1807
1819
|
|
|
1808
1820
|
**To adopt with `canopycms-cdk`** (existing stacks need no edit). `CanopyCmsServiceProps` takes
|
|
1809
1821
|
`githubAppId`, `githubAppInstallationId`, `githubAppPrivateKeySecretArn` and
|
|
@@ -1816,7 +1828,7 @@ anyone holding an App's key can mint a token for any of its installations
|
|
|
1816
1828
|
`verify` checks an existing installation's permissions: run it, since an App missing a
|
|
1817
1829
|
permission only shows up later, as `sync-failed`. `create` needs an interactive terminal and
|
|
1818
1830
|
never edits an existing JSON secret (create one and point the JSON-field prop at it)
|
|
1819
|
-
([details](https://github.com/safeinsights/canopycms/blob/
|
|
1831
|
+
([details](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#register-it-with-canopycms-init-github-app)).
|
|
1820
1832
|
2. Set the three props and **remove `githubTokenSecretArn`** (with its JSON field). A partial set
|
|
1821
1833
|
of the three is refused at synth, and so is an App alongside a token.
|
|
1822
1834
|
3. In the generated workflow, store them as `CANOPY_GITHUB_APP_ID`,
|
|
@@ -1827,7 +1839,7 @@ anyone holding an App's key can mint a token for any of its installations
|
|
|
1827
1839
|
|
|
1828
1840
|
The private key is ARN-only; passing the key itself is refused at synth. Its ARN joins the worker's
|
|
1829
1841
|
IAM policy automatically, so you need not add it to `secretsArns`. See
|
|
1830
|
-
[Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/
|
|
1842
|
+
[Authenticating as a GitHub App](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#authenticating-as-a-github-app).
|
|
1831
1843
|
|
|
1832
1844
|
```bash
|
|
1833
1845
|
canopycms init-github-app create -- \
|
|
@@ -1875,7 +1887,7 @@ downloads the `.pem` from the App's settings page.
|
|
|
1875
1887
|
|
|
1876
1888
|
**What changed.** The worker re-reads a Secrets Manager secret (the GitHub token or the Clerk secret
|
|
1877
1889
|
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/
|
|
1890
|
+
[Rotating a secret](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#rotating-a-secret).
|
|
1879
1891
|
|
|
1880
1892
|
**To adopt.** Nothing for credentials from `*_SECRET_ARN`, which is every scaffolded deployment. A
|
|
1881
1893
|
GitHub App private key is still read only at boot: store the new key, replace the instance, and
|
|
@@ -1929,12 +1941,12 @@ also check the bucket policy for its grant.
|
|
|
1929
1941
|
5. `withCanopy()` adds sharp's libvips to Next's file tracing (not for a static export) and, on
|
|
1930
1942
|
Next 16 and later, sets `turbopack: {}` when your config has neither `turbopack` nor your own
|
|
1931
1943
|
`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/
|
|
1944
|
+
([Dual Build Support](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#dual-build-support)).
|
|
1933
1945
|
|
|
1934
1946
|
**Breaking:** a stack setting `platform` on `fromImageAsset` without `architecture` gets an arm64
|
|
1935
1947
|
function while `platform` still decides the image, so `Platform.LINUX_AMD64` builds an image the
|
|
1936
1948
|
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/
|
|
1949
|
+
on an x86 host ([Where the image is built](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#where-the-image-is-built)).
|
|
1938
1950
|
|
|
1939
1951
|
**To adopt.**
|
|
1940
1952
|
|
|
@@ -1963,7 +1975,7 @@ reason; `platform` on `fromImageAsset`; and, with `withCanopy()`, a hand-written
|
|
|
1963
1975
|
|
|
1964
1976
|
**What changed.** `media.uploadUrl` (s3 adapter; an absolute http(s) URL or a site-relative path)
|
|
1965
1977
|
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/
|
|
1978
|
+
uploads can be same-origin. See [Media Configuration](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#media-configuration) for the
|
|
1967
1979
|
CloudFront behavior it expects.
|
|
1968
1980
|
|
|
1969
1981
|
**To adopt.** Optional. Set it from an environment variable: a site-relative value works only where
|
|
@@ -1988,7 +2000,7 @@ needs `lazyPublicTransforms: true`) let you pass a deterministically named role,
|
|
|
1988
2000
|
bucket's stack computes `arn:aws:iam::<account>:role/<name>` from literals instead of a
|
|
1989
2001
|
`Fn::GetStackOutput` reference only the CDK CLI resolves. The constructs re-attach
|
|
1990
2002
|
`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/
|
|
2003
|
+
pass. See [Cross-account asset bucket](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#cross-account-asset-bucket).
|
|
1992
2004
|
|
|
1993
2005
|
**To adopt.** Optional:
|
|
1994
2006
|
|
|
@@ -2098,7 +2110,7 @@ public JWKS PEM, used only to verify signatures.
|
|
|
2098
2110
|
to variables (Settings → Secrets and variables → Actions → Variables); `bin/app.ts` refuses the
|
|
2099
2111
|
deploy at synth while it is unset. Check that `bin/app.ts` passes `CLERK_SECRET_KEY` as
|
|
2100
2112
|
`clerkSecretKeySecretArn` (read by the worker), never in the Lambda's `environment`, unless you keep
|
|
2101
|
-
`clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/
|
|
2113
|
+
`clerkMiddleware` ([Security Model](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/docs/deploying-to-aws.md#security-model)).
|
|
2102
2114
|
|
|
2103
2115
|
#### `readByUrlPath` answers only where `listEntries` publishes — **breaking (routing)**
|
|
2104
2116
|
|
|
@@ -2197,7 +2209,7 @@ basePath: process.env.NEXT_PUBLIC_BASE_PATH,
|
|
|
2197
2209
|
Then pass `baseUrl` to `assetUrl` only if Next serves `/assets` (local adapter, `next dev`, S3 with
|
|
2198
2210
|
no distribution): `assetUrl(image, { width: 960, baseUrl: BASE_PATH })`. Assets on CloudFront via
|
|
2199
2211
|
`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/
|
|
2212
|
+
is mounted" in [Media Configuration](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#media-configuration)). Two traps:
|
|
2201
2213
|
|
|
2202
2214
|
- Don't pass a deployment `basePath` to `contentStaticParams({ basePath })`; that option filters by
|
|
2203
2215
|
a nested route prefix and emits zero params, building green.
|
|
@@ -2356,7 +2368,7 @@ Under `exactOptionalPropertyTypes: true`, omit keys instead of assigning `undefi
|
|
|
2356
2368
|
`withTrailingSlash` and `isAbsoluteUrl` from `canopycms/server`; `defineSeoFieldGroup()` from
|
|
2357
2369
|
`canopycms`; `generateContentSitemap` and `entryToMetadata` from `canopycms-next`, bound on
|
|
2358
2370
|
`createNextCanopyContext`'s result. See
|
|
2359
|
-
[Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/
|
|
2371
|
+
[Sitemap and SEO Metadata](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#sitemap-and-seo-metadata). Every routable entry type is in
|
|
2360
2372
|
the sitemap unless `exclude`d or `noindex`; one `noindex` predicate drives both robots metadata and
|
|
2361
2373
|
sitemap exclusion. `trailingSlash` is never inferred. `lastModified` defaults to `updatedAt`, a
|
|
2362
2374
|
filesystem mtime. An empty SEO field counts as unset. `siteUrl` must be absolute, colliding URLs are
|
|
@@ -2413,7 +2425,7 @@ underscore-prefixed files are skipped.
|
|
|
2413
2425
|
|
|
2414
2426
|
**What changed.** New scaffolds write `defaultBranchAccess: 'deny'` and
|
|
2415
2427
|
`defaultPathAccess: { read: 'allow' }`
|
|
2416
|
-
([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/
|
|
2428
|
+
([Public read on server deployments](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#public-read-on-server-deployments)).
|
|
2417
2429
|
|
|
2418
2430
|
**To adopt.** An older scaffold's `defaultBranchAccess: 'allow'` is wider than recommended;
|
|
2419
2431
|
consider `'deny'`. If you deleted `defaultPathAccess: { read: 'allow' }`, anonymous visitors get no content until you
|
|
@@ -2466,7 +2478,7 @@ re-checked an entry's type (a `switch` on `meta.entryType` can merge them into o
|
|
|
2466
2478
|
**What changed.** `BlockComponentRegistry<Blocks>` (types only, from `canopycms`; `BlockValueOf<Blocks, 'hero'>`
|
|
2467
2479
|
gives one template's value type) requires exactly
|
|
2468
2480
|
one component per block template name when written as an object literal. See
|
|
2469
|
-
[Block Component Registries](https://github.com/safeinsights/canopycms/blob/
|
|
2481
|
+
[Block Component Registries](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#block-component-registries) and
|
|
2470
2482
|
`apps/example1/app/components/PostView.tsx`.
|
|
2471
2483
|
|
|
2472
2484
|
```ts
|
|
@@ -2488,7 +2500,7 @@ templates against the schema.
|
|
|
2488
2500
|
|
|
2489
2501
|
**What changed.** Spreading a `const` field array into several schemas, and nesting
|
|
2490
2502
|
`defineInlineFieldGroup()` inside a block template, are documented
|
|
2491
|
-
([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/
|
|
2503
|
+
([Reusable Field Fragments](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#reusable-field-fragments)); `defineFieldFragment()` is an
|
|
2492
2504
|
identity helper for them.
|
|
2493
2505
|
|
|
2494
2506
|
```ts
|
|
@@ -2507,7 +2519,7 @@ field by composing from the same `const` field object.
|
|
|
2507
2519
|
A block template holding a `reference` field is a shared block; `read()`/`readByUrlPath()` resolve
|
|
2508
2520
|
it, and listings do with
|
|
2509
2521
|
[`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/
|
|
2522
|
+
(0.0.64). See [Shared / Referenced Blocks](https://github.com/safeinsights/canopycms/blob/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#shared--referenced-blocks).
|
|
2511
2523
|
|
|
2512
2524
|
**Now deletable.** A second `read()` in page code to unwrap a shared block's reference.
|
|
2513
2525
|
|
|
@@ -2529,7 +2541,7 @@ Not retro-documented, apart from these:
|
|
|
2529
2541
|
|
|
2530
2542
|
#### The registry is keyed by entry-type name (0.0.42)
|
|
2531
2543
|
|
|
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/
|
|
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/83be4af22312c30e8b89a5f14a7eb51d2af2944e/README.md#convention-why-key-the-registry-by-entry-type-name) says when to keep them.
|
|
2533
2545
|
|
|
2534
2546
|
**To adopt.**
|
|
2535
2547
|
|
package/dist/cli/cli.js
CHANGED
|
@@ -233,9 +233,13 @@ async function canopyContext(options) {
|
|
|
233
233
|
"// authenticated request instead of silently falling back to unauthenticated dev auth.",
|
|
234
234
|
"// CLERK_SECRET_KEY is read only where Clerk's backend API is called: the auth-cache",
|
|
235
235
|
"// refresh (the worker in prod, lazily on the dev server in dev).",
|
|
236
|
+
"// useOrganizationsAsGroups needs Organizations enabled on the Clerk instance and offers",
|
|
237
|
+
"// every organization in the instance as a group. In an AWS deployment the worker reads",
|
|
238
|
+
"// the setting from `clerkOrganizationsAsGroups` in the CDK stack, which governs there;",
|
|
239
|
+
"// keep the two equal.",
|
|
236
240
|
"const authPlugin =",
|
|
237
241
|
" config.server.mode === 'prod' || process.env.CANOPY_AUTH_MODE === 'clerk'",
|
|
238
|
-
" ? createClerkAuthPlugin({ useOrganizationsAsGroups:
|
|
242
|
+
" ? createClerkAuthPlugin({ useOrganizationsAsGroups: false })",
|
|
239
243
|
" : createDevAuthPlugin()"
|
|
240
244
|
].join("\n") : "const authPlugin = createDevAuthPlugin()";
|
|
241
245
|
return template.replace("{{AUTH_IMPORTS}}", authImports).replace("{{AUTH_PLUGIN_SETUP}}", authPluginSetup).replace("{{CONFIG_IMPORT}}", options.configImport);
|
package/dist/cli/init.js
CHANGED
|
@@ -657,9 +657,13 @@ async function canopyContext(options) {
|
|
|
657
657
|
"// authenticated request instead of silently falling back to unauthenticated dev auth.",
|
|
658
658
|
"// CLERK_SECRET_KEY is read only where Clerk's backend API is called: the auth-cache",
|
|
659
659
|
"// refresh (the worker in prod, lazily on the dev server in dev).",
|
|
660
|
+
"// useOrganizationsAsGroups needs Organizations enabled on the Clerk instance and offers",
|
|
661
|
+
"// every organization in the instance as a group. In an AWS deployment the worker reads",
|
|
662
|
+
"// the setting from `clerkOrganizationsAsGroups` in the CDK stack, which governs there;",
|
|
663
|
+
"// keep the two equal.",
|
|
660
664
|
"const authPlugin =",
|
|
661
665
|
" config.server.mode === 'prod' || process.env.CANOPY_AUTH_MODE === 'clerk'",
|
|
662
|
-
" ? createClerkAuthPlugin({ useOrganizationsAsGroups:
|
|
666
|
+
" ? createClerkAuthPlugin({ useOrganizationsAsGroups: false })",
|
|
663
667
|
" : createDevAuthPlugin()"
|
|
664
668
|
].join("\n") : "const authPlugin = createDevAuthPlugin()";
|
|
665
669
|
return template.replace("{{AUTH_IMPORTS}}", authImports).replace("{{AUTH_PLUGIN_SETUP}}", authPluginSetup).replace("{{CONFIG_IMPORT}}", options.configImport);
|
|
@@ -172,6 +172,9 @@ export class CmsStack extends Stack {
|
|
|
172
172
|
].filter((arn): arn is string => arn !== undefined),
|
|
173
173
|
githubTokenSecretArn: githubToken?.secretArn,
|
|
174
174
|
clerkSecretKeySecretArn: clerkSecretKey.secretArn,
|
|
175
|
+
// Whether the worker maps Clerk Organizations onto Canopy groups. It needs Organizations
|
|
176
|
+
// enabled on the Clerk instance; keep it equal to useOrganizationsAsGroups in canopy.ts.
|
|
177
|
+
clerkOrganizationsAsGroups: false,
|
|
175
178
|
// GitHub App auth, when configured instead of the token above. Undefined
|
|
176
179
|
// unless the adopter set all three; CanopyCmsService refuses a partial
|
|
177
180
|
// set, and refuses an App alongside githubTokenSecretArn.
|
package/dist/cli/templates.js
CHANGED
|
@@ -41,9 +41,13 @@ export async function canopyContext(options) {
|
|
|
41
41
|
'// authenticated request instead of silently falling back to unauthenticated dev auth.',
|
|
42
42
|
"// CLERK_SECRET_KEY is read only where Clerk's backend API is called: the auth-cache",
|
|
43
43
|
'// refresh (the worker in prod, lazily on the dev server in dev).',
|
|
44
|
+
'// useOrganizationsAsGroups needs Organizations enabled on the Clerk instance and offers',
|
|
45
|
+
'// every organization in the instance as a group. In an AWS deployment the worker reads',
|
|
46
|
+
'// the setting from `clerkOrganizationsAsGroups` in the CDK stack, which governs there;',
|
|
47
|
+
'// keep the two equal.',
|
|
44
48
|
'const authPlugin =',
|
|
45
49
|
" config.server.mode === 'prod' || process.env.CANOPY_AUTH_MODE === 'clerk'",
|
|
46
|
-
' ? createClerkAuthPlugin({ useOrganizationsAsGroups:
|
|
50
|
+
' ? createClerkAuthPlugin({ useOrganizationsAsGroups: false })',
|
|
47
51
|
' : createDevAuthPlugin()',
|
|
48
52
|
].join('\n')
|
|
49
53
|
: 'const authPlugin = createDevAuthPlugin()';
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CANOPYCMS_VERSION = "0.
|
|
1
|
+
export declare const CANOPYCMS_VERSION = "0.6.0";
|
package/dist/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Generated by scripts/bump-version.mjs, its only writer. The package builds with plain
|
|
2
2
|
// tsc (rootDir: src), so src/ cannot import ../package.json; version.test.ts keeps the two equal.
|
|
3
|
-
export const CANOPYCMS_VERSION = '0.
|
|
3
|
+
export const CANOPYCMS_VERSION = '0.6.0';
|
|
@@ -631,8 +631,8 @@ const POLL_WAIT_MS = MAX_POLL_WAIT_MS;
|
|
|
631
631
|
/** How long `health` waits for the gateway: `getSecret` alone has taken 87 s. */
|
|
632
632
|
const HEALTH_WAIT_MS = 300_000;
|
|
633
633
|
/**
|
|
634
|
-
* How long `authSnapshot` waits: a
|
|
635
|
-
*
|
|
634
|
+
* How long `authSnapshot` waits: a generous bound on a fetch that pages the provider's whole user,
|
|
635
|
+
* organization and membership lists one page at a time. A later call joins a fetch an earlier one stopped waiting for.
|
|
636
636
|
*/
|
|
637
637
|
const AUTH_SNAPSHOT_WAIT_MS = 30 * 60_000;
|
|
638
638
|
/** How long `termination` and `completeLifecycle` wait: a poll's wait is well inside it. */
|
|
@@ -283,8 +283,8 @@ class LocalGitHubGateway {
|
|
|
283
283
|
}
|
|
284
284
|
/**
|
|
285
285
|
* One fetch serves every caller: concurrent callers join it, and its result is answered again
|
|
286
|
-
* for {@link AUTH_SNAPSHOT_REUSE_MS}. A fetch
|
|
287
|
-
* would otherwise hold the provider's API at its rate limit. The fetch runs apart from every
|
|
286
|
+
* for {@link AUTH_SNAPSHOT_REUSE_MS}. A fetch pages the provider's whole user and membership lists,
|
|
287
|
+
* so a worker asking in a loop would otherwise hold the provider's API at its rate limit. The fetch runs apart from every
|
|
288
288
|
* caller's signal, which ends only that caller's wait, so a retry after a timed-out wait joins it.
|
|
289
289
|
*/
|
|
290
290
|
async authSnapshot(signal) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"//": "@codemirror/language, @lezer/highlight: workaround — @mdxeditor/editor uses cm6-theme-basic-light which peer-requires these but mdxeditor doesn't declare them as dependencies",
|
|
3
3
|
"name": "canopycms",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"description": "CanopyCMS core package: schema-driven content, branch-aware editing, and editor UI for Next.js.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|