@pgflow/core 0.0.0-add-workerconfig-to-context--20250905094004-b98e1fec-20250905074005 → 0.0.0-test-snapshot-releases-8d5d9bc1-20250922101013

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.
Files changed (27) hide show
  1. package/package.json +2 -2
  2. package/dist/ATLAS.md +0 -32
  3. package/dist/CHANGELOG.md +0 -639
  4. package/dist/PgflowSqlClient.d.ts +0 -17
  5. package/dist/PgflowSqlClient.d.ts.map +0 -1
  6. package/dist/PgflowSqlClient.js +0 -70
  7. package/dist/README.md +0 -393
  8. package/dist/database-types.d.ts +0 -828
  9. package/dist/database-types.d.ts.map +0 -1
  10. package/dist/database-types.js +0 -8
  11. package/dist/index.d.ts +0 -4
  12. package/dist/index.d.ts.map +0 -1
  13. package/dist/index.js +0 -2
  14. package/dist/package.json +0 -32
  15. package/dist/supabase/migrations/20250429164909_pgflow_initial.sql +0 -579
  16. package/dist/supabase/migrations/20250517072017_pgflow_fix_poll_for_tasks_to_use_separate_statement_for_polling.sql +0 -101
  17. package/dist/supabase/migrations/20250609105135_pgflow_add_start_tasks_and_started_status.sql +0 -371
  18. package/dist/supabase/migrations/20250610180554_pgflow_add_set_vt_batch_and_use_it_in_start_tasks.sql +0 -127
  19. package/dist/supabase/migrations/20250614124241_pgflow_add_realtime.sql +0 -501
  20. package/dist/supabase/migrations/20250619195327_pgflow_fix_fail_task_missing_realtime_event.sql +0 -185
  21. package/dist/supabase/migrations/20250627090700_pgflow_fix_function_search_paths.sql +0 -6
  22. package/dist/supabase/migrations/20250707210212_pgflow_add_opt_start_delay.sql +0 -103
  23. package/dist/supabase/migrations/20250719205006_pgflow_worker_deprecation.sql +0 -2
  24. package/dist/tsconfig.lib.tsbuildinfo +0 -1
  25. package/dist/types.d.ts +0 -94
  26. package/dist/types.d.ts.map +0 -1
  27. package/dist/types.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pgflow/core",
3
- "version": "0.0.0-add-workerconfig-to-context--20250905094004-b98e1fec-20250905074005",
3
+ "version": "0.0.0-test-snapshot-releases-8d5d9bc1-20250922101013",
4
4
  "license": "AGPL-3.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "postgres": "^3.4.5",
