@endora-commerce/mod-cms 0.0.0-stage → 0.100.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 (264) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +65 -2
  3. package/dist/admin/api/cms-client.d.ts +77 -0
  4. package/dist/admin/api/cms-client.d.ts.map +1 -0
  5. package/dist/admin/api/cms-client.js +162 -0
  6. package/dist/admin/api/cms-client.js.map +1 -0
  7. package/dist/admin/components/AdminCatalogPreviewProvider.d.ts +6 -0
  8. package/dist/admin/components/AdminCatalogPreviewProvider.d.ts.map +1 -0
  9. package/dist/admin/components/AdminCatalogPreviewProvider.js +74 -0
  10. package/dist/admin/components/AdminCatalogPreviewProvider.js.map +1 -0
  11. package/dist/admin/components/AdminCmsAssetProvider.d.ts +9 -0
  12. package/dist/admin/components/AdminCmsAssetProvider.d.ts.map +1 -0
  13. package/dist/admin/components/AdminCmsAssetProvider.js +50 -0
  14. package/dist/admin/components/AdminCmsAssetProvider.js.map +1 -0
  15. package/dist/admin/components/BackgroundFields.d.ts +4 -0
  16. package/dist/admin/components/BackgroundFields.d.ts.map +1 -0
  17. package/dist/admin/components/BackgroundFields.js +40 -0
  18. package/dist/admin/components/BackgroundFields.js.map +1 -0
  19. package/dist/admin/components/ButtonLinkFields.d.ts +6 -0
  20. package/dist/admin/components/ButtonLinkFields.d.ts.map +1 -0
  21. package/dist/admin/components/ButtonLinkFields.js +127 -0
  22. package/dist/admin/components/ButtonLinkFields.js.map +1 -0
  23. package/dist/admin/components/CarouselPreviewNav.d.ts +12 -0
  24. package/dist/admin/components/CarouselPreviewNav.d.ts.map +1 -0
  25. package/dist/admin/components/CarouselPreviewNav.js +31 -0
  26. package/dist/admin/components/CarouselPreviewNav.js.map +1 -0
  27. package/dist/admin/components/CmsContentEditorLayout.d.ts +12 -0
  28. package/dist/admin/components/CmsContentEditorLayout.d.ts.map +1 -0
  29. package/dist/admin/components/CmsContentEditorLayout.js +9 -0
  30. package/dist/admin/components/CmsContentEditorLayout.js.map +1 -0
  31. package/dist/admin/components/ComponentDragHandle.d.ts +6 -0
  32. package/dist/admin/components/ComponentDragHandle.d.ts.map +1 -0
  33. package/dist/admin/components/ComponentDragHandle.js +119 -0
  34. package/dist/admin/components/ComponentDragHandle.js.map +1 -0
  35. package/dist/admin/components/ContentSliderActionBarExtras.d.ts +6 -0
  36. package/dist/admin/components/ContentSliderActionBarExtras.d.ts.map +1 -0
  37. package/dist/admin/components/ContentSliderActionBarExtras.js +109 -0
  38. package/dist/admin/components/ContentSliderActionBarExtras.js.map +1 -0
  39. package/dist/admin/components/HookBlockAttachmentsPanel.d.ts +9 -0
  40. package/dist/admin/components/HookBlockAttachmentsPanel.d.ts.map +1 -0
  41. package/dist/admin/components/HookBlockAttachmentsPanel.js +137 -0
  42. package/dist/admin/components/HookBlockAttachmentsPanel.js.map +1 -0
  43. package/dist/admin/components/PageBuilderActionBar.d.ts +10 -0
  44. package/dist/admin/components/PageBuilderActionBar.d.ts.map +1 -0
  45. package/dist/admin/components/PageBuilderActionBar.js +118 -0
  46. package/dist/admin/components/PageBuilderActionBar.js.map +1 -0
  47. package/dist/admin/components/PageBuilderDrawer.d.ts +16 -0
  48. package/dist/admin/components/PageBuilderDrawer.d.ts.map +1 -0
  49. package/dist/admin/components/PageBuilderDrawer.js +53 -0
  50. package/dist/admin/components/PageBuilderDrawer.js.map +1 -0
  51. package/dist/admin/components/PageBuilderEditor.d.ts +45 -0
  52. package/dist/admin/components/PageBuilderEditor.d.ts.map +1 -0
  53. package/dist/admin/components/PageBuilderEditor.js +632 -0
  54. package/dist/admin/components/PageBuilderEditor.js.map +1 -0
  55. package/dist/admin/components/PuckActionGuard.d.ts +12 -0
  56. package/dist/admin/components/PuckActionGuard.d.ts.map +1 -0
  57. package/dist/admin/components/PuckActionGuard.js +30 -0
  58. package/dist/admin/components/PuckActionGuard.js.map +1 -0
  59. package/dist/admin/components/RowLayoutPicker.d.ts +8 -0
  60. package/dist/admin/components/RowLayoutPicker.d.ts.map +1 -0
  61. package/dist/admin/components/RowLayoutPicker.js +17 -0
  62. package/dist/admin/components/RowLayoutPicker.js.map +1 -0
  63. package/dist/admin/components/SliderPreviewActionBarExtras.d.ts +6 -0
  64. package/dist/admin/components/SliderPreviewActionBarExtras.d.ts.map +1 -0
  65. package/dist/admin/components/SliderPreviewActionBarExtras.js +32 -0
  66. package/dist/admin/components/SliderPreviewActionBarExtras.js.map +1 -0
  67. package/dist/admin/components/admin-catalog-preview-map.d.ts +17 -0
  68. package/dist/admin/components/admin-catalog-preview-map.d.ts.map +1 -0
  69. package/dist/admin/components/admin-catalog-preview-map.js +18 -0
  70. package/dist/admin/components/admin-catalog-preview-map.js.map +1 -0
  71. package/dist/admin/components/build-viewports.d.ts +23 -0
  72. package/dist/admin/components/build-viewports.d.ts.map +1 -0
  73. package/dist/admin/components/build-viewports.js +23 -0
  74. package/dist/admin/components/build-viewports.js.map +1 -0
  75. package/dist/admin/components/cms-template-layout.d.ts +16 -0
  76. package/dist/admin/components/cms-template-layout.d.ts.map +1 -0
  77. package/dist/admin/components/cms-template-layout.js +53 -0
  78. package/dist/admin/components/cms-template-layout.js.map +1 -0
  79. package/dist/admin/components/page-builder-i18n.d.ts +27 -0
  80. package/dist/admin/components/page-builder-i18n.d.ts.map +1 -0
  81. package/dist/admin/components/page-builder-i18n.js +34 -0
  82. package/dist/admin/components/page-builder-i18n.js.map +1 -0
  83. package/dist/admin/components/puck-safe.d.ts +10 -0
  84. package/dist/admin/components/puck-safe.d.ts.map +1 -0
  85. package/dist/admin/components/puck-safe.js +22 -0
  86. package/dist/admin/components/puck-safe.js.map +1 -0
  87. package/dist/admin/components/scope-utils.d.ts +4 -0
  88. package/dist/admin/components/scope-utils.d.ts.map +1 -0
  89. package/dist/admin/components/scope-utils.js +7 -0
  90. package/dist/admin/components/scope-utils.js.map +1 -0
  91. package/dist/admin/editors/BlockEditor.d.ts +9 -0
  92. package/dist/admin/editors/BlockEditor.d.ts.map +1 -0
  93. package/dist/admin/editors/BlockEditor.js +217 -0
  94. package/dist/admin/editors/BlockEditor.js.map +1 -0
  95. package/dist/admin/editors/PageEditor.d.ts +9 -0
  96. package/dist/admin/editors/PageEditor.d.ts.map +1 -0
  97. package/dist/admin/editors/PageEditor.js +316 -0
  98. package/dist/admin/editors/PageEditor.js.map +1 -0
  99. package/dist/admin/editors/TemplateEditor.d.ts +9 -0
  100. package/dist/admin/editors/TemplateEditor.d.ts.map +1 -0
  101. package/dist/admin/editors/TemplateEditor.js +180 -0
  102. package/dist/admin/editors/TemplateEditor.js.map +1 -0
  103. package/dist/admin/index.d.ts +38 -0
  104. package/dist/admin/index.d.ts.map +1 -0
  105. package/dist/admin/index.js +144 -0
  106. package/dist/admin/index.js.map +1 -0
  107. package/dist/admin/pages/BlocksListPage.d.ts +9 -0
  108. package/dist/admin/pages/BlocksListPage.d.ts.map +1 -0
  109. package/dist/admin/pages/BlocksListPage.js +47 -0
  110. package/dist/admin/pages/BlocksListPage.js.map +1 -0
  111. package/dist/admin/pages/HooksPage.d.ts +9 -0
  112. package/dist/admin/pages/HooksPage.d.ts.map +1 -0
  113. package/dist/admin/pages/HooksPage.js +41 -0
  114. package/dist/admin/pages/HooksPage.js.map +1 -0
  115. package/dist/admin/pages/PagesListPage.d.ts +9 -0
  116. package/dist/admin/pages/PagesListPage.d.ts.map +1 -0
  117. package/dist/admin/pages/PagesListPage.js +51 -0
  118. package/dist/admin/pages/PagesListPage.js.map +1 -0
  119. package/dist/admin/pages/TemplatesListPage.d.ts +9 -0
  120. package/dist/admin/pages/TemplatesListPage.d.ts.map +1 -0
  121. package/dist/admin/pages/TemplatesListPage.js +47 -0
  122. package/dist/admin/pages/TemplatesListPage.js.map +1 -0
  123. package/dist/admin-ui/index.d.ts +90 -0
  124. package/dist/admin-ui/index.d.ts.map +1 -0
  125. package/dist/admin-ui/index.js +89 -0
  126. package/dist/admin-ui/index.js.map +1 -0
  127. package/dist/backend/cli/block-names.d.ts +92 -0
  128. package/dist/backend/cli/block-names.d.ts.map +1 -0
  129. package/dist/backend/cli/block-names.js +132 -0
  130. package/dist/backend/cli/block-names.js.map +1 -0
  131. package/dist/backend/entities/cms-block.entity.d.ts +20 -0
  132. package/dist/backend/entities/cms-block.entity.d.ts.map +1 -0
  133. package/dist/backend/entities/cms-block.entity.js +77 -0
  134. package/dist/backend/entities/cms-block.entity.js.map +1 -0
  135. package/dist/backend/entities/cms-hook-block-attachment.entity.d.ts +15 -0
  136. package/dist/backend/entities/cms-hook-block-attachment.entity.d.ts.map +1 -0
  137. package/dist/backend/entities/cms-hook-block-attachment.entity.js +46 -0
  138. package/dist/backend/entities/cms-hook-block-attachment.entity.js.map +1 -0
  139. package/dist/backend/entities/cms-hook.entity.d.ts +20 -0
  140. package/dist/backend/entities/cms-hook.entity.d.ts.map +1 -0
  141. package/dist/backend/entities/cms-hook.entity.js +73 -0
  142. package/dist/backend/entities/cms-hook.entity.js.map +1 -0
  143. package/dist/backend/entities/cms-page.entity.d.ts +43 -0
  144. package/dist/backend/entities/cms-page.entity.d.ts.map +1 -0
  145. package/dist/backend/entities/cms-page.entity.js +140 -0
  146. package/dist/backend/entities/cms-page.entity.js.map +1 -0
  147. package/dist/backend/entities/cms-template.entity.d.ts +20 -0
  148. package/dist/backend/entities/cms-template.entity.d.ts.map +1 -0
  149. package/dist/backend/entities/cms-template.entity.js +73 -0
  150. package/dist/backend/entities/cms-template.entity.js.map +1 -0
  151. package/dist/backend/index.d.ts +157 -0
  152. package/dist/backend/index.d.ts.map +1 -0
  153. package/dist/backend/index.js +317 -0
  154. package/dist/backend/index.js.map +1 -0
  155. package/dist/backend/plugin.d.ts +81 -0
  156. package/dist/backend/plugin.d.ts.map +1 -0
  157. package/dist/backend/plugin.js +81 -0
  158. package/dist/backend/plugin.js.map +1 -0
  159. package/dist/backend/routes.admin.d.ts +19 -0
  160. package/dist/backend/routes.admin.d.ts.map +1 -0
  161. package/dist/backend/routes.admin.js +164 -0
  162. package/dist/backend/routes.admin.js.map +1 -0
  163. package/dist/backend/routes.storefront.d.ts +6 -0
  164. package/dist/backend/routes.storefront.d.ts.map +1 -0
  165. package/dist/backend/routes.storefront.js +89 -0
  166. package/dist/backend/routes.storefront.js.map +1 -0
  167. package/dist/backend/services/asset-embed-resolver.d.ts +17 -0
  168. package/dist/backend/services/asset-embed-resolver.d.ts.map +1 -0
  169. package/dist/backend/services/asset-embed-resolver.js +40 -0
  170. package/dist/backend/services/asset-embed-resolver.js.map +1 -0
  171. package/dist/backend/services/asset-references.d.ts +4 -0
  172. package/dist/backend/services/asset-references.d.ts.map +1 -0
  173. package/dist/backend/services/asset-references.js +55 -0
  174. package/dist/backend/services/asset-references.js.map +1 -0
  175. package/dist/backend/services/cms-block-read-port.d.ts +27 -0
  176. package/dist/backend/services/cms-block-read-port.d.ts.map +1 -0
  177. package/dist/backend/services/cms-block-read-port.js +50 -0
  178. package/dist/backend/services/cms-block-read-port.js.map +1 -0
  179. package/dist/backend/services/cms-block-seed-port.d.ts +31 -0
  180. package/dist/backend/services/cms-block-seed-port.d.ts.map +1 -0
  181. package/dist/backend/services/cms-block-seed-port.js +68 -0
  182. package/dist/backend/services/cms-block-seed-port.js.map +1 -0
  183. package/dist/backend/services/cms-block-service.d.ts +38 -0
  184. package/dist/backend/services/cms-block-service.d.ts.map +1 -0
  185. package/dist/backend/services/cms-block-service.js +218 -0
  186. package/dist/backend/services/cms-block-service.js.map +1 -0
  187. package/dist/backend/services/cms-cache.d.ts +54 -0
  188. package/dist/backend/services/cms-cache.d.ts.map +1 -0
  189. package/dist/backend/services/cms-cache.js +113 -0
  190. package/dist/backend/services/cms-cache.js.map +1 -0
  191. package/dist/backend/services/cms-hook-service.d.ts +35 -0
  192. package/dist/backend/services/cms-hook-service.d.ts.map +1 -0
  193. package/dist/backend/services/cms-hook-service.js +216 -0
  194. package/dist/backend/services/cms-hook-service.js.map +1 -0
  195. package/dist/backend/services/cms-language-reference.d.ts +11 -0
  196. package/dist/backend/services/cms-language-reference.d.ts.map +1 -0
  197. package/dist/backend/services/cms-language-reference.js +26 -0
  198. package/dist/backend/services/cms-language-reference.js.map +1 -0
  199. package/dist/backend/services/cms-page-read-port.d.ts +23 -0
  200. package/dist/backend/services/cms-page-read-port.d.ts.map +1 -0
  201. package/dist/backend/services/cms-page-read-port.js +54 -0
  202. package/dist/backend/services/cms-page-read-port.js.map +1 -0
  203. package/dist/backend/services/cms-page-service.d.ts +104 -0
  204. package/dist/backend/services/cms-page-service.d.ts.map +1 -0
  205. package/dist/backend/services/cms-page-service.js +468 -0
  206. package/dist/backend/services/cms-page-service.js.map +1 -0
  207. package/dist/backend/services/cms-reference-registry.d.ts +30 -0
  208. package/dist/backend/services/cms-reference-registry.d.ts.map +1 -0
  209. package/dist/backend/services/cms-reference-registry.js +98 -0
  210. package/dist/backend/services/cms-reference-registry.js.map +1 -0
  211. package/dist/backend/services/cms-template-service.d.ts +37 -0
  212. package/dist/backend/services/cms-template-service.d.ts.map +1 -0
  213. package/dist/backend/services/cms-template-service.js +205 -0
  214. package/dist/backend/services/cms-template-service.js.map +1 -0
  215. package/dist/backend/services/content-tree-walker.d.ts +7 -0
  216. package/dist/backend/services/content-tree-walker.d.ts.map +1 -0
  217. package/dist/backend/services/content-tree-walker.js +89 -0
  218. package/dist/backend/services/content-tree-walker.js.map +1 -0
  219. package/dist/backend/services/page-builder-registry.d.ts +120 -0
  220. package/dist/backend/services/page-builder-registry.d.ts.map +1 -0
  221. package/dist/backend/services/page-builder-registry.js +220 -0
  222. package/dist/backend/services/page-builder-registry.js.map +1 -0
  223. package/dist/backend/services/seed-hooks.d.ts +22 -0
  224. package/dist/backend/services/seed-hooks.d.ts.map +1 -0
  225. package/dist/backend/services/seed-hooks.js +94 -0
  226. package/dist/backend/services/seed-hooks.js.map +1 -0
  227. package/dist/backend/services/storefront-resolver.d.ts +71 -0
  228. package/dist/backend/services/storefront-resolver.d.ts.map +1 -0
  229. package/dist/backend/services/storefront-resolver.js +329 -0
  230. package/dist/backend/services/storefront-resolver.js.map +1 -0
  231. package/dist/manifest.d.ts +225 -0
  232. package/dist/manifest.d.ts.map +1 -0
  233. package/dist/manifest.js +695 -0
  234. package/dist/manifest.js.map +1 -0
  235. package/dist/migrations/20260425T162418_cms_pages_init.d.ts +10 -0
  236. package/dist/migrations/20260425T162418_cms_pages_init.d.ts.map +1 -0
  237. package/dist/migrations/20260425T162418_cms_pages_init.js +30 -0
  238. package/dist/migrations/20260425T162418_cms_pages_init.js.map +1 -0
  239. package/dist/migrations/20260505T130214_cms_init.d.ts +28 -0
  240. package/dist/migrations/20260505T130214_cms_init.d.ts.map +1 -0
  241. package/dist/migrations/20260505T130214_cms_init.js +332 -0
  242. package/dist/migrations/20260505T130214_cms_init.js.map +1 -0
  243. package/dist/migrations/20260903T101741_cms_namespace_block_names.d.ts +6 -0
  244. package/dist/migrations/20260903T101741_cms_namespace_block_names.d.ts.map +1 -0
  245. package/dist/migrations/20260903T101741_cms_namespace_block_names.js +60 -0
  246. package/dist/migrations/20260903T101741_cms_namespace_block_names.js.map +1 -0
  247. package/dist/migrations/20260912T094733_cms_sales_channel_cms_pages.d.ts +27 -0
  248. package/dist/migrations/20260912T094733_cms_sales_channel_cms_pages.d.ts.map +1 -0
  249. package/dist/migrations/20260912T094733_cms_sales_channel_cms_pages.js +44 -0
  250. package/dist/migrations/20260912T094733_cms_sales_channel_cms_pages.js.map +1 -0
  251. package/dist/migrations/20260912T125709_cms_page_body_asset_ref_index.d.ts +32 -0
  252. package/dist/migrations/20260912T125709_cms_page_body_asset_ref_index.d.ts.map +1 -0
  253. package/dist/migrations/20260912T125709_cms_page_body_asset_ref_index.js +36 -0
  254. package/dist/migrations/20260912T125709_cms_page_body_asset_ref_index.js.map +1 -0
  255. package/dist/migrations/index.d.ts +31 -0
  256. package/dist/migrations/index.d.ts.map +1 -0
  257. package/dist/migrations/index.js +37 -0
  258. package/dist/migrations/index.js.map +1 -0
  259. package/docs/cms/extending-page-builder.md +256 -0
  260. package/docs/cms/index.md +233 -0
  261. package/i18n/en.json +231 -0
  262. package/i18n/pl.json +231 -0
  263. package/package.json +125 -3
  264. package/tailwind.css +16 -0
