@pgflow/dsl 0.3.1 → 0.4.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.
- package/dist/CHANGELOG.md +67 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @pgflow/dsl
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 98556d3: Add TypeScript client library for pgflow workflow management
|
|
8
|
+
|
|
9
|
+
## @pgflow/client
|
|
10
|
+
|
|
11
|
+
Introduces a new TypeScript client library that provides both event-based and promise-based APIs for interacting with pgflow workflows:
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- **Type-safe workflow management** with full TypeScript support and automatic type inference from flow definitions
|
|
16
|
+
- **Dual API approach**: Choose between event-based subscriptions or promise-based async/await patterns
|
|
17
|
+
- **Real-time monitoring** via Supabase broadcasts with granular event subscriptions
|
|
18
|
+
- **Resource management** with automatic cleanup and disposal
|
|
19
|
+
- **Comprehensive error handling** and recovery mechanisms
|
|
20
|
+
|
|
21
|
+
### Core Components
|
|
22
|
+
|
|
23
|
+
- `PgflowClient` - Main client for starting and managing workflow runs
|
|
24
|
+
- `FlowRun` - Monitor and interact with workflow executions
|
|
25
|
+
- `FlowStep` - Track individual step progress and outputs
|
|
26
|
+
|
|
27
|
+
### Example Usage
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
// Start a workflow
|
|
31
|
+
const pgflow = new PgflowClient(supabase);
|
|
32
|
+
const run = await pgflow.startFlow('analyze_website', {
|
|
33
|
+
url: 'https://example.com',
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Event-based monitoring
|
|
37
|
+
run.on('completed', (event) => {
|
|
38
|
+
console.log('Workflow completed:', event.output);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Promise-based monitoring
|
|
42
|
+
const completed = await run.waitForStatus(FlowRunStatus.Completed, {
|
|
43
|
+
timeoutMs: 30000,
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## @pgflow/core
|
|
48
|
+
|
|
49
|
+
### Database Enhancements
|
|
50
|
+
|
|
51
|
+
- Add `start_flow_with_states()` function to start flows and return complete initial state
|
|
52
|
+
- Add `get_run_with_states()` function to retrieve runs with all step states efficiently
|
|
53
|
+
- Implement `SECURITY DEFINER` functions for secure API access
|
|
54
|
+
- Add real-time broadcast support for workflow state changes
|
|
55
|
+
|
|
56
|
+
## @pgflow/edge-worker
|
|
57
|
+
|
|
58
|
+
### Test Infrastructure Updates
|
|
59
|
+
|
|
60
|
+
- Update test database configuration to use standard PostgreSQL credentials
|
|
61
|
+
- Improve test helper functions for database transactions
|
|
62
|
+
- Update Docker Compose configuration for test environment
|
|
63
|
+
|
|
64
|
+
## @pgflow/dsl
|
|
65
|
+
|
|
66
|
+
### Build Configuration
|
|
67
|
+
|
|
68
|
+
- Add TypeScript references to tsconfig.spec.json for improved type checking in tests
|
|
69
|
+
|
|
3
70
|
## 0.3.1
|
|
4
71
|
|
|
5
72
|
## 0.3.0
|
package/dist/package.json
CHANGED