@riverbankcms/sdk 0.129.0 → 0.129.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 (260) hide show
  1. package/README.md +19 -256
  2. package/dist/{PreviewEditorSidebar-B43CJ0g_.mjs → PreviewEditorSidebar-DceRseRV.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-DHirVkeM.mjs → PreviewEditorUI-BNunq3kk.mjs} +2 -2
  4. package/dist/{SdkPreviewModeRuntime-BJumZy1B.mjs → SdkPreviewModeRuntime-Bt87-62u.mjs} +3 -3
  5. package/dist/{SiteChromeCustomizeContext-D9SlpwEj.mjs → SiteChromeCustomizeContext-BLl-OlL4.mjs} +460 -393
  6. package/dist/_dts/ai/src/contracts/commandExposure.d.ts +1 -1
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +4897 -4897
  8. package/dist/_dts/api/src/index.d.ts +2 -1
  9. package/dist/_dts/api/src/sdk-event-management.d.ts +53 -0
  10. package/dist/_dts/api/src/sdk-event-schedule.d.ts +3 -6
  11. package/dist/_dts/api/src/sdkContracts.d.ts +37 -50
  12. package/dist/_dts/api/src/sdkThemeWire.d.ts +2595 -0
  13. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +13 -29
  14. package/dist/_dts/media-core/src/index.d.ts +1 -0
  15. package/dist/_dts/sdk/src/config/types.d.ts +4 -4
  16. package/dist/_dts/sdk/src/version.d.ts +1 -1
  17. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
  18. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -0
  19. package/dist/_dts/theme-core/src/site-styles/headerLayoutStyleCatalog.d.ts +254 -0
  20. package/dist/_dts/theme-core/src/site-styles/headerLegacyLooks.d.ts +372 -0
  21. package/dist/_dts/theme-core/src/site-styles/headerLookBranding.d.ts +106 -0
  22. package/dist/_dts/theme-core/src/site-styles/headerLookSelection.d.ts +2 -0
  23. package/dist/_dts/theme-core/src/site-styles/headerLookTypes.d.ts +212 -0
  24. package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +7 -841
  25. package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +3 -0
  26. package/dist/_dts/theme-core/src/site-styles/headerStyleCompilerPrimitives.d.ts +23 -0
  27. package/dist/client/client.mjs +492 -426
  28. package/dist/client/hooks.mjs +59 -36
  29. package/dist/client/rendering/client.mjs +593 -547
  30. package/dist/client/rendering.mjs +491 -425
  31. package/dist/preview-next/client/runtime.mjs +3 -3
  32. package/dist/{sdk-runtime-CfZd5pAm.mjs → sdk-runtime-C20CVWbb.mjs} +1 -1
  33. package/dist/{separator-DkTe68HE.mjs → separator-BE3NCquy.mjs} +1 -1
  34. package/dist/server/components.mjs +72 -49
  35. package/dist/server/config-validation.mjs +59 -36
  36. package/dist/server/config.mjs +59 -36
  37. package/dist/server/data.mjs +59 -36
  38. package/dist/server/index.mjs +1 -1
  39. package/dist/server/manifest.mjs +4966 -0
  40. package/dist/server/next.mjs +73 -50
  41. package/dist/server/page-converter.mjs +40 -36
  42. package/dist/server/prebuild.mjs +1 -1
  43. package/dist/server/rendering/server.mjs +72 -49
  44. package/dist/server/rendering.mjs +72 -49
  45. package/dist/server/routing.mjs +472 -402
  46. package/dist/server/server.mjs +60 -37
  47. package/dist/server/theme-bridge.mjs +70 -66
  48. package/package.json +9 -12
  49. package/dist/_dts/api/src/event-presentation.d.ts +0 -14
  50. package/dist/_dts/blocks/src/definitions.d.ts +0 -14
  51. package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +0 -53
  52. package/dist/_dts/sdk/src/cli/commands/audit.d.ts +0 -101
  53. package/dist/_dts/sdk/src/cli/commands/block.d.ts +0 -24
  54. package/dist/_dts/sdk/src/cli/commands/compare.d.ts +0 -62
  55. package/dist/_dts/sdk/src/cli/commands/content-type.d.ts +0 -10
  56. package/dist/_dts/sdk/src/cli/commands/content.d.ts +0 -56
  57. package/dist/_dts/sdk/src/cli/commands/delete.d.ts +0 -14
  58. package/dist/_dts/sdk/src/cli/commands/deploy.d.ts +0 -43
  59. package/dist/_dts/sdk/src/cli/commands/drafts.d.ts +0 -18
  60. package/dist/_dts/sdk/src/cli/commands/entry.d.ts +0 -55
  61. package/dist/_dts/sdk/src/cli/commands/env.d.ts +0 -31
  62. package/dist/_dts/sdk/src/cli/commands/event.d.ts +0 -23
  63. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +0 -12
  64. package/dist/_dts/sdk/src/cli/commands/identifiers.d.ts +0 -10
  65. package/dist/_dts/sdk/src/cli/commands/init-docs.d.ts +0 -13
  66. package/dist/_dts/sdk/src/cli/commands/manifest.d.ts +0 -10
  67. package/dist/_dts/sdk/src/cli/commands/media-validation.d.ts +0 -3
  68. package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +0 -11
  69. package/dist/_dts/sdk/src/cli/commands/navigation.d.ts +0 -12
  70. package/dist/_dts/sdk/src/cli/commands/page.d.ts +0 -14
  71. package/dist/_dts/sdk/src/cli/commands/publish-all.d.ts +0 -50
  72. package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +0 -10
  73. package/dist/_dts/sdk/src/cli/commands/pull-dry-run.d.ts +0 -70
  74. package/dist/_dts/sdk/src/cli/commands/pull-scope-diff.d.ts +0 -8
  75. package/dist/_dts/sdk/src/cli/commands/pull.d.ts +0 -43
  76. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +0 -3
  77. package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +0 -19
  78. package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +0 -42
  79. package/dist/_dts/sdk/src/cli/commands/push/execute/localMediaReporting.d.ts +0 -23
  80. package/dist/_dts/sdk/src/cli/commands/push/execute/media.d.ts +0 -22
  81. package/dist/_dts/sdk/src/cli/commands/push/execute/metadata.d.ts +0 -1
  82. package/dist/_dts/sdk/src/cli/commands/push/execute/reporting.d.ts +0 -7
  83. package/dist/_dts/sdk/src/cli/commands/push/execute/theme.d.ts +0 -63
  84. package/dist/_dts/sdk/src/cli/commands/push/filter.d.ts +0 -15
  85. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +0 -29
  86. package/dist/_dts/sdk/src/cli/commands/push/normalizeLocalContent.d.ts +0 -2
  87. package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +0 -32
  88. package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +0 -15
  89. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +0 -25
  90. package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +0 -83
  91. package/dist/_dts/sdk/src/cli/commands/push/scopes/eventCategories.d.ts +0 -4
  92. package/dist/_dts/sdk/src/cli/commands/push/scopes/events.d.ts +0 -4
  93. package/dist/_dts/sdk/src/cli/commands/push/scopes/mediaPrep.d.ts +0 -14
  94. package/dist/_dts/sdk/src/cli/commands/push/scopes/pushScopeGeneric.d.ts +0 -6
  95. package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +0 -87
  96. package/dist/_dts/sdk/src/cli/commands/push/scopes/venues.d.ts +0 -4
  97. package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +0 -48
  98. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +0 -17
  99. package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +0 -56
  100. package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +0 -34
  101. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +0 -54
  102. package/dist/_dts/sdk/src/cli/commands/push.d.ts +0 -40
  103. package/dist/_dts/sdk/src/cli/commands/setup.d.ts +0 -3
  104. package/dist/_dts/sdk/src/cli/commands/style.d.ts +0 -60
  105. package/dist/_dts/sdk/src/cli/commands/verify.d.ts +0 -11
  106. package/dist/_dts/sdk/src/cli/commands/webhooks.d.ts +0 -44
  107. package/dist/_dts/sdk/src/cli/config-loader.d.ts +0 -47
  108. package/dist/_dts/sdk/src/cli/content/collectionWriters.d.ts +0 -23
  109. package/dist/_dts/sdk/src/cli/content/edit/format.d.ts +0 -2
  110. package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +0 -14
  111. package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +0 -46
  112. package/dist/_dts/sdk/src/cli/content/entryPaths.d.ts +0 -6
  113. package/dist/_dts/sdk/src/cli/content/footerFile.d.ts +0 -10
  114. package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +0 -39
  115. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +0 -5
  116. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +0 -17
  117. package/dist/_dts/sdk/src/cli/content/media-manifest.d.ts +0 -13
  118. package/dist/_dts/sdk/src/cli/content/metadataAfterPush.d.ts +0 -25
  119. package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +0 -29
  120. package/dist/_dts/sdk/src/cli/content/reader.d.ts +0 -488
  121. package/dist/_dts/sdk/src/cli/content/writer.d.ts +0 -142
  122. package/dist/_dts/sdk/src/cli/env-scope.d.ts +0 -2
  123. package/dist/_dts/sdk/src/cli/env.d.ts +0 -71
  124. package/dist/_dts/sdk/src/cli/errors.d.ts +0 -62
  125. package/dist/_dts/sdk/src/cli/helpers/ai-runtime.d.ts +0 -2
  126. package/dist/_dts/sdk/src/cli/helpers.d.ts +0 -399
  127. package/dist/_dts/sdk/src/cli/index.d.ts +0 -11
  128. package/dist/_dts/sdk/src/cli/init-docs/constants.d.ts +0 -16
  129. package/dist/_dts/sdk/src/cli/init-docs/index.d.ts +0 -12
  130. package/dist/_dts/sdk/src/cli/init-docs/templates.d.ts +0 -18
  131. package/dist/_dts/sdk/src/cli/init-docs/zod-to-markdown.d.ts +0 -28
  132. package/dist/_dts/sdk/src/cli/load-config.d.ts +0 -14
  133. package/dist/_dts/sdk/src/cli/media/identifiers.d.ts +0 -18
  134. package/dist/_dts/sdk/src/cli/media/local-media.d.ts +0 -14
  135. package/dist/_dts/sdk/src/cli/media/local-sync.d.ts +0 -91
  136. package/dist/_dts/sdk/src/cli/media/portable.d.ts +0 -11
  137. package/dist/_dts/sdk/src/cli/media/rich-text.d.ts +0 -12
  138. package/dist/_dts/sdk/src/cli/media/value-utils.d.ts +0 -15
  139. package/dist/_dts/sdk/src/cli/media/write-guard.d.ts +0 -52
  140. package/dist/_dts/sdk/src/cli/merge-remote/entryLocal.d.ts +0 -3
  141. package/dist/_dts/sdk/src/cli/merge-remote/entryMerge.d.ts +0 -78
  142. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePlan.d.ts +0 -45
  143. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +0 -24
  144. package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +0 -18
  145. package/dist/_dts/sdk/src/cli/merge-remote/entryRemote.d.ts +0 -9
  146. package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +0 -48
  147. package/dist/_dts/sdk/src/cli/merge-remote/mergeFieldChanges.d.ts +0 -22
  148. package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +0 -3
  149. package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +0 -78
  150. package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +0 -36
  151. package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +0 -23
  152. package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +0 -17
  153. package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +0 -46
  154. package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +0 -32
  155. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +0 -27
  156. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +0 -63
  157. package/dist/_dts/sdk/src/cli/migrations/entries.d.ts +0 -28
  158. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +0 -73
  159. package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +0 -11
  160. package/dist/_dts/sdk/src/cli/output.d.ts +0 -133
  161. package/dist/_dts/sdk/src/cli/program.d.ts +0 -29
  162. package/dist/_dts/sdk/src/cli/push-config.d.ts +0 -49
  163. package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +0 -51
  164. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +0 -13
  165. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +0 -170
  166. package/dist/_dts/sdk/src/cli/site-commands/commandRuntimeCompat.d.ts +0 -21
  167. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +0 -32
  168. package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +0 -53
  169. package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +0 -65
  170. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +0 -24
  171. package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +0 -68
  172. package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +0 -53
  173. package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +0 -8
  174. package/dist/_dts/sdk/src/cli/site-commands/localBlockManifestResolver.d.ts +0 -31
  175. package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +0 -57
  176. package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +0 -82
  177. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +0 -84
  178. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +0 -39
  179. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionPlan.d.ts +0 -8
  180. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +0 -97
  181. package/dist/_dts/sdk/src/cli/site-commands/residualSettingsTrimming.d.ts +0 -15
  182. package/dist/_dts/sdk/src/cli/sync/diff.d.ts +0 -222
  183. package/dist/_dts/sdk/src/cli/sync/executor.d.ts +0 -84
  184. package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +0 -39
  185. package/dist/_dts/sdk/src/cli/sync/index.d.ts +0 -10
  186. package/dist/_dts/sdk/src/cli/sync/mapper.d.ts +0 -41
  187. package/dist/_dts/sdk/src/cli/sync/media-sync.d.ts +0 -15
  188. package/dist/_dts/sdk/src/cli/sync/media.d.ts +0 -158
  189. package/dist/_dts/sdk/src/cli/sync/syncResultAggregation.d.ts +0 -4
  190. package/dist/_dts/sdk/src/cli/sync/validation.d.ts +0 -68
  191. package/dist/_dts/sdk/src/cli/utils/checksum.d.ts +0 -1
  192. package/dist/_dts/sdk/src/client/management/blocks.d.ts +0 -19
  193. package/dist/_dts/sdk/src/client/management/catalog.d.ts +0 -10
  194. package/dist/_dts/sdk/src/client/management/entries.d.ts +0 -6
  195. package/dist/_dts/sdk/src/client/management/eventCategories.d.ts +0 -6
  196. package/dist/_dts/sdk/src/client/management/events.d.ts +0 -7
  197. package/dist/_dts/sdk/src/client/management/footer.d.ts +0 -9
  198. package/dist/_dts/sdk/src/client/management/forms.d.ts +0 -6
  199. package/dist/_dts/sdk/src/client/management/http.d.ts +0 -79
  200. package/dist/_dts/sdk/src/client/management/identifiers.d.ts +0 -11
  201. package/dist/_dts/sdk/src/client/management/index.d.ts +0 -41
  202. package/dist/_dts/sdk/src/client/management/media.d.ts +0 -72
  203. package/dist/_dts/sdk/src/client/management/navigation.d.ts +0 -6
  204. package/dist/_dts/sdk/src/client/management/pages.d.ts +0 -6
  205. package/dist/_dts/sdk/src/client/management/pull.d.ts +0 -6
  206. package/dist/_dts/sdk/src/client/management/settings-branding.d.ts +0 -32
  207. package/dist/_dts/sdk/src/client/management/settings.d.ts +0 -6
  208. package/dist/_dts/sdk/src/client/management/theme.d.ts +0 -8
  209. package/dist/_dts/sdk/src/client/management/types.d.ts +0 -1069
  210. package/dist/_dts/sdk/src/client/management/venues.d.ts +0 -6
  211. package/dist/_dts/sdk/src/client/management/webhooks.d.ts +0 -3
  212. package/dist/_dts/sdk/src/test/env.d.ts +0 -4
  213. package/dist/_dts/site-commands/src/adapter.d.ts +0 -23
  214. package/dist/_dts/site-commands/src/appointmentCommandSchemas.d.ts +0 -100
  215. package/dist/_dts/site-commands/src/capabilityGaps.d.ts +0 -8
  216. package/dist/_dts/site-commands/src/commandContract.d.ts +0 -1277
  217. package/dist/_dts/site-commands/src/commandDomain.d.ts +0 -20
  218. package/dist/_dts/site-commands/src/commandIdentifiers.d.ts +0 -7
  219. package/dist/_dts/site-commands/src/commandValidation.d.ts +0 -10
  220. package/dist/_dts/site-commands/src/commands.d.ts +0 -1983
  221. package/dist/_dts/site-commands/src/domain.d.ts +0 -104
  222. package/dist/_dts/site-commands/src/eventCommandContent.d.ts +0 -11
  223. package/dist/_dts/site-commands/src/exposure.d.ts +0 -41
  224. package/dist/_dts/site-commands/src/guards.d.ts +0 -1
  225. package/dist/_dts/site-commands/src/index.d.ts +0 -18
  226. package/dist/_dts/site-commands/src/metadata.d.ts +0 -555
  227. package/dist/_dts/site-commands/src/pagePaths.d.ts +0 -6
  228. package/dist/_dts/site-commands/src/planner.d.ts +0 -58
  229. package/dist/_dts/site-commands/src/refContributions.d.ts +0 -11
  230. package/dist/_dts/site-commands/src/refs.d.ts +0 -90
  231. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +0 -405
  232. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +0 -46
  233. package/dist/_dts/site-commands/src/stableJson.d.ts +0 -5
  234. package/dist/_dts/site-commands/src/staticExecutionGaps.d.ts +0 -10
  235. package/dist/_dts/site-commands/src/venueCommandMapping.d.ts +0 -21
  236. package/dist/_dts/theme-core/src/data.d.ts +0 -12
  237. package/dist/_dts/theme-core/src/site-styles/headerStyleParts.d.ts +0 -4
  238. package/dist/cli/index.mjs +0 -162988
  239. package/dist/cli/init-docs/content/agents-section.md +0 -67
  240. package/dist/cli/init-docs/content/cli-reference.md +0 -1238
  241. package/dist/cli/init-docs/content/content-management.md +0 -792
  242. package/dist/cli/init-docs/content/context-brand.md +0 -125
  243. package/dist/cli/init-docs/content/context-brief.md +0 -77
  244. package/dist/cli/init-docs/content/context-knowledge.md +0 -111
  245. package/dist/cli/init-docs/content/getting-started.md +0 -171
  246. package/dist/cli/init-docs/content/site-workflows-readme.md +0 -96
  247. package/dist/cli/init-docs/content/workflow-add-block.md +0 -299
  248. package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +0 -83
  249. package/dist/cli/init-docs/content/workflow-block-extensions.md +0 -370
  250. package/dist/cli/init-docs/content/workflow-cmsify-page.md +0 -357
  251. package/dist/cli/init-docs/content/workflow-content-types.md +0 -330
  252. package/dist/cli/init-docs/content/workflow-create-page.md +0 -212
  253. package/dist/cli/init-docs/content/workflow-custom-block.md +0 -470
  254. package/dist/cli/init-docs/content/workflow-editor-workflows.md +0 -130
  255. package/dist/cli/init-docs/content/workflow-isr-revalidation.md +0 -158
  256. package/dist/cli/init-docs/content/workflow-preview-mode.md +0 -252
  257. package/dist/cli/init-docs/content/workflow-publish.md +0 -285
  258. package/dist/cli/init-docs/content/workflow-remote-setup.md +0 -51
  259. package/dist/cli/init-docs/content/workflow-templates.md +0 -381
  260. /package/dist/_dts/{sdk/src/cli/utils/mime.d.ts → media-core/src/mimeType.d.ts} +0 -0
