@aotter/mantle-runtime 0.0.11-alpha.73 → 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/domain/model/EntryRow.d.ts +2 -2
  2. package/dist/domain/model/HandlerContext.d.ts +2 -2
  3. package/dist/domain/model/HandlerContext.d.ts.map +1 -1
  4. package/dist/domain/model/TemplateRegistry.d.ts +3 -3
  5. package/dist/domain/port/index.d.ts +1 -3
  6. package/dist/domain/port/index.d.ts.map +1 -1
  7. package/dist/domain/port/index.js.map +1 -1
  8. package/dist/domain/service/HtmlRenderer.d.ts.map +1 -1
  9. package/dist/domain/service/HtmlRenderer.js +2 -7
  10. package/dist/domain/service/HtmlRenderer.js.map +1 -1
  11. package/dist/domain/service/PublicPathResolver.d.ts +5 -0
  12. package/dist/domain/service/PublicPathResolver.d.ts.map +1 -1
  13. package/dist/domain/service/PublicPathResolver.js +13 -1
  14. package/dist/domain/service/PublicPathResolver.js.map +1 -1
  15. package/dist/domain/service/ViewSqlCompiler.d.ts +5 -2
  16. package/dist/domain/service/ViewSqlCompiler.d.ts.map +1 -1
  17. package/dist/domain/service/ViewSqlCompiler.js +10 -5
  18. package/dist/domain/service/ViewSqlCompiler.js.map +1 -1
  19. package/dist/domain/service/index.d.ts +0 -1
  20. package/dist/domain/service/index.d.ts.map +1 -1
  21. package/dist/domain/service/index.js +0 -1
  22. package/dist/domain/service/index.js.map +1 -1
  23. package/dist/domain/service/io/EntryWriteGuard.d.ts +2 -1
  24. package/dist/domain/service/io/EntryWriteGuard.d.ts.map +1 -1
  25. package/dist/domain/service/io/EntryWriteGuard.js +2 -3
  26. package/dist/domain/service/io/EntryWriteGuard.js.map +1 -1
  27. package/dist/domain/service/io/JoinedEntryReader.d.ts +2 -3
  28. package/dist/domain/service/io/JoinedEntryReader.d.ts.map +1 -1
  29. package/dist/domain/service/io/JoinedEntryReader.js +2 -3
  30. package/dist/domain/service/io/JoinedEntryReader.js.map +1 -1
  31. package/dist/index.d.ts +0 -2
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +0 -1
  34. package/dist/index.js.map +1 -1
  35. package/dist/infrastructure/boot/canonicalMigrations.d.ts.map +1 -1
  36. package/dist/infrastructure/boot/canonicalMigrations.js +15 -1
  37. package/dist/infrastructure/boot/canonicalMigrations.js.map +1 -1
  38. package/dist/infrastructure/index.d.ts +0 -1
  39. package/dist/infrastructure/index.d.ts.map +1 -1
  40. package/dist/infrastructure/index.js +0 -1
  41. package/dist/infrastructure/index.js.map +1 -1
  42. package/dist/infrastructure/persistence/DatabaseEntryRepository.d.ts.map +1 -1
  43. package/dist/infrastructure/persistence/DatabaseEntryRepository.js +11 -5
  44. package/dist/infrastructure/persistence/DatabaseEntryRepository.js.map +1 -1
  45. package/dist/infrastructure/persistence/Pagination.d.ts +2 -0
  46. package/dist/infrastructure/persistence/Pagination.d.ts.map +1 -1
  47. package/dist/infrastructure/persistence/Pagination.js +21 -0
  48. package/dist/infrastructure/persistence/Pagination.js.map +1 -1
  49. package/dist/infrastructure/testing/IndexCoverageHarness.js +1 -1
  50. package/dist/infrastructure/testing/IndexCoverageHarness.js.map +1 -1
  51. package/dist/runtime.d.ts +3 -12
  52. package/dist/runtime.d.ts.map +1 -1
  53. package/dist/runtime.js +9 -13
  54. package/dist/runtime.js.map +1 -1
  55. package/dist/usecase/content/ArchiveUseCase.d.ts +1 -3
  56. package/dist/usecase/content/ArchiveUseCase.d.ts.map +1 -1
  57. package/dist/usecase/content/ArchiveUseCase.js +1 -5
  58. package/dist/usecase/content/ArchiveUseCase.js.map +1 -1
  59. package/dist/usecase/content/CreateDraftUseCase.d.ts +3 -2
  60. package/dist/usecase/content/CreateDraftUseCase.d.ts.map +1 -1
  61. package/dist/usecase/content/CreateDraftUseCase.js +5 -2
  62. package/dist/usecase/content/CreateDraftUseCase.js.map +1 -1
  63. package/dist/usecase/content/RequestPublishUseCase.d.ts +3 -4
  64. package/dist/usecase/content/RequestPublishUseCase.d.ts.map +1 -1
  65. package/dist/usecase/content/RequestPublishUseCase.js +5 -6
  66. package/dist/usecase/content/RequestPublishUseCase.js.map +1 -1
  67. package/dist/usecase/content/UnpublishUseCase.d.ts +1 -3
  68. package/dist/usecase/content/UnpublishUseCase.d.ts.map +1 -1
  69. package/dist/usecase/content/UnpublishUseCase.js +1 -5
  70. package/dist/usecase/content/UnpublishUseCase.js.map +1 -1
  71. package/dist/usecase/content/UpdateDraftUseCase.d.ts +3 -2
  72. package/dist/usecase/content/UpdateDraftUseCase.d.ts.map +1 -1
  73. package/dist/usecase/content/UpdateDraftUseCase.js +5 -2
  74. package/dist/usecase/content/UpdateDraftUseCase.js.map +1 -1
  75. package/dist/usecase/procedure/InvokeBuiltinUseCase.d.ts +3 -2
  76. package/dist/usecase/procedure/InvokeBuiltinUseCase.d.ts.map +1 -1
  77. package/dist/usecase/procedure/InvokeBuiltinUseCase.js +6 -2
  78. package/dist/usecase/procedure/InvokeBuiltinUseCase.js.map +1 -1
  79. package/dist/usecase/render/ComposeLlmsTxtUseCase.d.ts +3 -6
  80. package/dist/usecase/render/ComposeLlmsTxtUseCase.d.ts.map +1 -1
  81. package/dist/usecase/render/ComposeLlmsTxtUseCase.js +3 -6
  82. package/dist/usecase/render/ComposeLlmsTxtUseCase.js.map +1 -1
  83. package/dist/usecase/render/ComposeSitemapUseCase.js +1 -1
  84. package/dist/usecase/render/ComposeSitemapUseCase.js.map +1 -1
  85. package/dist/usecase/render/RenderEntryLiveUseCase.d.ts +3 -4
  86. package/dist/usecase/render/RenderEntryLiveUseCase.d.ts.map +1 -1
  87. package/dist/usecase/render/RenderEntryLiveUseCase.js +3 -4
  88. package/dist/usecase/render/RenderEntryLiveUseCase.js.map +1 -1
  89. package/dist/usecase/site/UpdateSiteSettingsUseCase.d.ts +2 -4
  90. package/dist/usecase/site/UpdateSiteSettingsUseCase.d.ts.map +1 -1
  91. package/dist/usecase/site/UpdateSiteSettingsUseCase.js +2 -5
  92. package/dist/usecase/site/UpdateSiteSettingsUseCase.js.map +1 -1
  93. package/dist/usecase/view/ExecuteViewUseCase.d.ts.map +1 -1
  94. package/dist/usecase/view/ExecuteViewUseCase.js +1 -0
  95. package/dist/usecase/view/ExecuteViewUseCase.js.map +1 -1
  96. package/package.json +2 -2
  97. package/dist/domain/port/KvCache.d.ts +0 -34
  98. package/dist/domain/port/KvCache.d.ts.map +0 -1
  99. package/dist/domain/port/KvCache.js +0 -2
  100. package/dist/domain/port/KvCache.js.map +0 -1
  101. package/dist/domain/port/PublishOrchestrator.d.ts +0 -26
  102. package/dist/domain/port/PublishOrchestrator.d.ts.map +0 -1
  103. package/dist/domain/port/PublishOrchestrator.js +0 -2
  104. package/dist/domain/port/PublishOrchestrator.js.map +0 -1
  105. package/dist/domain/service/PublishKeys.d.ts +0 -42
  106. package/dist/domain/service/PublishKeys.d.ts.map +0 -1
  107. package/dist/domain/service/PublishKeys.js +0 -71
  108. package/dist/domain/service/PublishKeys.js.map +0 -1
  109. package/dist/infrastructure/render/HtmlPublishOrchestrator.d.ts +0 -38
  110. package/dist/infrastructure/render/HtmlPublishOrchestrator.d.ts.map +0 -1
  111. package/dist/infrastructure/render/HtmlPublishOrchestrator.js +0 -129
  112. package/dist/infrastructure/render/HtmlPublishOrchestrator.js.map +0 -1
  113. package/dist/infrastructure/render/index.d.ts +0 -2
  114. package/dist/infrastructure/render/index.d.ts.map +0 -1
  115. package/dist/infrastructure/render/index.js +0 -2
  116. package/dist/infrastructure/render/index.js.map +0 -1
  117. package/dist/usecase/content/ContentPublishEffects.d.ts +0 -11
  118. package/dist/usecase/content/ContentPublishEffects.d.ts.map +0 -1
  119. package/dist/usecase/content/ContentPublishEffects.js +0 -21
  120. package/dist/usecase/content/ContentPublishEffects.js.map +0 -1
