studiocms 0.1.0-beta.24 → 0.1.0-beta.26

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 (979) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/dist/cli/add/index.d.ts +3 -4
  3. package/dist/cli/add/index.js +6 -7
  4. package/dist/cli/crypto/genJWT/index.d.ts +5 -5
  5. package/dist/cli/crypto/genJWT/index.js +14 -15
  6. package/dist/cli/crypto/index.d.ts +2 -2
  7. package/dist/cli/crypto/index.js +4 -4
  8. package/dist/cli/getTurso/index.d.ts +2 -2
  9. package/dist/cli/getTurso/index.js +3 -4
  10. package/dist/cli/index.js +11 -10
  11. package/dist/cli/init/index.d.ts +4 -4
  12. package/dist/cli/init/index.js +11 -12
  13. package/dist/cli/users/index.d.ts +4 -4
  14. package/dist/cli/users/index.js +11 -12
  15. package/dist/cli/users/steps/libsqlCreateUsers.js +3 -3
  16. package/dist/cli/users/steps/libsqlModifyUsers.js +3 -3
  17. package/dist/{layouts → components}/auth/FallbackCanvas.astro +1 -1
  18. package/dist/components/auth/OAuthButton.astro +1 -1
  19. package/dist/components/auth/OAuthButtonStack.astro +2 -2
  20. package/dist/components/auth/StaticAuthCheck.astro +3 -3
  21. package/dist/{scripts → components/auth/component-scripts}/formListener.d.ts +3 -0
  22. package/dist/{scripts → components/auth/component-scripts}/formListener.js +1 -1
  23. package/dist/components/dashboard/BaseHead.astro +7 -18
  24. package/dist/components/dashboard/DashboardGrid.astro +4 -4
  25. package/dist/components/dashboard/DashboardGridItem.astro +3 -2
  26. package/dist/components/dashboard/DashboardPageHeader.astro +11 -6
  27. package/dist/components/dashboard/DoubleSidebar.astro +3 -3
  28. package/dist/components/dashboard/Footer.astro +3 -7
  29. package/dist/components/dashboard/LoginChecker.astro +17 -17
  30. package/dist/components/dashboard/MainSidebarContent.astro +27 -18
  31. package/dist/components/dashboard/PageHeader.astro +3 -2
  32. package/dist/components/dashboard/SidebarLink.astro +148 -31
  33. package/dist/components/dashboard/SidebarPluginLink.astro +4 -4
  34. package/dist/components/dashboard/SingleSidebar.astro +3 -3
  35. package/dist/components/dashboard/UserName.astro +2 -2
  36. package/dist/components/dashboard/component-scripts/dateTimeListener.js +4 -9
  37. package/dist/components/dashboard/component-scripts/dateWithTimeAndZone.d.ts +1 -0
  38. package/dist/components/dashboard/component-scripts/dateWithTimeAndZone.js +10 -7
  39. package/dist/components/dashboard/configuration/ConfigForm.astro +53 -152
  40. package/dist/components/dashboard/configuration/LoginPreview.astro +275 -0
  41. package/dist/components/dashboard/content-mgmt/CreateFolder.astro +6 -5
  42. package/dist/components/dashboard/content-mgmt/CreatePage.astro +23 -47
  43. package/dist/components/dashboard/content-mgmt/EditFolder.astro +5 -4
  44. package/dist/components/dashboard/content-mgmt/EditPage.astro +36 -85
  45. package/dist/components/dashboard/content-mgmt/InnerSidebarElement.astro +30 -22
  46. package/dist/components/dashboard/content-mgmt/PageEditorSwapper.astro +107 -0
  47. package/dist/components/dashboard/content-mgmt/PageHeader.astro +26 -18
  48. package/dist/components/dashboard/content-mgmt/PageTypeHandler.astro +107 -0
  49. package/dist/components/dashboard/content-mgmt/PluginFields.astro +6 -1
  50. package/dist/components/dashboard/content-mgmt/TreeRenderer.astro +8 -8
  51. package/dist/components/dashboard/content-mgmt/TreeSidebarFolder.astro +116 -24
  52. package/dist/components/dashboard/content-mgmt/TreeSidebarLink.astro +116 -24
  53. package/dist/components/dashboard/content-mgmt/runtime.js +1 -1
  54. package/dist/components/dashboard/plugins/SettingsRenderer.astro +6 -1
  55. package/dist/components/dashboard/profile/APITokens.astro +18 -12
  56. package/dist/components/dashboard/profile/BasicInfo.astro +17 -13
  57. package/dist/components/dashboard/profile/Notifications.astro +20 -8
  58. package/dist/components/dashboard/profile/SocialSignin.astro +11 -8
  59. package/dist/components/dashboard/profile/UpdatePassword.astro +10 -7
  60. package/dist/components/dashboard/profile/oAuthButtonProviders.d.ts +1 -8
  61. package/dist/components/dashboard/profile/oAuthButtonProviders.js +1 -15
  62. package/dist/components/dashboard/shared.d.ts +1 -1
  63. package/dist/components/dashboard/sidebar/UserAccount.astro +5 -6
  64. package/dist/components/dashboard/sidebar/VersionCheck.astro +7 -7
  65. package/dist/components/dashboard/sidebar/VersionCheckChangelog.astro +32 -8
  66. package/dist/components/dashboard/sidebar-modals/UserManagementModals.astro +8 -3
  67. package/dist/components/dashboard/sidebar-modals/VersionModal.astro +43 -24
  68. package/dist/components/dashboard/sidebarConfig.d.ts +2 -2
  69. package/dist/components/dashboard/sidebarConfig.js +7 -7
  70. package/dist/components/dashboard/user-mgmt/InnerSidebarElement.astro +20 -13
  71. package/dist/components/dashboard/user-mgmt/RankCheck.astro +10 -10
  72. package/dist/components/dashboard/user-mgmt/SocialSignin.astro +9 -10
  73. package/dist/components/dashboard/user-mgmt/UserListItem.astro +86 -30
  74. package/dist/components/default-grid-items/Recently-created-pages.astro +12 -10
  75. package/dist/components/default-grid-items/Recently-signed-up.astro +9 -9
  76. package/dist/components/default-grid-items/Recently-updated-pages.astro +12 -10
  77. package/dist/components/default-grid-items/Totals.astro +11 -10
  78. package/dist/{routes/firstTimeSetupRoutes/components → components/first-time-setup}/PageHeader.astro +4 -3
  79. package/dist/components/shared/Code.astro +72 -0
  80. package/dist/components/shared/SSRUser.astro +200 -0
  81. package/dist/components/shared/head/Favicons.astro +6 -0
  82. package/dist/components/shared/head/Global.astro +4 -0
  83. package/dist/components/shared/head/TitleTags.astro +14 -0
  84. package/dist/config.d.ts +1 -4
  85. package/dist/consts.d.ts +48 -3
  86. package/dist/consts.js +65 -10
  87. package/dist/db/config.d.ts +1499 -0
  88. package/dist/db/config.js +262 -4
  89. package/dist/effect.d.ts +2 -3
  90. package/dist/effect.js +2 -17
  91. package/dist/{styles/dashboard-code.css → fonts/syntax-font.css} +2 -20
  92. package/dist/{utils → handlers}/astroConfigCheck.js +1 -1
  93. package/dist/handlers/changelog.d.ts +1 -0
  94. package/dist/handlers/changelog.js +54 -0
  95. package/dist/handlers/index.d.ts +4 -0
  96. package/dist/handlers/index.js +10 -0
  97. package/dist/{pluginHandler.d.ts → handlers/pluginHandler.d.ts} +4 -3
  98. package/dist/{pluginHandler.js → handlers/pluginHandler.js} +264 -127
  99. package/dist/{routeHandler.d.ts → handlers/routeHandler.d.ts} +1 -1
  100. package/dist/{routeHandler.js → handlers/routeHandler.js} +7 -2
  101. package/dist/index.d.ts +1 -0
  102. package/dist/index.js +184 -229
  103. package/dist/{lib → integrations}/dynamic-sitemap/index.js +1 -1
  104. package/dist/integrations/node-namespace.d.ts +15 -0
  105. package/dist/integrations/node-namespace.js +31 -0
  106. package/dist/integrations/plugins.d.ts +4 -0
  107. package/dist/integrations/plugins.js +7 -0
  108. package/dist/{lib → integrations}/robots/utils.d.ts +0 -8
  109. package/dist/{lib → integrations}/robots/utils.js +1 -5
  110. package/dist/{lib → integrations}/webVitals/checkForWebVitalsPlugin.js +3 -3
  111. package/{src/lib → dist/integrations}/webVitals/dashboard-grid-items/CoreVitals.astro +1 -1
  112. package/{src/lib → dist/integrations}/webVitals/dashboard-grid-items/MetricCard.astro +3 -2
  113. package/dist/{lib → integrations}/webVitals/dashboard-grid-items/SummaryCard.astro +2 -2
  114. package/dist/{lib → integrations}/webVitals/dashboard-grid-items/metric.css +17 -17
  115. package/dist/{lib → integrations}/webVitals/dashboard-grid-items/shared.d.ts +4 -4
  116. package/dist/{lib → integrations}/webVitals/dashboard-grid-items/shared.js +3 -3
  117. package/{src/lib → dist/integrations}/webVitals/pages/analytics/body.astro +10 -9
  118. package/dist/{lib → integrations}/webVitals/utils/webVitalsUtils.d.ts +9 -9
  119. package/dist/layouts/AuthLayout.astro +63 -0
  120. package/dist/layouts/{dashboard/Layout.astro → DashboardLayout.astro} +22 -10
  121. package/{src/routes/firstTimeSetupRoutes/components/Layout.astro → dist/layouts/FirstTimeSetupLayout.astro} +15 -3
  122. package/dist/middleware/index.d.ts +9 -0
  123. package/dist/middleware/index.js +67 -89
  124. package/dist/middleware/utils.d.ts +59 -36
  125. package/dist/middleware/utils.js +59 -40
  126. package/dist/routes/api/auth/[provider]/callback.d.ts +1 -4
  127. package/dist/routes/api/auth/[provider]/callback.js +29 -11
  128. package/dist/routes/api/auth/[provider]/index.d.ts +1 -4
  129. package/dist/routes/api/auth/[provider]/index.js +29 -11
  130. package/dist/routes/api/auth/forgot-password.d.ts +1 -4
  131. package/dist/routes/api/auth/forgot-password.js +85 -66
  132. package/dist/routes/api/auth/login.d.ts +1 -4
  133. package/dist/routes/api/auth/login.js +63 -47
  134. package/dist/routes/api/auth/logout.d.ts +6 -5
  135. package/dist/routes/api/auth/logout.js +38 -24
  136. package/dist/routes/api/auth/register.d.ts +1 -4
  137. package/dist/routes/api/auth/register.js +74 -63
  138. package/dist/routes/api/auth/shared.d.ts +4 -4
  139. package/dist/routes/api/auth/shared.js +19 -26
  140. package/dist/routes/api/dashboard/api-tokens.d.ts +1 -5
  141. package/dist/routes/api/dashboard/api-tokens.js +70 -64
  142. package/dist/routes/api/dashboard/config.d.ts +1 -4
  143. package/dist/routes/api/dashboard/config.js +51 -33
  144. package/dist/routes/api/dashboard/content/diff.d.ts +1 -4
  145. package/dist/routes/api/dashboard/content/diff.js +50 -29
  146. package/dist/routes/api/dashboard/content/folder.d.ts +1 -6
  147. package/dist/routes/api/dashboard/content/folder.js +106 -86
  148. package/dist/routes/api/dashboard/content/page.d.ts +1 -5
  149. package/dist/routes/api/dashboard/content/page.js +207 -202
  150. package/dist/routes/api/dashboard/create-reset-link.d.ts +1 -4
  151. package/dist/routes/api/dashboard/create-reset-link.js +53 -40
  152. package/dist/routes/api/dashboard/create-user-invite.d.ts +1 -4
  153. package/dist/routes/api/dashboard/create-user-invite.js +128 -106
  154. package/dist/routes/api/dashboard/create-user.d.ts +1 -4
  155. package/dist/routes/api/dashboard/create-user.js +132 -68
  156. package/dist/routes/api/dashboard/email-notification-settings-site.d.ts +1 -4
  157. package/dist/routes/api/dashboard/email-notification-settings-site.js +47 -21
  158. package/dist/routes/api/dashboard/partials/LiveRender.astro +21 -16
  159. package/dist/routes/api/dashboard/plugins/[plugin].d.ts +1 -4
  160. package/dist/routes/api/dashboard/plugins/[plugin].js +57 -33
  161. package/dist/routes/api/dashboard/profile.d.ts +1 -4
  162. package/dist/routes/api/dashboard/profile.js +133 -95
  163. package/dist/routes/api/dashboard/resend-verify-email.d.ts +1 -4
  164. package/dist/routes/api/dashboard/resend-verify-email.js +55 -29
  165. package/dist/routes/api/dashboard/reset-password.d.ts +1 -4
  166. package/dist/routes/api/dashboard/reset-password.js +76 -50
  167. package/dist/routes/api/dashboard/search-list.d.ts +1 -4
  168. package/dist/routes/api/dashboard/search-list.js +45 -37
  169. package/dist/routes/api/dashboard/update-user-notifications.d.ts +1 -4
  170. package/dist/routes/api/dashboard/update-user-notifications.js +48 -36
  171. package/dist/routes/api/dashboard/users.d.ts +1 -5
  172. package/dist/routes/api/dashboard/users.js +150 -96
  173. package/dist/routes/api/dashboard/verify-email.d.ts +1 -4
  174. package/dist/routes/api/dashboard/verify-email.js +52 -33
  175. package/dist/routes/api/dashboard/verify-session.d.ts +2 -29
  176. package/dist/routes/api/dashboard/verify-session.js +85 -73
  177. package/dist/routes/api/mailer/config.d.ts +2 -6
  178. package/dist/routes/api/mailer/config.js +86 -72
  179. package/dist/routes/api/mailer/test-email.d.ts +1 -4
  180. package/dist/routes/api/mailer/test-email.js +56 -33
  181. package/dist/routes/api/render.astro +1 -1
  182. package/dist/routes/api/rest/utils/auth-token.d.ts +3 -3
  183. package/dist/routes/api/rest/utils/auth-token.js +1 -2
  184. package/dist/routes/api/rest/v1/folders/[id].d.ts +2 -7
  185. package/dist/routes/api/rest/v1/folders/[id].js +105 -94
  186. package/dist/routes/api/rest/v1/folders/index.d.ts +2 -6
  187. package/dist/routes/api/rest/v1/folders/index.js +82 -66
  188. package/dist/routes/api/rest/v1/pages/[id]/history/[diffid].d.ts +1 -4
  189. package/dist/routes/api/rest/v1/pages/[id]/history/[diffid].js +46 -34
  190. package/dist/routes/api/rest/v1/pages/[id]/history/index.d.ts +1 -4
  191. package/dist/routes/api/rest/v1/pages/[id]/history/index.js +44 -39
  192. package/dist/routes/api/rest/v1/pages/[id]/index.d.ts +1 -6
  193. package/dist/routes/api/rest/v1/pages/[id]/index.js +158 -151
  194. package/dist/routes/api/rest/v1/pages/index.d.ts +1 -5
  195. package/dist/routes/api/rest/v1/pages/index.js +112 -107
  196. package/dist/routes/api/rest/v1/public/folders/[id].d.ts +1 -4
  197. package/dist/routes/api/rest/v1/public/folders/[id].js +32 -23
  198. package/dist/routes/api/rest/v1/public/folders/index.d.ts +1 -4
  199. package/dist/routes/api/rest/v1/public/folders/index.js +43 -33
  200. package/dist/routes/api/rest/v1/public/pages/[id].d.ts +1 -4
  201. package/dist/routes/api/rest/v1/public/pages/[id].js +38 -26
  202. package/dist/routes/api/rest/v1/public/pages/index.d.ts +1 -4
  203. package/dist/routes/api/rest/v1/public/pages/index.js +47 -44
  204. package/dist/routes/api/rest/v1/settings/index.d.ts +1 -5
  205. package/dist/routes/api/rest/v1/settings/index.js +60 -54
  206. package/dist/routes/api/rest/v1/users/[id].d.ts +2 -7
  207. package/dist/routes/api/rest/v1/users/[id].js +257 -231
  208. package/dist/routes/api/rest/v1/users/index.d.ts +2 -6
  209. package/dist/routes/api/rest/v1/users/index.js +154 -136
  210. package/dist/routes/api/sdk/fallback-list-pages.json.d.ts +1 -4
  211. package/dist/routes/api/sdk/fallback-list-pages.json.js +26 -33
  212. package/dist/routes/api/sdk/full-changelog.json.d.ts +1 -4
  213. package/dist/routes/api/sdk/full-changelog.json.js +27 -26
  214. package/dist/routes/api/sdk/list-pages.d.ts +1 -4
  215. package/dist/routes/api/sdk/list-pages.js +36 -29
  216. package/dist/routes/api/sdk/update-latest-version-cache.d.ts +1 -4
  217. package/dist/routes/api/sdk/update-latest-version-cache.js +30 -28
  218. package/dist/routes/api/sdk/utils/changelog.d.ts +5 -21
  219. package/dist/routes/api/sdk/utils/changelog.js +25 -131
  220. package/dist/routes/auth/login.astro +68 -58
  221. package/dist/routes/auth/logout.astro +3 -3
  222. package/dist/routes/auth/signup.astro +9 -9
  223. package/dist/routes/dashboard/[...pluginPage].astro +4 -2
  224. package/dist/routes/dashboard/configuration.astro +7 -4
  225. package/dist/routes/dashboard/content-management/createfolder.astro +5 -3
  226. package/dist/routes/dashboard/content-management/createpage.astro +5 -3
  227. package/dist/routes/dashboard/content-management/diff.astro +19 -15
  228. package/dist/routes/dashboard/content-management/editfolder.astro +4 -2
  229. package/dist/routes/dashboard/content-management/editpage.astro +4 -2
  230. package/dist/routes/dashboard/content-management/index.astro +5 -3
  231. package/dist/routes/dashboard/index.astro +4 -2
  232. package/dist/routes/dashboard/password-reset.astro +13 -8
  233. package/dist/routes/dashboard/plugins/[plugin].astro +10 -7
  234. package/dist/routes/dashboard/profile.astro +9 -4
  235. package/dist/routes/dashboard/smtp-configuration.astro +30 -18
  236. package/dist/routes/dashboard/unverified-email.astro +9 -9
  237. package/dist/routes/dashboard/user-management/edit.astro +53 -39
  238. package/dist/routes/dashboard/user-management/index.astro +6 -4
  239. package/dist/routes/error-pages/404.astro +6 -4
  240. package/dist/routes/firstTimeSetupRoutes/1-start.astro +18 -110
  241. package/dist/routes/firstTimeSetupRoutes/2-next.astro +60 -44
  242. package/dist/routes/firstTimeSetupRoutes/3-done.astro +9 -11
  243. package/dist/routes/firstTimeSetupRoutes/api/step-1.d.ts +1 -4
  244. package/dist/routes/firstTimeSetupRoutes/api/step-1.js +98 -87
  245. package/dist/routes/firstTimeSetupRoutes/api/step-2.d.ts +1 -4
  246. package/dist/routes/firstTimeSetupRoutes/api/step-2.js +95 -87
  247. package/dist/routes/firstTimeSetupRoutes/index.astro +6 -0
  248. package/dist/runtime/index.d.ts +2 -2
  249. package/dist/runtime/index.js +2 -3
  250. package/dist/schemas/config/index.js +1 -1
  251. package/dist/schemas/plugins/index.d.ts +57 -57
  252. package/dist/schemas/plugins/shared.d.ts +196 -77
  253. package/dist/schemas/plugins/shared.js +10 -16
  254. package/dist/styles/404.css +1 -1
  255. package/dist/styles/{authlayout.css → auth-layout.css} +1 -1
  256. package/dist/styles/code-component.css +56 -0
  257. package/dist/styles/dashboard-base.css +31 -62
  258. package/dist/styles/dashboard-diff.css +32 -32
  259. package/dist/theme.d.ts +1 -0
  260. package/dist/types.d.ts +3 -23
  261. package/dist/{lib → utils}/effects/index.d.ts +0 -1
  262. package/dist/{lib → utils}/effects/index.js +0 -2
  263. package/dist/{lib → utils}/effects/logger.d.ts +2 -4
  264. package/dist/{lib → utils}/effects/logger.js +2 -4
  265. package/dist/utils/effects/smtp.d.ts +40 -0
  266. package/dist/utils/effects/smtp.js +75 -0
  267. package/dist/utils/safeString.d.ts +1 -1
  268. package/dist/utils/safeString.js +1 -3
  269. package/dist/utils/stripIconify.d.ts +13 -0
  270. package/dist/utils/stripIconify.js +11 -0
  271. package/dist/utils/tinyMDParser.d.ts +6 -0
  272. package/dist/utils/tinyMDParser.js +5 -5
  273. package/dist/virtual.d.ts +194 -236
  274. package/dist/virtuals/auth/core.d.ts +91 -0
  275. package/dist/virtuals/auth/core.js +45 -0
  276. package/dist/{lib → virtuals}/auth/index.d.ts +1 -4
  277. package/dist/virtuals/auth/index.js +9 -0
  278. package/dist/virtuals/auth/scripts/three.d.ts +108 -0
  279. package/dist/virtuals/auth/scripts/three.js +484 -0
  280. package/dist/virtuals/auth/scripts/utils/fitModelToViewport.d.ts +10 -0
  281. package/dist/virtuals/auth/scripts/utils/fitModelToViewport.js +26 -0
  282. package/dist/{utils/validImages.d.ts → virtuals/auth/validImages/index.d.ts} +1 -1
  283. package/dist/virtuals/auth/validImages/index.js +39 -0
  284. package/dist/virtuals/auth/validImages/studiocms-blobs-dark.webp +0 -0
  285. package/dist/virtuals/auth/validImages/studiocms-blobs-light.webp +0 -0
  286. package/dist/virtuals/auth/validImages/studiocms-blocks-dark.webp +0 -0
  287. package/dist/virtuals/auth/validImages/studiocms-blocks-light.webp +0 -0
  288. package/dist/virtuals/auth/validImages/studiocms-curves-dark.webp +0 -0
  289. package/dist/virtuals/auth/validImages/studiocms-curves-light.webp +0 -0
  290. package/dist/{lib → virtuals}/auth/verify-email.d.ts +10 -10
  291. package/dist/{lib → virtuals}/auth/verify-email.js +19 -20
  292. package/dist/virtuals/components/Generator.astro +5 -0
  293. package/{src → dist/virtuals}/components/Renderer.astro +1 -1
  294. package/{src/lib → dist/virtuals}/i18n/LanguageSelector.astro +1 -1
  295. package/dist/{lib → virtuals}/i18n/client.d.ts +100 -4
  296. package/dist/{lib → virtuals}/i18n/client.js +11 -10
  297. package/dist/virtuals/i18n/config.d.ts +430 -0
  298. package/dist/virtuals/i18n/config.js +29 -0
  299. package/dist/virtuals/i18n/server.d.ts +116 -0
  300. package/dist/{lib/i18n/index.js → virtuals/i18n/server.js} +6 -19
  301. package/dist/{lib → virtuals}/i18n/translations/de.json +1 -1
  302. package/dist/virtuals/i18n/v-files.d.ts +30 -0
  303. package/dist/virtuals/i18n/v-files.js +46 -0
  304. package/dist/virtuals/lib/head.d.ts +1 -0
  305. package/dist/virtuals/lib/head.js +1 -0
  306. package/dist/{lib → virtuals/lib}/headDefaults.d.ts +1 -1
  307. package/dist/{lib → virtuals/lib}/headDefaults.js +1 -1
  308. package/dist/{lib → virtuals/lib}/makeAPIRoute.d.ts +1 -1
  309. package/dist/virtuals/lib/pathGenerators.d.ts +1 -0
  310. package/dist/virtuals/lib/pathGenerators.js +1 -0
  311. package/dist/{lib → virtuals/lib}/routeMap.d.ts +4 -0
  312. package/dist/{lib → virtuals/lib}/routeMap.js +5 -1
  313. package/dist/{lib → virtuals/lib}/urlGen.d.ts +2 -1
  314. package/dist/virtuals/lib/urlGen.js +6 -0
  315. package/dist/virtuals/mailer/index.d.ts +64 -0
  316. package/dist/{lib → virtuals}/mailer/index.js +7 -24
  317. package/dist/{lib → virtuals}/notifier/index.d.ts +6 -7
  318. package/dist/{lib → virtuals}/notifier/index.js +2 -4
  319. package/dist/virtuals/plugins/dashboard-pages.d.ts +71 -0
  320. package/dist/virtuals/scripts/user-quick-tools.d.ts +91 -0
  321. package/dist/{components → virtuals/scripts}/user-quick-tools.js +135 -53
  322. package/dist/{sdk → virtuals/sdk}/effect/collectors.d.ts +2 -2
  323. package/dist/{sdk → virtuals/sdk}/effect/collectors.js +1 -1
  324. package/dist/{sdk → virtuals/sdk}/effect/db.d.ts +1 -1
  325. package/dist/{sdk → virtuals/sdk}/effect/db.js +1 -1
  326. package/dist/{sdk → virtuals/sdk}/effect/foldertree.d.ts +2 -2
  327. package/dist/{sdk → virtuals/sdk}/effect/foldertree.js +1 -1
  328. package/dist/{sdk → virtuals/sdk}/effect/generators.d.ts +1 -1
  329. package/dist/{sdk → virtuals/sdk}/effect/generators.js +1 -1
  330. package/dist/{sdk → virtuals/sdk}/effect/getVersionFromNPM.d.ts +4 -5
  331. package/dist/virtuals/sdk/effect/getVersionFromNPM.js +24 -0
  332. package/dist/{sdk → virtuals/sdk}/effect/parsers.d.ts +1 -1
  333. package/dist/{sdk → virtuals/sdk}/effect/parsers.js +2 -2
  334. package/dist/{sdk → virtuals/sdk}/effect/pluginUtils.d.ts +1 -1
  335. package/dist/{sdk → virtuals/sdk}/effect/pluginUtils.js +1 -1
  336. package/dist/{sdk → virtuals/sdk}/effect/users.d.ts +1 -1
  337. package/dist/{sdk → virtuals/sdk}/effect/users.js +2 -2
  338. package/dist/{sdk → virtuals/sdk}/errors.d.ts +1 -1
  339. package/dist/{sdk → virtuals/sdk}/errors.js +1 -1
  340. package/dist/{sdk → virtuals/sdk}/index.d.ts +5 -4
  341. package/dist/{sdk → virtuals/sdk}/index.js +3 -4
  342. package/dist/{sdk → virtuals/sdk}/modules/auth.d.ts +7 -6
  343. package/dist/{sdk → virtuals/sdk}/modules/auth.js +2 -2
  344. package/dist/{sdk → virtuals/sdk}/modules/clear.d.ts +1 -1
  345. package/dist/{sdk → virtuals/sdk}/modules/clear.js +1 -1
  346. package/dist/virtuals/sdk/modules/config.d.ts +272 -0
  347. package/dist/virtuals/sdk/modules/config.js +205 -0
  348. package/dist/{sdk → virtuals/sdk}/modules/delete.d.ts +1 -1
  349. package/dist/{sdk → virtuals/sdk}/modules/delete.js +2 -2
  350. package/dist/{sdk → virtuals/sdk}/modules/diffTracking.d.ts +1 -1
  351. package/dist/{sdk → virtuals/sdk}/modules/diffTracking.js +1 -1
  352. package/dist/{sdk → virtuals/sdk}/modules/get.d.ts +14 -27
  353. package/dist/{sdk → virtuals/sdk}/modules/get.js +29 -42
  354. package/dist/{sdk → virtuals/sdk}/modules/init.d.ts +5 -19
  355. package/dist/{sdk → virtuals/sdk}/modules/init.js +8 -9
  356. package/dist/{sdk → virtuals/sdk}/modules/middlewares.d.ts +2 -2
  357. package/dist/{sdk → virtuals/sdk}/modules/middlewares.js +18 -12
  358. package/dist/{sdk → virtuals/sdk}/modules/notificationSettings.d.ts +6 -23
  359. package/dist/{sdk → virtuals/sdk}/modules/notificationSettings.js +8 -30
  360. package/dist/{sdk → virtuals/sdk}/modules/plugins.d.ts +1 -1
  361. package/dist/{sdk → virtuals/sdk}/modules/plugins.js +1 -1
  362. package/dist/{sdk → virtuals/sdk}/modules/post.d.ts +7 -7
  363. package/dist/{sdk → virtuals/sdk}/modules/post.js +15 -10
  364. package/dist/{sdk → virtuals/sdk}/modules/resetTokenBucket.d.ts +1 -1
  365. package/dist/{sdk → virtuals/sdk}/modules/resetTokenBucket.js +1 -1
  366. package/dist/{sdk → virtuals/sdk}/modules/rest_api.d.ts +2 -2
  367. package/dist/{sdk → virtuals/sdk}/modules/rest_api.js +1 -1
  368. package/dist/{sdk → virtuals/sdk}/modules/update.d.ts +26 -26
  369. package/dist/{sdk → virtuals/sdk}/modules/update.js +29 -26
  370. package/dist/{sdk → virtuals/sdk}/sdkCore.d.ts +6 -4
  371. package/dist/{sdk → virtuals/sdk}/sdkCore.js +10 -5
  372. package/dist/virtuals/sdk/tables.d.ts +2 -0
  373. package/dist/virtuals/sdk/tables.js +5 -0
  374. package/dist/{sdk → virtuals/sdk}/types/index.d.ts +6 -5
  375. package/dist/{sdk → virtuals/sdk}/types/tableDefs.d.ts +5 -4
  376. package/dist/{sdk → virtuals/sdk}/types/tsAlias.d.ts +4 -0
  377. package/dist/{sdk → virtuals/sdk}/utils.d.ts +4 -3
  378. package/dist/{sdk → virtuals/sdk}/utils.js +1 -1
  379. package/dist/virtuals/stubs/config.stub.js +9 -0
  380. package/dist/virtuals/stubs/logger.stub.js +30 -0
  381. package/dist/virtuals/utils.d.ts +71 -0
  382. package/dist/virtuals/utils.js +43 -0
  383. package/package.json +40 -67
  384. package/src/cli/add/index.ts +6 -7
  385. package/src/cli/crypto/genJWT/index.ts +14 -15
  386. package/src/cli/crypto/index.ts +4 -4
  387. package/src/cli/getTurso/index.ts +3 -4
  388. package/src/cli/index.ts +11 -10
  389. package/src/cli/init/index.ts +11 -12
  390. package/src/cli/users/index.ts +11 -12
  391. package/src/cli/users/steps/libsqlCreateUsers.ts +4 -3
  392. package/src/cli/users/steps/libsqlModifyUsers.ts +4 -3
  393. package/src/{layouts → components}/auth/FallbackCanvas.astro +1 -1
  394. package/src/components/auth/OAuthButton.astro +1 -1
  395. package/src/components/auth/OAuthButtonStack.astro +2 -2
  396. package/src/components/auth/StaticAuthCheck.astro +3 -3
  397. package/src/{scripts → components/auth/component-scripts}/formListener.ts +5 -1
  398. package/src/components/dashboard/BaseHead.astro +7 -18
  399. package/src/components/dashboard/DashboardGrid.astro +4 -4
  400. package/src/components/dashboard/DashboardGridItem.astro +3 -2
  401. package/src/components/dashboard/DashboardPageHeader.astro +11 -6
  402. package/src/components/dashboard/DoubleSidebar.astro +3 -3
  403. package/src/components/dashboard/Footer.astro +3 -7
  404. package/src/components/dashboard/LoginChecker.astro +17 -17
  405. package/src/components/dashboard/MainSidebarContent.astro +27 -18
  406. package/src/components/dashboard/PageHeader.astro +3 -2
  407. package/src/components/dashboard/SidebarLink.astro +148 -31
  408. package/src/components/dashboard/SidebarPluginLink.astro +4 -4
  409. package/src/components/dashboard/SingleSidebar.astro +3 -3
  410. package/src/components/dashboard/UserName.astro +2 -2
  411. package/src/components/dashboard/component-scripts/dateTimeListener.ts +5 -9
  412. package/src/components/dashboard/component-scripts/dateWithTimeAndZone.ts +11 -8
  413. package/src/components/dashboard/configuration/ConfigForm.astro +53 -152
  414. package/src/components/dashboard/configuration/LoginPreview.astro +275 -0
  415. package/src/components/dashboard/content-mgmt/CreateFolder.astro +6 -5
  416. package/src/components/dashboard/content-mgmt/CreatePage.astro +23 -47
  417. package/src/components/dashboard/content-mgmt/EditFolder.astro +5 -4
  418. package/src/components/dashboard/content-mgmt/EditPage.astro +36 -85
  419. package/src/components/dashboard/content-mgmt/InnerSidebarElement.astro +30 -22
  420. package/src/components/dashboard/content-mgmt/PageEditorSwapper.astro +107 -0
  421. package/src/components/dashboard/content-mgmt/PageHeader.astro +26 -18
  422. package/src/components/dashboard/content-mgmt/PageTypeHandler.astro +107 -0
  423. package/src/components/dashboard/content-mgmt/PluginFields.astro +6 -1
  424. package/src/components/dashboard/content-mgmt/TreeRenderer.astro +8 -8
  425. package/src/components/dashboard/content-mgmt/TreeSidebarFolder.astro +116 -24
  426. package/src/components/dashboard/content-mgmt/TreeSidebarLink.astro +116 -24
  427. package/src/components/dashboard/content-mgmt/runtime.ts +1 -1
  428. package/src/components/dashboard/plugins/SettingsRenderer.astro +6 -1
  429. package/src/components/dashboard/profile/APITokens.astro +18 -12
  430. package/src/components/dashboard/profile/BasicInfo.astro +17 -13
  431. package/src/components/dashboard/profile/Notifications.astro +20 -8
  432. package/src/components/dashboard/profile/SocialSignin.astro +11 -8
  433. package/src/components/dashboard/profile/UpdatePassword.astro +10 -7
  434. package/src/components/dashboard/profile/oAuthButtonProviders.ts +1 -20
  435. package/src/components/dashboard/shared.ts +1 -1
  436. package/src/components/dashboard/sidebar/UserAccount.astro +5 -6
  437. package/src/components/dashboard/sidebar/VersionCheck.astro +7 -7
  438. package/src/components/dashboard/sidebar/VersionCheckChangelog.astro +32 -8
  439. package/src/components/dashboard/sidebar-modals/UserManagementModals.astro +8 -3
  440. package/src/components/dashboard/sidebar-modals/VersionModal.astro +43 -24
  441. package/src/components/dashboard/sidebarConfig.ts +9 -9
  442. package/src/components/dashboard/user-mgmt/InnerSidebarElement.astro +20 -13
  443. package/src/components/dashboard/user-mgmt/RankCheck.astro +10 -10
  444. package/src/components/dashboard/user-mgmt/SocialSignin.astro +9 -10
  445. package/src/components/dashboard/user-mgmt/UserListItem.astro +86 -30
  446. package/src/components/default-grid-items/Recently-created-pages.astro +12 -10
  447. package/src/components/default-grid-items/Recently-signed-up.astro +9 -9
  448. package/src/components/default-grid-items/Recently-updated-pages.astro +12 -10
  449. package/src/components/default-grid-items/Totals.astro +11 -10
  450. package/src/{routes/firstTimeSetupRoutes/components → components/first-time-setup}/PageHeader.astro +4 -3
  451. package/src/components/shared/Code.astro +72 -0
  452. package/src/components/shared/SSRUser.astro +200 -0
  453. package/src/components/shared/head/Favicons.astro +6 -0
  454. package/src/components/shared/head/Global.astro +4 -0
  455. package/src/components/shared/head/TitleTags.astro +14 -0
  456. package/src/config.ts +1 -4
  457. package/src/consts.ts +94 -14
  458. package/src/db/config.ts +306 -3
  459. package/src/effect.ts +5 -10
  460. package/src/fonts/syntax-font.css +40 -0
  461. package/src/{utils → handlers}/astroConfigCheck.ts +1 -1
  462. package/src/handlers/changelog.ts +67 -0
  463. package/src/handlers/index.ts +4 -0
  464. package/src/{pluginHandler.ts → handlers/pluginHandler.ts} +359 -142
  465. package/src/{routeHandler.ts → handlers/routeHandler.ts} +8 -3
  466. package/src/index.ts +214 -259
  467. package/src/{lib → integrations}/dynamic-sitemap/index.ts +1 -1
  468. package/src/integrations/node-namespace.ts +44 -0
  469. package/src/integrations/plugins.ts +4 -0
  470. package/src/{lib → integrations}/robots/utils.ts +0 -11
  471. package/src/{lib → integrations}/webVitals/checkForWebVitalsPlugin.ts +3 -3
  472. package/{dist/lib → src/integrations}/webVitals/dashboard-grid-items/CoreVitals.astro +1 -1
  473. package/{dist/lib → src/integrations}/webVitals/dashboard-grid-items/MetricCard.astro +3 -2
  474. package/src/{lib → integrations}/webVitals/dashboard-grid-items/SummaryCard.astro +2 -2
  475. package/src/{lib → integrations}/webVitals/dashboard-grid-items/metric.css +17 -17
  476. package/src/{lib → integrations}/webVitals/dashboard-grid-items/shared.ts +7 -7
  477. package/{dist/lib → src/integrations}/webVitals/pages/analytics/body.astro +10 -9
  478. package/src/layouts/AuthLayout.astro +63 -0
  479. package/src/layouts/{dashboard/Layout.astro → DashboardLayout.astro} +22 -10
  480. package/{dist/routes/firstTimeSetupRoutes/components/Layout.astro → src/layouts/FirstTimeSetupLayout.astro} +15 -3
  481. package/src/middleware/index.ts +98 -111
  482. package/src/middleware/utils.ts +123 -113
  483. package/src/routes/api/auth/[provider]/callback.ts +31 -15
  484. package/src/routes/api/auth/[provider]/index.ts +31 -15
  485. package/src/routes/api/auth/forgot-password.ts +134 -128
  486. package/src/routes/api/auth/login.ts +80 -67
  487. package/src/routes/api/auth/logout.ts +59 -43
  488. package/src/routes/api/auth/register.ts +93 -85
  489. package/src/routes/api/auth/shared.ts +20 -30
  490. package/src/routes/api/dashboard/api-tokens.ts +112 -104
  491. package/src/routes/api/dashboard/config.ts +64 -48
  492. package/src/routes/api/dashboard/content/diff.ts +59 -38
  493. package/src/routes/api/dashboard/content/folder.ts +145 -135
  494. package/src/routes/api/dashboard/content/page.ts +274 -275
  495. package/src/routes/api/dashboard/create-reset-link.ts +73 -64
  496. package/src/routes/api/dashboard/create-user-invite.ts +158 -140
  497. package/src/routes/api/dashboard/create-user.ts +172 -106
  498. package/src/routes/api/dashboard/email-notification-settings-site.ts +69 -32
  499. package/src/routes/api/dashboard/partials/LiveRender.astro +21 -16
  500. package/src/routes/api/dashboard/plugins/[plugin].ts +65 -45
  501. package/src/routes/api/dashboard/profile.ts +159 -127
  502. package/src/routes/api/dashboard/resend-verify-email.ts +63 -35
  503. package/src/routes/api/dashboard/reset-password.ts +108 -77
  504. package/src/routes/api/dashboard/search-list.ts +50 -50
  505. package/src/routes/api/dashboard/update-user-notifications.ts +57 -45
  506. package/src/routes/api/dashboard/users.ts +202 -135
  507. package/src/routes/api/dashboard/verify-email.ts +57 -42
  508. package/src/routes/api/dashboard/verify-session.ts +102 -116
  509. package/src/routes/api/mailer/config.ts +120 -102
  510. package/src/routes/api/mailer/test-email.ts +73 -52
  511. package/src/routes/api/render.astro +1 -1
  512. package/src/routes/api/rest/utils/auth-token.ts +1 -2
  513. package/src/routes/api/rest/v1/folders/[id].ts +136 -133
  514. package/src/routes/api/rest/v1/folders/index.ts +102 -90
  515. package/src/routes/api/rest/v1/pages/[id]/history/[diffid].ts +59 -49
  516. package/src/routes/api/rest/v1/pages/[id]/history/index.ts +63 -65
  517. package/src/routes/api/rest/v1/pages/[id]/index.ts +184 -187
  518. package/src/routes/api/rest/v1/pages/index.ts +136 -137
  519. package/src/routes/api/rest/v1/public/folders/[id].ts +34 -28
  520. package/src/routes/api/rest/v1/public/folders/index.ts +54 -47
  521. package/src/routes/api/rest/v1/public/pages/[id].ts +47 -38
  522. package/src/routes/api/rest/v1/public/pages/index.ts +60 -62
  523. package/src/routes/api/rest/v1/settings/index.ts +91 -77
  524. package/src/routes/api/rest/v1/users/[id].ts +317 -294
  525. package/src/routes/api/rest/v1/users/index.ts +196 -179
  526. package/src/routes/api/sdk/fallback-list-pages.json.ts +28 -38
  527. package/src/routes/api/sdk/full-changelog.json.ts +29 -31
  528. package/src/routes/api/sdk/list-pages.ts +41 -37
  529. package/src/routes/api/sdk/update-latest-version-cache.ts +32 -34
  530. package/src/routes/api/sdk/utils/changelog.ts +29 -168
  531. package/src/routes/auth/login.astro +68 -58
  532. package/src/routes/auth/logout.astro +3 -3
  533. package/src/routes/auth/signup.astro +9 -9
  534. package/src/routes/dashboard/[...pluginPage].astro +4 -2
  535. package/src/routes/dashboard/configuration.astro +7 -4
  536. package/src/routes/dashboard/content-management/createfolder.astro +5 -3
  537. package/src/routes/dashboard/content-management/createpage.astro +5 -3
  538. package/src/routes/dashboard/content-management/diff.astro +19 -15
  539. package/src/routes/dashboard/content-management/editfolder.astro +4 -2
  540. package/src/routes/dashboard/content-management/editpage.astro +4 -2
  541. package/src/routes/dashboard/content-management/index.astro +5 -3
  542. package/src/routes/dashboard/index.astro +4 -2
  543. package/src/routes/dashboard/password-reset.astro +13 -8
  544. package/src/routes/dashboard/plugins/[plugin].astro +10 -7
  545. package/src/routes/dashboard/profile.astro +9 -4
  546. package/src/routes/dashboard/smtp-configuration.astro +30 -18
  547. package/src/routes/dashboard/unverified-email.astro +9 -9
  548. package/src/routes/dashboard/user-management/edit.astro +53 -39
  549. package/src/routes/dashboard/user-management/index.astro +6 -4
  550. package/src/routes/error-pages/404.astro +6 -4
  551. package/src/routes/firstTimeSetupRoutes/1-start.astro +18 -110
  552. package/src/routes/firstTimeSetupRoutes/2-next.astro +60 -44
  553. package/src/routes/firstTimeSetupRoutes/3-done.astro +9 -11
  554. package/src/routes/firstTimeSetupRoutes/api/step-1.ts +116 -98
  555. package/src/routes/firstTimeSetupRoutes/api/step-2.ts +114 -100
  556. package/src/routes/firstTimeSetupRoutes/index.astro +6 -0
  557. package/src/runtime/index.ts +2 -3
  558. package/src/schemas/config/index.ts +1 -1
  559. package/src/schemas/plugins/index.ts +1 -1
  560. package/src/schemas/plugins/shared.ts +149 -23
  561. package/src/styles/404.css +1 -1
  562. package/src/styles/{authlayout.css → auth-layout.css} +1 -1
  563. package/src/styles/code-component.css +64 -0
  564. package/src/styles/dashboard-base.css +31 -67
  565. package/src/styles/dashboard-diff.css +32 -32
  566. package/src/theme.d.ts +1 -0
  567. package/src/types.ts +4 -21
  568. package/src/{lib → utils}/effects/index.ts +0 -1
  569. package/src/{lib → utils}/effects/logger.ts +6 -10
  570. package/src/utils/effects/smtp.ts +155 -0
  571. package/src/utils/safeString.ts +1 -6
  572. package/src/utils/stripIconify.ts +20 -0
  573. package/src/utils/tinyMDParser.ts +13 -7
  574. package/src/virtual.d.ts +194 -236
  575. package/src/virtuals/auth/core.ts +82 -0
  576. package/src/{lib → virtuals}/auth/index.ts +1 -4
  577. package/src/virtuals/auth/scripts/three.ts +647 -0
  578. package/src/virtuals/auth/scripts/utils/fitModelToViewport.ts +50 -0
  579. package/src/{utils/validImages.ts → virtuals/auth/validImages/index.ts} +10 -10
  580. package/src/virtuals/auth/validImages/studiocms-blobs-dark.webp +0 -0
  581. package/src/virtuals/auth/validImages/studiocms-blobs-light.webp +0 -0
  582. package/src/virtuals/auth/validImages/studiocms-blocks-dark.webp +0 -0
  583. package/src/virtuals/auth/validImages/studiocms-blocks-light.webp +0 -0
  584. package/src/virtuals/auth/validImages/studiocms-curves-dark.webp +0 -0
  585. package/src/virtuals/auth/validImages/studiocms-curves-light.webp +0 -0
  586. package/src/{lib → virtuals}/auth/verify-email.ts +20 -21
  587. package/src/virtuals/components/Generator.astro +5 -0
  588. package/{dist → src/virtuals}/components/Renderer.astro +1 -1
  589. package/{dist/lib → src/virtuals}/i18n/LanguageSelector.astro +1 -1
  590. package/src/virtuals/i18n/client.ts +232 -0
  591. package/src/virtuals/i18n/config.ts +170 -0
  592. package/src/{lib/i18n/index.ts → virtuals/i18n/server.ts} +42 -46
  593. package/src/{lib → virtuals}/i18n/translations/de.json +1 -1
  594. package/src/virtuals/i18n/v-files.ts +122 -0
  595. package/src/virtuals/lib/head.ts +1 -0
  596. package/src/{lib → virtuals/lib}/headDefaults.ts +1 -1
  597. package/src/{lib → virtuals/lib}/makeAPIRoute.ts +1 -1
  598. package/src/virtuals/lib/pathGenerators.ts +1 -0
  599. package/src/{lib → virtuals/lib}/routeMap.ts +5 -0
  600. package/src/virtuals/lib/urlGen.ts +15 -0
  601. package/src/{lib → virtuals}/mailer/index.ts +10 -44
  602. package/src/{lib → virtuals}/notifier/index.ts +1 -3
  603. package/src/{components → virtuals/scripts}/user-quick-tools.ts +151 -59
  604. package/src/{sdk → virtuals/sdk}/effect/collectors.ts +2 -3
  605. package/src/{sdk → virtuals/sdk}/effect/db.ts +1 -1
  606. package/src/{sdk → virtuals/sdk}/effect/foldertree.ts +1 -1
  607. package/src/{sdk → virtuals/sdk}/effect/generators.ts +1 -1
  608. package/src/{sdk → virtuals/sdk}/effect/getVersionFromNPM.ts +5 -11
  609. package/src/{sdk → virtuals/sdk}/effect/parsers.ts +2 -2
  610. package/src/{sdk → virtuals/sdk}/effect/pluginUtils.ts +1 -1
  611. package/src/{sdk → virtuals/sdk}/effect/users.ts +2 -2
  612. package/src/{sdk → virtuals/sdk}/errors.ts +1 -1
  613. package/src/{sdk → virtuals/sdk}/index.ts +5 -6
  614. package/src/{sdk → virtuals/sdk}/modules/auth.ts +4 -3
  615. package/src/{sdk → virtuals/sdk}/modules/clear.ts +1 -1
  616. package/src/virtuals/sdk/modules/config.ts +602 -0
  617. package/src/{sdk → virtuals/sdk}/modules/delete.ts +2 -2
  618. package/src/{sdk → virtuals/sdk}/modules/diffTracking.ts +1 -1
  619. package/src/{sdk → virtuals/sdk}/modules/get.ts +34 -50
  620. package/src/{sdk → virtuals/sdk}/modules/init.ts +19 -27
  621. package/src/{sdk → virtuals/sdk}/modules/middlewares.ts +24 -13
  622. package/src/{sdk → virtuals/sdk}/modules/notificationSettings.ts +9 -45
  623. package/src/{sdk → virtuals/sdk}/modules/plugins.ts +1 -1
  624. package/src/{sdk → virtuals/sdk}/modules/post.ts +18 -19
  625. package/src/{sdk → virtuals/sdk}/modules/resetTokenBucket.ts +1 -1
  626. package/src/{sdk → virtuals/sdk}/modules/rest_api.ts +1 -1
  627. package/src/{sdk → virtuals/sdk}/modules/update.ts +32 -30
  628. package/src/{sdk → virtuals/sdk}/sdkCore.ts +6 -1
  629. package/src/virtuals/sdk/tables.ts +2 -0
  630. package/src/{sdk → virtuals/sdk}/types/index.ts +6 -10
  631. package/src/{sdk → virtuals/sdk}/types/tableDefs.ts +4 -4
  632. package/src/{sdk → virtuals/sdk}/types/tsAlias.ts +4 -0
  633. package/src/{sdk → virtuals/sdk}/utils.ts +3 -3
  634. package/src/virtuals/stubs/config.stub.js +9 -0
  635. package/src/virtuals/stubs/logger.stub.js +30 -0
  636. package/src/virtuals/utils.ts +134 -0
  637. package/ui.d.ts +1301 -274
  638. package/dist/componentRegistry/PropsParser.d.ts +0 -15
  639. package/dist/componentRegistry/PropsParser.js +0 -214
  640. package/dist/componentRegistry/Registry.d.ts +0 -46
  641. package/dist/componentRegistry/Registry.js +0 -79
  642. package/dist/componentRegistry/convert-hyphens.d.ts +0 -14
  643. package/dist/componentRegistry/convert-hyphens.js +0 -10
  644. package/dist/componentRegistry/errors.d.ts +0 -67
  645. package/dist/componentRegistry/errors.js +0 -12
  646. package/dist/componentRegistry/handler.d.ts +0 -34
  647. package/dist/componentRegistry/handler.js +0 -110
  648. package/dist/componentRegistry/index.d.ts +0 -6
  649. package/dist/componentRegistry/index.js +0 -6
  650. package/dist/componentRegistry/runtime.d.ts +0 -46
  651. package/dist/componentRegistry/runtime.js +0 -61
  652. package/dist/componentRegistry/types.d.ts +0 -59
  653. package/dist/components/Generator.astro +0 -5
  654. package/dist/components/dashboard/AstroCodeDiffsScript.astro +0 -25
  655. package/dist/components/dashboard/Code.astro +0 -23
  656. package/dist/components/dashboard/component-scripts/makeClientRoutable.d.ts +0 -1
  657. package/dist/components/dashboard/component-scripts/makeClientRoutable.js +0 -9
  658. package/dist/components/dashboard/configuration/LightVsDark.astro +0 -67
  659. package/dist/components/user-quick-tools.d.ts +0 -90
  660. package/dist/db/tables.js +0 -217
  661. package/dist/layouts/auth/AuthLayout.astro +0 -71
  662. package/dist/lib/auth/encryption.d.ts +0 -46
  663. package/dist/lib/auth/encryption.js +0 -83
  664. package/dist/lib/auth/index.js +0 -12
  665. package/dist/lib/auth/password.d.ts +0 -45
  666. package/dist/lib/auth/password.js +0 -113
  667. package/dist/lib/auth/session.d.ts +0 -77
  668. package/dist/lib/auth/session.js +0 -147
  669. package/dist/lib/auth/user.d.ts +0 -155
  670. package/dist/lib/auth/user.js +0 -251
  671. package/dist/lib/auth/utils/lists/passwords.d.ts +0 -2
  672. package/dist/lib/auth/utils/lists/passwords.js +0 -10006
  673. package/dist/lib/auth/utils/lists/usernames.d.ts +0 -2
  674. package/dist/lib/auth/utils/lists/usernames.js +0 -547
  675. package/dist/lib/auth/utils/scrypt.d.ts +0 -104
  676. package/dist/lib/auth/utils/scrypt.js +0 -55
  677. package/dist/lib/auth/utils/unsafeCheck.d.ts +0 -34
  678. package/dist/lib/auth/utils/unsafeCheck.js +0 -38
  679. package/dist/lib/dashboardGrid.d.ts +0 -119
  680. package/dist/lib/dashboardGrid.js +0 -0
  681. package/dist/lib/effects/convertToVanilla.d.ts +0 -10
  682. package/dist/lib/effects/convertToVanilla.js +0 -5
  683. package/dist/lib/effects/smtp.config.d.ts +0 -212
  684. package/dist/lib/effects/smtp.config.js +0 -123
  685. package/dist/lib/effects/smtp.d.ts +0 -269
  686. package/dist/lib/effects/smtp.js +0 -186
  687. package/dist/lib/endpointResponses.d.ts +0 -2
  688. package/dist/lib/endpointResponses.js +0 -21
  689. package/dist/lib/head.d.ts +0 -25
  690. package/dist/lib/head.js +0 -73
  691. package/dist/lib/i18n/config.d.ts +0 -16
  692. package/dist/lib/i18n/config.js +0 -8
  693. package/dist/lib/i18n/index.d.ts +0 -2471
  694. package/dist/lib/index.d.ts +0 -7
  695. package/dist/lib/index.js +0 -7
  696. package/dist/lib/jsonUtils.d.ts +0 -2
  697. package/dist/lib/jsonUtils.js +0 -14
  698. package/dist/lib/mailer/index.d.ts +0 -267
  699. package/dist/lib/pathGenerators.d.ts +0 -20
  700. package/dist/lib/pathGenerators.js +0 -66
  701. package/dist/lib/plugins/dashboard-pages.d.ts +0 -71
  702. package/dist/lib/removeLeadingTrailingSlashes.d.ts +0 -7
  703. package/dist/lib/removeLeadingTrailingSlashes.js +0 -13
  704. package/dist/lib/renderer/errors.d.ts +0 -5
  705. package/dist/lib/renderer/errors.js +0 -25
  706. package/dist/lib/urlGen.js +0 -26
  707. package/dist/lib/webVitals/types.js +0 -0
  708. package/dist/routes/firstTimeSetupRoutes/components/TabItem.astro +0 -44
  709. package/dist/routes/firstTimeSetupRoutes/components/Tabs.astro +0 -170
  710. package/dist/runtime/AstroComponentProxy.d.ts +0 -31
  711. package/dist/runtime/AstroComponentProxy.js +0 -47
  712. package/dist/runtime/decoder/decode-codepoint.d.ts +0 -18
  713. package/dist/runtime/decoder/decode-codepoint.js +0 -58
  714. package/dist/runtime/decoder/decode-data-html.d.ts +0 -1
  715. package/dist/runtime/decoder/decode-data-html.js +0 -7
  716. package/dist/runtime/decoder/decode-data-xml.d.ts +0 -1
  717. package/dist/runtime/decoder/decode-data-xml.js +0 -7
  718. package/dist/runtime/decoder/index.d.ts +0 -34
  719. package/dist/runtime/decoder/index.js +0 -18
  720. package/dist/runtime/decoder/util.d.ts +0 -208
  721. package/dist/runtime/decoder/util.js +0 -415
  722. package/dist/scriptHandler.d.ts +0 -30
  723. package/dist/scriptHandler.js +0 -25
  724. package/dist/scripts/three.d.ts +0 -1
  725. package/dist/scripts/three.js +0 -278
  726. package/dist/scripts/utils/fitModelToViewport.d.ts +0 -8
  727. package/dist/scripts/utils/fitModelToViewport.js +0 -19
  728. package/dist/sdk/effect/convertToVanilla.d.ts +0 -1
  729. package/dist/sdk/effect/convertToVanilla.js +0 -4
  730. package/dist/sdk/effect/getVersionFromNPM.js +0 -30
  731. package/dist/sdk/tables.d.ts +0 -1405
  732. package/dist/sdk/tables.js +0 -70
  733. package/dist/utils/addIntegrationArray.d.ts +0 -24
  734. package/dist/utils/addIntegrationArray.js +0 -11
  735. package/dist/utils/addIntegrationArrayWithCheck.d.ts +0 -11
  736. package/dist/utils/addIntegrationArrayWithCheck.js +0 -24
  737. package/dist/utils/astroEnvConfig.d.ts +0 -45
  738. package/dist/utils/astroEnvConfig.js +0 -9
  739. package/dist/utils/authEnvCheck.d.ts +0 -38
  740. package/dist/utils/authEnvCheck.js +0 -82
  741. package/dist/utils/changelog.d.ts +0 -1
  742. package/dist/utils/changelog.js +0 -53
  743. package/dist/utils/changelogLoader.d.ts +0 -15
  744. package/dist/utils/changelogLoader.js +0 -104
  745. package/dist/utils/dynamicResult.d.ts +0 -17
  746. package/dist/utils/dynamicResult.js +0 -0
  747. package/dist/utils/getLatestVersion.d.ts +0 -12
  748. package/dist/utils/getLatestVersion.js +0 -36
  749. package/dist/utils/integrationLogger.d.ts +0 -7
  750. package/dist/utils/integrationLogger.js +0 -18
  751. package/dist/utils/integrations.d.ts +0 -4
  752. package/dist/utils/integrations.js +0 -32
  753. package/dist/utils/isDashboardRoute.d.ts +0 -7
  754. package/dist/utils/isDashboardRoute.js +0 -10
  755. package/dist/utils/jsonParse.d.ts +0 -9
  756. package/dist/utils/jsonParse.js +0 -6
  757. package/dist/utils/loginBackgrounds/studiocms-blobs-dark.png +0 -0
  758. package/dist/utils/loginBackgrounds/studiocms-blobs-light.png +0 -0
  759. package/dist/utils/loginBackgrounds/studiocms-blocks-dark.png +0 -0
  760. package/dist/utils/loginBackgrounds/studiocms-blocks-light.png +0 -0
  761. package/dist/utils/loginBackgrounds/studiocms-curves-dark.png +0 -0
  762. package/dist/utils/loginBackgrounds/studiocms-curves-light.png +0 -0
  763. package/dist/utils/makePageTitle.d.ts +0 -3
  764. package/dist/utils/makePageTitle.js +0 -7
  765. package/dist/utils/pageListPackageLabel.d.ts +0 -4
  766. package/dist/utils/pageListPackageLabel.js +0 -12
  767. package/dist/utils/pageTypeFilter.d.ts +0 -2
  768. package/dist/utils/pageTypeFilter.js +0 -16
  769. package/dist/utils/pluginLogger.d.ts +0 -2
  770. package/dist/utils/pluginLogger.js +0 -7
  771. package/dist/utils/readJson.d.ts +0 -1
  772. package/dist/utils/readJson.js +0 -7
  773. package/dist/utils/tryCatch.d.ts +0 -10
  774. package/dist/utils/tryCatch.js +0 -15
  775. package/dist/utils/validImages.js +0 -39
  776. package/src/componentRegistry/PropsParser.ts +0 -270
  777. package/src/componentRegistry/Registry.ts +0 -119
  778. package/src/componentRegistry/convert-hyphens.ts +0 -21
  779. package/src/componentRegistry/errors.ts +0 -58
  780. package/src/componentRegistry/handler.ts +0 -185
  781. package/src/componentRegistry/index.ts +0 -6
  782. package/src/componentRegistry/runtime.ts +0 -105
  783. package/src/componentRegistry/types.ts +0 -63
  784. package/src/components/Generator.astro +0 -5
  785. package/src/components/dashboard/AstroCodeDiffsScript.astro +0 -25
  786. package/src/components/dashboard/Code.astro +0 -23
  787. package/src/components/dashboard/ThemeManager.astro +0 -53
  788. package/src/components/dashboard/component-scripts/makeClientRoutable.ts +0 -7
  789. package/src/components/dashboard/configuration/LightVsDark.astro +0 -67
  790. package/src/db/tables.ts +0 -226
  791. package/src/layouts/auth/AuthLayout.astro +0 -71
  792. package/src/layouts/auth/ThemeManager.astro +0 -53
  793. package/src/lib/auth/encryption.ts +0 -149
  794. package/src/lib/auth/password.ts +0 -212
  795. package/src/lib/auth/session.ts +0 -291
  796. package/src/lib/auth/user.ts +0 -501
  797. package/src/lib/auth/utils/lists/passwords.ts +0 -10004
  798. package/src/lib/auth/utils/lists/usernames.ts +0 -546
  799. package/src/lib/auth/utils/scrypt.ts +0 -142
  800. package/src/lib/auth/utils/unsafeCheck.ts +0 -71
  801. package/src/lib/dashboardGrid.ts +0 -139
  802. package/src/lib/effects/convertToVanilla.ts +0 -12
  803. package/src/lib/effects/smtp.config.ts +0 -123
  804. package/src/lib/effects/smtp.ts +0 -338
  805. package/src/lib/endpointResponses.ts +0 -20
  806. package/src/lib/head.ts +0 -114
  807. package/src/lib/i18n/client.ts +0 -128
  808. package/src/lib/i18n/config.ts +0 -19
  809. package/src/lib/index.ts +0 -7
  810. package/src/lib/jsonUtils.ts +0 -11
  811. package/src/lib/pathGenerators.ts +0 -72
  812. package/src/lib/removeLeadingTrailingSlashes.ts +0 -21
  813. package/src/lib/renderer/errors.ts +0 -29
  814. package/src/lib/urlGen.ts +0 -40
  815. package/src/routes/firstTimeSetupRoutes/components/TabItem.astro +0 -44
  816. package/src/routes/firstTimeSetupRoutes/components/Tabs.astro +0 -170
  817. package/src/runtime/AstroComponentProxy.ts +0 -93
  818. package/src/runtime/decoder/decode-codepoint.ts +0 -76
  819. package/src/runtime/decoder/decode-data-html.ts +0 -6
  820. package/src/runtime/decoder/decode-data-xml.ts +0 -6
  821. package/src/runtime/decoder/index.ts +0 -49
  822. package/src/runtime/decoder/util.ts +0 -587
  823. package/src/scriptHandler.ts +0 -86
  824. package/src/scripts/three.ts +0 -415
  825. package/src/scripts/utils/fitModelToViewport.ts +0 -36
  826. package/src/sdk/effect/convertToVanilla.ts +0 -1
  827. package/src/sdk/tables.ts +0 -129
  828. package/src/styles/dashboard-code.css +0 -56
  829. package/src/utils/addIntegrationArray.ts +0 -35
  830. package/src/utils/addIntegrationArrayWithCheck.ts +0 -41
  831. package/src/utils/astroEnvConfig.ts +0 -12
  832. package/src/utils/authEnvCheck.ts +0 -144
  833. package/src/utils/changelog.ts +0 -67
  834. package/src/utils/changelogLoader.ts +0 -138
  835. package/src/utils/dynamicResult.ts +0 -19
  836. package/src/utils/getLatestVersion.ts +0 -67
  837. package/src/utils/integrationLogger.ts +0 -24
  838. package/src/utils/integrations.ts +0 -32
  839. package/src/utils/isDashboardRoute.ts +0 -19
  840. package/src/utils/jsonParse.ts +0 -11
  841. package/src/utils/loginBackgrounds/studiocms-blobs-dark.png +0 -0
  842. package/src/utils/loginBackgrounds/studiocms-blobs-light.png +0 -0
  843. package/src/utils/loginBackgrounds/studiocms-blocks-dark.png +0 -0
  844. package/src/utils/loginBackgrounds/studiocms-blocks-light.png +0 -0
  845. package/src/utils/loginBackgrounds/studiocms-curves-dark.png +0 -0
  846. package/src/utils/loginBackgrounds/studiocms-curves-light.png +0 -0
  847. package/src/utils/makePageTitle.ts +0 -11
  848. package/src/utils/pageListPackageLabel.ts +0 -19
  849. package/src/utils/pageTypeFilter.ts +0 -13
  850. package/src/utils/pluginLogger.ts +0 -6
  851. package/src/utils/readJson.ts +0 -5
  852. package/src/utils/tryCatch.ts +0 -29
  853. /package/dist/{layouts → components}/auth/ThreeCanvasLoader.astro +0 -0
  854. /package/dist/components/{dashboard → shared}/ThemeManager.astro +0 -0
  855. /package/dist/{styles → fonts}/OnestFont.woff2 +0 -0
  856. /package/dist/{styles → fonts}/SyntaxFont.woff2 +0 -0
  857. /package/dist/{styles → fonts}/onest-font.css +0 -0
  858. /package/dist/{utils → handlers}/astroConfigCheck.d.ts +0 -0
  859. /package/dist/{lib → integrations}/dynamic-sitemap/index.d.ts +0 -0
  860. /package/dist/{lib → integrations}/dynamic-sitemap/sitemap-index.xml.d.ts +0 -0
  861. /package/dist/{lib → integrations}/dynamic-sitemap/sitemap-index.xml.js +0 -0
  862. /package/dist/{lib → integrations}/robots/core.d.ts +0 -0
  863. /package/dist/{lib → integrations}/robots/core.js +0 -0
  864. /package/dist/{lib → integrations}/robots/index.d.ts +0 -0
  865. /package/dist/{lib → integrations}/robots/index.js +0 -0
  866. /package/dist/{lib → integrations}/robots/schema.d.ts +0 -0
  867. /package/dist/{lib → integrations}/robots/schema.js +0 -0
  868. /package/dist/{lib → integrations}/webVitals/checkForWebVitalsPlugin.d.ts +0 -0
  869. /package/dist/{lib → integrations}/webVitals/consts.d.ts +0 -0
  870. /package/dist/{lib → integrations}/webVitals/consts.js +0 -0
  871. /package/dist/{lib → integrations}/webVitals/pages/analytics/header.astro +0 -0
  872. /package/dist/{lib → integrations}/webVitals/schemas.d.ts +0 -0
  873. /package/dist/{lib → integrations}/webVitals/schemas.js +0 -0
  874. /package/dist/{lib → integrations}/webVitals/types.d.ts +0 -0
  875. /package/dist/{componentRegistry → integrations/webVitals}/types.js +0 -0
  876. /package/dist/{lib → integrations}/webVitals/utils/buildDataObject.d.ts +0 -0
  877. /package/dist/{lib → integrations}/webVitals/utils/buildDataObject.js +0 -0
  878. /package/dist/{lib → integrations}/webVitals/utils/buildPageRouteDataObject.d.ts +0 -0
  879. /package/dist/{lib → integrations}/webVitals/utils/buildPageRouteDataObject.js +0 -0
  880. /package/dist/{lib → integrations}/webVitals/utils/buildPerPageDataObject.d.ts +0 -0
  881. /package/dist/{lib → integrations}/webVitals/utils/buildPerPageDataObject.js +0 -0
  882. /package/dist/{lib → integrations}/webVitals/utils/checkDate.d.ts +0 -0
  883. /package/dist/{lib → integrations}/webVitals/utils/checkDate.js +0 -0
  884. /package/dist/{lib → integrations}/webVitals/utils/webVitalsUtils.js +0 -0
  885. /package/dist/{lib → integrations}/webVitals/webVital.d.ts +0 -0
  886. /package/dist/{lib → integrations}/webVitals/webVital.js +0 -0
  887. /package/dist/{lib → integrations}/webVitals/webVitalsRouteSummary.d.ts +0 -0
  888. /package/dist/{lib → integrations}/webVitals/webVitalsRouteSummary.js +0 -0
  889. /package/dist/{lib → integrations}/webVitals/webVitalsSummary.d.ts +0 -0
  890. /package/dist/{lib → integrations}/webVitals/webVitalsSummary.js +0 -0
  891. /package/dist/{utils → virtuals/auth}/getLabelForPermissionLevel.d.ts +0 -0
  892. /package/dist/{utils → virtuals/auth}/getLabelForPermissionLevel.js +0 -0
  893. /package/dist/{lib → virtuals}/auth/types.d.ts +0 -0
  894. /package/dist/{lib → virtuals}/auth/types.js +0 -0
  895. /package/dist/{components/image → virtuals/components}/CustomImage.astro +0 -0
  896. /package/dist/{components → virtuals/components}/FormattedDate.astro +0 -0
  897. /package/dist/{lib → virtuals}/i18n/translations/en.json +0 -0
  898. /package/dist/{lib → virtuals}/i18n/translations/es.json +0 -0
  899. /package/dist/{lib → virtuals}/i18n/translations/fr.json +0 -0
  900. /package/dist/{lib → virtuals}/i18n/translations/hi.json +0 -0
  901. /package/dist/{lib → virtuals}/i18n/translations/zh.json +0 -0
  902. /package/dist/{lib → virtuals/lib}/makeAPIRoute.js +0 -0
  903. /package/dist/{lib → virtuals/lib}/makePublicRoute.d.ts +0 -0
  904. /package/dist/{lib → virtuals/lib}/makePublicRoute.js +0 -0
  905. /package/dist/{lib → virtuals}/mailer/template.d.ts +0 -0
  906. /package/dist/{lib → virtuals}/mailer/template.js +0 -0
  907. /package/dist/{lib → virtuals}/mailer/templates/index.d.ts +0 -0
  908. /package/dist/{lib → virtuals}/mailer/templates/index.js +0 -0
  909. /package/dist/{lib → virtuals}/mailer/templates/notification.d.ts +0 -0
  910. /package/dist/{lib → virtuals}/mailer/templates/notification.js +0 -0
  911. /package/dist/{lib → virtuals}/mailer/templates/password-reset.d.ts +0 -0
  912. /package/dist/{lib → virtuals}/mailer/templates/password-reset.js +0 -0
  913. /package/dist/{lib → virtuals}/mailer/templates/user-invite.d.ts +0 -0
  914. /package/dist/{lib → virtuals}/mailer/templates/user-invite.js +0 -0
  915. /package/dist/{lib → virtuals}/mailer/templates/verify-email.d.ts +0 -0
  916. /package/dist/{lib → virtuals}/mailer/templates/verify-email.js +0 -0
  917. /package/dist/{lib → virtuals}/notifier/client.d.ts +0 -0
  918. /package/dist/{lib → virtuals}/notifier/client.js +0 -0
  919. /package/dist/{lib → virtuals}/plugins/dashboard-pages.js +0 -0
  920. /package/dist/{lib → virtuals}/plugins/frontend-navigation.d.ts +0 -0
  921. /package/dist/{lib → virtuals}/plugins/frontend-navigation.js +0 -0
  922. /package/dist/{lib → virtuals}/plugins/index.d.ts +0 -0
  923. /package/dist/{lib → virtuals}/plugins/index.js +0 -0
  924. /package/dist/{sdk → virtuals/sdk}/consts.d.ts +0 -0
  925. /package/dist/{sdk → virtuals/sdk}/consts.js +0 -0
  926. /package/dist/{sdk → virtuals/sdk}/effect/index.d.ts +0 -0
  927. /package/dist/{sdk → virtuals/sdk}/effect/index.js +0 -0
  928. /package/dist/{sdk → virtuals/sdk}/effect/lib/jwt-generator.d.ts +0 -0
  929. /package/dist/{sdk → virtuals/sdk}/effect/lib/jwt-generator.js +0 -0
  930. /package/dist/{sdk → virtuals/sdk}/types/index.js +0 -0
  931. /package/dist/{sdk → virtuals/sdk}/types/tableDefs.js +0 -0
  932. /package/dist/{sdk → virtuals/sdk}/types/tsAlias.js +0 -0
  933. /package/src/{layouts → components}/auth/ThreeCanvasLoader.astro +0 -0
  934. /package/src/{routes/firstTimeSetupRoutes → components/first-time-setup}/snippets/opt1-astro.config.diff +0 -0
  935. /package/src/{routes/firstTimeSetupRoutes → components/first-time-setup}/snippets/opt2-astro.config.diff +0 -0
  936. /package/src/{routes/firstTimeSetupRoutes → components/first-time-setup}/snippets/opt2-studiocms.config.diff +0 -0
  937. /package/{dist/layouts/auth → src/components/shared}/ThemeManager.astro +0 -0
  938. /package/src/{styles → fonts}/OnestFont.woff2 +0 -0
  939. /package/src/{styles → fonts}/SyntaxFont.woff2 +0 -0
  940. /package/src/{styles → fonts}/onest-font.css +0 -0
  941. /package/src/{lib → integrations}/dynamic-sitemap/sitemap-index.xml.ts +0 -0
  942. /package/src/{lib → integrations}/robots/core.ts +0 -0
  943. /package/src/{lib → integrations}/robots/index.ts +0 -0
  944. /package/src/{lib → integrations}/robots/schema.ts +0 -0
  945. /package/src/{lib → integrations}/webVitals/consts.ts +0 -0
  946. /package/src/{lib → integrations}/webVitals/pages/analytics/header.astro +0 -0
  947. /package/src/{lib → integrations}/webVitals/schemas.ts +0 -0
  948. /package/src/{lib → integrations}/webVitals/types.ts +0 -0
  949. /package/src/{lib → integrations}/webVitals/utils/buildDataObject.ts +0 -0
  950. /package/src/{lib → integrations}/webVitals/utils/buildPageRouteDataObject.ts +0 -0
  951. /package/src/{lib → integrations}/webVitals/utils/buildPerPageDataObject.ts +0 -0
  952. /package/src/{lib → integrations}/webVitals/utils/checkDate.ts +0 -0
  953. /package/src/{lib → integrations}/webVitals/utils/webVitalsUtils.ts +0 -0
  954. /package/src/{lib → integrations}/webVitals/webVital.ts +0 -0
  955. /package/src/{lib → integrations}/webVitals/webVitalsRouteSummary.ts +0 -0
  956. /package/src/{lib → integrations}/webVitals/webVitalsSummary.ts +0 -0
  957. /package/src/{utils → virtuals/auth}/getLabelForPermissionLevel.ts +0 -0
  958. /package/src/{lib → virtuals}/auth/types.ts +0 -0
  959. /package/src/{components/image → virtuals/components}/CustomImage.astro +0 -0
  960. /package/src/{components → virtuals/components}/FormattedDate.astro +0 -0
  961. /package/src/{lib → virtuals}/i18n/translations/en.json +0 -0
  962. /package/src/{lib → virtuals}/i18n/translations/es.json +0 -0
  963. /package/src/{lib → virtuals}/i18n/translations/fr.json +0 -0
  964. /package/src/{lib → virtuals}/i18n/translations/hi.json +0 -0
  965. /package/src/{lib → virtuals}/i18n/translations/zh.json +0 -0
  966. /package/src/{lib → virtuals/lib}/makePublicRoute.ts +0 -0
  967. /package/src/{lib → virtuals}/mailer/template.ts +0 -0
  968. /package/src/{lib → virtuals}/mailer/templates/index.ts +0 -0
  969. /package/src/{lib → virtuals}/mailer/templates/notification.ts +0 -0
  970. /package/src/{lib → virtuals}/mailer/templates/password-reset.ts +0 -0
  971. /package/src/{lib → virtuals}/mailer/templates/user-invite.ts +0 -0
  972. /package/src/{lib → virtuals}/mailer/templates/verify-email.ts +0 -0
  973. /package/src/{lib → virtuals}/notifier/client.ts +0 -0
  974. /package/src/{lib → virtuals}/plugins/dashboard-pages.ts +0 -0
  975. /package/src/{lib → virtuals}/plugins/frontend-navigation.ts +0 -0
  976. /package/src/{lib → virtuals}/plugins/index.ts +0 -0
  977. /package/src/{sdk → virtuals/sdk}/consts.ts +0 -0
  978. /package/src/{sdk → virtuals/sdk}/effect/index.ts +0 -0
  979. /package/src/{sdk → virtuals/sdk}/effect/lib/jwt-generator.ts +0 -0
