@flightdev/db 0.0.2 → 0.0.3
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +1 -1
- package/README.md +9 -9
- package/package.json +7 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @flightdev/db@0.0.
|
|
2
|
+
> @flightdev/db@0.0.3 build E:\testear framework\Flight\packages\db
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/d1.ts, src/index.ts, src/neon.ts, src/postgres.ts, src/supabase.ts, src/turso.ts
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
[34mCLI[39m Target: node20
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist\
|
|
13
|
-
[32mESM[39m [1mdist\postgres.js [22m[32m2.39 KB[39m
|
|
12
|
+
[32mESM[39m [1mdist\d1.js [22m[32m2.51 KB[39m
|
|
14
13
|
[32mESM[39m [1mdist\neon.js [22m[32m2.96 KB[39m
|
|
14
|
+
[32mESM[39m [1mdist\postgres.js [22m[32m2.39 KB[39m
|
|
15
15
|
[32mESM[39m [1mdist\supabase.js [22m[32m1.93 KB[39m
|
|
16
|
-
[32mESM[39m [1mdist\d1.js [22m[32m2.51 KB[39m
|
|
17
16
|
[32mESM[39m [1mdist\turso.js [22m[32m2.70 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist\index.js [22m[32m402.00 B[39m
|
|
18
18
|
[32mESM[39m ⚡️ Build success in 23ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 6069ms
|
|
21
21
|
[32mDTS[39m [1mdist\d1.d.ts [22m[32m1.53 KB[39m
|
|
22
22
|
[32mDTS[39m [1mdist\neon.d.ts [22m[32m857.00 B[39m
|
|
23
23
|
[32mDTS[39m [1mdist\postgres.d.ts [22m[32m907.00 B[39m
|
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @flightdev/db
|
|
2
2
|
|
|
3
3
|
Database abstraction layer for Flight Framework. Connect to any database with a unified, type-safe API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @flightdev/db
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
Install the driver for your database:
|
|
@@ -27,8 +27,8 @@ npm install @supabase/supabase-js
|
|
|
27
27
|
## Quick Start
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
|
-
import { createDb } from '@
|
|
31
|
-
import { postgres } from '@
|
|
30
|
+
import { createDb } from '@flightdev/db';
|
|
31
|
+
import { postgres } from '@flightdev/db/postgres';
|
|
32
32
|
|
|
33
33
|
const db = createDb(postgres({
|
|
34
34
|
connectionString: process.env.DATABASE_URL,
|
|
@@ -50,7 +50,7 @@ console.log(users.rows);
|
|
|
50
50
|
Standard PostgreSQL driver using `pg` with connection pooling.
|
|
51
51
|
|
|
52
52
|
```typescript
|
|
53
|
-
import { postgres } from '@
|
|
53
|
+
import { postgres } from '@flightdev/db/postgres';
|
|
54
54
|
|
|
55
55
|
const driver = postgres({
|
|
56
56
|
connectionString: 'postgresql://user:pass@localhost:5432/mydb',
|
|
@@ -71,7 +71,7 @@ const driver = postgres({
|
|
|
71
71
|
Cloud SQLite with Turso or local SQLite files.
|
|
72
72
|
|
|
73
73
|
```typescript
|
|
74
|
-
import { turso } from '@
|
|
74
|
+
import { turso } from '@flightdev/db/turso';
|
|
75
75
|
|
|
76
76
|
// Turso Cloud
|
|
77
77
|
const cloud = turso({
|
|
@@ -90,7 +90,7 @@ const local = turso({
|
|
|
90
90
|
Edge-compatible PostgreSQL for serverless environments.
|
|
91
91
|
|
|
92
92
|
```typescript
|
|
93
|
-
import { neon } from '@
|
|
93
|
+
import { neon } from '@flightdev/db/neon';
|
|
94
94
|
|
|
95
95
|
// HTTP mode (recommended for serverless)
|
|
96
96
|
const http = neon({
|
|
@@ -110,7 +110,7 @@ const ws = neon({
|
|
|
110
110
|
Direct database access with Supabase's query builder.
|
|
111
111
|
|
|
112
112
|
```typescript
|
|
113
|
-
import { supabase } from '@
|
|
113
|
+
import { supabase } from '@flightdev/db/supabase';
|
|
114
114
|
|
|
115
115
|
const driver = supabase({
|
|
116
116
|
url: process.env.SUPABASE_URL,
|
|
@@ -124,7 +124,7 @@ const driver = supabase({
|
|
|
124
124
|
Native Cloudflare D1 support for edge SQLite.
|
|
125
125
|
|
|
126
126
|
```typescript
|
|
127
|
-
import { d1 } from '@
|
|
127
|
+
import { d1 } from '@flightdev/db/d1';
|
|
128
128
|
|
|
129
129
|
export default {
|
|
130
130
|
async fetch(request, env) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flightdev/db",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Flight Database Abstraction Layer - Agnostic database adapters",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -68,6 +68,12 @@
|
|
|
68
68
|
"optional": true
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
|
+
"homepage": "https://github.com/EliosLT/FlightDev",
|
|
72
|
+
"repository": {
|
|
73
|
+
"url": "https://github.com/EliosLT/FlightDev.git",
|
|
74
|
+
"directory": "packages/db",
|
|
75
|
+
"type": "git"
|
|
76
|
+
},
|
|
71
77
|
"scripts": {
|
|
72
78
|
"build": "tsup",
|
|
73
79
|
"dev": "tsup --watch",
|