Aller au contenu

Release Notes - studiocms

Ce contenu n’est pas encore disponible dans votre langue.

The following is automated release notes for the studiocms package. For more information, see the Changelog file^

  • #484^ 48630ef^ Thanks @studiocms-no-reply^! - Translation Updated (PR: #484)

  • #483^ 3612916^ Thanks @Adammatthiesen^! - Fix Missing CSS on DB start pages for the code blocks

  • #489^ 77f89d6^ Thanks @Adammatthiesen^! - Update dependencies

  • #490^ 5780894^ Thanks @studiocms-no-reply^! - Translation Updated (PR: #490)

  • #476^ a430661^ Thanks @Adammatthiesen^! - fix(auth): Re-enable the verification for usernames and passwords to ensure data safety

  • #474^ 4fc5d6b^ Thanks @Adammatthiesen^! - Refactor internal integration logic to cleanup old logic and simplify main integration

  • #480^ 3f8b220^ Thanks @Adammatthiesen^! - NEW: HTML pageType available for pages, build HTML pages with the new SunEditor HTML builder.

  • #488^ 501d11c^ Thanks @studiocms-no-reply^! - Translation Updated (PR: #488)

  • #485^ ab1714c^ Thanks @Adammatthiesen^! - Update Diff page

    • Update pageMetaData section to use disabled inputs to display previous/current data
    • Implement diff endpoint for reverting changes
    • Add interactive buttons for reverting changes
    • Add helpful information to the top section to display info about the diff
  • #477^ 0901215^ Thanks @Adammatthiesen^! - Remove old testingAndDemoMode developer option and add new demoMode option with a simple interface

    Demo mode can either be false or an object with the following type { username: string; password: string; }. This will allow you to create demo user credentials that are public.

    Please note, this does not prevent changes and resetting the DB is up to the developer to configure on their own. (a github action that clears the tables and adds the desired values back on a schedule is one idea for this.)

  • #478^ df24828^ Thanks @Adammatthiesen^! - Refactor rendering system to rely on plugin PageTypes instead of the old built-in system, this will allow new page types to easily bring their own renderer that can get called from the main renderer component.

    • Removed MDX, and MarkDoc from built-in renderer. These will be replaced by plugins.
    • Rendering system is now directly tied into the plugin PageTypes defined within plugins. Instead of passing just the content to the renderer, you now must pass the entire PageData from the SDK.
    • New Rendering Component is now able to auto adapt to the pageType’s provided renderer. (This means you can use the provided <StudioCMSRenderer /> component to render any pageType that has been configured for StudioCMS through plugins. or use the data directly and render it yourself.)

    OLD Method ([...slug].astro)

    [...slug].astro
    ---
    import { StudioCMSRenderer } from 'studiocms:renderer';
    import studioCMS_SDK from 'studiocms:sdk';
    import Layout from '../layouts/Layout.astro';
    let { slug } = Astro.params;
    if (!slug) {
    slug = 'index';
    }
    const page = await studioCMS_SDK.GET.databaseEntry.pages.bySlug(slug);
    if (!page) {
    return new Response(null, { status: 404 });
    }
    const { title, description, heroImage, defaultContent } = page;
    const content = defaultContent.content || '';
    ---
    <Layout title={title} description={description} heroImage={heroImage}>
    <main>
    <StudioCMSRenderer content={content} />
    </main>
    </Layout>

    New Method ([...slug].astro)

    [...slug].astro
    ---
    import { StudioCMSRenderer } from 'studiocms:renderer';
    import studioCMS_SDK from 'studiocms:sdk';
    import Layout from '../layouts/Layout.astro';
    let { slug } = Astro.params;
    if (!slug) {
    slug = 'index';
    }
    const page = await studioCMS_SDK.GET.databaseEntry.pages.bySlug(slug);
    if (!page) {
    return new Response(null, { status: 404 });
    }
    const { title, description, heroImage } = page;
    ---
    <Layout title={title} description={description} heroImage={heroImage}>
    <main>
    <StudioCMSRenderer data={page} />
    </main>
    </Layout>
  • #481^ dae7795^ Thanks @studiocms-no-reply^! - Translation Updated (PR: #481)

  • #473^ ddc7eb8^ Thanks @Adammatthiesen^! - Fix ambient types, and remove now unused stub files and type injection

    Consolidate all virtual types into a single file,

    • Previous exports such as studiocms/v/core.d.ts are now all under studiocms/v/types
  • #479^ 4880ce8^ Thanks @Adammatthiesen^! - Remove unused dependencies and references

  • #471^ 9512aac^ Thanks @Adammatthiesen^! - Update Arctic to v3.5.0 and implement new required code verifier for auth0 and discord

  • #486^ ddee17d^ Thanks @studiocms-no-reply^! - Translation Updated (PR: #486)

  • #473^ ddc7eb8^ Thanks @Adammatthiesen^! - Update READMEs

  • #333^ 62ff52f^ Thanks [@column.text({](https://github.com/column.text({)^! - Auth system overhaul:

    • Updated all Dependencies
    • Update astro:env schema:
      • CMS_ENCRYPTION_KEY: NEW - Required variable used for auth encryption, can be generated using openssl rand --base64 16.
      • CMS_GITHUB_REDIRECT_URI: NEW - Optional variable for GitHub Redirect URI if using multiple redirect URIs with Github oAuth.
    • Removed Luicia based auth system and Lucia-astrodb-adapter
    • Removed old authHelper
    • Add new OAuthButton components
      • <OAuthButton />
      • <OAuthButtonStack />
      • oAuthButtonProviders.ts
    • Add new <AuthLayout /> component and CSS
    • Add new authentication library:
      • Auth library is built using the lucia-next resources and will now be maintained under @studiocms/auth as its own full module
      • Created Virtual module exports available during runtime
    • Add new login/signup backgrounds
    • Remove Middleware
    • Add studiocms-logo.glb for usage with New ThreeJS login/signup page
    • Update all Auth Routes
    • Update schema
    • Add new Scripts for ThreeJS
    • Update Stubs files and Utils
    • Refactor Integration to use new system.
    • Disable interactivity for <Avatar /> component. (Will always show a empty profile icon until we setup the new system for the front-end)

    • Update table schema:

      • StudioCMSUsers: Removed oAuth ID’s from main user table
      export const StudioCMSUsers = defineTable({
      columns: {
      id: column.text({ primaryKey: true }),
      url: column.text({ optional: true }),
      name: column.text(),
      email: column.text({ unique: true, optional: true }),
      avatar: column.text({ optional: true }),
      githubId: column.number({ unique: true, optional: true }),
      githubURL: column.text({ optional: true }),
      discordId: column.text({ unique: true, optional: true }),
      googleId: column.text({ unique: true, optional: true }),
      auth0Id: column.text({ unique: true, optional: true }),
      username: column.text(),
      password: column.text({ optional: true }),
      updatedAt: column.date({ default: NOW, optional: true }),
      createdAt: column.date({ default: NOW, optional: true }),
      },
      });
      • StudioCMSOAuthAccounts: New table to handle all oAuth accounts and linking to Users
      export const StudioCMSOAuthAccounts = defineTable({
      columns: {
      provider: column.text(), // github, google, discord, auth0
      providerUserId: column.text({ primaryKey: true }),
      userId: column.text({ references: () => StudioCMSUsers.columns.id }),
      },
      });
      • StudioCMSPermissions: Updated to use direct reference to users table
      export const StudioCMSPermissions = defineTable({
      columns: {
      references: () => StudioCMSUsers.columns.id }),
      rank: column.text(),
      },
      });
      • StudioCMSSiteConfig: Added new options for login page
      export const StudioCMSSiteConfig = defineTable({
      columns: {
      id: column.number({ primaryKey: true }),
      title: column.text(),
      description: column.text(),
      defaultOgImage: column.text({ optional: true }),
      siteIcon: column.text({ optional: true }),
      loginPageBackground: column.text({ default: "studiocms-curves" }),
      loginPageCustomImage: column.text({ optional: true }),
      },
      });
    • Updated Routemap:

      • All Auth api routes are now located at yourhost.tld/studiocms_api/auth/*
    • Updated Strings:

      • Add new Encryption messages for the new CMS_ENCRYPTION_KEY variable
    • Removed now unused auth types.

    • Refactor to utilize new @studiocms/auth lib for user verification
  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Update First time setup routes and API endpoints

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Translation Updated (PR: #391)

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Expand PageData table schema and add Catagory and Tags schemas, and extend WP-importer

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Added Author and Contributor tracking

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Docs, Docs, and more Docs

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement new Dashboard design and update API endpoints

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Dynamic Sitemap integration

    • packages/studiocms/src/index.ts: Replaced the static sitemap integration with the new dynamicSitemap function to support multiple sitemaps from plugins.
    • packages/studiocms/src/lib/dynamic-sitemap/index.ts: Added the dynamicSitemap function to generate sitemaps dynamically based on the provided plugin configurations.
    • packages/studiocms/src/lib/dynamic-sitemap/sitemap-index.xml.ts: Created a new route to serve the sitemap index file, which lists all the individual sitemaps.
    • packages/studiocms/src/schemas/plugins/index.ts: Updated the plugin schema to include an optional sitemaps field, allowing plugins to specify their own sitemap configurations.
    • packages/studiocms_blog/src/index.ts: Updated the StudioCMS Blog plugin to include its own sitemaps for posts and markdown pages.
    • packages/studiocms_blog/src/routes/sitemap-md.xml.ts: Added a new route to generate the sitemap for markdown pages.
    • packages/studiocms_blog/src/routes/sitemap-posts.xml.ts: Added a new route to generate the sitemap for blog posts.
  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Remove Astro ViewTransitions/ClientRouter

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - User invite and creation systems

    • Added modals for creating new users and user invites in InnerSidebarElement.astro to streamline the user creation process.
    • Implemented new API routes create-user and create-user-invite to handle user creation and invite processes.
    • Updated routeMap.ts to include new endpoints for user creation and invites.
    • Modified icons for ‘Create Page’ and ‘Create Folder’ options in InnerSidebarElement.astro to use standard document and folder icons.
    • Enhanced the user management dropdown by reordering properties for better readability.
    • Added custom styles for modal bodies to improve the user interface.
    • Added new utility functions for generating random passwords and IDs in generators.ts, and updated references in core.ts.
    • Updated the SDK core to support rank assignment during user creation.
  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Enhance StudioCMS Plugin system

    • Implement Dashboard pages
    • Add Optional API Routes and Fields for page types
    • Update Astro Web Vital plugin to add new dashboard page
  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement Build step with esbuild and Update for Astro v5

  • #430^ 36474b5^ Thanks @Adammatthiesen^! - Update dependencies

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Add @studiocms/markdown-remark as a renderer option, and implement component proxy system to actually be used by this renderer

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement User quick action toolbar for frontend when user’s are logged in

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Translation Updated (PR: #376)

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement Diff tracking system

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - New Renderer component

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Introduce Dashboard i18n logic

    • studiocms & @studiocms/core:

      • Introduce new virtual module studiocms:i18n: This module includes utilities for our new i18n system.
      • Add new LanguageSelector component
      • Add en-us translation file. (packages/studiocms_core/i18n/translations/)
    • @studiocms/auth:

      • Update login/signup routes to utilize new i18n translations
      • Transition routes to Hybrid type setup, All API routes will remain server rendered, while pages are now prerendered (Server islands when needed).
  • #312^ 9c59d72^ Thanks @create-issue-branch^! - ♻️ Chore: We are now Turso Sponsored!

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Update Frontend logic and fix some small issues with rendering.

    • New Renderer Partial for rendering on-the-fly
    • Updated changelog endpoint to use new partial to fix rendering
    • Fixed TS Error in SDK
    • Fixed changelog rendering
    • Cleaned up Frontend package layout
    • Simplified Frontend route generation to use 1 file
    • Updated all exports.
  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Introduce BASIC version of our plugin system.

    Currently Supports:

    • Custom Settings Page
      • Assign your fields
      • Bring your own API Endpoint function
    • Ability to add Frontend page links
    • Set the minimum StudioCMS Version
    • Bring your own Astro Integrations
    • Basic Page type identifier system
      • This system will eventually be expanded to allow custom Content types and access to passing custom content handling methods for custom implementations.
  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement Component Proxy functionality

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement new StudioCMS SDK in @studiocms/core and integrate it into the new dashboard and frontend package

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Remove Unpic and simplify imageHandler

  • #301^ ebc297f^ Thanks @create-issue-branch^! - Update .d.ts file generation (non breaking)

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Merge StudioCMS packages into main package

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement new StudioCMS Auth lib

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Update URLs

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Small css tweak

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - New CLI, Updated integration logic and updated config processing.

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Add warning if no Adapter is present

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Fix CSS issue that caused sidebar to flow off the screen

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Adjusted strings to account for Astro Studio sunsetting

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - Implement dashboard grid components system

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - StudioCMS is now headless, all routes have been moved to @studiocms/blog and that is now the recommended default plugin to install for users who want a basic headful setup

  • #333^ 62ff52f^ Thanks @create-issue-branch^! - New REST API endpoints and Dashboard UI features

    New Routes:

    • /studiocms_api/rest/v1/folders
    • /studiocms_api/rest/v1/folders/[id]
    • /studiocms_api/rest/v1/pages
    • /studiocms_api/rest/v1/pages/[id]
    • /studiocms_api/rest/v1/pages/[id]/history
    • /studiocms_api/rest/v1/pages/[id]/history/[id]
    • /studiocms_api/rest/v1/settings
    • /studiocms_api/rest/v1/users
    • /studiocms_api/rest/v1/users/[id]

    All routes listed above are behind authentication.

    There is the following PUBLIC endpoints that ONLY support GET requests to published pages/folders

    • /studiocms_api/rest/v1/public/pages
    • /studiocms_api/rest/v1/public/pages/[id]
    • /studiocms_api/rest/v1/public/folders
    • /studiocms_api/rest/v1/public/folders/[id]
  • Update URL from astro-studiocms.xyz to studiocms.xyz
  • Update dependencies

  • Update readme, and package.json naming as well as references to Astro Studio to AstroDB.

  • Update readmes to reflect new package name

  • [Update readme]: Update Astro Studio references to AstroDB as Studio is closing down.

  • [Refactor]: Update main config schema for renderers.

    • Removed contentRenderer and markedConfig from the main options
    • Added config for MarkDoc
    • Created new rendererConfig section:
    astro.config.mjs
    // https://astro.build/config
    export default defineConfig({
    // ...Rest of Astro Config
    integrations: [
    studiocms({
    // ...Rest of StudioCMS Config
    // (This is the same if you use the 'studiocms.config.mjs' file)
    rendererConfig: {
    renderer: "marked", // Can also be 'astro', or 'markdoc'
    markedConfig: {
    /* MarkedJS Config */
    },
    markdocConfig: {
    /* MarkDoc Config */
    },
    },
    }),
    ],
    });
  • [Migrate/Deprecation]: customRendererPlugin moved to StudioCMSRendererConfig

    • Deprecation of StudioCMSPluginOptions defined CustomRenderers
    • Add new option to define renderers from StudioCMSOptions config:
    astro.config.mjs
    function simpleHTMLRenderer(content: string) {
    return {
    name: "simple-html-renderer",
    renderer: async (content: string) => {
    return `<p>${content}</p>`;
    },
    };
    }
    // https://astro.build/config
    export default defineConfig({
    // ...Rest of Astro Config
    integrations: [
    studiocms({
    // ...Rest of StudioCMS Config
    // (This is the same if you use the 'studiocms.config.mjs' file)
    rendererConfig: {
    renderer: simpleHTMLRenderer,
    },
    }),
    ],
    });
  • [Refactor/Rename]: Split main package into smaller packages and rename main package.

    This change will allow a better divide between the StudioCMS ecosystem packages. The main Astro Integration is now named studiocms.

    Renamed Packages:

    • studiocms: The main package that users will download and use.
    • @studiocms/blog: The StudioCMSBlog Plugin

    New Packages and their purposes:

    • @studiocms/core: Core components and functions
    • @studiocms/assets: Assets used for the StudioCMS Dashboard and other integrations
    • @studiocms/renderers: StudioCMS renderer system
    • @studiocms/imagehandler: StudioCMS image service and components
    • @studiocms/auth: StudioCMS auth routes and middleware
    • @studiocms/frontend: Userfacing pages and routes
    • @studiocms/dashboard: The main dashboard components, routes, and API endpoints
    • @studiocms/robotstxt: Generation of robots.txt file
    • @studiocms/betaresources: Resources for the beta.
  • [Breaking]: Update AstroDB Table Schemas to use prefixed table names (i.e. Permissions -> StudioCMSPermissions )

    This change will require migration to a new database or a full wipe of the current database.

    It is recommended to link to a new database and push the new schema changes and migrate your data from the old one.

  • Implement extension system for Plugins to include new dashboard pages right in the sidebar

  • Refactor Authhelper (no end user changes needed)

  • [Fix]: Ensure @astrojs/web-vitals integration is an optional addon and not required.

  • # Breaking Changes

    • [Breaking]: Astro 4.14.5 is now the lowest supported version of StudioCMS
    • [Breaking]: AstroDB 0.13.2 is now the lowest supported version of StudioCMS
    • [Update]: Utilize new InjectTypes from Astro instead of addDts from AIK (No user changes needed)
    • [Update]: @matthiesenxyz/integration-utils updated to newest version and fix usage (No user changes needed)
    • [Refactor]: Move web-vitals child components into their own folder (No user changes needed)
    • [Refactor]: Update isDashboardRoute.ts^ to use .include() instead of direct comparison (No user changes needed)
    • [Refactor]: Move to namespacebuiltins vite plugin(Astro Integration) included from @matthiesenxyz/integration-utils instead of the internal copy (No user changes needed)
    • [Fix]: Remove now not needed exclude rules for @matthiesenxyz/integration-utils (No user changes needed)
  • New Mailing system for Beta Feedback form

  • Fix: Allow studiocms-auth.config.json to be created during first time database setup

  • [Bug]: Fix case sensitivity issue in authHelper function

  • Validate secrets (or not) for astro:env

  • Add check for unsafe usernames or passwords when creating local username/password accounts

  • - StudioCMS-Dashboard:

    Update UnoCSS to 0.61.5 and DaisyUI Preset to 0.1.1

  • Lint project code

  • Sidebar signout for guest users

  • Initial beta release