@pgflow/client 0.0.0-array-map-steps-cd94242a-20251008042921 → 0.0.0-compatible-flow-86a8ccf0-20260319203539

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 (48) hide show
  1. package/CHANGELOG.md +171 -3
  2. package/README.md +6 -2
  3. package/dist/client/src/browser.d.ts +7 -0
  4. package/dist/client/src/browser.d.ts.map +1 -0
  5. package/dist/client/src/index.d.ts +6 -0
  6. package/dist/client/src/index.d.ts.map +1 -0
  7. package/dist/client/src/lib/FlowRun.d.ts +125 -0
  8. package/dist/client/src/lib/FlowRun.d.ts.map +1 -0
  9. package/dist/client/src/lib/FlowStep.d.ts +98 -0
  10. package/dist/client/src/lib/FlowStep.d.ts.map +1 -0
  11. package/dist/client/src/lib/PgflowClient.d.ts +76 -0
  12. package/dist/client/src/lib/PgflowClient.d.ts.map +1 -0
  13. package/dist/client/src/lib/SupabaseBroadcastAdapter.d.ts +66 -0
  14. package/dist/client/src/lib/SupabaseBroadcastAdapter.d.ts.map +1 -0
  15. package/dist/client/src/lib/eventAdapters.d.ts +21 -0
  16. package/dist/client/src/lib/eventAdapters.d.ts.map +1 -0
  17. package/dist/client/src/lib/types.d.ts +337 -0
  18. package/dist/client/src/lib/types.d.ts.map +1 -0
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +455 -454
  21. package/dist/index.js.map +1 -1
  22. package/dist/package.json +8 -3
  23. package/dist/pgflow-client.browser.js +1 -1
  24. package/dist/pgflow-client.browser.js.map +1 -1
  25. package/dist/src/browser.d.ts +3 -3
  26. package/dist/src/browser.d.ts.map +1 -1
  27. package/dist/src/browser.js +10 -0
  28. package/dist/src/index.js +7 -0
  29. package/dist/src/lib/FlowRun.d.ts +11 -3
  30. package/dist/src/lib/FlowRun.d.ts.map +1 -1
  31. package/dist/src/lib/FlowRun.js +372 -0
  32. package/dist/src/lib/FlowStep.d.ts +20 -4
  33. package/dist/src/lib/FlowStep.d.ts.map +1 -1
  34. package/dist/src/lib/FlowStep.js +284 -0
  35. package/dist/src/lib/PgflowClient.d.ts +12 -10
  36. package/dist/src/lib/PgflowClient.d.ts.map +1 -1
  37. package/dist/src/lib/PgflowClient.js +227 -0
  38. package/dist/src/lib/SupabaseBroadcastAdapter.d.ts +4 -4
  39. package/dist/src/lib/SupabaseBroadcastAdapter.d.ts.map +1 -1
  40. package/dist/src/lib/SupabaseBroadcastAdapter.js +332 -0
  41. package/dist/src/lib/eventAdapters.d.ts +3 -4
  42. package/dist/src/lib/eventAdapters.d.ts.map +1 -1
  43. package/dist/src/lib/eventAdapters.js +160 -0
  44. package/dist/src/lib/types.d.ts +34 -6
  45. package/dist/src/lib/types.d.ts.map +1 -1
  46. package/dist/src/lib/types.js +102 -0
  47. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  48. package/package.json +10 -5
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Flow run status enum
3
+ */
4
+ export var FlowRunStatus;
5
+ (function (FlowRunStatus) {
6
+ FlowRunStatus["Started"] = "started";
7
+ FlowRunStatus["Completed"] = "completed";
8
+ FlowRunStatus["Failed"] = "failed";
9
+ })(FlowRunStatus || (FlowRunStatus = {}));
10
+ /**
11
+ * Type guard to check if an unknown value is a valid FlowRunEvent
12
+ */
13
+ export function isFlowRunEvent(value) {
14
+ return (!!value &&
15
+ typeof value === 'object' &&
16
+ 'run_id' in value &&
17
+ 'flow_slug' in value &&
18
+ !('step_slug' in value) &&
19
+ 'status' in value &&
20
+ (value.status === FlowRunStatus.Started ||
21
+ value.status === FlowRunStatus.Completed ||
22
+ value.status === FlowRunStatus.Failed));
23
+ }
24
+ /**
25
+ * Type guard for started events
26
+ */
27
+ export function isFlowRunStartedEvent(event) {
28
+ return event.status === FlowRunStatus.Started;
29
+ }
30
+ /**
31
+ * Type guard for completed events
32
+ */
33
+ export function isFlowRunCompletedEvent(event) {
34
+ return event.status === FlowRunStatus.Completed;
35
+ }
36
+ /**
37
+ * Type guard for failed events
38
+ */
39
+ export function isFlowRunFailedEvent(event) {
40
+ return event.status === FlowRunStatus.Failed;
41
+ }
42
+ /**
43
+ * Flow step status enum
44
+ */
45
+ export var FlowStepStatus;
46
+ (function (FlowStepStatus) {
47
+ FlowStepStatus["Created"] = "created";
48
+ FlowStepStatus["Started"] = "started";
49
+ FlowStepStatus["Completed"] = "completed";
50
+ FlowStepStatus["Failed"] = "failed";
51
+ FlowStepStatus["Skipped"] = "skipped";
52
+ })(FlowStepStatus || (FlowStepStatus = {}));
53
+ /**
54
+ * Type guard to check if an unknown value is a valid StepEvent
55
+ */
56
+ export function isStepEvent(value) {
57
+ return (!!value &&
58
+ typeof value === 'object' &&
59
+ 'run_id' in value &&
60
+ 'step_slug' in value &&
61
+ 'status' in value &&
62
+ (value.status === FlowStepStatus.Started ||
63
+ value.status === FlowStepStatus.Completed ||
64
+ value.status === FlowStepStatus.Failed ||
65
+ value.status === FlowStepStatus.Skipped));
66
+ }
67
+ /**
68
+ * Type guard for started step events
69
+ */
70
+ export function isStepStartedEvent(event) {
71
+ return (isStepEvent(event) &&
72
+ event.status === FlowStepStatus.Started &&
73
+ 'event_type' in event &&
74
+ event.event_type === 'step:started');
75
+ }
76
+ /**
77
+ * Type guard for completed step events
78
+ */
79
+ export function isStepCompletedEvent(event) {
80
+ return (isStepEvent(event) &&
81
+ event.status === FlowStepStatus.Completed &&
82
+ 'event_type' in event &&
83
+ event.event_type === 'step:completed');
84
+ }
85
+ /**
86
+ * Type guard for failed step events
87
+ */
88
+ export function isStepFailedEvent(event) {
89
+ return (isStepEvent(event) &&
90
+ event.status === FlowStepStatus.Failed &&
91
+ 'event_type' in event &&
92
+ event.event_type === 'step:failed');
93
+ }
94
+ /**
95
+ * Type guard for skipped step events
96
+ */
97
+ export function isStepSkippedEvent(event) {
98
+ return (isStepEvent(event) &&
99
+ event.status === FlowStepStatus.Skipped &&
100
+ 'event_type' in event &&
101
+ event.event_type === 'step:skipped');
102
+ }
@@ -0,0 +1 @@
1
+ {"version":"5.9.3"}
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@pgflow/client",
3
- "version": "0.0.0-array-map-steps-cd94242a-20251008042921",
3
+ "version": "0.0.0-compatible-flow-86a8ccf0-20260319203539",
4
+ "license": "Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/pgflow-dev/pgflow",
8
+ "directory": "pkgs/client"
9
+ },
4
10
  "type": "module",
