@devraj-labs/rn-storage-kit 0.1.0 → 0.2.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 +5 -45
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -5
- package/src/index.ts +0 -2
package/README.md
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# rn-storage-kit
|
|
2
2
|
|
|
3
|
-
A React Native storage library with a unified adapter interface
|
|
3
|
+
A React Native storage library with a unified adapter interface and structured logging.
|
|
4
4
|
|
|
5
5
|
- **MMKV** for regular key-value storage
|
|
6
6
|
- **Keychain** for sensitive values (tokens, passwords)
|
|
7
7
|
- **Logger** with levels, TTL, MMKV persistence, and production safety
|
|
8
|
-
- **Debug UI** — floating panel and full-screen inspector, dev-only
|
|
9
8
|
|
|
10
9
|
---
|
|
11
10
|
|
|
@@ -149,42 +148,6 @@ Logs are persisted across Metro fast-refresh in a dedicated MMKV instance (`rn-s
|
|
|
149
148
|
|
|
150
149
|
---
|
|
151
150
|
|
|
152
|
-
## Debug UI
|
|
153
|
-
|
|
154
|
-
Two components are exported. Both render `null` in production (`!__DEV__`).
|
|
155
|
-
|
|
156
|
-
### `StorageDebugPanel`
|
|
157
|
-
|
|
158
|
-
Floating action button (FAB) that opens a slide-up modal showing the live log stream.
|
|
159
|
-
|
|
160
|
-
```tsx
|
|
161
|
-
import { StorageDebugPanel } from '@devraj-labs/rn-storage-kit';
|
|
162
|
-
|
|
163
|
-
// Place outside your ScrollView, at the root of the screen
|
|
164
|
-
<StorageDebugPanel />
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Features: live log list, clear button, colour-coded by adapter and error state, secure entries shown in purple with masked values.
|
|
168
|
-
|
|
169
|
-
### `StorageDebugScreen`
|
|
170
|
-
|
|
171
|
-
Full-featured debug screen with two tabs.
|
|
172
|
-
|
|
173
|
-
```tsx
|
|
174
|
-
import { StorageDebugScreen } from '@devraj-labs/rn-storage-kit';
|
|
175
|
-
|
|
176
|
-
<StorageDebugScreen />
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
| Tab | Features |
|
|
180
|
-
|-----|----------|
|
|
181
|
-
| **Logs** | Live log stream, search by key/operation/error, toggle newest/oldest sort, clear |
|
|
182
|
-
| **MMKV Data** | Browse all keys and values in the default MMKV store, tap to expand, refresh, clear |
|
|
183
|
-
|
|
184
|
-
Secure (Keychain) data is intentionally excluded from the MMKV Data tab.
|
|
185
|
-
|
|
186
|
-
---
|
|
187
|
-
|
|
188
151
|
## API reference
|
|
189
152
|
|
|
190
153
|
### `MMKVStorageAdapter`
|
|
@@ -219,13 +182,10 @@ Same interface as `MMKVStorageAdapter`. Backed by Keychain via `setGenericPasswo
|
|
|
219
182
|
|
|
220
183
|
```
|
|
221
184
|
src/
|
|
222
|
-
mmkv-storage/
|
|
223
|
-
secure-storage/
|
|
224
|
-
logger/
|
|
225
|
-
|
|
226
|
-
storage-debug-panel/ FAB + modal log viewer
|
|
227
|
-
storage-debug-screen/ Full debug screen (data tab + logs tab)
|
|
228
|
-
index.ts Public barrel
|
|
185
|
+
mmkv-storage/ MMKVStorageAdapter + TStorageAdapter type
|
|
186
|
+
secure-storage/ SecureStorageAdapter (Keychain-backed)
|
|
187
|
+
logger/ Logger state, enableLogger, log levels, MMKV persistence
|
|
188
|
+
index.ts Public barrel
|
|
229
189
|
```
|
|
230
190
|
|
|
231
191
|
---
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAGjC,cAAc,UAAU,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AAGjC,cAAc,UAAU,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,4 @@ __exportStar(require("./mmkv-storage"), exports);
|
|
|
21
21
|
__exportStar(require("./secure-storage"), exports);
|
|
22
22
|
// ─── Logger ────────────────────────────────────────────────────────────────────
|
|
23
23
|
__exportStar(require("./logger"), exports);
|
|
24
|
-
// ─── Debug UI ──────────────────────────────────────────────────────────────────
|
|
25
|
-
__exportStar(require("./debug"), exports);
|
|
26
24
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kFAAkF;AAClF,0CAAwB;AAExB,kFAAkF;AAClF,iDAA+B;AAC/B,mDAAiC;AAEjC,kFAAkF;AAClF,2CAAyB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kFAAkF;AAClF,0CAAwB;AAExB,kFAAkF;AAClF,iDAA+B;AAC/B,mDAAiC;AAEjC,kFAAkF;AAClF,2CAAyB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devraj-labs/rn-storage-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Unified storage API for React Native — wraps AsyncStorage and react-native-keychain with the same interface",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -56,8 +56,5 @@
|
|
|
56
56
|
"type": "git",
|
|
57
57
|
"url": "https://github.com/devraj-labs/rn-storage-kit.git"
|
|
58
58
|
},
|
|
59
|
-
"license": "MIT"
|
|
60
|
-
"dependencies": {
|
|
61
|
-
"@devraj-labs/vajra-ui-core": "^2.0.1"
|
|
62
|
-
}
|
|
59
|
+
"license": "MIT"
|
|
63
60
|
}
|
package/src/index.ts
CHANGED