27
- "@pgflow/dsl": "0.0.0-add-workerconfig-to-context--20250905094004-b98e1fec-20250905074005"
27
+ "@pgflow/dsl": "0.0.0-test-snapshot-releases-8d5d9bc1-20250922101013"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"
package/dist/ATLAS.md DELETED
@@ -1,32 +0,0 @@
1
- # Atlas setup
2
-
3
- We use [Atlas](https://atlasgo.io/docs) to generate migrations from the declarative schemas stored in `./schemas/` folder.
4
-
5
- ## Configuration
6
-
7
- The setup is configured in `atlas.hcl`.
8
-
9
- It is set to compare `schemas/` to what is in `supabase/migrations/`.
10
-
11
- ### Docker dev image
12
-
13
- Atlas requires a dev database to be available for computing diffs.
14
- The database must be empty, but contain everything needed for the schemas to apply.
15
-
16
- We need a configured [PGMQ](https://github.com/tembo-io/pgmq) extension, which Atlas does not support
17
- in their dev images.
18
-
19
- That's why this setup relies on a custom built image `jumski/postgres-15-pgmq:latest`.
20
-
21
- Inspect `Dockerfile.atlas` to see how it is built.
22
-
23
- See also `./scripts/build-atlas-postgres-image` and `./scripts/push-atlas-postgres-image` scripts for building and pushing the image.
24
-
25
- ## Workflow
26
-
27
- 1. Make sure you start with a clean database (`pnpm supabase db reset`).
28
- 1. Modify the schemas in `schemas/` to a desired state.
29
- 1. Run `./scripts/atlas-migrate-diff <migration-name>` to create a new migration based on the diff.
30
- 1. Run `pnpm supabase migration up` to apply the migration.
31
- 1. In case of any errors, remove the generated migration file, make changes in `schemas/` and repeat the process.
32
- 1. After the migration is applied, verify it does not break tests with `nx test:pgtap`
package/dist/CHANGELOG.md DELETED
@@ -1,639 +0,0 @@
1
- # @pgflow/core
2
-
3
- ## 0.6.0
4
-
5
- ### Patch Changes
6
-
7
- - 81d552f: Implement worker deprecation for graceful shutdowns
8
-
9
- - Add deprecation support to enable zero-downtime deployments
10
- - Workers now check deprecation status via heartbeat and stop accepting new work when deprecated
11
- - Repurpose unused `stopped_at` column as `deprecated_at` for tracking deprecation timestamps
12
- - Refactor heartbeat logic directly into lifecycle classes for improved type safety
13
- - Add configurable heartbeat interval (default: 5 seconds)
14
- - Workers complete in-flight work before shutting down when deprecated
15
-
16
- - Updated dependencies [a67bf27]
17
- - @pgflow/dsl@0.6.0
18
-
19
- ## 0.5.4
20
-
21
- ### Patch Changes
22
-
23
- - Updated dependencies [9f219a4]
24
- - @pgflow/dsl@0.5.4
25
-
26
- ## 0.5.3
27
-
28
- ### Patch Changes
29
-
30
- - af787ff: Add `startDelay` option for workflow steps
31
-
32
- Introduces the ability to delay a step's **initial execution** by a specified number of seconds, enabling multi-day workflows and scheduled tasks within pgflow.
33
-
34
- **Important**: `startDelay` only applies to the first execution attempt. Retries use the standard exponential backoff mechanism based on `baseDelay`, not `startDelay`.
35
-
36
- ### Core Changes (@pgflow/core)
37
-
38
- - Added `opt_start_delay` column (integer, nullable, CHECK >= 0) to `pgflow.steps` table
39
- - Updated `add_step` function to accept and validate the new `start_delay` parameter
40
- - Modified `start_ready_steps` to schedule initial task execution with delay via `pgmq.send(queue, message, delay)`
41
- - Requires pgmq >= 0.40 for delay support
42
- - Migration: `20250707210212_pgflow_add_opt_start_delay.sql`
43
- - Added comprehensive PgTAP tests for validation and scheduling behavior
44
-
45
- ### DSL Changes (@pgflow/dsl)
46
-
47
- - Extended `StepOptions` and `StepRuntimeOptions` interfaces with optional `startDelay` (in seconds)
48
- - Updated `compileFlow()` to emit `start_delay => value` in generated SQL
49
- - Added validation: `startDelay` is only allowed at step level, not flow level (prevents cascading delays)
50
- - Valid range: 0 to 2,147,483,647 seconds (~68 years)
51
- - Added unit tests for compilation and validation
52
-
53
- ### Documentation Updates (@pgflow/website)
54
-
55
- - Added `startDelay` section in configuration guide with detailed explanation
56
- - Created multi-day workflow example (onboarding email sequence)
57
- - Updated "Update Flow Options" to include `opt_start_delay`
58
- - Enhanced VS comparison pages to mention "Native step delays" capability
59
- - Documented why `startDelay` is step-level only
60
-
61
- ### Example Usage
62
-
63
- ```typescript
64
- new Flow({
65
- slug: 'user_onboarding',
66
- maxAttempts: 3,
67
- baseDelay: 5, // Retry delay (not initial delay)
68
- timeout: 60,
69
- })
70
- .step(
71
- {
72
- slug: 'send_welcome_email',
73
- // Executes immediately when step becomes ready
74
- },
75
- sendWelcomeHandler
76
- )
77
- .step(
78
- {
79
- slug: 'send_day_3_tips',
80
- startDelay: 259200, // Wait 3 days before first execution
81
- timeout: 120,
82
- },
83
- sendTipsHandler
84
- )
85
- .step(
86
- {
87
- slug: 'send_week_review',
88
- startDelay: 604800, // Wait 7 days after dependencies complete
89
- timeout: 120,
90
- },
91
- sendReviewHandler
92
- );
93
- ```
94
-
95
- ### Use Cases
96
-
97
- - **Multi-day workflows**: Onboarding sequences, follow-up reminders
98
- - **Scheduled notifications**: Send reports or alerts at specific intervals
99
- - **Rate limiting**: Enforce minimum time between API calls
100
- - **Compliance delays**: Cooling-off periods before actions
101
-
102
- ### Technical Notes
103
-
104
- - Non-breaking, additive change (hence minor version bump)
105
- - No changes required in `@pgflow/edge-worker` - delays handled by pgmq
106
- - `startDelay` does not affect retry timing - only the initial execution
107
- - Delays are reliable even across worker restarts (persisted in queue)
108
-
109
- - Updated dependencies [af787ff]
110
- - @pgflow/dsl@0.5.3
111
-
112
- ## 0.5.2
113
-
114
- ### Patch Changes
115
-
116
- - @pgflow/dsl@0.5.2
117
-
118
- ## 0.5.1
119
-
120
- ### Patch Changes
121
-
122
- - @pgflow/dsl@0.5.1
123
-
124
- ## 0.5.0
125
-
126
- ### Patch Changes
127
-
128
- - @pgflow/dsl@0.5.0
129
-
130
- ## 0.4.3
131
-
132
- ### Patch Changes
133
-
134
- - fa78968: Fix Supabase Security Advisor warnings by setting empty search_path on functions
135
- - @pgflow/dsl@0.4.3
136
-
137
- ## 0.4.2
138
-
139
- ### Patch Changes
140
-
141
- - 220c867: Fix step:failed events not being broadcast when steps fail
142
-
143
- Fixed a bug where step:failed events were not being broadcast to real-time subscribers when a step failed permanently. The issue was caused by PostgreSQL optimizing away the CTE that contained the realtime.send() call. The fix replaces the CTE approach with a direct PERFORM statement in the function body, ensuring the event is always sent when a step fails.
144
-
145
- - @pgflow/dsl@0.4.2
146
-
147
- ## 0.4.1
148
-
149
- ### Patch Changes
150
-
151
- - 50ab557: feat: add multi-target build support for @pgflow/client package
152
-
153
- The @pgflow/client package now builds for multiple environments, making it usable in Node.js, browsers, and bundlers.
154
-
155
- **What's new:**
156
-
157
- - ES modules (`.js`) and CommonJS (`.cjs`) builds for Node.js
158
- - Browser bundle (`.browser.js`) with all dependencies included
159
- - Full TypeScript declarations
160
- - CDN support via unpkg
161
- - Production builds with minification
162
- - Proper tree-shaking support
163
- - `@supabase/supabase-js` is now a regular dependency (not peer dependency)
164
-
165
- **You can now use it in:**
166
-
167
- - Node.js: `import { PgflowClient } from '@pgflow/client'`
168
- - CommonJS: `const { PgflowClient } = require('@pgflow/client')`
169
- - Browser: `<script src="https://unpkg.com/@pgflow/client"></script>` - then use `window.pgflow.createClient(supabase)`
170
- - Bundlers: Automatically picks the right format
171
-
172
- **Other changes:**
173
-
174
- - Pin Supabase CLI to exact version 2.21.1 to ensure consistent type generation between local and CI environments
175
- - @pgflow/dsl@0.4.1
176
-
177
- ## 0.4.0
178
-
179
- ### Minor Changes
180
-
181
- - 98556d3: Add TypeScript client library for pgflow workflow management
182
-
183
- ## @pgflow/client
184
-
185
- Introduces a new TypeScript client library that provides both event-based and promise-based APIs for interacting with pgflow workflows:
186
-
187
- ### Features
188
-
189
- - **Type-safe workflow management** with full TypeScript support and automatic type inference from flow definitions
190
- - **Dual API approach**: Choose between event-based subscriptions or promise-based async/await patterns
191
- - **Real-time monitoring** via Supabase broadcasts with granular event subscriptions
192
- - **Resource management** with automatic cleanup and disposal
193
- - **Comprehensive error handling** and recovery mechanisms
194
-
195
- ### Core Components
196
-
197
- - `PgflowClient` - Main client for starting and managing workflow runs
198
- - `FlowRun` - Monitor and interact with workflow executions
199
- - `FlowStep` - Track individual step progress and outputs
200
-
201
- ### Example Usage
202
-
203
- ```typescript
204
- // Start a workflow
205
- const pgflow = new PgflowClient(supabase);
206
- const run = await pgflow.startFlow('analyze_website', {
207
- url: 'https://example.com',
208
- });
209
-
210
- // Event-based monitoring
211
- run.on('completed', (event) => {
212
- console.log('Workflow completed:', event.output);
213
- });
214
-
215
- // Promise-based monitoring
216
- const completed = await run.waitForStatus(FlowRunStatus.Completed, {
217
- timeoutMs: 30000,
218
- });
219
- ```
220
-
221
- ## @pgflow/core
222
-
223
- ### Database Enhancements
224
-
225
- - Add `start_flow_with_states()` function to start flows and return complete initial state
226
- - Add `get_run_with_states()` function to retrieve runs with all step states efficiently
227
- - Implement `SECURITY DEFINER` functions for secure API access
228
- - Add real-time broadcast support for workflow state changes
229
-
230
- ## @pgflow/edge-worker
231
-
232
- ### Test Infrastructure Updates
233
-
234
- - Update test database configuration to use standard PostgreSQL credentials
235
- - Improve test helper functions for database transactions
236
- - Update Docker Compose configuration for test environment
237
-
238
- ## @pgflow/dsl
239
-
240
- ### Build Configuration
241
-
242
- - Add TypeScript references to tsconfig.spec.json for improved type checking in tests
243
-
244
- ### Patch Changes
245
-
246
- - Updated dependencies [98556d3]
247
- - @pgflow/dsl@0.4.0
248
-
249
- ## 0.3.1
250
-
251
- ### Patch Changes
252
-
253
- - d08fd2d: Optimize message visibility timeout updates with batch operations
254
-
255
- - Added `pgflow.set_vt_batch()` function to update multiple message visibility timeouts in a single database call
256
- - Replaced individual `pgmq.set_vt()` calls in `start_tasks()` with efficient batch updates
257
- - Reduces database round-trips from N calls to 1 call when starting N tasks
258
- - Improves performance and reduces database load during high-throughput task processing
259
- - @pgflow/dsl@0.3.1
260
-
261
- ## 0.3.0
262
-
263
- ### Minor Changes
264
-
265
- - c3653fa: Replace single-phase polling with two-phase approach to eliminate race conditions
266
-
267
- **Breaking Change**: The `poll_for_tasks` function is now deprecated and returns an empty set. Edge workers must be updated to use the new two-phase polling mechanism.
268
-
269
- **What Changed:**
270
-
271
- - Added new "started" status for step_tasks with `started_at` timestamp and `last_worker_id` tracking
272
- - Introduced `start_tasks` function for the second phase of task processing
273
- - Edge worker now uses two-phase approach: first `read_with_poll` to get messages, then `start_tasks` to process them
274
- - This eliminates race conditions where tasks might not be visible when processing messages
275
-
276
- **Migration Instructions:**
277
-
278
- 1. Run `npx pgflow install` to apply database migrations and update dependencies
279
- 2. Redeploy your edge workers - they will automatically use the new polling mechanism
280
- 3. Old workers will continue running but won't process any tasks (safe degradation)
281
-
282
- **Why This Change:**
283
- The previous `poll_for_tasks` had subtle race conditions on slower systems where messages could be read but matching step_tasks weren't visible in the same transaction, leading to lost work. The new two-phase approach provides stronger guarantees and better observability.
284
-
285
- ### Patch Changes
286
-
287
- - @pgflow/dsl@0.3.0
288
-
289
- ## 0.2.6
290
-
291
- ### Patch Changes
292
-
293
- - @pgflow/dsl@0.2.6
294
-
295
- ## 0.2.5
296
-
297
- ### Patch Changes
298
-
299
- - @pgflow/dsl@0.2.5
300
-
301
- ## 0.2.4
302
-
303
- ### Patch Changes
304
-
305
- - 2f13e8b: Fix `poll_for_tasks` latency
306
-
307
- The previous implementation were calling `read_with_poll` in same statement
308
- as the `SELECT FROM step_tasks`, which resulted in new tasks that were inserted
309
- after the `read_with_poll` started were not discovered as those were not visible
310
- in the statement.
311
-
312
- Now `poll_for_tasks` is split to separate statements so step tasks created
313
- during the `poll_for_tasks` will be immediately picked up.
314
-
315
- - @pgflow/dsl@0.2.4
316
-
317
- ## 0.2.3
318
-
319
- ### Patch Changes
320
-
321
- - @pgflow/dsl@0.2.3
322
-
323
- ## 0.2.2
324
-
325
- ### Patch Changes
326
-
327
- - @pgflow/dsl@0.2.2
328
-
329
- ## 0.2.1
330
-
331
- ### Patch Changes
332
-
333
- - d553c07: Fix critical migration error that prevented installing if PGMQ was installed previously
334
- - Updated dependencies [3f3174e]
335
- - @pgflow/dsl@0.2.1
336
-
337
- ## 0.2.0
338
-
339
- ### Patch Changes
340
-
341
- - @pgflow/dsl@0.2.0
342
-
343
- ## 0.1.23
344
-
345
- ### Patch Changes
346
-
347
- - @pgflow/dsl@0.1.23
348
-
349
- ## 0.1.22
350
-
351
- ### Patch Changes
352
-
353
- - Updated dependencies [8f6eb3d]
354
- - @pgflow/dsl@0.1.22
355
-
356
- ## 0.1.21
357
-
358
- ### Patch Changes
359
-
360
- - ea1ce78: Make visibilityTimeout the last option to pollForTasks so it can be skipped
361
- - @pgflow/dsl@0.1.21
362
-
363
- ## 0.1.20
364
-
365
- ### Patch Changes
366
-
367
- - 09e3210: Change name of initial migration :-(
368
- - 985176e: Add step_index to steps and various status timestamps to runtime tables
369
- - @pgflow/dsl@0.1.20
370
-
371
- ## 0.1.19
372
-
373
- ### Patch Changes
374
-
375
- - a10b442: Add minimum set of indexes
376
- - efbd108: Convert migrations to declarative schemas and generate initial migration
377
- - @pgflow/dsl@0.1.19
378
-
379
- ## 0.1.18
380
-
381
- ### Patch Changes
382
-
383
- - 3a7e132: Do not build edge-worker for npm
384
- - Updated dependencies [3a7e132]
385
- - @pgflow/dsl@0.1.18
386
-
387
- ## 0.1.17
388
-
389
- ### Patch Changes
390
-
391
- - d215ed2: Trigger version change
392
- - Updated dependencies [d215ed2]
393
- - @pgflow/dsl@0.1.17
394
-
395
- ## 0.1.16
396
-
397
- ### Patch Changes
398
-
399
- - cc7c431: Test release to verify combined publishing of both npm and jsr packages
400
- - Updated dependencies [cc7c431]
401
- - @pgflow/dsl@0.1.16
402
-
403
- ## 0.1.15
404
-
405
- ### Patch Changes
406
-
407
- - ce34a2c: Update release pipeline to publish to jsr
408
- - Updated dependencies [ce34a2c]
409
- - @pgflow/dsl@0.1.15
410
-
411
- ## 0.1.14
412
-
413
- ### Patch Changes
414
-
415
- - @pgflow/dsl@0.1.14
416
-
417
- ## 0.1.13
418
-
419
- ### Patch Changes
420
-
421
- - @pgflow/dsl@0.1.13
422
-
423
- ## 0.1.12
424
-
425
- ### Patch Changes
426
-
427
- - Updated dependencies [7b1328e]
428
- - @pgflow/dsl@0.1.12
429
-
430
- ## 0.1.11
431
-
432
- ### Patch Changes
433
-
434
- - @pgflow/dsl@0.1.11
435
-
436
- ## 0.1.10
437
-
438
- ### Patch Changes
439
-
440
- - bafe767: Fix deno/ folder for cli being missing
441
- - Updated dependencies [bafe767]
442
- - @pgflow/dsl@0.1.10
443
-
444
- ## 0.1.9
445
-
446
- ### Patch Changes
447
-
448
- - 1a30c6c: Make sure to tag and push tags
449
- - Updated dependencies [1a30c6c]
450
- - @pgflow/dsl@0.1.9
451
-
452
- ## 0.1.8
453
-
454
- ### Patch Changes
455
-
456
- - 05f5bd8: Update release script
457
- - Updated dependencies [05f5bd8]
458
- - @pgflow/dsl@0.1.8
459
-
460
- ## 0.1.7
461
-
462
- ### Patch Changes
463
-
464
- - summary
465
- - @pgflow/dsl@0.1.7
466
-
467
- ## 0.1.6
468
-
469
- ### Patch Changes
470
-
471
- - Test release to verify problem with bumping edge-worker
472
- - Updated dependencies
473
- - @pgflow/dsl@0.1.6
474
-
475
- ## 0.1.5
476
-
477
- ### Patch Changes
478
-
479
- - 5820e7a: Bump version for tests
480
- - Updated dependencies [5820e7a]
481
- - @pgflow/dsl@0.1.5
482
-
483
- ## 0.1.4
484
-
485
- ### Patch Changes
486
-
487
- - @pgflow/dsl@0.1.4
488
-
489
- ## 0.1.3
490
-
491
- ### Patch Changes
492
-
493
- - @pgflow/dsl@0.1.3
494
-
495
- ## 0.1.2
496
-
497
- ### Patch Changes
498
-
499
- - @pgflow/dsl@0.1.2
500
-
501
- ## 0.1.1
502
-
503
- ### Patch Changes
504
-
505
- - Updated dependencies [b362364]
506
- - @pgflow/dsl@0.1.1
507
-
508
- ## 0.1.0
509
-
510
- ### Minor Changes
511
-
512
- - 7c40238: fix migration files to not set `search_path`
513
-
514
- ### Patch Changes
515
-
516
- - @pgflow/dsl@0.1.0
517
-
518
- ## 0.0.23
519
-
520
- ### Patch Changes
521
-
522
- - @pgflow/dsl@0.0.23
523
-
524
- ## 0.0.22
525
-
526
- ### Patch Changes
527
-
528
- - @pgflow/dsl@0.0.22
529
-
530
- ## 0.0.21
531
-
532
- ### Patch Changes
533
-
534
- - @pgflow/dsl@0.0.21
535
-
536
- ## 0.0.20
537
-
538
- ### Patch Changes
539
-
540
- - @pgflow/dsl@0.0.20
541
-
542
- ## 0.0.19
543
-
544
- ### Patch Changes
545
-
546
- - 042bc64: Move migrations to pkgs/core
547
- - @pgflow/dsl@0.0.19
548
-
549
- ## 0.0.18
550
-
551
- ### Patch Changes
552
-
553
- - 53abf4a: Fix pnpm issues with linking to dist/
554
- - Updated dependencies [53abf4a]
555
- - @pgflow/dsl@0.0.18
556
-
557
- ## 0.0.17
558
-
559
- ### Patch Changes
560
-
561
- - @pgflow/dsl@0.0.17
562
-
563
- ## 0.0.16
564
-
565
- ### Patch Changes
566
-
567
- - @pgflow/dsl@0.0.16
568
-
569
- ## 0.0.15
570
-
571
- ### Patch Changes
572
-
573
- - @pgflow/dsl@0.0.15
574
-
575
- ## 0.0.14
576
-
577
- ### Patch Changes
578
-
579
- - @pgflow/dsl@0.0.14
580
-
581
- ## 0.0.13
582
-
583
- ### Patch Changes
584
-
585
- - @pgflow/dsl@0.0.13
586
-
587
- ## 0.0.12
588
-
589
- ### Patch Changes
590
-
591
- - @pgflow/dsl@0.0.12
592
-
593
- ## 0.0.11
594
-
595
- ### Patch Changes
596
-
597
- - Updated dependencies [17937e3]
598
- - @pgflow/dsl@0.0.11
599
-
600
- ## 0.0.10
601
-
602
- ### Patch Changes
603
-
604
- - @pgflow/dsl@0.0.10
605
-
606
- ## 0.0.9
607
-
608
- ### Patch Changes
609
-
610
- - Updated dependencies [70d3f2d]
611
- - @pgflow/dsl@0.0.9
612
-
613
- ## 0.0.8
614
-
615
- ### Patch Changes
616
-
617
- - @pgflow/dsl@0.0.8
618
-
619
- ## 0.0.7
620
-
621
- ### Patch Changes
622
-
623
- - 7c83db9: Add release-related options to package.json files
624
- - Updated dependencies [7c83db9]
625
- - @pgflow/dsl@0.0.7
626
-
627
- ## 0.0.6
628
-
629
- ### Patch Changes
630
-
631
- - @pgflow/dsl@0.0.6
632
-
633
- ## 0.0.5
634
-
635
- ### Patch Changes
636
-
637
- - 196f7d8: Test patch bump
638
- - Updated dependencies [b4b0809]
639
- - @pgflow/dsl@0.0.5
@@ -1,17 +0,0 @@
1
- import type postgres from 'postgres';
2
- import type { StepTaskRecord, IPgflowClient, StepTaskKey, RunRow, MessageRecord } from './types.js';
3
- import type { Json } from './types.js';
4
- import type { AnyFlow, ExtractFlowInput } from '@pgflow/dsl';
5
- /**
6
- * Implementation of IPgflowClient that uses direct SQL calls to pgflow functions
7
- */
8
- export declare class PgflowSqlClient<TFlow extends AnyFlow> implements IPgflowClient<TFlow> {
9
- private readonly sql;
10
- constructor(sql: postgres.Sql);
11
- readMessages(queueName: string, visibilityTimeout: number, batchSize: number, maxPollSeconds?: number, pollIntervalMs?: number): Promise<MessageRecord[]>;
12
- startTasks(flowSlug: string, msgIds: number[], workerId: string): Promise<StepTaskRecord<TFlow>[]>;
13
- completeTask(stepTask: StepTaskKey, output?: Json): Promise<void>;
14
- failTask(stepTask: StepTaskKey, error: unknown): Promise<void>;
15
- startFlow<TFlow extends AnyFlow>(flow_slug: string, input: ExtractFlowInput<TFlow>, run_id?: string): Promise<RunRow>;
16
- }
17
- //# sourceMappingURL=PgflowSqlClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PgflowSqlClient.d.ts","sourceRoot":"","sources":["../src/PgflowSqlClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,MAAM,EACN,aAAa,EACd,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE7D;;GAEG;AACH,qBAAa,eAAe,CAAC,KAAK,SAAS,OAAO,CAChD,YAAW,aAAa,CAAC,KAAK,CAAC;IAEnB,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,QAAQ,CAAC,GAAG;IAExC,YAAY,CAChB,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,EACjB,cAAc,SAAI,EAClB,cAAc,SAAM,GACnB,OAAO,CAAC,aAAa,EAAE,CAAC;IAarB,UAAU,CACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EAAE,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;IAW7B,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAWjE,QAAQ,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB9D,SAAS,CAAC,KAAK,SAAS,OAAO,EACnC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAC9B,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC;CAiBnB"}