@cogenta/cli 0.2.0 → 0.3.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.
Files changed (62) hide show
  1. package/dist/admin-assets/assets/index-Buwdj1V2.js +71 -0
  2. package/dist/admin-assets/assets/index-Csef0SiA.css +1 -0
  3. package/dist/admin-assets/index.html +2 -2
  4. package/dist/commands/assistant.d.ts +65 -0
  5. package/dist/commands/assistant.d.ts.map +1 -0
  6. package/dist/commands/assistant.js +207 -0
  7. package/dist/commands/assistant.js.map +1 -0
  8. package/dist/commands/content-webhooks.d.ts +41 -0
  9. package/dist/commands/content-webhooks.d.ts.map +1 -0
  10. package/dist/commands/content-webhooks.js +61 -0
  11. package/dist/commands/content-webhooks.js.map +1 -0
  12. package/dist/commands/http-security.d.ts +39 -0
  13. package/dist/commands/http-security.d.ts.map +1 -0
  14. package/dist/commands/http-security.js +153 -0
  15. package/dist/commands/http-security.js.map +1 -0
  16. package/dist/commands/links.d.ts +24 -0
  17. package/dist/commands/links.d.ts.map +1 -0
  18. package/dist/commands/links.js +109 -0
  19. package/dist/commands/links.js.map +1 -0
  20. package/dist/commands/media-images.d.ts +67 -0
  21. package/dist/commands/media-images.d.ts.map +1 -0
  22. package/dist/commands/media-images.js +107 -0
  23. package/dist/commands/media-images.js.map +1 -0
  24. package/dist/commands/search-page.d.ts +40 -0
  25. package/dist/commands/search-page.d.ts.map +1 -0
  26. package/dist/commands/search-page.js +104 -0
  27. package/dist/commands/search-page.js.map +1 -0
  28. package/dist/commands/security-alerts.d.ts +24 -0
  29. package/dist/commands/security-alerts.d.ts.map +1 -0
  30. package/dist/commands/security-alerts.js +82 -0
  31. package/dist/commands/security-alerts.js.map +1 -0
  32. package/dist/commands/seo.d.ts +88 -0
  33. package/dist/commands/seo.d.ts.map +1 -0
  34. package/dist/commands/seo.js +155 -0
  35. package/dist/commands/seo.js.map +1 -0
  36. package/dist/commands/serve.d.ts +87 -4
  37. package/dist/commands/serve.d.ts.map +1 -1
  38. package/dist/commands/serve.js +740 -40
  39. package/dist/commands/serve.js.map +1 -1
  40. package/dist/commands/site-plan.d.ts +86 -0
  41. package/dist/commands/site-plan.d.ts.map +1 -0
  42. package/dist/commands/site-plan.js +235 -0
  43. package/dist/commands/site-plan.js.map +1 -0
  44. package/dist/commands/theme-css.d.ts +54 -0
  45. package/dist/commands/theme-css.d.ts.map +1 -0
  46. package/dist/commands/theme-css.js +121 -0
  47. package/dist/commands/theme-css.js.map +1 -0
  48. package/dist/commands/theme-render.d.ts +78 -4
  49. package/dist/commands/theme-render.d.ts.map +1 -1
  50. package/dist/commands/theme-render.js +170 -16
  51. package/dist/commands/theme-render.js.map +1 -1
  52. package/dist/commands/users.d.ts +7 -1
  53. package/dist/commands/users.d.ts.map +1 -1
  54. package/dist/commands/users.js +159 -15
  55. package/dist/commands/users.js.map +1 -1
  56. package/dist/index.d.ts +2 -0
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.js +31 -0
  59. package/dist/index.js.map +1 -1
  60. package/package.json +12 -10
  61. package/dist/admin-assets/assets/index-21ZcDkDC.css +0 -1
  62. package/dist/admin-assets/assets/index-CKLmd_Fi.js +0 -23