@@ -1,12 +1,12 @@
1
- import { Effect } from '../../effect.js';
1
+ import { Effect } from '../../../effect.js';
2
2
  import { AstroDB, GetVersionFromNPM, SDKCore_FolderTree } from '../effect/index.js';
3
- import { SDKCoreError } from '../errors.js';
4
- import type { SiteConfig, tsPageContentSelect, tsPageDataSelect, tsPageFolderSelect } from '../types/index.js';
3
+ import type { tsPageContentSelect, tsPageDataSelect, tsPageFolderSelect } from '../types/index.js';
5
4
  import { CacheContext } from '../utils.js';
6
5
  import { SDKCore_CLEAR } from './clear.js';
6
+ import { SDKCore_CONFIG, type StudioCMSSiteConfig } from './config.js';
7
7
  import { SDKCore_GET } from './get.js';
8
8
  declare const SDKCore_UPDATE_base: Effect.Service.Class<SDKCore_UPDATE, "studiocms/sdk/SDKCore/modules/update", {
9
- readonly dependencies: readonly [import("effect/Layer").Layer<AstroDB, never, never>, import("effect/Layer").Layer<SDKCore_CLEAR, never, CacheContext>, import("effect/Layer").Layer<SDKCore_FolderTree, never, never>, import("effect/Layer").Layer<SDKCore_GET, never, CacheContext>, import("effect/Layer").Layer<GetVersionFromNPM, never, never>];
9
+ readonly dependencies: readonly [import("effect/Layer").Layer<AstroDB, never, never>, import("effect/Layer").Layer<SDKCore_CLEAR, never, CacheContext>, import("effect/Layer").Layer<SDKCore_FolderTree, never, never>, import("effect/Layer").Layer<SDKCore_GET, never, CacheContext>, import("effect/Layer").Layer<GetVersionFromNPM, never, never>, import("effect/Layer").Layer<SDKCore_CONFIG, never, never>];
10
10
  readonly effect: Effect.Effect<{
11
11
  /**
12
12
  * Updates a page content in the database.
@@ -16,16 +16,16 @@ declare const SDKCore_UPDATE_base: Effect.Service.Class<SDKCore_UPDATE, "studioc
16
16
  * @throws {StudioCMS_SDK_Error} If an error occurs while updating the page content.
17
17
  */
18
18
  pageContent: (input: {
19
- content: string | null;
20
19
  id: string;
21
20
  contentLang: string;
22
21
  contentId: string;
23
- }) => Effect.Effect<{
24
22
  content: string | null;
23
+ }) => Effect.Effect<{
25
24
  id: string;
26
25
  contentLang: string;
27
26
  contentId: string;
28
- }, SDKCoreError, never>;
27
+ content: string | null;
28
+ }, import("../errors.js").SDKCoreError, never>;
29
29
  /**
30
30
  * Updates a tag in the database.
31
31
  *
@@ -37,15 +37,15 @@ declare const SDKCore_UPDATE_base: Effect.Service.Class<SDKCore_UPDATE, "studioc
37
37
  name: string;
38
38
  description: string;
39
39
  slug: string;
40
- meta: unknown;
41
40
  id: number;
41
+ meta: unknown;
42
42
  }) => Effect.Effect<{
43
43
  name: string;
44
44
  description: string;
45
45
  slug: string;
46
- meta: unknown;
47
46
  id: number;
48
- }, SDKCoreError, never>;
47
+ meta: unknown;
48
+ }, import("../errors.js").SDKCoreError, never>;
49
49
  /**
50
50
  * Updates a category in the database.
51
51
  *
@@ -57,17 +57,17 @@ declare const SDKCore_UPDATE_base: Effect.Service.Class<SDKCore_UPDATE, "studioc
57
57
  name: string;
58
58
  description: string;
59
59
  slug: string;
60
- meta: unknown;
61
60
  id: number;
62
61
  parent: number | null;
62
+ meta: unknown;
63
63
  }) => Effect.Effect<{
64
64
  name: string;
65
65
  description: string;
66
66
  slug: string;
67
- meta: unknown;
68
67
  id: number;
69
68
  parent: number | null;
70
- }, SDKCoreError, never>;
69
+ meta: unknown;
70
+ }, import("../errors.js").SDKCoreError, never>;
71
71
  /**
72
72
  * Updates a permission in the database.
73
73
  *
@@ -77,23 +77,23 @@ declare const SDKCore_UPDATE_base: Effect.Service.Class<SDKCore_UPDATE, "studioc
77
77
  */
