@ngx-pwa/local-storage 18.0.0 → 20.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.
Files changed (40) hide show
  1. package/LICENSE +1 -1
  2. package/fesm2022/ngx-pwa-local-storage.mjs +89 -63
  3. package/fesm2022/ngx-pwa-local-storage.mjs.map +1 -1
  4. package/index.d.ts +656 -3
  5. package/package.json +3 -5
  6. package/schematics/ng-add/index.js +9 -9
  7. package/schematics/ng-add/index.js.map +1 -1
  8. package/schematics/ng-update/index.js +14 -24
  9. package/schematics/ng-update/index.js.map +1 -1
  10. package/schematics/utility/config.js +24 -34
  11. package/schematics/utility/config.js.map +1 -1
  12. package/schematics/utility/module.js +3 -3
  13. package/schematics/utility/module.js.map +1 -1
  14. package/esm2022/lib/databases/exceptions.mjs +0 -28
  15. package/esm2022/lib/databases/indexeddb-database.mjs +0 -308
  16. package/esm2022/lib/databases/local-database.mjs +0 -66
  17. package/esm2022/lib/databases/localstorage-database.mjs +0 -158
  18. package/esm2022/lib/databases/memory-database.mjs +0 -84
  19. package/esm2022/lib/providers.mjs +0 -66
  20. package/esm2022/lib/storage.module.mjs +0 -34
  21. package/esm2022/lib/storages/exceptions.mjs +0 -15
  22. package/esm2022/lib/storages/storage-map.service.mjs +0 -340
  23. package/esm2022/lib/tokens.mjs +0 -59
  24. package/esm2022/lib/validation/json-schema.mjs +0 -5
  25. package/esm2022/lib/validation/json-validator.mjs +0 -244
  26. package/esm2022/ngx-pwa-local-storage.mjs +0 -5
  27. package/esm2022/public-api.mjs +0 -9
  28. package/lib/databases/exceptions.d.ts +0 -20
  29. package/lib/databases/indexeddb-database.d.ts +0 -107
  30. package/lib/databases/local-database.d.ts +0 -18
  31. package/lib/databases/localstorage-database.d.ts +0 -64
  32. package/lib/databases/memory-database.d.ts +0 -50
  33. package/lib/providers.d.ts +0 -56
  34. package/lib/storage.module.d.ts +0 -19
  35. package/lib/storages/exceptions.d.ts +0 -10
  36. package/lib/storages/storage-map.service.d.ts +0 -254
  37. package/lib/tokens.d.ts +0 -75
  38. package/lib/validation/json-schema.d.ts +0 -260
  39. package/lib/validation/json-validator.d.ts +0 -71
  40. package/public-api.d.ts +0 -7
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2016-2024 Cyrille Tuzi
3
+ Copyright (c) 2016-2025 Cyrille Tuzi
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
@@ -12,10 +12,7 @@ const IDB_BROKEN_ERROR = "indexedDB is not working";
12
12
  * Exception raised when `indexedDB` is not working
13
13
  */
14
14
  class IDBBrokenError extends Error {
15
- constructor() {
16
- super(...arguments);
17
- this.message = IDB_BROKEN_ERROR;
18
- }
15
+ message = IDB_BROKEN_ERROR;
19
16
  }
20
17
  /**
21
18
  * Exception message when a value cannot be serialized for `localStorage`
@@ -26,10 +23,7 @@ where data must be serialized, and the provided data can't be serialized.`;
26
23
  * Exception throwned when a value cannot be serialized for `localStorage`
27
24
  */
28
25
  class SerializationError extends Error {
29
- constructor() {
30
- super(...arguments);
31
- this.message = SERIALIZATION_ERROR;
32
- }
26
+ message = SERIALIZATION_ERROR;
33
27
  }
34
28
 