@@ -1,26 +0,0 @@
1
- import type { SiteConfig } from "@aotter/mantle-spec";
2
- import type { TemplateRegistry } from "../model/TemplateRegistry.js";
3
- /**
4
- * `PublishOrchestrator` — the publish-pipeline surface adapters call
5
- * after a successful `requestPublish` to materialize HTML / `.md` /
6
- * list pages / `llms.txt` into the `KvCache`.
7
- *
8
- * `TemplateRegistry` is consumer-supplied (`createCmsRuntime` accepts
9
- * it); rendering is idempotent — two invocations with the same entry
10
- * id are safe.
11
- *
12
- * The HTML implementation is in
13
- * `infrastructure/render/HtmlPublishOrchestrator`.
14
- */
15
- export interface PublishOrchestrator {
16
- publish(request: PublishEntryRequest): Promise<void>;
17
- unpublish(request: PublishEntryRequest): Promise<void>;
18
- /** Remove every public artifact affected by editable site settings. */
19
- invalidateAll(): Promise<void>;
20
- }
21
- export interface PublishEntryRequest {
22
- readonly entryId: string;
23
- readonly site: SiteConfig;
24
- readonly templates: TemplateRegistry;
25
- }
26
- //# sourceMappingURL=PublishOrchestrator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PublishOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/domain/port/PublishOrchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAErE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,SAAS,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,uEAAuE;IACvE,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;CACtC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=PublishOrchestrator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PublishOrchestrator.js","sourceRoot":"","sources":["../../../src/domain/port/PublishOrchestrator.ts"],"names":[],"mappings":""}
@@ -1,42 +0,0 @@
1
- import { type Entry } from "@aotter/mantle-spec";
2
- /**
3
- * KV key derivation. Centralised so the publish pipeline (writer) and
4
- * the public router (reader) agree on one shape; changing the layout
5
- * is a single-file edit.
6
- *
7
- * - `entry:html:{locale}/{collection}/{slug}` — pre-rendered HTML
8
- * - `entry:md:{locale}/{collection}/{slug}` — markdown mirror
9
- * - `list:html:{locale}/{collection}` — collection index
10
- * - `llms:{locale}` — /{locale}/llms.txt
11
- * - `llms:root:v2` — /llms.txt (cross-locale aggregate)
12
- *
13
- * Non-localized entries use empty-string locale (`entry:html:/posts/abc`).
14
- * The root /llms.txt uses an explicit versioned `:root:v2` suffix instead of an
15
- * empty one because `wrangler kv bulk put` silently drops keys ending
16
- * in `:` (caught in CI on commit 93c10ef).
17
- *
18
- * Pure path math — no I/O. Lives in `domain/service/` so any layer
19
- * can call it without dragging an adapter dep.
20
- */
21
- export declare function entrySlug(entry: {
22
- id: string;
23
- data: Record<string, unknown>;
24
- }): string;
25
- export declare function entryHtmlKey(entry: Entry): string;
26
- export declare function entryMarkdownKey(entry: Entry): string;
27
- export declare function listHtmlKey(collection: string, locale: string): string;
28
- export declare function llmsTxtKey(locale: string): string;
29
- export declare function entryPublicPath(entry: Entry): string;
30
- /**
31
- * Build the entry HTML key from URL-side parts. The router has the
32
- * (collection, locale, slug) tuple from path params; reconstructing
33
- * a partial `Entry` just to call `entryHtmlKey` is bug-bait. Use
34
- * this helper instead.
35
- *
36
- * Pass `locale = ""` for non-localized entries (matches publish
37
- * pipeline semantic where non-localized entries write to
38
- * `entry:html:/{collection}/{slug}`).
39
- */
40
- export declare function entryHtmlKeyFromParts(collection: string, locale: string, slug: string): string;
41
- export declare function entryMarkdownKeyFromParts(collection: string, locale: string, slug: string): string;
42
- //# sourceMappingURL=PublishKeys.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PublishKeys.d.ts","sourceRoot":"","sources":["../../../src/domain/service/PublishKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG,MAAM,CAMtF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIjD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIrD;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAIpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,MAAM,CAGR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,GACX,MAAM,CAGR"}
@@ -1,71 +0,0 @@
1
- import { toUrlLocale } from "@aotter/mantle-spec";
2
- /**
3
- * KV key derivation. Centralised so the publish pipeline (writer) and
4
- * the public router (reader) agree on one shape; changing the layout
5
- * is a single-file edit.
6
- *
7
- * - `entry:html:{locale}/{collection}/{slug}` — pre-rendered HTML
8
- * - `entry:md:{locale}/{collection}/{slug}` — markdown mirror
9
- * - `list:html:{locale}/{collection}` — collection index
10
- * - `llms:{locale}` — /{locale}/llms.txt
11
- * - `llms:root:v2` — /llms.txt (cross-locale aggregate)
12
- *
13
- * Non-localized entries use empty-string locale (`entry:html:/posts/abc`).
14
- * The root /llms.txt uses an explicit versioned `:root:v2` suffix instead of an
15
- * empty one because `wrangler kv bulk put` silently drops keys ending
16
- * in `:` (caught in CI on commit 93c10ef).
17
- *
18
- * Pure path math — no I/O. Lives in `domain/service/` so any layer
19
- * can call it without dragging an adapter dep.
20
- */
21
- export function entrySlug(entry) {
22
- const fromData = entry.data["slug"];
23
- if (typeof fromData === "string" && /^[a-z0-9][a-z0-9-]*$/.test(fromData)) {
24
- return fromData;
25
- }
26
- return entry.id;
27
- }
28
- export function entryHtmlKey(entry) {
29
- const slug = entrySlug(entry);
30
- const locale = entry.locale ? toUrlLocale(entry.locale) : "";
31
- return `entry:html:${locale}/${entry.collection}/${slug}`;
32
- }
33
- export function entryMarkdownKey(entry) {
34
- const slug = entrySlug(entry);
35
- const locale = entry.locale ? toUrlLocale(entry.locale) : "";
36
- return `entry:md:${locale}/${entry.collection}/${slug}`;
37
- }
38
- export function listHtmlKey(collection, locale) {
39
- const urlLocale = locale ? locale.toLowerCase() : "";
40
- return `list:html:${urlLocale}/${collection}`;
41
- }
42
- export function llmsTxtKey(locale) {
43
- // v2 abandons alpha.58's TTL-less root values, which cannot be repaired
44
- // until another publish happens. Locale keys already rewrite on publish.
45
- return locale ? `llms:${locale.toLowerCase()}` : "llms:root:v2";
46
- }
47
- export function entryPublicPath(entry) {
48
- const slug = entrySlug(entry);
49
- if (entry.locale)
50
- return `/${toUrlLocale(entry.locale)}/${entry.collection}/${slug}`;
51
- return `/${entry.collection}/${slug}`;
52
- }
53
- /**
54
- * Build the entry HTML key from URL-side parts. The router has the
55
- * (collection, locale, slug) tuple from path params; reconstructing
56
- * a partial `Entry` just to call `entryHtmlKey` is bug-bait. Use
57
- * this helper instead.
58
- *
59
- * Pass `locale = ""` for non-localized entries (matches publish
60
- * pipeline semantic where non-localized entries write to
61
- * `entry:html:/{collection}/{slug}`).
62
- */
63
- export function entryHtmlKeyFromParts(collection, locale, slug) {
64
- const urlLocale = locale ? locale.toLowerCase() : "";
65
- return `entry:html:${urlLocale}/${collection}/${slug}`;
66
- }
67
- export function entryMarkdownKeyFromParts(collection, locale, slug) {
68
- const urlLocale = locale ? locale.toLowerCase() : "";
69
- return `entry:md:${urlLocale}/${collection}/${slug}`;
70
- }
71
- //# sourceMappingURL=PublishKeys.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PublishKeys.js","sourceRoot":"","sources":["../../../src/domain/service/PublishKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,qBAAqB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,SAAS,CAAC,KAAoD;IAC5E,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,sBAAsB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1E,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC,EAAE,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7D,OAAO,cAAc,MAAM,IAAI,KAAK,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,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AAU,IAAI,IAAI,EAAE,CAAC;AACvD,CAAC"}
@@ -1,38 +0,0 @@
1
- import { type SchemaManifest, type SiteConfig } from "@aotter/mantle-spec";
2
- import type { EntryReader } from "../../domain/port/EntryReader.js";
3
- import type { KvCache } from "../../domain/port/KvCache.js";
4
- import type { MediaAssetRepository } from "../../domain/port/MediaAssetRepository.js";
5
- import type { PublishEntryRequest, PublishOrchestrator } from "../../domain/port/PublishOrchestrator.js";
6
- import type { PublicPathResolver } from "../../domain/service/PublicPathResolver.js";
7
- import { type ComposeEntrySeoMetaUseCase } from "../../usecase/render/ComposeEntrySeoMetaUseCase.js";
8
- /**
9
- * Structural contract of the llms.txt composer the orchestrator
10
- * accepts. Kept here (vs. importing the concrete use-case class) so
11
- * infrastructure doesn't cross the `infrastructure→usecase` boundary
12
- * — the runtime assembly root wires in `ComposeLlmsTxtUseCase`,
13
- * which satisfies this shape.
14
- */
15
- export interface LlmsTxtComposer {
16
- execute(args: {
17
- readonly site: SiteConfig;
18
- readonly locale: string | null;
19
- }): Promise<string>;
20
- }
21
- export declare class HtmlPublishOrchestrator implements PublishOrchestrator {
22
- private readonly reader;
23
- private readonly kv;
24
- private readonly paths;
25
- private readonly composeSeo;
26
- private readonly composeLlmsTxt;
27
- private readonly schemas;
28
- private readonly mediaAssets;
29
- constructor(reader: EntryReader, kv: KvCache, paths: PublicPathResolver | null, composeSeo: Pick<ComposeEntrySeoMetaUseCase, "execute">, composeLlmsTxt: LlmsTxtComposer, schemas: ReadonlyMap<string, SchemaManifest>, mediaAssets?: MediaAssetRepository | null);
30
- publish(request: PublishEntryRequest): Promise<void>;
31
- unpublish(request: PublishEntryRequest): Promise<void>;
32
- invalidateAll(): Promise<void>;
33
- private deletePrefix;
34
- private renderEntry;
35
- private renderList;
36
- private renderLlmsTxt;
37
- }
38
- //# sourceMappingURL=HtmlPublishOrchestrator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HtmlPublishOrchestrator.d.ts","sourceRoot":"","sources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,CAAC,EAC5C,WAAW,GAAE,oBAAoB,GAAG,IAAW;IAG5D,OAAO,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBpD,SAAS,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBtD,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;YAQtB,YAAY;YASZ,WAAW;YAkBX,UAAU;YA0BV,aAAa;CAI5B"}
@@ -1,129 +0,0 @@
1
- import { DiagnosticError, runtimeDiagnostic, } from "@aotter/mantle-spec";
2
- import { entryHtmlKey, entryMarkdownKey, listHtmlKey, llmsTxtKey, } from "../../domain/service/PublishKeys.js";
3
- import { joinParentForList, joinParentIfTranslation, } from "../../domain/service/io/JoinedEntryReader.js";
4
- import { serializeEntryAsMarkdown } from "../../domain/service/MarkdownSerializer.js";
5
- import { renderEntryHtml, renderListHtml, } from "../../domain/service/HtmlRenderer.js";
6
- import { resolveMediaAssetsForEntries } from "../../domain/service/io/MediaAssetReferences.js";
7
- import { composeSeoIfPathed, } from "../../usecase/render/ComposeEntrySeoMetaUseCase.js";
8
- /**
9
- * `HtmlPublishOrchestrator` — the publish pipeline. Renders + writes
10
- * to `KvCache`:
11
- * 1. Entry HTML (if a template is registered for the collection)
12
- * 2. Entry `.md` mirror (if the entry has a `content` field)
13
- * 3. Collection list HTML for the entry's locale
14
- * 4. `/llms.txt` for the entry's locale (composed by ComposeLlmsTxtUseCase)
15
- *
16
- * Idempotent — invoking twice with the same entry id is safe; KV
17
- * writes overwrite. Non-localized entries publish under empty-string
18
- * locale.
19
- */
20
- const DEFAULT_DOCTYPE = "<!DOCTYPE html>\n";
21
- export class HtmlPublishOrchestrator {
22
- reader;
23
- kv;
24
- paths;
25
- composeSeo;
26
- composeLlmsTxt;
27
- schemas;
28
- mediaAssets;
29
- constructor(reader, kv, paths, composeSeo, composeLlmsTxt, schemas, mediaAssets = null) {
30
- this.reader = reader;
31
- this.kv = kv;
32
- this.paths = paths;
33
- this.composeSeo = composeSeo;
34
- this.composeLlmsTxt = composeLlmsTxt;
35
- this.schemas = schemas;
36
- this.mediaAssets = mediaAssets;
37
- }
38
- async publish(request) {
39
- const raw = await requireEntry(this.reader, request.entryId, "usecase/PublishEntry");
40
- // Materialize parent fields into the translation's data before
41
- // rendering (ADR-0010). RequestPublishUseCase has already asserted
42
- // the parent is published, so a status filter is safe here.
43
- const entry = await joinParentIfTranslation(this.reader, this.schemas, raw, {
44
- parentStatus: "published",
45
- });
46
- const indexLocale = entry.locale ?? null;
47
- await Promise.all([
48
- this.renderEntry(entry, request.site, request.templates, DEFAULT_DOCTYPE),
49
- this.renderList(entry.collection, indexLocale, request.site, request.templates, DEFAULT_DOCTYPE),
50
- this.renderLlmsTxt(indexLocale, request.site),
51
- ...(indexLocale === null ? [] : [this.kv.delete(llmsTxtKey(""))]),
52
- ]);
53
- }
54
- async unpublish(request) {
55
- const entry = await requireEntry(this.reader, request.entryId, "usecase/UnpublishEntryCache");
56
- const indexLocale = entry.locale ?? null;
57
- await Promise.all([
58
- this.kv.delete(entryHtmlKey(entry)),
59
- this.kv.delete(entryMarkdownKey(entry)),
60
- this.renderList(entry.collection, indexLocale, request.site, request.templates, DEFAULT_DOCTYPE),
61
- this.renderLlmsTxt(indexLocale, request.site),
62
- ...(indexLocale === null ? [] : [this.kv.delete(llmsTxtKey(""))]),
63
- ]);
64
- }
65
- async invalidateAll() {
66
- await Promise.all([
67
- this.deletePrefix("entry:html:"),
68
- this.deletePrefix("list:html:"),
69
- this.deletePrefix("llms:"),
70
- ]);
71
- }
72
- async deletePrefix(prefix) {
73
- let cursor = null;
74
- do {
75
- const page = await this.kv.list(prefix, cursor);
76
- await Promise.all(page.keys.map((key) => this.kv.delete(key)));
77
- cursor = page.cursor;
78
- } while (cursor);
79
- }
80
- async renderEntry(entry, site, templates, doctype) {
81
- const seo = await composeSeoIfPathed(this.composeSeo, this.paths, entry, site);
82
- const mediaAssets = await resolveMediaAssetsForEntries(this.mediaAssets, [entry]);
83
- const html = renderEntryHtml({ entry, site, templates, doctype, mediaAssets, seo });
84
- if (html !== null) {
85
- await this.kv.put(entryHtmlKey(entry), html);
86
- }
87
- const md = serializeEntryAsMarkdown(entry);
88
- if (md) {
89
- await this.kv.put(entryMarkdownKey(entry), md);
90
- }
91
- }
92
- async renderList(collection, locale, site, templates, doctype) {
93
- const raw = await this.reader.readPublished({ locale, collection });
94
- const entries = await joinParentForList(this.reader, this.schemas, raw, {
95
- parentStatus: "published",
96
- });
97
- const mediaAssets = await resolveMediaAssetsForEntries(this.mediaAssets, entries);
98
- const html = renderListHtml({
99
- collection,
100
- locale: locale ?? "",
101
- entries,
102
- site,
103
- templates,
104
- doctype,
105
- mediaAssets,
106
- });
107
- if (html !== null) {
108
- await this.kv.put(listHtmlKey(collection, locale ?? ""), html);
109
- }
110
- }
111
- async renderLlmsTxt(locale, site) {
112
- const body = await this.composeLlmsTxt.execute({ site, locale });
113
- await this.kv.put(llmsTxtKey(locale ?? ""), body);
114
- }
115
- }
116
- async function requireEntry(reader, entryId, pathPrefix) {
117
- const entry = await reader.readById(entryId);
118
- if (entry)
119
- return entry;
120
- throw new DiagnosticError(runtimeDiagnostic({
121
- code: "NOT_FOUND",
122
- severity: "error",
123
- path: `${pathPrefix}/${entryId}`,
124
- value: entryId,
125
- expected: "id of an existing entry",
126
- message: `Entry not found: ${entryId}.`,
127
- }));
128
- }
129
- //# sourceMappingURL=HtmlPublishOrchestrator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"HtmlPublishOrchestrator.js","sourceRoot":"","sources":["../../../src/infrastructure/render/HtmlPublishOrchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,iBAAiB,GAIlB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,UAAU,GACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,uBAAuB,GACx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YAAY,CACzB,MAAmB,EACnB,OAAe,EACf,UAAkB;IAElB,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,KAAK;QAAE,OAAO,KAAK,CAAC;IACxB,MAAM,IAAI,eAAe,CACvB,iBAAiB,CAAC;QAChB,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,GAAG,UAAU,IAAI,OAAO,EAAE;QAChC,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,yBAAyB;QACnC,OAAO,EAAE,oBAAoB,OAAO,GAAG;KACxC,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -1,2 +0,0 @@
1
- export { HtmlPublishOrchestrator } from "./HtmlPublishOrchestrator.js";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/render/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,2 +0,0 @@
1
- export { HtmlPublishOrchestrator } from "./HtmlPublishOrchestrator.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/render/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { TemplateRegistry } from "../../domain/model/TemplateRegistry.js";
2
- import type { PublishOrchestrator } from "../../domain/port/PublishOrchestrator.js";
3
- import type { SiteConfigRepository } from "../../domain/port/SiteConfigRepository.js";
4
- export interface ContentPublishEffects {
5
- readonly publishOrchestrator: PublishOrchestrator;
6
- readonly siteConfig: SiteConfigRepository;
7
- readonly templates: TemplateRegistry;
8
- }
9
- export declare function publishCache(effects: ContentPublishEffects | undefined, entryId: string): Promise<void>;
10
- export declare function unpublishCache(effects: ContentPublishEffects | undefined, entryId: string): Promise<void>;
11
- //# sourceMappingURL=ContentPublishEffects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentPublishEffects.d.ts","sourceRoot":"","sources":["../../../src/usecase/content/ContentPublishEffects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAClD,QAAQ,CAAC,UAAU,EAAE,oBAAoB,CAAC;IAC1C,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;CACtC;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,qBAAqB,GAAG,SAAS,EAC1C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,qBAAqB,GAAG,SAAS,EAC1C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,CAAC,CAQf"}
@@ -1,21 +0,0 @@
1
- export async function publishCache(effects, entryId) {
2
- if (!effects)
3
- return;
4
- const site = await effects.siteConfig.load();
5
- await effects.publishOrchestrator.publish({
6
- entryId,
7
- site,
8
- templates: effects.templates,
9
- });
10
- }
11
- export async function unpublishCache(effects, entryId) {
12
- if (!effects)
13
- return;
14
- const site = await effects.siteConfig.load();
15
- await effects.publishOrchestrator.unpublish({
16
- entryId,
17
- site,
18
- templates: effects.templates,
19
- });
20
- }
21
- //# sourceMappingURL=ContentPublishEffects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentPublishEffects.js","sourceRoot":"","sources":["../../../src/usecase/content/ContentPublishEffects.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAA0C,EAC1C,OAAe;IAEf,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IAC7C,MAAM,OAAO,CAAC,mBAAmB,CAAC,OAAO,CAAC;QACxC,OAAO;QACP,IAAI;QACJ,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,OAA0C,EAC1C,OAAe;IAEf,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IAC7C,MAAM,OAAO,CAAC,mBAAmB,CAAC,SAAS,CAAC;QAC1C,OAAO;QACP,IAAI;QACJ,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC,CAAC;AACL,CAAC"}