forked from cloudflare/agents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
35 lines (35 loc) · 1.79 KB
/
Copy pathpackage.json
File metadata and controls
35 lines (35 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"name": "@cloudflare/agents-push-notifications",
"private": true,
"type": "module",
"version": "0.0.0",
"description": "Push notifications with Cloudflare Agents — reminders that work even when the tab is closed",
"scripts": {
"start": "vite dev",
"deploy": "vite build && wrangler deploy",
"types": "wrangler types env.d.ts --include-runtime false",
"generate-vapid-keys": "node -e \"const fs=require('fs'),path='.env';crypto.subtle.generateKey({name:'ECDSA',namedCurve:'P-256'},true,['sign']).then(async k=>{const pub=new Uint8Array(await crypto.subtle.exportKey('raw',k.publicKey));const priv=await crypto.subtle.exportKey('jwk',k.privateKey);const b64=b=>btoa(String.fromCharCode(...b)).replace(/\\+/g,'-').replace(/\\//g,'_').replace(/=+$/g,'');const pubKey=b64(pub),privKey=priv.d;let lines=fs.existsSync(path)?fs.readFileSync(path,'utf8').split('\\n'):['VAPID_SUBJECT=mailto:you@example.com'];const set=(k,v)=>{const i=lines.findIndex(l=>l.startsWith(k+'='));if(i>=0)lines[i]=k+'='+v;else lines.push(k+'='+v)};set('VAPID_PUBLIC_KEY',pubKey);set('VAPID_PRIVATE_KEY',privKey);fs.writeFileSync(path,lines.join('\\n')+'\\n');console.log('Wrote VAPID keys to .env')})\""
},
"dependencies": {
"@cloudflare/kumo": "^1.19.0",
"@phosphor-icons/react": "^2.1.10",
"agents": "*",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"web-push": "^3.6.7"
},
"devDependencies": {
"@cloudflare/vite-plugin": "^1.33.0",
"@cloudflare/workers-types": "^4.20260420.1",
"@tailwindcss/vite": "^4",
"@types/node": "^25.6.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@types/web-push": "^3.6.4",
"@vitejs/plugin-react": "^6.0.1",
"tailwindcss": "^4.2.2",
"typescript": "^6.0.3",
"vite": "^8.0.9",
"wrangler": "^4.84.0"
}
}