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.
- package/CHANGELOG.md +83 -0
- package/dist/cli/add/index.d.ts +2 -2
- package/dist/cli/add/npm-utils.d.ts +6 -6
- package/dist/cli/add/tryToInstallPlugins.d.ts +1 -1
- package/dist/cli/add/updateStudioCMSConfig.d.ts +1 -1
- package/dist/cli/add/validatePlugins.d.ts +1 -1
- package/dist/cli/crypto/genJWT/index.d.ts +1 -1
- package/dist/cli/crypto/index.d.ts +1 -1
- package/dist/cli/init/steps/env.js +12 -2
- package/dist/cli/init/steps/next.d.ts +1 -1
- package/dist/cli/migrator/index.d.ts +1 -1
- package/dist/cli/users/index.d.ts +1 -1
- package/dist/cli/users/steps/createUsers.js +3 -3
- package/dist/cli/users/steps/next.d.ts +1 -1
- package/dist/cli/utils/context.d.ts +1 -1
- package/dist/cli/utils/getCliDbClient.d.ts +1 -1
- package/dist/cli/utils/intro.d.ts +1 -1
- package/dist/cli/utils/loadConfig.d.ts +54 -49
- package/dist/cli/utils/loadConfig.js +5 -8
- package/dist/cli/utils/user-utils.d.ts +1 -1
- package/dist/client/apiClient.d.ts +4923 -0
- package/dist/client/apiClient.js +72 -0
- package/dist/config.d.ts +1734 -1
- package/dist/consts.d.ts +5 -5
- package/dist/consts.js +3 -2
- package/dist/db/plugins.d.ts +1 -1
- package/dist/db/plugins.js +5 -8
- package/dist/handlers/frontend/routes.d.ts +4 -18
- package/dist/handlers/frontend/routes.js +13 -152
- package/dist/handlers/frontend/types.d.ts +1 -1
- package/dist/handlers/frontend/utils.js +0 -18
- package/dist/handlers/pluginHandler.d.ts +34 -257
- package/dist/handlers/pluginHandler.js +92 -46
- package/dist/handlers/routeHandler.js +32 -11
- package/dist/handlers/setupDbStudio.d.ts +1 -1
- package/dist/handlers/storage-manager/core/effectify-astro-context.d.ts +25 -0
- package/dist/handlers/storage-manager/core/effectify-astro-context.js +78 -0
- package/dist/handlers/storage-manager/no-op.d.ts +2 -2
- package/dist/handlers/storage-manager/no-op.js +2 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +9 -5
- package/dist/integrations/robots/index.d.ts +2 -2
- package/dist/integrations/robots/index.js +1 -3
- package/dist/integrations/robots/schema.d.ts +102 -273
- package/dist/integrations/robots/schema.js +220 -209
- package/dist/plugins/analytics/assets/schemas.d.ts +14 -9
- package/dist/plugins/analytics/assets/schemas.js +25 -17
- package/dist/plugins/analytics/db-client.d.ts +1 -1
- package/dist/plugins/analytics/index.d.ts +823 -3
- package/dist/plugins/analytics/index.js +4 -5
- package/dist/plugins/analytics/schemas.d.ts +54 -62
- package/dist/plugins/analytics/schemas.js +64 -13
- package/dist/plugins/analytics/table.d.ts +1 -1
- package/dist/plugins.d.ts +0 -1
- package/dist/schemas/config/api.d.ts +17 -0
- package/dist/schemas/config/api.js +14 -0
- package/dist/schemas/config/auth.d.ts +55 -59
- package/dist/schemas/config/auth.js +34 -11
- package/dist/schemas/config/dashboard.d.ts +43 -79
- package/dist/schemas/config/dashboard.js +43 -12
- package/dist/schemas/config/db.d.ts +15 -17
- package/dist/schemas/config/db.js +13 -5
- package/dist/schemas/config/developer.d.ts +33 -45
- package/dist/schemas/config/developer.js +22 -5
- package/dist/schemas/config/index.d.ts +398 -521
- package/dist/schemas/config/index.js +115 -57
- package/dist/schemas/config/sdk.d.ts +50 -196
- package/dist/schemas/config/sdk.js +61 -73
- package/dist/schemas/custom.d.ts +40 -0
- package/dist/schemas/custom.js +41 -0
- package/dist/schemas/external-schemas.d.ts +171 -0
- package/dist/schemas/external-schemas.js +179 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/plugins/i18n.d.ts +59 -39
- package/dist/schemas/plugins/i18n.js +42 -5
- package/dist/schemas/plugins/index.d.ts +7126 -10296
- package/dist/schemas/plugins/index.js +260 -276
- package/dist/schemas/plugins/shared.d.ts +1293 -3718
- package/dist/schemas/plugins/shared.js +320 -329
- package/dist/test-utils.d.ts +15 -4
- package/dist/test-utils.js +27 -11
- package/dist/toolbar/db-viewer/db-shared-types.d.ts +6 -6
- package/dist/toolbar/db-viewer/viewer.js +20 -21
- package/dist/types.d.ts +30 -0
- package/dist/utils/effects/smtp.d.ts +1 -1
- package/dist/utils/lang-helper.d.ts +10 -2
- package/dist/virtual.d.ts +23 -0
- package/dist/virtuals/auth/core.d.ts +5 -5
- package/dist/virtuals/auth/verify-email.d.ts +6 -6
- package/dist/virtuals/components/Generator.astro +2 -2
- package/dist/virtuals/components/Renderer.astro +9 -1
- package/dist/virtuals/components/renderFn.d.ts +3 -1
- package/dist/virtuals/components/renderFn.js +18 -0
- package/dist/virtuals/lib/headDefaults.d.ts +4 -2
- package/dist/virtuals/lib/headDefaults.js +0 -2
- package/dist/virtuals/lib/routeMap.d.ts +0 -12
- package/dist/virtuals/lib/routeMap.js +2 -14
- package/dist/virtuals/mailer/index.d.ts +3 -3
- package/dist/virtuals/notifier/index.d.ts +5 -5
- package/dist/virtuals/plugins/dashboard-pages.d.ts +2 -64
- package/dist/virtuals/scripts/StorageFileBrowser.d.ts +1 -172
- package/dist/virtuals/scripts/StorageFileBrowser.js +216 -119
- package/dist/virtuals/template-engine/index.d.ts +4 -4
- package/frontend/components/dashboard/configuration/ConfigForm.astro +218 -110
- package/frontend/components/dashboard/content-mgmt/ContentSearch.astro +21 -22
- package/frontend/components/dashboard/content-mgmt/CreateFolder.astro +66 -54
- package/frontend/components/dashboard/content-mgmt/CreatePage.astro +58 -104
- package/frontend/components/dashboard/content-mgmt/EditFolder.astro +65 -67
- package/frontend/components/dashboard/content-mgmt/EditPage.astro +86 -134
- package/frontend/components/dashboard/content-mgmt/InnerSidebarElement.astro +0 -1
- package/frontend/components/dashboard/content-mgmt/PageHeader.astro +33 -52
- package/frontend/components/dashboard/content-mgmt/PageTypeHandler.astro +2 -2
- package/frontend/components/dashboard/profile/APITokens.astro +219 -158
- package/frontend/components/dashboard/profile/BasicInfo.astro +165 -106
- package/frontend/components/dashboard/profile/Notifications.astro +27 -18
- package/frontend/components/dashboard/profile/UpdatePassword.astro +134 -94
- package/frontend/components/dashboard/sidebar/VersionCheck.astro +31 -16
- package/frontend/components/dashboard/sidebar/VersionCheckChangelog.astro +18 -11
- package/frontend/components/dashboard/sidebar-modals/VersionModal.astro +2 -2
- package/frontend/components/dashboard/smtp-config/TemplateEditor.astro +14 -14
- package/frontend/components/dashboard/taxonomy/InnerSidebarElement.astro +0 -1
- package/frontend/components/dashboard/taxonomy/MetaContainer.astro +0 -2
- package/frontend/components/dashboard/taxonomy/PageHeader.astro +16 -24
- package/frontend/components/dashboard/taxonomy/TaxonomySearch.astro +23 -27
- package/frontend/components/dashboard/user-mgmt/InnerSidebarElement.astro +111 -104
- package/frontend/components/dashboard/user-mgmt/UserListItem.astro +9 -22
- package/frontend/components/dashboard/user-mgmt/UserListItems.astro +18 -0
- package/frontend/components/first-time-setup/snippets/{opt2-studiocms.config.diff → studiocms.config.diff} +1 -0
- package/frontend/components/shared/Code.astro +1 -4
- package/frontend/components/shared/DynamicSettingsRenderer.astro +1 -1
- package/frontend/components/shared/SSRUser.astro +2 -4
- package/frontend/components/shared/foldertree/FolderTreeNode.astro +0 -6
- package/frontend/components/shared/storage-manager/StorageCopyOutput.astro +0 -1
- package/frontend/components/shared/taxonomy/TaxonomyTreeNode.astro +0 -6
- package/frontend/layouts/DashboardLayout.astro +0 -9
- package/frontend/layouts/TaxonomyLayout.astro +0 -1
- package/frontend/middleware/index.ts +102 -61
- package/frontend/pages/404.astro +0 -1
- package/frontend/pages/[dashboard]/[...pluginPage].astro +10 -1
- package/frontend/pages/[dashboard]/configuration.astro +10 -1
- package/frontend/pages/[dashboard]/content-management/createfolder.astro +10 -1
- package/frontend/pages/[dashboard]/content-management/createpage.astro +10 -1
- package/frontend/pages/[dashboard]/content-management/diff.astro +39 -14
- package/frontend/pages/[dashboard]/content-management/editfolder.astro +10 -1
- package/frontend/pages/[dashboard]/content-management/editpage.astro +10 -1
- package/frontend/pages/[dashboard]/content-management/index.astro +10 -1
- package/frontend/pages/[dashboard]/index.astro +10 -1
- package/frontend/pages/[dashboard]/login.astro +86 -25
- package/frontend/pages/[dashboard]/password-reset.astro +22 -16
- package/frontend/pages/[dashboard]/plugins/[plugin].astro +10 -1
- package/frontend/pages/[dashboard]/profile.astro +10 -1
- package/frontend/pages/[dashboard]/signup.astro +153 -52
- package/frontend/pages/[dashboard]/smtp-configuration.astro +77 -75
- package/frontend/pages/[dashboard]/system-management.astro +10 -1
- package/frontend/pages/[dashboard]/taxonomy/categories.astro +30 -41
- package/frontend/pages/[dashboard]/taxonomy/index.astro +10 -0
- package/frontend/pages/[dashboard]/taxonomy/tags.astro +33 -43
- package/frontend/pages/[dashboard]/unverified-email.astro +29 -21
- package/frontend/pages/[dashboard]/user-management/edit.astro +170 -90
- package/frontend/pages/[dashboard]/user-management/index.astro +10 -1
- package/frontend/pages/studiocms_api/[...all].ts +106 -0
- package/frontend/pages/studiocms_api/_handlers/_utils/auth.ts +26 -0
- package/frontend/pages/studiocms_api/_handlers/_utils/changelog.ts +147 -0
- package/frontend/pages/studiocms_api/_handlers/_utils/db-studio-driver.ts +46 -0
- package/frontend/pages/studiocms_api/_handlers/_utils/parseLogLevel.ts +27 -0
- package/frontend/pages/studiocms_api/_handlers/auth/auth.ts +459 -0
- package/frontend/pages/studiocms_api/_handlers/auth/index.ts +17 -0
- package/frontend/pages/studiocms_api/_handlers/auth/oauth.ts +91 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/_shared.ts +57 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/apiTokens.ts +134 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/config.ts +64 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/content.ts +741 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/create.ts +480 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/emailNotifications.ts +49 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/index.ts +45 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/mailer.ts +136 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/plugins.ts +80 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/profile.ts +275 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/resetPassword.ts +140 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/search.ts +63 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/taxonomy.ts +285 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/templates.ts +75 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/users.ts +312 -0
- package/frontend/pages/studiocms_api/_handlers/dashboard/verifyEndpoints.ts +307 -0
- package/frontend/pages/studiocms_api/_handlers/integration/dbStudio.ts +98 -0
- package/frontend/pages/studiocms_api/_handlers/integration/index.ts +17 -0
- package/frontend/pages/studiocms_api/_handlers/integration/storageManager.ts +107 -0
- package/frontend/pages/studiocms_api/_handlers/rest-api/index.ts +8 -0
- package/frontend/pages/studiocms_api/_handlers/rest-api/v1/_shared.ts +41 -0
- package/frontend/pages/studiocms_api/_handlers/rest-api/v1/index.ts +17 -0
- package/frontend/pages/studiocms_api/_handlers/rest-api/v1/public.ts +195 -0
- package/frontend/pages/studiocms_api/_handlers/rest-api/v1/secure.ts +1726 -0
- package/frontend/pages/studiocms_api/_handlers/sdk.ts +129 -0
- package/frontend/pages/studiocms_api/_middleware/astroLocals.ts +36 -0
- package/frontend/pages/studiocms_api/_middleware/restApi.ts +56 -0
- package/frontend/pages/studiocms_api/integrations/[...all].ts +8 -0
- package/frontend/scripts/formdata.ts +219 -0
- package/frontend/setup-pages/3-done.astro +4 -20
- package/frontend/setup-pages/studiocms_api/dashboard/step-2.ts +3 -6
- package/frontend/styles/dashboard-base.css +0 -1
- package/frontend/web-vitals/endpoint.ts +2 -1
- package/package.json +34 -29
- package/dist/global.d.ts +0 -9
- package/frontend/components/dashboard/LoginChecker.astro +0 -68
- package/frontend/components/dashboard/user-mgmt/RankCheck.astro +0 -57
- package/frontend/components/first-time-setup/snippets/opt1-astro.config.diff +0 -14
- package/frontend/components/first-time-setup/snippets/opt2-astro.config.diff +0 -9
- package/frontend/middleware/_authmap.ts +0 -63
- package/frontend/pages/studiocms_api/auth/[path].ts +0 -384
- package/frontend/pages/studiocms_api/auth/[provider]/[...id].ts +0 -64
- package/frontend/pages/studiocms_api/auth/[provider]/_effects/index.ts +0 -101
- package/frontend/pages/studiocms_api/auth/_shared.ts +0 -52
- package/frontend/pages/studiocms_api/dashboard/api-tokens.ts +0 -115
- package/frontend/pages/studiocms_api/dashboard/config.ts +0 -74
- package/frontend/pages/studiocms_api/dashboard/content/diff.ts +0 -73
- package/frontend/pages/studiocms_api/dashboard/content/folder.ts +0 -220
- package/frontend/pages/studiocms_api/dashboard/content/page.ts +0 -359
- package/frontend/pages/studiocms_api/dashboard/create-reset-link.ts +0 -77
- package/frontend/pages/studiocms_api/dashboard/create-user-invite.ts +0 -231
- package/frontend/pages/studiocms_api/dashboard/create-user.ts +0 -186
- package/frontend/pages/studiocms_api/dashboard/email-notification-settings-site.ts +0 -74
- package/frontend/pages/studiocms_api/dashboard/mailer/check-email.ts +0 -75
- package/frontend/pages/studiocms_api/dashboard/mailer/config.ts +0 -136
- package/frontend/pages/studiocms_api/dashboard/plugins/[plugin].ts +0 -80
- package/frontend/pages/studiocms_api/dashboard/profile.ts +0 -245
- package/frontend/pages/studiocms_api/dashboard/resend-verify-email.ts +0 -77
- package/frontend/pages/studiocms_api/dashboard/reset-password.ts +0 -124
- package/frontend/pages/studiocms_api/dashboard/search-list.ts +0 -59
- package/frontend/pages/studiocms_api/dashboard/taxonomy-search.ts +0 -47
- package/frontend/pages/studiocms_api/dashboard/taxonomy.ts +0 -230
- package/frontend/pages/studiocms_api/dashboard/templates.ts +0 -74
- package/frontend/pages/studiocms_api/dashboard/update-user-notifications.ts +0 -86
- package/frontend/pages/studiocms_api/dashboard/users.ts +0 -236
- package/frontend/pages/studiocms_api/dashboard/verify-email.ts +0 -83
- package/frontend/pages/studiocms_api/dashboard/verify-session.ts +0 -187
- package/frontend/pages/studiocms_api/integrations/[type]/[...id].ts +0 -15
- package/frontend/pages/studiocms_api/integrations/[type]/_routes/db-studio.ts +0 -173
- package/frontend/pages/studiocms_api/integrations/[type]/_routes/storage.ts +0 -88
- package/frontend/pages/studiocms_api/partials/editor.astro +0 -74
- package/frontend/pages/studiocms_api/partials/render.astro +0 -39
- package/frontend/pages/studiocms_api/partials/user-list-items.astro +0 -43
- package/frontend/pages/studiocms_api/rest/utils/auth-token.ts +0 -59
- package/frontend/pages/studiocms_api/rest/v1/[type]/[...id].ts +0 -23
- package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/categories.ts +0 -267
- package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/folders.ts +0 -283
- package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/pages.ts +0 -505
- package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/settings.ts +0 -100
- package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/tags.ts +0 -229
- package/frontend/pages/studiocms_api/rest/v1/[type]/_routes/users.ts +0 -553
- package/frontend/pages/studiocms_api/rest/v1/public/[type]/[...id].ts +0 -19
- package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/categories.ts +0 -74
- package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/folders.ts +0 -85
- package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/pages.ts +0 -103
- package/frontend/pages/studiocms_api/rest/v1/public/[type]/_routes/tags.ts +0 -67
- package/frontend/pages/studiocms_api/sdk/[...path].ts +0 -97
- package/frontend/pages/studiocms_api/sdk/utils/changelog.ts +0 -119
- package/frontend/scripts/auth/formListener.ts +0 -81
- package/frontend/scripts/formdata-utils.ts +0 -116
- package/frontend/utils/build-partial-schema.ts +0 -46
- package/frontend/utils/errors.ts +0 -6
- package/frontend/utils/param-extractor.ts +0 -83
- 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
|
package/dist/cli/add/index.d.ts
CHANGED
|
@@ -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/
|
|
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/
|
|
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/
|
|
4
|
-
export declare const fetchPackageVersions: (packageName: string) => Effect.Effect<
|
|
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/
|
|
11
|
-
export declare const convertPluginsToInstallSpecifiers: (plugins: PluginInfo[]) => Effect.Effect<string[], import("effect/
|
|
12
|
-
export declare const fetchPackageJson: (scope: string | undefined, name: string, tag: string) => Effect.Effect<any, import("effect/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
-
|
|
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
|
|
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/
|
|
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/
|
|
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 {
|
|
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
|
-
|
|
95
|
-
const response =
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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" | "
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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:
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
readonly developerConfig: {
|
|
66
|
+
readonly demoMode: boolean | {
|
|
67
|
+
readonly password: string;
|
|
68
|
+
readonly username: string;
|
|
64
69
|
};
|
|
65
70
|
};
|
|
66
|
-
|
|
67
|
-
|
|
71
|
+
readonly preferredImageService?: string | undefined;
|
|
72
|
+
readonly webVitals: boolean;
|
|
73
|
+
readonly api: {
|
|
74
|
+
readonly apiDocs: boolean;
|
|
75
|
+
};
|
|
68
76
|
};
|
|
69
|
-
|
|
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
|
-
|
|
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
|
|
12
|
-
(config) =>
|
|
8
|
+
const parse = Effect.fn(
|
|
9
|
+
(config) => Schema.decode(StudioCMSOptionsSchema)(config ?? {})
|
|
13
10
|
);
|
|
14
|
-
const loadConfig = (root) => loadConfigFile(root).pipe(Effect.flatMap(
|
|
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("
|
|
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>;
|