@lunora/notify 1.0.0-alpha.111 → 1.0.0-alpha.112

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.
Files changed (2) hide show
  1. package/README.md +9 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -36,6 +36,15 @@ FCM_SERVICE_ACCOUNT=<base64-of-your-service-account-key-json>
36
36
  the raw JSON works too: `wrangler secret put FCM_SERVICE_ACCOUNT < key.json`.
37
37
  `FCM_PROJECT_ID` is optional and overrides the key file's `project_id`.
38
38
 
39
+ To mint tokens yourself, for example with `google-auth-library`, pass your own
40
+ `getAccessToken`: `fcm: (env) => ({ ...fcmFromEnv(env), getAccessToken })` or
41
+ `fcm: (env) => fcmFromEnv(env, { getAccessToken })`. Lunora reads that from
42
+ the `fcm` entry of an inline `defineNotify({...})` in `lunora/notify.ts`, so `lunora dev`
43
+ and `lunora deploy` then ask for `FCM_PROJECT_ID` instead of `FCM_SERVICE_ACCOUNT`. Set
44
+ it even if the key file is still in env: the preflight does not take the project id from
45
+ the key file. If the same object also sets `projectId` to a string, no FCM key is asked
46
+ for at all. A config the build cannot read keeps asking for `FCM_SERVICE_ACCOUNT`.
47
+
39
48
  Generate a VAPID keypair once: `npx web-push generate-vapid-keys`.
40
49
 
41
50
  ## Register a device (browser)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/notify",
3
- "version": "1.0.0-alpha.111",
3
+ "version": "1.0.0-alpha.112",
4
4
  "description": "Multi-channel notifications for Lunora — ctx.notify / ctx.push over @visulima/notification: edge-safe Web Push + FCM, plus chat, in-app inbox and webhook channels, with subscription storage and queue-backed fan-out",
5
5
  "keywords": [
6
6
  "cloudflare",