Skip to content

Commit 30d1e8e

Browse files
fix: update package references from @studiocms/storage-s3 to @studiocms/s3-storage and revise related documentation
1 parent 1019709 commit 30d1e8e

File tree

11 files changed

+32
-80
lines changed

11 files changed

+32
-80
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@studiocms/md": "https://pkg.pr.new/withstudiocms/studiocms/@studiocms/md@9f45a21",
3030
"@studiocms/mdx": "https://pkg.pr.new/withstudiocms/studiocms/@studiocms/mdx@9f45a21",
3131
"@studiocms/wysiwyg": "https://pkg.pr.new/withstudiocms/studiocms/@studiocms/wysiwyg@9f45a21",
32-
"@studiocms/storage-s3": "https://pkg.pr.new/withstudiocms/studiocms/@studiocms/s3-storage@9f45a21",
32+
"@studiocms/s3-storage": "https://pkg.pr.new/withstudiocms/studiocms/@studiocms/s3-storage@9f45a21",
3333
"studiocms": "https://pkg.pr.new/withstudiocms/studiocms@9f45a21",
3434
"@withstudiocms/component-registry": "https://pkg.pr.new/withstudiocms/studiocms/@withstudiocms/component-registry@9f45a21",
3535
"@withstudiocms/kysely": "https://pkg.pr.new/withstudiocms/studiocms/@withstudiocms/kysely@9f45a21",