@@ -0,0 +1,121 @@
1
+ /**
2
+ * The theme's stylesheet, flattened and minified for `cogenta serve`.
3
+ *
4
+ * `@cogenta/theme-canonical` ships `src/styles/theme.css` as three `@import`ed
5
+ * layers — tokens, base, blocks. A real Astro build flattens those; this
6
+ * fallback has no build, so it does the same one thing a bundler would and
7
+ * nothing more: resolve the relative imports, drop the comments, squeeze the
8
+ * whitespace. No rewriting of selectors, no reordering, no autoprefixing —
9
+ * anything cleverer than that would make the served CSS differ from the CSS the
10
+ * theme's own tests assert on.
11
+ *
12
+ * Until this existed, `cogenta serve` sent only the generated `--cogenta-*`
13
+ * custom properties and never the sheet that *uses* them, so every page was
14
+ * rendered by the browser's default stylesheet with a skin defined and unused.
15
+ */
16
+ function squeeze(code) {
17
+ return (code
18
+ .replace(/\s+/g, ' ')
19
+ // Only around the three separators that can never be part of a value or a
20
+ // combinator. `:` is left alone: removing the space in `@media
21
+ // (min-width: 60rem)` is safe but removing it in a selector is not, and
22
+ // telling the two apart needs a parser this deliberately is not.
23
+ .replace(/\s*([{};,])\s*/g, '$1')
24
+ .replace(/;}/g, '}'));
25
+ }
26
+ /**
27
+ * One pass over the sheet, in which a comment, a string and code are three
28
+ * different things and none of them is found with a regular expression.
29
+ *
30
+ * Both halves of that matter and each was a real bug first: an apostrophe in a
31
+ * prose comment ("the editor's intent") opens a string for any scanner that
32
+ * looks at quotes before comments, and swallows the rest of the file; and a
33
+ * `content: " — "` whose spaces are squeezed loses the separator it draws.
34
+ */
35
+ export function minifyCss(css) {
36
+ let out = '';
37
+ let code = '';
38
+ let index = 0;
39
+ while (index < css.length) {
40
+ if (css.startsWith('/*', index)) {
41
+ const end = css.indexOf('*/', index + 2);
42
+ index = end === -1 ? css.length : end + 2;
43
+ // A comment is whitespace, not nothing: `.a/* x */.b` must not become
44
+ // `.a.b`, which selects something else entirely.
45
+ code += ' ';
46
+ continue;
47
+ }
48
+ const character = css[index];
49
+ if (character !== '"' && character !== "'") {
50
+ code += character;
51
+ index += 1;
52
+ continue;
53
+ }
54
+ out += squeeze(code);
55
+ code = '';
56
+ let end = index + 1;
57
+ while (end < css.length && css[end] !== character) {
58
+ end += css[end] === '\\' ? 2 : 1;
59
+ }
60
+ out += css.slice(index, Math.min(end + 1, css.length));
61
+ index = end + 1;
62
+ }
63
+ return (out + squeeze(code)).trim();
64
+ }
65
+ const IMPORT = /@import\s+(?:url\()?["']([^"']+)["']\)?\s*;/g;
66
+ /**
67
+ * Replaces every `@import "./x.css";` with the file's contents, recursively.
68
+ *
69
+ * Relative only, on purpose: a bare-specifier or `http(s)` import would let a
70
+ * theme's stylesheet pull in a third party at render time, which is exactly the
71
+ * kind of outside reach contract D refuses a theme elsewhere. Those are left
72
+ * untouched for the browser to refuse or fetch as it sees fit.
73
+ */
74
+ export async function inlineImports(entry, options) {
75
+ const depth = options.depth ?? 8;
76
+ const css = await options.read(entry);
77
+ if (depth <= 0)
78
+ return css;
79
+ const parts = [];
80
+ let cursor = 0;
81
+ for (const match of css.matchAll(IMPORT)) {
82
+ const specifier = match[1];
83
+ if (!specifier.startsWith('.'))
84
+ continue;
85
+ const index = match.index ?? 0;
86
+ parts.push(css.slice(cursor, index));
87
+ parts.push(await inlineImports(new URL(specifier, entry), { read: options.read, depth: depth - 1 }));
88
+ cursor = index + match[0].length;
89
+ }
90
+ parts.push(css.slice(cursor));
91
+ return parts.join('\n');
92
+ }
93
+ /**
94
+ * The whole theme stylesheet as one minified string, or `null` when the theme
95
+ * package cannot be resolved — a site then renders with the skin's custom
96
+ * properties alone rather than refusing to serve, the same degradation
97
+ * `loadSkinCss` already chose for a missing `theme.tokens.json`.
98
+ */
99
+ /**
100
+ * FNV-1a, 32 bits. A cache key, never a security boundary — and deliberately
101
+ * not `node:crypto`, to match the hash `@cogenta/render` already uses for the
102
+ * skin sheet's ETag rather than introduce a second convention beside it.
103
+ */
104
+ export function cssEtag(css) {
105
+ let value = 0x811c9dc5;
106
+ for (let index = 0; index < css.length; index++) {
107
+ value ^= css.charCodeAt(index);
108
+ value = Math.imul(value, 0x01000193) >>> 0;
109
+ }
110
+ return `"${value.toString(16).padStart(8, '0')}"`;
111
+ }
112
+ export async function loadThemeCss(options) {
113
+ try {
114
+ const entry = new URL(import.meta.resolve('@cogenta/theme-canonical/styles/theme.css'));
115
+ return minifyCss(await inlineImports(entry, options));
116
+ }
117
+ catch {
118
+ return null;
119
+ }
120
+ }
121
+ //# sourceMappingURL=theme-css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-css.js","sourceRoot":"","sources":["../../src/commands/theme-css.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,CACL,IAAI;SACD,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;QACrB,0EAA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AAC,EAAE,CAAC,CACzF,CAAA;QACD,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IAClC,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;IAC7B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC;AAED;;;;;GAKG;AACH;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,IAAI,KAAK,GAAG,UAAU,CAAA;IACtB,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAChD,KAAK,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;QAC9B,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAA;IAC5C,CAAC;IACD,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAA;AACnD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA6B;IAC9D,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC,CAAA;QACvF,OAAO,SAAS,CAAC,MAAM,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;IACvD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC"}
@@ -1,5 +1,6 @@
1
- import type { AccessContext, ContentGateway } from '@cogenta/api';
2
- import { type CollectionDefinition } from '@cogenta/schema';
1
+ import { type AccessContext, type ContentGateway } from '@cogenta/api';
2
+ import { type MediaAsset as RenderMediaAsset } from '@cogenta/render';
3
+ import { type BlockZones, type CollectionDefinition } from '@cogenta/schema';
3
4
  /**
4
5
  * Real HTML for a matched route — the piece the lot's own gap notes named
5
6
  * honestly ("`cogenta build`/`theme` not built yet"): until a real Astro site
@@ -12,6 +13,8 @@ import { type CollectionDefinition } from '@cogenta/schema';
12
13
  * in-process. This is a deliberately scoped stand-in, not the Astro pipeline:
13
14
  * one theme, no build step, no static generation.
14
15
  */
