@conloca/cloud-astro 0.2.2 → 0.2.3

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 (176) hide show
  1. package/README.md +261 -208
  2. package/dist/.build-inputs.json +60 -0
  3. package/dist/src/component-manifest.d.ts +5 -3
  4. package/dist/src/component-manifest.d.ts.map +1 -1
  5. package/dist/src/component-manifest.js +7 -7
  6. package/dist/src/component-manifest.js.map +1 -1
  7. package/dist/src/constants.d.ts +5 -13
  8. package/dist/src/constants.d.ts.map +1 -1
  9. package/dist/src/constants.js +5 -13
  10. package/dist/src/constants.js.map +1 -1
  11. package/dist/src/descriptors.d.ts +2 -2
  12. package/dist/src/descriptors.d.ts.map +1 -1
  13. package/dist/src/doctor/checks-address.d.ts +18 -0
  14. package/dist/src/doctor/checks-address.d.ts.map +1 -0
  15. package/dist/src/doctor/checks-address.js +163 -0
  16. package/dist/src/doctor/checks-address.js.map +1 -0
  17. package/dist/src/doctor/checks-live.d.ts +8 -5
  18. package/dist/src/doctor/checks-live.d.ts.map +1 -1
  19. package/dist/src/doctor/checks-live.js +220 -188
  20. package/dist/src/doctor/checks-live.js.map +1 -1
  21. package/dist/src/doctor/checks-offline.d.ts +8 -23
  22. package/dist/src/doctor/checks-offline.d.ts.map +1 -1
  23. package/dist/src/doctor/checks-offline.js +22 -239
  24. package/dist/src/doctor/checks-offline.js.map +1 -1
  25. package/dist/src/doctor/config-scan.d.ts +6 -3
  26. package/dist/src/doctor/config-scan.d.ts.map +1 -1
  27. package/dist/src/doctor/config-scan.js +21 -11
  28. package/dist/src/doctor/config-scan.js.map +1 -1
  29. package/dist/src/doctor/run.d.ts.map +1 -1
  30. package/dist/src/doctor/run.js +12 -10
  31. package/dist/src/doctor/run.js.map +1 -1
  32. package/dist/src/doctor/types.d.ts +7 -7
  33. package/dist/src/doctor/types.d.ts.map +1 -1
  34. package/dist/src/doctor/types.js +7 -7
  35. package/dist/src/doctor/types.js.map +1 -1
  36. package/dist/src/editor-page/bundle.d.ts +88 -0
  37. package/dist/src/editor-page/bundle.d.ts.map +1 -0
  38. package/dist/src/editor-page/bundle.js +370 -0
  39. package/dist/src/editor-page/bundle.js.map +1 -0
  40. package/dist/src/editor-page/emit.d.ts +33 -0
  41. package/dist/src/editor-page/emit.d.ts.map +1 -0
  42. package/dist/src/editor-page/emit.js +183 -0
  43. package/dist/src/editor-page/emit.js.map +1 -0
  44. package/dist/src/editor-page/framing.d.ts +23 -0
  45. package/dist/src/editor-page/framing.d.ts.map +1 -0
  46. package/dist/src/editor-page/framing.js +39 -0
  47. package/dist/src/editor-page/framing.js.map +1 -0
  48. package/dist/src/editor-page/page.d.ts +9 -0
  49. package/dist/src/editor-page/page.d.ts.map +1 -0
  50. package/dist/src/editor-page/page.js +31 -0
  51. package/dist/src/editor-page/page.js.map +1 -0
  52. package/dist/src/editor-page/site-base.d.ts +4 -0
  53. package/dist/src/editor-page/site-base.d.ts.map +1 -0
  54. package/dist/src/editor-page/site-base.js +13 -0
  55. package/dist/src/editor-page/site-base.js.map +1 -0
  56. package/dist/src/git.d.ts +11 -8
  57. package/dist/src/git.d.ts.map +1 -1
  58. package/dist/src/git.js +25 -8
  59. package/dist/src/git.js.map +1 -1
  60. package/dist/src/index.d.ts +3 -1
  61. package/dist/src/index.d.ts.map +1 -1
  62. package/dist/src/index.js +9 -6
  63. package/dist/src/index.js.map +1 -1
  64. package/dist/src/integration.d.ts +1 -1
  65. package/dist/src/integration.d.ts.map +1 -1
  66. package/dist/src/integration.js +245 -408
  67. package/dist/src/integration.js.map +1 -1
  68. package/dist/src/node.d.ts +3 -1
  69. package/dist/src/node.d.ts.map +1 -1
  70. package/dist/src/node.js +7 -2
  71. package/dist/src/node.js.map +1 -1
  72. package/dist/src/preview/_resolve-opts.d.ts +16 -10
  73. package/dist/src/preview/_resolve-opts.d.ts.map +1 -1
  74. package/dist/src/preview/_resolve-opts.js +21 -10
  75. package/dist/src/preview/_resolve-opts.js.map +1 -1
  76. package/dist/src/preview/banner.d.ts.map +1 -1
  77. package/dist/src/preview/banner.js +2 -4
  78. package/dist/src/preview/banner.js.map +1 -1
  79. package/dist/src/preview/cookie.d.ts +5 -2
  80. package/dist/src/preview/cookie.d.ts.map +1 -1
  81. package/dist/src/preview/cookie.js +5 -2
  82. package/dist/src/preview/cookie.js.map +1 -1
  83. package/dist/src/preview/label.d.ts +8 -0
  84. package/dist/src/preview/label.d.ts.map +1 -0
  85. package/dist/src/preview/label.js +14 -0
  86. package/dist/src/preview/label.js.map +1 -0
  87. package/dist/src/preview/landing.d.ts +2 -2
  88. package/dist/src/preview/landing.js +2 -2
  89. package/dist/src/preview/middleware.d.ts +25 -20
  90. package/dist/src/preview/middleware.d.ts.map +1 -1
  91. package/dist/src/preview/middleware.js +56 -51
  92. package/dist/src/preview/middleware.js.map +1 -1
  93. package/dist/src/preview/preview-path.d.ts +18 -5
  94. package/dist/src/preview/preview-path.d.ts.map +1 -1
  95. package/dist/src/preview/preview-path.js +24 -8
  96. package/dist/src/preview/preview-path.js.map +1 -1
  97. package/dist/src/preview/site-middleware.d.ts +5 -5
  98. package/dist/src/preview/site-middleware.d.ts.map +1 -1
  99. package/dist/src/preview/site-middleware.js +16 -16
  100. package/dist/src/preview/site-middleware.js.map +1 -1
  101. package/dist/src/preview-build.d.ts +18 -15
  102. package/dist/src/preview-build.d.ts.map +1 -1
  103. package/dist/src/preview-build.js +36 -21
  104. package/dist/src/preview-build.js.map +1 -1
  105. package/dist/src/preview.d.ts +1 -1
  106. package/dist/src/preview.d.ts.map +1 -1
  107. package/dist/src/preview.js +1 -1
  108. package/dist/src/preview.js.map +1 -1
  109. package/dist/src/repository.d.ts +1 -1
  110. package/dist/src/repository.js +1 -1
  111. package/dist/src/resolve-options.d.ts +17 -0
  112. package/dist/src/resolve-options.d.ts.map +1 -0
  113. package/dist/src/resolve-options.js +21 -0
  114. package/dist/src/resolve-options.js.map +1 -0
  115. package/dist/src/site-id.d.ts +0 -2
  116. package/dist/src/site-id.d.ts.map +1 -1
  117. package/dist/src/site-id.js +2 -3
  118. package/dist/src/site-id.js.map +1 -1
  119. package/dist/src/types.d.ts +21 -69
  120. package/dist/src/types.d.ts.map +1 -1
  121. package/package.json +37 -13
  122. package/src/component-manifest.ts +11 -8
  123. package/src/constants.ts +5 -14
  124. package/src/descriptors.ts +2 -2
  125. package/src/doctor/checks-address.ts +190 -0
  126. package/src/doctor/checks-live.ts +256 -268
  127. package/src/doctor/checks-offline.ts +24 -262
  128. package/src/doctor/config-scan.ts +21 -9
  129. package/src/doctor/run.ts +14 -16
  130. package/src/doctor/types.ts +7 -7
  131. package/src/editor-page/bundle.ts +482 -0
  132. package/src/editor-page/emit.ts +246 -0
  133. package/src/editor-page/framing.ts +62 -0
  134. package/src/editor-page/page.ts +37 -0
  135. package/src/editor-page/site-base.ts +11 -0
  136. package/src/git.ts +29 -10
  137. package/src/index.ts +20 -6
  138. package/src/integration.ts +255 -461
  139. package/src/node.ts +18 -2
  140. package/src/preview/_resolve-opts.ts +29 -11
  141. package/src/preview/banner.ts +2 -4
  142. package/src/preview/cookie.ts +5 -2
  143. package/src/preview/label.ts +12 -0
  144. package/src/preview/landing.ts +2 -2
  145. package/src/preview/middleware.ts +77 -66
  146. package/src/preview/preview-path.ts +26 -8
  147. package/src/preview/site-middleware.ts +16 -21
  148. package/src/preview-build.ts +42 -26
  149. package/src/preview-handler.astro +10 -8
  150. package/src/preview.ts +0 -1
  151. package/src/repository.ts +1 -1
  152. package/src/resolve-options.ts +37 -0
  153. package/src/site-id.ts +2 -4
  154. package/src/skill/SKILL.md +51 -55
  155. package/src/types.ts +21 -70
  156. package/src/virtual-modules.d.ts +4 -1
  157. package/dist/src/build-commit.d.ts +0 -19
  158. package/dist/src/build-commit.d.ts.map +0 -1
  159. package/dist/src/build-commit.js +0 -6
  160. package/dist/src/build-commit.js.map +0 -1
  161. package/dist/src/bundle.d.ts +0 -181
  162. package/dist/src/bundle.d.ts.map +0 -1
  163. package/dist/src/bundle.js +0 -413
  164. package/dist/src/bundle.js.map +0 -1
  165. package/dist/src/discovery.d.ts +0 -58
  166. package/dist/src/discovery.d.ts.map +0 -1
  167. package/dist/src/discovery.js +0 -133
  168. package/dist/src/discovery.js.map +0 -1
  169. package/dist/src/register.d.ts +0 -98
  170. package/dist/src/register.d.ts.map +0 -1
  171. package/dist/src/register.js +0 -103
  172. package/dist/src/register.js.map +0 -1
  173. package/src/build-commit.ts +0 -22
  174. package/src/bundle.ts +0 -570
  175. package/src/discovery.ts +0 -183
  176. package/src/register.ts +0 -180