78
78
  permissions: (input: {
79
79
  user: string;
80
- rank: string;
80
+ rank: "unknown" | "owner" | "admin" | "editor" | "visitor";
81
81
  }) => Effect.Effect<{
82
82
  user: string;
83
- rank: string;
84
- }, SDKCoreError, never>;
83
+ rank: "unknown" | "owner" | "admin" | "editor" | "visitor";
84
+ }, import("../errors.js").SDKCoreError, never>;
85
85
  /**
86
86
  * Updates the folder tree structure and cache.
87
87
  * @returns An Effect that resolves when the folder tree is updated.
88
88
  * @throws {LibSQLDatabaseError} If a database error occurs during the update.
89
89
  */
90
- folderTree: Effect.Effect<void, import("effect/Cause").UnknownException | SDKCoreError, never>;
90
+ folderTree: Effect.Effect<void, import("effect/Cause").UnknownException | import("../errors.js").SDKCoreError, never>;
91
91
  /**
92
92
  * Updates the folder list and cache.
93
93
  * @returns An Effect that resolves when the folder list is updated.
94
94
  * @throws {LibSQLDatabaseError} If a database error occurs during the update.
95
95
  */
96
- folderList: Effect.Effect<void, import("effect/Cause").UnknownException | SDKCoreError, never>;
96
+ folderList: Effect.Effect<void, import("effect/Cause").UnknownException | import("../errors.js").SDKCoreError, never>;
97
97
  /**
98
98
  * Updates a folder in the database and refreshes related caches.
99
99
  * @param data - The folder data to update.
@@ -104,13 +104,13 @@ declare const SDKCore_UPDATE_base: Effect.Service.Class<SDKCore_UPDATE, "studioc
104
104
  name: string;
105
105
  id: string;
106
106
  parent: string | null;
107
- }, import("effect/Cause").UnknownException | SDKCoreError, never>;
107
+ }, import("effect/Cause").UnknownException | import("../errors.js").SDKCoreError, never>;
108
108
  /**
109
109
  * Updates the latest StudioCMS version in the cache.
110
110
  * @returns An Effect that resolves to the latest version.
111
111
  * @throws {UnknownException} If an error occurs while fetching the latest version.
112
112
  */
