@pgflow/edge-worker 0.0.0-pre-0.9.0-d9495c23-20251128172753 → 0.0.0-runkey-ed5e8daa-20251230113317

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 (2) hide show
  1. package/README.md +14 -4
  2. package/package.json +10 -1
package/README.md CHANGED
@@ -65,18 +65,18 @@ import { Flow } from 'jsr:@pgflow/dsl/supabase';
65
65
  const AnalyzeWebsite = new Flow<{ url: string }>({
66
66
  slug: 'analyzeWebsite',
67
67
  })
68
- .step({ slug: 'fetch' }, async (input, context) => {
68
+ .step({ slug: 'fetch' }, async (flowInput, context) => {
69
69
  // Access Supabase resources through context
70
- const response = await fetch(input.run.url, {
70
+ const response = await fetch(flowInput.url, {
71
71
  signal: context.shutdownSignal,
72
72
  });
73
73
  return { html: await response.text() };
74
74
  })
75
- .step({ slug: 'save' }, async (input, context) => {
75
+ .step({ slug: 'save', dependsOn: ['fetch'] }, async (deps, context) => {
76
76
  // Use Supabase client from context
77
77
  const { data } = await context.supabase
78
78
  .from('websites')
79
- .insert({ url: input.run.url, html: input.fetch.html })
79
+ .insert({ url: context.flowInput.url, html: deps.fetch.html })
80
80
  .select()
81
81
  .single();
82
82
  return data;
@@ -208,6 +208,16 @@ To run a manual test:
208
208
  1. Start Supabase: `pnpm nx supabase:start edge-worker`
209
209
  2. Follow the instructions in the specific test's README
210
210
 
211
+ ## Dependencies
212
+
213
+ ### PostgreSQL Client
214
+
215
+ This package uses `jsr:@oscar6echo/postgres` - a JSR-compatible fork of the popular [postgres](https://github.com/porsager/postgres) package.
216
+
217
+ **Why a fork?** The official `npm:postgres` package uses CommonJS exports (`export =`) which are incompatible with JSR's ES Module requirements. The npm version also fails to parse database URLs correctly in Supabase Edge Runtime, causing `CONNECT_TIMEOUT` errors. See [porsager/postgres#839](https://github.com/porsager/postgres/issues/839) for details.
218
+
219
+ The fork is functionally identical to postgres v3.4.5, with only the export syntax changed for Deno/JSR compatibility.
220
+
211
221
  ## Building
212
222
 
213
223
  Run `nx build edge-worker` to build the library.
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@pgflow/edge-worker",
3
- "version": "0.0.0-pre-0.9.0-d9495c23-20251128172753",
3
+ "version": "0.0.0-runkey-ed5e8daa-20251230113317",
4
4
  "license": "Apache-2.0",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/pgflow-dev/pgflow",
8
+ "directory": "pkgs/edge-worker"
9
+ },
5
10
  "type": "module",
6
11
  "main": "./dist/index.js",
7
12
  "module": "./dist/index.js",
@@ -15,6 +20,10 @@
15
20
  "./_internal": {
16
21
  "types": "./dist/_internal.d.ts",
17
22
  "import": "./dist/_internal.js"
23
+ },
24
+ "./testing": {
25
+ "types": "./dist/testing.d.ts",
26
+ "import": "./dist/testing.js"
18
27
  }
19
28
  },
20
29
  "files": [