@portal-hq/utils 0.2.24-beta1 → 0.2.24

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.
@@ -23,6 +23,9 @@ class KeychainAdapter {
23
23
  }
24
24
  exports.KeychainAdapter = KeychainAdapter;
25
25
  class Storage {
26
+ delete() {
27
+ throw new Error('[Portal] Storage method delete cannot be called directly. Please extend Storage.');
28
+ }
26
29
  read() {
27
30
  throw new Error('[Portal] Storage method read cannot be called directly. Please extend Storage.');
28
31
  }
@@ -19,6 +19,9 @@ export class KeychainAdapter {
19
19
  }
20
20
  }
21
21
  export class Storage {
22
+ delete() {
23
+ throw new Error('[Portal] Storage method delete cannot be called directly. Please extend Storage.');
24
+ }
22
25
  read() {
23
26
  throw new Error('[Portal] Storage method read cannot be called directly. Please extend Storage.');
24
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/utils",
3
- "version": "0.2.24-beta1",
3
+ "version": "0.2.24",
4
4
  "main": "lib/commonjs/index",
5
5
  "module": "lib/esm/index",
6
6
  "source": "src/index",
@@ -42,11 +42,18 @@ export declare class PortalApi {
42
42
  export abstract class Storage {
43
43
  public api?: PortalApi
44
44
 
45
+ delete(): Promise<boolean> {
46
+ throw new Error(
47
+ '[Portal] Storage method delete cannot be called directly. Please extend Storage.',
48
+ )
49
+ }
50
+
45
51
  read(): Promise<string> {
46
52
  throw new Error(
47
53
  '[Portal] Storage method read cannot be called directly. Please extend Storage.',
48
54
  )
49
55
  }
56
+
50
57
  write(privateKey: string): Promise<string> {
51
58
  throw new Error(
52
59
  `[Portal] Storage method write(${privateKey}) cannot be called directly. Please extend Storage.`,