@squaredr/fieldcraft-webhook 1.0.0 → 1.0.1
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/README.md +8 -0
- package/dist/index.js +18 -0
- package/dist/index.mjs +18 -0
- package/package.json +20 -10
package/README.md
CHANGED
|
@@ -120,6 +120,14 @@ Every webhook request includes:
|
|
|
120
120
|
| `X-FormEngine-Event` | `submit` |
|
|
121
121
|
| `X-FormEngine-Timestamp` | ISO 8601 timestamp |
|
|
122
122
|
|
|
123
|
+
## Community
|
|
124
|
+
|
|
125
|
+
[](https://discord.gg/YOUR_INVITE_LINK)
|
|
126
|
+
|
|
127
|
+
- [Discord](https://discord.gg/YOUR_INVITE_LINK) — Get help, share projects, request features
|
|
128
|
+
- [Docs](https://squaredr.tech/products/fieldcraft/docs/adapters) — Adapter documentation
|
|
129
|
+
- [Pro Tools](https://squaredr.tech/products/fieldcraft/admin-pro) — Visual FormBuilder, SchemaEditor, ResponseViewer, ThemeEditor
|
|
130
|
+
|
|
123
131
|
## License
|
|
124
132
|
|
|
125
133
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -108,6 +108,24 @@ function createWebhookAdapter(config) {
|
|
|
108
108
|
onError: config.onError ? (err) => config.onError(err, 0) : void 0
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
// src/index.ts
|
|
113
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV !== "production") {
|
|
114
|
+
const _fc_banner = `
|
|
115
|
+
%c FieldCraft Webhook %c v1.0.1
|
|
116
|
+
|
|
117
|
+
%cHMAC-SHA256 signing \xB7 Exponential backoff with jitter
|
|
118
|
+
|
|
119
|
+
Docs \u2192 https://squaredr.tech/products/fieldcraft/docs/adapters
|
|
120
|
+
Discord \u2192 https://discord.gg/YOUR_INVITE_LINK
|
|
121
|
+
`;
|
|
122
|
+
console.log(
|
|
123
|
+
_fc_banner,
|
|
124
|
+
"background:#2563eb;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px 0 0 3px",
|
|
125
|
+
"background:#1e40af;color:#fff;padding:2px 6px;border-radius:0 3px 3px 0",
|
|
126
|
+
"color:#6b7280"
|
|
127
|
+
);
|
|
128
|
+
}
|
|
111
129
|
// Annotate the CommonJS export names for ESM import in node:
|
|
112
130
|
0 && (module.exports = {
|
|
113
131
|
calculateDelay,
|
package/dist/index.mjs
CHANGED
|
@@ -69,6 +69,24 @@ function createWebhookAdapter(config) {
|
|
|
69
69
|
onError: config.onError ? (err) => config.onError(err, 0) : void 0
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
+
|
|
73
|
+
// src/index.ts
|
|
74
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV !== "production") {
|
|
75
|
+
const _fc_banner = `
|
|
76
|
+
%c FieldCraft Webhook %c v1.0.1
|
|
77
|
+
|
|
78
|
+
%cHMAC-SHA256 signing \xB7 Exponential backoff with jitter
|
|
79
|
+
|
|
80
|
+
Docs \u2192 https://squaredr.tech/products/fieldcraft/docs/adapters
|
|
81
|
+
Discord \u2192 https://discord.gg/YOUR_INVITE_LINK
|
|
82
|
+
`;
|
|
83
|
+
console.log(
|
|
84
|
+
_fc_banner,
|
|
85
|
+
"background:#2563eb;color:#fff;font-weight:bold;padding:2px 6px;border-radius:3px 0 0 3px",
|
|
86
|
+
"background:#1e40af;color:#fff;padding:2px 6px;border-radius:0 3px 3px 0",
|
|
87
|
+
"color:#6b7280"
|
|
88
|
+
);
|
|
89
|
+
}
|
|
72
90
|
export {
|
|
73
91
|
calculateDelay,
|
|
74
92
|
createWebhookAdapter,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squaredr/fieldcraft-webhook",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "FieldCraft webhook delivery adapter with HMAC-SHA256 signing and exponential backoff retries",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -12,14 +12,11 @@
|
|
|
12
12
|
"require": "./dist/index.js"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"files": [
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
16
19
|
"sideEffects": false,
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
19
|
-
"test": "vitest run",
|
|
20
|
-
"typecheck": "tsc --noEmit",
|
|
21
|
-
"clean": "rm -rf dist"
|
|
22
|
-
},
|
|
23
20
|
"dependencies": {
|
|
24
21
|
"@squaredr/fieldcraft-core": "^1.0.0"
|
|
25
22
|
},
|
|
@@ -40,8 +37,21 @@
|
|
|
40
37
|
"url": "git+https://github.com/SquaredR98/fieldcraft.git",
|
|
41
38
|
"directory": "packages/adapters/webhook"
|
|
42
39
|
},
|
|
43
|
-
"keywords": [
|
|
40
|
+
"keywords": [
|
|
41
|
+
"fieldcraft",
|
|
42
|
+
"form-engine",
|
|
43
|
+
"webhook",
|
|
44
|
+
"hmac",
|
|
45
|
+
"adapter",
|
|
46
|
+
"retry"
|
|
47
|
+
],
|
|
44
48
|
"engines": {
|
|
45
49
|
"node": ">=18"
|
|
50
|
+
},
|
|
51
|
+
"scripts": {
|
|
52
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
53
|
+
"test": "vitest run",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"clean": "rm -rf dist"
|
|
46
56
|
}
|
|
47
|
-
}
|
|
57
|
+
}
|