@rozenite/storage-plugin 1.8.1 → 1.10.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 +34 -0
- package/README.md +23 -0
- package/dist/devtools/assets/panel-Bm-SWF7d.js +33 -0
- package/dist/devtools/assets/panel-DIqI4WSp.css +1 -0
- package/dist/devtools/panel.html +2 -2
- package/dist/react-native/chunks/index.require.cjs +1 -1
- package/dist/react-native/chunks/index.require.js +43 -57
- package/dist/react-native/chunks/useRozeniteStoragePlugin.require.cjs +1 -1
- package/dist/react-native/chunks/useRozeniteStoragePlugin.require.js +253 -191
- package/dist/react-native/index.d.ts +29 -6
- package/dist/rozenite.json +1 -1
- package/dist/sdk/index.d.ts +1 -0
- package/package.json +9 -6
- package/src/react-native/__tests__/import.test.ts +182 -0
- package/src/react-native/adapters/__tests__/mmkv.test.ts +436 -0
- package/src/react-native/adapters/mmkv.ts +65 -39
- package/src/react-native/import.ts +67 -0
- package/src/react-native/storage-view.ts +16 -8
- package/src/react-native/useRozeniteStoragePlugin.ts +61 -36
- package/src/shared/__tests__/snapshot.test.ts +361 -0
- package/src/shared/messaging.ts +25 -1
- package/src/shared/snapshot.ts +276 -0
- package/src/shared/types.ts +1 -0
- package/src/ui/__tests__/binary-value-editor-state.test.ts +199 -0
- package/src/ui/__tests__/binary.test.ts +251 -0
- package/src/ui/__tests__/type-conversion.test.ts +123 -0
- package/src/ui/add-entry-dialog.tsx +83 -173
- package/src/ui/binary-value-editor-state.ts +125 -0
- package/src/ui/binary-value-editor.tsx +168 -0
- package/src/ui/binary.ts +123 -0
- package/src/ui/edit-entry-dialog.tsx +64 -161
- package/src/ui/editable-table.tsx +12 -10
- package/src/ui/editor-switcher.tsx +62 -0
- package/src/ui/entry-detail-dialog.tsx +14 -6
- package/src/ui/import-dialog.tsx +261 -0
- package/src/ui/panel.tsx +257 -57
- package/src/ui/type-conversion.ts +105 -0
- package/src/ui/typed-value-editor.tsx +96 -0
- package/src/ui/utils.ts +30 -0
- package/dist/devtools/assets/panel-DMhXYHH4.css +0 -1
- package/dist/devtools/assets/panel-eGOuOVos.js +0 -22
- package/src/react-native/is-garbled.ts +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @rozenite/storage-plugin
|
|
2
2
|
|
|
3
|
+
## 1.10.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#262](https://github.com/callstackincubator/rozenite/pull/262) [`ea2d273`](https://github.com/callstackincubator/rozenite/commit/ea2d273c7cdb53d3cc8ffc00874cfdacb0972d90) Thanks [@burczu](https://github.com/burczu)! - Add a hex-first UI for binary (`buffer`) storage entries.
|
|
8
|
+
|
|
9
|
+
The table cell now shows a short hex preview plus byte count, the detail dialog renders a standard hexdump with offsets and ASCII column, and the add/edit dialogs replace the JSON array textarea with a CodeMirror editor. The editor offers Hex (default) and Base64 modes, normalizes pasted content (raw hex, grouped hex, multiline hex, hexdump rows with offsets/ASCII columns) immediately, and surfaces byte count, ASCII preview, and validation errors below the input. The internal protocol is unchanged: `buffer` values still flow through the existing `number[]` write path.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies []:
|
|
14
|
+
- @rozenite/agent-bridge@1.10.0
|
|
15
|
+
- @rozenite/agent-shared@1.10.0
|
|
16
|
+
- @rozenite/plugin-bridge@1.10.0
|
|
17
|
+
|
|
18
|
+
## 1.9.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- [#246](https://github.com/callstackincubator/rozenite/pull/246) [`3957bfc`](https://github.com/callstackincubator/rozenite/commit/3957bfc4978116a69bd642e93ae0b9cc5caad4f9) Thanks [@V3RON](https://github.com/V3RON)! - Use `@rozenite/storage-plugin` for MMKV instead of `@rozenite/mmkv-plugin`.
|
|
23
|
+
|
|
24
|
+
The storage plugin now supports MMKV v3 and v4 and lets you blacklist keys across storages with one pattern.
|
|
25
|
+
|
|
26
|
+
- [#261](https://github.com/callstackincubator/rozenite/pull/261) [`328dba7`](https://github.com/callstackincubator/rozenite/commit/328dba7c347a99eec5a82cb2592690d66f30a451) Thanks [@burczu](https://github.com/burczu)! - Add storage-level JSON import/export to the storage plugin.
|
|
27
|
+
|
|
28
|
+
You can now export the currently selected storage to a versioned JSON snapshot and import a snapshot back as an upsert. Import validates the file before writing and rejects entries whose types are not supported by the target storage. See the storage plugin docs for the schema and behavior.
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies []:
|
|
33
|
+
- @rozenite/agent-bridge@1.9.0
|
|
34
|
+
- @rozenite/agent-shared@1.9.0
|
|
35
|
+
- @rozenite/plugin-bridge@1.9.0
|
|
36
|
+
|
|
3
37
|
## 1.8.1
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ const storages = [
|
|
|
32
32
|
user: userStorage,
|
|
33
33
|
cache: cacheStorage,
|
|
34
34
|
},
|
|
35
|
+
blacklist: /user:token|cache:.*Binary.*/,
|
|
35
36
|
}),
|
|
36
37
|
createAsyncStorageAdapter({
|
|
37
38
|
storage: AsyncStorage,
|
|
@@ -45,6 +46,27 @@ const storages = [
|
|
|
45
46
|
useRozeniteStoragePlugin({ storages });
|
|
46
47
|
```
|
|
47
48
|
|
|
49
|
+
### MMKV v3 and v4
|
|
50
|
+
|
|
51
|
+
`createMMKVStorageAdapter` supports both:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// v3 style: array or named storages
|
|
55
|
+
createMMKVStorageAdapter({
|
|
56
|
+
storages: [userStorage, cacheStorage],
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// v4 style: named storages only
|
|
60
|
+
createMMKVStorageAdapter({
|
|
61
|
+
storages: {
|
|
62
|
+
user: userStorage,
|
|
63
|
+
cache: cacheStorage,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
MMKV v4 requires a record of storage IDs because the storage instance no longer exposes an `id` that the plugin can derive from an array item.
|
|
69
|
+
|
|
48
70
|
### AsyncStorage v2 and v3
|
|
49
71
|
|
|
50
72
|
`createAsyncStorageAdapter` supports both:
|
|
@@ -81,3 +103,4 @@ When you use [Rozenite for Web](https://rozenite.dev/docs/rozenite-for-web) in d
|
|
|
81
103
|
- Type support is enforced in UI, runtime and Agent tools.
|
|
82
104
|
- Storages without subscriptions automatically use internal polling updates.
|
|
83
105
|
- Per-storage blacklists are supported through adapter configuration.
|
|
106
|
+
- Storage snapshots can be exported to and imported from a versioned JSON file from the panel. See the [storage plugin docs](https://www.rozenite.dev/docs/official-plugins/storage) for the schema and behavior.
|