@agentuity/postgres 3.0.0-alpha.7 → 3.0.0-beta.1
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/AGENTS.md +0 -4
- package/README.md +6 -23
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
- package/src/index.ts +8 -3
package/AGENTS.md
CHANGED
|
@@ -108,10 +108,6 @@ console.log(hasActiveClients());
|
|
|
108
108
|
await shutdownAll(5000); // 5 second timeout
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
## Runtime Integration
|
|
112
|
-
|
|
113
|
-
When `@agentuity/runtime` is available, the package automatically registers a shutdown hook. This means all postgres clients are closed during graceful shutdown without any additional code.
|
|
114
|
-
|
|
115
111
|
## Testing
|
|
116
112
|
|
|
117
113
|
- Tests require a running PostgreSQL instance
|
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @agentuity/postgres
|
|
2
2
|
|
|
3
|
+
> **⚠️ DEPRECATED** — Use `drizzle-orm` and `@neondatabase/serverless` directly with your `DATABASE_URL`.
|
|
4
|
+
>
|
|
5
|
+
> This package is no longer recommended for new projects.
|
|
6
|
+
|
|
3
7
|
Resilient PostgreSQL client with automatic reconnection for Agentuity projects.
|
|
4
8
|
|
|
5
9
|
## Features
|
|
@@ -254,11 +258,9 @@ Returned by `transaction.savepoint()`:
|
|
|
254
258
|
- `rollback()` - Rollback to this savepoint
|
|
255
259
|
- `release()` - Release the savepoint
|
|
256
260
|
|
|
257
|
-
## Global Registry and
|
|
258
|
-
|
|
259
|
-
All PostgreSQL clients are automatically registered in a global registry. When used with `@agentuity/runtime`, clients are automatically closed during graceful shutdown.
|
|
261
|
+
## Global Registry and Shutdown
|
|
260
262
|
|
|
261
|
-
|
|
263
|
+
All PostgreSQL clients are automatically registered in a global registry. Wire `shutdownAll()` into your process's shutdown signals so clients close cleanly:
|
|
262
264
|
|
|
263
265
|
```typescript
|
|
264
266
|
import { shutdownAll, getClientCount } from '@agentuity/postgres';
|
|
@@ -273,25 +275,6 @@ process.on('SIGTERM', async () => {
|
|
|
273
275
|
});
|
|
274
276
|
```
|
|
275
277
|
|
|
276
|
-
### With @agentuity/runtime
|
|
277
|
-
|
|
278
|
-
When using `@agentuity/runtime`, postgres clients are automatically closed during graceful shutdown - no additional code needed:
|
|
279
|
-
|
|
280
|
-
```typescript
|
|
281
|
-
import { createApp } from '@agentuity/runtime';
|
|
282
|
-
import { postgres } from '@agentuity/postgres';
|
|
283
|
-
|
|
284
|
-
// Create postgres client - it auto-registers with the runtime
|
|
285
|
-
const sql = postgres();
|
|
286
|
-
|
|
287
|
-
const app = await createApp({
|
|
288
|
-
// ... your app config
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
// When the runtime shuts down (SIGTERM/SIGINT), all postgres
|
|
292
|
-
// clients are automatically closed via the shutdown hook system
|
|
293
|
-
```
|
|
294
|
-
|
|
295
278
|
## License
|
|
296
279
|
|
|
297
280
|
Apache-2.0
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @agentuity/postgres -
|
|
2
|
+
* @agentuity/postgres - DEPRECATED
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Use drizzle-orm and @neondatabase/serverless directly with your DATABASE_URL.
|
|
5
|
+
* This package is no longer recommended for new projects.
|
|
6
|
+
*
|
|
7
|
+
* ~~Resilient PostgreSQL client with automatic reconnection~~
|
|
8
|
+
*
|
|
9
|
+
* This package provided a PostgreSQL client that wrapped Bun's native SQL driver
|
|
10
|
+
* and added automatic reconnection with exponential backoff.
|
|
6
11
|
*
|
|
7
12
|
* @example
|
|
8
13
|
* ```typescript
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGlD,OAAO,EACN,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,KAAK,sBAAsB,GAC3B,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG9E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGzD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAGpD,YAAY,EACX,cAAc,EACd,eAAe,EACf,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,SAAS,EACT,aAAa,GACb,MAAM,YAAY,CAAC;AAGpB,OAAO,EACN,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,GAChB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACN,cAAc,EACd,KAAK,EACL,oBAAoB,EACpB,wBAAwB,GACxB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,KAAK,WAAW,GAChB,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @agentuity/postgres -
|
|
2
|
+
* @agentuity/postgres - DEPRECATED
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Use drizzle-orm and @neondatabase/serverless directly with your DATABASE_URL.
|
|
5
|
+
* This package is no longer recommended for new projects.
|
|
6
|
+
*
|
|
7
|
+
* ~~Resilient PostgreSQL client with automatic reconnection~~
|
|
8
|
+
*
|
|
9
|
+
* This package provided a PostgreSQL client that wrapped Bun's native SQL driver
|
|
10
|
+
* and added automatic reconnection with exponential backoff.
|
|
6
11
|
*
|
|
7
12
|
* @example
|
|
8
13
|
* ```typescript
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,wBAAwB;AACxB,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAElD,kCAAkC;AAClC,OAAO,EACN,cAAc,EACd,oBAAoB,EACpB,cAAc,GAEd,MAAM,aAAa,CAAC;AAErB,2CAA2C;AAC3C,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE3D,8CAA8C;AAC9C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,gDAAgD;AAChD,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEzD,gBAAgB;AAChB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,6BAA6B;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAepD,SAAS;AACT,OAAO,EACN,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,GAChB,MAAM,aAAa,CAAC;AAErB,yBAAyB;AACzB,OAAO,EACN,cAAc,EACd,KAAK,EACL,oBAAoB,EACpB,wBAAwB,GACxB,MAAM,gBAAgB,CAAC;AAExB,2CAA2C;AAC3C,OAAO,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,gBAAgB,GAEhB,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentuity/postgres",
|
|
3
|
-
"
|
|
3
|
+
"deprecated": "Use drizzle-orm and @neondatabase/serverless directly with your DATABASE_URL.",
|
|
4
|
+
"version": "3.0.0-beta.1",
|
|
4
5
|
"license": "Apache-2.0",
|
|
5
6
|
"author": "Agentuity employees and contributors",
|
|
6
7
|
"type": "module",
|
|
@@ -31,11 +32,11 @@
|
|
|
31
32
|
"prepublishOnly": "bun run clean && bun run build"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"@agentuity/core": "3.0.0-
|
|
35
|
+
"@agentuity/core": "3.0.0-beta.1",
|
|
35
36
|
"pg": "^8.13.1"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@agentuity/test-utils": "3.0.0-
|
|
39
|
+
"@agentuity/test-utils": "3.0.0-beta.1",
|
|
39
40
|
"@types/bun": "latest",
|
|
40
41
|
"@types/pg": "^8.11.14",
|
|
41
42
|
"bun-types": "latest",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"sideEffects": false,
|
|
49
50
|
"repository": {
|
|
50
51
|
"type": "git",
|
|
51
|
-
"url": "https://github.com/agentuity/sdk.git",
|
|
52
|
+
"url": "git+https://github.com/agentuity/sdk.git",
|
|
52
53
|
"directory": "packages/postgres"
|
|
53
54
|
}
|
|
54
55
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @agentuity/postgres -
|
|
2
|
+
* @agentuity/postgres - DEPRECATED
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Use drizzle-orm and @neondatabase/serverless directly with your DATABASE_URL.
|
|
5
|
+
* This package is no longer recommended for new projects.
|
|
6
|
+
*
|
|
7
|
+
* ~~Resilient PostgreSQL client with automatic reconnection~~
|
|
8
|
+
*
|
|
9
|
+
* This package provided a PostgreSQL client that wrapped Bun's native SQL driver
|
|
10
|
+
* and added automatic reconnection with exponential backoff.
|
|
6
11
|
*
|
|
7
12
|
* @example
|
|
8
13
|
* ```typescript
|