@zap-studio/webhooks 0.1.0 → 0.1.2
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/CHANGELOG.md +18 -7
- package/dist/index.mjs +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
# @zap-studio/webhooks
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c209a27: Fix payload schema validation internals to use the current async `standardValidate` options API (`{ throwOnError: false }`), restoring typecheck compatibility after the validation helper signature update.
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
- f75b984: Updated dependency `@zap-studio/validation` to `0.3.0`.
|
|
14
|
+
|
|
3
15
|
## 0.1.0
|
|
4
16
|
|
|
5
|
-
###
|
|
17
|
+
### Added
|
|
6
18
|
|
|
7
19
|
- 0d6254c: Initial public release of `@zap-studio/webhooks`.
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- Includes comprehensive test coverage and documentation.
|
|
20
|
+
- Schema-first webhook router with inferred payload types.
|
|
21
|
+
- Request verification support, including `createHmacVerifier`.
|
|
22
|
+
- Lifecycle hooks (`before`, `after`, `onError`) for cross-cutting concerns.
|
|
23
|
+
- Framework-agnostic adapter contracts via `Adapter` and `BaseAdapter`.
|
|
24
|
+
- Comprehensive test coverage and documentation.
|
package/dist/index.mjs
CHANGED
|
@@ -98,7 +98,7 @@ var WebhookRouter = class {
|
|
|
98
98
|
}
|
|
99
99
|
async validatePayload(parsedJson, schema) {
|
|
100
100
|
if (!schema) return parsedJson;
|
|
101
|
-
const result = await standardValidate(schema, parsedJson, false);
|
|
101
|
+
const result = await standardValidate(schema, parsedJson, { throwOnError: false });
|
|
102
102
|
if (result.issues) return {
|
|
103
103
|
status: 400,
|
|
104
104
|
body: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zap-studio/webhooks",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@standard-schema/spec": "^1.1.0",
|
|
40
|
-
"@zap-studio/validation": "0.
|
|
40
|
+
"@zap-studio/validation": "0.3.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^25.0.2",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"vitest": "^4.0.18",
|
|
48
48
|
"zod": "^4.2.0",
|
|
49
49
|
"@zap-studio/vitest-config": "0.0.0",
|
|
50
|
-
"@zap-studio/
|
|
51
|
-
"@zap-studio/
|
|
50
|
+
"@zap-studio/tsdown-config": "0.0.0",
|
|
51
|
+
"@zap-studio/typescript-config": "0.0.0"
|
|
52
52
|
},
|
|
53
53
|
"exports": {
|
|
54
54
|
".": "./dist/index.mjs",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"types": "./dist/index.d.mts",
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build": "tsdown --config tsdown.config.ts",
|
|
66
|
-
"
|
|
66
|
+
"typecheck": "tsc --noEmit",
|
|
67
67
|
"test": "vitest run",
|
|
68
68
|
"test:watch": "vitest --watch"
|
|
69
69
|
}
|