Skip to content

Commit

Permalink
Merge branch 'issue-0304' into docs-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Adammatthiesen authored Nov 28, 2024
2 parents 14dcfb5 + ce23b08 commit 5d6a627
Show file tree
Hide file tree
Showing 529 changed files with 19,820 additions and 16,783 deletions.
119 changes: 119 additions & 0 deletions .changeset/chatty-kangaroos-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
---
"@studiocms/dashboard": patch
"@studiocms/auth": patch
"@studiocms/core": patch
"@studiocms/ui": patch
"studiocms": patch
---

Auth system overhaul:

## **`studiocms`**

- Updated all Dependencies

## **`@studiocms/auth`**

- 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.

## **`@studiocms/core`**

- 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

```diff
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

```ts
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

```ts
export const StudioCMSPermissions = defineTable({
columns: {
user: column.text({ references: () => StudioCMSUsers.columns.id }),
rank: column.text(),
},
});
```

- `StudioCMSSiteConfig`: Added new options for login page

```ts
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.

## **`@studiocms/dashboard`**

- Refactor to utilize new `@studiocms/auth` lib for user verification

## **`@studiocms/ui`**

- Update `<Input />` component's available types
6 changes: 6 additions & 0 deletions .changeset/clever-yaks-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@studiocms/devapps": patch
"@studiocms/core": patch
---

Expand PageData table schema and add Catagory and Tags schemas, and extend WP-importer
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"@studiocms/betaresources",
"@studiocms/core",
"@studiocms/dashboard",
"@studiocms/devapps",
"@studiocms/frontend",
"@studiocms/imagehandler",
"@studiocms/renderers",
Expand All @@ -21,5 +22,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["web", "docs", "node-playground", "ui-playground"]
"ignore": ["docs", "node-playground", "ui-playground"]
}
10 changes: 10 additions & 0 deletions .changeset/curvy-mirrors-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@studiocms/ui": patch
---

Applied various changes and fixes to different parts of the UI libary.

- Fixed a CSS leak caused by importing css files instead of having scoped styles
- Adjusted dropdown helper API for better DX
- Adjusted modal helper API for better DX
- Various CSS fixes for different components
5 changes: 5 additions & 0 deletions .changeset/long-cherries-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/core": patch
---

Translation Updated (PR: #376)
5 changes: 5 additions & 0 deletions .changeset/mean-apples-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/ui": patch
---

Added a new searchable select component and improved accessibility for normal selects
5 changes: 5 additions & 0 deletions .changeset/metal-steaks-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/devapps": patch
---

[Feat]: Add Wordpress importer app
5 changes: 5 additions & 0 deletions .changeset/old-llamas-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/devapps": patch
---

[Initial release]: First app, a libSQLViewer viewer for AstroDB powered by libsqlstudio!
17 changes: 17 additions & 0 deletions .changeset/perfect-hornets-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"studiocms": patch
"@studiocms/auth": patch
"@studiocms/core": patch
---

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).
3 changes: 1 addition & 2 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"@studiocms/ui": "0.1.0-beta.7",
"node-playground": "0.0.1",
"ui-playground": "0.0.1",
"docs": "0.0.1",
"web": "0.0.1"
"docs": "0.0.1"
},
"changesets": [
"breezy-rockets-lie",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/sharp-zoos-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/ui": patch
---

Added a theme helper and theme toggle component
7 changes: 7 additions & 0 deletions .changeset/short-islands-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@studiocms/imagehandler": patch
"@studiocms/core": patch
"studiocms": patch
---

Remove Unpic and simplify imageHandler
17 changes: 17 additions & 0 deletions .changeset/spotty-beds-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@studiocms/betaresources": patch
"@studiocms/imagehandler": patch
"@studiocms/dashboard": patch
"@studiocms/renderers": patch
"@studiocms/robotstxt": patch
"@studiocms/frontend": patch
"@studiocms/devapps": patch
"@studiocms/assets": patch
"@studiocms/auth": patch
"@studiocms/blog": patch
"@studiocms/core": patch
"@studiocms/ui": patch
"studiocms": patch
---

Update URLs
5 changes: 5 additions & 0 deletions .changeset/thick-dryers-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/ui": patch
---

Adjusted persistent toasts to include an outline for better visibility
7 changes: 7 additions & 0 deletions .changeset/thin-hounds-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@studiocms/dashboard": patch
"@studiocms/core": patch
"studiocms": patch
---

Adjusted strings to account for Astro Studio sunsetting
5 changes: 5 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See https://github.com/actions/labeler/tree/main for more information about the labeler action

translations:
- changed-files:
- any-glob-to-any-file: packages/studiocms_core/src/i18n/translations/*
32 changes: 0 additions & 32 deletions .github/renovate.json

This file was deleted.

Loading

0 comments on commit 5d6a627

Please sign in to comment.