16
+ /** Where `cogenta serve` publishes image variants. Public: a visitor's browser fetches them. */
17
+ export declare const DEFAULT_IMAGE_ENDPOINT = "/_image";
15
18
  export interface ThemeRenderOptions {
16
19
  readonly collections: readonly CollectionDefinition[];
17
20
  readonly gateway: ContentGateway;
@@ -21,9 +24,39 @@ export interface ThemeRenderOptions {
21
24
  readonly locales: readonly string[];
22
25
  readonly defaultLocale: string;
23
26
  };
24
- /** `null` when the project has no `theme.tokens.json` — served unstyled rather than refused. */
25
- readonly skinCss: string | null;
27
+ /**
28
+ * The whole stylesheet: the skin's generated `--cogenta-*` custom properties
29
+ * followed by the theme's own sheet, already flattened and minified (see
30
+ * `theme-css.ts`). `null` when neither could be loaded — served unstyled
31
+ * rather than refused.
32
+ *
33
+ * The sheet is *linked*, not inlined: only the presence of one is needed
34
+ * here, so that a site with no stylesheet emits no dead `<link>`.
35
+ */
36
+ readonly styles: string | null;
37
+ /**
38
+ * Loads the media a render references, in one batch, before rendering.
39
+ *
40
+ * It has to be a batch: `renderBlock` is pure and synchronous (contract D),
41
+ * and `@cogenta/seo`'s `SeoResolvers.media` is synchronous too, so neither
42
+ * `ctx.image()` nor an `og:image` can await a lookup. Which ids a page
43
+ * needs is answered by `collectDependencies` — the same walk `/api/content`
44
+ * already uses to declare a response's media dependencies — rather than by
45
+ * a fresh heuristic over block JSON.
46
+ *
47
+ * Absent means no images: `ctx.image()` refuses clearly, exactly as it did
48
+ * before the pipeline existed.
49
+ */
50
+ readonly loadMedia?: (ids: readonly string[]) => Promise<ReadonlyMap<string, RenderMediaAsset>>;
51
+ /** Where image variants are served from. Defaults to `/_image`. */
52
+ readonly imageEndpoint?: string;
26
53
  }