113
- latestVersion: () => Effect.Effect<import("../types/index.js").VersionCacheObject, SDKCoreError | import("@effect/platform/HttpClientError").HttpClientError | import("effect/ParseResult").ParseError, never>;
113
+ latestVersion: () => Effect.Effect<import("../types/index.js").VersionCacheObject, import("../errors.js").SDKCoreError | import("@effect/platform/HttpClientError").HttpClientError | import("effect/ParseResult").ParseError, never>;
114
114
  /**
115
115
  * Updates the site configuration in the database and cache.
116
116
  * @param data - The new site configuration data.
@@ -118,34 +118,34 @@ declare const SDKCore_UPDATE_base: Effect.Service.Class<SDKCore_UPDATE, "studioc
118
118
  * @throws {LibSQLDatabaseError} If a database error occurs during the update.
119
119
  * @throws {UnknownException} If an unknown error occurs during the update.
120
120
  */
121
- siteConfig: (data: SiteConfig) => Effect.Effect<import("../types/index.js").SiteConfigCacheObject, SDKCoreError, never>;
121
+ siteConfig: (data: Omit<StudioCMSSiteConfig, "_config_version">) => Effect.Effect<import("../types/index.js").SiteConfigCacheObject | undefined, Error | import("../errors.js").SDKCoreError, never>;
122
122
  page: {
123
123
  /**
124
124
  * Updates a page by its ID, including content and data, and refreshes caches.
125
125
  * @param id - The ID of the page to update.
126
126
  * @param data - The new page data and content to update.
127
- * @returns An Effect that resolves to the updated page data.
127
+ * @returns An Effect that resolves to the updated page data, or undefined if not found.
128
128
  * @throws {LibSQLDatabaseError} If a database error occurs during the update.
129
129
  * @throws {UnknownException} If an unknown error occurs during the update.
130
130
  */
131
131
  byId: (id: string, data: {
132
132
  pageData: tsPageDataSelect;
133
133
  pageContent: tsPageContentSelect;
134
- }) => Effect.Effect<import("../types/index.js").PageDataCacheObject, SDKCoreError, never>;
134
+ }) => Effect.Effect<import("../types/index.js").PageDataCacheObject | undefined, import("../errors.js").SDKCoreError, never>;
135
135
  /**
136
136
  * Updates a page by its slug, including content and data, and refreshes caches.
137
137
  * @param slug - The slug of the page to update.
138
138
  * @param data - The new page data and content to update.
139
- * @returns An Effect that resolves to the updated page data.
139
+ * @returns An Effect that resolves to the updated page data, or undefined if not found.
140
140
  * @throws {LibSQLDatabaseError} If a database error occurs during the update.
141
141
  * @throws {UnknownException} If an unknown error occurs during the update.
142
142
  */