5
11
  "dependencies": {
6
12
  "@supabase/supabase-js": "^2.49.4",
7
13
  "nanoevents": "^7.0.1",
8
14
  "uuid": "^9.0.0",
9
- "@pgflow/core": "0.0.0-array-map-steps-cd94242a-20251008042921",
10
- "@pgflow/dsl": "0.0.0-array-map-steps-cd94242a-20251008042921"
15
+ "@pgflow/core": "0.0.0-compatible-flow-86a8ccf0-20260319203539",
16
+ "@pgflow/dsl": "0.0.0-compatible-flow-86a8ccf0-20260319203539"
11
17
  },
12
18
  "main": "./dist/index.js",
13
19
  "module": "./dist/index.js",
@@ -39,11 +45,10 @@
39
45
  "devDependencies": {
40
46
  "@types/uuid": "^10.0.0",
41
47
  "postgres": "^3.4.5",
42
- "supabase": "2.21.1",
43
48
  "terser": "^5.43.0",
44
49
  "vite-plugin-dts": "~3.8.1",
45
50
  "vitest": "1.3.1",
46
- "@pgflow/dsl": "0.0.0-array-map-steps-cd94242a-20251008042921"
51
+ "@pgflow/dsl": "0.0.0-compatible-flow-86a8ccf0-20260319203539"
47
52
  },
48
53
  "scripts": {
49
54
  "verify-exports": "node scripts/verify-exports.js"