54
+ /**
55
+ * Where the served stylesheet lives. Under `/_cogenta/` for the same reason
56
+ * `Base.astro` puts the skin there: it is a namespace no collection route can
57
+ * ever claim, since every route pattern starts from a collection's own path.
58
+ */
59
+ export declare const STYLESHEET_PATH = "/_cogenta/styles.css";
27
60
  /**
28
61
  * Resolves `pathname` against the site's real routes and renders the real
29
62
  * page, or returns `null` — never for "matched but nothing found", only for
@@ -32,6 +65,38 @@ export interface ThemeRenderOptions {
32
65
  * gets.
33
66
  */
34
67
  export declare function renderRequestedPage(pathname: string, options: ThemeRenderOptions, context: AccessContext): Promise<string | null>;
68
+ /**
69
+ * An entry that is not what the database holds — the block list an editor has
70
+ * on screen and has not saved yet.
71
+ *
72
+ * `blocks` is the whole zone map, exactly the shape the admin already keeps
73
+ * and already sends to `PUT /api/content/:collection/:id`; nothing here is a
74
+ * second, builder-only serialisation of a page.
75
+ */
76
+ export interface DraftPage {
77
+ readonly collection: string;
78
+ readonly entryId: string;
79
+ readonly blocks: BlockZones;
80
+ /** Only the typed fields that changed. Absent fields keep the stored value. */
81
+ readonly values?: Readonly<Record<string, unknown>>;
82
+ }
83
+ /**
84
+ * Renders an in-progress draft through the *same* function that renders the
85
+ * published page — the single reason this export exists.
86
+ *
87
+ * The visual page builder (L16 task 1) shows this HTML in an iframe rather
88
+ * than re-implementing the twelve blocks in React. The whole point of that
89
+ * choice is that there is no second renderer to drift, so this must not
90
+ * become one: it reads the stored entry through the same permission-checked
91
+ * gateway, overlays the unsaved blocks and values on it, and then hands the
92
+ * result to `renderEntryPage` unchanged. Handed a draft that equals what is
93
+ * stored, it returns the published page byte for byte — which is exactly what
94
+ * `theme-render-fidelity.test.ts` asserts.
95
+ *
96
+ * `null` means the entry does not exist or this actor may not read it. The
97
+ * caller turns both into the same 404, and neither says which.
98
+ */
99
+ export declare function renderDraftPage(draft: DraftPage, options: ThemeRenderOptions, context: AccessContext): Promise<string | null>;
35
100
  /**
36
101
  * Reads `theme.tokens.json` next to the config and renders it through the
37
102
  * real, already-tested `renderSkin` (contract D validation + `--cogenta-*`
@@ -39,4 +104,13 @@ export declare function renderRequestedPage(pathname: string, options: ThemeRend
39
104
  * invalid tokens degrade to unstyled HTML rather than refusing to serve.
40
105
  */
41
106
  export declare function loadSkinCss(readFile: (path: string) => Promise<string>, tokensPath: string): Promise<string | null>;