143
143
  bySlug: (slug: string, data: {
144
144
  pageData: tsPageDataSelect;
145
145
  pageContent: tsPageContentSelect;
146
- }) => Effect.Effect<import("../types/index.js").PageDataCacheObject, SDKCoreError, never>;
146
+ }) => Effect.Effect<import("../types/index.js").PageDataCacheObject | undefined, import("../errors.js").SDKCoreError, never>;
147
147
  };
148
- }, never, SDKCore_FolderTree | AstroDB | SDKCore_CLEAR | CacheContext | SDKCore_GET | GetVersionFromNPM>;
148
+ }, never, AstroDB | SDKCore_CONFIG | SDKCore_FolderTree | SDKCore_CLEAR | CacheContext | SDKCore_GET | GetVersionFromNPM>;
149
149
  }>;
150
150
  /**
151
151
  * Provides update operations for StudioCMS entities such as pages, tags, categories, permissions, folders, versions, and site configuration.
@@ -1,6 +1,5 @@
1
1
  import { eq } from "astro:db";
2
- import { CMSSiteConfigId } from "../../consts.js";
3
- import { Effect, genLogger } from "../../effect.js";
2
+ import { Effect, genLogger } from "../../../effect.js";
4
3
  import {
5
4
  FolderListMapID,
6
5
  FolderTreeMapID,
@@ -9,15 +8,13 @@ import {
9
8
  VersionMapID
10
9
  } from "../consts.js";
11
10
  import { AstroDB, GetVersionFromNPM, SDKCore_FolderTree } from "../effect/index.js";
12
- import { SDKCoreError, StudioCMS_SDK_Error } from "../errors.js";
13
11
  import {
14
12
  tsPageContent,
15
13
  tsPageData,
16
14
  tsPageDataCategories,
17
15
  tsPageDataTags,
18
16
  tsPageFolderStructure,
19
- tsPermissions,
20
- tsSiteConfig
17
+ tsPermissions
21
18
  } from "../tables.js";
22
19
  import {
23
20
  _ClearUnknownError,
@@ -31,6 +28,7 @@ import {
31
28
  versionReturn
32
29
  } from "../utils.js";
33
30
  import { SDKCore_CLEAR } from "./clear.js";
31
+ import { SDKCore_CONFIG } from "./config.js";
34
32
  import { SDKCore_GET } from "./get.js";
35
33
  class SDKCore_UPDATE extends Effect.Service()(
36
34
  "studiocms/sdk/SDKCore/modules/update",
@@ -40,13 +38,15 @@ class SDKCore_UPDATE extends Effect.Service()(
40
38
  SDKCore_CLEAR.Default,
41
39
  SDKCore_FolderTree.Default,
42
40
  SDKCore_GET.Default,
43
- GetVersionFromNPM.Default
41
+ GetVersionFromNPM.Default,
42
+ SDKCore_CONFIG.Default
44
43
  ],
45
44
  effect: genLogger("studiocms/sdk/SDKCore/modules/update/effect")(function* () {
46
45
  const [
47
46
  dbService,
48
47
  CLEAR,
49
48
  GET,
49
+ { siteConfig: sdkSiteConfig },
50
50
  { buildFolderTree, getAvailableFolders },
51
51
  { pages, FolderList, folderTree, version, siteConfig },
52
52
  getVersionFromNPM
@@ -54,6 +54,7 @@ class SDKCore_UPDATE extends Effect.Service()(
54
54
  AstroDB,
55
55
  SDKCore_CLEAR,
56
56
  SDKCore_GET,
57
+ SDKCore_CONFIG,
57
58
  SDKCore_FolderTree,
58
59
  CacheContext,
59
60
  GetVersionFromNPM
@@ -201,17 +202,15 @@ class SDKCore_UPDATE extends Effect.Service()(
201
202
  */
