react-native-storage-inspector 1.0.4 → 1.0.5

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.
Files changed (2) hide show
  1. package/README.md +27 -56
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # react-native-storage-inspector
2
2
 
3
- react-native-storage-inspector is a plug-and-play developer tool that empowers you to browse, search, and edit all your apps persisted data.
3
+ react-native-storage-inspector is a plug-and-play developer tool that empowers you to browse, search, and edit all your app's persisted data.
4
4
 
5
5
  ## Supported libraries
6
6
 
@@ -15,22 +15,13 @@ Tabs appear only when the corresponding package is installed (optional peer depe
15
15
 
16
16
  ## Installation
17
17
 
18
- Install the inspector and at least one storage library you use:
19
-
20
18
  ```bash
21
19
  npm install react-native-storage-inspector
22
- # And one or more:
23
- npm install react-native-mmkv
24
- npm install @react-native-async-storage/async-storage
25
- npm install react-native-keychain
26
- npm install expo-secure-store
27
20
  ```
28
21
 
29
- ## Usage
30
-
31
- Use `StorageInspector` as a **full-page component**. It renders only the content area, no header, back button, or status bar. The consumer screen must handle those.
22
+ Then install one or more storage libraries above. See [Installation docs](website/docs/installation.md) for yarn/pnpm and peer dependency notes.
32
23
 
33
- Put it in a screen with `flex: 1`, and wrap with `SafeAreaView` (or your nav's safe area) so it respects status bar and notches.
24
+ ## Usage
34
25
 
35
26
  ```tsx
36
27
  import { SafeAreaView } from 'react-native';
@@ -45,67 +36,47 @@ export function StorageInspectorScreen() {
45
36
  }
46
37
  ```
47
38
 
48
- The component fills its container. The consumer is responsible for header, back button, and status bar (via SafeAreaView or your navigation setup).
49
-
50
- ### Props
51
-
52
- | Prop | Type | Description |
53
- | ----------------- | ------------------- | ------------------------------------------------------------------------------------------------- |
54
- | `mmkvInstances` | `MMKV[]` | **Required for MMKV.** Pass your MMKV instances to inspect. |
55
- | `secureStoreKeys` | `string[]` | Optional. Known keys for Secure Store (no list API). Merged with keys persisted by the inspector. |
56
- | `customAdapters` | `IStorageAdapter[]` | Optional. Custom adapters for other storages. |
39
+ The component fills its container. Wrap with `SafeAreaView` and provide a header/back button via your navigation setup.
57
40
 
58
- ## Expo
41
+ For full usage, props, Expo support, custom adapters, and troubleshooting: see the **[Documentation](#documentation)** section below.
59
42
 
60
- - **Expo Go**: Async Storage and Expo Secure Store work. MMKV and Keychain need native code and are not available in Expo Go.
61
- - **Development build**: All four storages work with `expo-dev-client`.
43
+ ## Documentation
62
44
 
63
- ## Troubleshooting
45
+ Full docs are built with [Docusaurus](https://docusaurus.io) and cover installation, usage, all supported storages, API reference, Expo, custom adapters, troubleshooting, and examples:
64
46
 
65
- If you see **"Requiring unknown module"** for optional storage packages (AsyncStorage, Keychain, Secure Store), add to your `metro.config.js`:
66
-
67
- ```js
68
- const { getDefaultConfig } = require('expo/metro-config');
69
- const config = getDefaultConfig(__dirname);
70
- config.transformer ??= {};
71
- config.transformer.allowOptionalDependencies = true;
72
- module.exports = config;
47
+ ```bash
48
+ cd website && npm install && npm run start
73
49
  ```
74
50
 
75
- ## API (for custom adapters)
51
+ Key pages (also readable as Markdown in [`website/docs/`](website/docs/)):
76
52
 
77
- Implement `IStorageAdapter` and pass it via `customAdapters`:
53
+ | Topic | File |
54
+ | --------------- | ------------------------------------------------------------------ |
55
+ | Installation | [website/docs/installation.md](website/docs/installation.md) |
56
+ | Usage & props | [website/docs/usage.md](website/docs/usage.md) |
57
+ | Storages | [website/docs/storages/](website/docs/storages/) |
58
+ | API reference | [website/docs/api/](website/docs/api/) |
59
+ | Expo | [website/docs/expo.md](website/docs/expo.md) |
60
+ | Custom adapters | [website/docs/custom-adapters.md](website/docs/custom-adapters.md) |
61
+ | Troubleshooting | [website/docs/troubleshooting.md](website/docs/troubleshooting.md) |
62
+ | Examples | [website/docs/examples.md](website/docs/examples.md) |
78
63
 
79
- ```ts
80
- interface IStorageAdapter {
81
- type: string;
82
- name: string;
83
- getAllKeys(): Promise<string[]>;
84
- getItem(key: string): Promise<string | null>;
85
- setItem(key: string, value: string): Promise<void>;
86
- removeItem(key: string): Promise<void>;
87
- isAvailable(): boolean;
88
- }
89
- ```
64
+ ## Development & Contributing
65
+
66
+ See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for setup, git hooks, commit format, CI, and PR process.
90
67
 
91
- ## Development
68
+ Key commands:
92
69
 
93
70
  ```bash
94
- npm run commit # Guided commit (Commitizen) – prompts for type, scope, message
71
+ npm run commit # Guided commit (Commitizen)
95
72
  npm run format # Format all files with Prettier
96
- npm run format:check # Check formatting (fails if any file is unformatted)
97
- npm run lint # Same as format:check
98
73
  npm test # Run tests
99
74
  npm run build # Build src/ to dist/
100
75
  ```
101
76
 
102
- - **Commits:** Use `npm run commit` for guided [Conventional Commits](https://www.conventionalcommits.org/), or write messages by hand; **Commitlint** (via `commit-msg` hook) enforces the format.
103
- - **Formatting:** Run `npm run format` to fix. **Pre-commit** runs `format:check`.
104
- - **Releases:** Version and npm publish are automated by **semantic-release** on push to `main`. See [docs/RELEASES.md](docs/RELEASES.md) for Commitizen, Commitlint, and semantic-release in detail.
105
-
106
- See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for full guidelines. [Code of Conduct](docs/CODE_OF_CONDUCT.md).
77
+ Releases are automated by **semantic-release** on push to `main`. See [docs/RELEASES.md](docs/RELEASES.md).
107
78
 
108
- For AI assistants: see [ai/PRIMER.md](ai/PRIMER.md).
79
+ [Code of Conduct](docs/CODE_OF_CONDUCT.md) · For AI assistants: [ai/PRIMER.md](ai/PRIMER.md)
109
80
 
110
81
  ## License
111
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-storage-inspector",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Storage inspector for React Native and Expo: MMKV, AsyncStorage, Keychain, Expo Secure Store",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",