Skip to content

Commit 3f5339a

Browse files
Version Packages (#186)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 9f219a4 commit 3f5339a

File tree

17 files changed

+133
-60
lines changed

17 files changed

+133
-60
lines changed

.changeset/clean-zoos-smoke.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/little-seas-lick.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

pkgs/cli/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# pgflow
22

3+
## 0.5.4
4+
5+
### Patch Changes
6+
7+
- @pgflow/core@0.5.4
8+
39
## 0.5.3
410

511
### Patch Changes

pkgs/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pgflow",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"type": "module",
55
"main": "./dist/index.js",
66
"typings": "./dist/index.d.ts",

pkgs/client/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @pgflow/client
22

3+
## 0.5.4
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [9f219a4]
8+
- @pgflow/dsl@0.5.4
9+
- @pgflow/core@0.5.4
10+
311
## 0.5.3
412

513
### Patch Changes

pkgs/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pgflow/client",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"type": "module",
55
"scripts": {
66
"verify-exports": "node scripts/verify-exports.js"

pkgs/core/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @pgflow/core
22

3+
## 0.5.4
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [9f219a4]
8+
- @pgflow/dsl@0.5.4
9+
310
## 0.5.3
411

512
### Patch Changes

pkgs/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pgflow/core",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"license": "AGPL-3.0",
55
"type": "module",
66
"main": "./dist/index.js",

pkgs/dsl/CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# @pgflow/dsl
22

3+
## 0.5.4
4+
5+
### Patch Changes
6+
7+
- 9f219a4: Add context object as second parameter to handlers
8+
9+
Queue and flow handlers now receive an optional context parameter that provides platform resources like database connections, environment variables, and Supabase clients - eliminating boilerplate and connection management.
10+
11+
```typescript
12+
// Queue handler
13+
EdgeWorker.start(async (payload, context) => {
14+
await context.sql`INSERT INTO tasks (data) VALUES (${payload})`;
15+
});
16+
17+
// Flow step handler
18+
.step({ slug: 'process' }, async (input, context) => {
19+
const result = await context.serviceSupabase.from('users').select();
20+
})
21+
```
22+
23+
**Core resources** (always available):
24+
25+
- `context.env` - Environment variables
26+
- `context.shutdownSignal` - AbortSignal for graceful shutdown
27+
- `context.rawMessage` - Original pgmq message with metadata
28+
- `context.stepTask` - Current step task details (flow handlers only)
29+
30+
**Supabase platform resources**:
31+
32+
- `context.sql` - PostgreSQL client (postgres.js)
33+
- `context.anonSupabase` - Supabase client with anonymous key
34+
- `context.serviceSupabase` - Supabase client with service role key
35+
36+
To use Supabase resources in flows, import from the Supabase preset:
37+
38+
```typescript
39+
import { Flow } from '@pgflow/dsl/supabase';
40+
```
41+
42+
The context parameter is optional for backward compatibility - existing single-parameter handlers continue to work unchanged.
43+
344
## 0.5.3
445

546
### Patch Changes

pkgs/dsl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pgflow/dsl",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"type": "module",
55
"main": "./dist/index.js",
66
"module": "./dist/index.js",

0 commit comments

Comments
 (0)