35
29
  /**
@@ -169,19 +163,23 @@ class StorageModule {
169
163
  return {
170
164
  ngModule: StorageModule,
171
165
  providers: [
172
- config.LSPrefix ? { provide: LS_PREFIX, useValue: config.LSPrefix } : [],
173
- config.IDBDBName ? { provide: IDB_DB_NAME, useValue: config.IDBDBName } : [],
174
- config.IDBStoreName ? { provide: IDB_STORE_NAME, useValue: config.IDBStoreName } : [],
175
- config.IDBDBVersion ? { provide: IDB_DB_VERSION, useValue: config.IDBDBVersion } : [],
166
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
167
+ config.LSPrefix !== undefined ? { provide: LS_PREFIX, useValue: config.LSPrefix } : [],
168
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
169
+ config.IDBDBName !== undefined ? { provide: IDB_DB_NAME, useValue: config.IDBDBName } : [],
170
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
171
+ config.IDBStoreName !== undefined ? { provide: IDB_STORE_NAME, useValue: config.IDBStoreName } : [],
172
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
173
+ config.IDBDBVersion !== undefined ? { provide: IDB_DB_VERSION, useValue: config.IDBDBVersion } : [],
176
174
  (config.IDBNoWrap === false) ? { provide: IDB_NO_WRAP, useValue: config.IDBNoWrap } : [],
177
175
  ],
178
176
  };
179
177
  }
180
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: StorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
181
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.0", ngImport: i0, type: StorageModule }); }
182
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: StorageModule }); }
178
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: StorageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
179
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0", ngImport: i0, type: StorageModule });
180
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: StorageModule });
183
181
  }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: StorageModule, decorators: [{
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: StorageModule, decorators: [{
185
183
  type: NgModule
186
184
  }] });
187
185
 
@@ -194,16 +192,17 @@ Check your JSON schema, otherwise it means data has been corrupted.`;
194
192
  * Exception throwned when a value is not valid against the JSON schema
195
193
  */
196
194
  class ValidationError extends Error {
197
- constructor() {
198
- super(...arguments);
199
- this.message = VALIDATION_ERROR;
200
- }
195
+ message = VALIDATION_ERROR;
201
196
  }
202
197
 
203
198
  class LocalStorageDatabase {
199
+ /**
200
+ * Optional user prefix to avoid collision for multiple apps on the same subdomain
201
+ */
202
+ prefix;
204
203
  constructor() {
205
204
  /* Prefix if asked, or no prefix otherwise */
206
- this.prefix = inject(LS_PREFIX) || "";
205
+ this.prefix = inject(LS_PREFIX);
207
206
  }
208
207
  /**
209
208
  * Number of items in `localStorage`
@@ -229,6 +228,7 @@ class LocalStorageDatabase {
229
228
  return of(parsedData);
230
229
  }
231
230
  catch (error) {
231
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
232
232
  return throwError(() => error);
233
233
  }
234
234
  }
@@ -244,15 +244,19 @@ class LocalStorageDatabase {
244
244
  let serializedData = null;
245
245
  /* Check if data can be serialized */
246
246
  const dataPrototype = Object.getPrototypeOf(data);
247
- if ((typeof data === "object") && (data !== null) && !Array.isArray(data) &&
247
+ if ((typeof data === "object") && !Array.isArray(data) &&
248
248
  !((dataPrototype === Object.prototype) || (dataPrototype === null))) {
249
249
  return throwError(() => new SerializationError());
250
250
  }
251
251
  /* Try to stringify (can fail on circular references) */
252
252
  try {
253
253
  serializedData = JSON.stringify(data);
254
+ if (serializedData === undefined) {
255
+ throw new Error();
256
+ }
254
257
  }
255
258
  catch (error) {
259
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
256
260
  return throwError(() => error);
257
261
  }
258
262
  /* Can fail if storage quota is exceeded */
@@ -260,6 +264,7 @@ class LocalStorageDatabase {
260
264
  localStorage.setItem(this.prefixKey(key), serializedData);
261
265
  }
262
266
  catch (error) {
267
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
263
268
  return throwError(() => error);
264
269
  }
265
270
  /* Wrap in a RxJS `Observable` to be consistent with other storages */
@@ -329,7 +334,7 @@ class LocalStorageDatabase {
329
334
  const prefixedKey = localStorage.key(index);
330
335
  if (prefixedKey !== null) {
331
336
  /* If no prefix, the key is already good, otherwrite strip the prefix */
332
- return !this.prefix ? prefixedKey : prefixedKey.substring(this.prefix.length);
337
+ return this.prefix === "" ? prefixedKey : prefixedKey.substring(this.prefix.length);
333
338
  }
334
339
  return null;
335
340
  }
@@ -341,10 +346,10 @@ class LocalStorageDatabase {
341
346
  prefixKey(key) {
342
347
  return `${this.prefix}${key}`;
343
348
  }
344
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalStorageDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
345
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalStorageDatabase, providedIn: "root" }); }
349
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: LocalStorageDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
350
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: LocalStorageDatabase, providedIn: "root" });
346
351
  }
