studiocms 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/dist/cli/add/index.d.ts +2 -2
  3. package/dist/cli/add/npm-utils.d.ts +6 -6
  4. package/dist/cli/add/tryToInstallPlugins.d.ts +1 -1
  5. package/dist/cli/add/updateStudioCMSConfig.d.ts +1 -1
  6. package/dist/cli/add/validatePlugins.d.ts +1 -1
  7. package/dist/cli/crypto/genJWT/index.d.ts +1 -1
  8. package/dist/cli/crypto/index.d.ts +1 -1
  9. package/dist/cli/init/steps/env.js +12 -2
  10. package/dist/cli/init/steps/next.d.ts +1 -1
  11. package/dist/cli/migrator/index.d.ts +1 -1
  12. package/dist/cli/users/index.d.ts +1 -1
  13. package/dist/cli/users/steps/createUsers.js +3 -3
  14. package/dist/cli/users/steps/next.d.ts +1 -1
  15. package/dist/cli/utils/context.d.ts +1 -1
  16. package/dist/cli/utils/getCliDbClient.d.ts +1 -1
  17. package/dist/cli/utils/intro.d.ts +1 -1
  18. package/dist/cli/utils/loadConfig.d.ts +54 -49
  19. package/dist/cli/utils/loadConfig.js +5 -8
  20. package/dist/cli/utils/user-utils.d.ts +1 -1
  21. package/dist/client/apiClient.d.ts +4923 -0
  22. package/dist/client/apiClient.js +72 -0
  23. package/dist/config.d.ts +1734 -1
  24. package/dist/consts.d.ts +5 -5
  25. package/dist/consts.js +3 -2
  26. package/dist/db/plugins.d.ts +1 -1
  27. package/dist/db/plugins.js +5 -8
  28. package/dist/handlers/frontend/routes.d.ts +4 -18
  29. package/dist/handlers/frontend/routes.js +13 -152
  30. package/dist/handlers/frontend/types.d.ts +1 -1
  31. package/dist/handlers/frontend/utils.js +0 -18
  32. package/dist/handlers/pluginHandler.d.ts +34 -257
  33. package/dist/handlers/pluginHandler.js +92 -46
  34. package/dist/handlers/routeHandler.js +32 -11
  35. package/dist/handlers/setupDbStudio.d.ts +1 -1
  36. package/dist/handlers/storage-manager/core/effectify-astro-context.d.ts +25 -0
  37. package/dist/handlers/storage-manager/core/effectify-astro-context.js +78 -0
  38. package/dist/handlers/storage-manager/no-op.d.ts +2 -2
  39. package/dist/handlers/storage-manager/no-op.js +2 -3
  40. package/dist/index.d.ts +0 -1
  41. package/dist/index.js +9 -5
  42. package/dist/integrations/robots/index.d.ts +2 -2
  43. package/dist/integrations/robots/index.js +1 -3
  44. package/dist/integrations/robots/schema.d.ts +102 -273
  45. package/dist/integrations/robots/schema.js +220 -209
  46. package/dist/plugins/analytics/assets/schemas.d.ts +14 -9
  47. package/dist/plugins/analytics/assets/schemas.js +25 -17
  48. package/dist/plugins/analytics/db-client.d.ts +1 -1
  49. package/dist/plugins/analytics/index.d.ts +823 -3
  50. package/dist/plugins/analytics/index.js +4 -5
  51. package/dist/plugins/analytics/schemas.d.ts +54 -62
  52. package/dist/plugins/analytics/schemas.js +64 -13
  53. package/dist/plugins/analytics/table.d.ts +1 -1
  54. package/dist/plugins.d.ts +0 -1
  55. package/dist/schemas/config/api.d.ts +17 -0
  56. package/dist/schemas/config/api.js +14 -0
  57. package/dist/schemas/config/auth.d.ts +55 -59
  58. package/dist/schemas/config/auth.js +34 -11
  59. package/dist/schemas/config/dashboard.d.ts +43 -79
  60. package/dist/schemas/config/dashboard.js +43 -12
  61. package/dist/schemas/config/db.d.ts +15 -17
  62. package/dist/schemas/config/db.js +13 -5
  63. package/dist/schemas/config/developer.d.ts +33 -45
  64. package/dist/schemas/config/developer.js +22 -5
  65. package/dist/schemas/config/index.d.ts +398 -521
  66. package/dist/schemas/config/index.js +115 -57
  67. package/dist/schemas/config/sdk.d.ts +50 -196
  68. package/dist/schemas/config/sdk.js +61 -73
  69. package/dist/schemas/custom.d.ts +40 -0
  70. package/dist/schemas/custom.js +41 -0
  71. package/dist/schemas/external-schemas.d.ts +171 -0
  72. package/dist/schemas/external-schemas.js +179 -0
  73. package/dist/schemas/index.d.ts +2 -0
  74. package/dist/schemas/index.js +2 -0
  75. package/dist/schemas/plugins/i18n.d.ts +59 -39
  76. package/dist/schemas/plugins/i18n.js +42 -5
  77. package/dist/schemas/plugins/index.d.ts +7126 -10296
  78. package/dist/schemas/plugins/index.js +260 -276
  79. package/dist/schemas/plugins/shared.d.ts +1293 -3718
  80. package/dist/schemas/plugins/shared.js +320 -329
  81. package/dist/test-utils.d.ts +15 -4
  82. package/dist/test-utils.js +27 -11
  83. package/dist/toolbar/db-viewer/db-shared-types.d.ts +6 -6
  84. package/dist/toolbar/db-viewer/viewer.js +20 -21
  85. package/dist/types.d.ts +30 -0
  86. package/dist/utils/effects/smtp.d.ts +1 -1
  87. package/dist/utils/lang-helper.d.ts +10 -2
  88. package/dist/virtual.d.ts +23 -0
  89. package/dist/virtuals/auth/core.d.ts +5 -5
  90. package/dist/virtuals/auth/verify-email.d.ts +6 -6
  91. package/dist/virtuals/components/Generator.astro +2 -2
  92. package/dist/virtuals/components/Renderer.astro +9 -1
  93. package/dist/virtuals/components/renderFn.d.ts +3 -1
  94. package/dist/virtuals/components/renderFn.js +18 -0
  95. package/dist/virtuals/lib/headDefaults.d.ts +4 -2
  96. package/dist/virtuals/lib/headDefaults.js +0 -2
  97. package/dist/virtuals/lib/routeMap.d.ts +0 -12
  98. package/dist/virtuals/lib/routeMap.js +2 -14
  99. package/dist/virtuals/mailer/index.d.ts +3 -3
  100. package/dist/virtuals/notifier/index.d.ts +5 -5
  101. package/dist/virtuals/plugins/dashboard-pages.d.ts +2 -64
  102. package/dist/virtuals/scripts/StorageFileBrowser.d.ts +1 -172
  103. package/dist/virtuals/scripts/StorageFileBrowser.js +216 -119
  104. package/dist/virtuals/template-engine/index.d.ts +4 -4
  105. package/frontend/components/dashboard/configuration/ConfigForm.astro +218 -110
  106. package/frontend/components/dashboard/content-mgmt/ContentSearch.astro +21 -22
  107. package/frontend/components/dashboard/content-mgmt/CreateFolder.astro +66 -54
  108. package/frontend/components/dashboard/content-mgmt/CreatePage.astro +58 -104
  109. package/frontend/components/dashboard/content-mgmt/EditFolder.astro +65 -67
  110. package/frontend/components/dashboard/content-mgmt/EditPage.astro +86 -134
  111. package/frontend/components/dashboard/content-mgmt/InnerSidebarElement.astro +0 -1
  112. package/frontend/components/dashboard/content-mgmt/PageHeader.astro +33 -52
  113. package/frontend/components/dashboard/content-mgmt/PageTypeHandler.astro +2 -2
  114. package/frontend/components/dashboard/profile/APITokens.astro +219 -158
  115. package/frontend/components/dashboard/profile/BasicInfo.astro +165 -106
  116. package/frontend/components/dashboard/profile/Notifications.astro +27 -18
  117. package/frontend/components/dashboard/profile/UpdatePassword.astro +134 -94
  118. package/frontend/components/dashboard/sidebar/VersionCheck.astro +31 -16
  119. package/frontend/components/dashboard/sidebar/VersionCheckChangelog.astro +18 -11
  120. package/frontend/components/dashboard/sidebar-modals/VersionModal.astro +2 -2
  121. package/frontend/components/dashboard/smtp-config/TemplateEditor.astro +14 -14
  122. package/frontend/components/dashboard/taxonomy/InnerSidebarElement.astro +0 -1
  123. package/frontend/components/dashboard/taxonomy/MetaContainer.astro +0 -2
  124. package/frontend/components/dashboard/taxonomy/PageHeader.astro +16 -24
  125. package/frontend/components/dashboard/taxonomy/TaxonomySearch.astro +23 -27
  126. package/frontend/components/dashboard/user-mgmt/InnerSidebarElement.astro +111 -104
  127. package/frontend/components/dashboard/user-mgmt/UserListItem.astro +9 -22
  128. package/frontend/components/dashboard/user-mgmt/UserListItems.astro +18 -0
  129. package/frontend/components/first-time-setup/snippets/{opt2-studiocms.config.diff → studiocms.config.diff} +1 -0
  130. package/frontend/components/shared/Code.astro +1 -4
  131. package/frontend/components/shared/DynamicSettingsRenderer.astro +1 -1
  132. package/frontend/components/shared/SSRUser.astro +2 -4
  133. package/frontend/components/shared/foldertree/FolderTreeNode.astro +0 -6
  134. package/frontend/components/shared/storage-manager/StorageCopyOutput.astro +0 -1
  135. package/frontend/components/shared/taxonomy/TaxonomyTreeNode.astro +0 -6
  136. package/frontend/layouts/DashboardLayout.astro +0 -9
  137. package/frontend/layouts/TaxonomyLayout.astro +0 -1
  138. package/frontend/middleware/index.ts +102 -61
  139. package/frontend/pages/404.astro +0 -1
  140. package/frontend/pages/[dashboard]/[...pluginPage].astro +10 -1
  141. package/frontend/pages/[dashboard]/configuration.astro +10 -1
  142. package/frontend/pages/[dashboard]/content-management/createfolder.astro +10 -1
  143. package/frontend/pages/[dashboard]/content-management/createpage.astro +10 -1
  144. package/frontend/pages/[dashboard]/content-management/diff.astro +39 -14
  145. package/frontend/pages/[dashboard]/content-management/editfolder.astro +10 -1
  146. package/frontend/pages/[dashboard]/content-management/editpage.astro +10 -1
  147. package/frontend/pages/[dashboard]/content-management/index.astro +10 -1
  148. package/frontend/pages/[dashboard]/index.astro +10 -1
  149. package/frontend/pages/[dashboard]/login.astro +86 -25
  150. package/frontend/pages/[dashboard]/password-reset.astro +22 -16
  151. package/frontend/pages/[dashboard]/plugins/[plugin].astro +10 -1
  152. package/frontend/pages/[dashboard]/profile.astro +10 -1
  153. package/frontend/pages/[dashboard]/signup.astro +153 -52
  154. package/frontend/pages/[dashboard]/smtp-configuration.astro +77 -75
  155. package/frontend/pages/[dashboard]/system-management.astro +10 -1
  156. package/frontend/pages/[dashboard]/taxonomy/categories.astro +30 -41
  157. package/frontend/pages/[dashboard]/taxonomy/index.astro +10 -0
  158. package/frontend/pages/[dashboard]/taxonomy/tags.astro +33 -43
  159. package/frontend/pages/[dashboard]/unverified-email.astro +29 -21
  160. package/frontend/pages/[dashboard]/user-management/edit.astro +170 -90
  161. package/frontend/pages/[dashboard]/user-management/index.astro +10 -1
  162. package/frontend/pages/studiocms_api/[...all].ts +106 -0
  163. package/frontend/pages/studiocms_api/_handlers/_utils/auth.ts +26 -0
  164. package/frontend/pages/studiocms_api/_handlers/_utils/changelog.ts +147 -0
  165. package/frontend/pages/studiocms_api/_handlers/_utils/db-studio-driver.ts +46 -0
  166. package/frontend/pages/studiocms_api/_handlers/_utils/parseLogLevel.ts +27 -0
  167. package/frontend/pages/studiocms_api/_handlers/auth/auth.ts +459 -0
  168. package/frontend/pages/studiocms_api/_handlers/auth/index.ts +17 -0
  169. package/frontend/pages/studiocms_api/_handlers/auth/oauth.ts +91 -0
  170. package/frontend/pages/studiocms_api/_handlers/dashboard/_shared.ts +57 -0
  171. package/frontend/pages/studiocms_api/_handlers/dashboard/apiTokens.ts +134 -0
  172. package/frontend/pages/studiocms_api/_handlers/dashboard/config.ts +64 -0
  173. package/frontend/pages/studiocms_api/_handlers/dashboard/content.ts +741 -0
  174. package/frontend/pages/studiocms_api/_handlers/dashboard/create.ts +480 -0
  175. package/frontend/pages/studiocms_api/_handlers/dashboard/emailNotifications.ts +49 -0
  176. package/frontend/pages/studiocms_api/_handlers/dashboard/index.ts +45 -0
  177. package/frontend/pages/studiocms_api/_handlers/dashboard/mailer.ts +136 -0
  178. package/frontend/pages/studiocms_api/_handlers/dashboard/plugins.ts +80 -0
  179. package/frontend/pages/studiocms_api/_handlers/dashboard/profile.ts +275 -0
  180. package/frontend/pages/studiocms_api/_handlers/dashboard/resetPassword.ts +140 -0
  181. package/frontend/pages/studiocms_api/_handlers/dashboard/search.ts +63 -0
  182. package/frontend/pages/studiocms_api/_handlers/dashboard/taxonomy.ts +285 -0
  183. package/frontend/pages/studiocms_api/_handlers/dashboard/templates.ts +75 -0
  184. package/frontend/pages/studiocms_api/_handlers/dashboard/users.ts +312 -0
  185. package/frontend/pages/studiocms_api/_handlers/dashboard/verifyEndpoints.ts +307 -0
  186. package/frontend/pages/studiocms_api/_handlers/integration/dbStudio.ts +98 -0
  187. package/frontend/pages/studiocms_api/_handlers/integration/index.ts +17 -0
  188. package/frontend/pages/studiocms_api/_handlers/integration/storageManager.ts +107 -0
  189. package/frontend/pages/studiocms_api/_handlers/rest-api/index.ts +8 -0
  190. package/frontend/pages/studiocms_api/_handlers/rest-api/v1/_shared.ts +41 -0
  191. package/frontend/pages/studiocms_api/_handlers/rest-api/v1/index.ts +17 -0
  192. package/frontend/pages/studiocms_api/_handlers/rest-api/v1/public.ts +195 -0
  193. package/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts +1726 -0
  194. package/frontend/pages/studiocms_api/_handlers/sdk.ts +129 -0
  195. package/frontend/pages/studiocms_api/_middleware/astroLocals.ts +36 -0
  196. package/frontend/pages/studiocms_api/_middleware/restApi.ts +56 -0
  197. package/frontend/pages/studiocms_api/integrations/[...all].ts +8 -0
  198. package/frontend/scripts/formdata.ts +219 -0
  199. package/frontend/setup-pages/3-done.astro +4 -20
  200. package/frontend/setup-pages/studiocms_api/dashboard/step-2.ts +3 -6
  201. package/frontend/styles/dashboard-base.css +0 -1
  202. package/frontend/web-vitals/endpoint.ts +2 -1
  203. package/package.json +34 -29
  204. package/dist/global.d.ts +0 -9
  205. package/frontend/components/dashboard/LoginChecker.astro +0 -68
  206. package/frontend/components/dashboard/user-mgmt/RankCheck.astro +0 -57
  207. package/frontend/components/first-time-setup/snippets/opt1-astro.config.diff +0 -14
  208. package/frontend/components/first-time-setup/snippets/opt2-astro.config.diff +0 -9
  209. package/frontend/middleware/_authmap.ts +0 -63
  210. package/frontend/pages/studiocms_api/auth/[path].ts +0 -384
  211. package/frontend/pages/studiocms_api/auth/[provider]/[...id].ts +0 -64
  212. package/frontend/pages/studiocms_api/auth/[provider]/_effects/index.ts +0 -101
  213. package/frontend/pages/studiocms_api/auth/_shared.ts +0 -52
  214. package/frontend/pages/studiocms_api/dashboard/api-tokens.ts +0 -115
  215. package/frontend/pages/studiocms_api/dashboard/config.ts +0 -74
  216. package/frontend/pages/studiocms_api/dashboard/content/diff.ts +0 -73
  217. package/frontend/pages/studiocms_api/dashboard/content/folder.ts +0 -220
  218. package/frontend/pages/studiocms_api/dashboard/content/page.ts +0 -359
  219. package/frontend/pages/studiocms_api/dashboard/create-reset-link.ts +0 -77
  220. package/frontend/pages/studiocms_api/dashboard/create-user-invite.ts +0 -231
  221. package/frontend/pages/studiocms_api/dashboard/create-user.ts +0 -186
  222. package/frontend/pages/studiocms_api/dashboard/email-notification-settings-site.ts +0 -74
  223. package/frontend/pages/studiocms_api/dashboard/mailer/check-email.ts +0 -75
  224. package/frontend/pages/studiocms_api/dashboard/mailer/config.ts +0 -136
  225. package/frontend/pages/studiocms_api/dashboard/plugins/[plugin].ts +0 -80
  226. package/frontend/pages/studiocms_api/dashboard/profile.ts +0 -245
  227. package/frontend/pages/studiocms_api/dashboard/resend-verify-email.ts +0 -77
  228. package/frontend/pages/studiocms_api/dashboard/reset-password.ts +0 -124
  229. package/frontend/pages/studiocms_api/dashboard/search-list.ts +0 -59
  230. package/frontend/pages/studiocms_api/dashboard/taxonomy-search.ts +0 -47
  231. package/frontend/pages/studiocms_api/dashboard/taxonomy.ts +0 -230
  232. package/frontend/pages/studiocms_api/dashboard/templates.ts +0 -74
  233. package/frontend/pages/studiocms_api/dashboard/update-user-notifications.ts +0 -86
  234. package/frontend/pages/studiocms_api/dashboard/users.ts +0 -236
  235. package/frontend/pages/studiocms_api/dashboard/verify-email.ts +0 -83
  236. package/frontend/pages/studiocms_api/dashboard/verify-session.ts +0 -187
  237. package/frontend/pages/studiocms_api/integrations/[type]/[...id].ts +0 -15
  238. package/frontend/pages/studiocms_api/integrations/[type]/_routes/db-studio.ts +0 -173
  239. package/frontend/pages/studiocms_api/integrations/[type]/_routes/storage.ts +0 -88
  240. package/frontend/pages/studiocms_api/partials/editor.astro +0 -74
  241. package/frontend/pages/studiocms_api/partials/render.astro +0 -39
  242. package/frontend/pages/studiocms_api/partials/user-list-items.astro +0 -43
  243. package/frontend/pages/studiocms_api/rest/utils/auth-token.ts +0 -59
  244. package/frontend/pages/studiocms_api/rest/v1/[type]/[...id].ts +0 -23
  245. package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/categories.ts +0 -267
  246. package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/folders.ts +0 -283
  247. package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/pages.ts +0 -505
  248. package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/settings.ts +0 -100
  249. package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/tags.ts +0 -229
  250. package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/users.ts +0 -553
  251. package/frontend/pages/studiocms_api/rest/v1/public/[type]/[...id].ts +0 -19
  252. package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/categories.ts +0 -74
  253. package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/folders.ts +0 -85
  254. package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/pages.ts +0 -103
  255. package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/tags.ts +0 -67
  256. package/frontend/pages/studiocms_api/sdk/[...path].ts +0 -97
  257. package/frontend/pages/studiocms_api/sdk/utils/changelog.ts +0 -119
  258. package/frontend/scripts/auth/formListener.ts +0 -81
  259. package/frontend/scripts/formdata-utils.ts +0 -116
  260. package/frontend/utils/build-partial-schema.ts +0 -46
  261. package/frontend/utils/errors.ts +0 -6
  262. package/frontend/utils/param-extractor.ts +0 -83
  263. package/frontend/utils/rest-router.ts +0 -444
