web-manager 4.0.28 → 4.0.29
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 +9 -0
- package/dist/modules/notifications.js +6 -37
- package/firebase-debug.log +84 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
15
15
|
- `Security` in case of vulnerabilities.
|
|
16
16
|
|
|
17
17
|
---
|
|
18
|
+
## [4.0.28] - 2025-12-01
|
|
19
|
+
### Added
|
|
20
|
+
- Added `exports` field to package.json for explicit module resolution support.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Updated `@sentry/browser` from pinned `10.11.0` to `^10.27.0`.
|
|
24
|
+
- Updated `firebase` from `^12.3.0` to `^12.6.0`.
|
|
25
|
+
- Updated `prepare-package` dev dependency from `^1.2.2` to `^1.2.5`.
|
|
26
|
+
|
|
18
27
|
## [4.0.0] - 2025-09-11
|
|
19
28
|
### ⚠️ BREAKING
|
|
20
29
|
- Updated to ITW 3.0 standard.
|
|
@@ -254,14 +254,13 @@ class Notifications {
|
|
|
254
254
|
// Save subscription to Firestore
|
|
255
255
|
async _saveSubscription(token) {
|
|
256
256
|
try {
|
|
257
|
-
const firestore = this.manager.
|
|
257
|
+
const firestore = this.manager.firestore();
|
|
258
258
|
const user = this.manager.auth().getUser();
|
|
259
259
|
|
|
260
|
-
if (!
|
|
260
|
+
if (!token) {
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
const { doc, getDoc, setDoc, updateDoc, deleteDoc } = await import('firebase/firestore');
|
|
265
264
|
const { getContext } = await import('./utilities.js');
|
|
266
265
|
|
|
267
266
|
const now = new Date();
|
|
@@ -273,10 +272,10 @@ class Notifications {
|
|
|
273
272
|
const clientData = context.client;
|
|
274
273
|
|
|
275
274
|
// Reference to the notification document (ID is the token)
|
|
276
|
-
const
|
|
275
|
+
const notificationDoc = firestore.doc(`notifications/${token}`);
|
|
277
276
|
|
|
278
277
|
// Check if document already exists
|
|
279
|
-
const existingDoc = await
|
|
278
|
+
const existingDoc = await notificationDoc.get();
|
|
280
279
|
const existingData = existingDoc.exists() ? existingDoc.data() : null;
|
|
281
280
|
|
|
282
281
|
// Determine if we need to update
|
|
@@ -303,7 +302,7 @@ class Notifications {
|
|
|
303
302
|
uid: currentUid
|
|
304
303
|
};
|
|
305
304
|
|
|
306
|
-
await
|
|
305
|
+
await notificationDoc.set(subscriptionData);
|
|
307
306
|
|
|
308
307
|
} else if (needsUpdate) {
|
|
309
308
|
// Existing subscription needs update (userId changed)
|
|
@@ -318,40 +317,10 @@ class Notifications {
|
|
|
318
317
|
uid: currentUid
|
|
319
318
|
};
|
|
320
319
|
|
|
321
|
-
await
|
|
320
|
+
await notificationDoc.update(updateData);
|
|
322
321
|
}
|
|
323
322
|
// If no update needed, do nothing
|
|
324
323
|
|
|
325
|
-
// Update user's notification reference if authenticated
|
|
326
|
-
if (user && (!existingData || needsUpdate)) {
|
|
327
|
-
await setDoc(
|
|
328
|
-
doc(firestore, 'users', user.uid, 'notifications', token),
|
|
329
|
-
{
|
|
330
|
-
token,
|
|
331
|
-
created: existingData?.created || {
|
|
332
|
-
timestamp,
|
|
333
|
-
timestampUNIX
|
|
334
|
-
},
|
|
335
|
-
updated: {
|
|
336
|
-
timestamp,
|
|
337
|
-
timestampUNIX
|
|
338
|
-
},
|
|
339
|
-
active: true
|
|
340
|
-
},
|
|
341
|
-
{ merge: true }
|
|
342
|
-
);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// Remove old user reference if user changed
|
|
346
|
-
if (existingUid && existingUid !== currentUid && existingUid !== null) {
|
|
347
|
-
try {
|
|
348
|
-
await deleteDoc(doc(firestore, 'users', existingUid, 'notifications', token));
|
|
349
|
-
} catch (err) {
|
|
350
|
-
// Ignore errors when cleaning up old references
|
|
351
|
-
console.log('Could not clean up old user notification reference:', err.message);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
324
|
} catch (error) {
|
|
356
325
|
console.error('Save subscription error:', error);
|
|
357
326
|
// Don't throw - this is not critical for the subscription process
|
package/firebase-debug.log
CHANGED
|
@@ -182,3 +182,87 @@
|
|
|
182
182
|
[debug] [2025-12-02T03:40:02.199Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
183
183
|
[debug] [2025-12-02T03:40:02.199Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
184
184
|
[debug] [2025-12-02T03:40:02.200Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
185
|
+
[debug] [2025-12-02T09:42:31.673Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
186
|
+
[debug] [2025-12-02T09:42:31.674Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
187
|
+
[debug] [2025-12-02T09:42:31.676Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
188
|
+
[debug] [2025-12-02T09:42:31.676Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
189
|
+
[debug] [2025-12-02T09:42:31.676Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
190
|
+
[debug] [2025-12-02T09:42:31.688Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
191
|
+
[debug] [2025-12-02T09:42:31.688Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
192
|
+
[debug] [2025-12-02T09:42:31.676Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
193
|
+
[debug] [2025-12-02T09:42:31.676Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
194
|
+
[debug] [2025-12-02T09:42:31.676Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
195
|
+
[debug] [2025-12-02T09:42:31.688Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
196
|
+
[debug] [2025-12-02T09:42:31.688Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
197
|
+
[debug] [2025-12-02T09:42:31.699Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
198
|
+
[debug] [2025-12-02T09:42:31.700Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
199
|
+
[debug] [2025-12-02T09:42:31.699Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
200
|
+
[debug] [2025-12-02T09:42:31.700Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
201
|
+
[debug] [2025-12-02T09:42:31.700Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
202
|
+
[debug] [2025-12-02T09:42:31.702Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
203
|
+
[debug] [2025-12-02T09:42:31.702Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
204
|
+
[debug] [2025-12-02T09:42:31.702Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
205
|
+
[debug] [2025-12-02T09:42:31.703Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
206
|
+
[debug] [2025-12-02T09:42:31.700Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
207
|
+
[debug] [2025-12-02T09:42:31.701Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
208
|
+
[debug] [2025-12-02T09:42:31.701Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
209
|
+
[debug] [2025-12-02T09:42:31.702Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
210
|
+
[debug] [2025-12-02T09:42:31.702Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
211
|
+
[debug] [2025-12-02T09:42:31.703Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
212
|
+
[debug] [2025-12-02T09:42:31.703Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
213
|
+
[debug] [2025-12-02T09:43:57.774Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
214
|
+
[debug] [2025-12-02T09:43:57.775Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
215
|
+
[debug] [2025-12-02T09:43:57.777Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
216
|
+
[debug] [2025-12-02T09:43:57.777Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
217
|
+
[debug] [2025-12-02T09:43:57.777Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
218
|
+
[debug] [2025-12-02T09:43:57.790Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
219
|
+
[debug] [2025-12-02T09:43:57.791Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
220
|
+
[debug] [2025-12-02T09:43:57.777Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
221
|
+
[debug] [2025-12-02T09:43:57.777Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
222
|
+
[debug] [2025-12-02T09:43:57.777Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
223
|
+
[debug] [2025-12-02T09:43:57.791Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
224
|
+
[debug] [2025-12-02T09:43:57.792Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
225
|
+
[debug] [2025-12-02T09:43:57.802Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
226
|
+
[debug] [2025-12-02T09:43:57.803Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
227
|
+
[debug] [2025-12-02T09:43:57.803Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
228
|
+
[debug] [2025-12-02T09:43:57.803Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
229
|
+
[debug] [2025-12-02T09:43:57.803Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
230
|
+
[debug] [2025-12-02T09:43:57.805Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
231
|
+
[debug] [2025-12-02T09:43:57.805Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
232
|
+
[debug] [2025-12-02T09:43:57.805Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
233
|
+
[debug] [2025-12-02T09:43:57.805Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
234
|
+
[debug] [2025-12-02T09:43:57.804Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
235
|
+
[debug] [2025-12-02T09:43:57.804Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
236
|
+
[debug] [2025-12-02T09:43:57.804Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
237
|
+
[debug] [2025-12-02T09:43:57.806Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
238
|
+
[debug] [2025-12-02T09:43:57.806Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
239
|
+
[debug] [2025-12-02T09:43:57.806Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
240
|
+
[debug] [2025-12-02T09:43:57.807Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
241
|
+
[debug] [2025-12-02T09:47:00.941Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
242
|
+
[debug] [2025-12-02T09:47:00.941Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
243
|
+
[debug] [2025-12-02T09:47:00.943Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
244
|
+
[debug] [2025-12-02T09:47:00.943Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
245
|
+
[debug] [2025-12-02T09:47:00.943Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
246
|
+
[debug] [2025-12-02T09:47:00.960Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
247
|
+
[debug] [2025-12-02T09:47:00.960Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
248
|
+
[debug] [2025-12-02T09:47:00.944Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
249
|
+
[debug] [2025-12-02T09:47:00.944Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
250
|
+
[debug] [2025-12-02T09:47:00.944Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
251
|
+
[debug] [2025-12-02T09:47:00.960Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
252
|
+
[debug] [2025-12-02T09:47:00.961Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
253
|
+
[debug] [2025-12-02T09:47:00.972Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
254
|
+
[debug] [2025-12-02T09:47:00.973Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
255
|
+
[debug] [2025-12-02T09:47:00.973Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
256
|
+
[debug] [2025-12-02T09:47:00.973Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
257
|
+
[debug] [2025-12-02T09:47:00.974Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
258
|
+
[debug] [2025-12-02T09:47:00.975Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
259
|
+
[debug] [2025-12-02T09:47:00.975Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
260
|
+
[debug] [2025-12-02T09:47:00.975Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
261
|
+
[debug] [2025-12-02T09:47:00.976Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
262
|
+
[debug] [2025-12-02T09:47:00.973Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
263
|
+
[debug] [2025-12-02T09:47:00.974Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
264
|
+
[debug] [2025-12-02T09:47:00.974Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
265
|
+
[debug] [2025-12-02T09:47:00.976Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
266
|
+
[debug] [2025-12-02T09:47:00.976Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
|
267
|
+
[debug] [2025-12-02T09:47:00.977Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
|
|
268
|
+
[debug] [2025-12-02T09:47:00.977Z] > authorizing via signed-in user (ian.wiedenman@gmail.com)
|
package/package.json
CHANGED