107
+ /**
108
+ * The two sheets a page needs, in the only order that works: the skin's
109
+ * generated custom properties first, then the theme's stylesheet that reads
110
+ * them. Either half may be missing — a project with no `theme.tokens.json`
111
+ * still gets the theme's layout, and a theme package that cannot be resolved
112
+ * still gets the skin's properties — and a page with neither is served
113
+ * unstyled rather than refused.
114
+ */
115
+ export declare function joinStyles(skinCss: string | null, themeCss: string | null): string | null;
42
116
  //# sourceMappingURL=theme-render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme-render.d.ts","sourceRoot":"","sources":["../../src/commands/theme-render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAwB,MAAM,cAAc,CAAA;AAIvF,OAAO,EAAa,KAAK,oBAAoB,EAAgC,MAAM,iBAAiB,CAAA;AAgEpG;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE,SAAS,oBAAoB,EAAE,CAAA;IACrD,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAA;IAChC,QAAQ,CAAC,IAAI,EAAE;QACb,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;QACpB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;QACnC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;KAC/B,CAAA;IACD,gGAAgG;IAChG,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CAChC;AA0GD;;;;;;GAMG;AAC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@cogenta/core';
2
- import { renderSkin } from '@cogenta/render';
3
- import { buildPath, matchPath } from '@cogenta/schema';
4
- import { query as collectionListQuery, renderPage, serialize, } from '@cogenta/theme-canonical';
3
+ import { describeMedia, renderSkin } from '@cogenta/render';
4
+ import { buildPath, matchPath, } from '@cogenta/schema';
5
+ import { query as collectionListQuery, escapeAttribute, renderPage, serialize, } from '@cogenta/theme-canonical';
6
+ import { alternatesForEntry, renderSeoHead, seoSiteFor } from './seo.js';
7
+ import { minifyCss } from './theme-css.js';
5
8
  /**
6
9
  * The theme's own `ContentEntry`/`QueryRequest` (`theme-contract.ts`) are a
7
10
  * deliberately separate, minimal public contract — a theme never imports
@@ -46,6 +49,26 @@ async function listAsTheme(gateway, request, context) {
46
49
  nextCursor: page.nextCursor,
47
50
  };
48
51
  }
52
+ /**
53
+ * Real HTML for a matched route — the piece the lot's own gap notes named
54
+ * honestly ("`cogenta build`/`theme` not built yet"): until a real Astro site
55
+ * exists (ADR-0008, contract D's actual intended delivery plane), `cogenta
56
+ * serve` renders the one theme this codebase has, `@cogenta/theme-canonical`,
57
+ * directly against the same permission-checked `ContentGateway` every REST
58
+ * and GraphQL request already goes through. No secret, config or DB handle
59
+ * ever reaches theme code — only the same `ContentEntry` shape a real HTTP
60
+ * client would receive, so the data boundary R5 cares about holds even
61
+ * in-process. This is a deliberately scoped stand-in, not the Astro pipeline:
62
+ * one theme, no build step, no static generation.
63
+ */
64
+ /** Where `cogenta serve` publishes image variants. Public: a visitor's browser fetches them. */
65
+ export const DEFAULT_IMAGE_ENDPOINT = '/_image';
66
+ /**
67
+ * Where the served stylesheet lives. Under `/_cogenta/` for the same reason
68
+ * `Base.astro` puts the skin there: it is a namespace no collection route can
69
+ * ever claim, since every route pattern starts from a collection's own path.
70
+ */
71
+ export const STYLESHEET_PATH = '/_cogenta/styles.css';
49
72
  function fieldOfKind(collection, kind) {
50
73
  return Object.entries(collection.fields).find(([, field]) => field.kind === kind)?.[0];
51
74
  }