@@ -0,0 +1,317 @@
1
+ import { z } from 'zod';
2
+ import { cmsColorPaletteSchema, } from '@endora-commerce/contracts';
3
+ import { CMS_PAGE_BUILDER_SETTING_CODES, CMS_SETTING_CODES } from '../manifest.js';
4
+ import { CmsBlockReadService } from './services/cms-block-read-port.js';
5
+ import { CmsBlockSeedService } from './services/cms-block-seed-port.js';
6
+ import { CmsPageReadService } from './services/cms-page-read-port.js';
7
+ import { lazyPort } from '@endora-commerce/platform/kernel';
8
+ import { effectiveState } from '@endora-commerce/platform/kernel';
9
+ import { rethrowIfModuleDisabled } from '@endora-commerce/platform/kernel';
10
+ import { cmsModule } from './plugin.js';
11
+ import { createAssetEmbedResolver } from './services/asset-embed-resolver.js';
12
+ import { registerCmsAssetReferences } from './services/asset-references.js';
13
+ import { registerCmsLanguageReferences } from './services/cms-language-reference.js';
14
+ import { CmsBlock } from './entities/cms-block.entity.js';
15
+ import { CmsHookBlockAttachment } from './entities/cms-hook-block-attachment.entity.js';
16
+ import { CmsHook } from './entities/cms-hook.entity.js';
17
+ import { CmsPage } from './entities/cms-page.entity.js';
18
+ import { CmsTemplate } from './entities/cms-template.entity.js';
19
+ const breakpointSchema = z.number().int().positive();
20
+ /**
21
+ * The reserved-segments Setting as it comes off the store.
22
+ *
23
+ * Deliberately loose — `unknown[]`, not `string[]`. The value is free-form
24
+ * JSON an operator edits, `settingsReadPort.get` **throws**
25
+ * `SettingValueShapeMismatch` on a schema failure, and a stray non-string entry
26
+ * in the list would then take every CMS page save down rather than reserving
27
+ * one fewer segment. `normalizeReservedSegments` is where an entry is judged,
28
+ * one entry at a time, in the module that reads it.
29
+ */
30
+ const reservedSegmentsSchema = z.array(z.unknown());
31
+ export function registerModule(ctx) {
32
+ /**
33
+ * Feature 120 (FR-015) — the sales-channel membership bridge this module owns.
34
+ *
35
+ * The platform used to hold a map **total** over
36
+ * `ChannelMemberEntityTypeSchema`, naming this module's bridge table from
37
+ * inside the kernel. That is D-52/D-53's prohibition expressed in a contract
38
+ * instead of an import, and it meant a membership call for 'cms-page' on an
39
+ * instance that never installed this module executed SQL against a relation
40
+ * that is not there (D-226). The module whose migration creates the table is
41
+ * the one that says where it is; a member nothing registers now refuses at
42
+ * the call instead.
43
+ *
44
+ * A **contribution** hook and deliberately **unprobed** (D-62/D-68): a
45
+ * registration is an inert statement about the schema rather than a
46
+ * capability, the rows outlive an operator switching this module off, and
47
+ * probing would make a runtime activation flip require a restart. It is
48
+ * declared first in this module so any later hook of its own that binds a
49
+ * membership finds the bridge already there.
50
+ */
51
+ ctx.onBoot(() => {
52
+ const { salesChannelBridgeRegistry } = ctx.cradle();
53
+ for (const bridge of salesChannelBridges)
54
+ salesChannelBridgeRegistry.register(bridge);
55
+ });
56
+ ctx.di.register({
57
+ /**
58
+ * `specs/110-instance-repository/` T118c — this module's own registration
59
+ * over `assets_library`' published port, drained out of a composition root
60
+ * (`specs/075-cross-module-decoupling-sweep/` Phase C).
61
+ *
62
+ * It was a contribution point defaulted to `undefined`, and `composition.ts`
63
+ * built the closure below out of `assetsLibrary.handle.service`. Two things
64
+ * that cost: the reach was a root's raw hold on another module's service
65
+ * rather than a declared edge, and **`test-server.ts` contributed nothing**,
66
+ * so every CMS storefront response under test resolved its asset embeds to
67
+ * `{}` — one seam on from the four late-bound setters this barrel's own
68
+ * header calls "the endpoint that only worked in production", and quieter,
69
+ * because an empty asset map is a plausible answer rather than a wrong one.
70
+ *
71
+ * The port is resolved per call through the `lazyPort` proxy, never captured
72
+ * (composition checklist item 3), and the edge is `assets_library` in this
73
+ * module's manifest `dependencies` — already there for the reference
74
+ * registry below, and now load-bearing for a second reason.
75
+ *
76
+ * The mapping itself is `services/asset-embed-resolver.ts`, a function of the
77
+ * port rather than of the context, so it is unit-tested over a stub with no
78
+ * container composed.
79
+ */
80
+ cmsAssetResolver: ctx
81
+ .asFunction(() => createAssetEmbedResolver(lazyPort(ctx, 'assetsLibraryPort')))
82
+ .singleton(),
83
+ cms: ctx
84
+ .asFunction(({ emFactory, redis, resolvedModuleRegistry }) => {
85
+ const result = cmsModule({
86
+ emFactory,
87
+ redis,
88
+ // Feature 096, T209/T210. The declarations are fixed at composition;
89
+ // presence is read per `describe()` call, so an operator switching a
90
+ // block owner off changes the next response with no restart and no
91
+ // re-composition (`contracts/block-definition.md` §4.1).
92
+ manifests: [...resolvedModuleRegistry],
93
+ isModulePresent: (moduleId) => effectiveState.isPresent(moduleId),
94
+ // Resolved per check rather than captured: Awilix's strict mode
95
+ // refuses a singleton holding the transient `requireAdmin` port, and
96
+ // a captured guard would keep admitting requests after `auth` goes.
97
+ requireAdmin: (permission) => async (req, reply) => ctx.cradle().requireAdmin(permission)(req, reply),
98
+ });
99
+ // Wired here, once, instead of by each composition root. Every closure
100
+ // reads the cradle at call time, so none of them depends on where in a
101
+ // root's ordering the settings store or the asset library appears.
102
+ result.handle.setPageBuilderBreakpointsResolver(async () => {
103
+ const { settingsReadPort, settingsChannelResolver } = ctx.cradle();
104
+ try {
105
+ const channelId = await settingsChannelResolver();
106
+ const [tabletMin, desktopMin] = await Promise.all([
107
+ settingsReadPort.get(CMS_PAGE_BUILDER_SETTING_CODES.BREAKPOINT_TABLET_MIN, channelId, breakpointSchema),
108
+ settingsReadPort.get(CMS_PAGE_BUILDER_SETTING_CODES.BREAKPOINT_DESKTOP_MIN, channelId, breakpointSchema),
109
+ ]);
110
+ return { tabletMin, desktopMin };
111
+ }
112
+ catch (err) {
113
+ // Unset settings are the normal state on a fresh platform; the
114
+ // registry's env-derived defaults are the answer, not an error.
115
+ // A settings store the platform is refusing to serve is not that:
116
+ // the builder would render the defaults as though they were the
117
+ // operator's breakpoints, and a save would then write over them.
118
+ rethrowIfModuleDisabled(err);
119
+ return result.handle.pageBuilderRegistry.getBreakpoints();
120
+ }
121
+ });
122
+ result.handle.setColorPaletteResolver(async () => {
123
+ const { settingsReadPort, settingsChannelResolver } = ctx.cradle();
124
+ try {
125
+ const channelId = await settingsChannelResolver();
126
+ return await settingsReadPort.get(CMS_PAGE_BUILDER_SETTING_CODES.COLOR_PALETTE, channelId, cmsColorPaletteSchema);
127
+ }
128
+ catch (err) {
129
+ // Same rule as the breakpoints above: an unset palette is empty, an
130
+ // absent settings store is not — an empty palette the builder then
131
+ // saves is data loss dressed as a default.
132
+ rethrowIfModuleDisabled(err);
133
+ return [];
134
+ }
135
+ });
136
+ result.handle.setColorPaletteWriter(async (entries, expectedVersion, actor) => {
137
+ const { settingsAdminService } = ctx.cradle();
138
+ await settingsAdminService.setValueForAllChannels(CMS_PAGE_BUILDER_SETTING_CODES.COLOR_PALETTE, entries, expectedVersion, actor);
139
+ return entries;
140
+ });
141
+ /**
142
+ * Feature 105, FR-032 — the deployment's reserved first path segments.
143
+ *
144
+ * Read **platform-wide** (`null`), which is what D-41 gives that tier a
145
+ * spelling for: the value is a fact about this deployment's storefront
146
+ * route table, not about one channel's content, and a page is published
147
+ * to *n* channels while its first segment can only collide once.
148
+ *
149
+ * A failing read **propagates**, unlike the two resolvers above, and
150
+ * the difference is the direction each one fails in. An unset palette is
151
+ * legitimately empty and rendering `[]` costs nothing; an unreadable
152
+ * reserved set rendered as `[]` would let through exactly the save this
153
+ * refusal exists to stop, which is a fail-open. The unset case is not
154
+ * that state anyway: the manifest declares `defaultValue: []`, so the
155
+ * store answers the empty list without an error.
156
+ */
157
+ result.handle.setReservedSlugSegmentsResolver(async () => {
158
+ const { settingsReadPort } = ctx.cradle();
159
+ return settingsReadPort.get(CMS_SETTING_CODES.RESERVED_SLUG_SEGMENTS, null, reservedSegmentsSchema);
160
+ });
161
+ // Installed once but *reading* the registration per call, so a
162
+ // deployment that decorates the name is honoured without this module
163
+ // caring where in a composition that happens. The `undefined` branch
164
+ // that used to stand here went with the contribution point (T118c):
165
+ // there is no composition in which the name is unset any more.
166
+ result.handle.setAssetResolver(async (assetId) => ctx.cradle().cmsAssetResolver(assetId));
167
+ return result;
168
+ })
169
+ .singleton(),
170
+ });
171
+ /**
172
+ * The contribution seam, deliberately **ungated** (feature 072, D-39).
173
+ *
174
+ * `megamenu` pushes its scanner in from `ctx.onBoot`, and boot hooks run
175
+ * regardless of effective state. As a `providePort` this was a transient gate,
176
+ * so an operator switching `cms` off on `/platform/modules` made `megamenu`'s
177
+ * hook throw `MODULE_DISABLED` during composition and the backend stopped
178
+ * starting — the exact inversion Constitution XVII forbids, since off is meant
179
+ * to be reversible and the screen that reverses it needs the API up.
180
+ *
181
+ * A scanner is inert until a delete asks it something; every behavioural seam
182
+ * this module publishes is still a port.
183
+ */
184
+ ctx.di.register({
185
+ cmsReferenceRegistry: ctx
186
+ .asFunction(({ cms }) => cms.handle.referenceRegistry)
187
+ .singleton(),
188
+ });
189
+ /**
190
+ * Feature 075, Phase P — the page read model.
191
+ *
192
+ * `seo` reads pages twice: to resolve one page's meta tags, and to enumerate
193
+ * the published ones for the sitemap. It reaches the `CmsPage` entity for
194
+ * both today. The record drops `body` and `content` — a sitemap has no use
195
+ * for a rendered tree, and shipping it would make every sitemap build carry
196
+ * the whole CMS through memory.
197
+ *
198
+ * A port, unlike `cmsReferenceRegistry` above: a scanner is inert until a
199
+ * delete asks it something, and a read is not.
200
+ */
201
+ ctx.di.providePort('cmsPageReadPort', ctx.asFunction(({ emFactory }) => new CmsPageReadService(emFactory)).singleton());
202
+ /**
203
+ * `specs/110-instance-repository/` T118c — the block read model.
204
+ *
205
+ * `megamenu` asks two questions about a block and read `cms_blocks` in raw SQL
206
+ * from a composition root for both: whether one exists, for the admin-side
207
+ * target validator, and what it renders as in a language, for the storefront
208
+ * resolver that inlines it into a menu payload. Two methods and not one wide
209
+ * read — a validator that took the localized record would fetch a content tree
210
+ * per menu item to test a row for existence.
211
+ *
212
+ * A port and not an ungated registration, on `cmsPageReadPort`'s reasoning one
213
+ * declaration up: a scanner is inert until a delete asks it something, and a
214
+ * read is not. An operator who has switched the CMS off has switched off the
215
+ * thing that owns the block, and a menu that quietly dropped the embed would
216
+ * report the content as gone rather than as unavailable.
217
+ */
218
+ ctx.di.providePort('cmsBlockReadPort', ctx.asFunction(({ emFactory }) => new CmsBlockReadService(emFactory)).singleton());
219
+ /**
220
+ * Feature 075 / D-87 — the predefined-block seeding seam.
221
+ *
222
+ * `newsletter` and `google_analytics` each ship a block whose *text* is
223
+ * theirs and whose *storage* is this module's, and both used to write these
224
+ * two tables in raw SQL. A port rather than an ungated contribution seam,
225
+ * because a seed is a write into this module's schema: an operator who has
226
+ * switched the CMS off has switched off the thing that owns those rows, and
227
+ * the gate is what says so. The callers decide presence in front of it — the
228
+ * seed runs at route registration, where a gate's "no" would stop the next
229
+ * start rather than one request — which is the shape the port's own doc block
230
+ * in `packages/contracts` states.
231
+ */
232
+ ctx.di.providePort('cmsBlockSeedPort', ctx.asFunction(({ emFactory }) => new CmsBlockSeedService(emFactory)).singleton());
233
+ ctx.onBoot(async () => {
234
+ // Presence is decided here — first, and outside anything that could catch it
235
+ // (issue #146, D-68). The reconcile writes rows, and a switched-off module
236
+ // writing at every boot is "behaves as if never installed" failing. A boot
237
+ // hook has no caller to answer, so the question is asked rather than thrown:
238
+ // `runBootHooks` re-throws as `ModuleCompositionError` and `index.ts` turns
239
+ // that into `process.exit(1)`, so an operator's flip would have taken the
240
+ // next start down.
241
+ if (!effectiveState.isPresent('cms'))
242
+ return;
243
+ // Idempotent seeded-Hook reconciliation. Unlike `_i18n`'s, this one reads
244
+ // nothing but its own tables, so it is safe in a boot hook wherever the
245
+ // pass places it.
246
+ await ctx.cradle().cms.handle.reconcile();
247
+ });
248
+ /**
249
+ * R12 — the edge that blocks deleting an asset embedded in a page, a block or
250
+ * a template (T143a). Both roots used to push this descriptor into
251
+ * `assets_library`' registry: the scan belongs to whoever owns the columns it
252
+ * reads, and a root's registration survives this module being switched off,
253
+ * which is the Constitution XVII hole the cluster closes.
254
+ *
255
+ * A second hook, and deliberately **unprobed** (D-68). It used to share the
256
+ * reconcile's hook, so probing that one would have stopped the scanner too —
257
+ * and a deactivated page still embeds its assets. The Library asks this
258
+ * registry before every soft-delete; with the scanner gone an operator could
259
+ * delete an asset the switched-off CMS still references, and the loss would
260
+ * only surface as a broken page at reactivation. The registry's enumeration
261
+ * policy says the same thing from the other side: contributions here are
262
+ * `honoured` while their owner is absent, because a scanner is integrity
263
+ * rather than a surface.
264
+ */
265
+ ctx.onBoot(() => {
266
+ const { assetReferenceRegistry, emFactory } = ctx.cradle();
267
+ registerCmsAssetReferences(assetReferenceRegistry, emFactory);
268
+ });
269
+ ctx.routes(async (app) => {
270
+ await ctx.cradle().cms.plugin(app);
271
+ });
272
+ /**
273
+ * This module's rows carry a language code, so it answers "who still points at
274
+ * this language?" about its own tables (feature 077, D-87), where the owner used
275
+ * to count them with SQL naming this module's tables.
276
+ *
277
+ * A **contribution** hook: it pushes an inert descriptor into `languageReferenceRegistry`,
278
+ * an ungated registry, and carries no presence probe (D-62/D-68). Probing
279
+ * would be wrong in the dangerous direction — a switched-off module still owns
280
+ * the rows, so its language must still refuse the delete, which is the
281
+ * enumeration policy the registry states.
282
+ */
283
+ ctx.onBoot(() => {
284
+ registerCmsLanguageReferences(lazyPort(ctx, 'languageReferenceRegistry'), ctx.cradle().emFactory);
285
+ });
286
+ }
287
+ /**
288
+ * The module's persisted entity classes, on the `./backend` subpath, as one
289
+ * array and **no named class export** (D-168).
290
+ *
291
+ * This is the shape the platform reads when the package is *installed*: the
292
+ * boot-time loader (`src/packages/package-runtime.ts`, `exported['entities']`)
293
+ * and the static declaration reader (`scripts/lib/package-declarations.ts`),
294
+ * which is the third source of `check:module-boundary`'s `table→owner` map and
295
+ * the package pass of `check-entity-tenant-classification`. A missing array is
296
+ * answered with `[]` — zero entities registered, no error anywhere.
297
+ */
298
+ export const entities = [
299
+ CmsBlock,
300
+ CmsHookBlockAttachment,
301
+ CmsHook,
302
+ CmsPage,
303
+ CmsTemplate,
304
+ ];
305
+ /**
306
+ * The sales-channel membership bridge this module owns (feature 120, FR-015).
307
+ *
308
+ * Exported as well as registered because the owning module is the only honest
309
+ * source for it: a caller that composes no platform — the bare-database test
310
+ * harness, which constructs the kernel's membership service directly — declares
311
+ * these from here rather than from a list of nine it keeps itself, which is
312
+ * exactly the total map this feature deleted.
313
+ */
314
+ export const salesChannelBridges = [
315
+ { entityType: 'cms-page', table: 'sales_channel_cms_pages', entityIdColumn: 'cms_page_id' },
316
+ ];
317
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/backend/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,qBAAqB,GAOtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAsB,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,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AS,EAAE,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH;;;;;;;;;;;;;;;;OAgBG;IACH,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;QACd,MAAM,EAAE,sBAAsB,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,MAAM,EAAa,CAAC;QACtE,0BAA0B,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACvB,MAAM,GAAG,CAAC,MAAM,EAAa,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH;;;;;;;;;;OAUG;IACH,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE;QACd,6BAA6B,CAC3B,QAAQ,CAAkC,GAAG,EAAE,2BAA2B,CAAC,EAC3E,GAAG,CAAC,MAAM,EAAa,CAAC,SAAS,CAClC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,QAAQ;IACR,sBAAsB;IACtB,OAAO;IACP,OAAO;IACP,WAAW;CACZ,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAI3B;IACH,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,aAAa,EAAE;CAC5F,CAAC"}
@@ -0,0 +1,81 @@
1
+ import type { FastifyInstance } from 'fastify';
2
+ import type { EntityManager } from '@mikro-orm/postgresql';
3
+ import type { Redis } from 'ioredis';
4
+ import type { CmsColorPaletteEntry, ModuleManifest } from '@endora-commerce/contracts';
5
+ import { PageBuilderRegistry, type PageBuilderBreakpointsResolver, type ColorPaletteResolver } from './services/page-builder-registry.js';
6
+ import { CmsPageService, type ReservedSlugSegmentsResolver } from './services/cms-page-service.js';
7
+ import { CmsBlockService } from './services/cms-block-service.js';
8
+ import { CmsTemplateService } from './services/cms-template-service.js';
9
+ import { CmsReferenceRegistry } from './services/cms-reference-registry.js';
10
+ import { StorefrontResolver, type CmsAssetResolver } from './services/storefront-resolver.js';
11
+ import { CmsHookService } from './services/cms-hook-service.js';
12
+ import { CmsCache } from './services/cms-cache.js';
13
+ import type { RequireAdminFactory } from '@endora-commerce/platform/kernel';
14
+ export interface ColorPaletteAuditContext {
15
+ actorAdminUserId: string | null;
16
+ requestId?: string | null;
17
+ }
18
+ export type ColorPaletteWriter = (entries: CmsColorPaletteEntry[], expectedVersion: string | null, actor: ColorPaletteAuditContext) => Promise<CmsColorPaletteEntry[]>;
19
+ export interface CmsModuleOptions {
20
+ emFactory: () => EntityManager;
21
+ /**
22
+ * Required since feature 072 (T093). It was optional, and `routes.admin.ts`
23
+ * defaulted it to `?? (async () => {})` — a permission gate whose absent form
24
+ * is open. It is resolved from the container now, so there is no omission
25
+ * left to default.
26
+ */
27
+ requireAdmin: RequireAdminFactory;
28
+ /**
29
+ * When provided, the storefront resolver caches its responses in Redis
30
+ * with a 5-minute TTL. Tests pass a custom `cacheOptions.ttlSeconds=0`
31
+ * to disable caching when they need every read to hit the DB.
32
+ */
33
+ redis?: Redis;
34
+ /**
35
+ * The composed modules, from which the Page Builder registry takes every
36
+ * block and category declaration (feature 096, T209). Core manifests plus
37
+ * this deployment's overlay modules, in the shape both composition roots
38
+ * contribute as `resolvedModuleRegistry`.
39
+ */
40
+ manifests?: ReadonlyArray<{
41
+ manifest: ModuleManifest;
42
+ }>;
43
+ /** Effective presence, read by the registry at enumeration (FR-010). */
44
+ isModulePresent?: (moduleId: string) => boolean;
45
+ }
46
+ export interface CmsModuleHandle {
47
+ pageBuilderRegistry: PageBuilderRegistry;
48
+ pageService: CmsPageService;
49
+ blockService: CmsBlockService;
50
+ templateService: CmsTemplateService;
51
+ hookService: CmsHookService;
52
+ referenceRegistry: CmsReferenceRegistry;
53
+ storefrontResolver: StorefrontResolver;
54
+ /** Storefront read-through cache — `undefined` when no Redis was wired. */
55
+ cache: CmsCache | undefined;
56
+ /** Idempotent reconciler — called by composition before HTTP starts. */
57
+ reconcile: () => Promise<{
58
+ inserted: number;
59
+ preservedExisting: number;
60
+ }>;
61
+ /** Late-bound resolver for breakpoint settings (wired from composition after Settings module boots). */
62
+ setPageBuilderBreakpointsResolver: (resolver: PageBuilderBreakpointsResolver) => void;
63
+ /** Late-bound resolver for the global Page Builder color palette. */
64
+ setColorPaletteResolver: (resolver: ColorPaletteResolver) => void;
65
+ /** Late-bound writer for the global Page Builder color palette. */
66
+ setColorPaletteWriter: (writer: ColorPaletteWriter) => void;
67
+ /**
68
+ * Late-bound reader for the deployment's reserved first path segments
69
+ * (feature 105, FR-032). Installed by `registerModule`, which is where every
70
+ * settings-backed value of this module is wired, so there is no setter left
71
+ * for a composition root to forget.
72
+ */
73
+ setReservedSlugSegmentsResolver: (resolver: ReservedSlugSegmentsResolver) => void;
74
+ getColorPaletteWriter: () => ColorPaletteWriter | null;
75
+ setAssetResolver: (resolver: CmsAssetResolver | null) => void;
76
+ }
77
+ export declare function cmsModule(options: CmsModuleOptions): {
78
+ plugin: (app: FastifyInstance) => Promise<void>;
79
+ handle: CmsModuleHandle;
80
+ };
81
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/backend/plugin.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEvF,OAAO,EAAE,mBAAmB,EAAE,KAAK,8BAA8B,EAAE,KAAK,oBAAoB,EAAE,MAAM,qCAAqC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AAE,eAAe,CAAC;IAC9B,eAAe,EAAE,kBAAkB,CAAC;IACpC,WAAW,EAAE,cAAc,CAAC;IAC5B,iBAAiB,EAAE,oBAAoB,CAAC;IACxC,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,2EAA2E;IAC3E,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,wEAAwE;IACxE,SAAS,EAAE,MAAM,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1E,wGAAwG;IACxG,iCAAiC,EAAE,CAAC,QAAQ,EAAE,8BAA8B,KAAK,IAAI,CAAC;IACtF,qEAAqE;IACrE,uBAAuB,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAClE,mEAAmE;IACnE,qBAAqB,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC5D;;;;;OAKG;IACH,+BAA+B,EAAE,CAAC,QAAQ,EAAE,4BAA4B,KAAK,IAAI,CAAC;IAClF,qBAAqB,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACvD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CAC/D;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG;IACpD,MAAM,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,EAAE,eAAe,CAAC;CACzB,CAgFA"}
@@ -0,0 +1,81 @@
1
+ // CMS module plugin — feature 014 / T033.
2
+ //
3
+ // Phase 2 ships the registry + the seeded-Hook reconciler hook only.
4
+ // Admin + storefront route registrations land in subsequent user-story
5
+ // phases (Pages in US1, Blocks in US2, Hooks in US4, Templates in US5,
6
+ // PageBuilder config endpoint in US6). The legacy cms_pages module's
7
+ // plugin continues to register its routes for one release; it will be
8
+ // retired in the cleanup PR after the new admin surface is complete.
9
+ import { PageBuilderRegistry } from './services/page-builder-registry.js';
10
+ import { reconcileSeededHooks } from './services/seed-hooks.js';
11
+ import { resolvePageBuilderBreakpointsFromEnv } from '../manifest.js';
12
+ import { CmsPageService } from './services/cms-page-service.js';
13
+ import { CmsBlockService } from './services/cms-block-service.js';
14
+ import { CmsTemplateService } from './services/cms-template-service.js';
15
+ import { CmsReferenceRegistry } from './services/cms-reference-registry.js';
16
+ import { StorefrontResolver } from './services/storefront-resolver.js';
17
+ import { CmsHookService } from './services/cms-hook-service.js';
18
+ import { CmsCache } from './services/cms-cache.js';
19
+ import { registerCmsAdminRoutes } from './routes.admin.js';
20
+ import { registerCmsStorefrontRoutes } from './routes.storefront.js';
21
+ export function cmsModule(options) {
22
+ const pageBuilderRegistry = new PageBuilderRegistry({
23
+ breakpoints: resolvePageBuilderBreakpointsFromEnv(),
24
+ // Feature 096, T209 — the registry is populated from the composed modules'
25
+ // `blocks` and `blockCategories` declarations. The 35-name
26
+ // `register('cms', …)` call that stood here declared five of `catalog`'s
27
+ // blocks as `cms`', so the descriptor's `ownerModule` was wrong for every
28
+ // one of them and FR-010 had nothing true to filter on.
29
+ manifests: options.manifests,
30
+ isModulePresent: options.isModulePresent,
31
+ });
32
+ const cache = options.redis ? new CmsCache(options.redis, {}) : undefined;
33
+ const referenceRegistry = new CmsReferenceRegistry(options.emFactory);
34
+ const pageService = new CmsPageService(options.emFactory, () => pageBuilderRegistry.knownNames(), cache, referenceRegistry);
35
+ const blockService = new CmsBlockService(options.emFactory, () => pageBuilderRegistry.knownNames(), referenceRegistry, cache);
36
+ const templateService = new CmsTemplateService(options.emFactory, () => pageBuilderRegistry.knownNames(), referenceRegistry, cache);
37
+ const hookService = new CmsHookService(options.emFactory, cache);
38
+ const storefrontResolver = new StorefrontResolver(options.emFactory, cache);
39
+ let colorPaletteWriter = null;
40
+ const handle = {
41
+ pageBuilderRegistry,
42
+ pageService,
43
+ blockService,
44
+ templateService,
45
+ hookService,
46
+ referenceRegistry,
47
+ storefrontResolver,
48
+ cache,
49
+ reconcile: () => reconcileSeededHooks(options.emFactory),
50
+ setPageBuilderBreakpointsResolver: (resolver) => {
51
+ pageBuilderRegistry.setBreakpointsResolver(resolver);
52
+ },
53
+ setColorPaletteResolver: (resolver) => {
54
+ pageBuilderRegistry.setColorPaletteResolver(resolver);
55
+ },
56
+ setColorPaletteWriter: (writer) => {
57
+ colorPaletteWriter = writer;
58
+ },
59
+ setReservedSlugSegmentsResolver: (resolver) => {
60
+ pageService.setReservedSegmentsResolver(resolver);
61
+ },
62
+ getColorPaletteWriter: () => colorPaletteWriter,
63
+ setAssetResolver: (resolver) => {
64
+ storefrontResolver.setAssetResolver(resolver);
65
+ },
66
+ };
67
+ const plugin = async (app) => {
68
+ await registerCmsAdminRoutes(app, {
69
+ pageService,
70
+ blockService,
71
+ templateService,
72
+ hookService,
73
+ pageBuilderRegistry,
74
+ getColorPaletteWriter: () => colorPaletteWriter,
75
+ requireAdmin: options.requireAdmin,
76
+ });
77
+ await registerCmsStorefrontRoutes(app, { storefrontResolver });
78
+ };
79
+ return { plugin, handle };
80
+ }
81
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../src/backend/plugin.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AACrE,sEAAsE;AACtE,qEAAqE;AAOrE,OAAO,EAAE,mBAAmB,EAAkE,MAAM,qCAAqC,CAAC;AAC1I,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,oCAAoC,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAqC,MAAM,gCAAgC,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EA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,qBAAqB,EAAE,GAAG,EAAE,CAAC,kBAAkB;YAC/C,YAAY,EAAE,OAAO,CAAC,YAAY;SACnC,CAAC,CAAC;QACH,MAAM,2BAA2B,CAAC,GAAG,EAAE,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACjE,CAAC,CAAC;IAEF,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { FastifyInstance, FastifyRequest } from 'fastify';
2
+ import type { ColorPaletteAuditContext, ColorPaletteWriter } from './plugin.js';
3
+ import type { CmsPageService } from './services/cms-page-service.js';
4
+ import type { PageBuilderRegistry } from './services/page-builder-registry.js';
5
+ import type { CmsBlockService } from './services/cms-block-service.js';
6
+ import type { CmsHookService } from './services/cms-hook-service.js';
7
+ import type { CmsTemplateService } from './services/cms-template-service.js';
8
+ import type { RequireAdminFactory } from '@endora-commerce/platform/kernel';
9
+ export declare function registerCmsAdminRoutes(app: FastifyInstance, deps: {
10
+ pageService: CmsPageService;
11
+ blockService: CmsBlockService;
12
+ hookService: CmsHookService;
13
+ templateService: CmsTemplateService;
14
+ pageBuilderRegistry: PageBuilderRegistry;
15
+ getColorPaletteWriter?: () => ColorPaletteWriter | null;
16
+ resolveAdminAuditContext?: (req: FastifyRequest) => ColorPaletteAuditContext;
17
+ requireAdmin: RequireAdminFactory;
18
+ }): Promise<void>;
19
+ //# sourceMappingURL=routes.admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.admin.d.ts","sourceRoot":"","sources":["../../src/backend/routes.admin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAc/D,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,eAAe,EACpB,IAAI,EAAE;IACJ,WAAW,EAAE,cAAc,CAAC;IAC5B,YAAY,EAAE,eAAe,CAAC;IAC9B,WAAW,EAAE,cAAc,CAAC;IAC5B,eAAe,EAAE,kBAAkB,CAAC;IACpC,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,qBAAqB,CAAC,EAAE,MAAM,kBAAkB,GAAG,IAAI,CAAC;IACxD,wBAAwB,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,wBAAwB,CAAC;IAC7E,YAAY,EAAE,mBAAmB,CAAC;CACnC,GACA,OAAO,CAAC,IAAI,CAAC,CAsTf"}