studiocms 0.1.0-beta.26 → 0.1.0-beta.28

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 (771) hide show
  1. package/CHANGELOG.md +110 -0
  2. package/README.md +2 -0
  3. package/dist/cli/add/index.d.ts +1 -1
  4. package/dist/cli/add/index.js +15 -12
  5. package/dist/cli/add/tryToInstallPlugins.d.ts +1 -1
  6. package/dist/cli/add/tryToInstallPlugins.js +11 -8
  7. package/dist/cli/add/updateStudioCMSConfig.d.ts +1 -1
  8. package/dist/cli/add/updateStudioCMSConfig.js +4 -4
  9. package/dist/cli/add/validatePlugins.d.ts +1 -1
  10. package/dist/cli/add/validatePlugins.js +10 -10
  11. package/dist/cli/crypto/genJWT/index.js +14 -13
  12. package/dist/cli/getTurso/index.js +6 -8
  13. package/dist/cli/index.js +3 -1
  14. package/dist/cli/init/index.js +54 -57
  15. package/dist/cli/init/steps/env.d.ts +2 -2
  16. package/dist/cli/init/steps/env.js +316 -271
  17. package/dist/cli/init/steps/next.d.ts +2 -1
  18. package/dist/cli/init/steps/next.js +35 -28
  19. package/dist/cli/users/index.d.ts +2 -1
  20. package/dist/cli/users/index.js +83 -80
  21. package/dist/cli/users/steps/libsql/createUsers.d.ts +2 -0
  22. package/dist/cli/users/steps/libsql/createUsers.js +151 -0
  23. package/dist/cli/users/steps/libsql/modifyUsers.d.ts +7 -0
  24. package/dist/cli/users/steps/libsql/modifyUsers.js +205 -0
  25. package/dist/cli/users/steps/next.d.ts +2 -1
  26. package/dist/cli/users/steps/next.js +10 -7
  27. package/dist/cli/utils/checkRequiredEnvVars.d.ts +17 -1
  28. package/dist/cli/utils/checkRequiredEnvVars.js +32 -4
  29. package/dist/cli/utils/context.d.ts +7 -7
  30. package/dist/cli/utils/context.js +23 -16
  31. package/dist/cli/utils/effectBoxen.d.ts +1 -2
  32. package/dist/cli/utils/effectBoxen.js +2 -4
  33. package/dist/cli/utils/intro.js +2 -3
  34. package/dist/cli/utils/logger.d.ts +9 -0
  35. package/dist/cli/utils/logger.js +14 -0
  36. package/dist/cli/utils/types.d.ts +36 -0
  37. package/dist/cli/utils/types.js +11 -0
  38. package/dist/cli/utils/useLibSQLDb.d.ts +20 -262
  39. package/dist/cli/utils/useLibSQLDb.js +22 -17
  40. package/dist/cli/utils/user-utils.d.ts +16 -105
  41. package/dist/cli/utils/user-utils.js +29 -65
  42. package/dist/config.d.ts +1 -1
  43. package/dist/consts.d.ts +7 -14
  44. package/dist/consts.js +24 -16
  45. package/dist/db/config.d.ts +128 -112
  46. package/dist/db/config.js +36 -31
  47. package/dist/{components → frontend/components}/auth/FallbackCanvas.astro +5 -8
  48. package/dist/{components → frontend/components}/auth/OAuthButtonStack.astro +1 -1
  49. package/{src → dist/frontend}/components/auth/ThreeCanvasLoader.astro +1 -8
  50. package/{src → dist/frontend}/components/dashboard/DashboardGrid.astro +1 -1
  51. package/{src → dist/frontend}/components/dashboard/DashboardGridItem.astro +14 -4
  52. package/{src → dist/frontend}/components/dashboard/DashboardPageHeader.astro +7 -90
  53. package/dist/{components → frontend/components}/dashboard/DoubleSidebar.astro +2 -4
  54. package/{src → dist/frontend}/components/dashboard/Footer.astro +1 -1
  55. package/{src → dist/frontend}/components/dashboard/LoginChecker.astro +1 -1
  56. package/dist/{components → frontend/components}/dashboard/MainSidebarContent.astro +41 -27
  57. package/dist/frontend/components/dashboard/SidebarModals.astro +13 -0
  58. package/dist/{components → frontend/components}/dashboard/SingleSidebar.astro +3 -5
  59. package/{src → dist/frontend}/components/dashboard/configuration/ConfigForm.astro +48 -8
  60. package/dist/{components → frontend/components}/dashboard/configuration/LoginPreview.astro +6 -20
  61. package/dist/frontend/components/dashboard/content-mgmt/CreatePage.astro +522 -0
  62. package/dist/frontend/components/dashboard/content-mgmt/EditPage.astro +741 -0
  63. package/dist/{components → frontend/components}/dashboard/content-mgmt/InnerSidebarElement.astro +7 -1
  64. package/{src → dist/frontend}/components/dashboard/content-mgmt/PageHeader.astro +1 -1
  65. package/dist/{components → frontend/components}/dashboard/content-mgmt/runtime.d.ts +1 -1
  66. package/dist/{components → frontend/components}/dashboard/content-mgmt/runtime.js +2 -2
  67. package/dist/{components → frontend/components}/dashboard/content-mgmt/shared.js +2 -2
  68. package/{src → dist/frontend}/components/dashboard/profile/Notifications.astro +72 -23
  69. package/{src → dist/frontend}/components/dashboard/profile/SocialSignin.astro +1 -1
  70. package/dist/frontend/components/dashboard/sidebar/UserAccount.astro +61 -0
  71. package/dist/frontend/components/dashboard/sidebar/VersionCheck.astro +152 -0
  72. package/{src → dist/frontend}/components/dashboard/sidebar-modals/VersionModal.astro +62 -53
  73. package/dist/{components → frontend/components}/dashboard/sidebarConfig.js +1 -1
  74. package/dist/frontend/components/dashboard/smtp-config/TemplateEditor.astro +107 -0
  75. package/{src → dist/frontend}/components/dashboard/user-mgmt/InnerSidebarElement.astro +8 -1
  76. package/dist/{components → frontend/components}/dashboard/user-mgmt/RankCheck.astro +1 -1
  77. package/{src → dist/frontend}/components/dashboard/user-mgmt/SocialSignin.astro +1 -1
  78. package/dist/{components → frontend/components}/dashboard/user-mgmt/UserListItem.astro +31 -3
  79. package/dist/{components → frontend/components}/shared/Code.astro +6 -2
  80. package/dist/frontend/components/shared/SSRUser.astro +267 -0
  81. package/dist/{components → frontend/components}/shared/head/Favicons.astro +1 -1
  82. package/{src → dist/frontend}/components/shared/head/TitleTags.astro +1 -1
  83. package/dist/{components/auth → frontend/components/shared}/oAuthButtonProviders.d.ts +9 -0
  84. package/dist/{fonts/onest-font.css → frontend/fonts/css/onest-variable.css} +1 -1
  85. package/dist/{fonts/syntax-font.css → frontend/fonts/css/syntax.css} +1 -1
  86. package/{src → dist/frontend}/layouts/AuthLayout.astro +1 -1
  87. package/{src → dist/frontend}/layouts/DashboardLayout.astro +17 -7
  88. package/dist/{middleware → frontend/middleware}/index.js +4 -3
  89. package/dist/{middleware → frontend/middleware}/utils.d.ts +6 -4
  90. package/dist/{middleware → frontend/middleware}/utils.js +21 -4
  91. package/{src/routes/error-pages → dist/frontend/pages}/404.astro +2 -2
  92. package/dist/{routes/dashboard → frontend/pages/[dashboard]}/[...pluginPage].astro +1 -1
  93. package/dist/{routes/dashboard → frontend/pages/[dashboard]}/content-management/diff.astro +6 -2
  94. package/dist/{routes/auth → frontend/pages/[dashboard]}/login.astro +2 -2
  95. package/dist/frontend/pages/[dashboard]/logout.astro +153 -0
  96. package/dist/{routes/dashboard → frontend/pages/[dashboard]}/profile.astro +1 -4
  97. package/dist/{routes/auth → frontend/pages/[dashboard]}/signup.astro +2 -2
  98. package/dist/frontend/pages/[dashboard]/smtp-configuration.astro +753 -0
  99. package/{src/routes/dashboard → dist/frontend/pages/[dashboard]}/user-management/edit.astro +50 -42
  100. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/_effects/index.d.ts +1 -1
  101. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/_effects/index.js +1 -1
  102. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/callback.js +1 -1
  103. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/index.js +1 -1
  104. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/forgot-password.js +9 -4
  105. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/login.js +1 -1
  106. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/logout.js +4 -6
  107. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/register.js +1 -1
  108. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/shared.d.ts +1 -1
  109. package/dist/{routes/api → frontend/pages/studiocms_api}/auth/shared.js +1 -1
  110. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/api-tokens.js +1 -1
  111. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/config.js +1 -1
  112. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/content/diff.js +1 -1
  113. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/content/folder.js +1 -1
  114. package/dist/frontend/pages/studiocms_api/dashboard/content/page.d.ts +1 -0
  115. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/content/page.js +25 -50
  116. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/create-reset-link.js +1 -1
  117. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/create-user-invite.js +9 -4
  118. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/create-user.js +2 -2
  119. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/email-notification-settings-site.js +1 -1
  120. package/dist/{routes/api/mailer/test-email.js → frontend/pages/studiocms_api/dashboard/mailer/check-email.js} +1 -1
  121. package/dist/{routes/api → frontend/pages/studiocms_api/dashboard}/mailer/config.d.ts +1 -1
  122. package/dist/{routes/api → frontend/pages/studiocms_api/dashboard}/mailer/config.js +1 -1
  123. package/{src/routes/api → dist/frontend/pages/studiocms_api}/dashboard/partials/Editor.astro +1 -5
  124. package/{src/routes/api → dist/frontend/pages/studiocms_api}/dashboard/partials/LiveRender.astro +2 -2
  125. package/{src/routes/api → dist/frontend/pages/studiocms_api}/dashboard/partials/UserListItems.astro +2 -1
  126. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/plugins/[plugin].js +1 -1
  127. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/profile.js +1 -1
  128. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/resend-verify-email.js +1 -1
  129. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/reset-password.js +1 -1
  130. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/search-list.js +1 -1
  131. package/dist/frontend/pages/studiocms_api/dashboard/templates.js +64 -0
  132. package/dist/frontend/pages/studiocms_api/dashboard/update-user-notifications.d.ts +1 -0
  133. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/update-user-notifications.js +1 -1
  134. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/users.js +2 -2
  135. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/verify-email.js +1 -1
  136. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/verify-session.d.ts +1 -1
  137. package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/verify-session.js +3 -3
  138. package/{src/routes/api → dist/frontend/pages/studiocms_api/renderer}/render.astro +2 -2
  139. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/utils/auth-token.d.ts +2 -2
  140. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/utils/auth-token.js +1 -1
  141. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/folders/[id].d.ts +1 -1
  142. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/folders/[id].js +1 -1
  143. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/folders/index.d.ts +1 -1
  144. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/folders/index.js +1 -1
  145. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/history/[diffid].js +1 -1
  146. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/history/index.js +1 -1
  147. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/index.js +1 -1
  148. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/index.js +1 -1
  149. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/folders/[id].js +1 -1
  150. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/folders/index.js +1 -1
  151. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/pages/[id].js +1 -1
  152. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/pages/index.js +1 -1
  153. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/settings/index.js +1 -1
  154. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/users/[id].d.ts +1 -1
  155. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/users/[id].js +1 -1
  156. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/users/index.d.ts +1 -1
  157. package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/users/index.js +1 -1
  158. package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/fallback-list-pages.json.js +1 -1
  159. package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/full-changelog.json.js +1 -1
  160. package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/list-pages.js +1 -1
  161. package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/update-latest-version-cache.js +1 -1
  162. package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/utils/changelog.d.ts +1 -1
  163. package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/utils/changelog.js +7 -1
  164. package/dist/frontend/routes.d.ts +79 -0
  165. package/dist/frontend/routes.js +364 -0
  166. package/dist/{components/auth/component-scripts → frontend/scripts/auth}/formListener.d.ts +2 -1
  167. package/dist/{components/auth/component-scripts → frontend/scripts/auth}/formListener.js +7 -3
  168. package/dist/frontend/scripts/dateTimeListener.d.ts +21 -0
  169. package/dist/frontend/scripts/dateWithTimeAndZone.d.ts +35 -0
  170. package/dist/frontend/scripts/formdata-utils.d.ts +142 -0
  171. package/dist/frontend/scripts/formdata-utils.js +53 -0
  172. package/dist/frontend/scripts/timeAgo.d.ts +41 -0
  173. package/{src/routes/firstTimeSetupRoutes → dist/frontend/setup-pages}/1-start.astro +3 -3
  174. package/{src/routes/firstTimeSetupRoutes → dist/frontend/setup-pages}/2-next.astro +6 -5
  175. package/dist/{routes/firstTimeSetupRoutes → frontend/setup-pages}/3-done.astro +6 -6
  176. package/dist/{routes/firstTimeSetupRoutes/api → frontend/setup-pages/studiocms_api/dashboard}/step-1.js +1 -1
  177. package/dist/frontend/setup-pages/studiocms_api/dashboard/step-2.d.ts +1 -0
  178. package/dist/{routes/firstTimeSetupRoutes/api → frontend/setup-pages/studiocms_api/dashboard}/step-2.js +2 -2
  179. package/dist/{styles → frontend/styles}/auth-layout.css +1 -1
  180. package/dist/{styles → frontend/styles}/code-component.css +1 -1
  181. package/dist/{styles → frontend/styles}/dashboard-base.css +4 -12
  182. package/dist/{styles → frontend/styles}/dashboard-diff.css +1 -1
  183. package/dist/frontend/types.d.ts +47 -0
  184. package/dist/frontend/utils.d.ts +65 -0
  185. package/dist/frontend/utils.js +130 -0
  186. package/{src/components/default-grid-items → dist/handlers/plugin-components}/Recently-created-pages.astro +9 -4
  187. package/{src/components/default-grid-items → dist/handlers/plugin-components}/Recently-signed-up.astro +8 -7
  188. package/dist/{components/default-grid-items → handlers/plugin-components}/Recently-updated-pages.astro +9 -4
  189. package/dist/{components/default-grid-items → handlers/plugin-components}/Totals.astro +8 -3
  190. package/dist/handlers/plugin-i18n/de.d.ts +22 -0
  191. package/dist/handlers/plugin-i18n/de.js +25 -0
  192. package/dist/handlers/plugin-i18n/en.d.ts +22 -0
  193. package/dist/handlers/plugin-i18n/en.js +25 -0
  194. package/dist/handlers/plugin-i18n/es.d.ts +22 -0
  195. package/dist/handlers/plugin-i18n/es.js +25 -0
  196. package/dist/handlers/plugin-i18n/fr.d.ts +22 -0
  197. package/dist/handlers/plugin-i18n/fr.js +25 -0
  198. package/dist/handlers/plugin-i18n/nl.d.ts +22 -0
  199. package/dist/handlers/plugin-i18n/nl.js +25 -0
  200. package/dist/handlers/plugin-i18n/no.d.ts +22 -0
  201. package/dist/handlers/plugin-i18n/no.js +25 -0
  202. package/dist/handlers/plugin-i18n/zh.d.ts +22 -0
  203. package/dist/handlers/plugin-i18n/zh.js +25 -0
  204. package/dist/handlers/pluginHandler.d.ts +5 -3
  205. package/dist/handlers/pluginHandler.js +158 -62
  206. package/dist/handlers/routeHandler.d.ts +23 -61
  207. package/dist/handlers/routeHandler.js +13 -387
  208. package/dist/index.d.ts +1 -1
  209. package/dist/index.js +30 -12
  210. package/dist/integrations/dynamic-sitemap/index.d.ts +8 -0
  211. package/dist/integrations/dynamic-sitemap/index.js +4 -1
  212. package/dist/integrations/dynamic-sitemap/sitemap-index.xml.d.ts +20 -0
  213. package/dist/integrations/dynamic-sitemap/sitemap-index.xml.js +2 -1
  214. package/dist/integrations/node-namespace.d.ts +4 -0
  215. package/dist/integrations/node-namespace.js +14 -10
  216. package/dist/integrations/robots/core.d.ts +63 -0
  217. package/dist/integrations/robots/core.js +14 -3
  218. package/dist/integrations/robots/index.js +2 -0
  219. package/dist/integrations/webVitals/checkForWebVitalsPlugin.js +9 -8
  220. package/dist/integrations/webVitals/i18n/de.d.ts +24 -0
  221. package/dist/integrations/webVitals/i18n/de.js +27 -0
  222. package/dist/integrations/webVitals/i18n/en.d.ts +24 -0
  223. package/dist/integrations/webVitals/i18n/en.js +27 -0
  224. package/dist/integrations/webVitals/i18n/es.d.ts +24 -0
  225. package/dist/integrations/webVitals/i18n/es.js +27 -0
  226. package/dist/integrations/webVitals/i18n/fr.d.ts +24 -0
  227. package/dist/integrations/webVitals/i18n/fr.js +27 -0
  228. package/dist/integrations/webVitals/i18n/nl.d.ts +24 -0
  229. package/dist/integrations/webVitals/i18n/nl.js +27 -0
  230. package/dist/integrations/webVitals/i18n/no.d.ts +24 -0
  231. package/dist/integrations/webVitals/i18n/no.js +27 -0
  232. package/dist/integrations/webVitals/i18n/zh.d.ts +24 -0
  233. package/dist/integrations/webVitals/i18n/zh.js +27 -0
  234. package/dist/integrations/webVitals/utils/webVitalsUtils.js +2 -2
  235. package/dist/integrations/webVitals/webVitalsRouteSummary.d.ts +15 -0
  236. package/dist/integrations/webVitals/webVitalsRouteSummary.js +4 -1
  237. package/dist/plugins.d.ts +29 -2
  238. package/dist/plugins.js +1 -0
  239. package/dist/schemas/config/auth.d.ts +12 -0
  240. package/dist/schemas/config/auth.js +2 -1
  241. package/dist/schemas/config/index.d.ts +2 -2
  242. package/dist/schemas/config/sdk.d.ts +39 -5
  243. package/dist/schemas/config/sdk.js +7 -1
  244. package/dist/schemas/plugins/i18n.d.ts +59 -0
  245. package/dist/schemas/plugins/i18n.js +7 -0
  246. package/dist/schemas/plugins/index.d.ts +2896 -25
  247. package/dist/schemas/plugins/index.js +76 -1
  248. package/dist/schemas/plugins/shared.d.ts +34 -7
  249. package/dist/schemas/plugins/shared.js +34 -7
  250. package/dist/test-utils.d.ts +105 -0
  251. package/dist/test-utils.js +167 -0
  252. package/dist/types.d.ts +79 -3
  253. package/dist/utils/effects/index.d.ts +1 -1
  254. package/dist/utils/effects/index.js +1 -2
  255. package/dist/utils/effects/logger.d.ts +6 -17
  256. package/dist/utils/effects/logger.js +4 -9
  257. package/dist/utils/lang-helper.d.ts +37 -0
  258. package/dist/utils/lang-helper.js +60 -0
  259. package/dist/virtual.d.ts +51 -4
  260. package/dist/virtuals/auth/getLabelForPermissionLevel.d.ts +4 -1
  261. package/dist/virtuals/auth/verify-email.d.ts +3 -3
  262. package/dist/virtuals/auth/verify-email.js +8 -3
  263. package/dist/virtuals/components/CustomImage.astro +4 -0
  264. package/dist/virtuals/components/FormattedDate.astro +3 -2
  265. package/dist/virtuals/components/Renderer.astro +38 -8
  266. package/dist/virtuals/components/renderFn.d.ts +33 -0
  267. package/dist/virtuals/components/renderFn.js +36 -0
  268. package/dist/virtuals/i18n/LanguageSelector.astro +53 -102
  269. package/dist/virtuals/i18n/client.d.ts +90 -0
  270. package/dist/virtuals/i18n/client.js +28 -1
  271. package/dist/virtuals/i18n/config.d.ts +92 -15
  272. package/dist/virtuals/i18n/config.js +10 -9
  273. package/dist/virtuals/i18n/overrides.d.ts +6 -0
  274. package/dist/virtuals/i18n/overrides.js +7 -0
  275. package/dist/virtuals/i18n/plugin.d.ts +37 -0
  276. package/dist/virtuals/i18n/plugin.js +69 -0
  277. package/dist/virtuals/i18n/server.d.ts +4 -0
  278. package/dist/virtuals/i18n/server.js +10 -3
  279. package/dist/virtuals/i18n/translations/de.json +83 -5
  280. package/dist/virtuals/i18n/translations/en.json +83 -5
  281. package/dist/virtuals/i18n/translations/es.json +83 -5
  282. package/dist/virtuals/i18n/translations/fr.json +83 -5
  283. package/dist/virtuals/i18n/translations/hi.json +4 -1
  284. package/dist/virtuals/i18n/translations/nl.json +374 -0
  285. package/dist/virtuals/i18n/translations/no.json +374 -0
  286. package/dist/virtuals/i18n/translations/zh.json +83 -5
  287. package/dist/virtuals/i18n/v-files.d.ts +19 -1
  288. package/dist/virtuals/i18n/v-files.js +8 -1
  289. package/dist/virtuals/lib/routeMap.d.ts +1 -0
  290. package/dist/virtuals/lib/routeMap.js +2 -1
  291. package/dist/virtuals/mailer/index.d.ts +2 -2
  292. package/dist/virtuals/mailer/template.d.ts +2 -1
  293. package/dist/virtuals/mailer/template.js +2 -1
  294. package/dist/virtuals/mailer/templates/password-reset.js +2 -4
  295. package/dist/virtuals/mailer/templates/verify-email.js +1 -2
  296. package/dist/virtuals/notifier/client.d.ts +1 -2
  297. package/dist/virtuals/notifier/client.js +2 -1
  298. package/dist/virtuals/notifier/index.d.ts +2 -0
  299. package/dist/virtuals/notifier/index.js +12 -6
  300. package/dist/virtuals/scripts/template-editor.d.ts +36 -0
  301. package/dist/virtuals/scripts/template-editor.js +247 -0
  302. package/dist/virtuals/scripts/user-quick-tools.d.ts +18 -16
  303. package/dist/virtuals/scripts/user-quick-tools.js +60 -4
  304. package/dist/virtuals/sdk/consts.d.ts +12 -0
  305. package/dist/virtuals/sdk/consts.js +4 -0
  306. package/dist/virtuals/sdk/effect/collectors.d.ts +15 -2
  307. package/dist/virtuals/sdk/effect/collectors.js +5 -23
  308. package/dist/virtuals/sdk/effect/db.d.ts +5 -88
  309. package/dist/virtuals/sdk/effect/db.js +6 -98
  310. package/dist/virtuals/sdk/effect/foldertree.d.ts +3 -3
  311. package/dist/virtuals/sdk/effect/generators.js +24 -12
  312. package/dist/virtuals/sdk/effect/lib/jwt-generator.d.ts +23 -0
  313. package/dist/virtuals/sdk/effect/lib/jwt-generator.js +2 -0
  314. package/dist/virtuals/sdk/effect/users.js +2 -2
  315. package/dist/virtuals/sdk/index.d.ts +17 -4
  316. package/dist/virtuals/sdk/modules/auth.d.ts +7 -7
  317. package/dist/virtuals/sdk/modules/auth.js +17 -17
  318. package/dist/virtuals/sdk/modules/config-types.d.ts +147 -0
  319. package/dist/virtuals/sdk/modules/config-types.js +0 -0
  320. package/dist/virtuals/sdk/modules/config.d.ts +18 -163
  321. package/dist/virtuals/sdk/modules/config.js +27 -4
  322. package/dist/virtuals/sdk/modules/delete.js +9 -9
  323. package/dist/virtuals/sdk/modules/diffTracking.js +9 -9
  324. package/dist/virtuals/sdk/modules/get.d.ts +15 -14
  325. package/dist/virtuals/sdk/modules/get.js +16 -16
  326. package/dist/virtuals/sdk/modules/init.d.ts +2 -2
  327. package/dist/virtuals/sdk/modules/init.js +1 -1
  328. package/dist/virtuals/sdk/modules/middlewares.d.ts +1 -1
  329. package/dist/virtuals/sdk/modules/middlewares.js +26 -7
  330. package/dist/virtuals/sdk/modules/notificationSettings.d.ts +2 -2
  331. package/dist/virtuals/sdk/modules/notificationSettings.js +1 -1
  332. package/dist/virtuals/sdk/modules/plugins.d.ts +9 -9
  333. package/dist/virtuals/sdk/modules/post.js +10 -10
  334. package/dist/virtuals/sdk/modules/resetTokenBucket.js +3 -3
  335. package/dist/virtuals/sdk/modules/rest_api.js +4 -4
  336. package/dist/virtuals/sdk/modules/update.d.ts +1 -1
  337. package/dist/virtuals/sdk/modules/update.js +10 -14
  338. package/dist/virtuals/sdk/sdkCore.d.ts +17 -4
  339. package/dist/virtuals/sdk/types/index.d.ts +1 -1
  340. package/dist/virtuals/template-engine/default-templates.d.ts +33 -0
  341. package/dist/virtuals/template-engine/default-templates.js +218 -0
  342. package/dist/virtuals/template-engine/index.d.ts +63 -0
  343. package/dist/virtuals/template-engine/index.js +61 -0
  344. package/package.json +36 -30
  345. package/src/cli/add/index.ts +15 -13
  346. package/src/cli/add/tryToInstallPlugins.ts +14 -9
  347. package/src/cli/add/updateStudioCMSConfig.ts +4 -4
  348. package/src/cli/add/validatePlugins.ts +10 -10
  349. package/src/cli/crypto/genJWT/index.ts +14 -13
  350. package/src/cli/getTurso/index.ts +7 -9
  351. package/src/cli/index.ts +4 -1
  352. package/src/cli/init/index.ts +86 -97
  353. package/src/cli/init/steps/env.ts +361 -303
  354. package/src/cli/init/steps/next.ts +40 -36
  355. package/src/cli/users/index.ts +116 -109
  356. package/src/cli/users/steps/libsql/createUsers.ts +169 -0
  357. package/src/cli/users/steps/libsql/modifyUsers.ts +229 -0
  358. package/src/cli/users/steps/next.ts +10 -8
  359. package/src/cli/utils/checkRequiredEnvVars.ts +53 -3
  360. package/src/cli/utils/context.ts +28 -20
  361. package/src/cli/utils/effectBoxen.ts +2 -4
  362. package/src/cli/utils/intro.ts +2 -3
  363. package/src/cli/utils/logger.ts +21 -0
  364. package/src/cli/utils/types.ts +50 -0
  365. package/src/cli/utils/useLibSQLDb.ts +35 -17
  366. package/src/cli/utils/user-utils.ts +42 -155
  367. package/src/consts.ts +43 -27
  368. package/src/db/config.ts +68 -55
  369. package/src/effect.ts +2 -0
  370. package/src/{components → frontend/components}/auth/FallbackCanvas.astro +5 -8
  371. package/src/{components → frontend/components}/auth/OAuthButtonStack.astro +1 -1
  372. package/{dist → src/frontend}/components/auth/ThreeCanvasLoader.astro +1 -8
  373. package/{dist → src/frontend}/components/dashboard/DashboardGrid.astro +1 -1
  374. package/{dist → src/frontend}/components/dashboard/DashboardGridItem.astro +14 -4
  375. package/{dist → src/frontend}/components/dashboard/DashboardPageHeader.astro +7 -90
  376. package/src/{components → frontend/components}/dashboard/DoubleSidebar.astro +2 -4
  377. package/{dist → src/frontend}/components/dashboard/Footer.astro +1 -1
  378. package/{dist → src/frontend}/components/dashboard/LoginChecker.astro +1 -1
  379. package/src/{components → frontend/components}/dashboard/MainSidebarContent.astro +41 -27
  380. package/src/frontend/components/dashboard/SidebarModals.astro +13 -0
  381. package/src/{components → frontend/components}/dashboard/SingleSidebar.astro +3 -5
  382. package/{dist → src/frontend}/components/dashboard/configuration/ConfigForm.astro +48 -8
  383. package/src/{components → frontend/components}/dashboard/configuration/LoginPreview.astro +6 -20
  384. package/src/frontend/components/dashboard/content-mgmt/CreatePage.astro +522 -0
  385. package/src/frontend/components/dashboard/content-mgmt/EditPage.astro +741 -0
  386. package/src/{components → frontend/components}/dashboard/content-mgmt/InnerSidebarElement.astro +7 -1
  387. package/{dist → src/frontend}/components/dashboard/content-mgmt/PageHeader.astro +1 -1
  388. package/src/{components → frontend/components}/dashboard/content-mgmt/runtime.ts +2 -2
  389. package/src/{components → frontend/components}/dashboard/content-mgmt/shared.ts +2 -2
  390. package/{dist → src/frontend}/components/dashboard/profile/Notifications.astro +72 -23
  391. package/{dist → src/frontend}/components/dashboard/profile/SocialSignin.astro +1 -1
  392. package/src/frontend/components/dashboard/sidebar/UserAccount.astro +61 -0
  393. package/src/frontend/components/dashboard/sidebar/VersionCheck.astro +152 -0
  394. package/{dist → src/frontend}/components/dashboard/sidebar-modals/VersionModal.astro +62 -53
  395. package/src/{components → frontend/components}/dashboard/sidebarConfig.ts +1 -1
  396. package/src/frontend/components/dashboard/smtp-config/TemplateEditor.astro +107 -0
  397. package/{dist → src/frontend}/components/dashboard/user-mgmt/InnerSidebarElement.astro +8 -1
  398. package/src/{components → frontend/components}/dashboard/user-mgmt/RankCheck.astro +1 -1
  399. package/{dist → src/frontend}/components/dashboard/user-mgmt/SocialSignin.astro +1 -1
  400. package/src/{components → frontend/components}/dashboard/user-mgmt/UserListItem.astro +31 -3
  401. package/src/{components → frontend/components}/shared/Code.astro +6 -2
  402. package/src/frontend/components/shared/SSRUser.astro +267 -0
  403. package/src/{components → frontend/components}/shared/head/Favicons.astro +1 -1
  404. package/{dist → src/frontend}/components/shared/head/TitleTags.astro +1 -1
  405. package/src/{components/auth → frontend/components/shared}/oAuthButtonProviders.ts +9 -0
  406. package/src/{fonts/onest-font.css → frontend/fonts/css/onest-variable.css} +1 -1
  407. package/src/{fonts/syntax-font.css → frontend/fonts/css/syntax.css} +1 -1
  408. package/{dist → src/frontend}/layouts/AuthLayout.astro +1 -1
  409. package/{dist → src/frontend}/layouts/DashboardLayout.astro +17 -7
  410. package/src/{middleware → frontend/middleware}/index.ts +18 -3
  411. package/src/{middleware → frontend/middleware}/utils.ts +23 -6
  412. package/{dist/routes/error-pages → src/frontend/pages}/404.astro +2 -2
  413. package/src/{routes/dashboard → frontend/pages/[dashboard]}/[...pluginPage].astro +1 -1
  414. package/src/{routes/dashboard → frontend/pages/[dashboard]}/content-management/diff.astro +6 -2
  415. package/src/{routes/auth → frontend/pages/[dashboard]}/login.astro +2 -2
  416. package/src/frontend/pages/[dashboard]/logout.astro +153 -0
  417. package/src/{routes/dashboard → frontend/pages/[dashboard]}/profile.astro +1 -4
  418. package/src/{routes/auth → frontend/pages/[dashboard]}/signup.astro +2 -2
  419. package/src/frontend/pages/[dashboard]/smtp-configuration.astro +753 -0
  420. package/{dist/routes/dashboard → src/frontend/pages/[dashboard]}/user-management/edit.astro +50 -42
  421. package/src/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/_effects/index.ts +1 -1
  422. package/src/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/callback.ts +1 -1
  423. package/src/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/index.ts +1 -1
  424. package/src/{routes/api → frontend/pages/studiocms_api}/auth/forgot-password.ts +10 -4
  425. package/src/{routes/api → frontend/pages/studiocms_api}/auth/login.ts +1 -1
  426. package/src/{routes/api → frontend/pages/studiocms_api}/auth/logout.ts +4 -10
  427. package/src/{routes/api → frontend/pages/studiocms_api}/auth/register.ts +1 -1
  428. package/src/{routes/api → frontend/pages/studiocms_api}/auth/shared.ts +1 -1
  429. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/api-tokens.ts +1 -1
  430. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/config.ts +2 -2
  431. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/content/diff.ts +1 -1
  432. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/content/folder.ts +1 -1
  433. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/content/page.ts +40 -60
  434. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/create-reset-link.ts +1 -1
  435. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/create-user-invite.ts +10 -4
  436. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/create-user.ts +2 -2
  437. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/email-notification-settings-site.ts +2 -2
  438. package/src/{routes/api/mailer/test-email.ts → frontend/pages/studiocms_api/dashboard/mailer/check-email.ts} +1 -1
  439. package/src/{routes/api → frontend/pages/studiocms_api/dashboard}/mailer/config.ts +1 -1
  440. package/{dist/routes/api → src/frontend/pages/studiocms_api}/dashboard/partials/Editor.astro +1 -5
  441. package/{dist/routes/api → src/frontend/pages/studiocms_api}/dashboard/partials/LiveRender.astro +2 -2
  442. package/{dist/routes/api → src/frontend/pages/studiocms_api}/dashboard/partials/UserListItems.astro +2 -1
  443. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/plugins/[plugin].ts +1 -1
  444. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/profile.ts +1 -1
  445. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/resend-verify-email.ts +1 -1
  446. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/reset-password.ts +1 -1
  447. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/search-list.ts +1 -1
  448. package/src/frontend/pages/studiocms_api/dashboard/templates.ts +74 -0
  449. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/update-user-notifications.ts +1 -1
  450. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/users.ts +2 -2
  451. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/verify-email.ts +1 -1
  452. package/src/{routes/api → frontend/pages/studiocms_api}/dashboard/verify-session.ts +3 -3
  453. package/{dist/routes/api → src/frontend/pages/studiocms_api/renderer}/render.astro +2 -2
  454. package/src/{routes/api → frontend/pages/studiocms_api}/rest/utils/auth-token.ts +1 -1
  455. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/folders/[id].ts +1 -1
  456. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/folders/index.ts +1 -1
  457. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/history/[diffid].ts +1 -1
  458. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/history/index.ts +1 -1
  459. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/index.ts +1 -1
  460. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/index.ts +1 -1
  461. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/folders/[id].ts +1 -1
  462. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/folders/index.ts +1 -1
  463. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/pages/[id].ts +1 -1
  464. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/pages/index.ts +1 -1
  465. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/settings/index.ts +1 -1
  466. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/users/[id].ts +1 -1
  467. package/src/{routes/api → frontend/pages/studiocms_api}/rest/v1/users/index.ts +1 -1
  468. package/src/{routes/api → frontend/pages/studiocms_api}/sdk/fallback-list-pages.json.ts +1 -1
  469. package/src/{routes/api → frontend/pages/studiocms_api}/sdk/full-changelog.json.ts +1 -1
  470. package/src/{routes/api → frontend/pages/studiocms_api}/sdk/list-pages.ts +1 -1
  471. package/src/{routes/api → frontend/pages/studiocms_api}/sdk/update-latest-version-cache.ts +1 -1
  472. package/src/{routes/api → frontend/pages/studiocms_api}/sdk/utils/changelog.ts +7 -1
  473. package/src/frontend/routes.ts +481 -0
  474. package/src/{components/auth/component-scripts → frontend/scripts/auth}/formListener.ts +14 -3
  475. package/src/frontend/scripts/dateTimeListener.ts +28 -0
  476. package/src/frontend/scripts/dateWithTimeAndZone.ts +45 -0
  477. package/src/frontend/scripts/formdata-utils.ts +116 -0
  478. package/src/frontend/scripts/timeAgo.ts +66 -0
  479. package/{dist/routes/firstTimeSetupRoutes → src/frontend/setup-pages}/1-start.astro +3 -3
  480. package/{dist/routes/firstTimeSetupRoutes → src/frontend/setup-pages}/2-next.astro +6 -5
  481. package/src/{routes/firstTimeSetupRoutes → frontend/setup-pages}/3-done.astro +6 -6
  482. package/src/{routes/firstTimeSetupRoutes/api → frontend/setup-pages/studiocms_api/dashboard}/step-1.ts +1 -1
  483. package/src/{routes/firstTimeSetupRoutes/api → frontend/setup-pages/studiocms_api/dashboard}/step-2.ts +2 -2
  484. package/src/{styles → frontend/styles}/auth-layout.css +1 -2
  485. package/src/{styles → frontend/styles}/code-component.css +1 -1
  486. package/src/{styles → frontend/styles}/dashboard-base.css +4 -14
  487. package/src/{styles → frontend/styles}/dashboard-diff.css +1 -1
  488. package/src/frontend/types.ts +50 -0
  489. package/src/frontend/utils.ts +166 -0
  490. package/{dist/components/default-grid-items → src/handlers/plugin-components}/Recently-created-pages.astro +9 -4
  491. package/{dist/components/default-grid-items → src/handlers/plugin-components}/Recently-signed-up.astro +8 -7
  492. package/src/{components/default-grid-items → handlers/plugin-components}/Recently-updated-pages.astro +9 -4
  493. package/src/{components/default-grid-items → handlers/plugin-components}/Totals.astro +8 -3
  494. package/src/handlers/plugin-i18n/de.ts +22 -0
  495. package/src/handlers/plugin-i18n/en.ts +23 -0
  496. package/src/handlers/plugin-i18n/es.ts +22 -0
  497. package/src/handlers/plugin-i18n/fr.ts +22 -0
  498. package/src/handlers/plugin-i18n/nl.ts +22 -0
  499. package/src/handlers/plugin-i18n/no.ts +22 -0
  500. package/src/handlers/plugin-i18n/zh.ts +22 -0
  501. package/src/handlers/pluginHandler.ts +252 -109
  502. package/src/handlers/routeHandler.ts +39 -488
  503. package/src/index.ts +28 -11
  504. package/src/integrations/dynamic-sitemap/index.ts +3 -1
  505. package/src/integrations/dynamic-sitemap/sitemap-index.xml.ts +1 -1
  506. package/src/integrations/node-namespace.ts +14 -10
  507. package/src/integrations/plugins.ts +2 -0
  508. package/src/integrations/robots/core.ts +9 -7
  509. package/src/integrations/robots/index.ts +2 -0
  510. package/src/integrations/webVitals/checkForWebVitalsPlugin.ts +19 -8
  511. package/src/integrations/webVitals/consts.ts +8 -0
  512. package/src/integrations/webVitals/i18n/de.ts +24 -0
  513. package/src/integrations/webVitals/i18n/en.ts +25 -0
  514. package/src/integrations/webVitals/i18n/es.ts +24 -0
  515. package/src/integrations/webVitals/i18n/fr.ts +24 -0
  516. package/src/integrations/webVitals/i18n/nl.ts +24 -0
  517. package/src/integrations/webVitals/i18n/no.ts +24 -0
  518. package/src/integrations/webVitals/i18n/zh.ts +24 -0
  519. package/src/integrations/webVitals/utils/buildPageRouteDataObject.ts +2 -0
  520. package/src/integrations/webVitals/utils/buildPerPageDataObject.ts +4 -0
  521. package/src/integrations/webVitals/utils/webVitalsUtils.ts +8 -2
  522. package/src/integrations/webVitals/webVital.ts +9 -0
  523. package/src/integrations/webVitals/webVitalsRouteSummary.ts +3 -4
  524. package/src/plugins.ts +41 -9
  525. package/src/schemas/config/auth.ts +1 -1
  526. package/src/schemas/config/sdk.ts +8 -6
  527. package/src/schemas/index.ts +2 -0
  528. package/src/schemas/plugins/i18n.ts +67 -0
  529. package/src/schemas/plugins/index.ts +123 -0
  530. package/src/schemas/plugins/shared.ts +34 -11
  531. package/src/test-utils.ts +231 -0
  532. package/src/types.ts +97 -1
  533. package/src/utils/effects/index.ts +1 -1
  534. package/src/utils/effects/logger.ts +7 -36
  535. package/src/utils/effects/smtp.ts +6 -0
  536. package/src/utils/lang-helper.ts +78 -0
  537. package/src/utils/safeString.ts +4 -0
  538. package/src/virtual.d.ts +51 -4
  539. package/src/virtuals/auth/getLabelForPermissionLevel.ts +3 -0
  540. package/src/virtuals/auth/verify-email.ts +9 -3
  541. package/src/virtuals/components/CustomImage.astro +4 -0
  542. package/src/virtuals/components/FormattedDate.astro +3 -2
  543. package/src/virtuals/components/Renderer.astro +38 -8
  544. package/src/virtuals/components/renderFn.ts +101 -0
  545. package/src/virtuals/i18n/LanguageSelector.astro +53 -102
  546. package/src/virtuals/i18n/client.ts +31 -0
  547. package/src/virtuals/i18n/config.ts +31 -24
  548. package/src/virtuals/i18n/overrides.ts +10 -0
  549. package/src/virtuals/i18n/plugin.ts +105 -0
  550. package/src/virtuals/i18n/server.ts +24 -10
  551. package/src/virtuals/i18n/translations/de.json +83 -5
  552. package/src/virtuals/i18n/translations/en.json +83 -5
  553. package/src/virtuals/i18n/translations/es.json +83 -5
  554. package/src/virtuals/i18n/translations/fr.json +83 -5
  555. package/src/virtuals/i18n/translations/hi.json +4 -1
  556. package/src/virtuals/i18n/translations/nl.json +374 -0
  557. package/src/virtuals/i18n/translations/no.json +374 -0
  558. package/src/virtuals/i18n/translations/zh.json +83 -5
  559. package/src/virtuals/i18n/v-files.ts +32 -1
  560. package/src/virtuals/lib/head.ts +3 -0
  561. package/src/virtuals/lib/routeMap.ts +2 -0
  562. package/src/virtuals/lib/urlGen.ts +3 -0
  563. package/src/virtuals/mailer/template.ts +2 -1
  564. package/src/virtuals/mailer/templates/password-reset.ts +2 -4
  565. package/src/virtuals/mailer/templates/verify-email.ts +1 -2
  566. package/src/virtuals/notifier/client.ts +1 -1
  567. package/src/virtuals/notifier/index.ts +16 -6
  568. package/src/virtuals/scripts/template-editor.ts +393 -0
  569. package/src/virtuals/scripts/user-quick-tools.ts +95 -22
  570. package/src/virtuals/sdk/consts.ts +14 -0
  571. package/src/virtuals/sdk/effect/collectors.ts +7 -31
  572. package/src/virtuals/sdk/effect/db.ts +7 -249
  573. package/src/virtuals/sdk/effect/foldertree.ts +12 -17
  574. package/src/virtuals/sdk/effect/generators.ts +6 -0
  575. package/src/virtuals/sdk/effect/getVersionFromNPM.ts +3 -0
  576. package/src/virtuals/sdk/effect/lib/jwt-generator.ts +2 -2
  577. package/src/virtuals/sdk/effect/users.ts +2 -2
  578. package/src/virtuals/sdk/modules/auth.ts +17 -17
  579. package/src/virtuals/sdk/modules/config-types.ts +164 -0
  580. package/src/virtuals/sdk/modules/config.ts +66 -169
  581. package/src/virtuals/sdk/modules/delete.ts +9 -18
  582. package/src/virtuals/sdk/modules/diffTracking.ts +9 -9
  583. package/src/virtuals/sdk/modules/get.ts +16 -32
  584. package/src/virtuals/sdk/modules/init.ts +1 -1
  585. package/src/virtuals/sdk/modules/middlewares.ts +31 -7
  586. package/src/virtuals/sdk/modules/notificationSettings.ts +1 -1
  587. package/src/virtuals/sdk/modules/plugins.ts +8 -12
  588. package/src/virtuals/sdk/modules/post.ts +10 -15
  589. package/src/virtuals/sdk/modules/resetTokenBucket.ts +3 -3
  590. package/src/virtuals/sdk/modules/rest_api.ts +4 -8
  591. package/src/virtuals/sdk/modules/update.ts +10 -24
  592. package/src/virtuals/sdk/tables.ts +2 -0
  593. package/src/virtuals/sdk/types/index.ts +1 -1
  594. package/src/virtuals/template-engine/default-templates.ts +215 -0
  595. package/src/virtuals/template-engine/index.ts +95 -0
  596. package/ui.d.ts +13 -5
  597. package/dist/cli/users/steps/libsqlCreateUsers.d.ts +0 -2
  598. package/dist/cli/users/steps/libsqlCreateUsers.js +0 -163
  599. package/dist/cli/users/steps/libsqlModifyUsers.d.ts +0 -7
  600. package/dist/cli/users/steps/libsqlModifyUsers.js +0 -221
  601. package/dist/cli/utils/createUserAvatar.d.ts +0 -10
  602. package/dist/cli/utils/createUserAvatar.js +0 -11
  603. package/dist/components/dashboard/SidebarModals.astro +0 -13
  604. package/dist/components/dashboard/component-scripts/dateTimeListener.d.ts +0 -1
  605. package/dist/components/dashboard/component-scripts/dateWithTimeAndZone.d.ts +0 -2
  606. package/dist/components/dashboard/component-scripts/timeAgo.d.ts +0 -1
  607. package/dist/components/dashboard/content-mgmt/CreatePage.astro +0 -337
  608. package/dist/components/dashboard/content-mgmt/EditPage.astro +0 -383
  609. package/dist/components/dashboard/profile/oAuthButtonProviders.d.ts +0 -1
  610. package/dist/components/dashboard/profile/oAuthButtonProviders.js +0 -1
  611. package/dist/components/dashboard/shared.d.ts +0 -2
  612. package/dist/components/dashboard/sidebar/UserAccount.astro +0 -26
  613. package/dist/components/dashboard/sidebar/VersionCheck.astro +0 -131
  614. package/dist/components/shared/SSRUser.astro +0 -200
  615. package/dist/routes/api/auth/logout.d.ts +0 -6
  616. package/dist/routes/api/dashboard/content/page.d.ts +0 -2
  617. package/dist/routes/auth/logout.astro +0 -27
  618. package/dist/routes/dashboard/smtp-configuration.astro +0 -549
  619. package/src/cli/users/steps/libsqlCreateUsers.ts +0 -200
  620. package/src/cli/users/steps/libsqlModifyUsers.ts +0 -271
  621. package/src/cli/utils/createUserAvatar.ts +0 -23
  622. package/src/components/dashboard/SidebarModals.astro +0 -13
  623. package/src/components/dashboard/component-scripts/dateTimeListener.ts +0 -8
  624. package/src/components/dashboard/component-scripts/dateWithTimeAndZone.ts +0 -12
  625. package/src/components/dashboard/component-scripts/timeAgo.ts +0 -26
  626. package/src/components/dashboard/content-mgmt/CreatePage.astro +0 -337
  627. package/src/components/dashboard/content-mgmt/EditPage.astro +0 -383
  628. package/src/components/dashboard/profile/oAuthButtonProviders.ts +0 -1
  629. package/src/components/dashboard/shared.ts +0 -3
  630. package/src/components/dashboard/sidebar/UserAccount.astro +0 -26
  631. package/src/components/dashboard/sidebar/VersionCheck.astro +0 -131
  632. package/src/components/shared/SSRUser.astro +0 -200
  633. package/src/routes/auth/logout.astro +0 -27
  634. package/src/routes/dashboard/smtp-configuration.astro +0 -549
  635. /package/dist/{components → frontend/components}/auth/OAuthButton.astro +0 -0
  636. /package/dist/{components → frontend/components}/auth/StaticAuthCheck.astro +0 -0
  637. /package/dist/{components → frontend/components}/auth/StudioCMSLogoSVG.astro +0 -0
  638. /package/dist/{components → frontend/components}/dashboard/BaseHead.astro +0 -0
  639. /package/dist/{components → frontend/components}/dashboard/PageHeader.astro +0 -0
  640. /package/dist/{components → frontend/components}/dashboard/SidebarLink.astro +0 -0
  641. /package/dist/{components → frontend/components}/dashboard/SidebarPluginLink.astro +0 -0
  642. /package/dist/{components → frontend/components}/dashboard/StudioCMSLogo.astro +0 -0
  643. /package/dist/{components → frontend/components}/dashboard/UserName.astro +0 -0
  644. /package/dist/{components → frontend/components}/dashboard/content-mgmt/CreateFolder.astro +0 -0
  645. /package/dist/{components → frontend/components}/dashboard/content-mgmt/EditFolder.astro +0 -0
  646. /package/dist/{components → frontend/components}/dashboard/content-mgmt/PageEditorSwapper.astro +0 -0
  647. /package/dist/{components → frontend/components}/dashboard/content-mgmt/PageList.astro +0 -0
  648. /package/dist/{components → frontend/components}/dashboard/content-mgmt/PageTypeHandler.astro +0 -0
  649. /package/dist/{components → frontend/components}/dashboard/content-mgmt/PluginFields.astro +0 -0
  650. /package/dist/{components → frontend/components}/dashboard/content-mgmt/TreeRenderer.astro +0 -0
  651. /package/dist/{components → frontend/components}/dashboard/content-mgmt/TreeSidebarFolder.astro +0 -0
  652. /package/dist/{components → frontend/components}/dashboard/content-mgmt/TreeSidebarLink.astro +0 -0
  653. /package/dist/{components → frontend/components}/dashboard/content-mgmt/shared.d.ts +0 -0
  654. /package/dist/{components → frontend/components}/dashboard/plugins/SettingsRenderer.astro +0 -0
  655. /package/dist/{components → frontend/components}/dashboard/profile/APITokens.astro +0 -0
  656. /package/dist/{components → frontend/components}/dashboard/profile/BasicInfo.astro +0 -0
  657. /package/dist/{components → frontend/components}/dashboard/profile/UpdatePassword.astro +0 -0
  658. /package/dist/{components → frontend/components}/dashboard/sidebar/VersionCheckChangelog.astro +0 -0
  659. /package/dist/{components → frontend/components}/dashboard/sidebar-modals/UserManagementModals.astro +0 -0
  660. /package/dist/{components → frontend/components}/dashboard/sidebarConfig.d.ts +0 -0
  661. /package/dist/{components → frontend/components}/first-time-setup/PageHeader.astro +0 -0
  662. /package/dist/{components → frontend/components}/shared/ThemeManager.astro +0 -0
  663. /package/dist/{components → frontend/components}/shared/head/Global.astro +0 -0
  664. /package/dist/{components/auth → frontend/components/shared}/oAuthButtonProviders.js +0 -0
  665. /package/dist/{fonts/OnestFont.woff2 → frontend/fonts/woff2/onest-variable.woff2} +0 -0
  666. /package/dist/{fonts/SyntaxFont.woff2 → frontend/fonts/woff2/syntax.woff2} +0 -0
  667. /package/dist/{layouts → frontend/layouts}/FirstTimeSetupLayout.astro +0 -0
  668. /package/dist/{middleware → frontend/middleware}/index.d.ts +0 -0
  669. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/configuration.astro +0 -0
  670. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/content-management/createfolder.astro +0 -0
  671. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/content-management/createpage.astro +0 -0
  672. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/content-management/editfolder.astro +0 -0
  673. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/content-management/editpage.astro +0 -0
  674. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/content-management/index.astro +0 -0
  675. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/index.astro +0 -0
  676. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/password-reset.astro +0 -0
  677. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/plugins/[plugin].astro +0 -0
  678. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/unverified-email.astro +0 -0
  679. /package/dist/{routes/dashboard → frontend/pages/[dashboard]}/user-management/index.astro +0 -0
  680. /package/dist/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/callback.d.ts +0 -0
  681. /package/dist/{routes/api → frontend/pages/studiocms_api}/auth/[provider]/index.d.ts +0 -0
  682. /package/dist/{routes/api → frontend/pages/studiocms_api}/auth/forgot-password.d.ts +0 -0
  683. /package/dist/{routes/api → frontend/pages/studiocms_api}/auth/login.d.ts +0 -0
  684. /package/dist/{routes/api/auth/register.d.ts → frontend/pages/studiocms_api/auth/logout.d.ts} +0 -0
  685. /package/dist/{routes/api/dashboard/config.d.ts → frontend/pages/studiocms_api/auth/register.d.ts} +0 -0
  686. /package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/api-tokens.d.ts +0 -0
  687. /package/dist/{routes/api/dashboard/content/diff.d.ts → frontend/pages/studiocms_api/dashboard/config.d.ts} +0 -0
  688. /package/dist/{routes/api/dashboard/create-reset-link.d.ts → frontend/pages/studiocms_api/dashboard/content/diff.d.ts} +0 -0
  689. /package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/content/folder.d.ts +0 -0
  690. /package/dist/{routes/api/dashboard/create-user-invite.d.ts → frontend/pages/studiocms_api/dashboard/create-reset-link.d.ts} +0 -0
  691. /package/dist/{routes/api/dashboard/create-user.d.ts → frontend/pages/studiocms_api/dashboard/create-user-invite.d.ts} +0 -0
  692. /package/dist/{routes/api/dashboard/email-notification-settings-site.d.ts → frontend/pages/studiocms_api/dashboard/create-user.d.ts} +0 -0
  693. /package/dist/{routes/api/dashboard/plugins/[plugin].d.ts → frontend/pages/studiocms_api/dashboard/email-notification-settings-site.d.ts} +0 -0
  694. /package/dist/{routes/api/dashboard/profile.d.ts → frontend/pages/studiocms_api/dashboard/mailer/check-email.d.ts} +0 -0
  695. /package/dist/{routes/api/dashboard/resend-verify-email.d.ts → frontend/pages/studiocms_api/dashboard/plugins/[plugin].d.ts} +0 -0
  696. /package/dist/{routes/api/dashboard/reset-password.d.ts → frontend/pages/studiocms_api/dashboard/profile.d.ts} +0 -0
  697. /package/dist/{routes/api/dashboard/update-user-notifications.d.ts → frontend/pages/studiocms_api/dashboard/resend-verify-email.d.ts} +0 -0
  698. /package/dist/{routes/api/mailer/test-email.d.ts → frontend/pages/studiocms_api/dashboard/reset-password.d.ts} +0 -0
  699. /package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/search-list.d.ts +0 -0
  700. /package/dist/{routes/firstTimeSetupRoutes/api/step-2.d.ts → frontend/pages/studiocms_api/dashboard/templates.d.ts} +0 -0
  701. /package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/users.d.ts +0 -0
  702. /package/dist/{routes/api → frontend/pages/studiocms_api}/dashboard/verify-email.d.ts +0 -0
  703. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/history/[diffid].d.ts +0 -0
  704. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/history/index.d.ts +0 -0
  705. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/[id]/index.d.ts +0 -0
  706. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/pages/index.d.ts +0 -0
  707. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/folders/[id].d.ts +0 -0
  708. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/folders/index.d.ts +0 -0
  709. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/pages/[id].d.ts +0 -0
  710. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/public/pages/index.d.ts +0 -0
  711. /package/dist/{routes/api → frontend/pages/studiocms_api}/rest/v1/settings/index.d.ts +0 -0
  712. /package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/fallback-list-pages.json.d.ts +0 -0
  713. /package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/full-changelog.json.d.ts +0 -0
  714. /package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/list-pages.d.ts +0 -0
  715. /package/dist/{routes/api → frontend/pages/studiocms_api}/sdk/update-latest-version-cache.d.ts +0 -0
  716. /package/dist/{components/dashboard/component-scripts → frontend/scripts}/dateTimeListener.js +0 -0
  717. /package/dist/{components/dashboard/component-scripts → frontend/scripts}/dateWithTimeAndZone.js +0 -0
  718. /package/dist/{components/dashboard/component-scripts → frontend/scripts}/timeAgo.js +0 -0
  719. /package/dist/{routes/firstTimeSetupRoutes → frontend/setup-pages}/index.astro +0 -0
  720. /package/dist/{routes/firstTimeSetupRoutes/api → frontend/setup-pages/studiocms_api/dashboard}/step-1.d.ts +0 -0
  721. /package/dist/{styles → frontend/styles}/404.css +0 -0
  722. /package/dist/{components/dashboard/shared.js → frontend/types.js} +0 -0
  723. /package/dist/{components/default-grid-items → handlers/plugin-components}/utils.d.ts +0 -0
  724. /package/dist/{components/default-grid-items → handlers/plugin-components}/utils.js +0 -0
  725. /package/src/{components → frontend/components}/auth/OAuthButton.astro +0 -0
  726. /package/src/{components → frontend/components}/auth/StaticAuthCheck.astro +0 -0
  727. /package/src/{components → frontend/components}/auth/StudioCMSLogoSVG.astro +0 -0
  728. /package/src/{components → frontend/components}/dashboard/BaseHead.astro +0 -0
  729. /package/src/{components → frontend/components}/dashboard/PageHeader.astro +0 -0
  730. /package/src/{components → frontend/components}/dashboard/SidebarLink.astro +0 -0
  731. /package/src/{components → frontend/components}/dashboard/SidebarPluginLink.astro +0 -0
  732. /package/src/{components → frontend/components}/dashboard/StudioCMSLogo.astro +0 -0
  733. /package/src/{components → frontend/components}/dashboard/UserName.astro +0 -0
  734. /package/src/{components → frontend/components}/dashboard/content-mgmt/CreateFolder.astro +0 -0
  735. /package/src/{components → frontend/components}/dashboard/content-mgmt/EditFolder.astro +0 -0
  736. /package/src/{components → frontend/components}/dashboard/content-mgmt/PageEditorSwapper.astro +0 -0
  737. /package/src/{components → frontend/components}/dashboard/content-mgmt/PageList.astro +0 -0
  738. /package/src/{components → frontend/components}/dashboard/content-mgmt/PageTypeHandler.astro +0 -0
  739. /package/src/{components → frontend/components}/dashboard/content-mgmt/PluginFields.astro +0 -0
  740. /package/src/{components → frontend/components}/dashboard/content-mgmt/TreeRenderer.astro +0 -0
  741. /package/src/{components → frontend/components}/dashboard/content-mgmt/TreeSidebarFolder.astro +0 -0
  742. /package/src/{components → frontend/components}/dashboard/content-mgmt/TreeSidebarLink.astro +0 -0
  743. /package/src/{components → frontend/components}/dashboard/plugins/SettingsRenderer.astro +0 -0
  744. /package/src/{components → frontend/components}/dashboard/profile/APITokens.astro +0 -0
  745. /package/src/{components → frontend/components}/dashboard/profile/BasicInfo.astro +0 -0
  746. /package/src/{components → frontend/components}/dashboard/profile/UpdatePassword.astro +0 -0
  747. /package/src/{components → frontend/components}/dashboard/sidebar/VersionCheckChangelog.astro +0 -0
  748. /package/src/{components → frontend/components}/dashboard/sidebar-modals/UserManagementModals.astro +0 -0
  749. /package/src/{components → frontend/components}/first-time-setup/PageHeader.astro +0 -0
  750. /package/src/{components → frontend/components}/first-time-setup/snippets/opt1-astro.config.diff +0 -0
  751. /package/src/{components → frontend/components}/first-time-setup/snippets/opt2-astro.config.diff +0 -0
  752. /package/src/{components → frontend/components}/first-time-setup/snippets/opt2-studiocms.config.diff +0 -0
  753. /package/src/{components → frontend/components}/shared/ThemeManager.astro +0 -0
  754. /package/src/{components → frontend/components}/shared/head/Global.astro +0 -0
  755. /package/src/{fonts/OnestFont.woff2 → frontend/fonts/woff2/onest-variable.woff2} +0 -0
  756. /package/src/{fonts/SyntaxFont.woff2 → frontend/fonts/woff2/syntax.woff2} +0 -0
  757. /package/src/{layouts → frontend/layouts}/FirstTimeSetupLayout.astro +0 -0
  758. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/configuration.astro +0 -0
  759. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/content-management/createfolder.astro +0 -0
  760. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/content-management/createpage.astro +0 -0
  761. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/content-management/editfolder.astro +0 -0
  762. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/content-management/editpage.astro +0 -0
  763. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/content-management/index.astro +0 -0
  764. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/index.astro +0 -0
  765. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/password-reset.astro +0 -0
  766. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/plugins/[plugin].astro +0 -0
  767. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/unverified-email.astro +0 -0
  768. /package/src/{routes/dashboard → frontend/pages/[dashboard]}/user-management/index.astro +0 -0
  769. /package/src/{routes/firstTimeSetupRoutes → frontend/setup-pages}/index.astro +0 -0
  770. /package/src/{styles → frontend/styles}/404.css +0 -0
  771. /package/src/{components/default-grid-items → handlers/plugin-components}/utils.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,115 @@
