sandcms 0.5.2

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 (391) hide show
  1. package/LICENSE +57 -0
  2. package/README.md +84 -0
  3. package/dist/Image.svelte +53 -0
  4. package/dist/Image.svelte.d.ts +10 -0
  5. package/dist/Seo.svelte +29 -0
  6. package/dist/Seo.svelte.d.ts +10 -0
  7. package/dist/admin/Access.svelte +129 -0
  8. package/dist/admin/Access.svelte.d.ts +7 -0
  9. package/dist/admin/Account.svelte +190 -0
  10. package/dist/admin/Account.svelte.d.ts +7 -0
  11. package/dist/admin/Admin.svelte +42 -0
  12. package/dist/admin/Admin.svelte.d.ts +8 -0
  13. package/dist/admin/AssetAttachment.svelte +77 -0
  14. package/dist/admin/AssetAttachment.svelte.d.ts +15 -0
  15. package/dist/admin/Collection.svelte +52 -0
  16. package/dist/admin/Collection.svelte.d.ts +7 -0
  17. package/dist/admin/Dashboard.svelte +105 -0
  18. package/dist/admin/Dashboard.svelte.d.ts +7 -0
  19. package/dist/admin/Editor.svelte +192 -0
  20. package/dist/admin/Editor.svelte.d.ts +7 -0
  21. package/dist/admin/Fields.svelte +221 -0
  22. package/dist/admin/Fields.svelte.d.ts +17 -0
  23. package/dist/admin/Gallery.svelte +130 -0
  24. package/dist/admin/Gallery.svelte.d.ts +16 -0
  25. package/dist/admin/Inbox.svelte +154 -0
  26. package/dist/admin/Inbox.svelte.d.ts +8 -0
  27. package/dist/admin/Login.svelte +104 -0
  28. package/dist/admin/Login.svelte.d.ts +7 -0
  29. package/dist/admin/MediaLibrary.svelte +231 -0
  30. package/dist/admin/MediaLibrary.svelte.d.ts +7 -0
  31. package/dist/admin/MediaPicker.svelte +273 -0
  32. package/dist/admin/MediaPicker.svelte.d.ts +16 -0
  33. package/dist/admin/Notice.svelte +13 -0
  34. package/dist/admin/Notice.svelte.d.ts +8 -0
  35. package/dist/admin/NotificationSettings.svelte +153 -0
  36. package/dist/admin/NotificationSettings.svelte.d.ts +7 -0
  37. package/dist/admin/RichText.svelte +103 -0
  38. package/dist/admin/RichText.svelte.d.ts +9 -0
  39. package/dist/admin/RichTextLink.svelte +71 -0
  40. package/dist/admin/RichTextLink.svelte.d.ts +7 -0
  41. package/dist/admin/SelectField.svelte +39 -0
  42. package/dist/admin/SelectField.svelte.d.ts +15 -0
  43. package/dist/admin/Shell.svelte +106 -0
  44. package/dist/admin/Shell.svelte.d.ts +9 -0
  45. package/dist/admin/SortableList.svelte +104 -0
  46. package/dist/admin/SortableList.svelte.d.ts +30 -0
  47. package/dist/admin/UnsavedChanges.svelte +54 -0
  48. package/dist/admin/UnsavedChanges.svelte.d.ts +6 -0
  49. package/dist/admin/UploadButton.svelte +42 -0
  50. package/dist/admin/UploadButton.svelte.d.ts +10 -0
  51. package/dist/admin/UploadQueue.svelte +40 -0
  52. package/dist/admin/UploadQueue.svelte.d.ts +7 -0
  53. package/dist/admin/Users.svelte +185 -0
  54. package/dist/admin/Users.svelte.d.ts +7 -0
  55. package/dist/admin/client.d.ts +720 -0
  56. package/dist/admin/client.js +29 -0
  57. package/dist/admin/components/ui/alert/alert-action.svelte +20 -0
  58. package/dist/admin/components/ui/alert/alert-action.svelte.d.ts +5 -0
  59. package/dist/admin/components/ui/alert/alert-description.svelte +23 -0
  60. package/dist/admin/components/ui/alert/alert-description.svelte.d.ts +5 -0
  61. package/dist/admin/components/ui/alert/alert-title.svelte +23 -0
  62. package/dist/admin/components/ui/alert/alert-title.svelte.d.ts +5 -0
  63. package/dist/admin/components/ui/alert/alert.svelte +44 -0
  64. package/dist/admin/components/ui/alert/alert.svelte.d.ts +26 -0
  65. package/dist/admin/components/ui/alert/index.d.ts +6 -0
  66. package/dist/admin/components/ui/alert/index.js +8 -0
  67. package/dist/admin/components/ui/alert-dialog/alert-dialog-action.svelte +27 -0
  68. package/dist/admin/components/ui/alert-dialog/alert-dialog-action.svelte.d.ts +9 -0
  69. package/dist/admin/components/ui/alert-dialog/alert-dialog-cancel.svelte +27 -0
  70. package/dist/admin/components/ui/alert-dialog/alert-dialog-cancel.svelte.d.ts +9 -0
  71. package/dist/admin/components/ui/alert-dialog/alert-dialog-content.svelte +32 -0
  72. package/dist/admin/components/ui/alert-dialog/alert-dialog-content.svelte.d.ts +11 -0
  73. package/dist/admin/components/ui/alert-dialog/alert-dialog-description.svelte +20 -0
  74. package/dist/admin/components/ui/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
  75. package/dist/admin/components/ui/alert-dialog/alert-dialog-footer.svelte +23 -0
  76. package/dist/admin/components/ui/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
  77. package/dist/admin/components/ui/alert-dialog/alert-dialog-header.svelte +23 -0
  78. package/dist/admin/components/ui/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
  79. package/dist/admin/components/ui/alert-dialog/alert-dialog-media.svelte +23 -0
  80. package/dist/admin/components/ui/alert-dialog/alert-dialog-media.svelte.d.ts +5 -0
  81. package/dist/admin/components/ui/alert-dialog/alert-dialog-overlay.svelte +20 -0
  82. package/dist/admin/components/ui/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
  83. package/dist/admin/components/ui/alert-dialog/alert-dialog-portal.svelte +7 -0
  84. package/dist/admin/components/ui/alert-dialog/alert-dialog-portal.svelte.d.ts +3 -0
  85. package/dist/admin/components/ui/alert-dialog/alert-dialog-title.svelte +20 -0
  86. package/dist/admin/components/ui/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
  87. package/dist/admin/components/ui/alert-dialog/alert-dialog-trigger.svelte +7 -0
  88. package/dist/admin/components/ui/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
  89. package/dist/admin/components/ui/alert-dialog/alert-dialog.svelte +7 -0
  90. package/dist/admin/components/ui/alert-dialog/alert-dialog.svelte.d.ts +3 -0
  91. package/dist/admin/components/ui/alert-dialog/index.d.ts +13 -0
  92. package/dist/admin/components/ui/alert-dialog/index.js +15 -0
  93. package/dist/admin/components/ui/attachment/attachment-action.svelte +21 -0
  94. package/dist/admin/components/ui/attachment/attachment-action.svelte.d.ts +4 -0
  95. package/dist/admin/components/ui/attachment/attachment-actions.svelte +23 -0
  96. package/dist/admin/components/ui/attachment/attachment-actions.svelte.d.ts +5 -0
  97. package/dist/admin/components/ui/attachment/attachment-content.svelte +23 -0
  98. package/dist/admin/components/ui/attachment/attachment-content.svelte.d.ts +5 -0
  99. package/dist/admin/components/ui/attachment/attachment-description.svelte +24 -0
  100. package/dist/admin/components/ui/attachment/attachment-description.svelte.d.ts +5 -0
  101. package/dist/admin/components/ui/attachment/attachment-group.svelte +23 -0
  102. package/dist/admin/components/ui/attachment/attachment-group.svelte.d.ts +5 -0
  103. package/dist/admin/components/ui/attachment/attachment-media.svelte +44 -0
  104. package/dist/admin/components/ui/attachment/attachment-media.svelte.d.ts +26 -0
  105. package/dist/admin/components/ui/attachment/attachment-title.svelte +23 -0
  106. package/dist/admin/components/ui/attachment/attachment-title.svelte.d.ts +5 -0
  107. package/dist/admin/components/ui/attachment/attachment-trigger.svelte +29 -0
  108. package/dist/admin/components/ui/attachment/attachment-trigger.svelte.d.ts +11 -0
  109. package/dist/admin/components/ui/attachment/attachment.svelte +54 -0
  110. package/dist/admin/components/ui/attachment/attachment.svelte.d.ts +45 -0
  111. package/dist/admin/components/ui/attachment/index.d.ts +10 -0
  112. package/dist/admin/components/ui/attachment/index.js +12 -0
  113. package/dist/admin/components/ui/avatar/avatar-badge.svelte +26 -0
  114. package/dist/admin/components/ui/avatar/avatar-badge.svelte.d.ts +5 -0
  115. package/dist/admin/components/ui/avatar/avatar-fallback.svelte +20 -0
  116. package/dist/admin/components/ui/avatar/avatar-fallback.svelte.d.ts +4 -0
  117. package/dist/admin/components/ui/avatar/avatar-group-count.svelte +23 -0
  118. package/dist/admin/components/ui/avatar/avatar-group-count.svelte.d.ts +5 -0
  119. package/dist/admin/components/ui/avatar/avatar-group.svelte +23 -0
  120. package/dist/admin/components/ui/avatar/avatar-group.svelte.d.ts +5 -0
  121. package/dist/admin/components/ui/avatar/avatar-image.svelte +17 -0
  122. package/dist/admin/components/ui/avatar/avatar-image.svelte.d.ts +4 -0
  123. package/dist/admin/components/ui/avatar/avatar.svelte +26 -0
  124. package/dist/admin/components/ui/avatar/avatar.svelte.d.ts +7 -0
  125. package/dist/admin/components/ui/avatar/index.d.ts +7 -0
  126. package/dist/admin/components/ui/avatar/index.js +9 -0
  127. package/dist/admin/components/ui/badge/badge.svelte +50 -0
  128. package/dist/admin/components/ui/badge/badge.svelte.d.ts +38 -0
  129. package/dist/admin/components/ui/badge/index.d.ts +2 -0
  130. package/dist/admin/components/ui/badge/index.js +2 -0
  131. package/dist/admin/components/ui/button/button.svelte +87 -0
  132. package/dist/admin/components/ui/button/button.svelte.d.ts +70 -0
  133. package/dist/admin/components/ui/button/index.d.ts +2 -0
  134. package/dist/admin/components/ui/button/index.js +4 -0
  135. package/dist/admin/components/ui/card/card-action.svelte +20 -0
  136. package/dist/admin/components/ui/card/card-action.svelte.d.ts +5 -0
  137. package/dist/admin/components/ui/card/card-content.svelte +20 -0
  138. package/dist/admin/components/ui/card/card-content.svelte.d.ts +5 -0
  139. package/dist/admin/components/ui/card/card-description.svelte +20 -0
  140. package/dist/admin/components/ui/card/card-description.svelte.d.ts +5 -0
  141. package/dist/admin/components/ui/card/card-footer.svelte +20 -0
  142. package/dist/admin/components/ui/card/card-footer.svelte.d.ts +5 -0
  143. package/dist/admin/components/ui/card/card-header.svelte +23 -0
  144. package/dist/admin/components/ui/card/card-header.svelte.d.ts +5 -0
  145. package/dist/admin/components/ui/card/card-title.svelte +20 -0
  146. package/dist/admin/components/ui/card/card-title.svelte.d.ts +5 -0
  147. package/dist/admin/components/ui/card/card.svelte +25 -0
  148. package/dist/admin/components/ui/card/card.svelte.d.ts +8 -0
  149. package/dist/admin/components/ui/card/index.d.ts +8 -0
  150. package/dist/admin/components/ui/card/index.js +10 -0
  151. package/dist/admin/components/ui/checkbox/checkbox.svelte +39 -0
  152. package/dist/admin/components/ui/checkbox/checkbox.svelte.d.ts +4 -0
  153. package/dist/admin/components/ui/checkbox/index.d.ts +2 -0
  154. package/dist/admin/components/ui/checkbox/index.js +4 -0
  155. package/dist/admin/components/ui/dialog/dialog-close.svelte +11 -0
  156. package/dist/admin/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
  157. package/dist/admin/components/ui/dialog/dialog-content.svelte +48 -0
  158. package/dist/admin/components/ui/dialog/dialog-content.svelte.d.ts +13 -0
  159. package/dist/admin/components/ui/dialog/dialog-description.svelte +20 -0
  160. package/dist/admin/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
  161. package/dist/admin/components/ui/dialog/dialog-footer.svelte +32 -0
  162. package/dist/admin/components/ui/dialog/dialog-footer.svelte.d.ts +8 -0
  163. package/dist/admin/components/ui/dialog/dialog-header.svelte +20 -0
  164. package/dist/admin/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
  165. package/dist/admin/components/ui/dialog/dialog-overlay.svelte +20 -0
  166. package/dist/admin/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
  167. package/dist/admin/components/ui/dialog/dialog-portal.svelte +7 -0
  168. package/dist/admin/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
  169. package/dist/admin/components/ui/dialog/dialog-title.svelte +17 -0
  170. package/dist/admin/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
  171. package/dist/admin/components/ui/dialog/dialog-trigger.svelte +11 -0
  172. package/dist/admin/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
  173. package/dist/admin/components/ui/dialog/dialog.svelte +7 -0
  174. package/dist/admin/components/ui/dialog/dialog.svelte.d.ts +3 -0
  175. package/dist/admin/components/ui/dialog/index.d.ts +11 -0
  176. package/dist/admin/components/ui/dialog/index.js +13 -0
  177. package/dist/admin/components/ui/input/index.d.ts +2 -0
  178. package/dist/admin/components/ui/input/index.js +4 -0
  179. package/dist/admin/components/ui/input/input.svelte +48 -0
  180. package/dist/admin/components/ui/input/input.svelte.d.ts +13 -0
  181. package/dist/admin/components/ui/label/index.d.ts +2 -0
  182. package/dist/admin/components/ui/label/index.js +4 -0
  183. package/dist/admin/components/ui/label/label.svelte +20 -0
  184. package/dist/admin/components/ui/label/label.svelte.d.ts +4 -0
  185. package/dist/admin/components/ui/select/index.d.ts +13 -0
  186. package/dist/admin/components/ui/select/index.js +15 -0
  187. package/dist/admin/components/ui/select/select-content.svelte +45 -0
  188. package/dist/admin/components/ui/select/select-content.svelte.d.ts +11 -0
  189. package/dist/admin/components/ui/select/select-group-heading.svelte +21 -0
  190. package/dist/admin/components/ui/select/select-group-heading.svelte.d.ts +10 -0
  191. package/dist/admin/components/ui/select/select-group.svelte +17 -0
  192. package/dist/admin/components/ui/select/select-group.svelte.d.ts +4 -0
  193. package/dist/admin/components/ui/select/select-item.svelte +42 -0
  194. package/dist/admin/components/ui/select/select-item.svelte.d.ts +4 -0
  195. package/dist/admin/components/ui/select/select-label.svelte +20 -0
  196. package/dist/admin/components/ui/select/select-label.svelte.d.ts +6 -0
  197. package/dist/admin/components/ui/select/select-portal.svelte +7 -0
  198. package/dist/admin/components/ui/select/select-portal.svelte.d.ts +3 -0
  199. package/dist/admin/components/ui/select/select-scroll-down-button.svelte +23 -0
  200. package/dist/admin/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
  201. package/dist/admin/components/ui/select/select-scroll-up-button.svelte +23 -0
  202. package/dist/admin/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
  203. package/dist/admin/components/ui/select/select-separator.svelte +18 -0
  204. package/dist/admin/components/ui/select/select-separator.svelte.d.ts +4 -0
  205. package/dist/admin/components/ui/select/select-trigger.svelte +29 -0
  206. package/dist/admin/components/ui/select/select-trigger.svelte.d.ts +8 -0
  207. package/dist/admin/components/ui/select/select-value.svelte +7 -0
  208. package/dist/admin/components/ui/select/select-value.svelte.d.ts +4 -0
  209. package/dist/admin/components/ui/select/select.svelte +11 -0
  210. package/dist/admin/components/ui/select/select.svelte.d.ts +3 -0
  211. package/dist/admin/components/ui/separator/index.d.ts +2 -0
  212. package/dist/admin/components/ui/separator/index.js +4 -0
  213. package/dist/admin/components/ui/separator/separator.svelte +21 -0
  214. package/dist/admin/components/ui/separator/separator.svelte.d.ts +4 -0
  215. package/dist/admin/components/ui/switch/index.d.ts +2 -0
  216. package/dist/admin/components/ui/switch/index.js +4 -0
  217. package/dist/admin/components/ui/switch/switch.svelte +34 -0
  218. package/dist/admin/components/ui/switch/switch.svelte.d.ts +8 -0
  219. package/dist/admin/components/ui/table/index.d.ts +9 -0
  220. package/dist/admin/components/ui/table/index.js +11 -0
  221. package/dist/admin/components/ui/table/table-body.svelte +20 -0
  222. package/dist/admin/components/ui/table/table-body.svelte.d.ts +5 -0
  223. package/dist/admin/components/ui/table/table-caption.svelte +20 -0
  224. package/dist/admin/components/ui/table/table-caption.svelte.d.ts +5 -0
  225. package/dist/admin/components/ui/table/table-cell.svelte +20 -0
  226. package/dist/admin/components/ui/table/table-cell.svelte.d.ts +5 -0
  227. package/dist/admin/components/ui/table/table-footer.svelte +20 -0
  228. package/dist/admin/components/ui/table/table-footer.svelte.d.ts +5 -0
  229. package/dist/admin/components/ui/table/table-head.svelte +23 -0
  230. package/dist/admin/components/ui/table/table-head.svelte.d.ts +5 -0
  231. package/dist/admin/components/ui/table/table-header.svelte +20 -0
  232. package/dist/admin/components/ui/table/table-header.svelte.d.ts +5 -0
  233. package/dist/admin/components/ui/table/table-row.svelte +23 -0
  234. package/dist/admin/components/ui/table/table-row.svelte.d.ts +5 -0
  235. package/dist/admin/components/ui/table/table.svelte +22 -0
  236. package/dist/admin/components/ui/table/table.svelte.d.ts +5 -0
  237. package/dist/admin/components/ui/textarea/index.d.ts +2 -0
  238. package/dist/admin/components/ui/textarea/index.js +4 -0
  239. package/dist/admin/components/ui/textarea/textarea.svelte +22 -0
  240. package/dist/admin/components/ui/textarea/textarea.svelte.d.ts +5 -0
  241. package/dist/admin/components/ui/toggle/index.d.ts +3 -0
  242. package/dist/admin/components/ui/toggle/index.js +5 -0
  243. package/dist/admin/components/ui/toggle/toggle.svelte +52 -0
  244. package/dist/admin/components/ui/toggle/toggle.svelte.d.ts +43 -0
  245. package/dist/admin/generated/FONT-LICENSE +93 -0
  246. package/dist/admin/generated/Geist-LICENSE.txt +93 -0
  247. package/dist/admin/generated/admin.css +3276 -0
  248. package/dist/admin/generated/fonts/geist-cyrillic-ext-wght-italic.woff2 +0 -0
  249. package/dist/admin/generated/fonts/geist-cyrillic-ext-wght-normal.woff2 +0 -0
  250. package/dist/admin/generated/fonts/geist-cyrillic-wght-italic.woff2 +0 -0
  251. package/dist/admin/generated/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
  252. package/dist/admin/generated/fonts/geist-latin-ext-wght-italic.woff2 +0 -0
  253. package/dist/admin/generated/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
  254. package/dist/admin/generated/fonts/geist-latin-wght-italic.woff2 +0 -0
  255. package/dist/admin/generated/fonts/geist-latin-wght-normal.woff2 +0 -0
  256. package/dist/admin/generated/fonts/geist-vietnamese-wght-italic.woff2 +0 -0
  257. package/dist/admin/generated/fonts/geist-vietnamese-wght-normal.woff2 +0 -0
  258. package/dist/admin/generated/geist-cyrillic-ext-wght-normal.woff2 +0 -0
  259. package/dist/admin/generated/geist-cyrillic-wght-normal.woff2 +0 -0
  260. package/dist/admin/generated/geist-latin-ext-wght-normal.woff2 +0 -0
  261. package/dist/admin/generated/geist-latin-wght-normal.woff2 +0 -0
  262. package/dist/admin/generated/geist-vietnamese-wght-normal.woff2 +0 -0
  263. package/dist/admin/generated/styles.css +2772 -0
  264. package/dist/admin/index.d.ts +2 -0
  265. package/dist/admin/index.js +1 -0
  266. package/dist/admin/types.d.ts +63 -0
  267. package/dist/admin/types.js +1 -0
  268. package/dist/admin/uploads.d.ts +12 -0
  269. package/dist/admin/uploads.js +23 -0
  270. package/dist/admin/utils.d.ts +11 -0
  271. package/dist/admin/utils.js +1 -0
  272. package/dist/blueprints/files.d.ts +7 -0
  273. package/dist/blueprints/files.js +112 -0
  274. package/dist/blueprints/gallery.d.ts +3 -0
  275. package/dist/blueprints/gallery.js +14 -0
  276. package/dist/blueprints/load.d.ts +6 -0
  277. package/dist/blueprints/load.js +186 -0
  278. package/dist/blueprints/merge.d.ts +2 -0
  279. package/dist/blueprints/merge.js +18 -0
  280. package/dist/blueprints/types.d.ts +58 -0
  281. package/dist/blueprints/types.js +1 -0
  282. package/dist/blueprints/validate.d.ts +8 -0
  283. package/dist/blueprints/validate.js +133 -0
  284. package/dist/cli/backup.d.ts +6 -0
  285. package/dist/cli/backup.js +85 -0
  286. package/dist/cli/cloudflare.d.ts +8 -0
  287. package/dist/cli/cloudflare.js +123 -0
  288. package/dist/cli/doctor.d.ts +1 -0
  289. package/dist/cli/doctor.js +56 -0
  290. package/dist/cli/files.d.ts +30 -0
  291. package/dist/cli/files.js +114 -0
  292. package/dist/cli/index.d.ts +2 -0
  293. package/dist/cli/index.js +182 -0
  294. package/dist/cli/prompts.d.ts +5 -0
  295. package/dist/cli/prompts.js +41 -0
  296. package/dist/cli/scaffold.d.ts +2 -0
  297. package/dist/cli/scaffold.js +58 -0
  298. package/dist/cli/setup.d.ts +11 -0
  299. package/dist/cli/setup.js +116 -0
  300. package/dist/cli/upgrade.d.ts +1 -0
  301. package/dist/cli/upgrade.js +47 -0
  302. package/dist/index.d.ts +5 -0
  303. package/dist/index.js +4 -0
  304. package/dist/media.d.ts +26 -0
  305. package/dist/media.js +27 -0
  306. package/dist/notification-fields.d.ts +8 -0
  307. package/dist/notification-fields.js +26 -0
  308. package/dist/richtext.d.ts +14 -0
  309. package/dist/richtext.js +73 -0
  310. package/dist/server/access.d.ts +16 -0
  311. package/dist/server/access.js +216 -0
  312. package/dist/server/admin-load.d.ts +342 -0
  313. package/dist/server/admin-load.js +135 -0
  314. package/dist/server/api.d.ts +3 -0
  315. package/dist/server/api.js +144 -0
  316. package/dist/server/auth.d.ts +744 -0
  317. package/dist/server/auth.js +142 -0
  318. package/dist/server/blueprint-icons.d.ts +4 -0
  319. package/dist/server/blueprint-icons.js +14 -0
  320. package/dist/server/cms.d.ts +1054 -0
  321. package/dist/server/cms.js +58 -0
  322. package/dist/server/content.d.ts +101 -0
  323. package/dist/server/content.js +285 -0
  324. package/dist/server/db/migration-data.d.ts +4 -0
  325. package/dist/server/db/migration-data.js +7 -0
  326. package/dist/server/db/migrations/0000_foundation.sql +180 -0
  327. package/dist/server/db/migrations/meta/0000_snapshot.json +1188 -0
  328. package/dist/server/db/migrations/meta/_journal.json +13 -0
  329. package/dist/server/db/schema.d.ts +2212 -0
  330. package/dist/server/db/schema.js +171 -0
  331. package/dist/server/db/store.d.ts +33 -0
  332. package/dist/server/db/store.js +131 -0
  333. package/dist/server/email/index.d.ts +50 -0
  334. package/dist/server/email/index.js +175 -0
  335. package/dist/server/email/template.d.ts +8 -0
  336. package/dist/server/email/template.js +53 -0
  337. package/dist/server/forms.d.ts +40 -0
  338. package/dist/server/forms.js +84 -0
  339. package/dist/server/hooks.d.ts +3 -0
  340. package/dist/server/hooks.js +85 -0
  341. package/dist/server/http.d.ts +3 -0
  342. package/dist/server/http.js +3 -0
  343. package/dist/server/index.d.ts +8 -0
  344. package/dist/server/index.js +7 -0
  345. package/dist/server/media/delivery.d.ts +3 -0
  346. package/dist/server/media/delivery.js +42 -0
  347. package/dist/server/media/presets.d.ts +2 -0
  348. package/dist/server/media/presets.js +8 -0
  349. package/dist/server/media/runner.d.ts +2 -0
  350. package/dist/server/media/runner.js +128 -0
  351. package/dist/server/media/service.d.ts +144 -0
  352. package/dist/server/media/service.js +280 -0
  353. package/dist/server/notifications.d.ts +9 -0
  354. package/dist/server/notifications.js +161 -0
  355. package/dist/server/request.d.ts +2 -0
  356. package/dist/server/request.js +39 -0
  357. package/dist/server/seo.d.ts +12 -0
  358. package/dist/server/seo.js +62 -0
  359. package/dist/worker/index.d.ts +10 -0
  360. package/dist/worker/index.js +266 -0
  361. package/dist/worker/source.d.ts +2 -0
  362. package/dist/worker/source.js +31 -0
  363. package/dist/worker/svg.d.ts +5 -0
  364. package/dist/worker/svg.js +142 -0
  365. package/docs/acceptance.md +58 -0
  366. package/docs/cloudflare.md +146 -0
  367. package/docs/content.md +188 -0
  368. package/docs/deployment.md +89 -0
  369. package/docs/email.md +124 -0
  370. package/docs/forms.md +18 -0
  371. package/docs/media.md +105 -0
  372. package/docs/package.md +84 -0
  373. package/docs/releases.md +29 -0
  374. package/docs/upgrades.md +62 -0
  375. package/package.json +124 -0
  376. package/templates/dockerignore +15 -0
  377. package/templates/hooks.server.ts +4 -0
  378. package/templates/integration.ts +20 -0
  379. package/templates/railpack.json +7 -0
  380. package/templates/routes/admin/+page.server.ts +3 -0
  381. package/templates/routes/admin/+page.svelte +6 -0
  382. package/templates/routes/api/+server.ts +4 -0
  383. package/templates/sandcms/blueprints/collections/photographers.yaml +6 -0
  384. package/templates/sandcms/blueprints/collections/projects.yaml +26 -0
  385. package/templates/sandcms/blueprints/files/image.yaml +6 -0
  386. package/templates/sandcms/blueprints/forms/registration.yaml +15 -0
  387. package/templates/sandcms/blueprints/pages/home.yaml +9 -0
  388. package/templates/sandcms/blueprints/site.yaml +13 -0
  389. package/templates/sandcms/config.yaml +12 -0
  390. package/templates/sandcms/worker/index.ts +1 -0
  391. package/templates/sandcms/worker/wrangler.jsonc +7 -0
