@cloudsignal/pwa-sdk 1.2.4 → 2.0.0
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 +15 -26
- package/README.md +45 -509
- package/dist/{chunk-IMM7VF4N.js → chunk-IQHSODT4.js} +6 -6
- package/dist/chunk-IQHSODT4.js.map +1 -0
- package/dist/hmac-WITZIX2O.js +3 -0
- package/dist/{hmac-LWLR6F7Z.js.map → hmac-WITZIX2O.js.map} +1 -1
- package/dist/index.cjs +20 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +18 -36
- package/dist/index.d.ts +18 -36
- package/dist/index.global.js +6 -6
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +19 -103
- package/dist/index.js.map +1 -1
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-IMM7VF4N.js.map +0 -1
- package/dist/hmac-LWLR6F7Z.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,37 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [
|
|
8
|
+
## [2.0.0] - 2026-04-23
|
|
9
9
|
|
|
10
|
-
###
|
|
11
|
-
|
|
12
|
-
- **Auto Installation Tracking** - Automatically registers PWA installations with the backend when detected
|
|
13
|
-
- `registerInstallation()` method for manual installation tracking without push subscription
|
|
14
|
-
- `isInstallationRegistered()` method to check if installation is already tracked
|
|
15
|
-
- `getInstallationId()` method to get stored installation registration ID
|
|
16
|
-
- `install:registered` event emitted when installation is registered with backend
|
|
17
|
-
- Installation tracking works with both HMAC (anonymous) and JWT (authenticated) modes
|
|
18
|
-
|
|
19
|
-
### Changed
|
|
20
|
-
|
|
21
|
-
- `initialize()` now auto-calls `registerInstallation()` when PWA is detected as installed
|
|
22
|
-
- Prevents duplicate registrations using localStorage tracking
|
|
10
|
+
### Changed (BREAKING)
|
|
23
11
|
|
|
24
|
-
|
|
12
|
+
- Renamed the HMAC-mode config field `organizationSecret` → `organizationPublishableKey`. The value has always been an organization publishable key (`pk_*`), safe to ship in browser code; the previous name was misleading and invited customers to paste `sk_*` server-only keys by mistake.
|
|
13
|
+
- Companion env var (dashboard snippets + docs): `NEXT_PUBLIC_CLOUDSIGNAL_SECRET` → `NEXT_PUBLIC_CLOUDSIGNAL_PUBLISHABLE_KEY`.
|
|
14
|
+
- Error messages and JSDoc updated to reflect the new name.
|
|
25
15
|
|
|
26
|
-
|
|
27
|
-
- **Prerequisites Section**: Added environment variable configuration guide
|
|
28
|
-
- **Service Worker Setup**: Added root placement guidance, scope configuration, Workbox/Serwist coexistence patterns
|
|
29
|
-
- **Framework Integrations**: Added Next.js App Router guide with dynamic imports, Supabase Auth integration
|
|
30
|
-
- **Event Documentation**: Complete event list with handler signatures
|
|
31
|
-
- **Troubleshooting**: Service worker, permission, iOS, and token/auth issues
|
|
32
|
-
- **Production Checklist**: Pre-deployment verification steps
|
|
33
|
-
- **Migration Guides**: From Firebase Cloud Messaging and OneSignal
|
|
16
|
+
### Migration
|
|
34
17
|
|
|
35
|
-
|
|
18
|
+
```diff
|
|
19
|
+
new CloudSignalPWA({
|
|
20
|
+
organizationId: '...',
|
|
21
|
+
- organizationSecret: 'pk_...',
|
|
22
|
+
+ organizationPublishableKey: 'pk_...',
|
|
23
|
+
serviceId: '...',
|
|
24
|
+
})
|
|
25
|
+
```
|
|
36
26
|
|
|
37
|
-
|
|
38
|
-
- Installation registrations include `auth_method`, `auth_provider`, and `idp_user_id` for JWT mode
|
|
27
|
+
JWT mode (`userToken`) is unaffected. Wire protocol (`X-CloudSignal-*` headers) and signing algorithm are unchanged — servers need no update.
|
|
39
28
|
|
|
40
29
|
## [1.2.0] - 2025-01-17
|
|
41
30
|
|