studiocms 0.2.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 +122 -0
- package/dist/cli/add/index.d.ts +2 -2
- package/dist/cli/add/index.js +4 -3
- package/dist/cli/add/npm-utils.d.ts +6 -6
- package/dist/cli/add/tryToInstallPlugins.d.ts +1 -1
- package/dist/cli/add/tryToInstallPlugins.js +6 -5
- package/dist/cli/add/updateStudioCMSConfig.d.ts +1 -1
- package/dist/cli/add/updateStudioCMSConfig.js +3 -4
- package/dist/cli/add/validatePlugins.d.ts +1 -2
- package/dist/cli/add/validatePlugins.js +15 -9
- package/dist/cli/crypto/genJWT/index.d.ts +1 -1
- package/dist/cli/crypto/genJWT/index.js +8 -9
- package/dist/cli/crypto/index.d.ts +1 -1
- package/dist/cli/init/steps/env.js +14 -4
- package/dist/cli/init/steps/next.d.ts +1 -1
- package/dist/cli/init/steps/next.js +6 -5
- package/dist/cli/migrator/index.d.ts +1 -1
- package/dist/cli/migrator/index.js +2 -2
- package/dist/cli/users/index.d.ts +1 -1
- package/dist/cli/users/shared.js +2 -2
- package/dist/cli/users/steps/createUsers.js +7 -7
- package/dist/cli/users/steps/modifyUsers.js +2 -2
- package/dist/cli/users/steps/next.d.ts +1 -1
- package/dist/cli/utils/checkRequiredEnvVars.js +2 -2
- package/dist/cli/utils/context.d.ts +2 -4
- package/dist/cli/utils/context.js +1 -3
- 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/logger.js +3 -3
- package/dist/cli/utils/user-utils.d.ts +1 -1
- package/dist/cli/utils/user-utils.js +4 -3
- 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 +3 -1
- package/dist/handlers/setupDbStudio.js +19 -10
- 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 +10 -20
- 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/studio/connection.d.ts +8 -4
- package/dist/toolbar/db-viewer/studio/connection.js +2 -28
- package/dist/toolbar/db-viewer/studio/env/libsql.d.ts +7 -0
- package/dist/toolbar/db-viewer/studio/env/libsql.js +17 -0
- package/dist/toolbar/db-viewer/studio/env/mysql.d.ts +7 -0
- package/dist/toolbar/db-viewer/studio/env/mysql.js +23 -0
- package/dist/toolbar/db-viewer/studio/env/postgres.d.ts +7 -0
- package/dist/toolbar/db-viewer/studio/env/postgres.js +23 -0
- package/dist/toolbar/db-viewer/studio/index.js +20 -56
- package/dist/toolbar/db-viewer/studio/type.d.ts +1 -2
- package/dist/toolbar/db-viewer/studio/virtual-connection/libsql.d.ts +3 -0
- package/dist/toolbar/db-viewer/studio/virtual-connection/libsql.js +24 -0
- package/dist/toolbar/db-viewer/studio/virtual-connection/mysql.d.ts +3 -0
- package/dist/toolbar/db-viewer/studio/virtual-connection/mysql.js +9 -0
- package/dist/toolbar/db-viewer/studio/virtual-connection/postgres.d.ts +3 -0
- package/dist/toolbar/db-viewer/studio/virtual-connection/postgres.js +9 -0
- 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 +35 -28
- 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 +1 -10
- package/frontend/layouts/TaxonomyLayout.astro +0 -1
- package/frontend/middleware/index.ts +102 -61
- package/frontend/pages/404.astro +5 -9
- 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 +35 -31
- 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 -390
- 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/dist/virtual.d.ts
CHANGED
|
@@ -12,6 +12,23 @@ declare module 'studiocms:logger' {
|
|
|
12
12
|
) => Response;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
declare module 'studiocms:client/apiClients' {
|
|
16
|
+
export const authClient: typeof import('./client/apiClient').authClient;
|
|
17
|
+
export const dashboardClient: typeof import('./client/apiClient').dashboardClient;
|
|
18
|
+
export const integrationsClient: typeof import('./client/apiClient').integrationsClient;
|
|
19
|
+
export const restClient: typeof import('./client/apiClient').restClient;
|
|
20
|
+
export const sdkClient: typeof import('./client/apiClient').sdkClient;
|
|
21
|
+
export const apiClients: typeof import('./client/apiClient').apiClients;
|
|
22
|
+
|
|
23
|
+
export const dashboardSharedCatchTags: typeof import('./client/apiClient').dashboardSharedCatchTags;
|
|
24
|
+
export const sharedAuthCatchTags: typeof import('./client/apiClient').sharedAuthCatchTags;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare module 'virtual:studiocms/route-config' {
|
|
28
|
+
export const routeConfig: import('./handlers/frontend/types').ProcessedRouteConfig;
|
|
29
|
+
export default routeConfig;
|
|
30
|
+
}
|
|
31
|
+
|
|
15
32
|
declare module 'studiocms:storage-manager/module' {
|
|
16
33
|
const module: typeof import('./handlers/storage-manager/core/no-op-storage-manager').default;
|
|
17
34
|
export default module;
|
|
@@ -30,10 +47,6 @@ declare module 'studiocms:debug-info' {
|
|
|
30
47
|
export default debugInfo;
|
|
31
48
|
}
|
|
32
49
|
|
|
33
|
-
declare module 'studiocms:astro-config/adapter' {
|
|
34
|
-
export const adapter: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
50
|
declare module 'studiocms:dashboard/augments/components' {
|
|
38
51
|
export const componentKeys: string[];
|
|
39
52
|
}
|
|
@@ -78,6 +91,12 @@ declare module 'studiocms:plugins/renderers' {
|
|
|
78
91
|
|
|
79
92
|
declare module 'studiocms:plugins/augments' {
|
|
80
93
|
export const renderAugments: import('./types.js').RenderAugment[];
|
|
94
|
+
export const renderPostProcessorAugments: import('./types.js').PostProcessorRenderAugment[];
|
|
95
|
+
export const renderAugmentsList: import('./types.js').AugmentListItem[];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare module 'studiocms:plugins/post-processors' {
|
|
99
|
+
export const renderPostProcessors: import('./types.js').PluginPostProcessor[];
|
|
81
100
|
}
|
|
82
101
|
|
|
83
102
|
declare module 'studiocms:plugins/list' {
|
|
@@ -302,17 +321,6 @@ declare module 'studiocms:component-registry/runtime' {
|
|
|
302
321
|
export type ComponentRegistryEntry =
|
|
303
322
|
import('@withstudiocms/component-registry/runtime').ComponentRegistryEntry;
|
|
304
323
|
|
|
305
|
-
/**
|
|
306
|
-
* Imports components by their keys from the 'studiocms:markdown-remark/user-components' module.
|
|
307
|
-
*
|
|
308
|
-
* @param keys - An array of strings representing the keys of the components to import.
|
|
309
|
-
* @returns A promise that resolves to an object containing the imported components.
|
|
310
|
-
* @throws {MarkdownRemarkError} If any component fails to import, an error is thrown with a prefixed message.
|
|
311
|
-
* @deprecated This function is deprecated and will be removed in future versions.
|
|
312
|
-
* Use `getRendererComponents` instead for importing components from the component registry.
|
|
313
|
-
*/
|
|
314
|
-
export const importComponentsKeys: typeof import('@withstudiocms/component-registry/runtime').importComponentsKeys;
|
|
315
|
-
|
|
316
324
|
/**
|
|
317
325
|
* @returns A promise that resolves to an object containing the imported components.
|
|
318
326
|
*/
|
|
@@ -491,13 +499,6 @@ declare module 'studiocms:auth/utils/validImages' {
|
|
|
491
499
|
export const validImages: typeof import('./virtuals/auth/validImages/index.js').validImages;
|
|
492
500
|
}
|
|
493
501
|
|
|
494
|
-
declare module 'studiocms:auth/utils/getLabelForPermissionLevel' {
|
|
495
|
-
/**
|
|
496
|
-
* @deprecated Use Translation system under the `@studiocms/dashboard:user-component` entry
|
|
497
|
-
*/
|
|
498
|
-
export const getLabelForPermissionLevel: typeof import('./virtuals/auth/getLabelForPermissionLevel.js').getLabelForPermissionLevel;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
502
|
declare module 'studiocms:auth/scripts/three' {
|
|
502
503
|
/**
|
|
503
504
|
* This module should be imported within a script tag.
|
|
@@ -588,12 +589,6 @@ declare module 'studiocms:renderer' {
|
|
|
588
589
|
export const StudioCMSRenderer: typeof import('./virtuals/components/Renderer.astro').default;
|
|
589
590
|
}
|
|
590
591
|
|
|
591
|
-
declare module 'virtual:studiocms/sdk/env' {
|
|
592
|
-
export const dbUrl: string;
|
|
593
|
-
export const dbSecret: string;
|
|
594
|
-
export const cmsEncryptionKey: string;
|
|
595
|
-
}
|
|
596
|
-
|
|
597
592
|
declare module 'virtual:studiocms/sitemaps' {
|
|
598
593
|
export const sitemaps: string[];
|
|
599
594
|
}
|
|
@@ -647,6 +642,18 @@ declare module 'studiocms:plugins/auth/providers' {
|
|
|
647
642
|
export const oAuthProviders: OAuthProviders;
|
|
648
643
|
}
|
|
649
644
|
|
|
645
|
+
declare module 'virtual:studiocms/db-studio/connection' {
|
|
646
|
+
/**
|
|
647
|
+
* Creates a database connection from the provided configuration.
|
|
648
|
+
*
|
|
649
|
+
* @param configFile - The path to the database configuration file.
|
|
650
|
+
* @param config - The database configuration object.
|
|
651
|
+
*
|
|
652
|
+
* @returns The desired database connection for the configured dialect
|
|
653
|
+
*/
|
|
654
|
+
export const createConnectionFromConfig: typeof import('./toolbar/db-viewer/studio/connection').createConnectionFromConfig;
|
|
655
|
+
}
|
|
656
|
+
|
|
650
657
|
interface StudioCMSSecurityLocals {
|
|
651
658
|
userSessionData: import('./virtuals/auth/types').UserSessionData;
|
|
652
659
|
emailVerificationEnabled: boolean;
|
|
@@ -26,8 +26,8 @@ export declare const Encryption: Effect.Effect<{
|
|
|
26
26
|
readonly decrypt: (data: Uint8Array<ArrayBufferLike>) => Effect.Effect<Uint8Array<ArrayBufferLike>, import("@withstudiocms/auth-kit/errors").DecryptionError, never>;
|
|
27
27
|
readonly decryptToString: (data: Uint8Array<ArrayBufferLike>) => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").DecryptionError, never>;
|
|
28
28
|
}, import("@withstudiocms/auth-kit/errors").EncryptionError, never>, Password: Effect.Effect<{
|
|
29
|
-
readonly hashPassword: (password: string, _salt?: string | undefined) => Effect.Effect<string, import("
|
|
30
|
-
readonly verifyPasswordHash: (hash: string, password: string) => Effect.Effect<boolean, import("
|
|
29
|
+
readonly hashPassword: (password: string, _salt?: string | undefined) => Effect.Effect<string, import("effectify/scrypt").ScryptError, never>;
|
|
30
|
+
readonly verifyPasswordHash: (hash: string, password: string) => Effect.Effect<boolean, import("effectify/scrypt").ScryptError | import("@withstudiocms/auth-kit/errors").PasswordError, never>;
|
|
31
31
|
readonly 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>;
|
|
32
32
|
}, never, never>, Session: Effect.Effect<{
|
|
33
33
|
readonly generateSessionToken: () => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").SessionError, never>;
|
|
@@ -41,15 +41,15 @@ export declare const Encryption: Effect.Effect<{
|
|
|
41
41
|
}, import("@withstudiocms/auth-kit/errors").SessionError, never>, User: Effect.Effect<{
|
|
42
42
|
readonly verifyUsernameInput: (username: string) => Effect.Effect<string | true, import("@withstudiocms/auth-kit/errors").CheckIfUnsafeError | import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
43
43
|
readonly createUserAvatar: (email: string) => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
44
|
-
readonly createLocalUser: (name: string, username: string, email: string, password: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserData, import("
|
|
44
|
+
readonly createLocalUser: (name: string, username: string, email: string, password: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserData, import("effectify/scrypt").ScryptError | import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
45
45
|
readonly createOAuthUser: (data: import("@withstudiocms/auth-kit/types").UserDataInsert, oAuthFields: {
|
|
46
46
|
provider: string;
|
|
47
47
|
providerUserId: string;
|
|
48
48
|
}) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserData, import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
49
|
-
readonly updateUserPassword: (userId: string, password: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserData, import("
|
|
49
|
+
readonly updateUserPassword: (userId: string, password: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserData, import("effectify/scrypt").ScryptError | import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
50
50
|
readonly getUserPasswordHash: (userId: string) => Effect.Effect<string, import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
51
51
|
readonly getUserFromEmail: (email: string) => Effect.Effect<import("@withstudiocms/auth-kit/types").CombinedUserData | null | undefined, import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
52
52
|
readonly getUserData: (context: import("astro").APIContext | import("astro").AstroGlobal<Record<string, any>, import("astro/runtime/server/index.js").AstroComponentFactory, Record<string, string | undefined>>) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserSessionData, import("@withstudiocms/auth-kit/errors").SessionError | import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
53
53
|
readonly getUserPermissionLevel: (userData: import("@withstudiocms/auth-kit/types").UserSessionData | import("@withstudiocms/auth-kit/types").CombinedUserData | null) => Effect.Effect<import("@withstudiocms/auth-kit/types").UserPermissionLevel, import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
54
|
-
readonly isUserAllowed: (userData: import("@withstudiocms/auth-kit/types").UserSessionData | import("@withstudiocms/auth-kit/types").CombinedUserData | null, requiredPerms: "
|
|
54
|
+
readonly isUserAllowed: (userData: import("@withstudiocms/auth-kit/types").UserSessionData | import("@withstudiocms/auth-kit/types").CombinedUserData | null, requiredPerms: "unknown" | "visitor" | "editor" | "admin" | "owner") => Effect.Effect<boolean, import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
55
55
|
}, import("@withstudiocms/auth-kit/errors").SessionError | import("@withstudiocms/auth-kit/errors").UserError, never>;
|
|
@@ -11,7 +11,7 @@ export declare class VerifyEmailError extends VerifyEmailError_base<{
|
|
|
11
11
|
}
|
|
12
12
|
declare const VerifyEmail_base: Effect.Service.Class<VerifyEmail, "studiocms/virtuals/auth/verify-email/VerifyEmail", {
|
|
13
13
|
readonly effect: Effect.Effect<{
|
|
14
|
-
isEmailVerificationEnabled: () => Effect.Effect<boolean | undefined,
|
|
14
|
+
isEmailVerificationEnabled: () => Effect.Effect<boolean | undefined, import("effect/ConfigError").ConfigError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException, never>;
|
|
15
15
|
getEmailVerificationRequest: (id: string) => Effect.Effect<{
|
|
16
16
|
readonly id: string;
|
|
17
17
|
readonly userId: string;
|
|
@@ -24,11 +24,11 @@ declare const VerifyEmail_base: Effect.Service.Class<VerifyEmail, "studiocms/vir
|
|
|
24
24
|
readonly userId: string;
|
|
25
25
|
readonly expiresAt: Date;
|
|
26
26
|
readonly token: string;
|
|
27
|
-
}, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("
|
|
28
|
-
sendVerificationEmail: (userId: string, isOAuth?: boolean) => Effect.Effect<import("../mailer/index.js").MailerErrorResponse | import("../mailer/index.js").MailerSuccessResponse | undefined,
|
|
29
|
-
isEmailVerified: (user: CombinedUserData | UserSessionData | undefined | null) => Effect.Effect<boolean,
|
|
27
|
+
}, import("effect/ConfigError").ConfigError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("@withstudiocms/sdk/modules/util/generators.js").GeneratorError, never>;
|
|
28
|
+
sendVerificationEmail: (userId: string, isOAuth?: boolean) => Effect.Effect<import("../mailer/index.js").MailerErrorResponse | import("../mailer/index.js").MailerSuccessResponse | undefined, Error | import("effect/ConfigError").ConfigError, never>;
|
|
29
|
+
isEmailVerified: (user: CombinedUserData | UserSessionData | undefined | null) => Effect.Effect<boolean, import("effect/ConfigError").ConfigError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException, never>;
|
|
30
30
|
}, import("effect/ConfigError").ConfigError, import("../mailer/index.js").Mailer>;
|
|
31
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<import("../mailer/index.js").Mailer, import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("
|
|
31
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<import("../mailer/index.js").Mailer, import("effect/ConfigError").ConfigError | import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/smtp").SMTPError, never>];
|
|
32
32
|
}>;
|
|
33
33
|
/**
|
|
34
34
|
* The `VerifyEmail` service provides functionality for managing email verification
|
|
@@ -54,6 +54,6 @@ declare const VerifyEmail_base: Effect.Service.Class<VerifyEmail, "studiocms/vir
|
|
|
54
54
|
* - `generateUrl`: Generates a URL with the given base, path, and query parameters.
|
|
55
55
|
*/
|
|
56
56
|
export declare class VerifyEmail extends VerifyEmail_base {
|
|
57
|
-
static Provide: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("
|
|
57
|
+
static Provide: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, import("effect/ConfigError").ConfigError | import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/smtp").SMTPError | E, Exclude<R, VerifyEmail>>;
|
|
58
58
|
}
|
|
59
59
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
---
|
|
3
3
|
<meta name="generator" content={Astro.generator} />
|
|
4
|
-
<meta name="generator" content={Astro.locals.StudioCMS.SCMSGenerator} />
|
|
5
|
-
<meta name="generator" content={Astro.locals.StudioCMS.SCMSUiGenerator} />
|
|
4
|
+
{Astro.locals?.StudioCMS?.SCMSGenerator && <meta name="generator" content={Astro.locals.StudioCMS.SCMSGenerator} />}
|
|
5
|
+
{Astro.locals?.StudioCMS?.SCMSUiGenerator && <meta name="generator" content={Astro.locals.StudioCMS.SCMSUiGenerator} />}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { renderAugments } from 'studiocms:plugins/augments';
|
|
2
|
+
import { renderAugments, renderPostProcessorAugments } from 'studiocms:plugins/augments';
|
|
3
|
+
import { renderPostProcessors } from 'studiocms:plugins/post-processors';
|
|
3
4
|
import { pluginRenderers } from 'studiocms:plugins/renderers';
|
|
4
5
|
import * as renderers from 'virtual:studiocms/plugins/renderers';
|
|
5
6
|
import type { SSRResult } from 'astro';
|
|
@@ -44,12 +45,19 @@ const augments = renderAugments.filter((augment) =>
|
|
|
44
45
|
(data.augments as string[])?.includes(augment.id)
|
|
45
46
|
);
|
|
46
47
|
|
|
48
|
+
// Filter post-processor augments to only include those specified in the page data
|
|
49
|
+
const postProcessorAugments = renderPostProcessorAugments.filter((augment) =>
|
|
50
|
+
(data.augments as string[])?.includes(augment.id)
|
|
51
|
+
);
|
|
52
|
+
|
|
47
53
|
// Render the content using the render function
|
|
48
54
|
// If no content found, return an error message
|
|
49
55
|
// Pass in the preRenderer and sanitizeOpts if they exist on the RendererModule
|
|
50
56
|
const renderedContent = await renderFn({
|
|
51
57
|
content: data.defaultContent?.content || '<h1>Error: No content found</h1>',
|
|
52
58
|
augments,
|
|
59
|
+
postProcessorAugments,
|
|
60
|
+
postProcessors: renderPostProcessors,
|
|
53
61
|
renderOpts: {
|
|
54
62
|
// @ts-expect-error - $$result is a global variable injected by Astro during compilation and not a editor-known variable
|
|
55
63
|
result: $$result as SSRResult,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SSRResult } from 'astro';
|
|
2
2
|
import type { SanitizeOptions } from 'ultrahtml/transformers/sanitize';
|
|
3
|
-
import type { GenericAsyncFn, RenderAugment } from '../../types.js';
|
|
3
|
+
import type { GenericAsyncFn, PluginPostProcessor, PostProcessorRenderAugment, RenderAugment } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Options for creating a render function.
|
|
6
6
|
*
|
|
@@ -23,6 +23,8 @@ interface CreateRenderOptions {
|
|
|
23
23
|
export interface RenderFnOptions {
|
|
24
24
|
renderOpts: CreateRenderOptions;
|
|
25
25
|
augments?: RenderAugment[];
|
|
26
|
+
postProcessorAugments?: PostProcessorRenderAugment[];
|
|
27
|
+
postProcessors?: PluginPostProcessor[];
|
|
26
28
|
content: string;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
@@ -30,6 +30,24 @@ const renderFn = async (args) => {
|
|
|
30
30
|
}
|
|
31
31
|
renderedContent = await transformHTML(renderedContent, components);
|
|
32
32
|
renderedContent = await transformHTML(renderedContent, {}, {}, [transformStorageAPI({ site })]);
|
|
33
|
+
if (args.postProcessorAugments && args.postProcessorAugments.length > 0) {
|
|
34
|
+
for (const postProcessorAugment of args.postProcessorAugments) {
|
|
35
|
+
try {
|
|
36
|
+
renderedContent = await postProcessorAugment.postProcessor(renderedContent);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error(`Error in post-processor augment ${postProcessorAugment.id}:`, error);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (args.postProcessors && args.postProcessors.length > 0) {
|
|
43
|
+
for (const postProcessor of args.postProcessors) {
|
|
44
|
+
try {
|
|
45
|
+
renderedContent = await postProcessor.postProcessor(renderedContent);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error(`Error in plugin post-processor ${postProcessor.id}:`, error);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
33
51
|
return renderedContent;
|
|
34
52
|
};
|
|
35
53
|
var renderFn_default = renderFn;
|
|
@@ -12,7 +12,9 @@ import type { AstroGlobalPartial } from 'astro';
|
|
|
12
12
|
* @returns
|
|
13
13
|
*/
|
|
14
14
|
export declare const headDefaults: (title: string, description: string, lang: string, Astro: AstroGlobalPartial, favicon: string, ogImage: string | undefined, canonical: URL | undefined) => {
|
|
15
|
-
tag: "
|
|
16
|
-
attrs?: Record<string, string | boolean | undefined> | undefined;
|
|
15
|
+
tag: "title" | "base" | "link" | "meta" | "noscript" | "script" | "style" | "template";
|
|
17
16
|
content?: string | undefined;
|
|
17
|
+
attrs?: {
|
|
18
|
+
readonly [x: string]: string | boolean | undefined;
|
|
19
|
+
} | undefined;
|
|
18
20
|
}[];
|
|
@@ -2,8 +2,6 @@ import { extname } from "node:path";
|
|
|
2
2
|
import version from "studiocms:version";
|
|
3
3
|
import { lookup } from "mrmime";
|
|
4
4
|
import { StudioCMSCoreError } from "../../errors.js";
|
|
5
|
-
import { HeadConfigSchema } from "./head.js";
|
|
6
|
-
const _schema = HeadConfigSchema;
|
|
7
5
|
const faviconTypes = [".ico", ".gif", ".jpeg", ".jpg", ".png", ".svg"];
|
|
8
6
|
function isFaviconExt(ext) {
|
|
9
7
|
if (faviconTypes.includes(ext)) {
|
|
@@ -168,10 +168,6 @@ export declare const StudioCMSRoutes: {
|
|
|
168
168
|
*/
|
|
169
169
|
searchList: string;
|
|
170
170
|
partials: {
|
|
171
|
-
/**
|
|
172
|
-
* API route for live preview box rendering.
|
|
173
|
-
*/
|
|
174
|
-
livePreviewBox: string;
|
|
175
171
|
/**
|
|
176
172
|
* API route for fetching user list items.
|
|
177
173
|
*/
|
|
@@ -180,10 +176,6 @@ export declare const StudioCMSRoutes: {
|
|
|
180
176
|
* API route for rendering content.
|
|
181
177
|
*/
|
|
182
178
|
render: string;
|
|
183
|
-
/**
|
|
184
|
-
* API route for the editor.
|
|
185
|
-
*/
|
|
186
|
-
editor: string;
|
|
187
179
|
};
|
|
188
180
|
/**
|
|
189
181
|
* API route for fetching configuration.
|
|
@@ -263,10 +255,6 @@ export declare const StudioCMSRoutes: {
|
|
|
263
255
|
templates: string;
|
|
264
256
|
};
|
|
265
257
|
sdk: {
|
|
266
|
-
/**
|
|
267
|
-
* SDK route for listing pages.
|
|
268
|
-
*/
|
|
269
|
-
pages: string;
|
|
270
258
|
/**
|
|
271
259
|
* SDK route for updating the latest version cache.
|
|
272
260
|
*/
|
|
@@ -152,10 +152,6 @@ const StudioCMSRoutes = {
|
|
|
152
152
|
*/
|
|
153
153
|
searchList: dashboardAPIRoute("search-list"),
|
|
154
154
|
partials: {
|
|
155
|
-
/**
|
|
156
|
-
* API route for live preview box rendering.
|
|
157
|
-
*/
|
|
158
|
-
livePreviewBox: partialsAPIRoute("render"),
|
|
159
155
|
/**
|
|
160
156
|
* API route for fetching user list items.
|
|
161
157
|
*/
|
|
@@ -163,11 +159,7 @@ const StudioCMSRoutes = {
|
|
|
163
159
|
/**
|
|
164
160
|
* API route for rendering content.
|
|
165
161
|
*/
|
|
166
|
-
render: partialsAPIRoute("render")
|
|
167
|
-
/**
|
|
168
|
-
* API route for the editor.
|
|
169
|
-
*/
|
|
170
|
-
editor: partialsAPIRoute("editor")
|
|
162
|
+
render: partialsAPIRoute("render")
|
|
171
163
|
},
|
|
172
164
|
/**
|
|
173
165
|
* API route for fetching configuration.
|
|
@@ -247,10 +239,6 @@ const StudioCMSRoutes = {
|
|
|
247
239
|
templates: dashboardAPIRoute("templates")
|
|
248
240
|
},
|
|
249
241
|
sdk: {
|
|
250
|
-
/**
|
|
251
|
-
* SDK route for listing pages.
|
|
252
|
-
*/
|
|
253
|
-
pages: sdkRoute("list-pages"),
|
|
254
242
|
/**
|
|
255
243
|
* SDK route for updating the latest version cache.
|
|
256
244
|
*/
|
|
@@ -258,7 +246,7 @@ const StudioCMSRoutes = {
|
|
|
258
246
|
/**
|
|
259
247
|
* SDK route for the full changelog JSON.
|
|
260
248
|
*/
|
|
261
|
-
changelog: sdkRoute("full-changelog
|
|
249
|
+
changelog: sdkRoute("full-changelog")
|
|
262
250
|
},
|
|
263
251
|
fts: {
|
|
264
252
|
/**
|
|
@@ -53,12 +53,12 @@ declare const Mailer_base: Effect.Service.Class<Mailer, "studiocms/lib/mailer/Ma
|
|
|
53
53
|
createMailerConfigTable: (config: ConfigFinal<StudioCMSMailerConfig>) => Effect.Effect<import("@withstudiocms/sdk/types").DynamicConfigEntry<StudioCMSMailerConfig>, import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError, never>;
|
|
54
54
|
sendMail: ({ subject, ...message }: MailOptions) => Effect.Effect<MailerErrorResponse | MailerSuccessResponse, Error | import("effect/ConfigError").ConfigError, never>;
|
|
55
55
|
verifyMailConnection: Effect.Effect<MailerErrorResponse | MailerSuccessResponse, Error | import("effect/ConfigError").ConfigError, never>;
|
|
56
|
-
isEnabled: Effect.Effect<boolean,
|
|
56
|
+
isEnabled: Effect.Effect<boolean, import("effect/ConfigError").ConfigError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException, never>;
|
|
57
57
|
}, import("effect/ConfigError").ConfigError, SMTPMailer | Logger>;
|
|
58
|
-
readonly dependencies: readonly [Layer.Layer<Logger, never, never>, Layer.Layer<SMTPMailer, import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("
|
|
58
|
+
readonly dependencies: readonly [Layer.Layer<Logger, never, never>, Layer.Layer<SMTPMailer, import("effect/ConfigError").ConfigError | import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/smtp").SMTPError, never>];
|
|
59
59
|
readonly accessors: true;
|
|
60
60
|
}>;
|
|
61
61
|
export declare class Mailer extends Mailer_base {
|
|
62
|
-
static Provide: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("
|
|
62
|
+
static Provide: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, import("effect/ConfigError").ConfigError | import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/smtp").SMTPError | E, Exclude<R, Mailer>>;
|
|
63
63
|
}
|
|
64
64
|
export {};
|
|
@@ -72,13 +72,13 @@ export type AdminNotification = keyof AdminNotifications;
|
|
|
72
72
|
export declare const makeLogger: Effect.Effect<import("astro").AstroIntegrationLogger, never, never>;
|
|
73
73
|
declare const Notifications_base: Effect.Service.Class<Notifications, "studiocms/lib/notifier/Notifications", {
|
|
74
74
|
readonly effect: Effect.Effect<{
|
|
75
|
-
sendUserNotification: <T extends UserNotification>(notification: T, userId: string) => Effect.Effect<void,
|
|
76
|
-
sendEditorNotification: <T extends EditorNotification, K extends Parameters<EditorNotifications[T]>[0]>(notification: T, data: K) => Effect.Effect<void,
|
|
77
|
-
sendAdminNotification: <T extends AdminNotification, K extends Parameters<AdminNotifications[T]>[0]>(notification: T, data: K) => Effect.Effect<void,
|
|
75
|
+
sendUserNotification: <T extends UserNotification>(notification: T, userId: string) => Effect.Effect<void, Error | import("effect/ConfigError").ConfigError, never>;
|
|
76
|
+
sendEditorNotification: <T extends EditorNotification, K extends Parameters<EditorNotifications[T]>[0]>(notification: T, data: K) => Effect.Effect<void, Error | import("effect/ConfigError").ConfigError, never>;
|
|
77
|
+
sendAdminNotification: <T extends AdminNotification, K extends Parameters<AdminNotifications[T]>[0]>(notification: T, data: K) => Effect.Effect<void, Error | import("effect/ConfigError").ConfigError, never>;
|
|
78
78
|
}, import("effect/ConfigError").ConfigError, import("../mailer/index.js").Mailer>;
|
|
79
|
-
readonly dependencies: readonly [import("effect/Layer").Layer<import("../mailer/index.js").Mailer, import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("
|
|
79
|
+
readonly dependencies: readonly [import("effect/Layer").Layer<import("../mailer/index.js").Mailer, import("effect/ConfigError").ConfigError | import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/smtp").SMTPError, never>];
|
|
80
80
|
}>;
|
|
81
81
|
export declare class Notifications extends Notifications_base {
|
|
82
|
-
static Provide: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("
|
|
82
|
+
static Provide: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, import("effect/ConfigError").ConfigError | import("../sdk/index.js").DBClientInitializationError | import("../sdk/index.js").SDKInitializationError | import("@withstudiocms/kysely/client").DBCallbackFailure | import("@withstudiocms/kysely/core/errors").DatabaseError | import("effect/Cause").UnknownException | import("@withstudiocms/effect/smtp").SMTPError | E, Exclude<R, Notifications>>;
|
|
83
83
|
}
|
|
84
84
|
export {};
|
|
@@ -4,68 +4,6 @@
|
|
|
4
4
|
* @returns An object containing `userPages` and `adminPages`.
|
|
5
5
|
*/
|
|
6
6
|
export declare function getPluginDashboardPages(): {
|
|
7
|
-
userPages: (
|
|
8
|
-
|
|
9
|
-
description: string;
|
|
10
|
-
route: string;
|
|
11
|
-
pageBodyComponent: string;
|
|
12
|
-
slug: string;
|
|
13
|
-
components: {
|
|
14
|
-
PageBodyComponent: (_props: any) => any;
|
|
15
|
-
PageActionsComponent?: ((_props: any) => any) | undefined;
|
|
16
|
-
InnerSidebarComponent?: ((_props: any) => any) | undefined;
|
|
17
|
-
};
|
|
18
|
-
sidebar: "single";
|
|
19
|
-
icon?: string | undefined;
|
|
20
|
-
requiredPermissions?: "owner" | "admin" | "editor" | "visitor" | "none" | undefined;
|
|
21
|
-
pageActionsComponent?: string | undefined;
|
|
22
|
-
} | {
|
|
23
|
-
title: Record<string, string>;
|
|
24
|
-
description: string;
|
|
25
|
-
route: string;
|
|
26
|
-
pageBodyComponent: string;
|
|
27
|
-
slug: string;
|
|
28
|
-
components: {
|
|
29
|
-
PageBodyComponent: (_props: any) => any;
|
|
30
|
-
PageActionsComponent?: ((_props: any) => any) | undefined;
|
|
31
|
-
InnerSidebarComponent?: ((_props: any) => any) | undefined;
|
|
32
|
-
};
|
|
33
|
-
sidebar: "double";
|
|
34
|
-
innerSidebarComponent: string;
|
|
35
|
-
icon?: string | undefined;
|
|
36
|
-
requiredPermissions?: "owner" | "admin" | "editor" | "visitor" | "none" | undefined;
|
|
37
|
-
pageActionsComponent?: string | undefined;
|
|
38
|
-
})[];
|
|
39
|
-
adminPages: ({
|
|
40
|
-
title: Record<string, string>;
|
|
41
|
-
description: string;
|
|
42
|
-
route: string;
|
|
43
|
-
pageBodyComponent: string;
|
|
44
|
-
slug: string;
|
|
45
|
-
components: {
|
|
46
|
-
PageBodyComponent: (_props: any) => any;
|
|
47
|
-
PageActionsComponent?: ((_props: any) => any) | undefined;
|
|
48
|
-
InnerSidebarComponent?: ((_props: any) => any) | undefined;
|
|
49
|
-
};
|
|
50
|
-
sidebar: "single";
|
|
51
|
-
icon?: string | undefined;
|
|
52
|
-
requiredPermissions?: "owner" | "admin" | "editor" | "visitor" | "none" | undefined;
|
|
53
|
-
pageActionsComponent?: string | undefined;
|
|
54
|
-
} | {
|
|
55
|
-
title: Record<string, string>;
|
|
56
|
-
description: string;
|
|
57
|
-
route: string;
|
|
58
|
-
pageBodyComponent: string;
|
|
59
|
-
slug: string;
|
|
60
|
-
components: {
|
|
61
|
-
PageBodyComponent: (_props: any) => any;
|
|
62
|
-
PageActionsComponent?: ((_props: any) => any) | undefined;
|
|
63
|
-
InnerSidebarComponent?: ((_props: any) => any) | undefined;
|
|
64
|
-
};
|
|
65
|
-
sidebar: "double";
|
|
66
|
-
innerSidebarComponent: string;
|
|
67
|
-
icon?: string | undefined;
|
|
68
|
-
requiredPermissions?: "owner" | "admin" | "editor" | "visitor" | "none" | undefined;
|
|
69
|
-
pageActionsComponent?: string | undefined;
|
|
70
|
-
})[];
|
|
7
|
+
userPages: (import("../../schemas/plugins/shared").FinalSingleSchema | import("../../schemas/plugins/shared").FinalDoubleSchema)[];
|
|
8
|
+
adminPages: (import("../../schemas/plugins/shared").FinalSingleSchema | import("../../schemas/plugins/shared").FinalDoubleSchema)[];
|
|
71
9
|
};
|
|
@@ -1,172 +1 @@
|
|
|
1
|
-
|
|
2
|
-
key: string;
|
|
3
|
-
size: number;
|
|
4
|
-
lastModified?: Date;
|
|
5
|
-
}
|
|
6
|
-
interface MimeTypeMap {
|
|
7
|
-
[key: string]: string;
|
|
8
|
-
}
|
|
9
|
-
type StorageReturnType = 'url' | 'identifier' | 'key';
|
|
10
|
-
declare const s3SafeNameRegex: RegExp;
|
|
11
|
-
/**
|
|
12
|
-
* Translation strings for the StorageFileBrowser
|
|
13
|
-
*/
|
|
14
|
-
interface TranslationStrings {
|
|
15
|
-
selectFile: string;
|
|
16
|
-
closeFileBrowser: string;
|
|
17
|
-
upload: string;
|
|
18
|
-
newFolder: string;
|
|
19
|
-
refresh: string;
|
|
20
|
-
root: string;
|
|
21
|
-
loadingFiles: string;
|
|
22
|
-
testingConnection: string;
|
|
23
|
-
noFilesHere: string;
|
|
24
|
-
noFileSelected: string;
|
|
25
|
-
cancel: string;
|
|
26
|
-
select: string;
|
|
27
|
-
delete: string;
|
|
28
|
-
customizeFilenames: string;
|
|
29
|
-
filename: string;
|
|
30
|
-
deleteFile: string;
|
|
31
|
-
deleteFileConfirm: string;
|
|
32
|
-
deleteFolder: string;
|
|
33
|
-
deleteFolderConfirm: string;
|
|
34
|
-
createNewFolder: string;
|
|
35
|
-
folderName: string;
|
|
36
|
-
create: string;
|
|
37
|
-
renameFile: string;
|
|
38
|
-
renameFolder: string;
|
|
39
|
-
newName: string;
|
|
40
|
-
rename: string;
|
|
41
|
-
preview: string;
|
|
42
|
-
download: string;
|
|
43
|
-
close: string;
|
|
44
|
-
creatingFolder: string;
|
|
45
|
-
uploadingFiles: string;
|
|
46
|
-
uploadProgress: string;
|
|
47
|
-
deletingFile: string;
|
|
48
|
-
deletingFolder: string;
|
|
49
|
-
renamingFile: string;
|
|
50
|
-
renamingFolder: string;
|
|
51
|
-
failedToLoadFiles: string;
|
|
52
|
-
failedToCreateFolder: string;
|
|
53
|
-
failedToUploadFiles: string;
|
|
54
|
-
failedToDeleteFile: string;
|
|
55
|
-
failedToDeleteFolder: string;
|
|
56
|
-
failedToRenameFile: string;
|
|
57
|
-
failedToRenameFolder: string;
|
|
58
|
-
failedToPreviewFile: string;
|
|
59
|
-
failedToLoadImage: string;
|
|
60
|
-
failedConnection: string;
|
|
61
|
-
checkConfiguration: string;
|
|
62
|
-
noStorageConfigured: string;
|
|
63
|
-
unknownError: string;
|
|
64
|
-
fileBrowserActions: string;
|
|
65
|
-
filePathBreadcrumb: string;
|
|
66
|
-
fileUploadInput: string;
|
|
67
|
-
fileBrowserContent: string;
|
|
68
|
-
filesAndFolders: string;
|
|
69
|
-
folderLabel: string;
|
|
70
|
-
fileLabel: string;
|
|
71
|
-
renameLabel: string;
|
|
72
|
-
deleteLabel: string;
|
|
73
|
-
previewLabel: string;
|
|
74
|
-
filenameForLabel: string;
|
|
75
|
-
uploadProgressLabel: string;
|
|
76
|
-
original: string;
|
|
77
|
-
size: string;
|
|
78
|
-
andAllItsContents: string;
|
|
79
|
-
filePreview: string;
|
|
80
|
-
}
|
|
81
|
-
declare class InvalidFileNameError extends Error {
|
|
82
|
-
#private;
|
|
83
|
-
constructor(files: string[]);
|
|
84
|
-
get files(): string[];
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* StorageFileBrowser Custom Element
|
|
88
|
-
* A web component for browsing and selecting files from cloud storage
|
|
89
|
-
*/
|
|
90
|
-
declare class StorageFileBrowser extends HTMLElement {
|
|
91
|
-
private currentPath;
|
|
92
|
-
private selectedFile;
|
|
93
|
-
private triggerId;
|
|
94
|
-
private targetInputId;
|
|
95
|
-
private fileTypes;
|
|
96
|
-
private filesOnly;
|
|
97
|
-
private returnType;
|
|
98
|
-
private modalId;
|
|
99
|
-
private contentId;
|
|
100
|
-
private isUploading;
|
|
101
|
-
private apiEndpoint;
|
|
102
|
-
private pendingFiles;
|
|
103
|
-
private fileToDelete;
|
|
104
|
-
private fileToRename;
|
|
105
|
-
private connectionEstablished;
|
|
106
|
-
private currentLocale;
|
|
107
|
-
private translations;
|
|
108
|
-
private translationMap;
|
|
109
|
-
private localI18nStorageKey;
|
|
110
|
-
private connectionTestResponse;
|
|
111
|
-
constructor();
|
|
112
|
-
/**
|
|
113
|
-
* Helper to select single element within shadow DOM
|
|
114
|
-
*/
|
|
115
|
-
private $;
|
|
116
|
-
/**
|
|
117
|
-
* Helper to select multiple elements within shadow DOM
|
|
118
|
-
*/
|
|
119
|
-
private $all;
|
|
120
|
-
/**
|
|
121
|
-
* Helper to select element by ID in the main document
|
|
122
|
-
*/
|
|
123
|
-
private $$id;
|
|
124
|
-
private getAttr;
|
|
125
|
-
/**
|
|
126
|
-
* Set the current locale and update translations
|
|
127
|
-
*/
|
|
128
|
-
private setLocale;
|
|
129
|
-
/**
|
|
130
|
-
* Update locale from localStorage or fallback to 'en'
|
|
131
|
-
*/
|
|
132
|
-
private updateLocale;
|
|
133
|
-
/**
|
|
134
|
-
* Get translation for a key
|
|
135
|
-
*/
|
|
136
|
-
private t;
|
|
137
|
-
private resetEventListeners;
|
|
138
|
-
connectedCallback(): void;
|
|
139
|
-
/**
|
|
140
|
-
* Render the component
|
|
141
|
-
*/
|
|
142
|
-
private render;
|
|
143
|
-
onloadTest(trigger: HTMLButtonElement): Promise<void>;
|
|
144
|
-
private attachEventListeners;
|
|
145
|
-
private testConnection;
|
|
146
|
-
private loadFiles;
|
|
147
|
-
private navigateToFolder;
|
|
148
|
-
private navigateToPath;
|
|
149
|
-
private updateBreadcrumb;
|
|
150
|
-
private updateSelectedInfo;
|
|
151
|
-
private formatBytes;
|
|
152
|
-
private formatFileName;
|
|
153
|
-
private getMimeType;
|
|
154
|
-
private getFileIcon;
|
|
155
|
-
private getDefaultIcon;
|
|
156
|
-
private showUploadDialog;
|
|
157
|
-
private showDeleteFolderConfirmation;
|
|
158
|
-
private showDeleteConfirmation;
|
|
159
|
-
private deleteFile;
|
|
160
|
-
private renameFolder;
|
|
161
|
-
private deleteFolder;
|
|
162
|
-
private showCreateFolderDialog;
|
|
163
|
-
private createFolder;
|
|
164
|
-
private escapeHtml;
|
|
165
|
-
private uploadFilesWithCustomNames;
|
|
166
|
-
private uploadSingleFile;
|
|
167
|
-
private showRenameFolderDialog;
|
|
168
|
-
private showRenameDialog;
|
|
169
|
-
private renameFile;
|
|
170
|
-
private isFilePreviewable;
|
|
171
|
-
private showPreview;
|
|
172
|
-
}
|
|
1
|
+
export {};
|