@@ -0,0 +1,266 @@
1
+ import { sanitizeSvg, svgDimensions } from './svg.js';
2
+ import { sourceURL, validSource } from './source.js';
3
+ const PROTOCOL = 3;
4
+ const json = (v, status = 200) => Response.json(v, { status, headers: { 'Cache-Control': 'private, no-store' } });
5
+ const idPattern = /^[a-f0-9-]{36}$/;
6
+ const variantPattern = /^([a-f0-9-]{36})\/([a-f0-9]{16})\/([a-z][a-z0-9_-]*)-(\d+)\.(webp|avif|jpeg|svg)$/;
7
+ async function authenticated(request, env) {
8
+ if (!env.CMS_TOKEN || env.CMS_TOKEN.length < 32)
9
+ return false;
10
+ const got = request.headers.get('authorization') ?? '';
11
+ const a = new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(got))), b = new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(`Bearer ${env.CMS_TOKEN}`)));
12
+ let diff = 0;
13
+ for (let i = 0; i < a.length; i++)
14
+ diff |= a[i] ^ b[i];
15
+ return diff === 0;
16
+ }
17
+ async function boundedBody(request, limit) {
18
+ const reader = request.body?.getReader();
19
+ if (!reader)
20
+ throw new Error('Missing body');
21
+ let length = 0;
22
+ const chunks = [];
23
+ while (true) {
24
+ const { done, value } = await reader.read();
25
+ if (done)
26
+ break;
27
+ length += value.length;
28
+ if (length > limit) {
29
+ await reader.cancel();
30
+ throw new Error('Upload exceeds limit');
31
+ }
32
+ chunks.push(value);
33
+ }
34
+ const data = new Uint8Array(length);
35
+ let offset = 0;
36
+ for (const chunk of chunks) {
37
+ data.set(chunk, offset);
38
+ offset += chunk.length;
39
+ }
40
+ return data;
41
+ }
42
+ export default {
43
+ async fetch(request, env) {
44
+ const url = new URL(request.url), path = url.pathname;
45
+ try {
46
+ if (path.startsWith('/internal/source/')) {
47
+ const id = path.slice('/internal/source/'.length);
48
+ if (request.method !== 'GET' ||
49
+ !idPattern.test(id) ||
50
+ !(await validSource(url, env.CMS_TOKEN)))
51
+ return new Response('Not found', {
52
+ status: 404,
53
+ headers: { 'Cache-Control': 'private, no-store' }
54
+ });
55
+ const original = await env.MEDIA.get('originals/' + id);
56
+ if (!original || original.httpMetadata?.contentType === 'image/svg+xml')
57
+ return new Response('Not found', {
58
+ status: 404,
59
+ headers: { 'Cache-Control': 'private, no-store' }
60
+ });
61
+ return new Response(original.body, {
62
+ headers: {
63
+ 'Content-Type': original.httpMetadata?.contentType ?? 'application/octet-stream',
64
+ 'Content-Length': String(original.size),
65
+ 'Cache-Control': 'private, no-store',
66
+ 'X-Content-Type-Options': 'nosniff',
67
+ 'Content-Security-Policy': "default-src 'none'; sandbox"
68
+ }
69
+ });
70
+ }
71
+ if (!path.startsWith('/internal/') || !(await authenticated(request, env)))
72
+ return new Response('Not found', { status: 404, headers: { 'Cache-Control': 'no-store' } });
73
+ if (path === '/internal/health')
74
+ return json({ protocol: PROTOCOL });
75
+ if (request.headers.get('x-sandcms-protocol') !== String(PROTOCOL))
76
+ return json({ error: 'Incompatible CMS media protocol' }, 409);
77
+ if (path.startsWith('/internal/media/') && ['GET', 'HEAD'].includes(request.method)) {
78
+ if (url.search)
79
+ return json({ error: 'Only named variants are available' }, 400);
80
+ const key = path.slice('/internal/media/'.length);
81
+ if (!variantPattern.test(key))
82
+ return new Response('Not found', { status: 404 });
83
+ const object = await env.MEDIA.get('variants/' + key);
84
+ if (!object || object.customMetadata?.ready !== 'true')
85
+ return new Response('Not found', { status: 404 });
86
+ const headers = new Headers({
87
+ 'Cache-Control': 'private, no-store',
88
+ 'X-Content-Type-Options': 'nosniff',
89
+ 'Content-Security-Policy': "default-src 'none'; style-src 'none'; sandbox",
90
+ 'Cross-Origin-Resource-Policy': 'cross-origin'
91
+ });
92
+ object.writeHttpMetadata(headers);
93
+ headers.set('ETag', object.httpEtag);
94
+ // GET/HEAD use weak comparison; a validator list may include quoted commas.
95
+ const condition = request.headers.get('If-None-Match');
96
+ const matches = condition?.trim() === '*' ||
97
+ Array.from(condition?.matchAll(/(?:W\/)?"[^"]*"/g) ?? []).some(([tag]) => tag.replace(/^W\//, '') === object.httpEtag);
98
+ if (matches) {
99
+ await object.body.cancel();
100
+ return new Response(null, { status: 304, headers });
101
+ }
102
+ if (request.method === 'HEAD')
103
+ await object.body.cancel();
104
+ return new Response(request.method === 'HEAD' ? null : object.body, { headers });
105
+ }
106
+ const match = /^\/internal\/assets\/([^/]+)(?:\/(variant))?$/.exec(path);
107
+ if (!match || !idPattern.test(match[1]))
108
+ return json({ error: 'Invalid asset' }, 400);
109
+ const id = match[1];
110
+ if (request.method === 'PUT' && !match[2]) {
111
+ const mime = request.headers.get('content-type') ?? '';
112
+ if (![
113
+ 'image/jpeg',
114
+ 'image/png',
115
+ 'image/webp',
116
+ 'image/avif',
117
+ 'image/gif',
118
+ 'image/svg+xml'
119
+ ].includes(mime))
120
+ return json({ error: 'Unsupported image' }, 400);
121
+ if (mime === 'image/svg+xml') {
122
+ const data = await boundedBody(request, 1_000_000);
123
+ sanitizeSvg(new TextDecoder().decode(data));
124
+ await env.MEDIA.put('originals/' + id, data, { httpMetadata: { contentType: mime } });
125
+ }
126
+ else {
127
+ const length = Number(request.headers.get('content-length'));
128
+ if (!Number.isSafeInteger(length) || length < 1 || length > 100_000_000 || !request.body)
129
+ throw new Error('Raster uploads require Content-Length between 1 and 100000000 bytes');
130
+ // Request and R2 bodies have a known length: stream without buffering a 100 MB copy.
131
+ // Validate a private staging object before making it available to the source endpoint.
132
+ const staging = `incoming/${id}/${crypto.randomUUID()}`;
133
+ try {
134
+ const stored = await env.MEDIA.put(staging, request.body, {
135
+ httpMetadata: { contentType: mime }
136
+ });
137
+ if (!stored || stored.size !== length)
138
+ throw new Error('Upload length mismatch');
139
+ const input = await env.MEDIA.get(staging);
140
+ if (!input)
141
+ throw new Error('Upload missing');
142
+ const info = await env.IMAGES.info(input.body);
143
+ if (!('width' in info) ||
144
+ !Number.isFinite(info.width) ||
145
+ !Number.isFinite(info.height) ||
146
+ info.width < 1 ||
147
+ info.height < 1 ||
148
+ info.width * info.height > 100_000_000)
149
+ throw new Error('Image must be at most 100 megapixels');
150
+ const validated = await env.MEDIA.get(staging);
151
+ if (!validated)
152
+ throw new Error('Upload missing');
153
+ await env.MEDIA.put('originals/' + id, validated.body, {
154
+ httpMetadata: { contentType: mime }
155
+ });
156
+ }
157
+ finally {
158
+ await env.MEDIA.delete(staging);
159
+ }
160
+ }
161
+ return json({ stored: true });
162
+ }
163
+ if (request.method === 'POST' && match[2]) {
164
+ const body = JSON.parse(new TextDecoder().decode(await boundedBody(request, 4096)));
165
+ if (!/^[a-f0-9]{16}$/.test(body.version) ||
166
+ !/^([a-z][a-z0-9_-]*)$/.test(body.preset) ||
167
+ !Number.isInteger(body.size) ||
168
+ body.size < 1 ||
169
+ body.size > 8192 ||
170
+ !['webp', 'avif', 'jpeg', 'svg'].includes(body.format) ||
171
+ !Number.isInteger(body.quality) ||
172
+ body.quality < 1 ||
173
+ body.quality > 100)
174
+ throw new Error('Invalid variant request');
175
+ const key = `${id}/${body.version}/${body.preset}-${body.size}.${body.format}`;
176
+ const existing = await env.MEDIA.head('variants/' + key);
177
+ if (existing?.customMetadata?.ready === 'true')
178
+ return json(JSON.parse(existing.customMetadata.result));
179
+ const original = await env.MEDIA.get('originals/' + id);
180
+ if (!original)
181
+ return json({ error: 'Original missing; upload again' }, 404);
182
+ let output, width, height;
183
+ if (original.httpMetadata?.contentType === 'image/svg+xml') {
184
+ if (body.format !== 'svg')
185
+ throw new Error('SVG requires a sanitized derivative');
186
+ const svg = sanitizeSvg(await original.text());
187
+ output = new Response(svg, { headers: { 'Content-Type': 'image/svg+xml' } });
188
+ ({ width, height } = svgDimensions(svg));
189
+ }
190
+ else {
191
+ if (body.format === 'svg')
192
+ throw new Error('Raster input cannot become SVG');
193
+ const info = await env.IMAGES.info(original.body);
194
+ if (!('width' in info))
195
+ throw new Error('Raster dimensions unavailable');
196
+ const scale = Math.min(1, body.size / Math.max(info.width, info.height));
197
+ width = Math.max(1, Math.round(info.width * scale));
198
+ height = Math.max(1, Math.round(info.height * scale));
199
+ const source = await sourceURL(url.origin, id, env.CMS_TOKEN);
200
+ const options = {
201
+ redirect: 'manual',
202
+ cf: {
203
+ image: {
204
+ width,
205
+ height,
206
+ fit: 'scale-down',
207
+ format: body.format,
208
+ quality: body.quality
209
+ }
210
+ }
211
+ };
212
+ try {
213
+ output = await fetch(source, options);
214
+ }
215
+ catch {
216
+ // Fetch errors can include the URL; never expose a source capability in job errors.
217
+ throw new Error('Remote image transformation request failed');
218
+ }
219
+ if (!output.ok) {
220
+ await output.body?.cancel();
221
+ throw new Error(`Remote image transformation failed (${output.status})`);
222
+ }
223
+ if (output.headers.get('content-type')?.split(';')[0] !== `image/${body.format}`) {
224
+ await output.body?.cancel();
225
+ throw new Error('Remote image transformation returned an unexpected format');
226
+ }
227
+ if (!output.headers.has('cf-resized') ||
228
+ /err=/i.test(output.headers.get('cf-resized'))) {
229
+ await output.body?.cancel();
230
+ throw new Error('Remote image transformation was not applied');
231
+ }
232
+ }
233
+ const result = {
234
+ key,
235
+ preset: body.preset,
236
+ size: body.size,
237
+ width,
238
+ height,
239
+ format: body.format
240
+ };
241
+ // R2 requires a known stream length; the Images result may be streamed without one.
242
+ const bytes = await boundedBody(output, 20_000_000);
243
+ await env.MEDIA.put('variants/' + key, bytes, {
244
+ httpMetadata: { contentType: output.headers.get('content-type') },
245
+ customMetadata: { ready: 'true', result: JSON.stringify(result) }
246
+ });
247
+ return json(result);
248
+ }
249
+ if (request.method === 'DELETE' && !match[2]) {
250
+ await env.MEDIA.delete('originals/' + id);
251
+ let cursor;
252
+ do {
253
+ const list = await env.MEDIA.list({ prefix: 'variants/' + id + '/', cursor });
254
+ if (list.objects.length)
255
+ await env.MEDIA.delete(list.objects.map((o) => o.key));
256
+ cursor = list.truncated ? list.cursor : undefined;
257
+ } while (cursor);
258
+ return json({ deleted: true });
259
+ }
260
+ return new Response('Not found', { status: 404 });
261
+ }
262
+ catch (e) {
263
+ return json({ error: e instanceof Error ? e.message : 'Media processing failed' }, 400);
264
+ }
265
+ }
266
+ };
@@ -0,0 +1,2 @@
1
+ export declare function sourceURL(origin: string, id: string, secret: string): Promise<URL>;
2
+ export declare function validSource(url: URL, secret: string): Promise<boolean>;
@@ -0,0 +1,31 @@
1
+ /** Short-lived, asset-scoped source URLs used only by remote transformations. */
2
+ const lifetime = 300;
3
+ async function key(secret) {
4
+ return crypto.subtle.importKey('raw', new TextEncoder().encode(secret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign', 'verify']);
5
+ }
6
+ function message(url, expires) {
7
+ return new TextEncoder().encode(`${url.origin}${url.pathname}\n${expires}`);
8
+ }
9
+ export async function sourceURL(origin, id, secret) {
10
+ const url = new URL('/internal/source/' + id, origin);
11
+ const expires = String(Math.floor(Date.now() / 1000) + lifetime);
12
+ const signature = new Uint8Array(await crypto.subtle.sign('HMAC', await key(secret), message(url, expires)));
13
+ url.searchParams.set('expires', expires);
14
+ url.searchParams.set('signature', Array.from(signature, (v) => v.toString(16).padStart(2, '0')).join(''));
15
+ return url;
16
+ }
17
+ export async function validSource(url, secret) {
18
+ if (!secret || secret.length < 32)
19
+ return false;
20
+ const expires = url.searchParams.get('expires') ?? '';
21
+ const signature = url.searchParams.get('signature') ?? '';
22
+ const now = Math.floor(Date.now() / 1000);
23
+ if (!/^\d+$/.test(expires) ||
24
+ Number(expires) <= now ||
25
+ Number(expires) > now + lifetime ||
26
+ !/^[a-f0-9]{64}$/.test(signature) ||
27
+ [...url.searchParams].length !== 2)
28
+ return false;
29
+ const bytes = Uint8Array.from(signature.match(/../g), (v) => parseInt(v, 16));
30
+ return crypto.subtle.verify('HMAC', await key(secret), bytes, message(url, expires));
31
+ }
@@ -0,0 +1,5 @@
1
+ export declare function sanitizeSvg(input: string): string;
2
+ export declare function svgDimensions(svg: string): {
3
+ width: number;
4
+ height: number;
5
+ };
@@ -0,0 +1,142 @@
1
+ import { SaxesParser } from 'saxes';
2
+ const elements = new Set([
3
+ 'svg',
4
+ 'g',
5
+ 'defs',
6
+ 'path',
7
+ 'rect',
8
+ 'circle',
9
+ 'ellipse',
10
+ 'line',
11
+ 'polyline',
12
+ 'polygon',
13
+ 'text',
14
+ 'tspan',
15
+ 'title',
16
+ 'desc',
17
+ 'linearGradient',
18
+ 'radialGradient',
19
+ 'stop',
20
+ 'clipPath',
21
+ 'mask',
22
+ 'use',
23
+ 'symbol'
24
+ ]);
25
+ const attributes = new Set([
26
+ 'id',
27
+ 'viewBox',
28
+ 'width',
29
+ 'height',
30
+ 'x',
31
+ 'y',
32
+ 'x1',
33
+ 'x2',
34
+ 'y1',
35
+ 'y2',
36
+ 'cx',
37
+ 'cy',
38
+ 'r',
39
+ 'rx',
40
+ 'ry',
41
+ 'd',
42
+ 'points',
43
+ 'fill',
44
+ 'fill-rule',
45
+ 'fill-opacity',
46
+ 'stroke',
47
+ 'stroke-width',
48
+ 'stroke-linecap',
49
+ 'stroke-linejoin',
50
+ 'stroke-dasharray',
51
+ 'stroke-dashoffset',
52
+ 'stroke-opacity',
53
+ 'opacity',
54
+ 'transform',
55
+ 'gradientTransform',
56
+ 'gradientUnits',
57
+ 'offset',
58
+ 'stop-color',
59
+ 'stop-opacity',
60
+ 'clip-path',
61
+ 'clip-rule',
62
+ 'mask',
63
+ 'preserveAspectRatio',
64
+ 'font-family',
65
+ 'font-size',
66
+ 'font-weight',
67
+ 'text-anchor',
68
+ 'dx',
69
+ 'dy',
70
+ 'href'
71
+ ]);
72
+ const escape = (s) => s.replace(/[&<>"']/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&apos;' })[c]);
73
+ export function sanitizeSvg(input) {
74
+ if (new TextEncoder().encode(input).length > 1_000_000)
75
+ throw new Error('SVG limit is 1 MB');
76
+ let result = '', depth = 0, skip = 0, count = 0, root = false;
77
+ const parser = new SaxesParser({ xmlns: true });
78
+ parser.on('doctype', () => {
79
+ throw new Error('SVG document types and entities are not allowed');
80
+ });
81
+ parser.on('error', (e) => {
82
+ throw e;
83
+ });
84
+ parser.on('opentag', (tag) => {
85
+ depth++;
86
+ if (depth > 64 || ++count > 10000)
87
+ throw new Error('SVG is too complex');
88
+ if (depth === 1) {
89
+ if (tag.local !== 'svg' || tag.uri !== 'http://www.w3.org/2000/svg')
90
+ throw new Error('Expected an SVG root and namespace');
91
+ root = true;
92
+ }
93
+ if (skip || !elements.has(tag.local) || tag.uri !== 'http://www.w3.org/2000/svg') {
94
+ skip++;
95
+ return;
96
+ }
97
+ result += '<' + tag.local;
98
+ if (depth === 1)
99
+ result += ' xmlns="http://www.w3.org/2000/svg"';
100
+ for (const attr of Object.values(tag.attributes)) {
101
+ if (!attributes.has(attr.name) || attr.prefix || /[<>\u0000-\u001f]/.test(attr.value))
102
+ continue;
103
+ if (attr.name === 'href' && !/^#[a-zA-Z_][\w:.-]*$/.test(attr.value))
104
+ continue;
105
+ if (/url\s*\(/i.test(attr.value) && !/^url\(#[a-zA-Z_][\w:.-]*\)$/.test(attr.value))
106
+ continue;
107
+ if (/(?:javascript|data|https?):|\/\//i.test(attr.value))
108
+ continue;
109
+ result += ` ${attr.name}="${escape(attr.value)}"`;
110
+ }
111
+ result += '>';
112
+ });
113
+ parser.on('text', (text) => {
114
+ if (!skip)
115
+ result += escape(text);
116
+ });
117
+ parser.on('cdata', (text) => {
118
+ if (!skip)
119
+ result += escape(text);
120
+ });
121
+ parser.on('closetag', (tag) => {
122
+ if (skip)
123
+ skip--;
124
+ else
125
+ result += `</${tag.local}>`;
126
+ depth--;
127
+ });
128
+ parser.write(input).close();
129
+ if (!root)
130
+ throw new Error('Empty SVG');
131
+ return result;
132
+ }
133
+ export function svgDimensions(svg) {
134
+ const root = /<svg\b[^>]*>/.exec(svg)?.[0] ?? '';
135
+ const viewBox = /viewBox="([^"]+)"/.exec(root)?.[1].trim().split(/[ ,]+/).map(Number);
136
+ const width = viewBox?.[2] ?? parseFloat(/\bwidth="([^"]+)"/.exec(root)?.[1] ?? '300');
137
+ const height = viewBox?.[3] ?? parseFloat(/\bheight="([^"]+)"/.exec(root)?.[1] ?? '150');
138
+ return {
139
+ width: Number.isFinite(width) && width > 0 ? Math.round(width) : 300,
140
+ height: Number.isFinite(height) && height > 0 ? Math.round(height) : 150
141
+ };
142
+ }
@@ -0,0 +1,58 @@
1
+ # Local acceptance evidence
2
+
3
+ Verification date: **26 September 2026** for type checking, packed installation checks, and the 31 core tests, including fresh database initialization, incompatible-baseline rejection, and migration replacement recovery. Browser, visual, doctor, and container evidence below was not rerun during this review. Scope: local implementation and verification, as requested. No Dokploy project, deployed Cloudflare staging resources, or private npm registry was used. No remote deployment or package publication was performed.
4
+
5
+ ## Reproduce
6
+
7
+ ```sh
8
+ bun install --frozen-lockfile
9
+ bun run check
10
+ bun test tests
11
+ bun run build
12
+ bun x playwright install chromium
13
+ bun run test:e2e
14
+ bun run test:package
15
+ ```
16
+
17
+ Use Bun 1.4.0 and Node 26.8.1. Stop the development server before building. Browser tests start the production Bun output on port 5411 and local Wrangler on 8788, with temporary databases, R2 state, and fixture accounts. They clean up their resources. Test credentials are fixture-only.
18
+
19
+ ## Results
20
+
21
+ | Check | Local evidence |
22
+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
+ | Type checking and build | `svelte-check`: zero errors or warnings; SvelteKit production Bun build and `publint` pass. |
24
+ | Core behavior | 31 tests cover blueprint icons, defaults and validation, drafts, atomic publication, stale edits, hidden fields, 80-image galleries, stable relations, rich-text safety, form snapshots/rate limits/CSV, auth/recovery, Worker authentication/SVG, durable jobs, retries, preset changes and rollback, fresh database initialization and incompatible baseline rejection, installation ownership, backup and restore. |
25
+ | Browser workflows | Eleven Chromium workflows exercise first login, draft preview/public routes, permissions, TOTP/recovery, media selection/credits and conversion, forms/inbox/CSV, a 30-image gallery, shadcn fields, blueprint icons and rich-text links, and unsaved navigation cancel/discard with back/forward and unguarded refresh. |
26
+ | Packed installation | The actual archive installs, type checks, and builds in a fresh site without Tailwind and in an existing site with a public route and JavaScript hook. Hook composition follows the generated report; reruns and customized upgrade checks preserve developer files. |
27
+ | Visual and keyboard review | Desktop and 390px mobile login, overview, editor, navigation, media, dialogs, and galleries inspected. Shadcn selects support keyboard selection, clearing, persistence, and nested dialogs. Unsaved-dialog focus, Escape, and cancel restoration pass. Browser assertions check horizontal overflow. |
28
+ | Local doctor | Bun pin, adapter/start command, integration routes/hook, YAML, writable SQLite, migrations, environment presence, and authenticated Worker protocol pass. |
29
+ | Railpack image | Railpack 0.40.0 builds the application with Bun 1.4.0 and the pinned adapter. A real Docker named volume proves production bootstrap, authenticated editing, public rendering, persistence across container replacement, a live snapshot, refusal of in-use restore across containers, and successful offline restore. |
30
+
31
+ Blueprints support validated Lucide icon names with defaults for every kind. Projects uses `icon: image`. Custom and default icons render in the sidebar, and the complete icon catalogue stays on the server. Desktop and mobile review also confirms the profile initial is centered after narrowing the role-label CSS selector.
32
+
33
+ The admin component pass uses the configured shadcn preset for selects, checkboxes, switches, tables, cards, alerts, avatars, upload buttons, formatting toggles, and dialogs. Shared wrappers keep field controls and the navigation guard separate from page components. The locally hosted HTTPS preview also passed login, unsaved cancel/discard, relation dropdowns, and mobile dropdowns inside media/user dialogs without saving review content.
34
+
35
+ Browser review images are generated in ignored `artifacts/`; failure traces go to ignored `test-results/`. The tests run against local simulations or temporary fixtures. Local Images conversion proves encoding, aspect ratio, and no upscaling; it does not establish Cloudflare's configured quality fidelity or production resource limits.
36
+
37
+ ## Repeat the local container drill
38
+
39
+ With Docker, Buildx, and Railpack 0.40.0 available:
40
+
41
+ ```sh
42
+ railpack plan . --out /tmp/sandcms-railpack-plan.json
43
+ docker buildx build \
44
+ --build-arg BUILDKIT_SYNTAX=ghcr.io/railwayapp/railpack-frontend:v0.40.0 \
45
+ -f /tmp/sandcms-railpack-plan.json \
46
+ -t sandcms-local-proof:0.1.1 --load .
47
+ bun run test:container
48
+ ```
49
+
50
+ The drill owns and removes its temporary containers and volume. It uses localhost port 5412. Set a different image by passing it as an argument to the script. Railpack's image entrypoint is a shell; one-off Docker CLI commands must override it, for example `docker run --entrypoint bun ... IMAGE dist/cli/index.js migrate`. Do not print or copy bootstrap passwords from test logs into tracked files.
51
+
52
+ ## External release checks still required
53
+
54
+ 1. **Dokploy:** deploy the Railpack image with HTTPS, the production volume, runtime secrets, and the actual reverse proxy configuration. Bootstrap against that mounted database, publish content, replace the container, verify session/cookie and proxy behavior, and perform the documented backup/offline-restore drill. The local Docker proof covers the application mechanics; Dokploy's operator access, mounting, restart policy, and routing remain unverified.
55
+ 2. **Cloudflare staging:** complete the [staging and CDN verification](cloudflare.md#staging-verification) with authorized staging resources. This remains an external release check; local tests do not prove deployed cache behavior or image quality.
56
+ 3. **Private npm:** publish `@sandquist-group/sandcms` with restricted access from an authorized organization account, and prove an authenticated pinned install in a clean CI environment. Validate secret handling in the real build host. Local archive installation is complete; registry authentication and publication remain unverified.
57
+
58
+ The cloud provisioning implementation is present, but its live acceptance is pending. These checks are release gates, not prerequisites for continuing local development.