@@ -1,22 +1,42 @@
1
1
  import { spawn } from 'node:child_process';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
- import { PACKAGE_NAME, PREVIEW_BUILD_ENV_FLAG, PREVIEW_SECRET_ENV_FLAG } from './constants.js';
5
- export { PREVIEW_SECRET_ENV_FLAG };
4
+ import { PACKAGE_NAME, PREVIEW_BUILD_ENV_FLAG, REFUSED_PREVIEW_ADAPTERS } from './constants.js';
5
+ /**
6
+ * Whether the recursive preview build runs: only when `previewBuild` is given
7
+ * as an object (strict opt-in, so a plain deploy never gets a second build),
8
+ * and then only with an SSR adapter that is not refused. Throws for a refused
9
+ * adapter or a missing one, so the build fails before it deploys anything.
10
+ */
11
+ export function previewBuildMode(previewBuild, adapterName) {
12
+ if (!previewBuild)
13
+ return 'off';
14
+ if (adapterName === undefined) {
15
+ throw new Error(`${PACKAGE_NAME}: the preview build needs an SSR adapter — the project is static and ` +
16
+ 'previewBuild.adapter is not set. Pass one (e.g. previewBuild: { adapter: cloudflare() }) ' +
17
+ 'or remove previewBuild.');
18
+ }
19
+ if (REFUSED_PREVIEW_ADAPTERS.includes(adapterName)) {
20
+ throw new Error(`${PACKAGE_NAME}: previewBuild is not supported with ${adapterName} yet: that adapter writes its deployable ` +
21
+ 'output at the project root, so the preview build could replace the live site. ' +
22
+ 'Remove previewBuild from conlocaCloud(...).');
23
+ }
24
+ return 'on';
25
+ }
6
26
  /**
7
27
  * Pure constructor for the child-process environment passed to the recursive
8
- * preview build. Extracted so tests can verify the contract (env flag + secret
9
- * + parent-env inheritance) without spinning up a child process — and so the
28
+ * preview build. Extracted so tests can verify the contract (env flag +
29
+ * parent-env inheritance) without spinning up a child process — and so the
10
30
  * real-process smoke test can call it the same way the integration does.
11
31
  *
12
32
  * Inherits the parent environment so PATH, credentials, and any host-specific
13
- * build vars (CF_PAGES_*, GITHUB_*) reach the child.
33
+ * build vars (CF_PAGES_*, WORKERS_CI_*, GITHUB_*) reach the child, which reads
34
+ * the branch and commit it serves from them.
14
35
  */