pnpm-lock.yaml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/content/docs/en/config-reference/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default defineStudioCMSConfig({
8080
```ts twoslash {3} title="studiocms.config.mjs"
8181
import { defineStudioCMSConfig } from 'studiocms/config';
8282
// ---cut---
83-
import s3Storage from '@studiocms/storage-s3';
83+
import s3Storage from '@studiocms/s3-storage';
8484
export default defineStudioCMSConfig({
8585
storageManager: s3Storage(),
8686
})

src/content/docs/en/ecosystem/packages/kysely.mdx

Lines changed: 15 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -103,23 +103,9 @@ export const getUsers = Effect.gen(function* () {
103103
});
104104

105105
const users = yield* getUsers();
106+
// ^?
107+
106108
console.log('Users:', users);
107-
/*
108-
type of 'users' is:
109-
const users: readonly {
110-
readonly url: string | null | undefined;
111-
readonly id: string;
112-
readonly name: string;
113-
readonly email: string | null | undefined;
114-
readonly avatar: string | null | undefined;
115-
readonly username: string;
116-
readonly password: string | null | undefined;
117-
readonly updatedAt: Date;
118-
readonly createdAt: Date;
119-
readonly emailVerified: boolean;
120-
readonly notifications: string | null | undefined;
121-
}[]
122-
*/
123109
});
124110
```
125111

@@ -157,7 +143,7 @@ export const insertUser = Effect.gen(function* () {
157143
db((client) => client.insertInto('StudioCMSUsersTable').values(newUser).executeTakeFirst()),
158144
});
159145

160-
const newUser = yield* insertUser({
146+
const data = {
161147
username: 'new_user',
162148
163149
password: null,
@@ -169,12 +155,11 @@ export const insertUser = Effect.gen(function* () {
169155
id: crypto.randomUUID(),
170156
updatedAt: new Date().toISOString(),
171157
createdAt: new Date().toISOString(),
172-
});
173-
console.log('Inserted new user:', newUser); // withEncoder returns a 'InsertResult'
174-
/*
175-
type of 'newUser' is:
176-
const newUser: InsertResult
177-
*/
158+
};
159+
160+
const newUser = yield* insertUser(data);
161+
// ^?
162+
console.log('Inserted new user:', newUser);
178163
});
179164
```
180165

@@ -219,7 +204,7 @@ export const insertUser = Effect.gen(function* () {
219204
),
220205
});
221206

222-
const insertedUser = yield* insertNewUser({
207+
const data = {
223208
username: 'codec_user',
224209
225210
password: null,
@@ -231,24 +216,11 @@ export const insertUser = Effect.gen(function* () {
231216
id: crypto.randomUUID(),
232217
updatedAt: new Date().toISOString(),
233218
createdAt: new Date().toISOString(),
234-
});
235-
console.log('Inserted user with codec:', insertedUser); // withCodec returns decoded results
236-
/*
237-
type of 'insertedUser' is:
238-
const user: {
239-
readonly url: string | null | undefined;
240-
readonly id: string;
241-
readonly name: string;
242-
readonly email: string | null | undefined;
243-
readonly avatar: string | null | undefined;
244-
readonly username: string;
245-
readonly password: string | null | undefined;
246-
readonly updatedAt: Date;
247-
readonly createdAt: Date;
248-
readonly emailVerified: boolean;
249-
readonly notifications: string | null | undefined;
250-
}
251-
*/
219+
};
220+
221+
const insertedUser = yield* insertNewUser(data);
222+
// ^?
223+
console.log('Inserted user with codec:', insertedUser);
252224
});
253225
```
254226

@@ -290,23 +262,8 @@ export const insertUser = Effect.gen(function* () {
290262
});
291263

292264
const user = yield* getUserById('some-user-id');
265+
// ^?
293266
console.log('User by ID:', user);
294-
/*
295-
type of 'user' is:
296-
const user: {
297-
readonly url: string | null | undefined;
298-
readonly id: string;
299-
readonly name: string;
300-
readonly email: string | null | undefined;
301-
readonly avatar: string | null | undefined;
302-
readonly username: string;
303-
readonly password: string | null | undefined;
304-
readonly updatedAt: Date;
305-
readonly createdAt: Date;
306-
readonly emailVerified: boolean;
307-
readonly notifications: string | null | undefined;
308-
} | undefined
309-
*/
310267
});
311268
```
312269

src/content/docs/en/ecosystem/packages/sdk.mdx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { PackageManagers } from 'starlight-package-managers'
1818
import Integration from '~/components/Integration.astro'
1919
import ReadMore from '~/components/ReadMore.astro'
2020

21-
The following package is built-in to StudioCMS and provides the core database functionality used by StudioCMS. It is intended to be used internally by StudioCMS, but users can also use it directly in their projects for more advanced use cases.
21+
A comprehensive Software Development Kit for StudioCMS, providing a unified API for interacting with the CMS core functionality. Built with TypeScript and Effect-ts for type-safety and functional programming patterns, with Kysely DB ([`@withstudiocms/kysely`](/en/ecosystem/packages/kysely/)) for dynamic database storage.
2222

2323
<Aside type="caution" title="Warning">
2424
This package is primarily intended for internal use by StudioCMS. While you can use it directly in your projects, be aware that it may change without notice as StudioCMS evolves.
@@ -28,12 +28,6 @@ The following package is built-in to StudioCMS and provides the core database fu
2828
Want to learn more about how to use the SDK with StudioCMS? Check out [The SDK](/en/how-it-works/sdk/) documentation to learn how to use it in your StudioCMS project!
2929
</ReadMore>
3030

31-
## The SDK package
32-
33-
<Integration title="@withstudiocms/sdk" githubURL="https://github.com/withstudiocms/studiocms/tree/main/packages/@withstudiocms/sdk/" released={true} />
34-
35-
A comprehensive Software Development Kit for StudioCMS, providing a unified API for interacting with the CMS core functionality. Built with TypeScript and Effect-ts for type-safety and functional programming patterns, with Kysely DB ([`@withstudiocms/kysely`](/en/ecosystem/packages/kysely/)) for dynamic database storage.
36-
3731
### Features
3832

3933
- **Authentication Module** - User authentication and session management

src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-32.mdx renamed to src/content/docs/en/guides/upgrade/version-guides/0-1-0.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
i18nReady: true
3-
title: "Upgrade: 0.1.0-beta.32"
4-
description: Upgrade StudioCMS to Beta.32
3+
title: "Upgrade: v0.1.0"
4+
description: Upgrade StudioCMS to v0.1.0
55
topic: guides
66
sidebar:
7-
label: 0.1.0-beta.32
7+
label: v0.1.0
88
badge:
99
text: NEW
1010
variant: success
@@ -15,7 +15,7 @@ import ReadMore from '~/components/ReadMore.astro'
1515
import { PackageManagers } from 'starlight-package-managers'
1616
import { FileTree, TabItem, Tabs, Steps, Aside } from '@astrojs/starlight/components';
1717

18-
StudioCMS `0.1.0-beta.32` introduces several breaking changes, new features, and bug fixes. This guide will help you navigate the upgrade process smoothly.
18+
StudioCMS `0.1.0` introduces several breaking changes, new features, and bug fixes. This guide will help you navigate the upgrade process smoothly.
1919

2020
## Breaking changes
2121
- Replaced `@libsql/kysely-libsql` with `kysely-turso` for Turso database client. If you were using `@libsql/kysely-libsql` in your project, please update your dependencies to use `kysely-turso` instead.
@@ -51,6 +51,7 @@ StudioCMS `0.1.0-beta.32` introduces several breaking changes, new features, and
5151
- Fixes various CSS issues across all dashboard and auth pages.
5252
- Ensures DB Studio custom element is defined if dev-toolbar is not present
5353
- Reworks CLI to fix async/sync code handling for `studiocms users` command
54+
- Replaced all instances of `.returning()`/`returningAll()` with transactions to properly support SQL dialects that do not support returning such as MySQL
5455

5556
**Further Reading**
5657

src/content/docs/en/plugins/extended.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function studioCMSPageInjector(options: Options) {
8282
return definePlugin({
8383
identifier: 'my-plugin',
8484
name: 'My Plugin',
85-
studiocmsMinimumVersion: '0.1.0-beta.31',
85+
studiocmsMinimumVersion: '0.1.0',
8686
hooks: {
8787
'studiocms:astro-config': ({ addIntegrations }) => {
8888
addIntegrations(myIntegration(options)); // Optional, but recommended

src/content/docs/en/plugins/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const myIntegration = (options: Options): AstroIntegration => ({
9191
export const myPlugin = (options: Options) => definePlugin({
9292
identifier: 'my-plugin',
9393
name: 'My Plugin',
94-
studiocmsMinimumVersion: '0.1.0-beta.31',
94+
studiocmsMinimumVersion: '0.1.0',
9595
hooks: {
9696
'studiocms:astro-config': ({ addIntegrations }) => {
9797
addIntegrations(myIntegration(options)) // Optional, but recommended
@@ -100,7 +100,7 @@ export const myPlugin = (options: Options) => definePlugin({
100100
});
101101
```
102102

