@conloca/cloud-astro 0.0.0-stage → 0.2.2

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.
Files changed (196) hide show
  1. package/README.md +328 -2
  2. package/dist/src/build-commit.d.ts +19 -0
  3. package/dist/src/build-commit.d.ts.map +1 -0
  4. package/dist/src/build-commit.js +6 -0
  5. package/dist/src/build-commit.js.map +1 -0
  6. package/dist/src/bundle.d.ts +181 -0
  7. package/dist/src/bundle.d.ts.map +1 -0
  8. package/dist/src/bundle.js +413 -0
  9. package/dist/src/bundle.js.map +1 -0
  10. package/dist/src/component-manifest.d.ts +29 -0
  11. package/dist/src/component-manifest.d.ts.map +1 -0
  12. package/dist/src/component-manifest.js +53 -0
  13. package/dist/src/component-manifest.js.map +1 -0
  14. package/dist/src/constants.d.ts +26 -0
  15. package/dist/src/constants.d.ts.map +1 -0
  16. package/dist/src/constants.js +26 -0
  17. package/dist/src/constants.js.map +1 -0
  18. package/dist/src/descriptors.d.ts +25 -0
  19. package/dist/src/descriptors.d.ts.map +1 -0
  20. package/dist/src/descriptors.js +65 -0
  21. package/dist/src/descriptors.js.map +1 -0
  22. package/dist/src/discovery.d.ts +58 -0
  23. package/dist/src/discovery.d.ts.map +1 -0
  24. package/dist/src/discovery.js +133 -0
  25. package/dist/src/discovery.js.map +1 -0
  26. package/dist/src/doctor/checks-live.d.ts +15 -0
  27. package/dist/src/doctor/checks-live.d.ts.map +1 -0
  28. package/dist/src/doctor/checks-live.js +229 -0
  29. package/dist/src/doctor/checks-live.js.map +1 -0
  30. package/dist/src/doctor/checks-offline.d.ts +36 -0
  31. package/dist/src/doctor/checks-offline.d.ts.map +1 -0
  32. package/dist/src/doctor/checks-offline.js +301 -0
  33. package/dist/src/doctor/checks-offline.js.map +1 -0
  34. package/dist/src/doctor/config-scan.d.ts +55 -0
  35. package/dist/src/doctor/config-scan.d.ts.map +1 -0
  36. package/dist/src/doctor/config-scan.js +178 -0
  37. package/dist/src/doctor/config-scan.js.map +1 -0
  38. package/dist/src/doctor/run.d.ts +4 -0
  39. package/dist/src/doctor/run.d.ts.map +1 -0
  40. package/dist/src/doctor/run.js +29 -0
  41. package/dist/src/doctor/run.js.map +1 -0
  42. package/dist/src/doctor/types.d.ts +60 -0
  43. package/dist/src/doctor/types.d.ts.map +1 -0
  44. package/dist/src/doctor/types.js +18 -0
  45. package/dist/src/doctor/types.js.map +1 -0
  46. package/dist/src/doctor.d.ts +9 -0
  47. package/dist/src/doctor.d.ts.map +1 -0
  48. package/dist/src/doctor.js +12 -0
  49. package/dist/src/doctor.js.map +1 -0
  50. package/dist/src/git.d.ts +38 -0
  51. package/dist/src/git.d.ts.map +1 -0
  52. package/dist/src/git.js +43 -0
  53. package/dist/src/git.js.map +1 -0
  54. package/dist/src/index.d.ts +3 -0
  55. package/dist/src/index.d.ts.map +1 -0
  56. package/dist/src/index.js +7 -0
  57. package/dist/src/index.js.map +1 -0
  58. package/dist/src/integration.d.ts +6 -0
  59. package/dist/src/integration.d.ts.map +1 -0
  60. package/dist/src/integration.js +544 -0
  61. package/dist/src/integration.js.map +1 -0
  62. package/dist/src/message-of.d.ts +3 -0
  63. package/dist/src/message-of.d.ts.map +1 -0
  64. package/dist/src/message-of.js +5 -0
  65. package/dist/src/message-of.js.map +1 -0
  66. package/dist/src/node.d.ts +3 -0
  67. package/dist/src/node.d.ts.map +1 -0
  68. package/dist/src/node.js +4 -0
  69. package/dist/src/node.js.map +1 -0
  70. package/dist/src/package-version.d.ts +7 -0
  71. package/dist/src/package-version.d.ts.map +1 -0
  72. package/dist/src/package-version.js +17 -0
  73. package/dist/src/package-version.js.map +1 -0
  74. package/dist/src/preview/_dispatch.d.ts +55 -0
  75. package/dist/src/preview/_dispatch.d.ts.map +1 -0
  76. package/dist/src/preview/_dispatch.js +72 -0
  77. package/dist/src/preview/_dispatch.js.map +1 -0
  78. package/dist/src/preview/_resolve-opts.d.ts +30 -0
  79. package/dist/src/preview/_resolve-opts.d.ts.map +1 -0
  80. package/dist/src/preview/_resolve-opts.js +73 -0
  81. package/dist/src/preview/_resolve-opts.js.map +1 -0
  82. package/dist/src/preview/banner.d.ts +29 -0
  83. package/dist/src/preview/banner.d.ts.map +1 -0
  84. package/dist/src/preview/banner.js +94 -0
  85. package/dist/src/preview/banner.js.map +1 -0
  86. package/dist/src/preview/content-api.d.ts +110 -0
  87. package/dist/src/preview/content-api.d.ts.map +1 -0
  88. package/dist/src/preview/content-api.js +216 -0
  89. package/dist/src/preview/content-api.js.map +1 -0
  90. package/dist/src/preview/cookie.d.ts +36 -0
  91. package/dist/src/preview/cookie.d.ts.map +1 -0
  92. package/dist/src/preview/cookie.js +59 -0
  93. package/dist/src/preview/cookie.js.map +1 -0
  94. package/dist/src/preview/headers.d.ts +25 -0
  95. package/dist/src/preview/headers.d.ts.map +1 -0
  96. package/dist/src/preview/headers.js +31 -0
  97. package/dist/src/preview/headers.js.map +1 -0
  98. package/dist/src/preview/landing.d.ts +22 -0
  99. package/dist/src/preview/landing.d.ts.map +1 -0
  100. package/dist/src/preview/landing.js +70 -0
  101. package/dist/src/preview/landing.js.map +1 -0
  102. package/dist/src/preview/middleware.d.ts +118 -0
  103. package/dist/src/preview/middleware.d.ts.map +1 -0
  104. package/dist/src/preview/middleware.js +197 -0
  105. package/dist/src/preview/middleware.js.map +1 -0
  106. package/dist/src/preview/preview-path.d.ts +21 -0
  107. package/dist/src/preview/preview-path.d.ts.map +1 -0
  108. package/dist/src/preview/preview-path.js +29 -0
  109. package/dist/src/preview/preview-path.js.map +1 -0
  110. package/dist/src/preview/satteri-workerd.d.ts +17 -0
  111. package/dist/src/preview/satteri-workerd.d.ts.map +1 -0
  112. package/dist/src/preview/satteri-workerd.js +18 -0
  113. package/dist/src/preview/satteri-workerd.js.map +1 -0
  114. package/dist/src/preview/site-middleware.d.ts +69 -0
  115. package/dist/src/preview/site-middleware.d.ts.map +1 -0
  116. package/dist/src/preview/site-middleware.js +160 -0
  117. package/dist/src/preview/site-middleware.js.map +1 -0
  118. package/dist/src/preview/workerd-shim.d.ts +19 -0
  119. package/dist/src/preview/workerd-shim.d.ts.map +1 -0
  120. package/dist/src/preview/workerd-shim.js +33 -0
  121. package/dist/src/preview/workerd-shim.js.map +1 -0
  122. package/dist/src/preview-build.d.ts +71 -0
  123. package/dist/src/preview-build.d.ts.map +1 -0
  124. package/dist/src/preview-build.js +115 -0
  125. package/dist/src/preview-build.js.map +1 -0
  126. package/dist/src/preview.d.ts +6 -0
  127. package/dist/src/preview.d.ts.map +1 -0
  128. package/dist/src/preview.js +12 -0
  129. package/dist/src/preview.js.map +1 -0
  130. package/dist/src/register.d.ts +98 -0
  131. package/dist/src/register.d.ts.map +1 -0
  132. package/dist/src/register.js +103 -0
  133. package/dist/src/register.js.map +1 -0
  134. package/dist/src/repository.d.ts +18 -0
  135. package/dist/src/repository.d.ts.map +1 -0
  136. package/dist/src/repository.js +46 -0
  137. package/dist/src/repository.js.map +1 -0
  138. package/dist/src/site-id.d.ts +18 -0
  139. package/dist/src/site-id.d.ts.map +1 -0
  140. package/dist/src/site-id.js +70 -0
  141. package/dist/src/site-id.js.map +1 -0
  142. package/dist/src/site-middleware.d.ts +18 -0
  143. package/dist/src/site-middleware.d.ts.map +1 -0
  144. package/dist/src/site-middleware.js +47 -0
  145. package/dist/src/site-middleware.js.map +1 -0
  146. package/dist/src/skill.d.ts +26 -0
  147. package/dist/src/skill.d.ts.map +1 -0
  148. package/dist/src/skill.js +67 -0
  149. package/dist/src/skill.js.map +1 -0
  150. package/dist/src/types.d.ts +135 -0
  151. package/dist/src/types.d.ts.map +1 -0
  152. package/dist/src/types.js +2 -0
  153. package/dist/src/types.js.map +1 -0
  154. package/package.json +182 -4
  155. package/src/build-commit.ts +22 -0
  156. package/src/bundle.ts +570 -0
  157. package/src/component-manifest.ts +75 -0
  158. package/src/constants.ts +28 -0
  159. package/src/descriptors.ts +92 -0
  160. package/src/discovery.ts +183 -0
  161. package/src/doctor/checks-live.ts +324 -0
  162. package/src/doctor/checks-offline.ts +325 -0
  163. package/src/doctor/config-scan.ts +205 -0
  164. package/src/doctor/run.ts +39 -0
  165. package/src/doctor/types.ts +71 -0
  166. package/src/doctor.ts +14 -0
  167. package/src/git.ts +66 -0
  168. package/src/index.ts +8 -0
  169. package/src/integration.ts +607 -0
  170. package/src/message-of.ts +4 -0
  171. package/src/node.ts +5 -0
  172. package/src/package-version.ts +16 -0
  173. package/src/preview/_dispatch.ts +105 -0
  174. package/src/preview/_resolve-opts.ts +89 -0
  175. package/src/preview/banner.ts +96 -0
  176. package/src/preview/content-api.ts +293 -0
  177. package/src/preview/cookie.ts +54 -0
  178. package/src/preview/headers.ts +30 -0
  179. package/src/preview/landing.ts +73 -0
  180. package/src/preview/middleware.ts +309 -0
  181. package/src/preview/preview-path.ts +28 -0
  182. package/src/preview/satteri-workerd.ts +24 -0
  183. package/src/preview/site-middleware.ts +210 -0
  184. package/src/preview/workerd-shim.ts +31 -0
  185. package/src/preview-build.ts +147 -0
  186. package/src/preview-handler.astro +55 -0
  187. package/src/preview-handler.d.ts +6 -0
  188. package/src/preview.ts +22 -0
  189. package/src/register.ts +180 -0
  190. package/src/repository.ts +54 -0
  191. package/src/site-id.ts +86 -0
  192. package/src/site-middleware.ts +55 -0
  193. package/src/skill/SKILL.md +69 -0
  194. package/src/skill.ts +66 -0
  195. package/src/types.ts +137 -0
  196. package/src/virtual-modules.d.ts +52 -0