15
- export function buildPreviewChildEnv(parentEnv, previewSecret) {
36
+ export function buildPreviewChildEnv(parentEnv) {
16
37
  return {
17
38
  ...parentEnv,
18
39
  [PREVIEW_BUILD_ENV_FLAG]: '1',
19
- [PREVIEW_SECRET_ENV_FLAG]: previewSecret,
20
40
  };
21
41
  }
22
42
  /**
@@ -47,13 +67,10 @@ export function resolveAstroBin(cwd = process.cwd()) {
47
67
  * Spawns the recursive preview `astro build` from the primary build's
48
68
  * `astro:build:done` hook.
49
69
  *
50
- * The child process inherits the parent environment and additionally receives:
51
- * - {@link PREVIEW_BUILD_ENV_FLAG} set to `'1'` so the integration's own
52
- * `astro:build:done` short-circuits inside the child (recursion guard
53
- * contract).
54
- * - {@link PREVIEW_SECRET_ENV_FLAG} set to the per-branch secret so the
55
- * child's `astro:config:setup` can inject the literal secret-scoped
56
- * preview route (`/conloca_preview_${SECRET}/[...path]`).
70
+ * The child process inherits the parent environment and additionally receives
71
+ * {@link PREVIEW_BUILD_ENV_FLAG} set to `'1'`: the child's `astro:config:setup`
72
+ * mounts the preview route on it, and its `astro:build:done` short-circuits
73
+ * on it (recursion guard contract).
57
74
  *
58
75
  * If this function is itself called from within a recursive build (i.e. the
59
76
  * env flag is already set to `'1'`), it returns immediately without spawning,
@@ -64,8 +81,8 @@ export function resolveAstroBin(cwd = process.cwd()) {
64
81
  * - `false` → resolves and logs a warning so onboarding setups can continue
65
82
  * when the preview build is not yet wired correctly.
66
83
  */
67
- export async function spawnPreviewBuild(previewSecret, opts) {
68
- await _spawnPreviewBuildWith(spawn, previewSecret, opts);
84
+ export async function spawnPreviewBuild(opts) {
85
+ await _spawnPreviewBuildWith(spawn, opts);
69
86
  }
70
87
  /**
71
88
  * Internal seam that takes the spawn function as a parameter so tests can
@@ -75,20 +92,18 @@ export async function spawnPreviewBuild(previewSecret, opts) {
75
92
  * and not part of the package's public surface; it is not re-exported from
76
93
  * `src/index.ts` or `src/node.ts`.
77
94
  */
78
- export async function _spawnPreviewBuildWith(spawnFn, previewSecret, opts) {
95
+ // oxlint-disable-next-line no-underscore-dangle -- the internal test seam.
96
+ export async function _spawnPreviewBuildWith(spawnFn, opts) {
79
97
  // Recursion guard: bail out before doing any work if we're already inside
80
98
  // a recursive preview build. This matches the short-circuit in the
81
99
  // integration's `astro:build:done` hook.
82
100
  if (process.env[PREVIEW_BUILD_ENV_FLAG] === '1') {
83
101
  return;
84
102
  }
85
- if (!previewSecret) {
86
- throw new Error(`${PACKAGE_NAME}: preview secret is required to spawn the preview build`);
87
- }
88
103
  const required = opts.required ?? true;
89
104
  const astroBin = resolveAstroBin();
90
105
  const child = spawnFn(astroBin, ['build'], {
91
- env: buildPreviewChildEnv(process.env, previewSecret),
106
+ env: buildPreviewChildEnv(process.env),
92
107
  stdio: 'inherit',
93
108
  });
94
109
  await new Promise((resolve, reject) => {
@@ -1 +1 @@
1
- {"version":3,"file":"preview-build.js","sourceRoot":"","sources":["../../src/preview-build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAG/F,OAAO,EAAE,uBAAuB,EAAE,CAAC;A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AI,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;YACzD,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,YAAY,2BAA2B,MAAM,GAAG,CAAC,CAAC,CAAC;gBACvE,OAAO;YACT,CAAC;YACD,mEAAmE;YACnE,wEAAwE;YACxE,kEAAkE;YAClE,wDAAwD;YACxD,qEAAqE;YACrE,OAAO,CAAC,IAAI,CAAC,GAAG,YAAY,2BAA2B,MAAM,4CAA4C,CAAC,CAAC;YAC3G,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -2,5 +2,5 @@ export { getBannerScriptText, injectPreviewBanner } from './preview/banner.js';
2
2
  export { embeddedKey, PreviewContentAPI, type PreviewContentAPIOptions, } from './preview/content-api.js';
3
3
  export { applyPreviewHeaders } from './preview/headers.js';
4
4
  export { renderNoPreviewLanding } from './preview/landing.js';
5
- export { handlePreviewRequest, type PreviewContext, type PreviewMiddlewareOptions, type PreviewVerdict, previewParamName, } from './preview/middleware.js';
5
+ export { handlePreviewRequest, type PreviewContext, type PreviewMiddlewareOptions, type PreviewVerdict, } from './preview/middleware.js';
6
6
  //# sourceMappingURL=preview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/preview.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/preview.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,GACpB,MAAM,yBAAyB,CAAC"}
@@ -8,5 +8,5 @@ export { getBannerScriptText, injectPreviewBanner } from './preview/banner.js';
8
8
  export { embeddedKey, PreviewContentAPI, } from './preview/content-api.js';
9
9
  export { applyPreviewHeaders } from './preview/headers.js';
10
10
  export { renderNoPreviewLanding } from './preview/landing.js';
11
- export { handlePreviewRequest, previewParamName, } from './preview/middleware.js';
11
+ export { handlePreviewRequest, } from './preview/middleware.js';
12
12
  //# sourceMappingURL=preview.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"preview.js","sourceRoot":"","sources":["../../src/preview.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,EAAE;AACF,0EAA0E;AAC1E,oEAAoE;AACpE,6EAA6E;AAC7E,6DAA6D;AAE7D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,WAAW,EACX,iBAAiB,GAElB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EAIpB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"preview.js","sourceRoot":"","sources":["../../src/preview.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,EAAE;AACF,0EAA0E;AAC1E,oEAAoE;AACpE,6EAA6E;AAC7E,6DAA6D;AAE7D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACL,WAAW,EACX,iBAAiB,GAElB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EACL,oBAAoB,GAIrB,MAAM,yBAAyB,CAAC"}
@@ -9,7 +9,7 @@ export interface DetectRepositoryUriInput {
9
9
  }
10
10
  /**
11
11
  * Normalize a provider full_name or common Git remote into `owner/repo`.
12
- * Deliberately rejects local paths and nested groups: a registration names
12
+ * Deliberately rejects local paths and nested groups: the editor page names
13
13
  * its repository GitHub-style, as two segments.
14
14
  */
15
15
  export declare function normalizeRepositoryUri(input: string | undefined): string | undefined;
@@ -1,7 +1,7 @@
1
1
  const REPO_SEGMENT = /^[A-Za-z0-9_.-]+$/;
2
2
  /**
3
3
  * Normalize a provider full_name or common Git remote into `owner/repo`.
4
- * Deliberately rejects local paths and nested groups: a registration names
4
+ * Deliberately rejects local paths and nested groups: the editor page names
5
5
  * its repository GitHub-style, as two segments.
6
6
  */
7
7
  export function normalizeRepositoryUri(input) {
@@ -0,0 +1,17 @@
1
+ import type { EditorDescriptorChannel } from '@conloca/astro-cms/node';
2
+ import type { ConlocaCloudOptions } from './types.js';
3
+ /** The editor options `conlocaCMS` already holds, settled for this build. */
4
+ export interface InheritedOptions {
5
+ puckConfigPath: string;
6
+ siteStyles?: string[];
7
+ editorStyles?: string[];
8
+ editorCss?: string;
9
+ }
10
+ /**
11
+ * Each option given to `conlocaCloud()` wins; the channel `conlocaCMS`
12
+ * published fills the rest. `editorStyles` and `editorCss` come from the
13
+ * channel only. Only `puckConfigPath` is mandatory: without it there is no
14
+ * editor to build.
15
+ */
16
+ export declare function resolveInheritedOptions(options: Pick<ConlocaCloudOptions, 'puckConfigPath' | 'siteStyles'>, channel: Pick<EditorDescriptorChannel, 'puckConfigPath' | 'siteStyles' | 'editorStyles' | 'editorCSS'> | undefined): InheritedOptions;
17
+ //# sourceMappingURL=resolve-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-options.d.ts","sourceRoot":"","sources":["../../src/resolve-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,gBAAgB,GAAG,YAAY,CAAC,EACnE,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,gBAAgB,GAAG,YAAY,GAAG,cAAc,GAAG,WAAW,CAAC,GAAG,SAAS,GACjH,gBAAgB,CAelB"}
@@ -0,0 +1,21 @@
1
+ import { PACKAGE_NAME } from './constants.js';
2
+ /**
3
+ * Each option given to `conlocaCloud()` wins; the channel `conlocaCMS`
4
+ * published fills the rest. `editorStyles` and `editorCss` come from the
5
+ * channel only. Only `puckConfigPath` is mandatory: without it there is no
6
+ * editor to build.
7
+ */
8
+ export function resolveInheritedOptions(options, channel) {
9
+ const puckConfigPath = options.puckConfigPath ?? channel?.puckConfigPath;
10
+ if (!puckConfigPath) {
11
+ throw new Error(`${PACKAGE_NAME}: puckConfigPath is required: add it to conlocaCloud(), or add conlocaCMS() to this site's integrations`);
12
+ }
13
+ const siteStyles = typeof options.siteStyles === 'string' ? [options.siteStyles] : (options.siteStyles ?? channel?.siteStyles);
14
+ return {
15
+ puckConfigPath,
16
+ ...(siteStyles === undefined ? {} : { siteStyles }),
17
+ ...(channel?.editorStyles === undefined ? {} : { editorStyles: channel.editorStyles }),
18
+ ...(channel?.editorCSS === undefined ? {} : { editorCss: channel.editorCSS }),
19
+ };
20
+ }
21
+ //# sourceMappingURL=resolve-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-options.js","sourceRoot":"","sources":["../../src/resolve-options.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAW9C;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAAmE,EACnE,OAAkH;IAElH,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,OAAO,EAAE,cAAc,CAAC;IACzE,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CACb,GAAG,YAAY,yGAAyG,CACzH,CAAC;IACJ,CAAC;IACD,MAAM,UAAU,GACd,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,IAAI,OAAO,EAAE,UAAU,CAAC,CAAC;IAC9G,OAAO;QACL,cAAc;QACd,GAAG,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC;QACnD,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;QACtF,GAAG,CAAC,OAAO,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC;KAC9E,CAAC;AACJ,CAAC"}
@@ -1,5 +1,3 @@
1
- /** The site-id grammar: lowercase alphanumerics and dashes, 1-64 chars, alphanumeric first. */
2
- export declare const SITE_ID_RE: RegExp;
3
1
  /**
4
2
  * Resolve the build's deployable-site id. STRICT: malformed input fails the
5
3
  * build — a silent mis-attach is the same "deployed, but the editor points at
@@ -1 +1 @@
1
- {"version":3,"file":"site-id.d.ts","sourceRoot":"","sources":["../../src/site-id.ts"],"names":[],"mappings":"AAIA,+FAA+F;AAC/F,eAAO,MAAM,UAAU,QAA8B,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,mFAAmF;IACnF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC,GAAG,MAAM,CA0DT"}
1
+ {"version":3,"file":"site-id.d.ts","sourceRoot":"","sources":["../../src/site-id.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,mFAAmF;IACnF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC,GAAG,MAAM,CA0DT"}
@@ -1,8 +1,7 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
+ import { SITE_ID_RE } from '@conloca/content-api/editor-host';
3
4
  import { PACKAGE_NAME } from './constants.js';
4
- /** The site-id grammar: lowercase alphanumerics and dashes, 1-64 chars, alphanumeric first. */
5
- export const SITE_ID_RE = /^[a-z0-9][a-z0-9-]{0,63}$/;
6
5
  /**
7
6
  * Resolve the build's deployable-site id. STRICT: malformed input fails the
8
7
  * build — a silent mis-attach is the same "deployed, but the editor points at
@@ -42,7 +41,7 @@ export function resolveBuildSiteId(opts) {
42
41
  record.sites === null ||
43
42
  typeof record.sites !== 'object' ||
44
43
  Array.isArray(record.sites)) {
45
- throw new Error(`${PACKAGE_NAME}: ${path} has no "sites" object — refusing to register a broken content model`);
44
+ throw new Error(`${PACKAGE_NAME}: ${path} has no "sites" object — refusing to build on a broken content model`);
46
45
  }
47
46
  let resolved;
48
47
  if ('siteId' in record) {
@@ -1 +1 @@
1
- {"version":3,"file":"site-id.js","sourceRoot":"","sources":["../../src/site-id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,+FAA+F;AAC/F,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAOlC;IACC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;IAEvE,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,EAAE,EAAE,CAAC;QAC9D,qEAAqE;QACrE,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,IAAI,KAAK,CACb,GAAG,YAAY,8DAA8D;gBAC3E,iEAAiE,CACpE,CAAC;QACJ,CAAC;QACD,UAAU,CAAC,IAAI,CAAC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AC;YACzE,MAAM,IAAI,KAAK,CAAC,GAAG,YAAY,iCAAiC,IAAI,UAAU,UAAU,GAAG,CAAC,CAAC;QAC/F,CAAC;QACD,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3B,CAAC;SAAM,CAAC;QACN,QAAQ,GAAG,SAAS,CAAC,CAAC,sDAAsD;IAC9E,CAAC;IAED,6EAA6E;IAC7E,6EAA6E;IAC7E,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CACb,GAAG,YAAY,sBAAsB,IAAI,CAAC,QAAQ,iBAAiB,IAAI,eAAe,QAAQ,OAAO;YACnG,uCAAuC,CAC1C,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,GAAG,YAAY,KAAK,KAAK,KAAK,KAAK,+BAA+B,UAAU,GAAG,CAAC,CAAC;IACnG,CAAC;AACH,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import type { AstroIntegration } from 'astro';
2
- import type { Plugin as EsbuildPlugin } from 'esbuild';
3
2
  /**
4
3
  * Configuration for a recursive preview build that runs immediately after the
5
4
  * site's production build completes. The preview build emits the SSR routes
6
5
  * that serve draft preview.
7
6
  *
8
- * Set to `false` to explicitly opt out of preview builds for sites that do not
9
- * need a draft/preview pipeline.
7
+ * Off unless given as an object: the second build that serves draft previews.
8
+ * It needs an SSR adapter (the project's own or `adapter` here) and is refused
9
+ * under `@astrojs/vercel` and `@astrojs/netlify`.
10
10
  */
11
11
  export interface PreviewBuildOptions {
12
12
  /**
@@ -20,8 +20,8 @@ export interface PreviewBuildOptions {
20
20
  config?: Record<string, unknown>;
21
21
  /**
22
22
  * Output directory for the preview build. Defaults to `.conloca/preview-server`
23
- * — outside `dist/`, so the secret-baked artifact can never ride a wholesale
24
- * static upload of the site and Astro's dist-clearing cannot wipe it.
23
+ * — outside `dist/`, so the preview server can never ride a wholesale static
24
+ * upload of the site and Astro's dist-clearing cannot wipe it.
25
25
  */
26
26
  outDir?: string;
27
27
  /**
@@ -31,20 +31,20 @@ export interface PreviewBuildOptions {
31
31
  required?: boolean;
32
32
  }
33
33
  /**
34
- * Options accepted by {@link conlocaCloud}.
35
- *
36
- * Registration authenticates with one build token (`cbt_<id>.<secret>`)
37
- * issued by the endpoint. Repository identity is normally detected from CI metadata or the Git
38
- * checkout.
34
+ * Options accepted by {@link conlocaCloud}. Every one is optional: repository
35
+ * identity is normally detected from CI metadata or the Git checkout, and the
36
+ * editor options come from `conlocaCMS`.
39
37
  */
40
38
  export interface ConlocaCloudOptions {
41
- /** Editor endpoint, e.g. 'https://cms.example.com', no trailing slash. */
42
- endpoint: string;
39
+ /**
40
+ * The workspace editor's address, no trailing slash. Defaults to
41
+ * 'https://app.conloca.com'. Its host must start with `app.`.
42
+ */
43
+ endpoint?: string;
43
44
  /**
44
45
  * Advanced override for repository identity, normalized to `owner/repo`.
45
46
  * Normally omit this: Conloca detects GitHub, Vercel, or GitLab CI metadata,
46
- * then falls back to the checkout's `remote.origin.url`. Registration is
47
- * rejected when the token does not cover the detected repo.
47
+ * then falls back to the checkout's `remote.origin.url`.
48
48
  */
49
49
  repoUri?: string;
50
50
  /**
@@ -54,66 +54,27 @@ export interface ConlocaCloudOptions {
54
54
  * that contradicts it fails the build — never a silent pick.
55
55
  */
56
56
  siteId?: string;
57
- /**
58
- * Build token issued by the endpoint. Prefer injecting it via the
59
- * CONLOCA_BUILD_TOKEN environment variable instead of committing it here;
60
- * when neither is present the build skips registration (fail soft, unless
61
- * `requireRegistration` is set).
62
- */
63
- buildToken?: string;
64
57
  /**
65
58
  * Entry module of the puck config to compile into the editor bundle,
66
59
  * e.g. './src/puck.config.tsx'. Same option name as @conloca/astro-cms.
60
+ * Defaults to the `conlocaCMS` value.
67
61
  */
68
- puckConfigPath: string;
62
+ puckConfigPath?: string;
69
63
  /**
70
64
  * Site CSS for accurate preview rendering — same option name and shape
71
65
  * as `conlocaCMS({ siteStyles })`, and compiled the same way: by the site's
72
66
  * own Vite pipeline (its plugins, PostCSS config and preprocessors), into
73
- * the canvas stylesheet each build registers, ahead of the
67
+ * the editor page's canvas stylesheet, ahead of the
74
68
  * component modules, e.g. './src/styles/index.scss'. Paths resolve against
75
69
  * the project root. The assets these stylesheets reference are emitted under
76
- * `/_conloca/`, and an entry that fails to compile fails the build. Component
70
+ * `/_conloca/editor/`, and an entry that fails to compile fails the build. Component
77
71
  * `*.module.(s)css` imports compile in automatically — list here only what
78
- * lives outside the component graph.
72
+ * lives outside the component graph. Defaults to the `conlocaCMS` value.
79
73
  */
80
74
  siteStyles?: string | string[];
81
75
  /**
82
- * esbuild plugins for the editor bundle (puck config, its components and the
83
- * conlocaCMS schemas module). That bundle is built with esbuild, outside the
84
- * site's Vite pipeline, so a source transform the site's Vite plugins apply
85
- * — e.g. Typia's `createValidate<T>()` generation in page schemas — must be
86
- * passed here in its esbuild form too, or the bundle carries untransformed
87
- * calls that throw when the editor loads it.
88
- */
89
- editorBundlePlugins?: EsbuildPlugin[];
90
- /**
91
- * Representative content route for build-time style discovery — the SAME
92
- * name and meaning as `conlocaCMS`'s option: the page whose styles and
93
- * content-wrapper shape prose editing should adopt. When set, the build
94
- * reads that route's rendered page (a prerendered file, or the booted node
95
- * server entry), collects its CSS and wrapper shape, and registers them
96
- * alongside the bundle. Unset: discovery is skipped and the editor falls
97
- * back to the prose-safe derived tier.
98
- *
99
- * @example '/blog/welcome-post'
100
- */
101
- fragmentPreviewRoute?: string;
102
- /**
103
- * Public base URL of the deployed site, used to absolutize the editor
104
- * bundle URL when no dedicated preview domain is configured. Falls back to
105
- * the CF_PAGES_URL env var; without either, registration is skipped.
106
- */
107
- publicBaseUrl?: string;
108
- /**
109
- * Optional dedicated preview deployment as a hostname or absolute URL. A
110
- * hostname is normalized to HTTPS. When set, editor assets and preview links
111
- * use this deployment instead of the production site's public base URL.
112
- */
113
- previewDomain?: string;
114
- /**
115
- * Recursive preview build configuration. Set to `false` to opt out.
116
- * Defaults to enabled with project defaults.
76
+ * Off unless given as an object; the second build that serves draft
77
+ * previews. Refused under @astrojs/vercel and @astrojs/netlify.
117
78
  */
118
79
  previewBuild?: PreviewBuildOptions | false;
119
80
  /**
@@ -122,14 +83,5 @@ export interface ConlocaCloudOptions {
122
83
  * deployment must supply `CONLOCA_SAAS_ISSUER` at runtime.
123
84
  */
124
85
  saasIssuer?: string;
125
- /**
126
- * Fail the build when registration is SKIPPED for a missing prerequisite
127
- * (no build token, no repository identity, no git sha/branch, no public
128
- * base URL). Default false, so a plain `astro build` without the token
129
- * stays untouched. Turn it on in CI once setup is done: a deploy can
130
- * then never silently leave the editor at the endpoint stale. An ATTEMPTED
131
- * registration that fails always fails the build, regardless of this.
132
- */
133
- requireRegistration?: boolean;
134
86
  }
135
87
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E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,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IAC3C;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conloca/cloud-astro",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -9,8 +9,13 @@
9
9
  "url": "git+https://github.com/conloca/conloca.git",
10
10
  "directory": "packages/cloud-astro"
11
11
  },
12
+ "keywords": [
13
+ "astro-integration",
14
+ "withastro",
15
+ "conloca"
16
+ ],
12
17
  "license": "FSL-1.1-ALv2",
13
- "description": "Astro integration that registers each build's editor bundle at an editor endpoint",
18
+ "description": "Astro integration that writes your site's editor page to /_conloca/editor/, plus the modules that serve draft previews",
14
19
  "type": "module",
15
20
  "sideEffects": false,
16
21
  "main": "./dist/src/index.js",
@@ -38,11 +43,6 @@
38
43
  "import": "./dist/src/site-middleware.js",
39
44
  "default": "./dist/src/site-middleware.js"
40
45
  },
41
- "./bundle": {
42
- "types": "./dist/src/bundle.d.ts",
43
- "import": "./dist/src/bundle.js",
44
- "default": "./dist/src/bundle.js"
45
- },
46
46
  "./doctor": {
47
47
  "types": "./dist/src/doctor.d.ts",
48
48
  "import": "./dist/src/doctor.js",
@@ -69,13 +69,13 @@
69
69
  },
70
70
  "peerDependencies": {
71
71
  "@astrojs/react": "^6.0.5",
72
- "@conloca/astro-cms": "0.2.2",
72
+ "@conloca/astro-cms": "0.2.3",
73
73
  "astro": "^7.3.1",
74
74
  "vite": "^8.2.2"
75
75
  },
76
76
  "dependencies": {
77
- "@conloca/content-api": "0.2.2",
78
- "esbuild": "^0.28.2",
77
+ "@conloca/content-api": "0.2.3",
78
+ "@conloca/mdx": "0.2.3",
79
79
  "hast-util-from-html": "^2.0.3",
80
80
  "jose": "^6.2.10",
81
81
  "sass": "^1.103.1",
@@ -83,10 +83,13 @@
83
83
  },
84
84
  "devDependencies": {
85
85
  "@astrojs/check": "^0.9.10",
86
- "@conloca/astro-cms": "0.2.2",
86
+ "@astrojs/cloudflare": "14.3.2",
87
+ "@astrojs/sitemap": "^3.7.3",
88
+ "@conloca/astro-cms": "0.2.3",
87
89
  "astro": "^7.3.1",
88
90
  "typescript": "^6.0.3",
89
- "vite": "^8.2.2"
91
+ "vite": "^8.2.2",
92
+ "wrangler": "^4.130.0"
90
93
  },
91
94
  "engines": {
92
95
  "node": ">=20.0.0"
@@ -144,7 +147,8 @@
144
147
  "dependsOn": [
145
148
  "typecheck-tests",
146
149
  "build",
147
- "test-packed"
150
+ "test-packed",
151
+ "test-editor-build"
148
152
  ],
149
153
  "inputs": [
150
154
  "{projectRoot}/**/*",
@@ -157,6 +161,26 @@
157
161
  "killAfterMs": 10000
158
162
  }
159
163
  },
164
+ "test-editor-build": {
165
+ "//": "Real Astro builds of generated fixture sites: slower than the unit lane, and about five times slower on GitHub's 2-core runners, so it has its own budget.",
166
+ "executor": "@smoothbricks/nx-plugin:bounded-exec",
167
+ "cache": true,
168
+ "inputs": [
169
+ "default",
170
+ "^production",
171
+ "{workspaceRoot}/bun.lock"
172
+ ],
173
+ "dependsOn": [
174
+ "build",
175
+ "^build"
176
+ ],
177
+ "options": {
178
+ "command": "bun test --timeout=180000 ./test-editor-build",
179
+ "cwd": "{projectRoot}",
180
+ "timeoutMs": 900000,
181
+ "killAfterMs": 10000
182
+ }
183
+ },
160
184
  "test-packed": {
161
185
  "//": "The packed shape is a function of the built outputs, the manifest and the locked dependency closure; cached on exactly those.",
162
186
  "executor": "nx:run-commands",
@@ -4,13 +4,14 @@ import { join } from 'node:path';
4
4
  import { endpointReaderOptions, type PuckManifest, readPuckConfig } from '@conloca/astro-cms/puck-manifest';
5
5
  import { COMPONENT_MANIFEST_LIMITS, measureJson } from '@conloca/content-api/component-vocabulary';
6
6
 
7
- /** The emitted manifest: its site-relative URL and the full sha-256 hex of its bytes. */
7
+ /** The emitted manifest: its site-relative URL, its file name and the full sha-256 hex of its bytes. */
8
8
  export interface ComponentManifestArtifact {
9
9
  url: string;
10
+ filename: string;
10
11
  hash: string;
11
12
  }
12
13
 
13
- /** Metadata transport ceiling; larger metadata must not be registered as a usable artifact. */
14
+ /** Metadata transport ceiling; larger metadata must not ship as a usable artifact. */
14
15
  const MAX_MANIFEST_BYTES = COMPONENT_MANIFEST_LIMITS.bytes;
15
16
 
16
17
  type Logger = { info(message: string): void; warn(message: string): void };
@@ -19,8 +20,7 @@ type Logger = { info(message: string): void; warn(message: string): void };
19
20
  * Writes the site's component vocabulary — every Puck component the config
20
21
  * declares and what each accepts, read from source and never executed — as a
21
22
  * content-addressed artifact beside the editor bundle:
22
- * `_conloca/component-manifest.<hash16>.json`. The `/_conloca/*` CORS rule the
23
- * bundle wrote already covers it, and `mirrorEditorAssets` copies the dir.
23
+ * `<folder>/component-manifest.<hash16>.json`.
24
24
  *
25
25
  * Fail-soft: the manifest is metadata for agents, so a failure costs the
26
26
  * manifest and warns — never the build. A config the reader cannot fully read
@@ -29,10 +29,13 @@ type Logger = { info(message: string): void; warn(message: string): void };
29
29
  */
30
30
  export async function emitComponentManifest(input: {
31
31
  dir: string;
32
+ /** Folder below `dir` to write into; `_conloca` unless given. */
33
+ folder?: string;
32
34
  puckConfigPath: string;
33
35
  projectRoot: string;
34
36
  logger: Logger;
35
37
  }): Promise<ComponentManifestArtifact | undefined> {
38
+ const folder = input.folder ?? '_conloca';
36
39
  try {
37
40
  const manifest = readPuckConfig(
38
41
  endpointReaderOptions({ puckConfigPath: input.puckConfigPath, projectRoot: input.projectRoot }),
@@ -47,10 +50,10 @@ export async function emitComponentManifest(input: {
47
50
  measureJson(manifest, COMPONENT_MANIFEST_LIMITS);
48
51
  const hash = createHash('sha256').update(bytes).digest('hex');
49
52
  const filename = `component-manifest.${hash.slice(0, 16)}.json`;
50
- await mkdir(join(input.dir, '_conloca'), { recursive: true });
51
- await writeFile(join(input.dir, '_conloca', filename), bytes);
52
- reportManifest(manifest, `/_conloca/${filename}`, input.logger);
53
- return { url: `/_conloca/${filename}`, hash };
53
+ await mkdir(join(input.dir, folder), { recursive: true });
54
+ await writeFile(join(input.dir, folder, filename), bytes);
55
+ reportManifest(manifest, `/${folder}/${filename}`, input.logger);
56
+ return { url: `/${folder}/${filename}`, filename, hash };
54
57
  } catch (error) {
55
58
  input.logger.warn(
56
59
  'component manifest skipped — agents get no component vocabulary from this build ' +
package/src/constants.ts CHANGED
@@ -7,22 +7,13 @@ export const PACKAGE_NAME = '@conloca/cloud-astro';
7
7
  /**
8
8
  * Environment variable that the recursive preview build sets on the child
9
9
  * Astro process so the integration's own `astro:build:done` hook can detect
10
- * it and skip re-registration / further recursion.
10
+ * it and skip the editor page and further recursion.
11
11
  */
12
12
  export const PREVIEW_BUILD_ENV_FLAG = 'CONLOCA_PREVIEW_BUILD';
13
13
 
14
14
  /**
15
- * Environment variable consumed by the recursive preview build to discover
16
- * the per-branch preview secret needed to construct the secret-scoped Astro
17
- * route (`/conloca_preview_<secret>/[...path]`).
15
+ * Adapters the preview build is refused under: they write their deployable
16
+ * output at the project root whatever `outDir` says, so the preview build
17
+ * could replace the live site.
18
18
  */
19
- export const PREVIEW_SECRET_ENV_FLAG = 'CONLOCA_PREVIEW_SECRET';
20
-
21
- /**
22
- * Environment variable carrying the build token (`cbt_<id>.<secret>`),
23
- * issued by the endpoint, that authenticates the site's build to the
24
- * endpoint's registration route.
25
- * Read when {@link ConlocaCloudOptions.buildToken} is not set, so CI can
26
- * inject the credential without committing it to `astro.config.mjs`.
27
- */
28
- export const BUILD_TOKEN_ENV_VAR = 'CONLOCA_BUILD_TOKEN';
19
+ export const REFUSED_PREVIEW_ADAPTERS: readonly string[] = ['@astrojs/vercel', '@astrojs/netlify'];
@@ -5,11 +5,11 @@ import {
5
5
  readEditorDescriptors,
6
6
  toPortableImports,
7
7
  } from '@conloca/astro-cms/node';
8
- import type { EditorBundleDescriptors } from './bundle.js';
8
+ import type { EditorBundleDescriptors } from './editor-page/bundle.js';
9
9
 
10
10
  /**
11
11
  * The MDX discovery seam, so tests can drive the failure path without a
12
- * fixture project (same convention as `_postRegistrationWith` in register.ts).
12
+ * fixture project.
13
13
  */
14
14
  export type MdxDescriptorScan = (options: MdxRegistryScanOptions) => Promise<readonly unknown[]>;
15
15