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