package/README.md CHANGED
@@ -1,3 +1,329 @@
1
- # Temporary Holding Version
1
+ # `@conloca/cloud-astro`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Astro integration that connects a Conloca CMS site to an editor endpoint. Add it to the site's `astro.config.mjs` next
4
+ to `conlocaCMS` to:
5
+
6
+ 1. Compile the site's Puck config into a single editor bundle under `_conloca/` in the build output
7
+ (react/react-dom/jsx-runtime/`@puckeditor/core` stay external — the editor supplies them at runtime) and register the
8
+ build at `endpoint`, so the editor there loads this build's bundle for the branch it was built from.
9
+ 2. Run a recursive preview build that emits SSR routes for draft content.
10
+ 3. Wire preview SSR middleware that checks `/conloca_preview_<secret>/*` requests against the endpoint's token issuer
11
+ and serves draft pages.
12
+ 4. Expose `PreviewContentAPI` for `.astro` pages to fetch draft content.
13
+
14
+ Items 2 to 4 serve draft previews, which are not available on your own deployment yet. The setup below keeps them off
15
+ with `previewBuild: false` (see [Draft previews](#draft-previews)).
16
+
17
+ ## Setup
18
+
19
+ Before you start you need:
20
+
21
+ - An Astro site that already runs `@conloca/astro-cms` (its README covers that), in a GitHub repository.
22
+ - The repository connected to the editor at `endpoint`: sign in there with **Continue with GitHub**, choose **Connect
23
+ GitHub**, and pick the repository on GitHub's installation screen. If a GitHub organization owns the repository and
24
+ you are not one of its owners, an owner has to approve the installation; until then the editor shows **Waiting for
25
+ approval**.
26
+ - An owner or admin role in the editor's workspace: only they can create the build token in step 3. Whoever sets the
27
+ workspace up becomes its first owner.
28
+
29
+ ### 1. Install
30
+
31
+ ```sh
32
+ bun add @conloca/cloud-astro
33
+ ```
34
+
35
+ It needs Astro 7.3.1 or a later 7.x release, and `@conloca/astro-cms` at its own version: the `@conloca/*` packages are
36
+ released together, so keep them on one version and update them together. Its other peers (`@astrojs/react`, `vite`) are
37
+ already in a site that runs `@conloca/astro-cms`.
38
+
39
+ ### 2. Add it next to `conlocaCMS`
40
+
41
+ ```js
42
+ // astro.config.mjs
43
+ import react from '@astrojs/react';
44
+ import { conlocaCMS } from '@conloca/astro-cms/node';
45
+ import { conlocaCloud } from '@conloca/cloud-astro';
46
+ import { defineConfig } from 'astro/config';
47
+
48
+ export default defineConfig({
49
+ // Keep your existing settings (output, adapter, ...) as they are.
50
+ integrations: [
51
+ react(),
52
+ conlocaCMS({
53
+ contentRoot: './content',
54
+ puckConfigPath: './src/puck.config.tsx',
55
+ layout: './src/layouts/Layout.astro',
56
+ }),
57
+ conlocaCloud({
58
+ endpoint: 'https://cms.example.com',
59
+ puckConfigPath: './src/puck.config.tsx',
60
+ publicBaseUrl: 'https://www.example.com',
61
+ previewBuild: false,
62
+ }),
63
+ ],
64
+ });
65
+ ```
66
+
67
+ - `conlocaCloud` is an add-on to `conlocaCMS`, not a replacement: keep both, with `react()` first. Doctor reports a
68
+ config without `conlocaCMS` as an error.
69
+ - `endpoint` is only the scheme and host of the address you open the editor at, such as `https://cms.example.com`. Leave
70
+ out any path the browser's address bar shows after the host, and the trailing slash.
71
+ - `puckConfigPath` is the value you already gave `conlocaCMS`. If your `conlocaCMS` options also set `siteStyles` or
72
+ `fragmentPreviewRoute`, give `conlocaCloud` the same values, so the editor renders your pages with your site's styles.
73
+ - `publicBaseUrl` is the address your deployed site is served from: the editor loads this build's editor files from
74
+ there. The integration does **not** read Astro's `site` option, so set `publicBaseUrl` even when `site` holds the same
75
+ address. Its only fallback is `CF_PAGES_URL`, which Cloudflare Pages sets when it runs the build itself. Without
76
+ either, the build succeeds but does not register, and the editor never updates.
77
+ - `previewBuild: false` keeps off the second build, the one that serves draft previews. Draft previews on your own
78
+ deployment are not available yet, so keep this line: without it, every build that registers also runs that second
79
+ build, which fails on a static site that has no SSR adapter.
80
+
81
+ ### 3. Give the build a token
82
+
83
+ In the editor at `endpoint`, open the account menu (the round button with your initial), choose **Workspace settings**,
84
+ and go to **Build token**. The **Connect this site** screen of a site that has no build yet shows the same section.
85
+ Choose **Create build token**. The token is shown once, as the line `CONLOCA_BUILD_TOKEN=cbt_…`, and **Copy environment
86
+ variable** copies that whole line. Store it wherever `astro build` runs:
87
+
88
+ - Where the name and the value are separate fields — a GitHub Actions secret, a Cloudflare Pages variable, most hosts'
89
+ settings — the name is `CONLOCA_BUILD_TOKEN` and the value is **only** the part after `CONLOCA_BUILD_TOKEN=`, starting
90
+ with `cbt_`. Do not paste the whole copied line as the value.
91
+ - Where the input takes `NAME=value` lines, like a `.env` file, paste the whole line.
92
+
93
+ Give the secret only to the steps that need it: `conloca doctor` and the build (see the
94
+ [CI example](#ci-example-github-actions)), not to install scripts or deploy actions. Never write it into the config:
95
+ doctor warns when `buildToken` is committed.
96
+
97
+ One token serves the whole workspace. **Replace build token** creates a new one, and the old one stops working at once,
98
+ so update every place that holds it.
99
+
100
+ No Conloca-specific GitHub Action or OIDC setup is required. GitHub Actions, Vercel and GitLab provide the repository
101
+ automatically; elsewhere the integration reads the checkout's `remote.origin.url`. Use `repoUri` only for a checkout
102
+ where neither is available.
103
+
104
+ A build without the token still succeeds; it only skips registration (see
105
+ [When registration is skipped](#when-registration-is-skipped)). Once your CI is wired, set `requireRegistration: true`
106
+ so a deploy can never silently leave the editor behind.
107
+
108
+ ### 4. Push, then build
109
+
110
+ A build registers the exact commit it was built from, and the endpoint refuses a commit it has not received from GitHub
111
+ yet. Push first, then build the pushed commit; a CI build that starts on push does this for you. A build of a commit the
112
+ endpoint does not have retries for about two and a half minutes and then fails with an error that says the commit
113
+ `is not ingested`. A local `astro build` of an unpushed commit with the token set fails the same way.
114
+
115
+ If you also build pull requests on GitHub Actions, give `actions/checkout` the pull request's own commit
116
+ (`ref: ${{ github.event.pull_request.head.sha || github.sha }}`). By default it checks out a merge commit that GitHub
117
+ makes for the pull request and never pushes, so the endpoint never receives it and the registration fails.
118
+
119
+ A pull-request build deployed somewhere other than `publicBaseUrl`, such as a host's preview deploy, must set
120
+ `publicBaseUrl` to the address that build is served from, for example from your host's deploy-URL variable (a full
121
+ `https://` address). The editor on that branch loads the build's editor files from `publicBaseUrl`, and your production
122
+ site does not serve the files only a pull request's build produced, so the editor would report that the bundle could not
123
+ be loaded or verified.
124
+
125
+ ### 5. Deploy, and serve `/_conloca/*` cross-origin
126
+
127
+ The build writes the editor files under `_conloca/` in its output: `dist/_conloca/` for a static site, or the client
128
+ folder such as `dist/client/_conloca/` for a server-rendered one. Deploy the build the way you already do, to the
129
+ `publicBaseUrl` address.
130
+
131
+ The editor runs on another origin and fetches those files from your site, so every `/_conloca/*` response must be public
132
+ and carry `Access-Control-Allow-Origin: *`. Without the header the editor reports that this build's editor bundle could
133
+ not be loaded or verified, and rebuilding does not help.
134
+
135
+ The build writes that rule to a `_headers` file next to `_conloca/` (`dist/_headers`, or `dist/client/_headers` for a
136
+ server-rendered site): one rule for `/_conloca/*`, plus one for each folder of fonts and images your site styles
137
+ reference.
138
+
139
+ - **Cloudflare Pages and Netlify** apply `_headers` themselves. Nothing else to do.
140
+ - **Everywhere else**, `_headers` is ignored — including a Node server built with `@astrojs/node`, which has no setting
141
+ for headers on static files. Set the header for every path the generated `_headers` lists, in whatever serves the
142
+ site. A site made by `conloca create` is such a Node server: add the header in a proxy in front of it, or switch the
143
+ site to static output (remove `output: 'server'` and the adapter from `astro.config.mjs`) and deploy it to Cloudflare
144
+ Pages or Netlify. With Caddy in front of the Node server:
145
+
146
+ ```caddyfile
147
+ www.example.com {
148
+ header /_conloca/* Access-Control-Allow-Origin *
149
+ reverse_proxy localhost:4321
150
+ }
151
+ ```
152
+
153
+ With nginx in front of it:
154
+
155
+ ```nginx
156
+ location /_conloca/ {
157
+ add_header Access-Control-Allow-Origin * always;
158
+ proxy_pass http://127.0.0.1:4321;
159
+ }
160
+ ```
161
+
162
+ If nginx serves the files itself, keep your `root` or `try_files` lines in that `location` instead of `proxy_pass`. A
163
+ `location` with its own `add_header` drops the ones it would inherit from the `server` block, so repeat any you rely
164
+ on.
165
+
166
+ Check it after the deploy, with the file name from the build log line
167
+ `editor bundle written: /_conloca/editor-bundle.<hash>.js`:
168
+
169
+ ```sh
170
+ curl -sI -H 'Origin: https://cms.example.com' https://www.example.com/_conloca/editor-bundle.<hash>.js
171
+ ```
172
+
173
+ The answer must be `200` and include `access-control-allow-origin: *`. `conloca doctor --live` checks that the file is
174
+ deployed, not this header.
175
+
176
+ ### CI example (GitHub Actions)
177
+
178
+ ```yaml
179
+ # .github/workflows/deploy.yml
180
+ name: Build and deploy
181
+
182
+ on:
183
+ push:
184
+ branches: [main]
185
+
186
+ jobs:
187
+ deploy:
188
+ runs-on: ubuntu-latest
189
+ steps:
190
+ - uses: actions/checkout@v4
191
+ - uses: oven-sh/setup-bun@v2
192
+ - run: bun install --frozen-lockfile
193
+ # The token goes to doctor and the build only, not to install scripts or the deploy.
194
+ - run: bunx @conloca/cli doctor
195
+ env:
196
+ CONLOCA_BUILD_TOKEN: ${{ secrets.CONLOCA_BUILD_TOKEN }}
197
+ - run: bun run build
198
+ env:
199
+ CONLOCA_BUILD_TOKEN: ${{ secrets.CONLOCA_BUILD_TOKEN }}
200
+ # Deploy the build the way you already do.
201
+ ```
202
+
203
+ ### Check it
204
+
205
+ After the deploy finishes, run this in your repository, on the branch you built:
206
+
207
+ ```sh
208
+ CONLOCA_BUILD_TOKEN=cbt_... bunx @conloca/cli doctor --live
209
+ ```
210
+
211
+ `--live` asks the endpoint what it knows about this repository: whether it accepts the token, which commit registered
212
+ the editor for this branch and site and which version of this package built it, and whether that editor bundle is still
213
+ deployed. The token goes only to the `endpoint` in your config. If you did not keep a copy of the token, skip this step
214
+ rather than replacing the token (that stops the CI secret working at once); reloading the editor is enough.
215
+
216
+ Then reload the editor: it opens your site instead of **Connect this site**, and the **Build registration** row under
217
+ **Workspace settings → Build token** turns from **Waiting for Astro build** to **Connected**.
218
+
219
+ ### Troubleshooting
220
+
221
+ - **The build log ends with `editor at … NOT updated by this build`.** Prerequisites were missing, and each `missing:`
222
+ line names one: `public base URL` means `publicBaseUrl` is not set (step 2), `build token` means the
223
+ `CONLOCA_BUILD_TOKEN` secret does not reach the build (step 3). See
224
+ [When registration is skipped](#when-registration-is-skipped).
225
+ - **Doctor says the build token value starts with `"CONLOCA_BUILD_TOKEN="`, or the build fails with
226
+ `registration rejected: HTTP 401` and the secret holds the whole copied line.** Change the value to the part starting
227
+ with `cbt_` and rebuild. The token itself is fine; you do not need a new one.
228
+ - **`registration rejected: HTTP 401` with a `cbt_…` value.** The token was replaced, which invalidates the old one at
229
+ once. Put the new token in the `CONLOCA_BUILD_TOKEN` secret everywhere the site builds, then rebuild.
230
+ - **The build fails with an error that says the commit `is not ingested`.** It built a commit the endpoint has not
231
+ received. Push the commit, then rebuild (step 4).
232
+ - **`registration rejected: HTTP 403` saying the repository is not covered by the workspace's GitHub installation.** Add
233
+ the repository to that installation in your GitHub settings, then rebuild.
234
+ - **The build log shows `registration complete`, but the editor still shows Connect this site.** Wait for the deploy to
235
+ finish, then reload the editor.
236
+ - **The editor says the editor bundle could not be loaded or verified.** `/_conloca/*` lacks the cross-origin header,
237
+ `publicBaseUrl` does not serve this build's files, or the deploy has not finished (step 5).
238
+
239
+ ## Options
240
+
241
+ | Name | Required | Description |
242
+ | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
243
+ | `endpoint` | yes | Editor endpoint, scheme and host only, e.g. `https://cms.example.com`: no path, no trailing slash. URL-shape validated. |
244
+ | `puckConfigPath` | yes | Puck config entry to compile (same option name and value as in `@conloca/astro-cms`). |
245
+ | `publicBaseUrl` | no | Where the deployed site is served; the editor loads the bundle from there. Astro's `site` is not read. Falls back to `CF_PAGES_URL`. |
246
+ | `repoUri` | no | Advanced `owner/repo` override; normally detected from CI or the Git remote. |
247
+ | `siteId` | no | Advanced site-id override for CMS-less builds; sites.json is authoritative. |
248
+ | `buildToken` | no | Build token issued by the endpoint; use the `CONLOCA_BUILD_TOKEN` environment variable instead, so it is never committed. |
249
+ | `siteStyles` | no | Site CSS compiled into the canvas stylesheet, as in `conlocaCMS`. |
250
+ | `editorBundlePlugins` | no | esbuild plugins for the editor bundle, which is built outside Vite: pass e.g. the Typia transform your page schemas need. |
251
+ | `fragmentPreviewRoute` | no | Content route for build-time style discovery, as in `conlocaCMS`. |
252
+ | `previewDomain` | no | Dedicated preview domain. When set, switches to `preview-domain` mode and is used instead of `publicBaseUrl`. |
253
+ | `previewBuild` | no | `PreviewBuildOptions` or `false`. On by default; set `false`, since draft previews on your own deployment are not available yet. |
254
+ | `saasIssuer` | no | Draft previews only. JWT `iss` the preview middleware pins (the endpoint's token issuer). Baked in; else set at runtime. |
255
+ | `requireRegistration` | no | Fail the build when registration is skipped for a missing prerequisite. Recommended in CI once setup is done. |
256
+
257
+ The `conlocaCMS` options `schemasPath` and `mdxComponentFolders` reach the editor at `endpoint` automatically: the CMS
258
+ publishes what it resolved and this integration compiles the schemas and the discovered MDX components into the editor
259
+ bundle each build registers. The `conlocaCMS` options `editorStyles` and `editorCSS` have no effect on the editor at
260
+ `endpoint` (they configure the local dev editor only); `templates` and the `routing` data bindings reach it through the
261
+ same channel as `schemasPath`.
262
+
263
+ ## Public render path
264
+
265
+ Zero runtime overhead in the site's PRODUCTION build — nothing from this package is mounted there. The preview route and
266
+ the preview interceptor exist only inside the generated preview build (below), so production pages render exactly as
267
+ they did before.
268
+
269
+ ## Draft previews
270
+
271
+ Draft previews on your own deployment are not available yet. Keep `previewBuild: false` in your config: the preview
272
+ build stays off, and a build produces only your normal site.
273
+
274
+ ## When registration is skipped
275
+
276
+ A build that lacks a prerequisite — no `CONLOCA_BUILD_TOKEN`, no repository identity, no git sha/branch, or no public
277
+ base URL — completes without registering and ends with one summary block, with a `missing:` line for each prerequisite
278
+ it lacks:
279
+
280
+ ```plain
281
+ [@conloca/cloud-astro] editor at https://cms.example.com NOT updated by this build
282
+ missing: build token (set buildToken or CONLOCA_BUILD_TOKEN)
283
+ consequence: registration was skipped, so the editor keeps serving the previous build of this branch (or the default branch's, or nothing, if neither was ever registered)
284
+ check: conloca doctor --live
285
+ ```
286
+
287
+ Set `requireRegistration: true` in CI to turn that into a build failure. An attempted registration that the endpoint
288
+ rejects always fails the build; there is no switch for that.
289
+
290
+ ## Doctor
291
+
292
+ This package is a `conloca doctor` extension (`conloca.doctor` in package.json): `conloca doctor` in a project that
293
+ depends on it runs this package's checks after the CMS ones, offline by default.
294
+
295
+ | Check | What it verifies |
296
+ | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
297
+ | CC1 | `conlocaCloud(...)` is wired next to `conlocaCMS(...)` (an absent `conlocaCMS` is an error) |
298
+ | CC2 | A build token is available (`CONLOCA_BUILD_TOKEN`; missing = error under CI, info locally) and parses as `cbt_…`, with its own message for a pasted `CONLOCA_BUILD_TOKEN=` prefix (skipped when `conlocaCloud` is not called) |
299
+ | CC3 | `endpoint` is a valid https URL (no trailing slash); `publicBaseUrl`/`previewDomain` when set, or `CF_PAGES_URL` under CI; skipped likewise |
300
+ | CC4 | `conlocaCMS` options the endpoint's editor ignores (`editorStyles`, `editorCSS`) |
301
+ | CC5 | `--live`: the endpoint accepts the token (a 401 means a replaced token — put the new one in the CI secret — or an endpoint without the status route) |
302
+ | CC6 | `--live`: a registration serves this branch and site — own row, inherited from the default branch, or none |
303
+ | CC7 | `--live`: the editor bundle the registration names is still deployed (catches a later deploy deleting it) and how stale it is; it does not check the cross-origin header |
304
+ | CC8 | `previewBuild` is `false`, or the preview build has an SSR adapter (the project's own or `previewBuild.adapter`); a static project with neither is an error, because every build that registers would fail |
305
+
306
+ `conloca doctor --live` sends the build token ONLY to the configured endpoint. When the config computes `endpoint` (for
307
+ example from an environment variable), set `CONLOCA_ENDPOINT` so doctor can read it.
308
+
309
+ The integration also scaffolds a one-page agent skill at `.claude/skills/conloca-cloud/SKILL.md` — in the nearest
310
+ `.claude/` directory between the Astro project and the git root — on any Astro command that loads the config (build,
311
+ dev, sync, check), once, never overwriting an existing file. Repos without a `.claude/` directory get nothing. Projects
312
+ outside a git repository get nothing either. The page is not auto-updated: copy the current one from this package's
313
+ `src/skill/SKILL.md` when it changes.
314
+
315
+ ## Tests
316
+
317
+ ```sh
318
+ nx run cloud-astro:test
319
+ ```
320
+
321
+ Covers option validation, integration shape (which hooks are registered), preview build (spawned binary path + env
322
+ contract), preview middleware (JWT verification, 302/cookie/landing-page paths, banner injection, robots headers),
323
+ preview reader (304 fallback, embedded payloads), and the site middleware's verdict rendering. The `test-packed` target
324
+ installs the packed tarball in an empty project and resolves every export from it there.
325
+
326
+ ## What's NOT in this package
327
+
328
+ - OAuth handshake (redirect, code exchange, refresh rotation) — handled by the endpoint.
329
+ - The token issuer and its JWKS endpoint (served by `endpoint`).
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The commit a registration names and the commit the artifact was built from.
3
+ * They differ only when CI hands over the branch's latest commit
4
+ * (`CF_PAGES_COMMIT_SHA`) while building another commit — a pull request's
5
+ * merge commit — because the endpoint can only serve a commit the branch
6
+ * actually carries.
7
+ */
8
+ export interface RegistrationCommits {
9
+ gitSha: string | undefined;
10
+ buildId: string | undefined;
11
+ }
12
+ /** Resolves which commit the registration names and which commit produced the bundle. */
13
+ export declare function registrationCommits(input: {
14
+ /** The branch's latest commit, as CI hands it over through CF_PAGES_COMMIT_SHA. */
15
+ eventCommitSha: string | undefined;
16
+ /** git rev-parse HEAD in the build checkout. */
17
+ checkoutCommitSha: string | undefined;
18
+ }): RegistrationCommits;
19
+ //# sourceMappingURL=build-commit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-commit.d.ts","sourceRoot":"","sources":["../../src/build-commit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED,yFAAyF;AACzF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,mFAAmF;IACnF,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,gDAAgD;IAChD,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC,GAAG,mBAAmB,CAGtB"}
@@ -0,0 +1,6 @@
1
+ /** Resolves which commit the registration names and which commit produced the bundle. */
2
+ export function registrationCommits(input) {
3
+ const gitSha = input.eventCommitSha ?? input.checkoutCommitSha;
4
+ return { gitSha, buildId: input.checkoutCommitSha ?? gitSha };
5
+ }
6
+ //# sourceMappingURL=build-commit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-commit.js","sourceRoot":"","sources":["../../src/build-commit.ts"],"names":[],"mappings":"AAYA,yFAAyF;AACzF,MAAM,UAAU,mBAAmB,CAAC,KAKnC;IACC,MAAM,MAAM,GAAG,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,iBAAiB,CAAC;IAC/D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,iBAAiB,IAAI,MAAM,EAAE,CAAC;AAChE,CAAC"}
@@ -0,0 +1,181 @@
1
+ import type { TemplateConfig } from '@conloca/astro-cms';
2
+ import type { EditorDataBindings } from '@conloca/content-api';
3
+ import { type Plugin } from 'esbuild';
4
+ import { type UserConfig } from 'vite';
5
+ /**
6
+ * Modules the editor bundle must NEVER contain. The editor (served from
7
+ * `endpoint`) supplies them at runtime so the site's components
8
+ * execute on the editor's own React instance — a second bundled React breaks
9
+ * hooks/context. `@puckeditor/core` is the puck editor package the site's
10
+ * config builds its component definitions against.
11
+ *
12
+ * KEEP IN SYNC with the modules the editor at the endpoint supplies: the two lists
13
+ * are one contract, so every specifier externalized here needs an entry there
14
+ * or the site's bundle fails bare-specifier resolution in the browser. Each side
15
+ * pins the list in its own tests.
16
+ */
17
+ export declare const EDITOR_BUNDLE_EXTERNALS: readonly ['react', 'react-dom', 'react/jsx-runtime', 'react/jsx-dev-runtime', 'react-dom/client', '@puckeditor/core'];
18
+ /**
19
+ * Editor descriptors compiled into the bundle, next to the puck config and
20
+ * the site styles. Sourced from what `conlocaCMS` resolved and published —
21
+ * this package never grows its own option for them.
22
+ */
23
+ export interface EditorBundleDescriptors {
24
+ /**
25
+ * Absolute path of the host's schemas module (conlocaCMS `schemasPath`).
26
+ * Its `pageSchemas` / `dataSchemas` / `mdxComponents` exports are
27
+ * re-exported by the bundle, so the editor at the endpoint reads them off bytes it
28
+ * already hash-verified — no second fetch, no second trust decision.
29
+ */
30
+ schemasPath?: string;
31
+ /**
32
+ * Auto-discovered MDX descriptors (conlocaCMS `mdxComponentFolders`),
33
+ * serialized into the bundle verbatim. Opaque here on purpose: the shape
34
+ * is cms-spa's contract and this package only transports it.
35
+ */
36
+ discoveredMdxComponents?: readonly unknown[];
37
+ /**
38
+ * Page-creation templates (conlocaCMS `templates`), serialized into the
39
+ * bundle verbatim. Typed by the `@conloca/astro-cms` peer, whose
40
+ * `readEditorDescriptors` produced the value this package transports.
41
+ */
42
+ templates?: Record<string, TemplateConfig>;
43
+ /**
44
+ * The routing data bindings (conlocaCMS `routing`), serialized into the
45
+ * bundle verbatim, so the editor at the endpoint builds each page's data context from
46
+ * the same routes the published page resolves with.
47
+ */
48
+ dataBindings?: EditorDataBindings;
49
+ }
50
+ export interface BundleEditorAssetsInput {
51
+ /** Build output directory (Astro's `dir`, as a filesystem path). */
52
+ dir: string;
53
+ /** The Astro project root, as a filesystem path: siteStyles resolve against it. */
54
+ root: string;
55
+ /** The site's own Vite config (Astro's `config.vite`), which compiles siteStyles. */
56
+ vite: UserConfig;
57
+ /** Entry module of the site's puck config (same option name as @conloca/astro-cms). */
58
+ puckConfigPath: string;
59
+ /**
60
+ * Site CSS for accurate preview rendering (the `siteStyles` option),
61
+ * compiled by the site's own Vite pipeline into the same registered
62
+ * stylesheet AHEAD of the component modules, so component rules keep the
63
+ * final word.
64
+ */
65
+ siteStyles?: string | string[];
66
+ /**
67
+ * Public origin the deployed site answers on (the `publicBaseUrl` option).
68
+ * Root-relative asset URLs in the registered stylesheet are absolutized
69
+ * against it, since that stylesheet is applied inside the editor's canvas
70
+ * rather than on the site. Omitted: URLs stay as authored.
71
+ */
72
+ publicBaseUrl?: string;
73
+ /**
74
+ * Editor descriptors published by conlocaCMS for this build. Absent for a
75
+ * CMS-less build, or when there is nothing to carry (no schemas module,
76
+ * discoverable MDX component, page template or data binding) — in which case
77
+ * the emitted bytes are identical to a pre-descriptor build (no gratuitous
78
+ * hash churn).
79
+ */
80
+ descriptors?: EditorBundleDescriptors;
81
+ /**
82
+ * Extra esbuild plugins for the editor bundle (the `editorBundlePlugins`
83
+ * option), run after the built-in stylesheet compiler: the site's own Vite
84
+ * plugins never see this graph, so a source transform the schemas module or
85
+ * a component needs (e.g. Typia's) has to be supplied in esbuild form.
86
+ */
87
+ plugins?: Plugin[];
88
+ logger: {
89
+ info(message: string): void;
90
+ warn(message: string): void;
91
+ };
92
+ }
93
+ export interface BundledStylesheet {
94
+ /** Site-relative URL of the emitted stylesheet, e.g. `/_conloca/editor-bundle.<hash16>.css`. */
95
+ url: string;
96
+ /** FULL sha-256 hex of the stylesheet bytes — the editor hash-verifies against this. */
97
+ hash: string;
98
+ /** The emitted stylesheet bytes. */
99
+ bytes: Uint8Array;
100
+ }
101
+ export interface BundleEditorAssetsResult {
102
+ /** Site-relative URL of the emitted bundle, e.g. `/_conloca/editor-bundle.<hash16>.js`. */
103
+ url: string;
104
+ /** FULL sha-256 hex of the bundle bytes — the editor hash-verifies against this. */
105
+ hash: string;
106
+ /** The emitted bundle bytes. */
107
+ bytes: Uint8Array;
108
+ /**
109
+ * Companion stylesheet for the editing canvas (styled canvas):
110
+ * any siteStyles, then the config graph's compiled CSS/SCSS modules.
111
+ * Absent when neither carries styles.
112
+ */
113
+ stylesheet?: BundledStylesheet;
114
+ /**
115
+ * `_headers` paths granted CORS for the stylesheet's own assets, so the
116
+ * mirrored asset set (a deployment that serves the site and the preview from
117
+ * one Cloudflare Worker) can be given the same rules.
118
+ */
119
+ assetCorsPaths: string[];
120
+ }
121
+ /**
122
+ * Bundles the site's puck config into a browser ESM file plus (when the
123
+ * graph carries styles) a companion stylesheet, both under `<dir>/_conloca/`,
124
+ * content-addressed by the first 16 hex chars of their sha-256, and ensures
125
+ * `<dir>/_headers` carries the CORS rule the editor needs to load them
126
+ * cross-origin.
127
+ *
128
+ * The siteStyles compile first, through the site's own Vite pipeline (see
129
+ * `compileSiteStyles`); one that fails to compile fails the build.
130
+ *
131
+ * Component styles compile in the SAME esbuild pass as the JS: CSS-module
132
+ * class names are hashed consistently across both outputs, so `styles.foo` in
133
+ * a component always matches a selector in the emitted stylesheet. SCSS
134
+ * compiles through `sass`; a component stylesheet that fails to compile is
135
+ * stripped with a warning instead of failing the build (one broken component
136
+ * stylesheet must not cost the site its registration).
137
+ */
138
+ export declare function bundleEditorAssets(input: BundleEditorAssetsInput): Promise<BundleEditorAssetsResult>;
139
+ /**
140
+ * Re-points the registered stylesheet's asset references at the deployed site.
141
+ *
142
+ * Only ROOT-relative URLs (`/fonts/x.otf`) are rewritten — those name a path
143
+ * on the site and nothing else. That includes the `/_conloca/` assets the
144
+ * siteStyles build emitted, since Vite resolves their relative references.
145
+ * Path-relative ones (`./x.otf`, `../x.otf`, `x.otf`) cannot be resolved here
146
+ * and are reported instead of guessed: esbuild flattens every component
147
+ * stylesheet into ONE output and copies url() paths through verbatim, so by
148
+ * this point the emitted text no longer records WHICH source directory each
149
+ * one was relative to. Absolute, protocol-relative, `data:` and fragment
150
+ * (`#filter`) refs already resolve correctly and are left alone.
151
+ *
152
+ * Returns the rewritten CSS plus the `_headers` globs its assets need — one
153
+ * per distinct directory rather than one per file, which keeps a font family
154
+ * of forty weights to a single rule.
155
+ */
156
+ export declare function rewriteStylesheetAssetUrls(css: string, publicBaseUrl: string, logger: BundleEditorAssetsInput['logger']): {
157
+ css: string;
158
+ assetCorsPaths: string[];
159
+ };
160
+ /**
161
+ * Writes the discovery route's collected CSS as a content-addressed artifact
162
+ * next to the editor bundle: `_conloca/route-css.<hash16>.css`.
163
+ * Same serving story as the editor stylesheet — the `/_conloca/*` CORS rule
164
+ * already covers it, and `mirrorEditorAssets` copies the whole dir.
165
+ */
166
+ export declare function emitRouteCssArtifact(dir: string, css: string, publicBaseUrl: string | undefined, logger: BundleEditorAssetsInput['logger']): Promise<{
167
+ stylesheet: BundledStylesheet;
168
+ assetCorsPaths: string[];
169
+ } | undefined>;
170
+ /**
171
+ * Mirrors the emitted editor assets (`_conloca/` + the CORS rule) from the
172
+ * primary build's output into another asset directory — the recursive preview
173
+ * build's client dir. The bundle is only ever compiled into the PRIMARY
174
+ * build's dist (the child build short-circuits `astro:build:done` to avoid
175
+ * registration recursion), but in a deployment that serves the site and the
176
+ * preview from one Cloudflare Worker, the child's client dir is the asset set
177
+ * that actually serves the site, so without this mirror the editor at the
178
+ * endpoint cannot load its component bundle.
179
+ */
180
+ export declare function mirrorEditorAssets(fromDir: string, toDir: string, assetCorsPaths?: string[]): Promise<void>;
181
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/bundle.ts"],"names":[],"mappings":"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"}