@tokamakdev/plugin-secure-storage 0.1.0-beta.125 → 0.1.0-beta.127

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokamakdev/plugin-secure-storage",
3
- "version": "0.1.0-beta.125",
3
+ "version": "0.1.0-beta.127",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/mantty/tokamak.git",
@@ -12,7 +12,7 @@
12
12
  "./android": "./android/bindings.ts"
13
13
  },
14
14
  "peerDependencies": {
15
- "@tokamakdev/plugin": "0.1.0-beta.125"
15
+ "@tokamakdev/plugin": "0.1.0-beta.127"
16
16
  },
17
17
  "files": [
18
18
  "android",
package/src/index.ts CHANGED
@@ -54,17 +54,26 @@ class SecureStorage extends Plugin {
54
54
  return this.call("create", stored(name, value, options));
55
55
  }
56
56
 
57
- /** Replaces the value in place; rejects with `ItemNotFoundError` when `name` has none. */
57
+ /**
58
+ * Replaces the value in place; rejects with `ItemNotFoundError` when `name` has none. Replacing a
59
+ * value saved with `authentication` rejects with `NeedsUIError` off screen on iOS.
60
+ */
58
61
  replace(name: string, value: string, options: SetOptions): Promise<void> {
59
62
  return this.call("replace", { ...stored(name, value, options), prompt: options.prompt ?? null });
60
63
  }
61
64
 
62
- /** Replaces the value in place, or stores a new one when `name` has none. */
65
+ /**
66
+ * Replaces the value in place, or stores a new one when `name` has none. Replacing a value saved
67
+ * with `authentication` rejects with `NeedsUIError` off screen on iOS.
68
+ */
63
69
  set(name: string, value: string, options: SetOptions): Promise<void> {
64
70
  return this.call("set", { ...stored(name, value, options), prompt: options.prompt ?? null });
65
71
  }
66
72
 
67
- /** Reads the value; rejects with `ItemNotFoundError` when `name` has none. */
73
+ /**
74
+ * Reads the value; rejects with `ItemNotFoundError` when `name` has none. Reading a value saved
75
+ * with `authentication` rejects with `NeedsUIError` off screen on iOS and Android.
76
+ */
68
77
  get(name: string, options: GetOptions = {}): Promise<string> {
69
78
  return this.call("get", { name, prompt: options.prompt ?? null, keychainGroup: options.keychainGroup ?? null });
70
79
  }
@@ -37,25 +37,5 @@
37
37
  "api": {
38
38
  "module": "src/index.ts",
39
39
  "export": "secureStorage"
40
- },
41
- "operations": {
42
- "get": {
43
- "foreground": [
44
- "ios",
45
- "android"
46
- ]
47
- },
48
- "replace": {
49
- "foreground": [
50
- "ios",
51
- "android"
52
- ]
53
- },
54
- "set": {
55
- "foreground": [
56
- "ios",
57
- "android"
58
- ]
59
- }
60
40
  }
61
41
  }