347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalStorageDatabase, decorators: [{
352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: LocalStorageDatabase, decorators: [{
348
353
  type: Injectable,
349
354
  args: [{
350
355
  providedIn: "root"
@@ -352,12 +357,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
352
357
  }], ctorParameters: () => [] });
353
358
 
354
359
  class MemoryDatabase {
355
- constructor() {
356
- /**
357
- * Memory storage
358
- */
359
- this.memoryStorage = new Map();
360
- }
360
+ /**
361
+ * Memory storage
362
+ */
363
+ memoryStorage = new Map();
361
364
  /**
362
365
  * Number of items in memory
363
366
  */
@@ -421,10 +424,10 @@ class MemoryDatabase {
421
424
  /* Wrap in a RxJS `Observable` to be consistent with other storages */
422
425
  return of(this.memoryStorage.has(key));
423
426
  }
424
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MemoryDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
425
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MemoryDatabase, providedIn: "root" }); }
427
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: MemoryDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
428
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: MemoryDatabase, providedIn: "root" });
426
429
  }
427
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: MemoryDatabase, decorators: [{
430
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: MemoryDatabase, decorators: [{
428
431
  type: Injectable,
429
432
  args: [{
430
433
  providedIn: "root"
@@ -479,10 +482,10 @@ function localDatabaseFactory() {
479
482
  return new MemoryDatabase();
480
483
  }
481
484
  class LocalDatabase {
482
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
483
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalDatabase, providedIn: "root", useFactory: localDatabaseFactory }); }
485
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: LocalDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
486
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: LocalDatabase, providedIn: "root", useFactory: localDatabaseFactory });
484
487
  }
485
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: LocalDatabase, decorators: [{
488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: LocalDatabase, decorators: [{
486
489
  type: Injectable,
487
490
  args: [{
488
491
  providedIn: "root",
@@ -491,16 +494,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
491
494
  }] });
492
495
 
493
496
  class IndexedDBDatabase {
497
+ /**
498
+ * `indexedDB` database name
499
+ */
500
+ dbName;
501
+ /**
502
+ * `indexedDB` object store name
503
+ */
504
+ storeName;
505
+ /**
506
+ * `indexedDB` database version. Must be an unsigned **integer**
507
+ */
508
+ dbVersion;
509
+ /**
510
+ * `indexedDB` database connection, wrapped in a RxJS `ReplaySubject` to be able to access the connection
511
+ * even after the connection success event happened
512
+ */
513
+ database = new ReplaySubject(1);
514
+ /**
515
+ * Flag to not wrap `indexedDB` values for interoperability or to wrap for backward compatibility.
516
+ */
517
+ noWrap;
518
+ /**
519
+ * Index used when wrapping value. *For backward compatibility only.*
520
+ */
521
+ wrapIndex = "value";
494
522
  constructor() {
495
- /**
496
- * `indexedDB` database connection, wrapped in a RxJS `ReplaySubject` to be able to access the connection
497
- * even after the connection success event happened
498
- */
499
- this.database = new ReplaySubject(1);
500
- /**
501
- * Index used when wrapping value. *For backward compatibility only.*
502
- */
503
- this.wrapIndex = "value";
504
523
  this.dbName = inject(IDB_DB_NAME);
505
524
  this.storeName = inject(IDB_STORE_NAME);
506
525
  this.dbVersion = inject(IDB_DB_VERSION);
@@ -642,7 +661,7 @@ class IndexedDBDatabase {
642
661
  /* Listen to success event */
643
662
  const success$ = fromEvent(request, "success").pipe(
644
663
  /* Stop the `Observable` when the cursor is `null` */
645
- // eslint-disable-next-line rxjs/no-ignored-takewhile-value -- Required by indexedDb behavior, getting the result from the event does not always work
664
+ // // eslint-disable-next-line rxjs/no-ignored-takewhile-value -- Required by indexedDb behavior, getting the result from the event does not always work
646
665
  takeWhile(() => (request.result !== null)),
647
666
  /* This lib only allows string keys, but user could have added other types of keys from outside
648
667
  * It's OK to cast as the cursor as been tested in the previous operator */
@@ -747,6 +766,7 @@ class IndexedDBDatabase {
747
766
  }
748
767
  catch (error) {
749
768
  /* The store could have been deleted from outside */
769
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
750
770
  return throwError(() => error);
751
771
  }
752
772
  /* Get the store from the transaction */
@@ -766,6 +786,7 @@ class IndexedDBDatabase {
766
786
  /* Throw on error to be able to catch errors in RxJS way.
767
787
  * Here `event.target` must be used, as `transactionOrRequest.error` will be `null`
768
788
  * if we are on the request and the error is only triggered later by the transaction */
789
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
769
790
  mergeMap((event) => throwError(() => event.target?.error)));
770
791
  }
771
792
  /**
@@ -781,10 +802,10 @@ class IndexedDBDatabase {
781
802
  /* Choose the first event to occur */
782
803
  return race([complete$, error$]);
783
804
  }
784
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: IndexedDBDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
785
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: IndexedDBDatabase, providedIn: "root" }); }
805
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: IndexedDBDatabase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
806
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: IndexedDBDatabase, providedIn: "root" });
786
807
  }