103-
In this example, we define a StudioCMS plugin called `My Plugin` that requires StudioCMS version `0.1.0-beta.31` or higher. The plugin also provides an Astro Integration that logs a message to the console when the `astro:config:setup` hook is called.
103+
In this example, we define a StudioCMS plugin called `My Plugin` that requires StudioCMS version `v0.1.0` or higher. The plugin also provides an Astro Integration that logs a message to the console when the `astro:config:setup` hook is called.
104104

105105
<ReadMore>For more information on building plugins checkout the [Making Plugins Useful][extended-plugins] Guide</ReadMore>
106106

src/content/docs/en/plugins/renderers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const { resolve } = createResolver(import.meta.url);
2929
export const myPlugin = () => definePlugin({
3030
identifier: 'my-plugin',
3131
name: 'My Plugin',
32-
studiocmsMinimumVersion: '0.1.0-beta.31',
32+
studiocmsMinimumVersion: '0.1.0',
3333
hooks: {
3434
'studiocms:rendering': ({ setRendering }) => {
3535
setRendering({

src/content/docs/en/start-here/getting-started.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { sponsors, SponsorLink } from '~/share-link'
2121
<LinkCard title="Upgrading StudioCMS to Latest" href="/en/guides/upgrade/latest/" description="Looking to Upgrade to the latest version? Look here!" />
2222

2323
<Aside type="caution" title="Attention">
24-
This guide was recently revised for major changes in StudioCMS `0.1.0-beta.31`. If you've previously read this guide, please the review the changes carefully to ensure you are up to date with the latest setup instructions.
24+
This guide was recently revised for changes in StudioCMS `v0.1.0`. If you've previously read this guide, please the review the changes carefully to ensure you are up to date with the latest setup instructions.
2525

2626
Or if you are upgrading from a previous version of StudioCMS, please see the [Upgrading StudioCMS to Latest](/en/guides/upgrade/latest/) guide for more information.
2727
</Aside>
@@ -374,7 +374,7 @@ The following paths are examples of the callback URL for each provider:
374374
| [Google](/en/package-catalog/studiocms-plugins/studiocms-google/) | `/studiocms_api/auth/google/callback` |
375375
| [Auth0](/en/package-catalog/studiocms-plugins/studiocms-auth0/) | `/studiocms_api/auth/auth0/callback` |
376376

377-
### Configure Storage API Manager (optional) <Badge text='Added in beta.32' variant='success' />
377+
### Configure Storage API Manager (optional) <Badge text='Added in v0.1.0' variant='success' />
378378

379379
StudioCMS supports using different Storage API Managers to handle file and image storage. By default, StudioCMS uses a built-in no-op storage manager that does not store any files or images.
380380

0 commit comments

Comments
 (0)