1
1
  # studiocms
2
2
 
3
+ ## 0.1.0-beta.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [#920](https://github.com/withstudiocms/studiocms/pull/920) [`5550673`](https://github.com/withstudiocms/studiocms/commit/55506739e3f96b690ad7999dbc1f9261ac63e644) Thanks [@ad1tyayadav](https://github.com/ad1tyayadav)! - Deprecates and hides the "Hide Index Page" setting from dashboard. Users who previously relied on this setting should migrate to another method.
8
+
9
+ - [#917](https://github.com/withstudiocms/studiocms/pull/917) [`7ef34d7`](https://github.com/withstudiocms/studiocms/commit/7ef34d7e553bb966e86bfddb4d63c622aad2dc83) Thanks [@Ananya44444](https://github.com/Ananya44444)! - Replaces custom CSS search icon with Input component icon prop and removes unused CSS.
10
+
11
+ - [#875](https://github.com/withstudiocms/studiocms/pull/875) [`74f9bf8`](https://github.com/withstudiocms/studiocms/commit/74f9bf8cb039d09e9e4589772734eb3a3012178c) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Updates to `@studiocms/ui@1.0.0-beta.2`
12
+
13
+ - [#862](https://github.com/withstudiocms/studiocms/pull/862) [`dc8ca3a`](https://github.com/withstudiocms/studiocms/commit/dc8ca3abfb92944b78d342414e63c3dabe7e77e6) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.53
14
+
15
+ - [#887](https://github.com/withstudiocms/studiocms/pull/887) [`cd03b94`](https://github.com/withstudiocms/studiocms/commit/cd03b945e27a459881474443b762e2ec3f427884) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency dotenv to ^17.2.3
16
+
17
+ - [#928](https://github.com/withstudiocms/studiocms/pull/928) [`a33c6df`](https://github.com/withstudiocms/studiocms/commit/a33c6df2e595f6867e0bdc82554017e003a01aed) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
18
+
19
+ - [#957](https://github.com/withstudiocms/studiocms/pull/957) [`df658d7`](https://github.com/withstudiocms/studiocms/commit/df658d7a91230426ec59480dbefbeb2b8e7c550b) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
20
+
21
+ - [#905](https://github.com/withstudiocms/studiocms/pull/905) [`a53c830`](https://github.com/withstudiocms/studiocms/commit/a53c83017b02d589607874405b2c040474203716) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Introduces a new email template editor and preview feature
22
+
23
+ - [#950](https://github.com/withstudiocms/studiocms/pull/950) [`0954e8f`](https://github.com/withstudiocms/studiocms/commit/0954e8f60d539e7ab13c00b8e904851ccdc2d9e0) Thanks [@mvdve](https://github.com/mvdve)! - Fixes the form validation parsing of boolean select fields values by transforming the string values to boolean for content management pages.
24
+
25
+ - [#898](https://github.com/withstudiocms/studiocms/pull/898) [`c57463b`](https://github.com/withstudiocms/studiocms/commit/c57463bb5846a75fda0dfad8da3590145eb442a4) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Update `@studiocms/ui` to 1.0.0-beta.3 and cleanup now unneeded styles
26
+
27
+ - [#891](https://github.com/withstudiocms/studiocms/pull/891) [`437e45c`](https://github.com/withstudiocms/studiocms/commit/437e45c99e5e740b72a32836b6df48e7c461ef57) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Updates feedback button to point to GitHub (temporary measure until astro-feedback integration)
28
+
29
+ - [#909](https://github.com/withstudiocms/studiocms/pull/909) [`74b0b36`](https://github.com/withstudiocms/studiocms/commit/74b0b365090433a0c4185d4d32c9e91f5af50087) Thanks [@apollo-git-bot](https://github.com/apps/apollo-git-bot)! - Translation Updated (PR: #909)
30
+
31
+ - [#892](https://github.com/withstudiocms/studiocms/pull/892) [`07501ff`](https://github.com/withstudiocms/studiocms/commit/07501fff35c6777f7d08b9857eff3d827ed12e8b) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fixes missing translation
32
+
33
+ - [#946](https://github.com/withstudiocms/studiocms/pull/946) [`1717b71`](https://github.com/withstudiocms/studiocms/commit/1717b7194e3dd42b75fc51952860a3bd3e2f5f3f) Thanks [@mvdve](https://github.com/mvdve)! - Fixes zod error parsing for first-time setup api route responses.
34
+
35
+ - [#876](https://github.com/withstudiocms/studiocms/pull/876) [`9a5a360`](https://github.com/withstudiocms/studiocms/commit/9a5a360e68183693465d29ea5b6ca701ac54cc69) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Enables i18n support for StudioCMS dashboard.
36
+
37
+ - [#871](https://github.com/withstudiocms/studiocms/pull/871) [`872ba2e`](https://github.com/withstudiocms/studiocms/commit/872ba2e286248a79fa46df1c3f5ca354e36e0494) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Updates quick user tools, Logout page, and buttons to utilize POST requests.
38
+
39
+ - [#889](https://github.com/withstudiocms/studiocms/pull/889) [`e63f679`](https://github.com/withstudiocms/studiocms/commit/e63f679a89ddd50a363d5bbe1b9b0ea403b1292b) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Implements a better API route type `PluginAPIRoute` from the `studiocms/plugins` export for plugin onCreate, onEdit, and onDelete API handlers.
40
+
41
+ - [#882](https://github.com/withstudiocms/studiocms/pull/882) [`3b96046`](https://github.com/withstudiocms/studiocms/commit/3b96046aa0fe1eaeb9e472be6ceae1e24dfb78bc) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Optimizes middleware cache
42
+
43
+ - [#940](https://github.com/withstudiocms/studiocms/pull/940) [`f0ea2fb`](https://github.com/withstudiocms/studiocms/commit/f0ea2fb22f8f137190ad24cf6a9bdf219fb1285e) Thanks [@apollo-git-bot](https://github.com/apps/apollo-git-bot)! - Translation Updated (PR: #940)
44
+
45
+ - [#936](https://github.com/withstudiocms/studiocms/pull/936) [`a552fc6`](https://github.com/withstudiocms/studiocms/commit/a552fc658d7739bda594fb063075ae85c456709d) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Implements new rendering system, allowing plugins to augment the rendering pipeline with prefix, suffix, or simple component augmentation.
46
+
47
+ - [#866](https://github.com/withstudiocms/studiocms/pull/866) [`64b1515`](https://github.com/withstudiocms/studiocms/commit/64b15158ecc93177fac222f9cabe38b5387d5df5) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Deprecates the legacy StudioCMSSiteConfig, StudioCMSMailerConfig, and StudioCMSNotificationSettings tables to be fully removed in a future release.
48
+
49
+ Note: Users will need to run `astro db push --remote` to ensure their DB schemas are up-to-date.
50
+
51
+ - [#902](https://github.com/withstudiocms/studiocms/pull/902) [`a64cf64`](https://github.com/withstudiocms/studiocms/commit/a64cf64975778d7f0f127aa8bd9f56f777aaed91) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Reorganizes create and edit content pages, as well as SMTP config page.
52
+
53
+ - [#953](https://github.com/withstudiocms/studiocms/pull/953) [`000ea26`](https://github.com/withstudiocms/studiocms/commit/000ea26f1f9e302df6701d354a32f5b8b1c6c9d0) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Refactors internal file structure of Astro frontend pages and api endpoints to simplify long-term maintenance
54
+
55
+ - [#929](https://github.com/withstudiocms/studiocms/pull/929) [`8840b69`](https://github.com/withstudiocms/studiocms/commit/8840b69300cf5aab9e47c4bd65f5fec67a346f3d) Thanks [@apollo-git-bot](https://github.com/apps/apollo-git-bot)! - Translation Updated (PR: #929)
56
+
57
+ - [#868](https://github.com/withstudiocms/studiocms/pull/868) [`503a25a`](https://github.com/withstudiocms/studiocms/commit/503a25a5da1c07afeb3d965b73ea5bb99a673ba4) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Improve page creation and edit data processing
58
+
59
+ - [#961](https://github.com/withstudiocms/studiocms/pull/961) [`a57c724`](https://github.com/withstudiocms/studiocms/commit/a57c724fac0553fd6eb88c6a1bf850450520c369) Thanks [@apollo-git-bot](https://github.com/apps/apollo-git-bot)! - Translation Updated (PR: #961)
60
+
61
+ - [#962](https://github.com/withstudiocms/studiocms/pull/962) [`6516cfa`](https://github.com/withstudiocms/studiocms/commit/6516cfa01ea0d5b35442e8cd455a86cc4b4ce260) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - cleans up internal code
62
+
63
+ - [#938](https://github.com/withstudiocms/studiocms/pull/938) [`9dce1e7`](https://github.com/withstudiocms/studiocms/commit/9dce1e7aa656cfd0e51587afe74e2009726759f4) Thanks [@ad1tyayadav](https://github.com/ad1tyayadav)! - Move avatar loading to client-side to eliminate render blocking
64
+
65
+ - [#874](https://github.com/withstudiocms/studiocms/pull/874) [`0326476`](https://github.com/withstudiocms/studiocms/commit/03264767111f8b4dbdef18eafe25fa2f28c3ceb5) Thanks [@apollo-git-bot](https://github.com/apps/apollo-git-bot)! - Translation Updated (PR: #874)
66
+
67
+ - Updated dependencies [[`d3123fe`](https://github.com/withstudiocms/studiocms/commit/d3123febbb0acdfb8d79629e9c2b101dff8a2bc7), [`1d26adb`](https://github.com/withstudiocms/studiocms/commit/1d26adbce761f8856d4282d7d1b81d9570df32ac), [`58e8d06`](https://github.com/withstudiocms/studiocms/commit/58e8d0629ce039be239f17ef616256f53570901f), [`0407845`](https://github.com/withstudiocms/studiocms/commit/04078451befeda774e9b14a148464e895a269ca6), [`0f924e7`](https://github.com/withstudiocms/studiocms/commit/0f924e7a27f0e7480afe4f58061451499a5f6913), [`1306785`](https://github.com/withstudiocms/studiocms/commit/130678577bcd6a05403c208ca4f46f06e48b9ca4)]:
68
+ - @withstudiocms/effect@0.1.0-beta.4
69
+ - @withstudiocms/component-registry@0.1.0-beta.4
70
+ - @withstudiocms/template-lang@0.1.0-beta.1
71
+ - @withstudiocms/internal_helpers@0.1.0-beta.3
72
+ - @withstudiocms/auth-kit@0.1.0-beta.3
73
+
74
+ ## 0.1.0-beta.27
75
+
76
+ ### Patch Changes
77
+
78
+ - [#807](https://github.com/withstudiocms/studiocms/pull/807) [`6833a1d`](https://github.com/withstudiocms/studiocms/commit/6833a1dd46b34914c087dc57cffc28950d038911) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Enable the "Draft" toggle on the Edit Page for all pages (including the `index` page) so the `draft` field is submitted with the form. Previously the disabled control omitted this field from the payload, preventing changes to draft status.
79
+
80
+ - [#852](https://github.com/withstudiocms/studiocms/pull/852) [`ce2f95c`](https://github.com/withstudiocms/studiocms/commit/ce2f95c4c78778cdb0ce867012de05c8f1e3dc67) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - fix: Ensure slug is not an empty string, or an invalid slug.
81
+
82
+ - [#804](https://github.com/withstudiocms/studiocms/pull/804) [`82cd1bf`](https://github.com/withstudiocms/studiocms/commit/82cd1bfd1a442015c266df733988f29fdaafaaf4) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.51
83
+
84
+ - [#810](https://github.com/withstudiocms/studiocms/pull/810) [`3d4c4ea`](https://github.com/withstudiocms/studiocms/commit/3d4c4eae4b425db1f0dde5712177faa68d3c9712) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.52
85
+
86
+ - [#841](https://github.com/withstudiocms/studiocms/pull/841) [`c661a9f`](https://github.com/withstudiocms/studiocms/commit/c661a9f7f4deb1f1ec695bbb8702c5d570dc4c20) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency dompurify to ^3.2.7
87
+
88
+ - [#813](https://github.com/withstudiocms/studiocms/pull/813) [`e1f531f`](https://github.com/withstudiocms/studiocms/commit/e1f531f7bd3705a988fe67205ce6bd2665d7d33d) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Create new test export for helping aid in CI testing
89
+
90
+ - [#772](https://github.com/withstudiocms/studiocms/pull/772) [`ecc664c`](https://github.com/withstudiocms/studiocms/commit/ecc664cbb560f03db2078dc8d23135f9e966a7d4) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Deduplicate CLI utilities and unify avatar URL generation (Libravatar)
91
+
92
+ - [#809](https://github.com/withstudiocms/studiocms/pull/809) [`15854f2`](https://github.com/withstudiocms/studiocms/commit/15854f2bf620d3ea83da5af6a1651b31e9c433f6) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Integrate new effect helper for drizzle libsql db client
93
+
94
+ - [#774](https://github.com/withstudiocms/studiocms/pull/774) [`3b59fcf`](https://github.com/withstudiocms/studiocms/commit/3b59fcf7885d5c4952bd30279fa8ea2e2f0f5eaa) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Refactor CLI to utilize new Effect-ful clack module from `@withstudiocms/effect`
95
+
96
+ - [#770](https://github.com/withstudiocms/studiocms/pull/770) [`67d8973`](https://github.com/withstudiocms/studiocms/commit/67d8973cd703f6d3a5c50e31d3f051ef8f938548) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Migrate CLI to new authkit package
97
+
98
+ - [#781](https://github.com/withstudiocms/studiocms/pull/781) [`1848b0c`](https://github.com/withstudiocms/studiocms/commit/1848b0ce4d8bbb908a3207079fbbeeda446e3cb7) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Cleans CLI to utilize fully Effect-TS based code instead of raw JS/TS, allowing better error handling and code maintainability.
99
+
100
+ - [#823](https://github.com/withstudiocms/studiocms/pull/823) [`6c65ddb`](https://github.com/withstudiocms/studiocms/commit/6c65ddb94a15997801ebee43ac90d3f380248a86) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Setup initial testing for StudioCMS
101
+
102
+ - [#785](https://github.com/withstudiocms/studiocms/pull/785) [`c86f4f4`](https://github.com/withstudiocms/studiocms/commit/c86f4f4ab0873c29246582a8dbcab645057d146c) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - rename internal file to avoid confusion with tests during dev
103
+
104
+ - [#789](https://github.com/withstudiocms/studiocms/pull/789) [`5713f15`](https://github.com/withstudiocms/studiocms/commit/5713f154eb15aad8d2c2c8a5a5c13611ff03dee8) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Correct parameter in CLI add command.
105
+
106
+ - Updated dependencies [[`71d8948`](https://github.com/withstudiocms/studiocms/commit/71d894899a417e3a249c5f47e527223ade38b4fc), [`9d3784c`](https://github.com/withstudiocms/studiocms/commit/9d3784c1de98a4bc7bb913742c3977e16c87cc1b), [`726e07a`](https://github.com/withstudiocms/studiocms/commit/726e07a458fff9e50d4c02b80e0312f52f05e730), [`bf15ff6`](https://github.com/withstudiocms/studiocms/commit/bf15ff65a5f4ba6c2e4cd616d3c45ba0da784a1a), [`627119b`](https://github.com/withstudiocms/studiocms/commit/627119bfde88e9c2ea74a29817d91fb6afbab33d), [`3b59fcf`](https://github.com/withstudiocms/studiocms/commit/3b59fcf7885d5c4952bd30279fa8ea2e2f0f5eaa), [`3d3612d`](https://github.com/withstudiocms/studiocms/commit/3d3612d510f4827acfb4de364d39e835a693818f), [`c2c2b73`](https://github.com/withstudiocms/studiocms/commit/c2c2b73a71009769e38ea4b30ae4010f6f0fdd14), [`67d8973`](https://github.com/withstudiocms/studiocms/commit/67d8973cd703f6d3a5c50e31d3f051ef8f938548), [`47a2fed`](https://github.com/withstudiocms/studiocms/commit/47a2fedd8ed1c751def929058772ea78532e8d7d), [`c478f2d`](https://github.com/withstudiocms/studiocms/commit/c478f2dba7fb5cc923e0dbf0367fa2a050fcdc2d), [`fbb9ad1`](https://github.com/withstudiocms/studiocms/commit/fbb9ad10555f26c8e6261cd71a7650ab4aeb64f9), [`faf2a70`](https://github.com/withstudiocms/studiocms/commit/faf2a70ae57d136a9ccbbdebad70897e42c14c64), [`55885eb`](https://github.com/withstudiocms/studiocms/commit/55885eba617d8ec790e68ed0985f8530628140d8), [`0e8e280`](https://github.com/withstudiocms/studiocms/commit/0e8e280c4a2a7552d3b78b370600019e49f5a459), [`9b85861`](https://github.com/withstudiocms/studiocms/commit/9b85861b20ca9eb2aa2c434b225ff85399bb04f0)]:
107
+ - @withstudiocms/auth-kit@0.1.0-beta.2
108
+ - @withstudiocms/component-registry@0.1.0-beta.3
109
+ - @withstudiocms/internal_helpers@0.1.0-beta.2
110
+ - @withstudiocms/config-utils@0.1.0-beta.4
111
+ - @withstudiocms/effect@0.1.0-beta.3
112
+
3
113
  ## 0.1.0-beta.26
4
114
 
5
115
  ### Patch Changes
package/README.md CHANGED
@@ -4,6 +4,8 @@ StudioCMS is a dedicated Astro native content management system (CMS) built on t
4
4
 
5
5
  > [!IMPORTANT]
6
6
  > This project is still in early development and it is not yet ready for production use. If you encounter any issues or have ideas for new features, please let us know by [opening an issue](https://github.com/withstudiocms/studiocms/issues/new/choose) on our GitHub repository.
7
+ >
8
+ > During our `0.1.0-beta.x` phase, breaking changes may ship in patch releases.
7
9
 
8
10
  ## Sponsor
9
11
 
@@ -21,6 +21,6 @@ export declare const createPrettyError: (err: Error) => Effect.Effect<Error, nev
21
21
  export declare const resolveConfigPath: (root: URL) => Effect.Effect<URL | undefined, import("effect/Cause").UnknownException, never>;
22
22
  export declare function appendForwardSlash(path: string): string;
23
23
  export declare const plugin: Cli.Args.Args<string[]>;
24
- export declare const addPlugin: Cli.Command.Command<"add", never, import("astro/errors").AstroError | import("effect/Cause").UnknownException | Effect.Effect<Error, never, never>, {
24
+ export declare const addPlugin: Cli.Command.Command<"add", never, Error | Effect.Effect<Error, never, never>, {
25
25
  readonly plugin: string[];
26
26
  }>;
@@ -2,6 +2,7 @@ import { existsSync, promises as fs } from "node:fs";
2
2
  import { fileURLToPath } from "node:url";
3
3
  import { cancelled, success } from "@withstudiocms/cli-kit/messages";
4
4
  import { exists, pathToFileURL, resolveRoot } from "@withstudiocms/cli-kit/utils";
5
+ import { intro, note, outro } from "@withstudiocms/effect/clack";
5
6
  import { builders, loadFile } from "magicast";
6
7
  import { getDefaultExportOptions } from "magicast/helpers";
7
8
  import { Cli, Console, Effect, genLogger, Layer } from "../../effect.js";
@@ -129,12 +130,14 @@ const addPlugin = Cli.Command.make(
129
130
  plugin
130
131
  },
131
132
  ({ plugin: plugin2 }) => Effect.gen(function* () {
132
- const validator = yield* ValidatePlugins;
133
- const installer = yield* TryToInstallPlugins;
134
- const updater = yield* UpdateStudioCMSConfig;
135
- const context = yield* genContext;
136
- const { cwd, prompts, chalk } = context;
137
- prompts.intro("StudioCMS CLI Utilities (add)");
133
+ const [validator, installer, updater, context] = yield* Effect.all([
134
+ ValidatePlugins,
135
+ TryToInstallPlugins,
136
+ UpdateStudioCMSConfig,
137
+ genContext
138
+ ]);
139
+ const { cwd, chalk } = context;
140
+ yield* intro("StudioCMS CLI Utilities (add)");
138
141
  const pluginNames = plugin2.map((name) => {
139
142
  const aliasName = ALIASES.get(name);
140
143
  if (!aliasName) return name;
@@ -150,7 +153,7 @@ const addPlugin = Cli.Command.make(
150
153
  break;
151
154
  }
152
155
  case 2 /* cancelled */: {
153
- prompts.note(
156
+ yield* note(
154
157
  cancelled(
155
158
  `Dependencies ${chalk.bold("NOT")} installed.`,
156
159
  "Be sure to install them manually before continuing!"
@@ -164,7 +167,7 @@ const addPlugin = Cli.Command.make(
164
167
  case 0 /* none */:
165
168
  break;
166
169
  }
167
- const configURL = yield* resolveOrCreateConfig(new URL(rootPath));
170
+ const configURL = yield* resolveOrCreateConfig(root);
168
171
  yield* Console.debug(`found config at ${configURL}`);
169
172
  const mod = yield* loadConfigModule(configURL, validatedPlugins);
170
173
  let configResult;
@@ -179,7 +182,7 @@ const addPlugin = Cli.Command.make(
179
182
  }
180
183
  switch (configResult) {
181
184
  case 2 /* cancelled */: {
182
- prompts.outro(cancelled(`Your configuration has ${chalk.bold("NOT")} been updated.`));
185
+ yield* outro(cancelled(`Your configuration has ${chalk.bold("NOT")} been updated.`));
183
186
  break;
184
187
  }
185
188
  case 0 /* none */: {
@@ -193,11 +196,11 @@ const addPlugin = Cli.Command.make(
193
196
  (plugin3) => !deps.includes(plugin3.packageName)
194
197
  );
195
198
  if (missingDeps.length === 0) {
196
- prompts.outro("Configuration up-to-date.");
199
+ yield* outro("Configuration up-to-date.");
197
200
  break;
198
201
  }
199
202
  }
200
- prompts.outro("Configuration up-to-date.");
203
+ yield* outro("Configuration up-to-date.");
201
204
  break;
202
205
  }
203
206
  // NOTE: failure shouldn't happen in practice because `updateAstroConfig` doesn't return that.
@@ -206,7 +209,7 @@ const addPlugin = Cli.Command.make(
206
209
  case 1 /* updated */:
207
210
  case void 0: {
208
211
  const list = validatedPlugins.map((plugin3) => ` - ${plugin3.pluginName}`).join("\n");
209
- prompts.outro(
212
+ yield* outro(
210
213
  success(
211
214
  `Added the following plugin${validatedPlugins.length === 1 ? "" : "s"} to your project:
212
215
  ${list}`
@@ -3,7 +3,7 @@ import { CliContext } from '../utils/context.js';
3
3
  import { type PluginInfo, UpdateResult } from './index.js';
4
4
  declare const TryToInstallPlugins_base: Effect.Service.Class<TryToInstallPlugins, "TryToInstallPlugins", {
5
5
  readonly effect: Effect.Effect<{
6
- run: (plugins: PluginInfo[]) => Effect.Effect<UpdateResult, import("astro/errors").AstroError | import("effect/Cause").UnknownException, CliContext>;
6
+ run: (plugins: PluginInfo[]) => Effect.Effect<UpdateResult, Error, CliContext>;
7
7
  }, never, never>;
8
8
  }>;
9
9
  export declare class TryToInstallPlugins extends TryToInstallPlugins_base {
@@ -1,5 +1,5 @@
1
- import { askToContinue } from "@withstudiocms/cli-kit/messages";
2
1
  import { exec } from "@withstudiocms/cli-kit/utils";
2
+ import { askToContinue, note, spinner } from "@withstudiocms/effect/clack";
3
3
  import { detect, resolveCommand } from "package-manager-detector";
4
4
  import { Console, Effect, genLogger } from "../../effect.js";
5
5
  import { CliContext } from "../utils/context.js";
@@ -11,7 +11,7 @@ class TryToInstallPlugins extends Effect.Service()(
11
11
  {
12
12
  effect: genLogger("studiocms/cli/add/validatePlugins/TryToInstallPlugins.effect")(function* () {
13
13
  const run = (plugins) => genLogger("studiocms/cli/add/validatePlugins/TryToInstallPlugins.effect.run")(function* () {
14
- const { prompts, chalk, cwd } = yield* CliContext;
14
+ const { chalk, cwd } = yield* CliContext;
15
15
  const packageManager = yield* Effect.tryPromise(
16
16
  () => detect({
17
17
  cwd,
@@ -47,14 +47,14 @@ class TryToInstallPlugins extends Effect.Service()(
47
47
  const message = `
48
48
  ${boxenMessage}
49
49
  `;
50
- prompts.note(
50
+ yield* note(
51
51
  `${chalk.magenta("StudioCMS will run the following command:")}
52
52
  ${chalk.dim("If you skip this step, you can always run it yourself later")}
53
53
  ${message}`
54
54
  );
55
- if (yield* Effect.tryPromise(() => askToContinue(prompts))) {
56
- const spinner = prompts.spinner();
57
- spinner.start("Installing dependencies...");
55
+ if (yield* askToContinue()) {
56
+ const spin = yield* spinner();
57
+ yield* spin.start("Installing dependencies...");
58
58
  const response = yield* Effect.tryPromise({
59
59
  try: async () => {
60
60
  await exec(installCommand.command, [...installCommand.args, ...installSpecifiers], {
@@ -63,13 +63,16 @@ ${message}`
63
63
  env: { NODE_ENV: void 0 }
64
64
  }
65
65
  });
66
- spinner.stop("Dependencies installed.");
67
66
  return UpdateResult.updated;
68
67
  },
69
68
  catch: (err) => err
70
69
  }).pipe(Effect.catchAll((err) => Effect.succeed(err)));
70
+ if (response === UpdateResult.updated) {
71
+ yield* spin.stop("Dependencies installed!");
72
+ return response;
73
+ }
71
74
  if (response instanceof Error || response && typeof response === "object" && "message" in response) {
72
- spinner.stop("Error installing dependencies");
75
+ yield* spin.stop("Error installing dependencies");
73
76
  yield* Console.debug(`[add]: Error installing dependencies ${response}`);
74
77
  yield* Console.error(`
75
78
  ${response.stdout || response.message}
@@ -4,7 +4,7 @@ import { CliContext } from '../utils/context.js';
4
4
  import { UpdateResult } from './index.js';
5
5
  declare const UpdateStudioCMSConfig_base: Effect.Service.Class<UpdateStudioCMSConfig, "UpdateStudioCMSConfig", {
6
6
  readonly effect: Effect.Effect<{
7
- run: (configURL: URL, mod: ProxifiedModule<any>) => Effect.Effect<UpdateResult.none | UpdateResult.updated | UpdateResult.cancelled, import("astro/errors").AstroError | import("effect/Cause").UnknownException, CliContext>;
7
+ run: (configURL: URL, mod: ProxifiedModule<any>) => Effect.Effect<UpdateResult.none | UpdateResult.updated | UpdateResult.cancelled, Error, CliContext>;
8
8
  }, never, never>;
9
9
  }>;
10
10
  export declare class UpdateStudioCMSConfig extends UpdateStudioCMSConfig_base {
@@ -1,6 +1,6 @@
1
1
  import { promises as fs } from "node:fs";
2
2
  import { fileURLToPath } from "node:url";
3
- import { askToContinue } from "@withstudiocms/cli-kit/messages";
3
+ import { askToContinue, note } from "@withstudiocms/effect/clack";
4
4
  import { diffWords } from "diff";
5
5
  import { generateCode } from "magicast";
6
6
  import { Console, Effect, genLogger } from "../../effect.js";
@@ -15,7 +15,7 @@ class UpdateStudioCMSConfig extends Effect.Service()(
15
15
  const run = (configURL, mod) => genLogger("studiocms/cli/add/updateStudioCMSConfig/UpdateStudioCMSConfig.effect.run")(
16
16
  function* () {
17
17
  const context = yield* CliContext;
18
- const { prompts, chalk } = context;
18
+ const { chalk } = context;
19
19
  const input = yield* Effect.tryPromise(
20
20
  () => fs.readFile(fileURLToPath(configURL), { encoding: "utf-8" })
21
21
  );
@@ -44,12 +44,12 @@ class UpdateStudioCMSConfig extends Effect.Service()(
44
44
  const message = `
45
45
  ${boxenMessage}
46
46
  `;
47
- prompts.note(
47
+ yield* note(
48
48
  `
49
49
  ${chalk.magenta("StudioCMS will make the following changes to your config file:")}
50
50
  ${message}`
51
51
  );
52
- if (yield* Effect.tryPromise(() => askToContinue(prompts))) {
52
+ if (yield* askToContinue()) {
53
53
  yield* Effect.tryPromise(
54
54
  () => fs.writeFile(fileURLToPath(configURL), output, { encoding: "utf-8" })
55
55
  );
@@ -3,7 +3,7 @@ import { CliContext } from '../utils/context.js';
3
3
  import { type PluginInfo } from './index.js';
4
4
  declare const ValidatePlugins_base: Effect.Service.Class<ValidatePlugins, "ValidatePlugins", {
5
5
  readonly effect: Effect.Effect<{
6
- run: (names: string[]) => Effect.Effect<PluginInfo[], import("effect/Cause").UnknownException, CliContext>;
6
+ run: (names: string[]) => Effect.Effect<PluginInfo[], Error, CliContext>;
7
7
  }, never, never>;
8
8
  }>;
9
9
  export declare class ValidatePlugins extends ValidatePlugins_base {
@@ -1,4 +1,4 @@
1
- import { askToContinue } from "@withstudiocms/cli-kit/messages";
1
+ import { askToContinue, spinner } from "@withstudiocms/effect/clack";
2
2
  import { Effect, genLogger } from "../../effect.js";
3
3
  import { CliContext } from "../utils/context.js";
4
4
  import { StudioCMSScopes } from "./index.js";
@@ -6,9 +6,9 @@ import { fetchPackageJson, parsePluginName } from "./npm-utils.js";
6
6
  class ValidatePlugins extends Effect.Service()("ValidatePlugins", {
7
7
  effect: genLogger("studiocms/cli/add/validatePlugins/ValidatePlugins.effect")(function* () {
8
8
  const run = (names) => genLogger("studiocms/cli/add/validatePlugins/ValidatePlugins.effect.run")(function* () {
9
- const { prompts, chalk } = yield* CliContext;
10
- const spinner = yield* Effect.try(() => prompts.spinner());
11
- spinner.start("Resolving packages...");
9
+ const { chalk } = yield* CliContext;
10
+ const spin = yield* spinner();
11
+ yield* spin.start("Resolving packages...");
12
12
  const entries = [];
13
13
  for (const plugin of names) {
14
14
  const parsed = yield* parsePluginName(plugin);
@@ -23,17 +23,17 @@ class ValidatePlugins extends Effect.Service()("ValidatePlugins", {
23
23
  const firstPartyPkgCheck = yield* fetchPackageJson(scope, name, tag);
24
24
  if (firstPartyPkgCheck instanceof Error) {
25
25
  if (firstPartyPkgCheck.message) {
26
- spinner.message(chalk.yellow(firstPartyPkgCheck.message));
26
+ yield* spin.message(chalk.yellow(firstPartyPkgCheck.message));
27
27
  }
28
- spinner.message(
28
+ yield* spin.message(
29
29
  chalk.yellow(`${chalk.bold(plugin)} is not an official StudioCMS package.`)
30
30
  );
31
- if (!(yield* Effect.tryPromise(() => askToContinue(prompts)))) {
31
+ if (!(yield* askToContinue())) {
32
32
  throw new Error(
33
33
  `No problem! Find our official plugins at ${chalk.magenta("https://docs.studiocms.dev")}`
34
34
  );
35
35
  }
36
- spinner.start("Resolving with third party packages...");
36
+ yield* spin.start("Resolving with third party packages...");
37
37
  pkgType = "third-party";
38
38
  } else {
39
39
  pkgType = "first-party";
@@ -44,7 +44,7 @@ class ValidatePlugins extends Effect.Service()("ValidatePlugins", {
44
44
  const thirdPartyPkgCheck = yield* fetchPackageJson(scope, name, tag);
45
45
  if (thirdPartyPkgCheck instanceof Error) {
46
46
  if (thirdPartyPkgCheck.message) {
47
- spinner.message(chalk.yellow(thirdPartyPkgCheck.message));
47
+ yield* spin.message(chalk.yellow(thirdPartyPkgCheck.message));
48
48
  }
49
49
  throw new Error(`Unable to fetch ${chalk.bold(plugin)}. Does the package exist?`);
50
50
  }
@@ -77,7 +77,7 @@ class ValidatePlugins extends Effect.Service()("ValidatePlugins", {
77
77
  pluginName
78
78
  });
79
79
  }
80
- spinner.stop("Packages Resolved.");
80
+ yield* spin.stop("Packages Resolved.");
81
81
  return entries;
82
82
  });
83
83
  return { run };
@@ -5,6 +5,7 @@ import {
5
5
  StudioCMSColorwayInfoBg
6
6
  } from "@withstudiocms/cli-kit/colors";
7
7
  import { boxen, label } from "@withstudiocms/cli-kit/messages";
8
+ import { intro, log, outro, spinner } from "@withstudiocms/effect/clack";
8
9
  import { SignJWT } from "jose";
9
10
  import { importPKCS8 } from "jose/key/import";
10
11
  import { Cli, Effect, genLogger } from "../../../effect.js";
@@ -58,19 +59,19 @@ const genJWT = Cli.Command.make(
58
59
  }
59
60
  if (debug2) logger.debug("Getting context");
60
61
  const context = yield* genContext;
61
- const { prompts, chalk } = context;
62
+ const { chalk } = context;
62
63
  if (debug2) logger.debug("Init complete, starting...");
63
- prompts.intro(label("StudioCMS Crypto: Generate JWT", StudioCMSColorwayBg, chalk.bold));
64
- const spinner = prompts.spinner();
64
+ yield* intro(label("StudioCMS Crypto: Generate JWT", StudioCMSColorwayBg, chalk.bold));
65
+ const spin = yield* spinner();
65
66
  try {
66
- spinner.start("Getting Key from keyFile");
67
+ yield* spin.start("Getting Key from keyFile");
67
68
  if (debug2) logger.debug(`Key file path: ${keyFile2}`);
68
69
  if (debug2) logger.debug(`Key file exists: ${fs.existsSync(keyFile2)}`);
69
70
  if (debug2) logger.debug(`Key file is a file: ${fs.statSync(keyFile2).isFile()}`);
70
71
  const keyString = yield* Effect.try(() => fs.readFileSync(keyFile2, "utf8"));
71
72
  if (debug2) logger.debug(`Key string: ${keyString}`);
72
73
  if (!keyString) {
73
- spinner.stop("Key not found, or invalid");
74
+ yield* spin.stop("Key not found, or invalid");
74
75
  return yield* Effect.fail(new Error("Key not found, or invalid"));
75
76
  }
76
77
  const alg = "EdDSA";
@@ -78,7 +79,7 @@ const genJWT = Cli.Command.make(
78
79
  try {
79
80
  privateKey = yield* Effect.tryPromise(() => importPKCS8(keyString, alg));
80
81
  } catch (_e) {
81
- spinner.stop("Invalid or unsupported private key");
82
+ yield* spin.stop("Invalid or unsupported private key");
82
83
  return yield* Effect.fail(new Error("Invalid or unsupported private key"));
83
84
  }
84
85
  const NOW = /* @__PURE__ */ new Date();
@@ -87,28 +88,28 @@ const genJWT = Cli.Command.make(
87
88
  () => new SignJWT({ sub: "libsql-client" }).setProtectedHeader({ alg }).setIssuedAt(NOW).setExpirationTime(expirationDate).setIssuer("admin").sign(privateKey)
88
89
  );
89
90
  const base64UrlJwt = yield* convertJwtToBase64Url(jwt);
90
- spinner.stop("Token Generated.");
91
- prompts.log.success(
91
+ yield* spin.stop("Token Generated.");
92
+ yield* log.success(
92
93
  boxen(chalk.bold(`${label("Token Generated!", StudioCMSColorwayInfoBg, chalk.bold)}`), {
93
94
  ln1: "Your new Token has been generated successfully:",
94
95
  ln3: `Token: ${chalk.magenta(jwt)}`,
95
96
  ln5: `Base64Url Token: ${chalk.blue(base64UrlJwt)}`
96
97
  })
97
98
  );
98
- prompts.outro(
99
+ yield* outro(
99
100
  `${label("You can now use this token where needed.", StudioCMSColorwayBg, chalk.bold)} Stuck? Join us on Discord at ${StudioCMSColorway.bold.underline("https://chat.studiocms.dev")}`
100
101
  );
101
102
  } catch (err) {
102
103
  if (err instanceof Error) {
103
104
  if (err.message.includes("ENOENT")) {
104
- prompts.log.error("Key file not found: Please check the file path and try again.");
105
+ yield* log.error("Key file not found: Please check the file path and try again.");
105
106
  } else if (err.message.includes("permission")) {
106
- prompts.log.error("Permission denied: Cannot read the key file.");
107
+ yield* log.error("Permission denied: Cannot read the key file.");
107
108
  } else {
108
- prompts.log.error(`Error generating JWT: ${err.message}`);
109
+ yield* log.error(`Error generating JWT: ${err.message}`);
109
110
  }
110
111
  } else {
111
- prompts.log.error(`Unexpected error generating JWT: ${err}`);
112
+ yield* log.error(`Unexpected error generating JWT: ${err}`);
112
113
  }
113
114
  return yield* Effect.fail(new Error("JWT ERROR: Unknown"));
114
115
  }
@@ -1,15 +1,13 @@
1
1
  import { runInteractiveCommand } from "@withstudiocms/cli-kit/utils";
2
- import { Cli, Effect, genLogger } from "../../effect.js";
2
+ import { Cli, Effect } from "../../effect.js";
3
3
  const getTurso = Cli.Command.make(
4
4
  "get-turso",
5
5
  {},
6
- () => genLogger("studiocms/cli/getTurso")(function* () {
7
- yield* Effect.tryPromise({
8
- try: () => runInteractiveCommand("curl -sSfL https://get.tur.so/install.sh | bash").then(
9
- () => console.log("Turso CLI install command completed.")
10
- ),
11
- catch: (error) => console.error(`Failed to run Turso install: ${error.message}`)
12
- });
6
+ () => Effect.tryPromise({
7
+ try: () => runInteractiveCommand("curl -sSfL https://get.tur.so/install.sh | bash").then(
8
+ () => console.log("Turso CLI install command completed.")
9
+ ),
10
+ catch: (error) => console.error(`Failed to run Turso install: ${error.message}`)
13
11
  })
14
12
  ).pipe(Cli.Command.withDescription("Install the Turso CLI"));
15
13
  export {
package/dist/cli/index.js CHANGED
@@ -1,10 +1,12 @@
1
- import { readJson } from "@withstudiocms/cli-kit/utils";
1
+ import { readJson } from "@withstudiocms/internal_helpers/utils";
2
+ import dotenv from "dotenv";
2
3
  import { Cli, Effect, Layer, PlatformNode } from "../effect.js";
3
4
  import { addPlugin } from "./add/index.js";
4
5
  import { cryptoCMD } from "./crypto/index.js";
5
6
  import { getTurso } from "./getTurso/index.js";
6
7
  import { initCMD } from "./init/index.js";
7
8
  import { usersCMD } from "./users/index.js";
9
+ dotenv.config({ quiet: true });
8
10
  const pkgJson = readJson(new URL("../../package.json", import.meta.url));
9
11
  const command = Cli.Command.make("studiocms").pipe(
10
12
  Cli.Command.withDescription("StudioCMS CLI Utility Toolkit"),