@agentuity/postgres 3.0.0-beta.0 → 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 +2 -23
- package/package.json +3 -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
|
@@ -258,11 +258,9 @@ Returned by `transaction.savepoint()`:
|
|
|
258
258
|
- `rollback()` - Rollback to this savepoint
|
|
259
259
|
- `release()` - Release the savepoint
|
|
260
260
|
|
|
261
|
-
## Global Registry and
|
|
261
|
+
## Global Registry and Shutdown
|
|
262
262
|
|
|
263
|
-
All PostgreSQL clients are automatically registered in a global registry.
|
|
264
|
-
|
|
265
|
-
### Manual Shutdown (without runtime)
|
|
263
|
+
All PostgreSQL clients are automatically registered in a global registry. Wire `shutdownAll()` into your process's shutdown signals so clients close cleanly:
|
|
266
264
|
|
|
267
265
|
```typescript
|
|
268
266
|
import { shutdownAll, getClientCount } from '@agentuity/postgres';
|
|
@@ -277,25 +275,6 @@ process.on('SIGTERM', async () => {
|
|
|
277
275
|
});
|
|
278
276
|
```
|
|
279
277
|
|
|
280
|
-
### With @agentuity/runtime
|
|
281
|
-
|
|
282
|
-
When using `@agentuity/runtime`, postgres clients are automatically closed during graceful shutdown - no additional code needed:
|
|
283
|
-
|
|
284
|
-
```typescript
|
|
285
|
-
import { createApp } from '@agentuity/runtime';
|
|
286
|
-
import { postgres } from '@agentuity/postgres';
|
|
287
|
-
|
|
288
|
-
// Create postgres client - it auto-registers with the runtime
|
|
289
|
-
const sql = postgres();
|
|
290
|
-
|
|
291
|
-
const app = await createApp({
|
|
292
|
-
// ... your app config
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
// When the runtime shuts down (SIGTERM/SIGINT), all postgres
|
|
296
|
-
// clients are automatically closed via the shutdown hook system
|
|
297
|
-
```
|
|
298
|
-
|
|
299
278
|
## License
|
|
300
279
|
|
|
301
280
|
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,7 +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.
|
|
4
|
+
"version": "3.0.0-beta.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Agentuity employees and contributors",
|
|
7
7
|
"type": "module",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"prepublishOnly": "bun run clean && bun run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@agentuity/core": "3.0.0-beta.
|
|
35
|
+
"@agentuity/core": "3.0.0-beta.1",
|
|
36
36
|
"pg": "^8.13.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@agentuity/test-utils": "3.0.0-beta.
|
|
39
|
+
"@agentuity/test-utils": "3.0.0-beta.1",
|
|
40
40
|
"@types/bun": "latest",
|
|
41
41
|
"@types/pg": "^8.11.14",
|
|
42
42
|
"bun-types": "latest",
|