@@ -1,32 +0,0 @@
1
- import type { EnvTarget } from '../helpers';
2
- export type BaseSnapshotTarget = Readonly<{
3
- env: EnvTarget;
4
- siteId: string;
5
- }>;
6
- export type BaseSnapshotStoredTarget = Readonly<{
7
- env: EnvTarget;
8
- siteIdHash: string;
9
- }>;
10
- export type WriteBaseSnapshotsInput<TItem, TSnapshot> = Readonly<{
11
- contentDir: string;
12
- rootDir: string;
13
- snapshotDir: string;
14
- items: readonly TItem[];
15
- toSnapshot(item: TItem): TSnapshot;
16
- fileNameForSnapshot(snapshot: TSnapshot): string;
17
- cleanupMissing?: boolean;
18
- }>;
19
- export type WriteBaseSnapshotsResult = Readonly<{
20
- rootDir: string;
21
- count: number;
22
- }>;
23
- export declare function baseSnapshotRoot(contentDir: string, baseKind: string): string;
24
- export declare function baseSnapshotStoredTarget(target: BaseSnapshotTarget): BaseSnapshotStoredTarget;
25
- export declare function siteScopedSnapshotDir(input: Readonly<{
26
- rootDir: string;
27
- target: BaseSnapshotTarget;
28
- leafDir: string;
29
- }>): string;
30
- export declare function writeBaseSnapshots<TItem, TSnapshot>(input: WriteBaseSnapshotsInput<TItem, TSnapshot>): Promise<WriteBaseSnapshotsResult>;
31
- export declare function readBaseSnapshot<TSnapshot>(snapshotPath: string): Promise<TSnapshot | null>;
32
- export declare function encodeSnapshotPathPart(value: string): string;
@@ -1,27 +0,0 @@
1
- export type RemoteMergePlanCore<TDecision, TSummary> = Readonly<{
2
- decisions: readonly TDecision[];
3
- summary: TSummary;
4
- }>;
5
- export type RemoteMergePlanConfig<TSubject, TBaseSnapshot, TValue, TDecision, TSummary> = Readonly<{
6
- subjects(): readonly TSubject[];
7
- readBaseSnapshot(subject: TSubject): Promise<TBaseSnapshot | null>;
8
- valueFromBaseSnapshot(snapshot: TBaseSnapshot): TValue | null;
9
- localValue(subject: TSubject): TValue | null;
10
- remoteValue(subject: TSubject): TValue | null;
11
- planDecision(input: Readonly<{
12
- subject: TSubject;
13
- base: TValue | null;
14
- local: TValue | null;
15
- remote: TValue | null;
16
- }>): TDecision;
17
- summarize(decisions: readonly TDecision[]): TSummary;
18
- }>;
19
- export declare function buildRemoteMergePlanWithConfig<TSubject, TBaseSnapshot, TValue, TDecision, TSummary>(config: RemoteMergePlanConfig<TSubject, TBaseSnapshot, TValue, TDecision, TSummary>): Promise<RemoteMergePlanCore<TDecision, TSummary>>;
20
- export type DecisionSummaryKeyMap<TDecisionKind extends string, TSummary> = Readonly<Record<TDecisionKind, NumericKeys<TSummary>>>;
21
- type NumericKeys<TValue> = {
22
- [TKey in keyof TValue]: TValue[TKey] extends number ? TKey : never;
23
- }[keyof TValue];
24
- export declare function summarizeMergeDecisions<TDecisionKind extends string, TDecision extends {
25
- kind: TDecisionKind;
26
- }, TSummary>(decisions: readonly TDecision[], initialSummary: TSummary, summaryKeyByDecisionKind: DecisionSummaryKeyMap<TDecisionKind, TSummary>): TSummary;
27
- export {};
@@ -1,63 +0,0 @@
1
- import type { OutputContext } from '../output';
2
- type MergeDecisionSubject<TSubject> = Readonly<{
3
- kind: string;
4
- subject: TSubject;
5
- }>;
6
- type ConflictCode<TDecision> = Extract<TDecision, {
7
- kind: 'conflict';
8
- }> extends {
9
- conflict: {
10
- code: infer TCode extends string;
11
- };
12
- } ? TCode : string;
13
- type ReportDecisionLineKind<TDecision extends {
14
- kind: string;
15
- }> = Exclude<TDecision['kind'], 'auto_merge' | 'conflict' | 'unchanged'>;
16
- export type RemoteMergeDecisionLabels<TDecision extends {
17
- kind: string;
18
- }> = {
19
- readonly [TKind in ReportDecisionLineKind<TDecision>]: string;
20
- };
21
- export type RemoteMergeDecisionReport<TDecision extends {
22
- kind: string;
23
- }, TSubjectJson extends object> = Readonly<{
24
- kind: TDecision['kind'];
25
- } & TSubjectJson & {
26
- localFieldPaths?: readonly string[];
27
- remoteFieldPaths?: readonly string[];
28
- conflict?: Readonly<{
29
- code: ConflictCode<TDecision>;
30
- fieldPath?: string;
31
- message: string;
32
- }>;
33
- }>;
34
- export type RemoteMergeJsonReport<TScope extends string, TSummary, TDecision extends {
35
- kind: string;
36
- }, TSubjectJson extends object> = Readonly<{
37
- kind: 'push';
38
- scope: TScope;
39
- mergeRemote: true;
40
- dryRun: boolean;
41
- summary: TSummary;
42
- decisions: readonly RemoteMergeDecisionReport<TDecision, TSubjectJson>[];
43
- }>;
44
- export type RemoteMergeReportConfig<TScope extends string, TSummary, TSubject, TSubjectJson extends object, TDecision extends MergeDecisionSubject<TSubject>> = Readonly<{
45
- scope: TScope;
46
- title: string;
47
- summaryLines(summary: TSummary): readonly string[];
48
- subjectLabel(subject: TSubject): string;
49
- subjectJson(subject: TSubject): TSubjectJson;
50
- decisionLabels: RemoteMergeDecisionLabels<TDecision>;
51
- }>;
52
- export declare function remoteMergeJsonReport<TScope extends string, TSummary, TSubject, TSubjectJson extends object, TDecision extends MergeDecisionSubject<TSubject>>(input: Readonly<{
53
- config: RemoteMergeReportConfig<TScope, TSummary, TSubject, TSubjectJson, TDecision>;
54
- decisions: readonly TDecision[];
55
- dryRun: boolean;
56
- summary: TSummary;
57
- }>): RemoteMergeJsonReport<TScope, TSummary, TDecision, TSubjectJson>;
58
- export declare function writeRemoteMergeHumanReport<TScope extends string, TSummary, TSubject, TSubjectJson extends object, TDecision extends MergeDecisionSubject<TSubject>>(output: Pick<OutputContext, 'info'>, config: RemoteMergeReportConfig<TScope, TSummary, TSubject, TSubjectJson, TDecision>, input: Readonly<{
59
- decisions: readonly TDecision[];
60
- dryRun: boolean;
61
- summary: TSummary;
62
- }>): void;
63
- export {};
@@ -1,28 +0,0 @@
1
- /**
2
- * Entries Migration Utilities
3
- *
4
- * Supports migrating legacy SDK entry file formats to the canonical on-disk format:
5
- * content/entries/<contentType>/<identifier>.json
6
- *
7
- * Also removes the legacy top-level `title` field from entry JSON files and migrates it
8
- * into `data.title` when possible.
9
- */
10
- export interface MigrateEntriesOptions {
11
- contentDir: string;
12
- /** Limit migration to a single content type */
13
- contentType?: string;
14
- /** Preview changes without writing or moving files */
15
- dryRun?: boolean;
16
- /** Overwrite existing entry files if they differ */
17
- force?: boolean;
18
- }
19
- export interface MigrateEntriesResult {
20
- legacyFilesFound: number;
21
- legacyFilesMigrated: number;
22
- legacyFilesBackedUp: number;
23
- entriesWritten: number;
24
- entryFilesScanned: number;
25
- legacyTitleFilesUpdated: number;
26
- legacyTitlesMigratedToDataTitle: number;
27
- }
28
- export declare function migrateEntries(options: MigrateEntriesOptions): Promise<MigrateEntriesResult>;
@@ -1,73 +0,0 @@
1
- import { type LocalEvent } from '../content/reader';
2
- export type EventMigrationPlanItem = Readonly<{
3
- tag: 'mergeLegacyIntoEvent';
4
- legacyFilePath: string;
5
- eventFilePath: string;
6
- eventIdentifier: string;
7
- mergedEvent: LocalEvent;
8
- mergedFields: readonly string[];
9
- }> | Readonly<{
10
- tag: 'archiveLegacyOnly';
11
- legacyFilePath: string;
12
- eventFilePath: string;
13
- eventIdentifier: string;
14
- reason: string;
15
- }> | Readonly<{
16
- tag: 'conflict';
17
- legacyFilePath: string;
18
- eventIdentifier: string;
19
- conflicts: readonly string[];
20
- }> | Readonly<{
21
- tag: 'ambiguousMatch';
22
- legacyFilePath: string;
23
- candidateEventIdentifiers: readonly string[];
24
- }> | Readonly<{
25
- tag: 'unmappableLegacyFields';
26
- legacyFilePath: string;
27
- eventIdentifier?: string;
28
- fields: readonly string[];
29
- }> | Readonly<{
30
- tag: 'orphanedLegacy';
31
- legacyFilePath: string;
32
- legacyIdentifier: string;
33
- reason: string;
34
- }> | Readonly<{
35
- tag: 'invalidLegacyShape';
36
- legacyFilePath: string;
37
- reason: string;
38
- }>;
39
- export type WritableEventMigrationPlanItem = Extract<EventMigrationPlanItem, {
40
- tag: 'mergeLegacyIntoEvent' | 'archiveLegacyOnly';
41
- }>;
42
- export type BlockedEventMigrationPlanItem = Exclude<EventMigrationPlanItem, WritableEventMigrationPlanItem>;
43
- export type EventMigrationPlan = Readonly<{
44
- tag: 'writable';
45
- contentDir: string;
46
- items: readonly WritableEventMigrationPlanItem[];
47
- }> | Readonly<{
48
- tag: 'blocked';
49
- contentDir: string;
50
- items: readonly EventMigrationPlanItem[];
51
- blockers: readonly BlockedEventMigrationPlanItem[];
52
- }>;
53
- export type MigrateEventsResult = Readonly<{
54
- status: 'writable' | 'blocked';
55
- legacyFilesFound: number;
56
- eventsToWrite: number;
57
- legacyFilesToArchive: number;
58
- merged: number;
59
- archiveOnly: number;
60
- conflicts: number;
61
- ambiguous: number;
62
- unmappable: number;
63
- orphaned: number;
64
- invalid: number;
65
- dryRun: boolean;
66
- items: readonly EventMigrationPlanItem[];
67
- }>;
68
- export type MigrateEventsOptions = Readonly<{
69
- contentDir: string;
70
- dryRun?: boolean;
71
- }>;
72
- export declare function planEventMigration(contentDir: string): Promise<EventMigrationPlan>;
73
- export declare function migrateEvents(options: MigrateEventsOptions): Promise<MigrateEventsResult>;
@@ -1,11 +0,0 @@
1
- import { navigationMenuIdentity, type NavigationMenuIdentity, type NavigationMenuIdentityInput } from '../../../api/src/navigation';
2
- import { type Result } from '../../../core/src/index';
3
- export type NavigationIdentityInput = NavigationMenuIdentityInput;
4
- export type DuplicateNavigationIdentityError = Readonly<{
5
- code: 'duplicate_navigation_identity';
6
- identity: NavigationMenuIdentity;
7
- menuNames: readonly string[];
8
- }>;
9
- export declare const navigationIdentity: typeof navigationMenuIdentity;
10
- export declare function navigationIdentityMap<T extends NavigationIdentityInput>(menus: readonly T[]): Result<ReadonlyMap<NavigationMenuIdentity, T>, DuplicateNavigationIdentityError>;
11
- export declare function duplicateNavigationIdentityMessage(error: DuplicateNavigationIdentityError): string;
@@ -1,133 +0,0 @@
1
- /**
2
- * CLI Output Formatting
3
- *
4
- * Provides consistent output formatting for CLI commands.
5
- *
6
- * ## Single JSON envelope contract (Phase 7.1)
7
- *
8
- * Under `--json`, EVERY command emits EXACTLY ONE JSON document on stdout:
9
- *
10
- * { ok: boolean, command: string, result: <command-specific>, warnings: [...], errors: [...] }
11
- *
12
- * This is enforced structurally: in JSON mode the terminal output methods
13
- * (`success`/`result`/`json`/`table`) do NOT print — they buffer their payload
14
- * into the invocation's {@link InvocationEnvelope}. `warn` appends to `warnings`,
15
- * `error`/`fail` append to `errors`. A single writer (`InvocationEnvelope.flush`)
16
- * emits the one envelope: on success via the program's `postAction` hook, on
17
- * failure via `error()` (which throws `CliExit` so `runCli` owns the exit code),
18
- * and for parse/help/version via `runCli` itself. Commands can therefore never
19
- * double-print a JSON document, no matter how many output calls they make.
20
- *
21
- * Human (non-`--json`) output is unchanged.
22
- */
23
- /** A structured warning or error entry inside the JSON envelope. */
24
- export interface EnvelopeMessage {
25
- message: string;
26
- code?: string;
27
- details?: unknown;
28
- suggestion?: unknown;
29
- }
30
- /**
31
- * The single machine-readable document emitted per invocation under `--json`.
32
- *
33
- * Closed discriminated final state: an `ok: false` envelope ALWAYS carries at
34
- * least one typed error (`errors` is a non-empty tuple), and an `ok: true`
35
- * envelope never carries errors. The invariant is enforced by
36
- * {@link InvocationEnvelope.flush}, so `{ ok: false, errors: [] }` is
37
- * unrepresentable in the emitted output.
38
- */
39
- export type JsonEnvelope = {
40
- ok: true;
41
- command: string;
42
- result: unknown;
43
- warnings: EnvelopeMessage[];
44
- errors: [];
45
- } | {
46
- ok: false;
47
- command: string;
48
- result: unknown;
49
- warnings: EnvelopeMessage[];
50
- errors: [EnvelopeMessage, ...EnvelopeMessage[]];
51
- };
52
- /**
53
- * Raised by `output.error` (and mapped by `runCli`) to terminate a command with a
54
- * non-zero exit code WITHOUT calling `process.exit` inside command code — so the
55
- * single envelope is always flushed first and the exit code is owned in one place.
56
- */
57
- export declare class CliExit extends Error {
58
- readonly code: number;
59
- constructor(code: number);
60
- }
61
- /**
62
- * Accumulates the single JSON envelope for ONE CLI invocation. Created once per
63
- * invocation (owned by the fresh root program) and threaded to every command's
64
- * output, so all output — success, warnings, errors, and even parse/help/version
65
- * handled by `runCli` — funnels into one document. `flush()` is idempotent and is
66
- * the ONLY writer of the stdout JSON.
67
- */
68
- export declare class InvocationEnvelope {
69
- private resultValue;
70
- private failed;
71
- private readonly warnings;
72
- private readonly errors;
73
- private flushed;
74
- setResult(value: unknown): void;
75
- addWarning(warning: EnvelopeMessage): void;
76
- addError(error: EnvelopeMessage): void;
77
- markFailed(): void;
78
- hasFlushed(): boolean;
79
- /** True once at least one error has been recorded or a failure marked. */
80
- isFailed(): boolean;
81
- private finalState;
82
- /** Emit the single envelope. Idempotent: subsequent calls are no-ops. */
83
- flush(command: string): void;
84
- }
85
- export interface OutputOptions {
86
- /** Output in JSON format for machine parsing */
87
- json?: boolean;
88
- /** Minimal output (suppress non-essential messages) */
89
- quiet?: boolean;
90
- /**
91
- * In JSON mode, the invocation-scoped envelope all terminal output funnels into
92
- * so exactly one document is emitted. Always supplied by `createOutputForCommand`
93
- * in JSON mode; if absent, JSON-mode terminal writes are dropped (never a stray
94
- * second document).
95
- */
96
- envelope?: InvocationEnvelope;
97
- /** Full command path (e.g. "entry upsert") for the envelope's `command` field. */
98
- command?: string;
99
- }
100
- export interface OutputContext {
101
- success(message: string, data?: unknown): void;
102
- /**
103
- * Non-fatal failure output. Does not exit the process.
104
- * Use when the command should continue but should still be considered failed overall.
105
- */
106
- fail(message: string, data?: unknown): void;
107
- /**
108
- * Emit a single "final" result. In JSON mode this prints one JSON envelope to stdout.
109
- * In human mode this maps to success/fail formatting.
110
- */
111
- result(success: boolean, message: string, data?: unknown): void;
112
- error(message: string, details?: unknown): never;
113
- warn(message: string, data?: unknown): void;
114
- info(message: string, data?: unknown): void;
115
- table(headers: string[], rows: string[][]): void;
116
- json(data: unknown): void;
117
- progress(current: number, total: number, message: string): void;
118
- }
119
- /**
120
- * Create output context for CLI command
121
- *
122
- * @param options - Output options
123
- * @returns Output context with formatting methods
124
- */
125
- export declare function createOutput(options: OutputOptions): OutputContext;
126
- /**
127
- * Format file size for display
128
- */
129
- export declare function formatSize(bytes: number): string;
130
- /**
131
- * Format duration for display
132
- */
133
- export declare function formatDuration(ms: number): string;
@@ -1,29 +0,0 @@
1
- /**
2
- * Riverbank CMS SDK CLI — program construction and invocation.
3
- *
4
- * `createProgram()` builds the full Commander command tree; `runCli()` drives it
5
- * so that under `--json` EXACTLY ONE envelope reaches stdout for EVERY outcome,
6
- * including the paths Commander itself owns — parse errors, `--help`, and
7
- * `--version` (which would otherwise bypass command actions entirely).
8
- *
9
- * `runCli`:
10
- * - runs `parseAsync` inside an AsyncLocalStorage invocation scope so all output
11
- * (actions, and the parse/help/version handling below) funnels into ONE
12
- * envelope, isolated per concurrent invocation;
13
- * - installs `exitOverride` + `configureOutput` on every command so Commander's
14
- * exits and its help/version/error text are intercepted rather than written
15
- * raw or exiting the process; and
16
- * - owns the process exit code (commands never call `process.exit`).
17
- */
18
- import { Command } from 'commander';
19
- export declare function createProgram(): Command;
20
- /**
21
- * Parse and run the CLI. Returns the process exit code (the caller sets
22
- * `process.exitCode`); it never calls `process.exit` itself, so it is safe to
23
- * drive from tests. Under `--json`, exactly one envelope is written to stdout for
24
- * every outcome — success, non-fatal failure, thrown error, parse error, `--help`,
25
- * and `--version`.
26
- */
27
- export declare function runCli(argv: string[], options?: {
28
- program?: Command;
29
- }): Promise<number>;
@@ -1,49 +0,0 @@
1
- /**
2
- * push-config CLI command
3
- *
4
- * Pushes SDK site configuration from a riverbank.config.ts file to the dashboard API.
5
- */
6
- import { Command } from 'commander';
7
- import type { OutputContext } from './output';
8
- import type { APIEndpoints } from '../../../api/src/public/index';
9
- interface PushConfigOptions {
10
- config?: string;
11
- apiKey?: string;
12
- dashboard: string;
13
- forceContentTypes?: boolean;
14
- dryRun?: boolean;
15
- }
16
- export type PushConfigActionResult = Readonly<{
17
- success: true;
18
- }> | Readonly<{
19
- success: false;
20
- }>;
21
- type PushConfigResponse = NonNullable<APIEndpoints['pushSdkConfig']['response']>;
22
- type PushConfigSync = NonNullable<PushConfigResponse['configSync']>;
23
- type LegacyPushConfigSync = NonNullable<PushConfigResponse['sync']>;
24
- type PushConfigDisplaySync = PushConfigSync | LegacyPushConfigSync;
25
- type PushConfigSyncArea = 'contentTypes' | 'customBlocks' | 'templateBlocks' | 'settings' | 'ignoredDocuments' | 'pages' | 'entries' | 'navigationMenus';
26
- export type PushConfigSyncMessage = {
27
- area: PushConfigSyncArea;
28
- message: string;
29
- };
30
- export declare function collectPushConfigSyncErrors(sync: PushConfigDisplaySync): PushConfigSyncMessage[];
31
- export declare function collectPushConfigSyncWarnings(sync: PushConfigDisplaySync): PushConfigSyncMessage[];
32
- export declare function groupPushConfigSyncWarningsForHuman(warnings: readonly PushConfigSyncMessage[]): PushConfigSyncMessage[];
33
- export declare function isPushConfigActionSuccess(result: PushConfigActionResult): result is Extract<PushConfigActionResult, {
34
- success: true;
35
- }>;
36
- export declare function markFailedPushConfigCommandResult(result: PushConfigActionResult): void;
37
- /**
38
- * Main push-config action.
39
- * Exported for reuse by `push --with-config`.
40
- */
41
- export declare function pushConfigAction(output: OutputContext, options: PushConfigOptions & {
42
- isRemote: boolean;
43
- isJsonOutput?: boolean;
44
- }): Promise<PushConfigActionResult>;
45
- /**
46
- * push-config command definition
47
- */
48
- export declare const createPushConfigCommand: () => Command;
49
- export {};
@@ -1,51 +0,0 @@
1
- import type { EnvTarget } from '../helpers';
2
- export type SetupOperation = 'create_site' | 'create_management_key' | 'grant_user_access' | 'configure_env' | 'verify_access';
3
- export type SetupAuthority = 'dashboard_admin' | 'cms_repo_script' | 'sdk_management_key';
4
- export type SetupPlanStep = Readonly<{
5
- tag: 'admin_action';
6
- operation: Exclude<SetupOperation, 'configure_env' | 'verify_access'>;
7
- title: string;
8
- detail: string;
9
- allowedAuthorities: readonly Exclude<SetupAuthority, 'sdk_management_key'>[];
10
- }> | Readonly<{
11
- tag: 'local_env';
12
- operation: 'configure_env';
13
- title: string;
14
- detail: string;
15
- missingVariables: readonly string[];
16
- exampleLines: readonly string[];
17
- }> | Readonly<{
18
- tag: 'cli_check';
19
- operation: 'verify_access';
20
- title: string;
21
- detail: string;
22
- commands: readonly string[];
23
- }>;
24
- export type SetupCapability = Readonly<{
25
- authority: 'dashboard_admin';
26
- can: readonly ('create_site' | 'create_management_key' | 'grant_user_access')[];
27
- }> | Readonly<{
28
- authority: 'cms_repo_script';
29
- can: readonly ('create_site' | 'create_management_key' | 'grant_user_access')[];
30
- requirement: string;
31
- }> | Readonly<{
32
- authority: 'sdk_management_key';
33
- can: readonly ('verify_access')[];
34
- cannot: readonly ('create_site' | 'create_management_key' | 'grant_user_access')[];
35
- }>;
36
- export interface SetupTargetStatus {
37
- target: EnvTarget;
38
- siteId: string | null;
39
- dashboardUrl: string | null;
40
- managementApiKeySet: boolean;
41
- }
42
- export interface SdkSetupPlan {
43
- target: EnvTarget;
44
- configured: boolean;
45
- canMutatePrivilegedResources: false;
46
- capabilities: readonly SetupCapability[];
47
- steps: readonly SetupPlanStep[];
48
- securityNotes: readonly string[];
49
- }
50
- export declare function planSdkSetup(status: SetupTargetStatus): SdkSetupPlan;
51
- export declare function formatSdkSetupPlan(plan: SdkSetupPlan): string;
@@ -1,13 +0,0 @@
1
- import type { Brand } from '../../../../core/src/index';
2
- export type CliContentTypeKey = Brand<string, 'SdkCliContentTypeKey'>;
3
- export type CliEntryIdentifier = Brand<string, 'SdkCliEntryIdentifier'>;
4
- export type CliPageIdentifier = Brand<string, 'SdkCliPageIdentifier'>;
5
- export type CliBlockIdentifier = Brand<string, 'SdkCliBlockIdentifier'>;
6
- export type CliFormSlug = Brand<string, 'SdkCliFormSlug'>;
7
- export type CliNavigationMenuName = Brand<string, 'SdkCliNavigationMenuName'>;
8
- export declare const unsafeAsCliContentTypeKey: (value: string) => CliContentTypeKey;
9
- export declare const unsafeAsCliEntryIdentifier: (value: string) => CliEntryIdentifier;
10
- export declare const unsafeAsCliPageIdentifier: (value: string) => CliPageIdentifier;
11
- export declare const unsafeAsCliBlockIdentifier: (value: string) => CliBlockIdentifier;
12
- export declare const unsafeAsCliFormSlug: (value: string) => CliFormSlug;
13
- export declare const unsafeAsCliNavigationMenuName: (value: string) => CliNavigationMenuName;