787
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: IndexedDBDatabase, decorators: [{
808
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: IndexedDBDatabase, decorators: [{
788
809
  type: Injectable,
789
810
  args: [{
790
811
  providedIn: "root"
@@ -837,7 +858,7 @@ class JSONValidator {
837
858
  if ((schema.minLength !== undefined) && (data.length < schema.minLength)) {
838
859
  return false;
839
860
  }
840
- if (schema.pattern) {
861
+ if (schema.pattern !== undefined) {
841
862
  try {
842
863
  const regularExpression = new RegExp(schema.pattern);
843
864
  if (!regularExpression.test(data)) {
@@ -870,7 +891,7 @@ class JSONValidator {
870
891
  return false;
871
892
  }
872
893
  /* Test is done this way to not divide by 0 */
873
- if (schema.multipleOf && !Number.isInteger(data / schema.multipleOf)) {
894
+ if (schema.multipleOf !== undefined && schema.multipleOf !== 0 && Number.isFinite(schema.multipleOf) && !Number.isInteger(data / schema.multipleOf)) {
874
895
  return false;
875
896
  }
876
897
  if ((schema.maximum !== undefined) && (data > schema.maximum)) {
@@ -918,7 +939,7 @@ class JSONValidator {
918
939
  if ((schema.minItems !== undefined) && (data.length < schema.minItems)) {
919
940
  return false;
920
941
  }
921
- if (schema.uniqueItems) {
942
+ if (schema.uniqueItems === true) {
922
943
  /* Create a set to eliminate values with multiple occurences */
923
944
  const dataSet = new Set(data);
924
945
  if (data.length !== dataSet.size) {
@@ -928,12 +949,14 @@ class JSONValidator {
928
949
  /* Specific test for tuples */
929
950
  if (Array.isArray(schema.items) || schema.items === undefined) {
930
951
  // TODO: cast should not be needed here
952
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
931
953
  return this.validateTuple(data, schema.items);
932
954
  }
933
955
  /* Validate all the values in array */
934
956
  for (const value of data) {
935
957
  // TODO: remove when TypeScript 4.1 is available
936
958
  // (currently the narrowed type from `Array.isArray()` is lost on readonly arrays)
959
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
937
960
  if (!this.validate(value, schema.items)) {
938
961
  return false;
939
962
  }
@@ -990,7 +1013,7 @@ class JSONValidator {
990
1013
  for (const property in schema.properties) {
991
1014
  /* Filter to keep only real properties (no internal JS stuff) and check if the data has the property too */
992
1015
  if (Object.hasOwn(schema.properties, property) && Object.hasOwn(data, property)) {
993
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Ensured by the logic
1016
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unsafe-type-assertion -- Ensured by the logic
994
1017
  if (!this.validate(data[property], schema.properties[property])) {
995
1018
  return false;
996
1019
  }
@@ -1005,7 +1028,7 @@ class JSONValidator {
1005
1028
  * @returns If data is valid: `true`, if it is invalid: `false`
1006
1029
  */
1007
1030
  validateConst(data, schema) {
1008
- if (!schema.const) {
1031
+ if (schema.const === undefined) {
1009
1032
  return true;
1010
1033
  }
1011
1034
  return (data === schema.const);
@@ -1021,12 +1044,13 @@ class JSONValidator {
1021
1044
  return true;
1022
1045
  }
1023
1046
  /* Cast as the data can be of multiple types, and so TypeScript is lost */
1047
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
1024
1048
  return (schema.enum.includes(data));
1025
1049
  }
1026
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: JSONValidator, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1027
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: JSONValidator, providedIn: "root" }); }
1050
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: JSONValidator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1051
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: JSONValidator, providedIn: "root" });
1028
1052
  }
1029
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: JSONValidator, decorators: [{
1053
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: JSONValidator, decorators: [{
1030
1054
  type: Injectable,
1031
1055
  args: [{
1032
1056
  providedIn: "root"
@@ -1146,6 +1170,7 @@ class StorageMap {
1146
1170
  return throwError(() => new ValidationError());
1147
1171
  }
1148
1172
  /* Data have been checked, so it's OK to cast */
1173
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
1149
1174
  return of(data);
1150
1175
  }
1151
1176
  /* Cast to unknown as the data wasn't checked */
@@ -1287,6 +1312,7 @@ class StorageMap {
1287
1312
  });
1288
1313
  /* Only the public API of the Observable should be returned */
1289
1314
  return (schema ?
1315
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
1290
1316
  notifier.asObservable() :
1291
1317
  notifier.asObservable());
1292
1318
  }
@@ -1346,15 +1372,15 @@ class StorageMap {
1346
1372
  * @private
1347
1373
  * @ignore
1348
1374
  */
1349
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error -- Silence the not used error, it is used in tests
1375
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Silence the not used error, it is used in tests
1350
1376
  // @ts-ignore
1351
1377
  ɵinternalGetDatabase() {
1352
1378
  return this.#database;
1353
1379
  }
1354
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: StorageMap, deps: [{ token: LocalDatabase }], target: i0.ɵɵFactoryTarget.Injectable }); }
1355
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: StorageMap, providedIn: "root" }); }
1380
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: StorageMap, deps: [{ token: LocalDatabase }], target: i0.ɵɵFactoryTarget.Injectable });
1381
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: StorageMap, providedIn: "root" });
1356
1382
  }
1357
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImport: i0, type: StorageMap, decorators: [{
1383
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0", ngImport: i0, type: StorageMap, decorators: [{
1358
1384
  type: Injectable,
1359
1385
  args: [{
1360
1386
  providedIn: "root"