202
203
  siteConfig: (data) => Effect.gen(function* () {
203
204
  const status = yield* isCacheEnabled;
204
- const newSiteConfig = yield* dbService.execute(
205
- (db) => db.update(tsSiteConfig).set(data).where(eq(tsSiteConfig.id, CMSSiteConfigId)).returning().get()
206
- );
207
- const returnConfig = siteConfigReturn(newSiteConfig);
205
+ const newSiteConfig = yield* sdkSiteConfig.update(data);
206
+ if (!newSiteConfig) return;
207
+ const returnConfig = siteConfigReturn(newSiteConfig.data);
208
208
  if (!status) return returnConfig;
209
209
  siteConfig.set(SiteConfigMapID, returnConfig);
210
210
  return returnConfig;
211
211
  }).pipe(
212
212
  Effect.catchTags({
213
- "studiocms/sdk/effect/db/LibSQLDatabaseError": (cause) => _clearLibSQLError("UPDATE.siteConfig", cause),
214
- UnknownException: (cause) => _ClearUnknownError("UPDATE.siteConfig", cause)
213
+ "studiocms/sdk/effect/db/LibSQLDatabaseError": (cause) => _clearLibSQLError("UPDATE.siteConfig", cause)
215
214
  })
216
215
  ),
217
216
  page: {
@@ -219,7 +218,7 @@ class SDKCore_UPDATE extends Effect.Service()(
219
218
  * Updates a page by its ID, including content and data, and refreshes caches.
220
219
  * @param id - The ID of the page to update.
221
220
  * @param data - The new page data and content to update.
222
- * @returns An Effect that resolves to the updated page data.
221
+ * @returns An Effect that resolves to the updated page data, or undefined if not found.
223
222
  * @throws {LibSQLDatabaseError} If a database error occurs during the update.
224
223
  * @throws {UnknownException} If an unknown error occurs during the update.
225
224
  */
@@ -233,8 +232,11 @@ class SDKCore_UPDATE extends Effect.Service()(
233
232
  const status = yield* isCacheEnabled;
234
233
  yield* updatePage(data.pageData);
235
234
  yield* UPDATE.pageContent(data.pageContent);
236
- const { data: updatedData } = yield* GET.page.byId(id);
237
- const returnData = pageDataReturn(updatedData);
235
+ const rawUpdated = yield* GET.page.byId(id);
236
+ if (!rawUpdated) {
237
+ return void 0;
238
+ }
239
+ const returnData = pageDataReturn(rawUpdated.data);
238
240
  if (!status) {
239
241
  return returnData;
240
242
  }
@@ -253,7 +255,7 @@ class SDKCore_UPDATE extends Effect.Service()(
253
255
  * Updates a page by its slug, including content and data, and refreshes caches.
254
256
  * @param slug - The slug of the page to update.
255
257
  * @param data - The new page data and content to update.
256
- * @returns An Effect that resolves to the updated page data.
258
+ * @returns An Effect that resolves to the updated page data, or undefined if not found.
257
259
  * @throws {LibSQLDatabaseError} If a database error occurs during the update.
258
260
  * @throws {UnknownException} If an unknown error occurs during the update.
259
261
  */
@@ -268,22 +270,23 @@ class SDKCore_UPDATE extends Effect.Service()(
268
270
  if (!status) {
269
271
  yield* updatePage(data.pageData);
270
272
  yield* UPDATE.pageContent(data.pageContent);
271
- const { data: updatedData2 } = yield* GET.page.bySlug(slug);
272
- return pageDataReturn(updatedData2);
273
+ const rawUpdated2 = yield* GET.page.byId(data.pageData.id);
274
+ if (!rawUpdated2) {
275
+ return void 0;
276
+ }
277
+ return pageDataReturn(rawUpdated2.data);
273
278
  }
274
279
  const cachedPage = Array.from(pages.values()).find((page) => page.data.slug === slug);
275
280
  if (!cachedPage) {
276
- return yield* Effect.fail(
277
- new SDKCoreError({
278
- type: "UNKNOWN",
279
- cause: new StudioCMS_SDK_Error("Page not found in cache")
280
- })
281
- );
281
+ return void 0;
282
282
  }
283
283
  yield* updatePage(data.pageData);
284
284
  yield* UPDATE.pageContent(data.pageContent);
285
- const { data: updatedData } = yield* GET.page.bySlug(slug);
286
- const returnData = pageDataReturn(updatedData);
285
+ const rawUpdated = yield* GET.page.byId(data.pageData.id);
286
+ if (!rawUpdated) {
287
+ return void 0;
288
+ }
289
+ const returnData = pageDataReturn(rawUpdated.data);
287
290
  yield* CLEAR.folderList();
288
291
  yield* CLEAR.folderTree();
289
292
  yield* CLEAR.pages();
@@ -1,7 +1,8 @@
1
- import { Effect } from '../effect.js';
1
+ import { Effect } from '../../effect.js';
2
2
  import { AstroDB, SDKCore_Collectors, SDKCore_FolderTree, SDKCore_Generators, SDKCore_Parsers, SDKCore_Users } from './effect/index.js';
3
3
  import { SDKCore_AUTH } from './modules/auth.js';
4
4
  import { SDKCore_CLEAR } from './modules/clear.js';
5
+ import { SDKCore_CONFIG } from './modules/config.js';
5
6
  import { SDKCore_DELETE } from './modules/delete.js';
6
7
  import { SDKCore_DiffTracking } from './modules/diffTracking.js';
7
8
  import { SDKCore_GET } from './modules/get.js';
@@ -15,7 +16,7 @@ import { SDKCore_REST_API } from './modules/rest_api.js';
15
16
  import { SDKCore_UPDATE } from './modules/update.js';
16
17
  import { CacheContext } from './utils.js';
17
18
  declare const SDKCore_base: Effect.Service.Class<SDKCore, "studiocms/sdk/SDKCore", {
18
- readonly dependencies: readonly [import("effect/Layer").Layer<SDKCore_FolderTree, never, never>, import("effect/Layer").Layer<SDKCore_Generators, never, never>, import("effect/Layer").Layer<SDKCore_Parsers, never, never>, import("effect/Layer").Layer<SDKCore_Users, never, never>, import("effect/Layer").Layer<SDKCore_Collectors, never, never>, import("effect/Layer").Layer<SDKCore_CLEAR, never, CacheContext>, import("effect/Layer").Layer<SDKCore_DELETE, never, CacheContext>, import("effect/Layer").Layer<SDKCore_UPDATE, never, CacheContext>, import("effect/Layer").Layer<SDKCore_POST, never, CacheContext>, import("effect/Layer").Layer<SDKCore_REST_API, never, never>, import("effect/Layer").Layer<SDKCore_GET, never, CacheContext>, import("effect/Layer").Layer<SDKCore_ResetTokenBucket, never, CacheContext>, import("effect/Layer").Layer<SDKCore_DiffTracking, never, never>, import("effect/Layer").Layer<SDKCore_NotificationSettings, never, never>, import("effect/Layer").Layer<SDKCore_AUTH, never, never>, import("effect/Layer").Layer<SDKCore_INIT, never, never>, import("effect/Layer").Layer<AstroDB, never, never>, import("effect/Layer").Layer<SDKCore_MIDDLEWARES, never, CacheContext>, import("effect/Layer").Layer<SDKCore_PLUGINS, never, CacheContext>];
19
+ readonly dependencies: readonly [import("effect/Layer").Layer<SDKCore_FolderTree, never, never>, import("effect/Layer").Layer<SDKCore_Generators, never, never>, import("effect/Layer").Layer<SDKCore_Parsers, never, never>, import("effect/Layer").Layer<SDKCore_Users, never, never>, import("effect/Layer").Layer<SDKCore_Collectors, never, never>, import("effect/Layer").Layer<SDKCore_CLEAR, never, CacheContext>, import("effect/Layer").Layer<SDKCore_DELETE, never, CacheContext>, import("effect/Layer").Layer<SDKCore_UPDATE, never, CacheContext>, import("effect/Layer").Layer<SDKCore_POST, never, CacheContext>, import("effect/Layer").Layer<SDKCore_REST_API, never, never>, import("effect/Layer").Layer<SDKCore_GET, never, CacheContext>, import("effect/Layer").Layer<SDKCore_ResetTokenBucket, never, CacheContext>, import("effect/Layer").Layer<SDKCore_DiffTracking, never, never>, import("effect/Layer").Layer<SDKCore_NotificationSettings, never, never>, import("effect/Layer").Layer<SDKCore_AUTH, never, never>, import("effect/Layer").Layer<SDKCore_INIT, never, never>, import("effect/Layer").Layer<AstroDB, never, never>, import("effect/Layer").Layer<SDKCore_MIDDLEWARES, never, CacheContext>, import("effect/Layer").Layer<SDKCore_PLUGINS, never, CacheContext>, import("effect/Layer").Layer<SDKCore_CONFIG, never, never>];
19
20
  readonly effect: Effect.Effect<{
20
21
  db: import("@astrojs/db/runtime").Database;
21
22
  dbService: AstroDB;
@@ -33,7 +34,7 @@ declare const SDKCore_base: Effect.Service.Class<SDKCore, "studiocms/sdk/SDKCore
33
34
  parseIdStringArray: (ids: unknown) => Effect.Effect<string[], import("./errors.js").SDKCoreError, never>;
34
35
  combineRanks: (rank: string, users: import("./types/tableDefs.js").SingleRank[]) => Effect.Effect<import("./types/tableDefs.js").CombinedRank[], import("./errors.js").SDKCoreError, never>;
35
36
  verifyRank: (users: import("./types/tsAlias.js").tsUsersSelect[], permissions: import("./types/tsAlias.js").tsPermissionsSelect[], rank: string) => Effect.Effect<import("./types/tableDefs.js").SingleRank[], import("./errors.js").SDKCoreError, never>;
36
- buildFolderTree: Effect.Effect<import("./types/index.js").FolderNode[], import("./errors.js").SDKCoreError | import("./effect/db.js").LibSQLDatabaseError, never>;
37
+ buildFolderTree: Effect.Effect<import("./types/index.js").FolderNode[], import("./effect/db.js").LibSQLDatabaseError | import("./errors.js").SDKCoreError, never>;
37
38
  getAvailableFolders: Effect.Effect<import("./types/index.js").FolderListItem[], import("./effect/db.js").LibSQLDatabaseError, never>;
38
39
  clearUserReferences: (userId: string) => Effect.Effect<boolean, import("./errors.js").SDKCoreError, never>;
39
40
  collectCategories: (categoryIds: number[]) => Effect.Effect<import("./types/index.js").CombinedPageData["categories"], import("./errors.js").SDKCoreError, never>;
@@ -56,7 +57,8 @@ declare const SDKCore_base: Effect.Service.Class<SDKCore, "studiocms/sdk/SDKCore
56
57
  INIT: SDKCore_INIT;
57
58
  MIDDLEWARES: SDKCore_MIDDLEWARES;
58
59
  PLUGINS: SDKCore_PLUGINS;
59
- }, never, SDKCore_FolderTree | AstroDB | SDKCore_Generators | SDKCore_Parsers | SDKCore_Users | SDKCore_Collectors | SDKCore_CLEAR | SDKCore_DELETE | SDKCore_UPDATE | SDKCore_GET | SDKCore_POST | SDKCore_REST_API | SDKCore_ResetTokenBucket | SDKCore_DiffTracking | SDKCore_NotificationSettings | SDKCore_AUTH | SDKCore_INIT | SDKCore_MIDDLEWARES | SDKCore_PLUGINS>;
60
+ CONFIG: SDKCore_CONFIG;
61
+ }, never, AstroDB | SDKCore_CONFIG | SDKCore_FolderTree | SDKCore_Generators | SDKCore_Parsers | SDKCore_Users | SDKCore_Collectors | SDKCore_CLEAR | SDKCore_DELETE | SDKCore_UPDATE | SDKCore_GET | SDKCore_POST | SDKCore_REST_API | SDKCore_ResetTokenBucket | SDKCore_DiffTracking | SDKCore_NotificationSettings | SDKCore_AUTH | SDKCore_INIT | SDKCore_MIDDLEWARES | SDKCore_PLUGINS>;
60
62
  }>;
61
63
  /**
62
64
  * The `SDKCore` class serves as the central service aggregator for the StudioCMS SDK.
@@ -1,4 +1,4 @@
1
- import { Effect } from "../effect.js";
1
+ import { Effect } from "../../effect.js";
2
2
  import {
3
3
  AstroDB,
4
4
  SDKCore_Collectors,
@@ -9,6 +9,7 @@ import {
9
9
  } from "./effect/index.js";
10
10
  import { SDKCore_AUTH } from "./modules/auth.js";
11
11
  import { SDKCore_CLEAR } from "./modules/clear.js";
12
+ import { SDKCore_CONFIG } from "./modules/config.js";
12
13
  import { SDKCore_DELETE } from "./modules/delete.js";
13
14
  import { SDKCore_DiffTracking } from "./modules/diffTracking.js";
14
15
  import { SDKCore_GET } from "./modules/get.js";
@@ -48,7 +49,8 @@ class SDKCore extends Effect.Service()("studiocms/sdk/SDKCore", {
48
49
  SDKCore_INIT.Default,
49
50
  AstroDB.Default,
50
51
  SDKCore_MIDDLEWARES.Default,
51
- SDKCore_PLUGINS.Default
52
+ SDKCore_PLUGINS.Default,
53
+ SDKCore_CONFIG.Default
52
54
  ],
53
55
  effect: Effect.gen(function* () {
54
56
  const [
@@ -79,7 +81,8 @@ class SDKCore extends Effect.Service()("studiocms/sdk/SDKCore", {
79
81
  AUTH,
80
82
  INIT,
81
83
  MIDDLEWARES,
82
- PLUGINS
84
+ PLUGINS,
85
+ CONFIG
83
86
  ] = yield* Effect.all([
84
87
  SDKCore_FolderTree,
85
88
  SDKCore_Generators,
@@ -99,7 +102,8 @@ class SDKCore extends Effect.Service()("studiocms/sdk/SDKCore", {
99
102
  SDKCore_AUTH,
100
103
  SDKCore_INIT,
101
104
  SDKCore_MIDDLEWARES,
102
- SDKCore_PLUGINS
105
+ SDKCore_PLUGINS,
106
+ SDKCore_CONFIG
103
107
  ]);
104
108
  const { db } = dbService;
105
109
  return {
@@ -138,7 +142,8 @@ class SDKCore extends Effect.Service()("studiocms/sdk/SDKCore", {
138
142
  AUTH,
139
143
  INIT,
140
144
  MIDDLEWARES,
141
- PLUGINS
145
+ PLUGINS,
146
+ CONFIG
142
147
  };
143
148
  })
144
149
  }) {
@@ -0,0 +1,2 @@
1
+ export * from '../../db/config.js';
2
+ export { tsMetric } from '../../integrations/webVitals/consts.js';
@@ -0,0 +1,5 @@
1
+ export * from "../../db/config.js";
2
+ import { tsMetric } from "../../integrations/webVitals/consts.js";
3
+ export {
4
+ tsMetric
5
+ };
@@ -1,7 +1,8 @@
1
1
  import type { z } from 'astro/zod';
2
- import type { Schema } from '../../effect.js';
3
- import type { CacheConfig, ProcessedCacheConfig, ProcessedSDKConfig } from '../../schemas/config/sdk.js';
4
- import type { PageContentReturnId, PageDataReturnId, PageDataStripped, SiteConfig } from './tableDefs.js';
2
+ import type { Schema } from '../../../effect.js';
3
+ import type { CacheConfig, ProcessedCacheConfig, ProcessedSDKConfig } from '../../../schemas/config/sdk.js';
4
+ import type { StudioCMSSiteConfig } from '../modules/config.js';
5
+ import type { PageContentReturnId, PageDataReturnId, PageDataStripped } from './tableDefs.js';
5
6
  import type { CombinedInsertContent, tsOAuthAccountsSelect, tsPageContentSelect, tsPageDataCategoriesSelect, tsPageDataSelect, tsPageDataTagsSelect, tsPermissionsSelect, tsPluginDataSelect, tsUsersSelect } from './tsAlias.js';
6
7
  export type * from './tableDefs.js';
7
8
  export type * from './tsAlias.js';
@@ -297,10 +298,10 @@ export interface MetaOnlyPageDataCacheObject extends BaseCacheObject {
297
298
  * @interface SiteConfigCacheObject
298
299
  * @extends {BaseCacheObject}
299
300
  *
300
- * @property {SiteConfig} data - The site configuration data.
301
+ * @property {StudioCMSSiteConfig} data - The site configuration data.
301
302
  */
302
303
  export interface SiteConfigCacheObject extends BaseCacheObject {
303
- data: SiteConfig;
304
+ data: StudioCMSSiteConfig;
304
305
  }
305
306
  /**
306
307
  * Represents a cache object that includes version information.
@@ -1,9 +1,10 @@
1
- import type { tsDiffTrackingSelect, tsOAuthAccountsSelect, tsPageContentSelect, tsPageDataCategoriesSelect, tsPageDataSelect, tsPageDataTagsSelect, tsPermissionsSelect, tsSessionTableSelect, tsSiteConfigInsert, tsSiteConfigSelect, tsUsersSelect } from './tsAlias.js';
1
+ import type { ConfigFinal, StudioCMSSiteConfig } from '../modules/config.js';
2
+ import type { tsDiffTrackingSelect, tsOAuthAccountsSelect, tsPageContentSelect, tsPageDataCategoriesSelect, tsPageDataSelect, tsPageDataTagsSelect, tsPermissionsSelect, tsSessionTableSelect, tsSiteConfigSelect, tsUsersSelect } from './tsAlias.js';
2
3
  /**
3
- * Represents a stripped-down version of the `tsSiteConfigSelect` type,
4
- * excluding the property 'id'.
4
+ * Represents a stripped-down version of the `StudioCMSSiteConfig` type,
5
+ * excluding the property '_config_version'.
5
6
  */
6
- export type SiteConfig = Omit<tsSiteConfigInsert, 'id'>;
7
+ export type SiteConfig = ConfigFinal<StudioCMSSiteConfig>;
7
8
  /**
8
9
  * Represents a stripped-down version of the `tsPageDataSelect` type,
9
10
  * excluding the properties 'categories', 'tags', and 'contributorIds'.
@@ -20,11 +20,13 @@ export type tsEmailVerificationTokensInsert = typeof tsEmailVerificationTokens.$
20
20
  /**
21
21
  * Represents the type used for inserting new notification settings into the database.
22
22
  * Derived from the insert-able fields of the `tsNotificationSettings` table schema.
23
+ * @deprecated
23
24
  */
24
25
  export type tsNotificationSettingsInsert = typeof tsNotificationSettings.$inferInsert;
25
26
  /**
26
27
  * Represents the selected fields of the `tsNotificationSettings` table.
27
28
  * This type is inferred from the select query on the `tsNotificationSettings` table.
29
+ * @deprecated
28
30
  */
29
31
  export type tsNotificationSettingsSelect = typeof tsNotificationSettings.$inferSelect;
30
32
  /**
@@ -149,12 +151,14 @@ export type tsPageContentSelect = typeof tsPageContent.$inferSelect;
149
151
  * Type representing the selection of site configuration data.
150
152
  *
151
153
  * This type is inferred from the `$inferSelect` property of the `tsSiteConfig` object.
154
+ * @deprecated
152
155
  */
153
156
  export type tsSiteConfigSelect = typeof tsSiteConfig.$inferSelect;
154
157
  /**
155
158
  * Type representing the insertion of site configuration data.
156
159
  *
157
160
  * This type is inferred from the `$inferInsert` property of the `tsSiteConfig` object.
161
+ * @deprecated
158
162
  */
159
163
  export type tsSiteConfigInsert = typeof tsSiteConfig.$inferInsert;
160
164
  /**
@@ -1,6 +1,7 @@
1
- import { Context, Effect, Layer } from '../effect.js';
1
+ import { Context, Effect, Layer } from '../../effect.js';
2
2
  import { SDKCoreError } from './errors.js';
3
- import type { BaseCacheObject, CacheMap, CombinedPageData, FolderListCacheObject, FolderListItem, FolderNode, FolderTreeCacheObject, PageDataCacheObject, PageDataCacheReturnType, PluginDataCacheObject, SiteConfig, SiteConfigCacheObject, tsPageDataSelect, VersionCacheObject } from './types/index.js';
3
+ import type { StudioCMSSiteConfig } from './modules/config.js';
4
+ import type { BaseCacheObject, CacheMap, CombinedPageData, FolderListCacheObject, FolderListItem, FolderNode, FolderTreeCacheObject, PageDataCacheObject, PageDataCacheReturnType, PluginDataCacheObject, SiteConfigCacheObject, tsPageDataSelect, VersionCacheObject } from './types/index.js';
4
5
  /**
5
6
  * Represents the cached context containing various cache maps for different data types.
6
7
  *
@@ -112,7 +113,7 @@ export declare function pageDataReturn(data: CombinedPageData): PageDataCacheObj
112
113
  * @param siteConfig - The site configuration object to cache.
113
114
  * @returns An object containing the site configuration and the time of cache update.
114
115
  */
115
- export declare function siteConfigReturn(siteConfig: SiteConfig): SiteConfigCacheObject;
116
+ export declare function siteConfigReturn(siteConfig: StudioCMSSiteConfig): SiteConfigCacheObject;
116
117
  /**
117
118
  * Creates a `VersionCacheObject` containing the provided version string and the current timestamp.
118
119
  *
@@ -1,5 +1,5 @@
1
1
  import { sdk as sdkConfig } from "studiocms:config";
2
- import { Context, Effect, Layer } from "../effect.js";
2
+ import { Context, Effect, Layer } from "../../effect.js";
3
3
  import { SDKCoreError, StudioCMS_SDK_Error } from "./errors.js";
4
4
  class CacheContext extends Context.Tag("CacheContext")() {
5
5
  static makeLayer = (context) => Layer.succeed(this, this.of(context));
@@ -0,0 +1,9 @@
1
+ export const config = $$options$$;
2
+ export default config;
3
+ export const dashboardConfig = config.features.dashboardConfig;
4
+ export const authConfig = config.features.authConfig;
5
+ export const developerConfig = config.features.developerConfig;
6
+ export const sdk = config.features.sdk;
7
+
8
+ // Deprecated alias
9
+ export const AuthConfig = authConfig;
@@ -0,0 +1,30 @@
1
+ import { logger as _logger } from '@it-astro:logger:studiocms-runtime';
2
+
3
+ export const isVerbose = $$verbose$$;
4
+
5
+ export const logger = _logger.fork('studiocms:runtime');
6
+
7
+ export default logger;
8
+
9
+ const apiLogger = _logger.fork('studiocms:runtime/api');
10
+
11
+ function buildErrorMessage(message, error) {
12
+ if (!error) return message;
13
+ if (error instanceof Error) return `${message}: ${error.message}\n${error.stack}`;
14
+ return `${message}: ${error}`;
15
+ }
16
+
17
+ export function apiResponseLogger(status, message, error) {
18
+ if (status !== 200) {
19
+ apiLogger.error(buildErrorMessage(message, error));
20
+ return new Response(JSON.stringify({ error: message }), {
21
+ status,
22
+ headers: { 'Content-Type': 'application/json' },
23
+ });
24
+ }
25
+ isVerbose && apiLogger.info(message);
26
+ return new Response(JSON.stringify({ message }), {
27
+ status,
28
+ headers: { 'Content-Type': 'application/json' },
29
+ });
30
+ }
@@ -0,0 +1,71 @@
1
+ import type { StudioCMSConfig } from '../schemas/index.js';
2
+ /**
3
+ * Builds a string representing a default export of the provided module object.
4
+ *
5
+ * @param mod - The module object to be stringified and exported as default.
6
+ * @returns A string containing a TypeScript/JavaScript default export statement with the serialized module.
7
+ */
8
+ export declare const buildDefaultOnlyVirtual: (mod: any) => string;
9
+ /**
10
+ * Builds a string containing multiple named ES module exports from a record of key-value pairs.
11
+ *
12
+ * Each key in the input object becomes the exported constant's name, and each value is stringified
13
+ * and assigned to the corresponding export.
14
+ *
15
+ * @param items - An object where each key-value pair represents the name and value of an export.
16
+ * @returns A string containing multiple export statements, one for each entry in the input object.
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * const exports = buildNamedMultiExportVirtual({ foo: "bar", baz: "qux" });
21
+ * // exports:
22
+ * // export const foo = "bar";
23
+ * // export const baz = "qux";
24
+ * ```
25
+ */
26
+ export declare const buildNamedMultiExportVirtual: (items: Record<string, string>) => string;
27
+ /**
28
+ * Builds the virtual configuration file content by injecting the provided StudioCMS options
29
+ * into a configuration stub template.
30
+ *
31
+ * @param options - The configuration options to be injected into the stub template.
32
+ * @returns The resulting configuration file content as a string with the options embedded.
33
+ */
34
+ export declare const buildVirtualConfig: (options: StudioCMSConfig) => string;
35
+ /**
36
+ * Builds the content for a logger virtual file by reading a logger stub file and replacing
37
+ * the `$$verbose$$` placeholder with the provided verbosity flag.
38
+ *
39
+ * @param verbose - Determines whether verbose logging should be enabled.
40
+ * @returns The logger file content with the verbosity setting applied.
41
+ */
42
+ export declare const buildLoggerVirtual: (verbose: boolean) => string;
43
+ /**
44
+ * Factory function to build utilities for generating virtual module code strings.
45
+ *
46
+ * @param resolve - A function that resolves a list of path segments into a string path.
47
+ * @returns An object containing utilities for generating virtual module code:
48
+ * - `dynamicVirtual`: Generates export statements for a list of module paths.
49
+ * - `ambientScripts`: Generates import statements for a list of module paths (for side effects).
50
+ * - `namedVirtual`: Generates code to re-export a named export (and optionally as default) from a module.
51
+ * - `astroComponentVirtual`: Generates export statements for Astro components with custom names.
52
+ * - `dynamicWithAstroVirtual`: Generates combined exports for dynamic modules and Astro components.
53
+ */
54
+ export declare const VirtualModuleBuilder: (resolve: (...path: Array<string>) => string) => {
55
+ dynamicVirtual: (items: Array<string>) => string;
56
+ ambientScripts: (items: Array<string>) => string;
57
+ namedVirtual: ({ namedExport, path, exportDefault, }: {
58
+ namedExport: string;
59
+ path: string;
60
+ exportDefault?: boolean;
61
+ }) => string;
62
+ astroComponentVirtual: (items: Record<string, string>) => string;
63
+ dynamicWithAstroVirtual: ({ dynamicExports, astroComponents, }: {
64
+ dynamicExports: Array<string>;
65
+ astroComponents: Record<string, string>;
66
+ }) => string;
67
+ buildDefaultOnlyVirtual: (mod: any) => string;
68
+ buildLoggerVirtual: (verbose: boolean) => string;
69
+ buildNamedMultiExportVirtual: (items: Record<string, string>) => string;
70
+ buildVirtualConfig: (options: StudioCMSConfig) => string;
71
+ };