@rozenite/storage-plugin 1.4.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/CHANGELOG.md +28 -0
- package/LICENSE +20 -0
- package/README.md +77 -0
- package/dist/assets/panel-C7usUotG.js +22 -0
- package/dist/assets/panel-DMhXYHH4.css +1 -0
- package/dist/panel.html +31 -0
- package/dist/react-native.cjs +1 -0
- package/dist/react-native.d.ts +4 -0
- package/dist/react-native.js +200 -0
- package/dist/rozenite.config.d.ts +7 -0
- package/dist/rozenite.json +1 -0
- package/dist/src/react-native/adapters/async-storage.d.ts +33 -0
- package/dist/src/react-native/adapters/index.d.ts +6 -0
- package/dist/src/react-native/adapters/mmkv.d.ts +13 -0
- package/dist/src/react-native/adapters/secure-storage.d.ts +18 -0
- package/dist/src/react-native/is-garbled.d.ts +1 -0
- package/dist/src/react-native/storage-view.d.ts +19 -0
- package/dist/src/react-native/useRozeniteStoragePlugin.d.ts +6 -0
- package/dist/src/shared/messaging.d.ts +29 -0
- package/dist/src/shared/types.d.ts +60 -0
- package/dist/src/ui/add-entry-dialog.d.ts +9 -0
- package/dist/src/ui/confirm-dialog.d.ts +11 -0
- package/dist/src/ui/edit-entry-dialog.d.ts +9 -0
- package/dist/src/ui/editable-table.d.ts +10 -0
- package/dist/src/ui/entry-detail-dialog.d.ts +8 -0
- package/dist/src/ui/panel.d.ts +1 -0
- package/dist/types.cjs +1 -0
- package/dist/types.js +11 -0
- package/dist/useRozeniteStoragePlugin.cjs +1 -0
- package/dist/useRozeniteStoragePlugin.js +212 -0
- package/package.json +59 -0
- package/postcss.config.js +6 -0
- package/react-native.ts +40 -0
- package/rozenite.config.ts +8 -0
- package/src/css-modules.d.ts +4 -0
- package/src/react-native/adapters/async-storage.ts +115 -0
- package/src/react-native/adapters/index.ts +19 -0
- package/src/react-native/adapters/mmkv.ts +187 -0
- package/src/react-native/adapters/secure-storage.ts +76 -0
- package/src/react-native/is-garbled.ts +17 -0
- package/src/react-native/storage-view.ts +245 -0
- package/src/react-native/useRozeniteStoragePlugin.ts +162 -0
- package/src/shared/messaging.ts +37 -0
- package/src/shared/types.ts +66 -0
- package/src/ui/add-entry-dialog.tsx +310 -0
- package/src/ui/confirm-dialog.tsx +100 -0
- package/src/ui/edit-entry-dialog.tsx +280 -0
- package/src/ui/editable-table.tsx +298 -0
- package/src/ui/entry-detail-dialog.tsx +220 -0
- package/src/ui/globals.css +123 -0
- package/src/ui/panel.tsx +442 -0
- package/tailwind.config.ts +94 -0
- package/tsconfig.json +36 -0
- package/vite.config.ts +20 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @rozenite/storage-plugin
|
|
2
|
+
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#184](https://github.com/callstackincubator/rozenite/pull/184) [`c447f1e`](https://github.com/callstackincubator/rozenite/commit/c447f1ebe2065b9700de6b4e9d3c4b2b4310b00f) Thanks [@V3RON](https://github.com/V3RON)! - Introduce `@rozenite/storage-plugin` as a generic storage inspector for React Native devtools.
|
|
8
|
+
|
|
9
|
+
User-facing changes:
|
|
10
|
+
- Add `useRozeniteStoragePlugin({ storages })` API for registering one or more adapters.
|
|
11
|
+
- Support named storages across adapters so multiple independent stores can be inspected in a single plugin panel.
|
|
12
|
+
- Provide built-in adapters for MMKV, AsyncStorage (including v2 and v3-style usage), and Expo SecureStore.
|
|
13
|
+
- Improve entry workflows in the panel by prefilling the key when an entry is selected, making update/delete actions faster.
|
|
14
|
+
- Add official documentation for the new Storage plugin and guide users from MMKV docs toward the generic plugin path.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies []:
|
|
19
|
+
- @rozenite/plugin-bridge@1.4.0
|
|
20
|
+
|
|
21
|
+
## 0.1.0
|
|
22
|
+
|
|
23
|
+
- Initial release.
|
|
24
|
+
- Added generic storage plugin with sync/async adapters.
|
|
25
|
+
- Added MMKV, AsyncStorage and Expo SecureStore adapter factories.
|
|
26
|
+
- Added capabilities-aware UI and runtime validation.
|
|
27
|
+
- Added per-storage blacklist support.
|
|
28
|
+
- Added MCP tools for listing, reading and mutating entries.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Szymon Chmal
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
### A Rozenite plugin for inspecting multiple storage backends in React Native DevTools.
|
|
4
|
+
|
|
5
|
+
The Storage Plugin provides a single inspector for sync and async storages, including MMKV, AsyncStorage and Expo SecureStore via adapters.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @rozenite/storage-plugin
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Optional peers depending on adapters you use:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install react-native-mmkv @react-native-async-storage/async-storage expo-secure-store
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
createAsyncStorageAdapter,
|
|
24
|
+
createMMKVStorageAdapter,
|
|
25
|
+
createExpoSecureStorageAdapter,
|
|
26
|
+
useRozeniteStoragePlugin,
|
|
27
|
+
} from '@rozenite/storage-plugin';
|
|
28
|
+
|
|
29
|
+
const storages = [
|
|
30
|
+
createMMKVStorageAdapter({
|
|
31
|
+
storages: {
|
|
32
|
+
user: userStorage,
|
|
33
|
+
cache: cacheStorage,
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
createAsyncStorageAdapter({
|
|
37
|
+
storage: AsyncStorage,
|
|
38
|
+
}),
|
|
39
|
+
createExpoSecureStorageAdapter({
|
|
40
|
+
storage: SecureStore,
|
|
41
|
+
keys: ['token', 'session'],
|
|
42
|
+
}),
|
|
43
|
+
];
|
|
44
|
+
|
|
45
|
+
useRozeniteStoragePlugin({ storages });
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### AsyncStorage v2 and v3
|
|
49
|
+
|
|
50
|
+
`createAsyncStorageAdapter` supports both:
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
// v2 style: single storage object
|
|
54
|
+
createAsyncStorageAdapter({
|
|
55
|
+
storage: AsyncStorage,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// v3 style: named storage instances
|
|
59
|
+
createAsyncStorageAdapter({
|
|
60
|
+
storages: {
|
|
61
|
+
auth: authStorageInstance,
|
|
62
|
+
cache: {
|
|
63
|
+
storage: cacheStorageInstance,
|
|
64
|
+
name: 'Cache Instance',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`createExpoAsyncStorageAdapter` is still exported as a backward-compatible alias.
|
|
71
|
+
|
|
72
|
+
## Notes
|
|
73
|
+
|
|
74
|
+
- Unsupported value types are disabled in UI create/edit flows.
|
|
75
|
+
- Type support is enforced in UI, runtime and MCP tools.
|
|
76
|
+
- Storages without subscriptions automatically use internal polling updates.
|
|
77
|
+
- Per-storage blacklists are supported through adapter configuration.
|