@@ -136,7 +159,50 @@ export async function renderRequestedPage(pathname, options, context) {
136
159
  const resolved = await resolveEntry(pathname, options, context);
137
160
  if (resolved === null)
138
161
  return null;
139
- const { collection, entry } = resolved;
162
+ return renderEntryPage(pathname, resolved.collection, resolved.entry, options, context);
163
+ }
164
+ /**
165
+ * Renders an in-progress draft through the *same* function that renders the
166
+ * published page — the single reason this export exists.
167
+ *
168
+ * The visual page builder (L16 task 1) shows this HTML in an iframe rather
169
+ * than re-implementing the twelve blocks in React. The whole point of that
170
+ * choice is that there is no second renderer to drift, so this must not
171
+ * become one: it reads the stored entry through the same permission-checked
172
+ * gateway, overlays the unsaved blocks and values on it, and then hands the
173
+ * result to `renderEntryPage` unchanged. Handed a draft that equals what is
174
+ * stored, it returns the published page byte for byte — which is exactly what
175
+ * `theme-render-fidelity.test.ts` asserts.
176
+ *
177
+ * `null` means the entry does not exist or this actor may not read it. The
178
+ * caller turns both into the same 404, and neither says which.
179
+ */
180
+ export async function renderDraftPage(draft, options, context) {
181
+ const collection = options.collections.find((entry) => entry.name === draft.collection);
182
+ if (collection === undefined)
183
+ return null;
184
+ const stored = await options.gateway.read(draft.collection, draft.entryId, context);
185
+ if (stored === null)
186
+ return null;
187
+ const entry = {
188
+ ...stored,
189
+ values: { ...stored.values, ...(draft.values ?? {}) },
190
+ blocks: draft.blocks,
191
+ };
192
+ // The path the entry really lives at, built from the same `buildPath` the
193
+ // public route uses — never a synthetic `/preview/...` URL. A canonical
194
+ // link, an `og:url` and a `collectionList` link all have to come out of
195
+ // this render identical to the published page's, and they are all derived
196
+ // from this one string.
197
+ const pathname = buildPath(collection, Object.fromEntries(Object.entries(entry.values).filter((pair) => typeof pair[1] === 'string')), entry.locale ?? undefined);
198
+ return renderEntryPage(pathname, collection, entry, options, context);
199
+ }
200
+ /**
201
+ * The one page renderer. Both `renderRequestedPage` (published) and
202
+ * `renderDraftPage` (unsaved) end here, having only differed in how they got
203
+ * hold of an entry.
204
+ */
205
+ async function renderEntryPage(pathname, collection, entry, options, context) {
140
206
  const blocks = toVocabularyBlocks(entry, collection);
141
207
  // Every entry a `collectionList` block needs is fetched up front — the
142
208
  // theme's own contract (`FetchedEntries`, `render-block.ts`) requires it:
@@ -145,16 +211,39 @@ export async function renderRequestedPage(pathname, options, context) {
145
211
  // either.
146
212
  const fetchedEntries = {};
147
213
  const knownEntries = new Map([[entry.id, entry]]);
214
+ /** Which collection each known entry came from — a `ContentEntry` does not say. */
215
+ const entryCollections = new Map([[entry.id, collection.name]]);
148
216
  for (const block of blocks) {
149
217
  if (block._type !== 'collectionList')
150
218
  continue;
151
219
  const themeQuery = collectionListQuery(block);
152
220
  const results = await options.gateway.list(toApiQueryRequest(themeQuery), context);
153
221
  fetchedEntries[block._key] = results.items.map((found) => toThemeEntry(found, themeQuery.collection));
154
- for (const found of results.items)
222
+ for (const found of results.items) {
155
223
  knownEntries.set(found.id, found);
224
+ entryCollections.set(found.id, themeQuery.collection);
225
+ }
156
226
  }
157
227
  const collectionsByName = new Map(options.collections.map((entry) => [entry.name, entry]));
228
+ // Which media this page references, from the same walk `/api/content` uses
229
+ // to declare a response's dependencies (`collectDependencies`): declared
230
+ // `media` fields *and* the media inside every block, resolved through the
231
+ // block registry rather than guessed at from the JSON. A `ContentEntry`
232
+ // plus its collection name is exactly a `SerialisedEntry`, which is why
233
+ // this reuse costs nothing.
234
+ const mediaAssets = new Map();
235
+ if (options.loadMedia !== undefined) {
236
+ const dependencies = collectDependencies([...knownEntries].map(([id, found]) => ({
237
+ ...found,
238
+ collection: entryCollections.get(id) ?? collection.name,
239
+ })), { collection: (name) => collectionsByName.get(name) });
240
+ if (dependencies.media.length > 0) {
241
+ for (const [id, asset] of await options.loadMedia(dependencies.media)) {
242
+ mediaAssets.set(id, asset);
243
+ }
244
+ }
245
+ }
246
+ const imageEndpoint = options.imageEndpoint ?? DEFAULT_IMAGE_ENDPOINT;
158
247
  const link = (target) => {
159
248
  if (typeof target === 'string')
160
249
  return target;
@@ -176,14 +265,23 @@ export async function renderRequestedPage(pathname, options, context) {
176
265
  locale: entry.locale,
177
266
  url: new URL(pathname, options.site.url),
178
267
  t: (key) => key,
179
- // No image pipeline exists yet (`@cogenta/render`'s `images/`) wired to
180
- // this in-process path a theme that asks for one gets a clear refusal,
181
- // not a broken <img>.
182
- image: () => {
183
- throw new CogentaError({
184
- code: 'THEME_IMAGE_UNSUPPORTED',
185
- message: 'cogenta serve cannot render images yet.',
186
- hint: 'No image pipeline is wired into this in-process rendering fallback (no real Astro build exists yet). Avoid mediaFigure/gallery blocks until it is.',
268
+ // The real `srcset`, from `@cogenta/render`'s own `describeMedia` (L10
269
+ // task 5). Pure and synchronous, as contract D requires: the asset was
270
+ // loaded before this render started, and this only builds URLs against
271
+ // the variants the upload already wrote.
272
+ image: (media, imageOptions) => {
273
+ const asset = mediaAssets.get(media);
274
+ if (asset === undefined) {
275
+ throw new CogentaError({
276
+ code: 'THEME_IMAGE_UNSUPPORTED',
277
+ message: `No media asset "${media}" is available to this render.`,
278
+ hint: 'The image must be referenced by a media field or a block of this page — those are the ones loaded before rendering. Check that the asset still exists in the media library.',
279
+ details: { media },
280
+ });
281
+ }
282
+ return describeMedia(asset, imageOptions ?? {}, {
283
+ endpoint: imageEndpoint,
284
+ mediaEndpoint: imageEndpoint,
187
285
  });
188
286
  },
189
287
  link,
@@ -219,16 +317,57 @@ export async function renderRequestedPage(pathname, options, context) {
219
317
  const pageContent = { title: entryTitle(entry), blocks };
220
318
  const node = renderPage(pageContent, themeContext, fetchedEntries);
221
319
  const bodyHtml = serialize(node);
320
+ // The head is `@cogenta/seo`'s, not this file's: title, description,
321
+ // canonical, hreflang, Open Graph, Twitter Card and JSON-LD, all derived
322
+ // from the real entry and the real collection (L10 task 1). Nothing here
323
+ // decides what is indexable — `buildMetaTags` asks `isPublished` itself, so
324
+ // a preview render carries `noindex` without this caller remembering to.
325
+ const seoSite = seoSiteFor(options.site);
326
+ const resource = { collection, entry };
327
+ const alternates = await alternatesForEntry(seoSite, collection, entry, options.gateway, context, options.site.locales);
328
+ // `og:image` and JSON-LD's `image` come from the same assets the page just
329
+ // rendered, resolved to an absolute URL — a social crawler never sends a
330
+ // session and never follows a relative path.
331
+ const seoMedia = (id) => {
332
+ const asset = mediaAssets.get(id);
333
+ if (asset === undefined || asset.kind !== 'image')
334
+ return null;
335
+ if (asset.width === undefined || asset.height === undefined)
336
+ return null;
337
+ const source = describeMedia(asset, {}, { endpoint: imageEndpoint, mediaEndpoint: imageEndpoint });
338
+ return {
339
+ url: new URL(source.src, options.site.url).toString(),
340
+ width: source.width,
341
+ height: source.height,
342
+ ...(source.alt === '' ? {} : { alt: source.alt }),
343
+ };
344
+ };
345
+ // `head` already carries a real `<title>` (`renderSeoHead`, above) — no
346
+ // second one is written into the template below.
347
+ const head = renderSeoHead(seoSite, resource, {
348
+ ...(alternates.length === 0 ? {} : { alternates }),
349
+ ...(mediaAssets.size === 0 ? {} : { media: seoMedia }),
350
+ });
351
+ const siteName = escapeAttribute(options.site.name);
352
+ // The same frame `Base.astro` builds for a real Astro build: a skip link
353
+ // first, the site name as a header, the content, a footer. Rendering the
354
+ // `<main>` alone — which this did until the theme's own stylesheet started
355
+ // being served — left every page with no landmark to skip to and no way back
356
+ // to the home page.
222
357
  return `<!doctype html>
223
- <html lang="${themeContext.locale}">
358
+ <html lang="${themeContext.locale}" dir="auto">
224
359
  <head>
225
360
  <meta charset="utf-8">
226
361
  <meta name="viewport" content="width=device-width, initial-scale=1">
227
- <title>${pageContent.title} ${options.site.name}</title>
228
- ${options.skinCss === null ? '' : `<style>${options.skinCss}</style>`}
362
+ <meta name="color-scheme" content="light dark">
363
+ ${head}
364
+ ${options.styles === null ? '' : `<link rel="stylesheet" href="${STYLESHEET_PATH}">`}
229
365
  </head>
230
366
  <body>
367
+ <a class="cg-skip-link" href="#cg-main">Skip to content</a>
368
+ <header class="cg-site-header"><div class="cg-site-header__inner"><a class="cg-site-header__home" href="/">${siteName}</a></div></header>
231
369
  ${bodyHtml}
370
+ <footer class="cg-site-footer"><div class="cg-site-footer__inner">${siteName}</div></footer>
232
371
  </body>
233
372
  </html>
234
373
  `;
@@ -248,4 +387,19 @@ export async function loadSkinCss(readFile, tokensPath) {
248
387
  return null;
249
388
  }
250
389
  }
390
+ /**
391
+ * The two sheets a page needs, in the only order that works: the skin's
392
+ * generated custom properties first, then the theme's stylesheet that reads
393
+ * them. Either half may be missing — a project with no `theme.tokens.json`
394
+ * still gets the theme's layout, and a theme package that cannot be resolved
395
+ * still gets the skin's properties — and a page with neither is served
396
+ * unstyled rather than refused.
397
+ */
398
+ export function joinStyles(skinCss, themeCss) {
399
+ const sheets = [
400
+ skinCss === null ? null : minifyCss(skinCss),
401
+ themeCss === null ? null : minifyCss(themeCss),
402
+ ].filter((sheet) => sheet !== null);
403
+ return sheets.length === 0 ? null : sheets.join('\n');
404
+ }
251
405
  //# sourceMappingURL=theme-render.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme-render.js","sourceRoot":"","sources":["../../src/commands/theme-render.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAgD,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACpG,OAAO,EACL,KAAK,IAAI,mBAAmB,EAK5B,UAAU,EACV,SAAS,GAIV,MAAM,0BAA0B,CAAA;AAEjC;;;;;GAKG;AACH,SAAS,YAAY,CAAC,KAAmB,EAAE,UAAkB;IAC3D,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,UAAU;QACV,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,GAAG,KAAK,CAAC,MAAM;KAChB,CAAA;AACH,CAAC;AAED,SAAS,WAAW,CAAC,IAAmD;IACtE,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACxC,MAAM,UAAU,GAAG,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OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAA;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAA;IACb,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,OAAsB,EAAE,QAAuB;IACxE,MAAM,MAAM,GAAG;QACb,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC;QAC5C,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC;KAC/C,CAAC,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAA;IACpD,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACvD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type Logger } from '@cogenta/core';
2
2
  import type { Output, Writer } from '../output.js';
3
- export type UsersSubcommand = 'create';
3
+ export type UsersSubcommand = 'create' | 'reset-password';
4
4
  export interface UsersOptions {
5
5
  readonly subcommand: string | undefined;
6
6
  readonly cwd?: string;
@@ -11,6 +11,12 @@ export interface UsersOptions {
11
11
  readonly email?: string;
12
12
  readonly roles?: string;
13
13
  readonly admin?: boolean;
14
+ /** `reset-password`: the token from the mail, redeeming the reset. */
15
+ readonly token?: string;
16
+ /** `reset-password`: the new password. Generated and printed once when absent. */
17
+ readonly password?: string;
18
+ /** Where the outgoing mail is written. Defaults to `.cogenta/mail` under the project. */
19
+ readonly mailDir?: string;
14
20
  }
15
21
  /**
16
22
  * Runs one `users` subcommand and returns its exit code.
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/commands/users.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK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