@buoy-gg/storage 7.0.36 → 7.0.39

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 CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@buoy-gg/storage?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/storage) [![npm downloads](https://img.shields.io/npm/dm/@buoy-gg/storage?style=flat-square&labelColor=1c1c1c&color=10B981)](https://www.npmjs.com/package/@buoy-gg/storage)
4
4
 
5
- **Browse and edit every key-value pair your React Native app persists — AsyncStorage, MMKV, and SecureStore in one explorer with real-time updates.**
5
+ Browse and edit supported AsyncStorage, registered MMKV instances, and registered SecureStore keys inside your app.
6
6
 
7
- Part of [Buoy](https://github.com/Buoy-gg/buoy) — devtools that live inside your React Native app. Install it and it auto-appears in the floating menu from [`@buoy-gg/core`](https://www.npmjs.com/package/@buoy-gg/core).
7
+ Part of [Buoy](https://github.com/Buoy-gg/buoy). Install the package, complete account setup, and follow the integration steps below.
8
8
 
9
9
  ![Storage Explorer demo](https://github.com/user-attachments/assets/80ef1c60-d20c-4d8b-97e6-f37b21b315ea)
10
10
 
@@ -14,6 +14,24 @@ Part of [Buoy](https://github.com/Buoy-gg/buoy) — devtools that live inside yo
14
14
  npm install @buoy-gg/core @buoy-gg/storage
15
15
  ```
16
16
 
17
+ ## Before you start
18
+
19
+ Use a development build with `@buoy-gg/core` and a Free or Pro Buoy account key. From your app’s directory, sign in:
20
+
21
+ ```bash
22
+ npx --package=@buoy-gg/core buoy login
23
+ ```
24
+
25
+ For Expo, initialize Buoy before rendering the menu:
26
+
27
+ ```tsx
28
+ import { Buoy } from "@buoy-gg/core";
29
+
30
+ Buoy.init({ licenseKey: process.env.EXPO_PUBLIC_BUOY_KEY });
31
+ ```
32
+
33
+ The login command writes the Expo key to `.env.local`. For React Native CLI, pass the key from your app’s environment configuration; React Native does not load `.env.local` automatically. Mount `FloatingDevTools` inside the same providers as your screens and restart the development server after installation. The [Quick Start](https://buoy.gg/buoy/latest/docs/quick-start) shows the complete root component setup.
34
+
17
35
  ## Quick start
18
36
 
19
37
  AsyncStorage works out of the box. Render the floating menu once — the Storage Explorer is auto-discovered as soon as this package is installed:
@@ -55,6 +73,10 @@ registerSecureStoreKeys(SecureStore, [
55
73
  ]);
56
74
  ```
57
75
 
76
+ ## Check the integration
77
+
78
+ Use a disposable test key: read its value, edit it, read it from your app, then delete it. Register the MMKV instances your app actually uses and the SecureStore keys you want to inspect; those keys cannot be enumerated automatically.
79
+
58
80
  ## What you get
59
81
 
60
82
  - **Three backends, one explorer** — AsyncStorage, MMKV (multiple instances, including encrypted), and Expo SecureStore, with per-instance key counts and an instance switcher.
@@ -67,11 +89,11 @@ registerSecureStoreKeys(SecureStore, [
67
89
 
68
90
  ## Desktop & AI
69
91
 
70
- The same live session streams to [Buoy Desktop](https://github.com/Buoy-gg/Buoy-Desktop) (free, macOS/Windows/Linux) and to Claude Code or Cursor via the [Buoy MCP server](https://buoy.gg/buoy/latest/docs/mcp).
92
+ To connect a React Native app to [Buoy Desktop](https://github.com/Buoy-gg/Buoy-Desktop) or MCP, install `@buoy-gg/external-sync` and follow the [Desktop connection guide](https://buoy.gg/buoy/latest/docs/desktop). Sign in to Desktop separately. [MCP setup](https://buoy.gg/buoy/latest/docs/mcp) also requires a process account and Pro access. Available remote actions depend on the tool and app integration.
71
93
 
72
- ## Free vs Pro
94
+ ## Account and plan requirements
73
95
 
74
- Every tool is free. [Pro](https://buoy.gg/pricing) unlocks production builds, the MCP server, and unlimited capture. Every weekend, Pro features unlock free for anyone holding a key — including a free one (`npx buoy login`).
96
+ Use a Free or Pro Buoy account. History limits and paid features vary by tool; see [pricing](https://buoy.gg/pricing). Production access requires Pro where supported. Development-only hooks and actions remain unavailable in release builds.
75
97
 
76
98
  ---
77
99
 
@@ -203,14 +203,8 @@ function StorageKeyCard({
203
203
  })]
204
204
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
205
205
  style: styles.cardHeaderRight,
206
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
207
- accessibilityLabel: "Expand",
208
- accessibilityHint: "Expand storage key card",
209
- "sentry-label": `ignore storage key card ${storageKey.key} expand`,
210
- accessibilityRole: "button",
206
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
211
207
  style: styles.actionButton,
212
- onPress: onToggle,
213
- hitSlop: HIT_SLOP,
214
208
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Eye, {
215
209
  size: 12,
216
210
  color: _sharedUi.night.color.textSecondary
@@ -88,7 +88,13 @@ function StorageKeyDetailScreen({
88
88
  }
89
89
  const baseValue = lastWrittenRef.current ? lastWrittenRef.current.value : propParsed;
90
90
  const write = (0, _react.useCallback)(next => {
91
- const raw = JSON.stringify(next);
91
+ // A string is stored AS ITSELF. `JSON.stringify` on a string adds
92
+ // quotes the backend keeps (AsyncStorage) or shows natively (MMKV), and
93
+ // they compound on every edit: "hello" → "\"hello\"" → ... The old
94
+ // scalar editor had this rule (serializeScalar); the live editor must
95
+ // keep it, and it matches propRaw above, so an echo still reads as
96
+ // caught up.
97
+ const raw = typeof next === "string" ? next : JSON.stringify(next);
92
98
  lastWrittenRef.current = {
93
99
  raw,
94
100
  value: next
@@ -210,6 +216,7 @@ function StorageKeyDetailScreen({
210
216
  children: "Storage:"
211
217
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.PillBadge, {
212
218
  color: (0, _StorageKeyRow.getStorageTypeColor)(storageKey.storageType),
219
+ testID: `${DETAIL_ID}-backend`,
213
220
  children: storageTypeLabel
214
221
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
215
222
  style: styles.infoDim,
@@ -200,14 +200,8 @@ export function StorageKeyCard({
200
200
  })]
201
201
  }), /*#__PURE__*/_jsx(View, {
202
202
  style: styles.cardHeaderRight,
203
- children: /*#__PURE__*/_jsx(TouchableOpacity, {
204
- accessibilityLabel: "Expand",
205
- accessibilityHint: "Expand storage key card",
206
- "sentry-label": `ignore storage key card ${storageKey.key} expand`,
207
- accessibilityRole: "button",
203
+ children: /*#__PURE__*/_jsx(View, {
208
204
  style: styles.actionButton,
209
- onPress: onToggle,
210
- hitSlop: HIT_SLOP,
211
205
  children: /*#__PURE__*/_jsx(Eye, {
212
206
  size: 12,
213
207
  color: night.color.textSecondary
@@ -86,7 +86,13 @@ export function StorageKeyDetailScreen({
86
86
  }
87
87
  const baseValue = lastWrittenRef.current ? lastWrittenRef.current.value : propParsed;
88
88
  const write = useCallback(next => {
89
- const raw = JSON.stringify(next);
89
+ // A string is stored AS ITSELF. `JSON.stringify` on a string adds
90
+ // quotes the backend keeps (AsyncStorage) or shows natively (MMKV), and
91
+ // they compound on every edit: "hello" → "\"hello\"" → ... The old
92
+ // scalar editor had this rule (serializeScalar); the live editor must
93
+ // keep it, and it matches propRaw above, so an echo still reads as
94
+ // caught up.
95
+ const raw = typeof next === "string" ? next : JSON.stringify(next);
90
96
  lastWrittenRef.current = {
91
97
  raw,
92
98
  value: next
@@ -208,6 +214,7 @@ export function StorageKeyDetailScreen({
208
214
  children: "Storage:"
209
215
  }), /*#__PURE__*/_jsx(PillBadge, {
210
216
  color: getStorageTypeColor(storageKey.storageType),
217
+ testID: `${DETAIL_ID}-backend`,
211
218
  children: storageTypeLabel
212
219
  }), /*#__PURE__*/_jsx(Text, {
213
220
  style: styles.infoDim,
@@ -1 +1 @@
1
- {"version":3,"file":"StorageKeyCard.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyCard.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AA8B1C,UAAU,mBAAmB;IAC3B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAiED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,UAAU,EACV,QAAQ,GACT,EAAE,mBAAmB,+BAiMrB"}
1
+ {"version":3,"file":"StorageKeyCard.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyCard.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AA8B1C,UAAU,mBAAmB;IAC3B,UAAU,EAAE,cAAc,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAiED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,UAAU,EACV,QAAQ,GACT,EAAE,mBAAmB,+BA4LrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"StorageKeyDetailScreen.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyDetailScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAgCH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAwC/C,UAAU,2BAA2B;IACnC,UAAU,EAAE,cAAc,CAAC;IAC3B,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,MAAM,EACN,aAAa,EACb,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,EAAE,2BAA2B,+BAyV7B"}
1
+ {"version":3,"file":"StorageKeyDetailScreen.d.ts","sourceRoot":"","sources":["../../../../src/storage/components/StorageKeyDetailScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAgCH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAwC/C,UAAU,2BAA2B;IACnC,UAAU,EAAE,cAAc,CAAC;IAC3B,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,cAAc,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,MAAM,EACN,aAAa,EACb,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,EAAE,2BAA2B,+BAkW7B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@buoy-gg/storage",
3
- "version": "7.0.36",
4
- "description": "Browse & edit AsyncStorage, MMKV & SecureStore inside your React Native app, with change history. Part of Buoy devtools.",
3
+ "version": "7.0.39",
4
+ "description": "Inspect supported AsyncStorage data, registered MMKV instances and registered SecureStore keys in a React Native app.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
7
7
  "types": "lib/typescript/index.d.ts",
@@ -29,11 +29,11 @@
29
29
  "**/snapshotProvider.ts"
30
30
  ],
31
31
  "dependencies": {
32
- "@buoy-gg/floating-tools-core": "^7.0.36",
33
- "@buoy-gg/shared-ui": "^7.0.36"
32
+ "@buoy-gg/floating-tools-core": "^7.0.39",
33
+ "@buoy-gg/shared-ui": "^7.0.39"
34
34
  },
35
35
  "peerDependencies": {
36
- "@buoy-gg/license": "7.0.36",
36
+ "@buoy-gg/license": "7.0.39",
37
37
  "@react-native-async-storage/async-storage": "^2.0.0 || ^3.1.0",
38
38
  "react": "*",
39
39
  "react-native": "*"
@@ -43,7 +43,7 @@
43
43
  "@types/react": "^19.1.0",
44
44
  "@types/react-native": "^0.73.0",
45
45
  "typescript": "~5.8.3",
46
- "@buoy-gg/license": "^7.0.36"
46
+ "@buoy-gg/license": "^7.0.39"
47
47
  },
48
48
  "react-native-builder-bob": {
49
49
  "source": "src",