@pushforge/builder 2.0.1 → 2.0.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/README.md +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,10 +40,12 @@ Try PushForge in your browser at **[pushforge.draphy.org](https://pushforge.drap
|
|
|
40
40
|
| Dependencies | **0** | 5+ (with nested deps) |
|
|
41
41
|
| Cloudflare Workers | Yes | [No](https://github.com/web-push-libs/web-push/issues/718) |
|
|
42
42
|
| Vercel Edge | Yes | No |
|
|
43
|
-
| Convex | Yes | No |
|
|
43
|
+
| Convex | Yes* | No |
|
|
44
44
|
| Deno / Bun | Yes | Limited |
|
|
45
45
|
| TypeScript | First-class | @types package |
|
|
46
46
|
|
|
47
|
+
\* Convex requires `"use node";` directive. [See example](#convex).
|
|
48
|
+
|
|
47
49
|
Traditional web push libraries rely on Node.js-specific APIs (`crypto.createECDH`, `https.request`) that don't work in modern edge runtimes. PushForge uses the standard [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API), making it portable across all JavaScript environments.
|
|
48
50
|
|
|
49
51
|
## Quick Start
|
|
@@ -232,7 +234,11 @@ export default async function handler(request: Request) {
|
|
|
232
234
|
|
|
233
235
|
### Convex
|
|
234
236
|
|
|
237
|
+
> **Note:** Convex's default runtime doesn't support ECDH operations required by Web Push. Add `"use node";` to use the Node.js runtime.
|
|
238
|
+
|
|
235
239
|
```typescript
|
|
240
|
+
"use node";
|
|
241
|
+
|
|
236
242
|
import { action } from "./_generated/server";
|
|
237
243
|
import { buildPushHTTPRequest } from "@pushforge/builder";
|
|
238
244
|
import { v } from "convex/values";
|
|
@@ -327,7 +333,7 @@ self.addEventListener('notificationclick', (event) => {
|
|
|
327
333
|
| Vercel Edge | Fully supported |
|
|
328
334
|
| Deno | Fully supported |
|
|
329
335
|
| Bun | Fully supported |
|
|
330
|
-
| Convex |
|
|
336
|
+
| Convex | Requires `"use node";` ([example](#convex)) |
|
|
331
337
|
| Modern Browsers | Fully supported |
|
|
332
338
|
|
|
333
339
|
<details>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushforge/builder",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A robust, cross-platform Web Push notification library that handles VAPID authentication and payload encryption following the Web Push Protocol standard. Works in Node.js 16+, Browsers, Deno, Bun and Cloudflare Workers.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/lib/main.js",
|