@buoy-gg/storage 5.0.0 → 6.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/README.md +47 -3
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/storage/components/GameUIStorageBrowser.js +21 -18
- package/lib/commonjs/storage/components/SelectionActionBar.js +8 -0
- package/lib/commonjs/storage/components/StorageEventCard.js +3 -2
- package/lib/commonjs/storage/components/StorageFilterCards.js +1 -2
- package/lib/commonjs/storage/components/StorageKeyRow.js +8 -3
- package/lib/commonjs/storage/hooks/useMMKVInstances.js +9 -20
- package/lib/commonjs/storage/hooks/useMMKVKeys.js +12 -21
- package/lib/commonjs/storage/hooks/useSecureStoreKeys.js +104 -0
- package/lib/commonjs/storage/hooks/useStorageEvents.js +25 -11
- package/lib/commonjs/storage/sync/storageSyncAdapter.js +82 -1
- package/lib/commonjs/storage/utils/SecureStoreRegistry.js +149 -0
- package/lib/module/index.js +5 -0
- package/lib/module/storage/components/GameUIStorageBrowser.js +20 -18
- package/lib/module/storage/components/SelectionActionBar.js +8 -0
- package/lib/module/storage/components/StorageEventCard.js +4 -3
- package/lib/module/storage/components/StorageFilterCards.js +1 -2
- package/lib/module/storage/components/StorageKeyRow.js +7 -2
- package/lib/module/storage/hooks/useMMKVInstances.js +6 -18
- package/lib/module/storage/hooks/useMMKVKeys.js +7 -18
- package/lib/module/storage/hooks/useSecureStoreKeys.js +101 -0
- package/lib/module/storage/hooks/useStorageEvents.js +25 -11
- package/lib/module/storage/sync/storageSyncAdapter.js +83 -1
- package/lib/module/storage/utils/SecureStoreRegistry.js +143 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +1 -1
- package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageEventCard.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageFilterCards.d.ts.map +1 -1
- package/lib/typescript/storage/components/StorageKeyRow.d.ts +1 -1
- package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +1 -1
- package/lib/typescript/storage/hooks/useMMKVInstances.d.ts.map +1 -1
- package/lib/typescript/storage/hooks/useMMKVKeys.d.ts.map +1 -1
- package/lib/typescript/storage/hooks/useSecureStoreKeys.d.ts +18 -0
- package/lib/typescript/storage/hooks/useSecureStoreKeys.d.ts.map +1 -0
- package/lib/typescript/storage/hooks/useStorageEvents.d.ts.map +1 -1
- package/lib/typescript/storage/sync/storageSyncAdapter.d.ts +24 -0
- package/lib/typescript/storage/sync/storageSyncAdapter.d.ts.map +1 -1
- package/lib/typescript/storage/utils/SecureStoreRegistry.d.ts +115 -0
- package/lib/typescript/storage/utils/SecureStoreRegistry.d.ts.map +1 -0
- package/package.json +5 -5
|
@@ -5,6 +5,14 @@ import { isDevToolsStorageKey } from "@buoy-gg/shared-ui";
|
|
|
5
5
|
import { readMany, writeMany, removeMany } from "../utils/asyncStorageCompat";
|
|
6
6
|
import { storageEventStore } from "../stores/storageEventStore";
|
|
7
7
|
import { clearAllAppStorage } from "../utils/clearAllStorage";
|
|
8
|
+
import { mmkvInstanceRegistry } from "../utils/MMKVInstanceRegistry";
|
|
9
|
+
import { detectMMKVType } from "../utils/mmkvTypeDetection";
|
|
10
|
+
import { secureStoreRegistry } from "../utils/SecureStoreRegistry";
|
|
11
|
+
|
|
12
|
+
/** One MMKV entry in a `mmkv.snapshot` result. */
|
|
13
|
+
|
|
14
|
+
/** One MMKV instance in a `mmkv.snapshot` result. */
|
|
15
|
+
|
|
8
16
|
/**
|
|
9
17
|
* Sync adapter for the storage tool, consumed by @buoy-gg/external-sync's
|
|
10
18
|
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
@@ -57,6 +65,80 @@ export const storageSyncAdapter = {
|
|
|
57
65
|
"async.removeItem": params => AsyncStorage.removeItem(params.key),
|
|
58
66
|
"async.multiRemove": params => removeMany(params.keys),
|
|
59
67
|
"async.multiSet": params => writeMany(params.pairs),
|
|
60
|
-
"async.clear": () => AsyncStorage.clear()
|
|
68
|
+
"async.clear": () => AsyncStorage.clear(),
|
|
69
|
+
// ── Remote MMKV proxy (desktop browse mode + MCP) ──
|
|
70
|
+
// MMKV has no remote presence off-device; these read/write the registered
|
|
71
|
+
// instances so sync clients can browse them like AsyncStorage.
|
|
72
|
+
"mmkv.snapshot": () => mmkvInstanceRegistry.getAll().map(({
|
|
73
|
+
id,
|
|
74
|
+
instance,
|
|
75
|
+
encrypted,
|
|
76
|
+
readOnly
|
|
77
|
+
}) => {
|
|
78
|
+
let entries = [];
|
|
79
|
+
try {
|
|
80
|
+
entries = instance.getAllKeys().filter(key => !isDevToolsStorageKey(key)).map(key => {
|
|
81
|
+
const {
|
|
82
|
+
value,
|
|
83
|
+
type: valueType
|
|
84
|
+
} = detectMMKVType(instance, key);
|
|
85
|
+
return {
|
|
86
|
+
key,
|
|
87
|
+
value,
|
|
88
|
+
valueType
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
} catch {
|
|
92
|
+
// Instance unreadable — return it with no entries rather than failing
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
id,
|
|
96
|
+
encrypted,
|
|
97
|
+
readOnly,
|
|
98
|
+
entries
|
|
99
|
+
};
|
|
100
|
+
}),
|
|
101
|
+
"mmkv.set": params => {
|
|
102
|
+
const {
|
|
103
|
+
instanceId,
|
|
104
|
+
key,
|
|
105
|
+
value
|
|
106
|
+
} = params;
|
|
107
|
+
mmkvInstanceRegistry.get(instanceId)?.instance.set(key, value);
|
|
108
|
+
},
|
|
109
|
+
"mmkv.remove": params => {
|
|
110
|
+
const {
|
|
111
|
+
instanceId,
|
|
112
|
+
key
|
|
113
|
+
} = params;
|
|
114
|
+
const instance = mmkvInstanceRegistry.get(instanceId)?.instance;
|
|
115
|
+
// v4 renamed delete() to remove() — support both
|
|
116
|
+
if (instance?.remove) instance.remove(key);else instance?.delete?.(key);
|
|
117
|
+
},
|
|
118
|
+
// ── Remote SecureStore proxy ──
|
|
119
|
+
// Only registered keys are known (SecureStore has no enumeration API).
|
|
120
|
+
// Biometric-protected keys are never read — reads would fire an auth prompt.
|
|
121
|
+
"secure.keys": () => secureStoreRegistry.getAll().map(({
|
|
122
|
+
key,
|
|
123
|
+
options,
|
|
124
|
+
description
|
|
125
|
+
}) => ({
|
|
126
|
+
key,
|
|
127
|
+
description,
|
|
128
|
+
keychainService: options.keychainService,
|
|
129
|
+
requireAuthentication: options.requireAuthentication ?? false
|
|
130
|
+
})),
|
|
131
|
+
"secure.get": params => {
|
|
132
|
+
const {
|
|
133
|
+
key
|
|
134
|
+
} = params;
|
|
135
|
+
const entry = secureStoreRegistry.getAll().find(e => e.key === key);
|
|
136
|
+
const module = secureStoreRegistry.getModule();
|
|
137
|
+
if (!entry || !module || entry.options.requireAuthentication) {
|
|
138
|
+
return Promise.resolve(null);
|
|
139
|
+
}
|
|
140
|
+
return module.getItemAsync(key, entry.options);
|
|
141
|
+
},
|
|
142
|
+
"secure.delete": params => secureStoreRegistry.deleteValue(params.key)
|
|
61
143
|
}
|
|
62
144
|
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Expo SecureStore Registry
|
|
5
|
+
*
|
|
6
|
+
* SecureStore (iOS Keychain / Android KeyStore) has NO key-enumeration API —
|
|
7
|
+
* unlike AsyncStorage (`getAllKeys`) and MMKV (`getAllKeys()`), there is no way
|
|
8
|
+
* to ask "what's stored?". Apps must therefore register the keys they want
|
|
9
|
+
* visible in the Storage tool.
|
|
10
|
+
*
|
|
11
|
+
* The SecureStore module itself is passed in at registration (never imported
|
|
12
|
+
* here) — the same Metro-safe pattern as `registerMMKVInstance`: this package
|
|
13
|
+
* has zero dependency on `expo-secure-store`, so bare RN apps without it
|
|
14
|
+
* bundle fine.
|
|
15
|
+
*
|
|
16
|
+
* @module SecureStoreRegistry
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Subset of expo-secure-store's SecureStoreOptions that the tool tracks.
|
|
21
|
+
* `keychainService` MUST match what the value was written with, or reads
|
|
22
|
+
* return null. `requireAuthentication` keys trigger a biometric prompt on
|
|
23
|
+
* read, so the tool never auto-reads them.
|
|
24
|
+
*
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Structural type for the expo-secure-store module. Matches
|
|
30
|
+
* `import * as SecureStore from "expo-secure-store"` without depending on it.
|
|
31
|
+
*
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* A key to expose in the Storage tool: either a bare key name, or a key with
|
|
37
|
+
* the SecureStore options it was written with (+ optional description shown
|
|
38
|
+
* in the expanded card).
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Normalized info for a registered SecureStore key.
|
|
45
|
+
*
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
class SecureStoreRegistry {
|
|
50
|
+
module = null;
|
|
51
|
+
keys = new Map();
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Register the SecureStore module and the keys to expose. Callable multiple
|
|
55
|
+
* times — keys accumulate, the latest module wins.
|
|
56
|
+
*/
|
|
57
|
+
register(module, descriptors) {
|
|
58
|
+
this.module = module;
|
|
59
|
+
for (const d of descriptors) {
|
|
60
|
+
const entry = typeof d === "string" ? {
|
|
61
|
+
key: d,
|
|
62
|
+
options: {}
|
|
63
|
+
} : {
|
|
64
|
+
key: d.key,
|
|
65
|
+
description: d.description,
|
|
66
|
+
options: {
|
|
67
|
+
keychainService: d.keychainService,
|
|
68
|
+
requireAuthentication: d.requireAuthentication,
|
|
69
|
+
authenticationPrompt: d.authenticationPrompt
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
this.keys.set(entry.key, entry);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Remove a key from the registry (does not delete the stored value). */
|
|
77
|
+
unregister(key) {
|
|
78
|
+
this.keys.delete(key);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** The registered SecureStore module, or null if none registered yet. */
|
|
82
|
+
getModule() {
|
|
83
|
+
return this.module;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** All registered key entries. */
|
|
87
|
+
getAll() {
|
|
88
|
+
return Array.from(this.keys.values());
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Number of registered keys. */
|
|
92
|
+
count() {
|
|
93
|
+
return this.keys.size;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Delete a stored value via the registered module, using the options the
|
|
98
|
+
* key was registered with (required for keychainService-scoped keys).
|
|
99
|
+
*/
|
|
100
|
+
async deleteValue(key) {
|
|
101
|
+
const entry = this.keys.get(key);
|
|
102
|
+
if (!this.module || !entry) return;
|
|
103
|
+
await this.module.deleteItemAsync(key, entry.options);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Singleton registry instance (advanced usage — most apps only need
|
|
109
|
+
* {@link registerSecureStoreKeys}).
|
|
110
|
+
*/
|
|
111
|
+
export const secureStoreRegistry = new SecureStoreRegistry();
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Register Expo SecureStore keys with React Buoy DevTools.
|
|
115
|
+
*
|
|
116
|
+
* **⚠️ REQUIRED for SecureStore visibility**: SecureStore has no
|
|
117
|
+
* key-enumeration API, so the tool can only show keys you declare here.
|
|
118
|
+
* Pass the module itself so this package never has to import
|
|
119
|
+
* `expo-secure-store`.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```typescript
|
|
123
|
+
* import * as SecureStore from "expo-secure-store";
|
|
124
|
+
* import { registerSecureStoreKeys } from "@buoy-gg/storage";
|
|
125
|
+
*
|
|
126
|
+
* registerSecureStoreKeys(SecureStore, [
|
|
127
|
+
* "auth.token",
|
|
128
|
+
* { key: "session", keychainService: "com.myapp.auth" },
|
|
129
|
+
* // Never auto-read; shown as biometric-protected:
|
|
130
|
+
* { key: "pin", requireAuthentication: true },
|
|
131
|
+
* ]);
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
export function registerSecureStoreKeys(module, keys) {
|
|
135
|
+
secureStoreRegistry.register(module, keys);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Remove a key from the DevTools registry (the stored value is untouched).
|
|
140
|
+
*/
|
|
141
|
+
export function unregisterSecureStoreKey(key) {
|
|
142
|
+
secureStoreRegistry.unregister(key);
|
|
143
|
+
}
|
|
@@ -33,6 +33,8 @@ export type { AsyncStorageEvent, AsyncStorageEventListener, } from "./storage/ut
|
|
|
33
33
|
export type { MMKVEvent, MMKVEventListener, } from "./storage/utils/MMKVListener";
|
|
34
34
|
export type { MMKVInstanceInfo } from "./storage/utils/MMKVInstanceRegistry";
|
|
35
35
|
export { registerMMKVInstance, unregisterMMKVInstance, } from "./storage/utils/MMKVInstanceRegistry";
|
|
36
|
+
export { registerSecureStoreKeys, unregisterSecureStoreKey, } from "./storage/utils/SecureStoreRegistry";
|
|
37
|
+
export type { SecureStoreLike, SecureStoreKeyDescriptor, SecureStoreOptionsLike, } from "./storage/utils/SecureStoreRegistry";
|
|
36
38
|
export { storageSyncAdapter } from "./storage/sync/storageSyncAdapter";
|
|
37
39
|
/** @internal */
|
|
38
40
|
export { storageEventStore } from "./storage/stores/storageEventStore";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC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IStorageBrowser.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,gBAAgB,EACjB,MAAM,OAAO,CAAC;AAUf,OAAO,EAAkB,kBAAkB,EAAmB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"GameUIStorageBrowser.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/GameUIStorageBrowser.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,gBAAgB,EACjB,MAAM,OAAO,CAAC;AAUf,OAAO,EAAkB,kBAAkB,EAAmB,MAAM,UAAU,CAAC;AA4C/E,uCAAuC;AACvC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,UAAU,yBAAyB;IACjC,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC;IACvD,yCAAyC;IACzC,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACzB,kCAAkC;IAClC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,mBAAwB,EACxB,WAAmB,EACnB,eAA0C,EAC1C,eAAe,EACf,YAAY,EACZ,WAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,WAAW,GACZ,EAAE,yBAAyB,+BAkzB3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionActionBar.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/SelectionActionBar.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectionActionBar.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/SelectionActionBar.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C,UAAU,uBAAuB;IAC/B,4BAA4B;IAC5B,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,kCAAkC;IAClC,aAAa,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IACpD,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,gEAAgE;IAChE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,IAAI,CAAC;IAC9C,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,mCAAmC;IACnC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,kBAAkB,CAAC,EACjC,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,gBAAgB,GACjB,EAAE,uBAAuB,sCA+JzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageEventCard.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventCard.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,oCAAoC;AACpC,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,WAAW,GACX,QAAQ,GACR,OAAO,CAAC;AAEZ;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAU7D;AAED,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kCAAkC;IAClC,kBAAkB,EAAE,IAAI,CAAC;IACzB,uCAAuC;IACvC,YAAY,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IACpC,+EAA+E;IAC/E,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AAED,UAAU,qBAAqB;IAC7B,4BAA4B;IAC5B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAsDD,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"StorageEventCard.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageEventCard.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,oCAAoC;AACpC,MAAM,MAAM,gBAAgB,GACxB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,MAAM,GACN,WAAW,GACX,QAAQ,GACR,OAAO,CAAC;AAEZ;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAU7D;AAED,MAAM,WAAW,oBAAoB;IACnC,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kCAAkC;IAClC,kBAAkB,EAAE,IAAI,CAAC;IACzB,uCAAuC;IACvC,YAAY,EAAE,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IACpC,+EAA+E;IAC/E,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AAED,UAAU,qBAAqB;IAC7B,4BAA4B;IAC5B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,sCAAsC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAsDD,eAAO,MAAM,gBAAgB,6DA6B3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageFilterCards.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageFilterCards.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"StorageFilterCards.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageFilterCards.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAQpE,UAAU,uBAAuB;IAC/B,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;QACtB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;QACtB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACrD,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACzD;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,YAAoB,EACpB,cAAc,EACd,iBAAyB,EACzB,mBAAmB,GACpB,EAAE,uBAAuB,+BAuQzB"}
|
|
@@ -20,6 +20,6 @@ interface StorageKeyRowProps {
|
|
|
20
20
|
/** Toggle this key's pinned state */
|
|
21
21
|
onTogglePin?: (key: string) => void;
|
|
22
22
|
}
|
|
23
|
-
export declare
|
|
23
|
+
export declare const StorageKeyRow: import("react").NamedExoticComponent<StorageKeyRowProps>;
|
|
24
24
|
export {};
|
|
25
25
|
//# sourceMappingURL=StorageKeyRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageKeyRow.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StorageKeyRow.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyRow.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAyB1C,UAAU,kBAAkB;IAC1B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IAC/C,uCAAuC;IACvC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5E,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qCAAqC;IACrC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAgDD,eAAO,MAAM,aAAa,0DAuOxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMMKVInstances.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useMMKVInstances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"useMMKVInstances.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useMMKVInstances.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,sBAAsB;IAC9B,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,UAAQ,GAClB,sBAAsB,CAiExB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GACjB,oBAAoB,GAAG,IAAI,CA2B7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAajE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMMKVKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useMMKVKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useMMKVKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useMMKVKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAO9D,KAAK,IAAI,GAAG,GAAG,CAAC;AAEhB,UAAU,iBAAiB;IACzB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,MAAM,EAClB,mBAAmB,GAAE,kBAAkB,EAAO,GAC7C,iBAAiB,CA8LnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,KAAK,CAAC;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EAChD,mBAAmB,GAAE,kBAAkB,EAAO,GAC7C,iBAAiB,CAkJnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StorageKeyInfo } from "../types";
|
|
2
|
+
interface UseSecureStoreKeysResult {
|
|
3
|
+
storageKeys: StorageKeyInfo[];
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
error: Error | null;
|
|
6
|
+
refresh: () => Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Read all registered SecureStore keys into StorageKeyInfo[] for the browser.
|
|
10
|
+
*
|
|
11
|
+
* SecureStore has no enumeration API, so this only surfaces keys declared via
|
|
12
|
+
* `registerSecureStoreKeys()` (see SecureStoreRegistry). Values are read with
|
|
13
|
+
* the options each key was registered with (keychainService must match), and
|
|
14
|
+
* biometric-protected keys are listed without being read.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useSecureStoreKeys(): UseSecureStoreKeysResult;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useSecureStoreKeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSecureStoreKeys.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useSecureStoreKeys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAU1C,UAAU,wBAAwB;IAChC,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,wBAAwB,CA4F7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStorageEvents.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useStorageEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAC;AAGrC,YAAY,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,WAAW,uBAAuB;IACtC,6BAA6B;IAC7B,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IACvC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,uBAAuB;IACvB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,0DAA0D;IAC1D,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useStorageEvents.d.ts","sourceRoot":"","sources":["../../../../src/storage/hooks/useStorageEvents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAC;AAGrC,YAAY,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,WAAW,uBAAuB;IACtC,6BAA6B;IAC7B,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IACvC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,uBAAuB;IACvB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,0DAA0D;IAC1D,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CA8DxB"}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/** One MMKV entry in a `mmkv.snapshot` result. */
|
|
2
|
+
export interface MMKVSnapshotEntry {
|
|
3
|
+
key: string;
|
|
4
|
+
value: unknown;
|
|
5
|
+
valueType: string;
|
|
6
|
+
}
|
|
7
|
+
/** One MMKV instance in a `mmkv.snapshot` result. */
|
|
8
|
+
export interface MMKVSnapshotInstance {
|
|
9
|
+
id: string;
|
|
10
|
+
encrypted: boolean;
|
|
11
|
+
readOnly: boolean;
|
|
12
|
+
entries: MMKVSnapshotEntry[];
|
|
13
|
+
}
|
|
1
14
|
/**
|
|
2
15
|
* Sync adapter for the storage tool, consumed by @buoy-gg/external-sync's
|
|
3
16
|
* `useExternalSync` (structurally matches its ToolSyncAdapter interface so
|
|
@@ -26,6 +39,17 @@ export declare const storageSyncAdapter: {
|
|
|
26
39
|
"async.multiRemove": (params: unknown) => Promise<void>;
|
|
27
40
|
"async.multiSet": (params: unknown) => Promise<void>;
|
|
28
41
|
"async.clear": () => Promise<void>;
|
|
42
|
+
"mmkv.snapshot": () => MMKVSnapshotInstance[];
|
|
43
|
+
"mmkv.set": (params: unknown) => void;
|
|
44
|
+
"mmkv.remove": (params: unknown) => void;
|
|
45
|
+
"secure.keys": () => {
|
|
46
|
+
key: string;
|
|
47
|
+
description: string | undefined;
|
|
48
|
+
keychainService: string | undefined;
|
|
49
|
+
requireAuthentication: boolean;
|
|
50
|
+
}[];
|
|
51
|
+
"secure.get": (params: unknown) => Promise<string | null>;
|
|
52
|
+
"secure.delete": (params: unknown) => Promise<void>;
|
|
29
53
|
};
|
|
30
54
|
};
|
|
31
55
|
//# sourceMappingURL=storageSyncAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/storage/sync/storageSyncAdapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storageSyncAdapter.d.ts","sourceRoot":"","sources":["../../../../src/storage/sync/storageSyncAdapter.ts"],"names":[],"mappings":"AAgCA,kDAAkD;AAClD,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qDAAqD;AACrD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB;;;0BAaP,MAAM,IAAI;;;QAM9B,kEAAkE;;;mCAUjC,OAAO;kCAId,OAAO;kCAMP,OAAO;qCAIJ,OAAO;sCAEN,OAAO;mCAEV,OAAO;;+BAOb,oBAAoB,EAAE;6BAgBtB,OAAO;gCAIJ,OAAO;;;;;;;+BAkBR,OAAO;kCAWJ,OAAO;;CAGpC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expo SecureStore Registry
|
|
3
|
+
*
|
|
4
|
+
* SecureStore (iOS Keychain / Android KeyStore) has NO key-enumeration API —
|
|
5
|
+
* unlike AsyncStorage (`getAllKeys`) and MMKV (`getAllKeys()`), there is no way
|
|
6
|
+
* to ask "what's stored?". Apps must therefore register the keys they want
|
|
7
|
+
* visible in the Storage tool.
|
|
8
|
+
*
|
|
9
|
+
* The SecureStore module itself is passed in at registration (never imported
|
|
10
|
+
* here) — the same Metro-safe pattern as `registerMMKVInstance`: this package
|
|
11
|
+
* has zero dependency on `expo-secure-store`, so bare RN apps without it
|
|
12
|
+
* bundle fine.
|
|
13
|
+
*
|
|
14
|
+
* @module SecureStoreRegistry
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Subset of expo-secure-store's SecureStoreOptions that the tool tracks.
|
|
18
|
+
* `keychainService` MUST match what the value was written with, or reads
|
|
19
|
+
* return null. `requireAuthentication` keys trigger a biometric prompt on
|
|
20
|
+
* read, so the tool never auto-reads them.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export interface SecureStoreOptionsLike {
|
|
25
|
+
keychainService?: string;
|
|
26
|
+
requireAuthentication?: boolean;
|
|
27
|
+
authenticationPrompt?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Structural type for the expo-secure-store module. Matches
|
|
31
|
+
* `import * as SecureStore from "expo-secure-store"` without depending on it.
|
|
32
|
+
*
|
|
33
|
+
* @public
|
|
34
|
+
*/
|
|
35
|
+
export type SecureStoreLike = {
|
|
36
|
+
getItemAsync(key: string, options?: SecureStoreOptionsLike): Promise<string | null>;
|
|
37
|
+
setItemAsync(key: string, value: string, options?: SecureStoreOptionsLike): Promise<void>;
|
|
38
|
+
deleteItemAsync(key: string, options?: SecureStoreOptionsLike): Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A key to expose in the Storage tool: either a bare key name, or a key with
|
|
42
|
+
* the SecureStore options it was written with (+ optional description shown
|
|
43
|
+
* in the expanded card).
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
*/
|
|
47
|
+
export type SecureStoreKeyDescriptor = string | ({
|
|
48
|
+
key: string;
|
|
49
|
+
description?: string;
|
|
50
|
+
} & SecureStoreOptionsLike);
|
|
51
|
+
/**
|
|
52
|
+
* Normalized info for a registered SecureStore key.
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export interface SecureStoreKeyEntry {
|
|
57
|
+
key: string;
|
|
58
|
+
options: SecureStoreOptionsLike;
|
|
59
|
+
description?: string;
|
|
60
|
+
}
|
|
61
|
+
declare class SecureStoreRegistry {
|
|
62
|
+
private module;
|
|
63
|
+
private keys;
|
|
64
|
+
/**
|
|
65
|
+
* Register the SecureStore module and the keys to expose. Callable multiple
|
|
66
|
+
* times — keys accumulate, the latest module wins.
|
|
67
|
+
*/
|
|
68
|
+
register(module: SecureStoreLike, descriptors: SecureStoreKeyDescriptor[]): void;
|
|
69
|
+
/** Remove a key from the registry (does not delete the stored value). */
|
|
70
|
+
unregister(key: string): void;
|
|
71
|
+
/** The registered SecureStore module, or null if none registered yet. */
|
|
72
|
+
getModule(): SecureStoreLike | null;
|
|
73
|
+
/** All registered key entries. */
|
|
74
|
+
getAll(): SecureStoreKeyEntry[];
|
|
75
|
+
/** Number of registered keys. */
|
|
76
|
+
count(): number;
|
|
77
|
+
/**
|
|
78
|
+
* Delete a stored value via the registered module, using the options the
|
|
79
|
+
* key was registered with (required for keychainService-scoped keys).
|
|
80
|
+
*/
|
|
81
|
+
deleteValue(key: string): Promise<void>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Singleton registry instance (advanced usage — most apps only need
|
|
85
|
+
* {@link registerSecureStoreKeys}).
|
|
86
|
+
*/
|
|
87
|
+
export declare const secureStoreRegistry: SecureStoreRegistry;
|
|
88
|
+
/**
|
|
89
|
+
* Register Expo SecureStore keys with React Buoy DevTools.
|
|
90
|
+
*
|
|
91
|
+
* **⚠️ REQUIRED for SecureStore visibility**: SecureStore has no
|
|
92
|
+
* key-enumeration API, so the tool can only show keys you declare here.
|
|
93
|
+
* Pass the module itself so this package never has to import
|
|
94
|
+
* `expo-secure-store`.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* import * as SecureStore from "expo-secure-store";
|
|
99
|
+
* import { registerSecureStoreKeys } from "@buoy-gg/storage";
|
|
100
|
+
*
|
|
101
|
+
* registerSecureStoreKeys(SecureStore, [
|
|
102
|
+
* "auth.token",
|
|
103
|
+
* { key: "session", keychainService: "com.myapp.auth" },
|
|
104
|
+
* // Never auto-read; shown as biometric-protected:
|
|
105
|
+
* { key: "pin", requireAuthentication: true },
|
|
106
|
+
* ]);
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export declare function registerSecureStoreKeys(module: SecureStoreLike, keys: SecureStoreKeyDescriptor[]): void;
|
|
110
|
+
/**
|
|
111
|
+
* Remove a key from the DevTools registry (the stored value is untouched).
|
|
112
|
+
*/
|
|
113
|
+
export declare function unregisterSecureStoreKey(key: string): void;
|
|
114
|
+
export {};
|
|
115
|
+
//# sourceMappingURL=SecureStoreRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SecureStoreRegistry.d.ts","sourceRoot":"","sources":["../../../../src/storage/utils/SecureStoreRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5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gB,uBAAuB,CACrC,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,wBAAwB,EAAE,GAC/B,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/storage",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "storage package",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
],
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@buoy-gg/floating-tools-core": "
|
|
30
|
-
"@buoy-gg/shared-ui": "
|
|
29
|
+
"@buoy-gg/floating-tools-core": "6.0.0",
|
|
30
|
+
"@buoy-gg/shared-ui": "6.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@buoy-gg/license": "
|
|
33
|
+
"@buoy-gg/license": "6.0.0",
|
|
34
34
|
"@react-native-async-storage/async-storage": "^2.0.0 || ^3.1.0",
|
|
35
35
|
"react": "*",
|
|
36
36
|
"react-native": "*"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@types/react": "^19.1.0",
|
|
41
41
|
"@types/react-native": "^0.73.0",
|
|
42
42
|
"typescript": "~5.8.3",
|
|
43
|
-
"@buoy-gg/license": "
|
|
43
|
+
"@buoy-gg/license": "6.0.0"
|
|
44
44
|
},
|
|
45
45
|
"react-native-builder-bob": {
|
|
46
46
|
"source": "src",
|