package/CHANGELOG.md CHANGED
@@ -1,5 +1,88 @@
1
1
  # studiocms
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1401](https://github.com/withstudiocms/studiocms/pull/1401) [`de6bb17`](https://github.com/withstudiocms/studiocms/commit/de6bb17d75f74d91776658cf1a608eebe94be495) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Migrates RestAPI to utilize new API-Spec package for better type safety
8
+
9
+ - [#1421](https://github.com/withstudiocms/studiocms/pull/1421) [`d7a0217`](https://github.com/withstudiocms/studiocms/commit/d7a0217e5ece55eddfa34399075614bef2041052) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Removes deprecated and unused SDK listpages endpoint, and updates the changelog json endpoint to not use .json in the pathname
10
+
11
+ - [#1433](https://github.com/withstudiocms/studiocms/pull/1433) [`64ff643`](https://github.com/withstudiocms/studiocms/commit/64ff64357f5e34960a2a044d427350bcba389304) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Migrates StorageFileBrowser script to utilize new API spec client for typesafe API interactions
12
+
13
+ - [#1440](https://github.com/withstudiocms/studiocms/pull/1440) [`9eec9c3`](https://github.com/withstudiocms/studiocms/commit/9eec9c3b45523b635cfe16d55aa55afabacbebe3) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Introduces new admin level api token revocation endpoint
14
+
15
+ - [#1438](https://github.com/withstudiocms/studiocms/pull/1438) [`f4a209f`](https://github.com/withstudiocms/studiocms/commit/f4a209fc090c90195e2419fff47b48a46eab7441) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Refactors and cleans up API spec handlers to remove un-needed variables and tighten security
16
+
17
+ - [#1448](https://github.com/withstudiocms/studiocms/pull/1448) [`35a1984`](https://github.com/withstudiocms/studiocms/commit/35a19845b30b6eed5b1273a40d99d9b405eeab9f) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Deprecates the `studiocmsMinimumVersion` setting from the plugins API, it is recommended to rely on `peerDependencies` instead.
18
+
19
+ - [#1322](https://github.com/withstudiocms/studiocms/pull/1322) [`0ae47b0`](https://github.com/withstudiocms/studiocms/commit/0ae47b06a4ff03ed9cdf01b136e1a50f4c8c4add) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Migrate from Zod Schemas to Effect Schemas
20
+
21
+ - [#1342](https://github.com/withstudiocms/studiocms/pull/1342) [`7773e9c`](https://github.com/withstudiocms/studiocms/commit/7773e9c094802d678edb89540b82744db7a4dcbd) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Moves to new data-middleware system for being able to handle dynamic authentication checks.
22
+
23
+ - [#1375](https://github.com/withstudiocms/studiocms/pull/1375) [`c9f32d0`](https://github.com/withstudiocms/studiocms/commit/c9f32d07ab88fdd11806ace656748494b5a782ec) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Extends rendering functionality to allow site-wide post-processors, or single page post-processors (augments)
24
+
25
+ - [#1430](https://github.com/withstudiocms/studiocms/pull/1430) [`a78f6d5`](https://github.com/withstudiocms/studiocms/commit/a78f6d513b0fc2bd7aa83837624460452a38539e) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Migrates dashboard components to use new api spec clients
26
+
27
+ - [#1434](https://github.com/withstudiocms/studiocms/pull/1434) [`ef7197e`](https://github.com/withstudiocms/studiocms/commit/ef7197ed9ca8dff757e9e791b0452279aa3791ad) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Adds SDK utility endpoints for markdown rendering and user-list HTML, replacing legacy page partial routes.
28
+ Consumers now go through the SDK utilities for these renders, and the markdown render route is POST-based.
29
+
30
+ - [#1373](https://github.com/withstudiocms/studiocms/pull/1373) [`5d6ec77`](https://github.com/withstudiocms/studiocms/commit/5d6ec77bd7105118239fbd015f182e381dbfcb2c) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Reworks API handling and migrates to Effect HttpApi Spec
31
+
32
+ - [#1429](https://github.com/withstudiocms/studiocms/pull/1429) [`1cc8957`](https://github.com/withstudiocms/studiocms/commit/1cc8957db3f1e3af2c5f4763103a0d7d46aa1c6d) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Migrates various frontend pages to utilize new dashboard API client
33
+
34
+ - [#1374](https://github.com/withstudiocms/studiocms/pull/1374) [`33d3c2b`](https://github.com/withstudiocms/studiocms/commit/33d3c2bf91cf39abc15b5df136c9eeb01b1ba317) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Migrates frontend utils to use new API spec for SDK and Auth endpoints
35
+
36
+ - [#1307](https://github.com/withstudiocms/studiocms/pull/1307) [`a855f94`](https://github.com/withstudiocms/studiocms/commit/a855f94e40b24c938dc09cdbacb72fee5a8a012a) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - New Effect Schema based validation for plugin schemas
37
+
38
+ - [#1322](https://github.com/withstudiocms/studiocms/pull/1322) [`0ae47b0`](https://github.com/withstudiocms/studiocms/commit/0ae47b06a4ff03ed9cdf01b136e1a50f4c8c4add) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Update Plugin hooks to align with new schemas
39
+
40
+ - [#1311](https://github.com/withstudiocms/studiocms/pull/1311) [`2d2ff4e`](https://github.com/withstudiocms/studiocms/commit/2d2ff4e180e23215dcd4f95aa850a1844e0569a8) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Implements new Effect-based config schemas
41
+
42
+ ### Patch Changes
43
+
44
+ - [#1351](https://github.com/withstudiocms/studiocms/pull/1351) [`94b6d4f`](https://github.com/withstudiocms/studiocms/commit/94b6d4f53d40d95ae7238fb91839174d61f43c8b) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fixes folder deletion schema calls that caused folder deletion to return a server error
45
+
46
+ - [#1381](https://github.com/withstudiocms/studiocms/pull/1381) [`07b3508`](https://github.com/withstudiocms/studiocms/commit/07b35088c55a817a218b1568dd9d3f418b01a26d) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Deduplicates API spec definitions and expands LocalsSessionData middleware context data
47
+
48
+ - [#1287](https://github.com/withstudiocms/studiocms/pull/1287) [`2ea1074`](https://github.com/withstudiocms/studiocms/commit/2ea107448571e1d42bf0d21dd832b1e71e464a51) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
49
+
50
+ - [#1336](https://github.com/withstudiocms/studiocms/pull/1336) [`e85f46b`](https://github.com/withstudiocms/studiocms/commit/e85f46b6453b7a8abfdda7d1046399a1dbc99df6) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @inox-tools/runtime-logger to ^0.8.1
51
+
52
+ - [#1385](https://github.com/withstudiocms/studiocms/pull/1385) [`9ef4b85`](https://github.com/withstudiocms/studiocms/commit/9ef4b854ed5915d7653059154798adce4abca859) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.71
53
+
54
+ - [#1402](https://github.com/withstudiocms/studiocms/pull/1402) [`2123645`](https://github.com/withstudiocms/studiocms/commit/2123645553911c3b1f97958e67f9c5f14c47d5f5) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency nanostores to ^1.1.1
55
+
56
+ - [#1442](https://github.com/withstudiocms/studiocms/pull/1442) [`ea2298e`](https://github.com/withstudiocms/studiocms/commit/ea2298e10a94a5334e75f9af806d9a03195206c8) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update dependency @iconify-json/simple-icons to ^1.2.72
57
+
58
+ - [#1453](https://github.com/withstudiocms/studiocms/pull/1453) [`fb59e23`](https://github.com/withstudiocms/studiocms/commit/fb59e23b3d906b69b8c53430ae594a5d895180d5) Thanks [@renovate](https://github.com/apps/renovate)! - fix(deps): update studiocms dependencies
59
+
60
+ - [#1352](https://github.com/withstudiocms/studiocms/pull/1352) [`27fd734`](https://github.com/withstudiocms/studiocms/commit/27fd73476ccd06f4e8ec6b8a64d86319f21b083a) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fixes outdated done page instructions
61
+
62
+ - [#1446](https://github.com/withstudiocms/studiocms/pull/1446) [`7d2ebfb`](https://github.com/withstudiocms/studiocms/commit/7d2ebfb35a77982b31a7edc95bce01223f77cf15) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Code cleanup and OCD, purges dead and unused code
63
+
64
+ - [#1441](https://github.com/withstudiocms/studiocms/pull/1441) [`39e367d`](https://github.com/withstudiocms/studiocms/commit/39e367d1433ef577b018586b347216df92e21d20) Thanks [@renovate](https://github.com/apps/renovate)! - fixes CSS lint error with duplicate CSS variable
65
+
66
+ - [#1422](https://github.com/withstudiocms/studiocms/pull/1422) [`de78276`](https://github.com/withstudiocms/studiocms/commit/de78276f1f940be413a1510aa57cc4caa2aac6fd) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Ensures proper permissions for API route, and updates client script to align with new API spec
67
+
68
+ - [#1353](https://github.com/withstudiocms/studiocms/pull/1353) [`54d5a3e`](https://github.com/withstudiocms/studiocms/commit/54d5a3eaec5b6bf3d75c190cf31f80ca27ebd96e) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Fixes `studiocms init` optional option parsing
69
+
70
+ - [#1281](https://github.com/withstudiocms/studiocms/pull/1281) [`b5d5719`](https://github.com/withstudiocms/studiocms/commit/b5d5719b612545622813f1a944313e61a08e50f8) Thanks [@renovate](https://github.com/apps/renovate)! - lint
71
+
72
+ - [#1420](https://github.com/withstudiocms/studiocms/pull/1420) [`139b3a6`](https://github.com/withstudiocms/studiocms/commit/139b3a6820c848c9052e319f53a855172e023091) Thanks [@Adammatthiesen](https://github.com/Adammatthiesen)! - Adds new config option for built-in API spec docs available in studiocms config as a boolean option `features.api.apiDocs`
73
+
74
+ - Updated dependencies [[`a67bcc0`](https://github.com/withstudiocms/studiocms/commit/a67bcc0967c49d366552b76ce1f061472020ade6), [`d7a0217`](https://github.com/withstudiocms/studiocms/commit/d7a0217e5ece55eddfa34399075614bef2041052), [`48a5334`](https://github.com/withstudiocms/studiocms/commit/48a5334051252f4f1192faa9023d56a41f9fe95c), [`07b3508`](https://github.com/withstudiocms/studiocms/commit/07b35088c55a817a218b1568dd9d3f418b01a26d), [`6280e24`](https://github.com/withstudiocms/studiocms/commit/6280e246369fa9732978a335ea6ddc3178f75e71), [`9a1180c`](https://github.com/withstudiocms/studiocms/commit/9a1180c6fe1e09599aa63a323ffcc4ba081a6e16), [`fbb5e47`](https://github.com/withstudiocms/studiocms/commit/fbb5e4749674ff4fd0593f37ae29614061d1f362), [`b7b76cb`](https://github.com/withstudiocms/studiocms/commit/b7b76cbb8e3b4ea4fe7f0d86e4f57acac47a94fe), [`3cff26c`](https://github.com/withstudiocms/studiocms/commit/3cff26c53e7b8ec1781ec7c390666a0276f50c46), [`5c0c17b`](https://github.com/withstudiocms/studiocms/commit/5c0c17b17a65046bcb93654d8bd7b0bfdad4c773), [`ff4e543`](https://github.com/withstudiocms/studiocms/commit/ff4e543a516350cd4139827b925061d8355d4932), [`ba50598`](https://github.com/withstudiocms/studiocms/commit/ba50598168030af18ccea5fedb263379507d5112), [`26d0584`](https://github.com/withstudiocms/studiocms/commit/26d05848b444cb53a26c6e89baa83203bf0398cc), [`466d3c5`](https://github.com/withstudiocms/studiocms/commit/466d3c599fdf54b95788e377cd0c817a53bb6fd3), [`d0ef542`](https://github.com/withstudiocms/studiocms/commit/d0ef542490b45bc65e276c30ae422b3386ed9f88), [`9eec9c3`](https://github.com/withstudiocms/studiocms/commit/9eec9c3b45523b635cfe16d55aa55afabacbebe3), [`f4a209f`](https://github.com/withstudiocms/studiocms/commit/f4a209fc090c90195e2419fff47b48a46eab7441), [`d0ef542`](https://github.com/withstudiocms/studiocms/commit/d0ef542490b45bc65e276c30ae422b3386ed9f88), [`6c9497d`](https://github.com/withstudiocms/studiocms/commit/6c9497d29f2dd84edc3400c1f9dda98e2aaf1ec8), [`0ae47b0`](https://github.com/withstudiocms/studiocms/commit/0ae47b06a4ff03ed9cdf01b136e1a50f4c8c4add), [`0cafedf`](https://github.com/withstudiocms/studiocms/commit/0cafedf4dee4edae1a2e859e6066365c4bea9ed5), [`de6bb17`](https://github.com/withstudiocms/studiocms/commit/de6bb17d75f74d91776658cf1a608eebe94be495), [`1e13417`](https://github.com/withstudiocms/studiocms/commit/1e1341773ea163ae25529b14877078e965899a30), [`9ea0cc9`](https://github.com/withstudiocms/studiocms/commit/9ea0cc90e69e98eb89c793f178928a3cff3f34a5), [`3cc5cff`](https://github.com/withstudiocms/studiocms/commit/3cc5cfffff082d6eaa1b928c1370e661b8cbde07), [`ef7197e`](https://github.com/withstudiocms/studiocms/commit/ef7197ed9ca8dff757e9e791b0452279aa3791ad), [`5d6ec77`](https://github.com/withstudiocms/studiocms/commit/5d6ec77bd7105118239fbd015f182e381dbfcb2c), [`33d3c2b`](https://github.com/withstudiocms/studiocms/commit/33d3c2bf91cf39abc15b5df136c9eeb01b1ba317), [`170adc4`](https://github.com/withstudiocms/studiocms/commit/170adc47216cefdce6b56e01973e3fa7812a1527), [`5d6ec77`](https://github.com/withstudiocms/studiocms/commit/5d6ec77bd7105118239fbd015f182e381dbfcb2c), [`0ae47b0`](https://github.com/withstudiocms/studiocms/commit/0ae47b06a4ff03ed9cdf01b136e1a50f4c8c4add), [`ae9ce1f`](https://github.com/withstudiocms/studiocms/commit/ae9ce1f73545a9db6b54b2bffc145a59ca598aaf), [`9eec9c3`](https://github.com/withstudiocms/studiocms/commit/9eec9c3b45523b635cfe16d55aa55afabacbebe3), [`8743206`](https://github.com/withstudiocms/studiocms/commit/87432066bf8c6788f1af0840b9a793e03d119815), [`5e56327`](https://github.com/withstudiocms/studiocms/commit/5e56327bf0084ab42eec8a59211a9f90a4611b81), [`b5d5719`](https://github.com/withstudiocms/studiocms/commit/b5d5719b612545622813f1a944313e61a08e50f8)]:
75
+ - @withstudiocms/effect@0.4.0
76
+ - effectify@0.1.0
77
+ - @withstudiocms/api-spec@0.3.0
78
+ - @withstudiocms/sdk@0.3.0
79
+ - @withstudiocms/cli-kit@0.2.1
80
+ - @withstudiocms/internal_helpers@0.2.0
81
+ - @withstudiocms/kysely@0.2.1
82
+ - @withstudiocms/config-utils@0.2.0
83
+ - @withstudiocms/auth-kit@0.1.4
84
+ - @withstudiocms/component-registry@0.1.4
85
+
3
86
  ## 0.3.0
4
87
 
5
88
  ### Minor Changes
@@ -19,9 +19,9 @@ export declare const STUBS: {
19
19
  };
20
20
  export declare const toIdent: (name: string) => string;
21
21
  export declare const createPrettyError: (err: Error) => Error;
22
- export declare const resolveConfigPath: (root: URL) => Effect.Effect<URL | undefined, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
22
+ export declare const resolveConfigPath: (root: URL) => Effect.Effect<URL | undefined, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
23
23
  export declare function appendForwardSlash(path: string): string;
24
24
  export declare const plugin: Cli.Args.Args<string[]>;
25
- export declare const addPlugin: Cli.Command.Command<"add", never, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError | StudioCMSCliError, {
25
+ export declare const addPlugin: Cli.Command.Command<"add", never, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError | StudioCMSCliError, {
26
26
  readonly plugin: string[];
27
27
  }>;
@@ -1,15 +1,15 @@
1
1
  import { Effect } from '../../effect.js';
2
2
  import type { PluginInfo } from './index.js';
3
- export declare const getRegistry: Effect.Effect<string, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
4
- export declare const fetchPackageVersions: (packageName: string) => Effect.Effect<Error | string[], import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
3
+ export declare const getRegistry: Effect.Effect<string, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
4
+ export declare const fetchPackageVersions: (packageName: string) => Effect.Effect<string[] | Error, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
5
5
  /**
6
6
  * Resolves package with a given range to a STABLE version
7
7
  * peerDependencies might specify a compatible prerelease,
8
8
  * but `studiocms add` should only ever install stable releases
9
9
  */
10
- export declare const resolveRangeToInstallSpecifier: (name: string, range: string) => Effect.Effect<string, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
11
- export declare const convertPluginsToInstallSpecifiers: (plugins: PluginInfo[]) => Effect.Effect<string[], import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
12
- export declare const fetchPackageJson: (scope: string | undefined, name: string, tag: string) => Effect.Effect<any, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
10
+ export declare const resolveRangeToInstallSpecifier: (name: string, range: string) => Effect.Effect<string, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
11
+ export declare const convertPluginsToInstallSpecifiers: (plugins: PluginInfo[]) => Effect.Effect<string[], import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
12
+ export declare const fetchPackageJson: (scope: string | undefined, name: string, tag: string) => Effect.Effect<any, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
13
13
  export declare const parseNpmName: (spec: string) => Effect.Effect<{
14
14
  scope: string | undefined;
15
15
  name: string;
@@ -19,4 +19,4 @@ export declare const parsePluginName: (spec: string) => Effect.Effect<{
19
19
  scope: string | undefined;
20
20
  name: string;
21
21
  tag: string;
22
- } | undefined, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
22
+ } | undefined, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
@@ -4,7 +4,7 @@ import { StudioCMSCliError } from '../utils/errors.js';
4
4
  import { type PluginInfo, UpdateResult } from './index.js';
5
5
  declare const TryToInstallPlugins_base: Effect.Service.Class<TryToInstallPlugins, "TryToInstallPlugins", {
6
6
  readonly effect: Effect.Effect<{
7
- run: (plugins: PluginInfo[]) => Effect.Effect<UpdateResult, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError | StudioCMSCliError, CliContext>;
7
+ run: (plugins: PluginInfo[]) => Effect.Effect<UpdateResult, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError | StudioCMSCliError, CliContext>;
8
8
  }, never, never>;
9
9
  }>;
10
10
  export declare class TryToInstallPlugins extends TryToInstallPlugins_base {
@@ -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("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError | import("../utils/errors.js").StudioCMSCliError, CliContext>;
7
+ run: (configURL: URL, mod: ProxifiedModule<any>) => Effect.Effect<UpdateResult.none | UpdateResult.updated | UpdateResult.cancelled, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError | import("../utils/errors.js").StudioCMSCliError, CliContext>;
8
8
  }, never, never>;
9
9
  }>;
10
10
  export declare class UpdateStudioCMSConfig extends UpdateStudioCMSConfig_base {
@@ -2,7 +2,7 @@ import { Effect } from '../../effect.js';
2
2
  import { type PluginInfo } from './index.js';
3
3
  declare const ValidatePlugins_base: Effect.Service.Class<ValidatePlugins, "ValidatePlugins", {
4
4
  readonly effect: Effect.Effect<{
5
- run: (names: string[]) => Effect.Effect<PluginInfo[], import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError, never>;
5
+ run: (names: string[]) => Effect.Effect<PluginInfo[], import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect").DeepmergeError | import("@withstudiocms/effect/clack").ClackError, never>;
6
6
  }, never, never>;
7
7
  }>;
8
8
  export declare class ValidatePlugins extends ValidatePlugins_base {
@@ -6,7 +6,7 @@ import { StudioCMSCliError } from '../../utils/errors.js';
6
6
  export declare const OneYear = 31556926;
7
7
  export declare const keyFile: Cli.Args.Args<string>;
8
8
  export declare const expire: Cli.Options.Options<31556926 | import("effect/Option").Option<number>>;
9
- export declare const genJWT: Cli.Command.Command<"gen-jwt", never, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect/clack").ClackError | import("effect/Cause").NoSuchElementException | StudioCMSCliError, {
9
+ export declare const genJWT: Cli.Command.Command<"gen-jwt", never, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/clack").ClackError | import("effect/Cause").NoSuchElementException | StudioCMSCliError, {
10
10
  readonly keyFile: string;
11
11
  readonly expire: 31556926 | import("effect/Option").Option<number>;
12
12
  readonly debug: false | import("effect/Option").Option<boolean>;
@@ -1,5 +1,5 @@
1
1
  import { Cli } from '../../effect.js';
2
- export declare const cryptoCMD: Cli.Command.Command<"crypto", never, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect/clack").ClackError | import("effect/Cause").NoSuchElementException | import("../utils/errors.js").StudioCMSCliError, {
2
+ export declare const cryptoCMD: Cli.Command.Command<"crypto", never, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/clack").ClackError | import("effect/Cause").NoSuchElementException | import("../utils/errors.js").StudioCMSCliError, {
3
3
  readonly subcommand: import("effect/Option").Option<{
4
4
  readonly keyFile: string;
5
5
  readonly expire: 31556926 | import("effect/Option").Option<number>;
@@ -29,10 +29,20 @@ var EnvBuilderAction = /* @__PURE__ */ ((EnvBuilderAction2) => {
29
29
  return EnvBuilderAction2;
30
30
  })(EnvBuilderAction || {});
31
31
  function emptyStringToUndefined(value) {
32
- return value.trim() === "" ? void 0 : value.trim();
32
+ if (typeof value !== "string") {
33
+ return void 0;
34
+ }
35
+ if (value.trim() === "") {
36
+ return void 0;
37
+ }
38
+ return value;
33
39
  }
34
40
  function NumberStringToUndefined(value) {
35
- const num = Number(value);
41
+ const emptyStringResult = emptyStringToUndefined(value);
42
+ if (emptyStringResult === void 0) {
43
+ return void 0;
44
+ }
45
+ const num = Number(emptyStringResult);
36
46
  return Number.isNaN(num) ? void 0 : num;
37
47
  }
38
48
  const env = Effect.fn(function* (context, debug, dryRun) {
@@ -1,3 +1,3 @@
1
1
  import { Effect } from '../../../effect.js';
2
2
  import { CliContext } from '../../utils/context.js';
3
- export declare const next: (debug: boolean) => Effect.Effect<void, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect/clack").ClackError, CliContext>;
3
+ export declare const next: (debug: boolean) => Effect.Effect<void, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/clack").ClackError, CliContext>;
@@ -2,7 +2,7 @@ import { Cli } from '@withstudiocms/effect';
2
2
  export declare const rollback: Cli.Options.Options<import("effect/Option").Option<boolean>>;
3
3
  export declare const latest: Cli.Options.Options<import("effect/Option").Option<boolean>>;
4
4
  export declare const status: Cli.Options.Options<import("effect/Option").Option<boolean>>;
5
- export declare const migratorCMD: Cli.Command.Command<"migrate", never, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("../../db/index.js").UnsupportedDialectError | import("../../db/index.js").DriverImportError | import("@withstudiocms/effect/clack").ClackError | import("effect/Cause").NoSuchElementException | import("@withstudiocms/kysely/core/errors").MigratorError, {
5
+ export declare const migratorCMD: Cli.Command.Command<"migrate", never, import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("../../db/index.js").UnsupportedDialectError | import("../../db/index.js").DriverImportError | import("@withstudiocms/effect/clack").ClackError | import("effect/Cause").NoSuchElementException | import("@withstudiocms/kysely/core/errors").MigratorError, {
6
6
  readonly debug: false | import("effect/Option").Option<boolean>;
7
7
  readonly rollback: import("effect/Option").Option<boolean>;
8
8
  readonly latest: import("effect/Option").Option<boolean>;
@@ -4,7 +4,7 @@ export declare enum DBEditOptions {
4
4
  create = "create",
5
5
  modify = "modify"
6
6
  }
7
- export declare const usersCMD: Cli.Command.Command<"users", never, Error | import("effect/ConfigError").ConfigError, {
7
+ export declare const usersCMD: Cli.Command.Command<"users", never, import("effect/ParseResult").ParseError | Error | import("effect/ConfigError").ConfigError, {
8
8
  readonly debug: false | import("effect/Option").Option<boolean>;
9
9
  readonly dryRun: import("effect/Option").Option<boolean>;
10
10
  }>;
@@ -3,7 +3,7 @@ import { getAvatarUrl } from "@withstudiocms/auth-kit/utils/libravatar";
3
3
  import { StudioCMSColorwayInfo } from "@withstudiocms/cli-kit/colors";
4
4
  import { group, log, password, select, text } from "@withstudiocms/effect/clack";
5
5
  import { StudioCMSPermissions, StudioCMSUsersTable } from "@withstudiocms/sdk/tables";
6
- import { z } from "astro/zod";
6
+ import { isValidEmail } from "#schemas/external-schemas";
7
7
  import { Effect, runEffect, Schema } from "../../../effect.js";
8
8
  import { StudioCMSCliError } from "../../utils/errors.js";
9
9
  import { getCliDbClient } from "../../utils/getCliDbClient.js";
@@ -91,8 +91,8 @@ const createUsers = Effect.fn(function* (context, _debug, dryRun) {
91
91
  placeholder: "john@doe.tld",
92
92
  validate: (email2) => {
93
93
  const e = email2?.trim().toLowerCase();
94
- const emailSchema = z.string().email({ message: "Email address is invalid" });
95
- const response = emailSchema.safeParse(e);
94
+ if (!e) return "Email is required";
95
+ const response = isValidEmail(e);
96
96
  if (!response.success) return response.error.message;
97
97
  if (currentUsers.find((user) => user.email === e)) {
98
98
  return "There is already a user with that email.";
@@ -1,2 +1,2 @@
1
1
  import { Effect } from '../../../effect.js';
2
- export declare const next: (debug: boolean) => Effect.Effect<void, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("@withstudiocms/effect/clack").ClackError, never>;
2
+ export declare const next: (debug: boolean) => Effect.Effect<void, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/clack").ClackError, never>;
@@ -14,6 +14,6 @@ export declare class CliContext extends CliContext_base {
14
14
  static makeLayer: (context: BaseContext) => Layer.Layer<CliContext, never, never>;
15
15
  static makeProvide: (context: BaseContext) => <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, CliContext>>;
16
16
  }
17
- export declare const genContext: Effect.Effect<BaseContext, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, never>;
17
+ export declare const genContext: Effect.Effect<BaseContext, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, never>;
18
18
  export declare const parseDebug: (debugOpt: false | Option.Option<boolean>) => Effect.Effect<boolean, never, never>;
19
19
  export {};
@@ -124,4 +124,4 @@ export declare const getCliDbClient: (context: BaseContext) => Effect.Effect<imp
124
124
  readonly isPermanent: import("kysely").ColumnType<number, boolean, boolean>;
125
125
  readonly expiresAt?: number | null | undefined;
126
126
  };
127
- }>, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError | import("../../db/index.js").UnsupportedDialectError | import("../../db/index.js").DriverImportError, never>;
127
+ }>, import("effect/ParseResult").ParseError | import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException | import("../../db/index.js").UnsupportedDialectError | import("../../db/index.js").DriverImportError, never>;
@@ -1,4 +1,4 @@
1
1
  import { Effect } from '../../effect.js';
2
2
  import { CliContext } from './context.js';
3
3
  export declare const random: (...arr: any[]) => any;
4
- export declare const intro: (debug: boolean) => Effect.Effect<void, import("effect/Cause").UnknownException | import("effect/ConfigError").ConfigError, CliContext>;
4
+ export declare const intro: (debug: boolean) => Effect.Effect<void, import("effect/ConfigError").ConfigError | import("effect/Cause").UnknownException, CliContext>;
@@ -6,67 +6,72 @@ import { Effect } from 'effect';
6
6
  * @returns An Effect that resolves to the merged StudioCMSOptions.
7
7
  */
8
8
  export declare const loadConfig: (root: URL) => Effect.Effect<{
9
- dbStartPage: boolean;
10
- verbose: boolean;
11
- logLevel: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None";
12
- db: {
13
- dialect: "libsql" | "postgres" | "mysql";
9
+ readonly dbStartPage: boolean;
10
+ readonly verbose: boolean;
11
+ readonly logLevel: "All" | "Fatal" | "Error" | "Warning" | "Info" | "Debug" | "Trace" | "None";
12
+ readonly db: {
13
+ readonly dialect: "libsql" | "postgres" | "mysql";
14
14
  };
15
- locale: {
16
- dateLocale: string;
17
- dateTimeFormat: Intl.DateTimeFormatOptions;
18
- i18n: {
19
- defaultLocale: string;
15
+ readonly plugins?: import("../../schemas/index.js").StudioCMSPluginSchema[] | undefined;
16
+ readonly storageManager?: import("../../schemas/index.js").StudioCMSStorageManagerSchema | undefined;
17
+ readonly componentRegistry?: {
18
+ readonly [x: string]: string;
19
+ } | undefined;
20
+ readonly locale: {
21
+ readonly dateLocale: string;
22
+ readonly dateTimeFormat: import("../../schemas/external-schemas.js").DateTimeFormatOptions;
23
+ readonly i18n: {
24
+ readonly defaultLocale: string;
20
25
  };
21
26
  };
22
- features: {
23
- robotsTXT: boolean | {
24
- host?: string | boolean | undefined;
25
- sitemap?: string | boolean | string[] | undefined;
26
- policy?: {
27
- userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" | "Yandex" | "YandexMobileBot" | "Algolia Crawler" | "BublupBot" | "CCBot" | "Cliqzbot" | "Daumoa" | "DeuSu" | "EuripBot" | "Exploratodo" | "Feedly" | "Findxbot" | "istellabot" | "JikeSpider" | "Lycos" | "Mail.Ru" | "MojeekBot" | "OrangeBot" | "Pinterest" | "Plukkie" | "Qwantify" | "Rambler" | "SemanticScholarBot" | "SeznamBot" | "Sosospider" | "Slurp" | "Twitterbot" | "WhatsApp" | "yacybot" | "YepBot" | "Yeti" | "YioopBot" | "yoozBot" | "YoudaoBot" | "*" | ("360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" | "Yandex" | "YandexMobileBot" | "Algolia Crawler" | "BublupBot" | "CCBot" | "Cliqzbot" | "Daumoa" | "DeuSu" | "EuripBot" | "Exploratodo" | "Feedly" | "Findxbot" | "istellabot" | "JikeSpider" | "Lycos" | "Mail.Ru" | "MojeekBot" | "OrangeBot" | "Pinterest" | "Plukkie" | "Qwantify" | "Rambler" | "SemanticScholarBot" | "SeznamBot" | "Sosospider" | "Slurp" | "Twitterbot" | "WhatsApp" | "yacybot" | "YepBot" | "Yeti" | "YioopBot" | "yoozBot" | "YoudaoBot" | "*")[] | undefined;
28
- allow?: string | string[] | undefined;
29
- disallow?: string | string[] | undefined;
30
- crawlDelay?: number | undefined;
31
- cleanParam?: string | string[] | undefined;
27
+ readonly features: {
28
+ readonly robotsTXT: boolean | {
29
+ readonly host?: string | boolean | undefined;
30
+ readonly sitemap?: string | boolean | readonly string[] | undefined;
31
+ readonly policy?: readonly {
32
+ readonly userAgent?: "360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" | "Yandex" | "YandexMobileBot" | "Algolia Crawler" | "BublupBot" | "CCBot" | "Cliqzbot" | "Daumoa" | "DeuSu" | "EuripBot" | "Exploratodo" | "Feedly" | "Findxbot" | "istellabot" | "JikeSpider" | "Lycos" | "Mail.Ru" | "MojeekBot" | "OrangeBot" | "Pinterest" | "Plukkie" | "Qwantify" | "Rambler" | "SemanticScholarBot" | "SeSchemanamBot" | "Sosospider" | "Slurp" | "Twitterbot" | "WhatsApp" | "yacybot" | "YepBot" | "Yeti" | "YioopBot" | "yooSchemaBot" | "YoudaoBot" | "*" | readonly ("360Spider" | "360Spider-Image" | "360Spider-Video" | "HaoSouSpider" | "AdsBot-Google" | "AdsBot-Google-Mobile" | "AdsBot-Google-Mobile-Apps" | "Googlebot" | "Googlebot-Image" | "Googlebot-Mobile" | "Googlebot-News" | "Googlebot-Video" | "Mediapartners-Google" | "adidxbot" | "bingbot" | "BingPreview" | "MicrosoftPreview" | "msnbot" | "msnbot-media" | "Applebot" | "AppleNewsBot" | "Baiduspider" | "Baiduspider-image" | "Baiduspider-mobile" | "Baiduspider-news" | "Baiduspider-video" | "coccoc" | "coccocbot-image" | "coccocbot-web" | "DuckDuckBot" | "DuckDuckGo-Favicons-Bot" | "facebookcatalog" | "facebookexternalhit" | "Facebot" | "gooblog" | "ichiro" | "Sogou blog" | "Sogou inst spider" | "Sogou News Spider" | "Sogou Orion spider" | "Sogou spider2" | "Sogou web spider" | "Yandex" | "YandexMobileBot" | "Algolia Crawler" | "BublupBot" | "CCBot" | "Cliqzbot" | "Daumoa" | "DeuSu" | "EuripBot" | "Exploratodo" | "Feedly" | "Findxbot" | "istellabot" | "JikeSpider" | "Lycos" | "Mail.Ru" | "MojeekBot" | "OrangeBot" | "Pinterest" | "Plukkie" | "Qwantify" | "Rambler" | "SemanticScholarBot" | "SeSchemanamBot" | "Sosospider" | "Slurp" | "Twitterbot" | "WhatsApp" | "yacybot" | "YepBot" | "Yeti" | "YioopBot" | "yooSchemaBot" | "YoudaoBot" | "*")[] | undefined;
33
+ readonly allow?: string | readonly string[] | undefined;
34
+ readonly disallow?: string | readonly string[] | undefined;
35
+ readonly crawlDelay?: number | undefined;
36
+ readonly cleanParam?: string | readonly string[] | undefined;
32
37
  }[] | undefined;
33
38
  };
34
- injectQuickActionsMenu: boolean;
35
- sdk: {
36
- cacheConfig: {
37
- lifetime: number;
38
- enabled: boolean;
39
+ readonly injectQuickActionsMenu: boolean;
40
+ readonly sdk: {
41
+ readonly cacheConfig: {
42
+ readonly lifetime: number;
43
+ readonly enabled: boolean;
39
44
  };
40
45
  };
41
- dashboardConfig: {
42
- dashboardEnabled: boolean;
43
- inject404Route: boolean;
44
- faviconURL: string;
45
- versionCheck: boolean;
46
- security: {
47
- hideGeneratorTags: boolean;
46
+ readonly dashboardConfig: {
47
+ readonly dashboardEnabled: boolean;
48
+ readonly inject404Route: boolean;
49
+ readonly faviconURL: string;
50
+ readonly dashboardRouteOverride?: string | undefined;
51
+ readonly versionCheck: boolean;
52
+ readonly security: {
53
+ readonly hideGeneratorTags: boolean;
48
54
  };
49
- dashboardRouteOverride?: string | undefined;
50
55
  };
51
- authConfig: {
52
- enabled: boolean;
53
- providers: {
54
- usernameAndPassword: boolean;
55
- usernameAndPasswordConfig: {
56
- allowUserRegistration: boolean;
56
+ readonly authConfig: {
57
+ readonly enabled: boolean;
58
+ readonly providers: {
59
+ readonly usernameAndPassword: boolean;
60
+ readonly usernameAndPasswordConfig: {
61
+ readonly allowUserRegistration: boolean;
57
62
  };
58
63
  };
59
64
  };
60
- developerConfig: {
61
- demoMode: false | {
62
- username: string;
63
- password: string;
65
+ readonly developerConfig: {
66
+ readonly demoMode: boolean | {
67
+ readonly password: string;
68
+ readonly username: string;
64
69
  };
65
70
  };
66
- webVitals: boolean;
67
- preferredImageService?: string | undefined;
71
+ readonly preferredImageService?: string | undefined;
72
+ readonly webVitals: boolean;
73
+ readonly api: {
74
+ readonly apiDocs: boolean;
75
+ };
68
76
  };
69
- plugins?: import("../../plugins.js").StudioCMSPlugin[] | undefined;
70
- storageManager?: import("../../plugins.js").StudioCMSStorageManager | undefined;
71
- componentRegistry?: Record<string, string> | undefined;
72
- }, import("effect/Cause").UnknownException, never>;
77
+ }, import("effect/ParseResult").ParseError | import("effect/Cause").UnknownException, never>;
@@ -1,17 +1,14 @@
1
- import {
2
- loadConfigFile as _loadConfigFile,
3
- parseAndMerge as _parseAndMerge
4
- } from "@withstudiocms/config-utils";
5
- import { Effect } from "effect";
1
+ import { loadConfigFile as _loadConfigFile } from "@withstudiocms/config-utils";
2
+ import { Effect, Schema } from "effect";
6
3
  import { configPaths } from "../../consts.js";
7
4
  import { StudioCMSOptionsSchema } from "../../schemas/index.js";
8
5
  const loadConfigFile = Effect.fn(
9
6
  (root) => Effect.tryPromise(() => _loadConfigFile(root, configPaths, "migrator"))
10
7
  );
11
- const parseAndMerge = Effect.fn(
12
- (config) => Effect.try(() => _parseAndMerge(StudioCMSOptionsSchema, config))
8
+ const parse = Effect.fn(
9
+ (config) => Schema.decode(StudioCMSOptionsSchema)(config ?? {})
13
10
  );
14
- const loadConfig = (root) => loadConfigFile(root).pipe(Effect.flatMap(parseAndMerge));
11
+ const loadConfig = (root) => loadConfigFile(root).pipe(Effect.flatMap(parse));
15
12
  export {
16
13
  loadConfig
17
14
  };
@@ -14,7 +14,7 @@ import { Effect } from '../../effect.js';
14
14
  *
15
15
  * @throws If the password module options or Scrypt configuration fail to initialize.
16
16
  */
17
- declare const hashPassword: (password: string, _salt?: string | undefined) => Effect.Effect<string, import("@withstudiocms/effect/scrypt").ScryptError, never>, verifyPasswordStrength: (pass: string) => Effect.Effect<string | true, import("@withstudiocms/auth-kit/errors").PasswordError | import("@withstudiocms/auth-kit/errors").CheckIfUnsafeError | import("@effect/platform/HttpClientError").ResponseError, never>;
17
+ declare const hashPassword: (password: string, _salt?: string | undefined) => Effect.Effect<string, import("effectify/scrypt").ScryptError, never>, verifyPasswordStrength: (pass: string) => Effect.Effect<string | true, import("@withstudiocms/auth-kit/errors").PasswordError | import("@withstudiocms/auth-kit/errors").CheckIfUnsafeError | import("@effect/platform/HttpClientError").ResponseError, never>;
18
18
  declare const getCheckers: Effect.Effect<{
19
19
  username: (val: string) => Effect.Effect<boolean, import("@withstudiocms/auth-kit/errors").CheckIfUnsafeError, never>;
20
20
  password: (val: string) => Effect.Effect<boolean, import("@withstudiocms/auth-kit/errors").CheckIfUnsafeError, never>;