@basicbenframework/cms 0.0.0-stage → 0.6.1
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/LICENSE +9 -0
- package/README.md +206 -2
- package/db/migrations/001_create_users.js +15 -0
- package/db/migrations/002_create_posts.js +18 -0
- package/db/migrations/003_create_categories.js +19 -0
- package/db/migrations/004_create_tags.js +16 -0
- package/db/migrations/005_create_post_tags.js +16 -0
- package/db/migrations/006_create_pages.js +26 -0
- package/db/migrations/007_create_comments.js +24 -0
- package/db/migrations/008_create_media.js +22 -0
- package/db/migrations/009_update_posts_blogging.js +27 -0
- package/db/migrations/010_create_settings.js +29 -0
- package/db/migrations/011_add_user_roles.js +23 -0
- package/db/migrations/012_create_auth_tokens.js +30 -0
- package/db/migrations/013_add_email_verified.js +24 -0
- package/db/migrations/014_create_user_two_factor.js +30 -0
- package/db/migrations/015_create_user_credentials.js +35 -0
- package/db/migrations/016_create_rate_limits.js +31 -0
- package/db/migrations/017_add_content_html.js +38 -0
- package/db/migrations/018_create_api_tokens.js +34 -0
- package/db/migrations/019_create_post_categories.js +40 -0
- package/db/migrations/020_add_author_profiles.js +60 -0
- package/db/migrations/021_add_page_featured_image.js +23 -0
- package/db/migrations/022_backfill_post_slugs_and_excerpts.js +57 -0
- package/db/migrations/023_add_user_session_controls.js +25 -0
- package/db/migrations/024_add_post_status_and_trash.js +45 -0
- package/db/migrations/025_add_social_and_indexing_fields.js +40 -0
- package/db/migrations/026_create_post_revisions.js +29 -0
- package/db/migrations/027_add_media_dimensions.js +19 -0
- package/db/migrations/028_create_navigation_menus.js +65 -0
- package/db/migrations/029_create_redirects.js +40 -0
- package/db/migrations/030_add_comment_status_and_notifications.js +53 -0
- package/db/migrations/031_create_post_locks.js +38 -0
- package/db/migrations/032_create_snippets.js +31 -0
- package/db/migrations/033_create_members.js +70 -0
- package/db/migrations/034_add_post_visibility.js +28 -0
- package/db/migrations/035_create_newsletters.js +72 -0
- package/db/migrations/036_create_analytics.js +89 -0
- package/db/migrations/037_create_ops_heartbeats.js +30 -0
- package/db/migrations/038_create_content_types.js +84 -0
- package/db/migrations/039_create_content_type_fields.js +47 -0
- package/db/migrations/040_create_taxonomies.js +80 -0
- package/db/migrations/041_add_newsletter_handoff.js +28 -0
- package/db/migrations/042_create_mysendbox_contacts.js +63 -0
- package/lib/cli/backup.d.mts +2 -0
- package/lib/cli/backup.mjs +124 -0
- package/lib/cli/export.d.mts +2 -0
- package/lib/cli/export.mjs +54 -0
- package/lib/cli/import-ghost.d.mts +2 -0
- package/lib/cli/import-ghost.mjs +50 -0
- package/lib/cli/import-json.d.mts +2 -0
- package/lib/cli/import-json.mjs +61 -0
- package/lib/cli/import-wordpress.d.mts +2 -0
- package/lib/cli/import-wordpress.mjs +169 -0
- package/lib/cli/import-wxr.d.mts +2 -0
- package/lib/cli/import-wxr.mjs +55 -0
- package/lib/cli/index.d.mts +2 -0
- package/lib/cli/index.mjs +53 -0
- package/lib/cli/lib/backup.d.mts +112 -0
- package/lib/cli/lib/backup.mjs +297 -0
- package/lib/cli/lib/ghost.d.mts +30 -0
- package/lib/cli/lib/ghost.mjs +201 -0
- package/lib/cli/lib/html-to-markdown.d.mts +61 -0
- package/lib/cli/lib/html-to-markdown.mjs +523 -0
- package/lib/cli/lib/import-common.d.mts +100 -0
- package/lib/cli/lib/import-common.mjs +252 -0
- package/lib/cli/lib/json-import.d.mts +22 -0
- package/lib/cli/lib/json-import.mjs +422 -0
- package/lib/cli/lib/site-import.d.mts +32 -0
- package/lib/cli/lib/site-import.mjs +456 -0
- package/lib/cli/lib/wordpress-rest.d.mts +25 -0
- package/lib/cli/lib/wordpress-rest.mjs +177 -0
- package/lib/cli/lib/wxr.d.mts +18 -0
- package/lib/cli/lib/wxr.mjs +307 -0
- package/lib/cli/lib/xml.d.mts +33 -0
- package/lib/cli/lib/xml.mjs +186 -0
- package/lib/cli/restore.d.mts +2 -0
- package/lib/cli/restore.mjs +98 -0
- package/lib/client/components/Alert.d.ts +7 -0
- package/lib/client/components/Alert.js +8 -0
- package/lib/client/components/Avatar.d.ts +15 -0
- package/lib/client/components/Avatar.js +10 -0
- package/lib/client/components/BackLink.d.ts +7 -0
- package/lib/client/components/BackLink.js +6 -0
- package/lib/client/components/Button.d.ts +7 -0
- package/lib/client/components/Button.js +12 -0
- package/lib/client/components/Card.d.ts +7 -0
- package/lib/client/components/Card.js +6 -0
- package/lib/client/components/CommentThread.d.ts +15 -0
- package/lib/client/components/CommentThread.js +101 -0
- package/lib/client/components/Empty.d.ts +6 -0
- package/lib/client/components/Empty.js +6 -0
- package/lib/client/components/Input.d.ts +6 -0
- package/lib/client/components/Input.js +6 -0
- package/lib/client/components/Link.d.ts +31 -0
- package/lib/client/components/Link.js +49 -0
- package/lib/client/components/Loading.d.ts +1 -0
- package/lib/client/components/Loading.js +6 -0
- package/lib/client/components/Logo.d.ts +5 -0
- package/lib/client/components/Logo.js +4 -0
- package/lib/client/components/MarkdownEditor.d.ts +41 -0
- package/lib/client/components/MarkdownEditor.js +156 -0
- package/lib/client/components/Nav/DarkModeToggle.d.ts +6 -0
- package/lib/client/components/Nav/DarkModeToggle.js +6 -0
- package/lib/client/components/Nav/DesktopNav.d.ts +8 -0
- package/lib/client/components/Nav/DesktopNav.js +9 -0
- package/lib/client/components/Nav/MobileNav.d.ts +9 -0
- package/lib/client/components/Nav/MobileNav.js +15 -0
- package/lib/client/components/NavLink.d.ts +8 -0
- package/lib/client/components/NavLink.js +6 -0
- package/lib/client/components/PageHeader.d.ts +8 -0
- package/lib/client/components/PageHeader.js +6 -0
- package/lib/client/components/PostCard.d.ts +8 -0
- package/lib/client/components/PostCard.js +7 -0
- package/lib/client/components/Textarea.d.ts +6 -0
- package/lib/client/components/Textarea.js +6 -0
- package/lib/client/components/ThemeContext.d.ts +18 -0
- package/lib/client/components/ThemeContext.js +8 -0
- package/lib/client/components/admin/AdminIcons.d.ts +13 -0
- package/lib/client/components/admin/AdminIcons.js +66 -0
- package/lib/client/components/admin/ContentModelPanels.d.ts +22 -0
- package/lib/client/components/admin/ContentModelPanels.js +93 -0
- package/lib/client/components/admin/FeaturedImageBox.d.ts +21 -0
- package/lib/client/components/admin/FeaturedImageBox.js +24 -0
- package/lib/client/components/admin/MediaGrid.d.ts +23 -0
- package/lib/client/components/admin/MediaGrid.js +69 -0
- package/lib/client/components/admin/MediaPicker.d.ts +17 -0
- package/lib/client/components/admin/MediaPicker.js +61 -0
- package/lib/client/components/admin/Pagination.d.ts +27 -0
- package/lib/client/components/admin/Pagination.js +29 -0
- package/lib/client/components/admin/SnippetPicker.d.ts +27 -0
- package/lib/client/components/admin/SnippetPicker.js +65 -0
- package/lib/client/components/admin/TermPicker.d.ts +52 -0
- package/lib/client/components/admin/TermPicker.js +58 -0
- package/lib/client/contexts/ToastContext.d.ts +12 -0
- package/lib/client/contexts/ToastContext.js +49 -0
- package/lib/client/features.d.ts +11 -0
- package/lib/client/features.js +7 -0
- package/lib/client/hooks/useContentTypes.d.ts +48 -0
- package/lib/client/hooks/useContentTypes.js +48 -0
- package/lib/client/hooks/useMediaLibrary.d.ts +46 -0
- package/lib/client/hooks/useMediaLibrary.js +189 -0
- package/lib/client/hooks/usePostLock.d.ts +32 -0
- package/lib/client/hooks/usePostLock.js +107 -0
- package/lib/client/host/index.d.ts +71 -0
- package/lib/client/host/index.js +58 -0
- package/lib/client/i18n/index.d.ts +79 -0
- package/lib/client/i18n/index.js +177 -0
- package/lib/client/i18n/locales/es/content.d.ts +4 -0
- package/lib/client/i18n/locales/es/content.js +220 -0
- package/lib/client/i18n/locales/es/editor.d.ts +9 -0
- package/lib/client/i18n/locales/es/editor.js +144 -0
- package/lib/client/i18n/locales/es/index.d.ts +8 -0
- package/lib/client/i18n/locales/es/index.js +7 -0
- package/lib/client/i18n/locales/es/layout.d.ts +4 -0
- package/lib/client/i18n/locales/es/layout.js +35 -0
- package/lib/client/i18n/locales/es/people.d.ts +4 -0
- package/lib/client/i18n/locales/es/people.js +187 -0
- package/lib/client/i18n/locales/es/site.d.ts +4 -0
- package/lib/client/i18n/locales/es/site.js +208 -0
- package/lib/client/layouts/AdminLayout.d.ts +7 -0
- package/lib/client/layouts/AdminLayout.js +1046 -0
- package/lib/client/layouts/AppLayout.d.ts +6 -0
- package/lib/client/layouts/AppLayout.js +19 -0
- package/lib/client/layouts/AuthLayout.d.ts +6 -0
- package/lib/client/layouts/AuthLayout.js +14 -0
- package/lib/client/layouts/DocsLayout.d.ts +6 -0
- package/lib/client/layouts/DocsLayout.js +28 -0
- package/lib/client/layouts/RootLayout.d.ts +6 -0
- package/lib/client/layouts/RootLayout.js +11 -0
- package/lib/client/pages/AcceptInvite.d.ts +8 -0
- package/lib/client/pages/AcceptInvite.js +60 -0
- package/lib/client/pages/Auth.d.ts +1 -0
- package/lib/client/pages/Auth.js +40 -0
- package/lib/client/pages/Authentication.d.ts +1 -0
- package/lib/client/pages/Authentication.js +230 -0
- package/lib/client/pages/Content.d.ts +1 -0
- package/lib/client/pages/Content.js +21 -0
- package/lib/client/pages/Database.d.ts +1 -0
- package/lib/client/pages/Database.js +264 -0
- package/lib/client/pages/Extending.d.ts +1 -0
- package/lib/client/pages/Extending.js +28 -0
- package/lib/client/pages/Feed.d.ts +1 -0
- package/lib/client/pages/Feed.js +19 -0
- package/lib/client/pages/FeedPost.d.ts +1 -0
- package/lib/client/pages/FeedPost.js +31 -0
- package/lib/client/pages/ForgotPassword.d.ts +8 -0
- package/lib/client/pages/ForgotPassword.js +38 -0
- package/lib/client/pages/GettingStarted.d.ts +1 -0
- package/lib/client/pages/GettingStarted.js +84 -0
- package/lib/client/pages/Headless.d.ts +1 -0
- package/lib/client/pages/Headless.js +49 -0
- package/lib/client/pages/Home.d.ts +1 -0
- package/lib/client/pages/Home.js +67 -0
- package/lib/client/pages/PostForm.d.ts +1 -0
- package/lib/client/pages/PostForm.js +55 -0
- package/lib/client/pages/Posts.d.ts +1 -0
- package/lib/client/pages/Posts.js +35 -0
- package/lib/client/pages/Profile.d.ts +1 -0
- package/lib/client/pages/Profile.js +153 -0
- package/lib/client/pages/ResetPassword.d.ts +8 -0
- package/lib/client/pages/ResetPassword.js +52 -0
- package/lib/client/pages/Routing.d.ts +1 -0
- package/lib/client/pages/Routing.js +192 -0
- package/lib/client/pages/Storage.d.ts +1 -0
- package/lib/client/pages/Storage.js +54 -0
- package/lib/client/pages/Testing.d.ts +1 -0
- package/lib/client/pages/Testing.js +141 -0
- package/lib/client/pages/Validation.d.ts +1 -0
- package/lib/client/pages/Validation.js +123 -0
- package/lib/client/pages/admin/Categories.d.ts +2 -0
- package/lib/client/pages/admin/Categories.js +75 -0
- package/lib/client/pages/admin/Comments.d.ts +11 -0
- package/lib/client/pages/admin/Comments.js +247 -0
- package/lib/client/pages/admin/ContentTypes.d.ts +2 -0
- package/lib/client/pages/admin/ContentTypes.js +163 -0
- package/lib/client/pages/admin/Dashboard.d.ts +2 -0
- package/lib/client/pages/admin/Dashboard.js +66 -0
- package/lib/client/pages/admin/Health.d.ts +12 -0
- package/lib/client/pages/admin/Health.js +148 -0
- package/lib/client/pages/admin/Media.d.ts +2 -0
- package/lib/client/pages/admin/Media.js +101 -0
- package/lib/client/pages/admin/Navigation.d.ts +9 -0
- package/lib/client/pages/admin/Navigation.js +230 -0
- package/lib/client/pages/admin/Pages.d.ts +2 -0
- package/lib/client/pages/admin/Pages.js +53 -0
- package/lib/client/pages/admin/PostEditor.d.ts +17 -0
- package/lib/client/pages/admin/PostEditor.js +532 -0
- package/lib/client/pages/admin/Posts.d.ts +2 -0
- package/lib/client/pages/admin/Posts.js +152 -0
- package/lib/client/pages/admin/Redirects.d.ts +10 -0
- package/lib/client/pages/admin/Redirects.js +87 -0
- package/lib/client/pages/admin/Settings.d.ts +2 -0
- package/lib/client/pages/admin/Settings.js +111 -0
- package/lib/client/pages/admin/Snippets.d.ts +14 -0
- package/lib/client/pages/admin/Snippets.js +85 -0
- package/lib/client/pages/admin/Tags.d.ts +2 -0
- package/lib/client/pages/admin/Tags.js +74 -0
- package/lib/client/pages/admin/Taxonomies.d.ts +2 -0
- package/lib/client/pages/admin/Taxonomies.js +130 -0
- package/lib/client/pages/admin/Tokens.d.ts +9 -0
- package/lib/client/pages/admin/Tokens.js +260 -0
- package/lib/client/pages/admin/Tools.d.ts +12 -0
- package/lib/client/pages/admin/Tools.js +111 -0
- package/lib/client/pages/admin/Users.d.ts +13 -0
- package/lib/client/pages/admin/Users.js +313 -0
- package/lib/client/pages/api-reference.d.ts +33 -0
- package/lib/client/pages/api-reference.js +198 -0
- package/lib/client/styles.css +37 -0
- package/lib/config.d.ts +24 -0
- package/lib/config.js +39 -0
- package/lib/controllers/AdminController.d.ts +46 -0
- package/lib/controllers/AdminController.js +134 -0
- package/lib/controllers/AuthController.d.ts +15 -0
- package/lib/controllers/AuthController.js +194 -0
- package/lib/controllers/AuthorController.d.ts +17 -0
- package/lib/controllers/AuthorController.js +19 -0
- package/lib/controllers/CategoryController.d.ts +10 -0
- package/lib/controllers/CategoryController.js +88 -0
- package/lib/controllers/CommentController.d.ts +68 -0
- package/lib/controllers/CommentController.js +438 -0
- package/lib/controllers/ContentTypeController.d.ts +24 -0
- package/lib/controllers/ContentTypeController.js +91 -0
- package/lib/controllers/EmailVerificationController.d.ts +33 -0
- package/lib/controllers/EmailVerificationController.js +116 -0
- package/lib/controllers/ExportController.d.ts +15 -0
- package/lib/controllers/ExportController.js +41 -0
- package/lib/controllers/FeedController.d.ts +14 -0
- package/lib/controllers/FeedController.js +246 -0
- package/lib/controllers/HealthController.d.ts +21 -0
- package/lib/controllers/HealthController.js +176 -0
- package/lib/controllers/HomeController.d.ts +12 -0
- package/lib/controllers/HomeController.js +16 -0
- package/lib/controllers/MediaController.d.ts +24 -0
- package/lib/controllers/MediaController.js +189 -0
- package/lib/controllers/NavigationController.d.ts +22 -0
- package/lib/controllers/NavigationController.js +176 -0
- package/lib/controllers/PageController.d.ts +13 -0
- package/lib/controllers/PageController.js +172 -0
- package/lib/controllers/PasskeyController.d.ts +36 -0
- package/lib/controllers/PasskeyController.js +201 -0
- package/lib/controllers/PasswordResetController.d.ts +44 -0
- package/lib/controllers/PasswordResetController.js +160 -0
- package/lib/controllers/PostController.d.ts +51 -0
- package/lib/controllers/PostController.js +538 -0
- package/lib/controllers/PostLockController.d.ts +62 -0
- package/lib/controllers/PostLockController.js +101 -0
- package/lib/controllers/ProfileController.d.ts +13 -0
- package/lib/controllers/ProfileController.js +160 -0
- package/lib/controllers/PublicApiController.d.ts +23 -0
- package/lib/controllers/PublicApiController.js +100 -0
- package/lib/controllers/RedirectController.d.ts +32 -0
- package/lib/controllers/RedirectController.js +95 -0
- package/lib/controllers/SettingsController.d.ts +28 -0
- package/lib/controllers/SettingsController.js +105 -0
- package/lib/controllers/SnippetController.d.ts +27 -0
- package/lib/controllers/SnippetController.js +123 -0
- package/lib/controllers/TagController.d.ts +9 -0
- package/lib/controllers/TagController.js +70 -0
- package/lib/controllers/TaxonomyController.d.ts +24 -0
- package/lib/controllers/TaxonomyController.js +149 -0
- package/lib/controllers/TokenController.d.ts +27 -0
- package/lib/controllers/TokenController.js +83 -0
- package/lib/controllers/TwoFactorController.d.ts +31 -0
- package/lib/controllers/TwoFactorController.js +213 -0
- package/lib/controllers/UserController.d.ts +110 -0
- package/lib/controllers/UserController.js +504 -0
- package/lib/features/analytics/AnalyticsPage.d.ts +11 -0
- package/lib/features/analytics/AnalyticsPage.js +123 -0
- package/lib/features/analytics/admin.d.ts +3 -0
- package/lib/features/analytics/admin.js +9 -0
- package/lib/features/analytics/controller.d.ts +19 -0
- package/lib/features/analytics/controller.js +79 -0
- package/lib/features/analytics/helpers.d.ts +84 -0
- package/lib/features/analytics/helpers.js +181 -0
- package/lib/features/analytics/i18n/es.d.ts +4 -0
- package/lib/features/analytics/i18n/es.js +31 -0
- package/lib/features/analytics/index.d.ts +28 -0
- package/lib/features/analytics/index.js +91 -0
- package/lib/features/analytics/manifest.d.ts +8 -0
- package/lib/features/analytics/manifest.js +18 -0
- package/lib/features/analytics/model.d.ts +130 -0
- package/lib/features/analytics/model.js +206 -0
- package/lib/features/members/Member.d.ts +93 -0
- package/lib/features/members/Member.js +194 -0
- package/lib/features/members/MemberAdminController.d.ts +60 -0
- package/lib/features/members/MemberAdminController.js +262 -0
- package/lib/features/members/MemberController.d.ts +88 -0
- package/lib/features/members/MemberController.js +250 -0
- package/lib/features/members/MembersPage.d.ts +10 -0
- package/lib/features/members/MembersPage.js +216 -0
- package/lib/features/members/PostAccessBox.d.ts +15 -0
- package/lib/features/members/PostAccessBox.js +70 -0
- package/lib/features/members/admin.d.ts +3 -0
- package/lib/features/members/admin.js +12 -0
- package/lib/features/members/csv.d.ts +21 -0
- package/lib/features/members/csv.js +74 -0
- package/lib/features/members/events.d.ts +34 -0
- package/lib/features/members/events.js +34 -0
- package/lib/features/members/i18n/es.d.ts +4 -0
- package/lib/features/members/i18n/es.js +106 -0
- package/lib/features/members/index.d.ts +44 -0
- package/lib/features/members/index.js +106 -0
- package/lib/features/members/manifest.d.ts +8 -0
- package/lib/features/members/manifest.js +18 -0
- package/lib/features/members/middleware.d.ts +42 -0
- package/lib/features/members/middleware.js +74 -0
- package/lib/features/members/newsletter.d.ts +177 -0
- package/lib/features/members/newsletter.js +439 -0
- package/lib/features/members/rate-limits.d.ts +34 -0
- package/lib/features/members/rate-limits.js +50 -0
- package/lib/features/members/request.d.ts +13 -0
- package/lib/features/members/request.js +6 -0
- package/lib/features/members/routes.d.ts +15 -0
- package/lib/features/members/routes.js +59 -0
- package/lib/features/members/session.d.ts +102 -0
- package/lib/features/members/session.js +158 -0
- package/lib/features/members/settings.d.ts +14 -0
- package/lib/features/members/settings.js +23 -0
- package/lib/features/mysendbox/MySendboxSettingsCard.d.ts +7 -0
- package/lib/features/mysendbox/MySendboxSettingsCard.js +48 -0
- package/lib/features/mysendbox/admin.d.ts +3 -0
- package/lib/features/mysendbox/admin.js +9 -0
- package/lib/features/mysendbox/broadcasts.d.ts +61 -0
- package/lib/features/mysendbox/broadcasts.js +124 -0
- package/lib/features/mysendbox/client.d.ts +95 -0
- package/lib/features/mysendbox/client.js +61 -0
- package/lib/features/mysendbox/config.d.ts +27 -0
- package/lib/features/mysendbox/config.js +74 -0
- package/lib/features/mysendbox/contacts.d.ts +121 -0
- package/lib/features/mysendbox/contacts.js +378 -0
- package/lib/features/mysendbox/controller.d.ts +11 -0
- package/lib/features/mysendbox/controller.js +47 -0
- package/lib/features/mysendbox/i18n/es.d.ts +4 -0
- package/lib/features/mysendbox/i18n/es.js +28 -0
- package/lib/features/mysendbox/index.d.ts +18 -0
- package/lib/features/mysendbox/index.js +71 -0
- package/lib/features/mysendbox/manifest.d.ts +7 -0
- package/lib/features/mysendbox/manifest.js +6 -0
- package/lib/features/mysendbox/routes.d.ts +6 -0
- package/lib/features/mysendbox/routes.js +14 -0
- package/lib/features/mysendbox/webhook.d.ts +23 -0
- package/lib/features/mysendbox/webhook.js +104 -0
- package/lib/features/theme/OEmbedController.d.ts +31 -0
- package/lib/features/theme/OEmbedController.js +128 -0
- package/lib/features/theme/ThemeController.d.ts +20 -0
- package/lib/features/theme/ThemeController.js +256 -0
- package/lib/features/theme/ThemeSettingsCard.d.ts +7 -0
- package/lib/features/theme/ThemeSettingsCard.js +12 -0
- package/lib/features/theme/admin.d.ts +3 -0
- package/lib/features/theme/admin.js +9 -0
- package/lib/features/theme/html.d.ts +48 -0
- package/lib/features/theme/html.js +97 -0
- package/lib/features/theme/i18n/es.d.ts +4 -0
- package/lib/features/theme/i18n/es.js +9 -0
- package/lib/features/theme/index.d.ts +11 -0
- package/lib/features/theme/index.js +23 -0
- package/lib/features/theme/manifest.d.ts +7 -0
- package/lib/features/theme/manifest.js +6 -0
- package/lib/features/theme/oembed.d.ts +36 -0
- package/lib/features/theme/oembed.js +58 -0
- package/lib/features/theme/routes.d.ts +17 -0
- package/lib/features/theme/routes.js +54 -0
- package/lib/features/theme/templates.d.ts +103 -0
- package/lib/features/theme/templates.js +283 -0
- package/lib/features.d.ts +15 -0
- package/lib/features.js +6 -0
- package/lib/features.manifest.d.ts +10 -0
- package/lib/features.manifest.js +6 -0
- package/lib/helpers/access.d.ts +62 -0
- package/lib/helpers/access.js +92 -0
- package/lib/helpers/api.d.ts +20 -0
- package/lib/helpers/api.js +44 -0
- package/lib/helpers/comment-guard.d.ts +145 -0
- package/lib/helpers/comment-guard.js +253 -0
- package/lib/helpers/comment-mail.d.ts +53 -0
- package/lib/helpers/comment-mail.js +188 -0
- package/lib/helpers/content-model.d.ts +50 -0
- package/lib/helpers/content-model.js +84 -0
- package/lib/helpers/content-paths.d.ts +107 -0
- package/lib/helpers/content-paths.js +200 -0
- package/lib/helpers/export-data.d.ts +85 -0
- package/lib/helpers/export-data.js +229 -0
- package/lib/helpers/gating.d.ts +53 -0
- package/lib/helpers/gating.js +83 -0
- package/lib/helpers/health.d.ts +91 -0
- package/lib/helpers/health.js +279 -0
- package/lib/helpers/heartbeat.d.ts +35 -0
- package/lib/helpers/heartbeat.js +55 -0
- package/lib/helpers/image-size.d.ts +18 -0
- package/lib/helpers/image-size.js +83 -0
- package/lib/helpers/images.d.ts +29 -0
- package/lib/helpers/images.js +41 -0
- package/lib/helpers/mail-templates.d.ts +11 -0
- package/lib/helpers/mail-templates.js +42 -0
- package/lib/helpers/publish-due.d.ts +28 -0
- package/lib/helpers/publish-due.js +67 -0
- package/lib/helpers/redirects.d.ts +43 -0
- package/lib/helpers/redirects.js +80 -0
- package/lib/helpers/seo-fields.d.ts +13 -0
- package/lib/helpers/seo-fields.js +52 -0
- package/lib/helpers/session.d.ts +30 -0
- package/lib/helpers/session.js +27 -0
- package/lib/helpers/site-settings.d.ts +98 -0
- package/lib/helpers/site-settings.js +232 -0
- package/lib/helpers/site.d.ts +14 -0
- package/lib/helpers/site.js +23 -0
- package/lib/helpers/write-hooks.d.ts +33 -0
- package/lib/helpers/write-hooks.js +37 -0
- package/lib/hooks.d.ts +17 -0
- package/lib/hooks.js +101 -0
- package/lib/host/core-tasks.d.ts +4 -0
- package/lib/host/core-tasks.js +26 -0
- package/lib/host/cron.d.ts +39 -0
- package/lib/host/cron.js +85 -0
- package/lib/host/enabled.d.ts +4 -0
- package/lib/host/enabled.js +40 -0
- package/lib/host/index.d.ts +81 -0
- package/lib/host/index.js +87 -0
- package/lib/host/manifest.d.ts +34 -0
- package/lib/host/manifest.js +7 -0
- package/lib/host/menu.d.ts +18 -0
- package/lib/host/menu.js +15 -0
- package/lib/main.d.ts +1 -0
- package/lib/main.js +24 -0
- package/lib/middleware/api-auth.d.ts +59 -0
- package/lib/middleware/api-auth.js +164 -0
- package/lib/middleware/auth.d.ts +49 -0
- package/lib/middleware/auth.js +112 -0
- package/lib/middleware/cache.d.ts +17 -0
- package/lib/middleware/cache.js +52 -0
- package/lib/middleware/rate-limits.d.ts +199 -0
- package/lib/middleware/rate-limits.js +276 -0
- package/lib/middleware/viewer.d.ts +13 -0
- package/lib/middleware/viewer.js +16 -0
- package/lib/models/Category.d.ts +24 -0
- package/lib/models/Category.js +102 -0
- package/lib/models/Comment.d.ts +120 -0
- package/lib/models/Comment.js +283 -0
- package/lib/models/ContentType.d.ts +142 -0
- package/lib/models/ContentType.js +462 -0
- package/lib/models/Credential.d.ts +21 -0
- package/lib/models/Credential.js +31 -0
- package/lib/models/Media.d.ts +53 -0
- package/lib/models/Media.js +132 -0
- package/lib/models/Menu.d.ts +131 -0
- package/lib/models/Menu.js +312 -0
- package/lib/models/Page.d.ts +55 -0
- package/lib/models/Page.js +218 -0
- package/lib/models/Post.d.ts +136 -0
- package/lib/models/Post.js +406 -0
- package/lib/models/PostLock.d.ts +67 -0
- package/lib/models/PostLock.js +112 -0
- package/lib/models/PostRevision.d.ts +45 -0
- package/lib/models/PostRevision.js +82 -0
- package/lib/models/PublicContent.d.ts +283 -0
- package/lib/models/PublicContent.js +577 -0
- package/lib/models/Redirect.d.ts +123 -0
- package/lib/models/Redirect.js +225 -0
- package/lib/models/Settings.d.ts +61 -0
- package/lib/models/Settings.js +128 -0
- package/lib/models/Snippet.d.ts +36 -0
- package/lib/models/Snippet.js +64 -0
- package/lib/models/Tag.d.ts +23 -0
- package/lib/models/Tag.js +117 -0
- package/lib/models/Taxonomy.d.ts +127 -0
- package/lib/models/Taxonomy.js +321 -0
- package/lib/models/TwoFactor.d.ts +26 -0
- package/lib/models/TwoFactor.js +60 -0
- package/lib/models/User.d.ts +49 -0
- package/lib/models/User.js +128 -0
- package/lib/models/derive.d.ts +69 -0
- package/lib/models/derive.js +81 -0
- package/lib/models/pagination.d.ts +30 -0
- package/lib/models/pagination.js +36 -0
- package/lib/models/visibility.d.ts +31 -0
- package/lib/models/visibility.js +47 -0
- package/lib/routes/App.d.ts +2 -0
- package/lib/routes/App.js +146 -0
- package/lib/routes/api/admin.d.ts +6 -0
- package/lib/routes/api/admin.js +11 -0
- package/lib/routes/api/auth.d.ts +6 -0
- package/lib/routes/api/auth.js +24 -0
- package/lib/routes/api/authors.d.ts +5 -0
- package/lib/routes/api/authors.js +8 -0
- package/lib/routes/api/categories.d.ts +8 -0
- package/lib/routes/api/categories.js +15 -0
- package/lib/routes/api/comments.d.ts +8 -0
- package/lib/routes/api/comments.js +35 -0
- package/lib/routes/api/content-model.d.ts +17 -0
- package/lib/routes/api/content-model.js +67 -0
- package/lib/routes/api/cron.d.ts +6 -0
- package/lib/routes/api/cron.js +9 -0
- package/lib/routes/api/export.d.ts +5 -0
- package/lib/routes/api/export.js +11 -0
- package/lib/routes/api/feed.d.ts +5 -0
- package/lib/routes/api/feed.js +16 -0
- package/lib/routes/api/media.d.ts +8 -0
- package/lib/routes/api/media.js +25 -0
- package/lib/routes/api/navigation.d.ts +12 -0
- package/lib/routes/api/navigation.js +17 -0
- package/lib/routes/api/ops.d.ts +9 -0
- package/lib/routes/api/ops.js +19 -0
- package/lib/routes/api/pages.d.ts +8 -0
- package/lib/routes/api/pages.js +21 -0
- package/lib/routes/api/passkeys.d.ts +7 -0
- package/lib/routes/api/passkeys.js +13 -0
- package/lib/routes/api/posts.d.ts +8 -0
- package/lib/routes/api/posts.js +39 -0
- package/lib/routes/api/profile.d.ts +6 -0
- package/lib/routes/api/profile.js +8 -0
- package/lib/routes/api/redirects.d.ts +12 -0
- package/lib/routes/api/redirects.js +13 -0
- package/lib/routes/api/settings.d.ts +8 -0
- package/lib/routes/api/settings.js +15 -0
- package/lib/routes/api/snippets.d.ts +15 -0
- package/lib/routes/api/snippets.js +16 -0
- package/lib/routes/api/tags.d.ts +8 -0
- package/lib/routes/api/tags.js +14 -0
- package/lib/routes/api/tokens.d.ts +7 -0
- package/lib/routes/api/tokens.js +15 -0
- package/lib/routes/api/two-factor.d.ts +7 -0
- package/lib/routes/api/two-factor.js +15 -0
- package/lib/routes/api/users.d.ts +8 -0
- package/lib/routes/api/users.js +25 -0
- package/lib/routes/api/v1.d.ts +12 -0
- package/lib/routes/api/v1.js +55 -0
- package/lib/routes/api/verification.d.ts +6 -0
- package/lib/routes/api/verification.js +11 -0
- package/lib/server/index.d.ts +24 -0
- package/lib/server/index.js +110 -0
- package/lib/types/index.d.ts +298 -0
- package/lib/types/index.js +1 -0
- package/lib/vite.d.ts +2 -0
- package/lib/vite.js +101 -0
- package/mail/comment-moderation.html +27 -0
- package/mail/comment-moderation.txt +13 -0
- package/mail/comment-reply.html +28 -0
- package/mail/comment-reply.txt +14 -0
- package/mail/invitation.html +25 -0
- package/mail/invitation.txt +11 -0
- package/mail/member-magic-link.html +23 -0
- package/mail/member-magic-link.txt +10 -0
- package/mail/newsletter.html +26 -0
- package/mail/newsletter.txt +13 -0
- package/mail/password-reset.html +26 -0
- package/mail/password-reset.txt +10 -0
- package/mail/verify-email.html +25 -0
- package/mail/verify-email.txt +8 -0
- package/package.json +85 -4
package/lib/vite.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* `@basicbenframework/cms/vite`: the CMS's Vite preset.
|
|
11
|
+
*
|
|
12
|
+
* import { defineConfig } from 'vite'
|
|
13
|
+
* import { cms } from '@basicbenframework/cms/vite'
|
|
14
|
+
* export default defineConfig({ plugins: [cms()] })
|
|
15
|
+
*
|
|
16
|
+
* A preset, not a code generator: React and Tailwind, the build-time
|
|
17
|
+
* constants the admin reads, the dev proxy, and the two rules that keep one
|
|
18
|
+
* copy of core and of the CMS in the server. Anything the site sets in its own
|
|
19
|
+
* vite.config.ts wins over these.
|
|
20
|
+
*/
|
|
21
|
+
import { existsSync } from 'node:fs';
|
|
22
|
+
import { resolve } from 'node:path';
|
|
23
|
+
import { pathToFileURL } from 'node:url';
|
|
24
|
+
import react from '@vitejs/plugin-react';
|
|
25
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
26
|
+
import { enabledFeatureNames } from "./host/enabled.js";
|
|
27
|
+
const PACKAGE = '@basicbenframework/cms';
|
|
28
|
+
/** The site's basicben.config.js, as the server will load it. */
|
|
29
|
+
async function siteConfig(root) {
|
|
30
|
+
for (const file of ['basicben.config.js', 'basicben.config.mjs']) {
|
|
31
|
+
const path = resolve(root, file);
|
|
32
|
+
if (!existsSync(path))
|
|
33
|
+
continue;
|
|
34
|
+
try {
|
|
35
|
+
return (await import(__rewriteRelativeImportExtension(pathToFileURL(path).href))).default ?? {};
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
throw new Error(`Could not load ${file}: ${err.message}`, { cause: err });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return {};
|
|
42
|
+
}
|
|
43
|
+
function preset() {
|
|
44
|
+
return {
|
|
45
|
+
name: 'basicben-cms',
|
|
46
|
+
// What this returns is merged over the site's config, command line
|
|
47
|
+
// included, so anything the site or `basicben build` may set is set here
|
|
48
|
+
// only when they have not.
|
|
49
|
+
async config(user, env) {
|
|
50
|
+
const root = resolve(user.root ?? process.cwd());
|
|
51
|
+
const site = await siteConfig(root);
|
|
52
|
+
return {
|
|
53
|
+
// Deployment flags, baked into the client at build time. Read from
|
|
54
|
+
// plain environment variables rather than VITE_ ones so one variable
|
|
55
|
+
// serves both sides: the server reads process.env, the client reads
|
|
56
|
+
// these. The client half is presentation only; the server enforces.
|
|
57
|
+
define: {
|
|
58
|
+
__DISABLE_REGISTRATION__: JSON.stringify(process.env.DISABLE_REGISTRATION === 'true'),
|
|
59
|
+
__DISABLE_PUBLIC_SITE__: JSON.stringify(process.env.DISABLE_PUBLIC_SITE === 'true'),
|
|
60
|
+
// The site's features, checked. The admin loads only these; the
|
|
61
|
+
// server reads the same list from the same file at boot.
|
|
62
|
+
__BASICBEN_FEATURES__: JSON.stringify(enabledFeatureNames(site.features))
|
|
63
|
+
},
|
|
64
|
+
// Vite handles the package itself (its CSS, its glob of dictionaries,
|
|
65
|
+
// the constants above) instead of pre-bundling it. React is then no
|
|
66
|
+
// longer found through it, so it is named, or the dev server serves
|
|
67
|
+
// React's CommonJS raw ("does not provide an export named 'jsx'").
|
|
68
|
+
optimizeDeps: {
|
|
69
|
+
exclude: [PACKAGE],
|
|
70
|
+
include: ['react', 'react/jsx-runtime', 'react-dom/client']
|
|
71
|
+
},
|
|
72
|
+
server: {
|
|
73
|
+
port: user.server?.port ?? parseInt(process.env.VITE_PORT || '3000'),
|
|
74
|
+
proxy: {
|
|
75
|
+
'/api': { target: `http://localhost:${process.env.PORT || 3001}`, changeOrigin: true }
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
// The admin's build. The server's (`vite build --ssr`) names its own
|
|
79
|
+
// entry and output directory.
|
|
80
|
+
build: env.isSsrBuild
|
|
81
|
+
? {}
|
|
82
|
+
: {
|
|
83
|
+
outDir: user.build?.outDir ?? 'dist/client',
|
|
84
|
+
rollupOptions: { input: user.build?.rollupOptions?.input ?? resolve(root, 'index.html') }
|
|
85
|
+
},
|
|
86
|
+
ssr: {
|
|
87
|
+
// Bundle the site's own server code and its dependencies...
|
|
88
|
+
noExternal: true,
|
|
89
|
+
// ...but never core or the CMS. Both hold singletons (the hook
|
|
90
|
+
// registry, the database connection, the feature host). A bundled
|
|
91
|
+
// copy registers hooks in a registry nothing fires, and the CMS
|
|
92
|
+
// finds its migrations and mail through import.meta.url.
|
|
93
|
+
external: ['@basicbenframework/core', PACKAGE]
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export function cms() {
|
|
100
|
+
return [react(), tailwindcss(), preset()];
|
|
101
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Inline styles only: mail clients discard <style> blocks and stylesheets. -->
|
|
2
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 480px; margin: 0 auto; padding: 24px; color: #111;">
|
|
3
|
+
<h1 style="font-size: 20px; margin: 0 0 16px;">A comment is waiting for moderation</h1>
|
|
4
|
+
|
|
5
|
+
<p style="margin: 0 0 16px; line-height: 1.5;">
|
|
6
|
+
Hi {{name}}, {{commenterName}} left a comment on <strong>{{postTitle}}</strong>:
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<blockquote style="margin: 0 0 24px; padding: 12px 16px; border-left: 3px solid #ddd; color: #333; line-height: 1.5; white-space: pre-wrap;">{{content}}</blockquote>
|
|
10
|
+
|
|
11
|
+
<p style="margin: 0 0 24px;">
|
|
12
|
+
<a href="{{actionUrl}}"
|
|
13
|
+
style="display: inline-block; background: #111; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 6px;">
|
|
14
|
+
{{actionLabel}}
|
|
15
|
+
</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.5;">
|
|
19
|
+
Or paste this into your browser:<br>
|
|
20
|
+
<span style="word-break: break-all;">{{actionUrl}}</span>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p style="margin: 16px 0 0; font-size: 13px; color: #666; line-height: 1.5;">
|
|
24
|
+
You are receiving this because comment notifications on {{siteName}} are
|
|
25
|
+
sent to {{audience}}. An administrator can change that on the Comments page.
|
|
26
|
+
</p>
|
|
27
|
+
</div>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Hi {{name}},
|
|
2
|
+
|
|
3
|
+
{{commenterName}} left a comment on "{{postTitle}}" that is waiting for
|
|
4
|
+
moderation:
|
|
5
|
+
|
|
6
|
+
{{content}}
|
|
7
|
+
|
|
8
|
+
{{actionLabel}}:
|
|
9
|
+
|
|
10
|
+
{{actionUrl}}
|
|
11
|
+
|
|
12
|
+
You are receiving this because comment notifications on {{siteName}} are sent
|
|
13
|
+
to {{audience}}. An administrator can change that on the Comments page.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- Inline styles only: mail clients discard <style> blocks and stylesheets. -->
|
|
2
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 480px; margin: 0 auto; padding: 24px; color: #111;">
|
|
3
|
+
<h1 style="font-size: 20px; margin: 0 0 16px;">New reply to your comment</h1>
|
|
4
|
+
|
|
5
|
+
<p style="margin: 0 0 16px; line-height: 1.5;">
|
|
6
|
+
Hi {{name}}, {{replierName}} replied to your comment on <strong>{{postTitle}}</strong>:
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<blockquote style="margin: 0 0 24px; padding: 12px 16px; border-left: 3px solid #ddd; color: #333; line-height: 1.5; white-space: pre-wrap;">{{content}}</blockquote>
|
|
10
|
+
|
|
11
|
+
<p style="margin: 0 0 24px;">
|
|
12
|
+
<a href="{{replyUrl}}"
|
|
13
|
+
style="display: inline-block; background: #111; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 6px;">
|
|
14
|
+
Read the conversation
|
|
15
|
+
</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.5;">
|
|
19
|
+
Or paste this into your browser:<br>
|
|
20
|
+
<span style="word-break: break-all;">{{replyUrl}}</span>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p style="margin: 16px 0 0; font-size: 13px; color: #666; line-height: 1.5;">
|
|
24
|
+
You asked to be told about replies to this comment.
|
|
25
|
+
<a href="{{unsubscribeUrl}}" style="color: #666;">Stop these emails</a> —
|
|
26
|
+
no account needed.
|
|
27
|
+
</p>
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Hi {{name}},
|
|
2
|
+
|
|
3
|
+
{{replierName}} replied to your comment on "{{postTitle}}":
|
|
4
|
+
|
|
5
|
+
{{content}}
|
|
6
|
+
|
|
7
|
+
Read the conversation here:
|
|
8
|
+
|
|
9
|
+
{{replyUrl}}
|
|
10
|
+
|
|
11
|
+
You asked to be told about replies to this comment. To stop, open this link —
|
|
12
|
+
no account needed:
|
|
13
|
+
|
|
14
|
+
{{unsubscribeUrl}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Inline styles only: mail clients discard <style> blocks and stylesheets. -->
|
|
2
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 480px; margin: 0 auto; padding: 24px; color: #111;">
|
|
3
|
+
<h1 style="font-size: 20px; margin: 0 0 16px;">You're invited to {{siteName}}</h1>
|
|
4
|
+
|
|
5
|
+
<p style="margin: 0 0 16px; line-height: 1.5;">
|
|
6
|
+
{{inviterName}} has invited you to join {{siteName}} as {{roleLabel}}.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p style="margin: 0 0 24px;">
|
|
10
|
+
<a href="{{inviteUrl}}"
|
|
11
|
+
style="display: inline-block; background: #111; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 6px;">
|
|
12
|
+
Accept invitation
|
|
13
|
+
</a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.5;">
|
|
17
|
+
Or paste this into your browser:<br>
|
|
18
|
+
<span style="word-break: break-all;">{{inviteUrl}}</span>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p style="margin: 16px 0 0; font-size: 13px; color: #666; line-height: 1.5;">
|
|
22
|
+
This link expires in 7 days and can be used once. If you were not expecting an
|
|
23
|
+
invitation, you can ignore this message — no account exists until you accept.
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Hi,
|
|
2
|
+
|
|
3
|
+
{{inviterName}} has invited you to join {{siteName}} as {{roleLabel}}.
|
|
4
|
+
|
|
5
|
+
Accept the invitation and choose a password here:
|
|
6
|
+
|
|
7
|
+
{{inviteUrl}}
|
|
8
|
+
|
|
9
|
+
This link expires in 7 days and can be used once. If you were not expecting
|
|
10
|
+
an invitation, you can ignore this message — no account exists until you
|
|
11
|
+
accept.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Inline styles only: mail clients discard <style> blocks and stylesheets. -->
|
|
2
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 480px; margin: 0 auto; padding: 24px; color: #111;">
|
|
3
|
+
<h1 style="font-size: 20px; margin: 0 0 16px;">{{heading}}</h1>
|
|
4
|
+
|
|
5
|
+
<p style="margin: 0 0 24px; line-height: 1.5;">{{intro}}</p>
|
|
6
|
+
|
|
7
|
+
<p style="margin: 0 0 24px;">
|
|
8
|
+
<a href="{{url}}"
|
|
9
|
+
style="display: inline-block; background: #111; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 6px;">
|
|
10
|
+
{{action}}
|
|
11
|
+
</a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.5;">
|
|
15
|
+
Or paste this into your browser:<br>
|
|
16
|
+
<span style="word-break: break-all;">{{url}}</span>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p style="margin: 16px 0 0; font-size: 13px; color: #666; line-height: 1.5;">
|
|
20
|
+
The link works once and expires in {{minutes}} minutes. If you did not ask
|
|
21
|
+
for it, ignore this email — nothing happens unless the link is used.
|
|
22
|
+
</p>
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Inline styles only: mail clients discard <style> blocks and stylesheets.
|
|
2
|
+
contentHtml is triple-braced because it is markup: the post's sanitized
|
|
3
|
+
render, sanitized again and made absolute in src/features/members/newsletter.ts.
|
|
4
|
+
unsubscribeHtml is built there too, and is empty when a provider sending
|
|
5
|
+
the newsletter adds its own unsubscribe footer. -->
|
|
6
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 600px; margin: 0 auto; padding: 24px; color: #111;">
|
|
7
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666;">{{siteName}}</p>
|
|
8
|
+
|
|
9
|
+
<h1 style="font-size: 26px; line-height: 1.25; margin: 0 0 24px;">
|
|
10
|
+
<a href="{{postUrl}}" style="color: #111; text-decoration: none;">{{title}}</a>
|
|
11
|
+
</h1>
|
|
12
|
+
|
|
13
|
+
<div style="font-size: 16px; line-height: 1.6;">
|
|
14
|
+
{{{contentHtml}}}
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<p style="margin: 32px 0 0;">
|
|
18
|
+
<a href="{{postUrl}}" style="color: #111;">Read it on the site</a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<hr style="border: 0; border-top: 1px solid #ddd; margin: 32px 0 16px;">
|
|
22
|
+
|
|
23
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.5; white-space: pre-wrap;">{{footer}}</p>
|
|
24
|
+
|
|
25
|
+
{{{unsubscribeHtml}}}
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<!-- Inline styles only: mail clients discard <style> blocks and stylesheets. -->
|
|
2
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 480px; margin: 0 auto; padding: 24px; color: #111;">
|
|
3
|
+
<h1 style="font-size: 20px; margin: 0 0 16px;">Reset your password</h1>
|
|
4
|
+
|
|
5
|
+
<p style="margin: 0 0 16px; line-height: 1.5;">
|
|
6
|
+
Hi {{name}}, someone asked to reset the password for your {{siteName}} account.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p style="margin: 0 0 24px;">
|
|
10
|
+
<a href="{{resetUrl}}"
|
|
11
|
+
style="display: inline-block; background: #111; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 6px;">
|
|
12
|
+
Choose a new password
|
|
13
|
+
</a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.5;">
|
|
17
|
+
Or paste this into your browser:<br>
|
|
18
|
+
<span style="word-break: break-all;">{{resetUrl}}</span>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p style="margin: 16px 0 0; font-size: 13px; color: #666; line-height: 1.5;">
|
|
22
|
+
This link expires in 1 hour and can be used once. Using it signs you out
|
|
23
|
+
everywhere. If you did not ask for this, you can ignore this message — your
|
|
24
|
+
password has not changed.
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Hi {{name}},
|
|
2
|
+
|
|
3
|
+
Someone asked to reset the password for your {{siteName}} account. Choose a
|
|
4
|
+
new one here:
|
|
5
|
+
|
|
6
|
+
{{resetUrl}}
|
|
7
|
+
|
|
8
|
+
This link expires in 1 hour and can be used once. Using it signs you out
|
|
9
|
+
everywhere. If you did not ask for this, you can ignore this message — your
|
|
10
|
+
password has not changed.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!-- Inline styles only: mail clients discard <style> blocks and stylesheets. -->
|
|
2
|
+
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 480px; margin: 0 auto; padding: 24px; color: #111;">
|
|
3
|
+
<h1 style="font-size: 20px; margin: 0 0 16px;">Confirm your email</h1>
|
|
4
|
+
|
|
5
|
+
<p style="margin: 0 0 16px; line-height: 1.5;">
|
|
6
|
+
Hi {{name}}, confirm your email address to finish setting up your {{siteName}} account.
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p style="margin: 0 0 24px;">
|
|
10
|
+
<a href="{{verifyUrl}}"
|
|
11
|
+
style="display: inline-block; background: #111; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 6px;">
|
|
12
|
+
Confirm email
|
|
13
|
+
</a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p style="margin: 0 0 8px; font-size: 13px; color: #666; line-height: 1.5;">
|
|
17
|
+
Or paste this into your browser:<br>
|
|
18
|
+
<span style="word-break: break-all;">{{verifyUrl}}</span>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p style="margin: 16px 0 0; font-size: 13px; color: #666; line-height: 1.5;">
|
|
22
|
+
This link expires in 24 hours. If you did not create an account, you can ignore
|
|
23
|
+
this message — nothing will happen.
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,87 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basicbenframework/cms",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "The BasicBen CMS. Posts, pages, media, an admin UI, and a headless content API.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./config": {
|
|
9
|
+
"types": "./lib/config.d.ts",
|
|
10
|
+
"default": "./lib/config.js"
|
|
11
|
+
},
|
|
12
|
+
"./vite": {
|
|
13
|
+
"types": "./lib/vite.d.ts",
|
|
14
|
+
"default": "./lib/vite.js"
|
|
15
|
+
},
|
|
16
|
+
"./server": {
|
|
17
|
+
"types": "./lib/server/index.d.ts",
|
|
18
|
+
"default": "./lib/server/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./admin": {
|
|
21
|
+
"types": "./lib/main.d.ts",
|
|
22
|
+
"default": "./lib/main.js"
|
|
23
|
+
},
|
|
24
|
+
"./package.json": "./package.json"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"basicben-cms": "./lib/cli/index.mjs"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"lib",
|
|
31
|
+
"db/migrations",
|
|
32
|
+
"mail",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"workspaces": [
|
|
37
|
+
"site"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "npm run build:lib && node scripts/dev.mjs",
|
|
41
|
+
"build": "npm run build:lib && npm run build --workspace site",
|
|
42
|
+
"build:lib": "rm -rf lib && tsc -p tsconfig.build.json && cp src/client/styles.css lib/client/styles.css && chmod +x lib/cli/index.mjs",
|
|
43
|
+
"start": "npm start --workspace site",
|
|
44
|
+
"prepack": "npm run build:lib",
|
|
45
|
+
"pretest": "npm run build:lib",
|
|
46
|
+
"test": "cd site && node --test \"../tests/**/*.test.js\" \"../src/features/**/*.test.js\"",
|
|
47
|
+
"migrate": "npm run migrate --workspace site",
|
|
48
|
+
"migrate:status": "npm run migrate:status --workspace site",
|
|
49
|
+
"export": "npm run export --workspace site --",
|
|
50
|
+
"import:json": "npm run import:json --workspace site --",
|
|
51
|
+
"import:wxr": "npm run import:wxr --workspace site --",
|
|
52
|
+
"import:ghost": "npm run import:ghost --workspace site --",
|
|
53
|
+
"import:wordpress": "npm run import:wordpress --workspace site --",
|
|
54
|
+
"backup": "npm run backup --workspace site --",
|
|
55
|
+
"restore": "npm run restore --workspace site --"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@basicbenframework/core": "^0.8.1",
|
|
59
|
+
"react": "^19.2.0",
|
|
60
|
+
"react-dom": "^19.2.0"
|
|
61
|
+
},
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
64
|
+
"@vitejs/plugin-react": "^6.0.5",
|
|
65
|
+
"tailwindcss": "^4.3.3"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@basicbenframework/core": "^0.8.1",
|
|
69
|
+
"@types/node": "^24",
|
|
70
|
+
"@types/react": "^19",
|
|
71
|
+
"@types/react-dom": "^19",
|
|
72
|
+
"react": "^19.2.0",
|
|
73
|
+
"react-dom": "^19.2.0",
|
|
74
|
+
"typescript": "^5.8",
|
|
75
|
+
"vite": "^8.2.1"
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">=24.0.0"
|
|
79
|
+
},
|
|
80
|
+
"repository": {
|
|
81
|
+
"type": "git",
|
|
82
|
+
"url": "git+https://github.com/BasicBenFramework/basicben.git"
|
|
83
|
+
},
|
|
84
|
+
"publishConfig": {
|
|
85
|
+
"access": "public"
|
|
86
|
+
}
|
|
87
|
+
}
|