@workflow/world-testing 4.1.0-beta.62 → 4.1.0-beta.63

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.
@@ -0,0 +1,29 @@
1
+ import { resumeWebhook } from 'workflow/api';
2
+
3
+ async function handler(request) {
4
+ const url = new URL(request.url);
5
+ // Extract token from pathname: /.well-known/workflow/v1/webhook/{token}
6
+ const pathParts = url.pathname.split('/');
7
+ const token = decodeURIComponent(pathParts[pathParts.length - 1]);
8
+
9
+ if (!token) {
10
+ return new Response('Missing token', { status: 400 });
11
+ }
12
+
13
+ try {
14
+ const response = await resumeWebhook(token, request);
15
+ return response;
16
+ } catch (error) {
17
+ // TODO: differentiate between invalid token and other errors
18
+ console.error('Error during resumeWebhook', error);
19
+ return new Response(null, { status: 404 });
20
+ }
21
+ }
22
+
23
+ export const GET = handler;
24
+ export const POST = handler;
25
+ export const PUT = handler;
26
+ export const PATCH = handler;
27
+ export const DELETE = handler;
28
+ export const HEAD = handler;
29
+ export const OPTIONS = handler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workflow/world-testing",
3
- "version": "4.1.0-beta.62",
3
+ "version": "4.1.0-beta.63",
4
4
  "description": "Testing utilities and World implementation for Workflow DevKit",
5
5
  "main": "dist/src/index.mjs",
6
6
  "files": [
@@ -16,29 +16,29 @@
16
16
  "directory": "packages/world-testing"
17
17
  },
18
18
  "dependencies": {
19
- "@hono/node-server": "1.19.5",
19
+ "@hono/node-server": "1.19.9",
20
20
  "chalk": "5.6.2",
21
- "hono": "4.9.10",
21
+ "hono": "4.12.3",
22
22
  "jsonlines": "0.1.1",
23
- "zod": "4.1.11",
24
- "@workflow/cli": "4.1.0-beta.61",
25
- "@workflow/core": "4.1.0-beta.61",
26
- "workflow": "4.1.0-beta.61",
27
- "@workflow/world": "4.1.0-beta.7"
23
+ "zod": "4.3.6",
24
+ "@workflow/cli": "4.1.0-beta.62",
25
+ "@workflow/core": "4.1.0-beta.62",
26
+ "workflow": "4.1.0-beta.62",
27
+ "@workflow/world": "4.1.0-beta.8"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "22.19.0",
31
31
  "@types/jsonlines": "0.1.5",
32
- "vitest": "^3.2.4",
32
+ "vitest": "^4.0.18",
33
33
  "@workflow/tsconfig": "4.0.1-beta.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "vitest": "^3.2.4"
36
+ "vitest": "^4.0.18"
37
37
  },
38
38
  "keywords": [],
39
39
  "author": "",
40
40
  "scripts": {
41
- "build": "wf build && tsc",
41
+ "build": "wf build && node scripts/generate-well-known-dts.mjs && tsc && cp .well-known/workflow/v1/*.js dist/.well-known/workflow/v1/",
42
42
  "clean": "tsc --build --clean && rm -rf dist .well-known* .workflow-data",
43
43
  "start": "node --watch src/server.mts",
44
44
  "test": "vitest"
@@ -1,3 +0,0 @@
1
- declare const _exports: any;
2
- export = _exports;
3
- //# sourceMappingURL=flow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../../../.well-known/workflow/v1/flow.js"],"names":[],"mappings":""}