@payloadcms/db-d1-sqlite 3.58.0-internal.8775d75 → 3.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +14 -11
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Payload SQLite Adapter
1
+ # Payload D1 SQLite Adapter
2
2
 
3
- Official SQLite adapter for [Payload](https://payloadcms.com).
3
+ Official D1 SQLite adapter for [Payload](https://payloadcms.com).
4
4
 
5
5
  - [Main Repository](https://github.com/payloadcms/payload)
6
6
  - [Payload Docs](https://payloadcms.com/docs)
@@ -8,23 +8,26 @@ Official SQLite adapter for [Payload](https://payloadcms.com).
8
8
  ## Installation
9
9
 
10
10
  ```bash
11
- npm install @payloadcms/db-sqlite
11
+ npm install @payloadcms/db-d1-sqlite
12
12
  ```
13
13
 
14
14
  ## Usage
15
15
 
16
16
  ```ts
17
- import { buildConfig } from 'payload/config'
18
- import { sqliteAdapter } from '@payloadcms/db-sqlite'
17
+ import { sqliteD1Adapter } from '@payloadcms/db-d1-sqlite'
19
18
 
20
19
  export default buildConfig({
21
- db: sqliteAdapter({
22
- client: {
23
- url: process.env.DATABASE_URI,
24
- },
20
+ // Your config goes here
21
+ collections: [
22
+ // Collections go here
23
+ ],
24
+ // Configure the D1 adapter here
25
+ db: sqliteD1Adapter({
26
+ // D1-specific arguments go here.
27
+ // `binding` is required and should match the D1 database binding name in your Cloudflare Worker environment.
28
+ binding: cloudflare.env.D1,
25
29
  }),
26
- // ...rest of config
27
30
  })
28
31
  ```
29
32
 
30
- More detailed usage can be found in the [Payload Docs](https://payloadcms.com/docs/configuration/overview).
33
+ More detailed usage can be found in the [Payload Docs](https://payloadcms.com/docs/database/sqlite).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/db-d1-sqlite",
3
- "version": "3.58.0-internal.8775d75",
3
+ "version": "3.58.0",
4
4
  "description": "The officially supported D1 SQLite database adapter for Payload",
5
5
  "homepage": "https://payloadcms.com",
6
6
  "repository": {
@@ -68,17 +68,17 @@
68
68
  "prompts": "2.4.2",
69
69
  "to-snake-case": "1.0.0",
70
70
  "uuid": "9.0.0",
71
- "@payloadcms/drizzle": "3.58.0-internal.8775d75"
71
+ "@payloadcms/drizzle": "3.58.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/pg": "8.10.2",
75
75
  "@types/to-snake-case": "1.0.0",
76
76
  "@types/uuid": "10.0.0",
77
- "@payloadcms/eslint-config": "3.28.0",
78
- "payload": "3.58.0-internal.8775d75"
77
+ "payload": "3.58.0",
78
+ "@payloadcms/eslint-config": "3.28.0"
79
79
  },
80
80
  "peerDependencies": {
81
- "payload": "3.58.0-internal.8775d75"
81
+ "payload": "3.58.0"
82
82
  },
83
83
  "scripts": {
84
84
  "build": "pnpm build:swc && pnpm build:types",