@mushi-mushi/react-native 0.19.1 → 0.19.2
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 +13 -0
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @mushi-mushi/react-native
|
|
2
2
|
|
|
3
|
+
## 0.19.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7b44c97: SDK fixes from automated code review.
|
|
8
|
+
|
|
9
|
+
- **Favicon trust boundary** (`@mushi-mushi/core`): `readPageFaviconHref` now returns only http(s) URLs, so a host page can't get a `data:` / `blob:` / `javascript:` favicon rendered into the widget's `<img src>`; anything else falls back to the default mark.
|
|
10
|
+
- **Self-hosted credential message** (`@mushi-mushi/core`, `@mushi-mushi/react-native`): the one-time 401/403 "credentials rejected" warning only links to the hosted console when the client is actually using the Cloud endpoint; self-hosted deployments get a console-agnostic message instead of a wrong domain.
|
|
11
|
+
- **Offline-queue data loss** (`@mushi-mushi/react-native`): `decryptQueueBlob` now decrypts any blob carrying the encrypted prefix regardless of the current `secureStorage` flag. Previously, toggling `secureStorage` from `true` to `false` returned the still-encrypted string, which failed `JSON.parse` and silently cleared the offline report queue.
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [7b44c97]
|
|
14
|
+
- @mushi-mushi/core@1.19.2
|
|
15
|
+
|
|
3
16
|
## 0.19.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -263,9 +263,8 @@ async function encryptQueueBlob(plaintext, secureStorage) {
|
|
|
263
263
|
combined.set(new Uint8Array(cipher), iv.length);
|
|
264
264
|
return ENCRYPTED_PREFIX + bytesToBase64(combined);
|
|
265
265
|
}
|
|
266
|
-
async function decryptQueueBlob(stored,
|
|
266
|
+
async function decryptQueueBlob(stored, _secureStorage) {
|
|
267
267
|
if (!stored.startsWith(ENCRYPTED_PREFIX)) return stored;
|
|
268
|
-
if (!secureStorage) return stored;
|
|
269
268
|
const secure = await loadSecureStore();
|
|
270
269
|
if (!secure || !hasWebCrypto()) return stored;
|
|
271
270
|
const key = await getOrCreateQueueKey(secure);
|
|
@@ -1216,7 +1215,7 @@ var s2 = import_react_native3.StyleSheet.create({
|
|
|
1216
1215
|
|
|
1217
1216
|
// src/version.ts
|
|
1218
1217
|
var MUSHI_SDK_PACKAGE = "@mushi-mushi/react-native";
|
|
1219
|
-
var MUSHI_SDK_VERSION = "0.19.
|
|
1218
|
+
var MUSHI_SDK_VERSION = "0.19.2" ? "0.19.2" : "0.17.0";
|
|
1220
1219
|
|
|
1221
1220
|
// src/provider.tsx
|
|
1222
1221
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
@@ -1501,8 +1500,9 @@ function MushiProvider({ children, config: configProp, ...barePropConfig }) {
|
|
|
1501
1500
|
if (!result.ok) {
|
|
1502
1501
|
const isCredentialError = result.error?.code === "HTTP_401" || result.error?.code === "HTTP_403" || result.error?.code?.includes("UNAUTHORIZED") || result.error?.code?.includes("FORBIDDEN");
|
|
1503
1502
|
if (isCredentialError) {
|
|
1503
|
+
const where = apiEndpoint.replace(/\/$/, "") === import_core5.DEFAULT_API_ENDPOINT ? "Get the correct values at: https://kensaur.us/mushi-mushi/admin/projects" : "Get the correct values from your Mushi console's Projects page.";
|
|
1504
1504
|
console.error(
|
|
1505
|
-
'[Mushi] Credentials rejected. Check your projectId and apiKey (must have "report:write" scope).
|
|
1505
|
+
'[Mushi] Credentials rejected. Check your projectId and apiKey (must have "report:write" scope). ' + where
|
|
1506
1506
|
);
|
|
1507
1507
|
return;
|
|
1508
1508
|
}
|
package/dist/index.js
CHANGED
|
@@ -242,9 +242,8 @@ async function encryptQueueBlob(plaintext, secureStorage) {
|
|
|
242
242
|
combined.set(new Uint8Array(cipher), iv.length);
|
|
243
243
|
return ENCRYPTED_PREFIX + bytesToBase64(combined);
|
|
244
244
|
}
|
|
245
|
-
async function decryptQueueBlob(stored,
|
|
245
|
+
async function decryptQueueBlob(stored, _secureStorage) {
|
|
246
246
|
if (!stored.startsWith(ENCRYPTED_PREFIX)) return stored;
|
|
247
|
-
if (!secureStorage) return stored;
|
|
248
247
|
const secure = await loadSecureStore();
|
|
249
248
|
if (!secure || !hasWebCrypto()) return stored;
|
|
250
249
|
const key = await getOrCreateQueueKey(secure);
|
|
@@ -1222,7 +1221,7 @@ var s2 = StyleSheet2.create({
|
|
|
1222
1221
|
|
|
1223
1222
|
// src/version.ts
|
|
1224
1223
|
var MUSHI_SDK_PACKAGE = "@mushi-mushi/react-native";
|
|
1225
|
-
var MUSHI_SDK_VERSION = "0.19.
|
|
1224
|
+
var MUSHI_SDK_VERSION = "0.19.2" ? "0.19.2" : "0.17.0";
|
|
1226
1225
|
|
|
1227
1226
|
// src/provider.tsx
|
|
1228
1227
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
@@ -1507,8 +1506,9 @@ function MushiProvider({ children, config: configProp, ...barePropConfig }) {
|
|
|
1507
1506
|
if (!result.ok) {
|
|
1508
1507
|
const isCredentialError = result.error?.code === "HTTP_401" || result.error?.code === "HTTP_403" || result.error?.code?.includes("UNAUTHORIZED") || result.error?.code?.includes("FORBIDDEN");
|
|
1509
1508
|
if (isCredentialError) {
|
|
1509
|
+
const where = apiEndpoint.replace(/\/$/, "") === DEFAULT_API_ENDPOINT ? "Get the correct values at: https://kensaur.us/mushi-mushi/admin/projects" : "Get the correct values from your Mushi console's Projects page.";
|
|
1510
1510
|
console.error(
|
|
1511
|
-
'[Mushi] Credentials rejected. Check your projectId and apiKey (must have "report:write" scope).
|
|
1511
|
+
'[Mushi] Credentials rejected. Check your projectId and apiKey (must have "report:write" scope). ' + where
|
|
1512
1512
|
);
|
|
1513
1513
|
return;
|
|
1514
1514
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mushi-mushi/react-native",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native SDK for Mushi Mushi — shake-to-report, bottom sheet widget, full context capture",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@mushi-mushi/core": "^1.19.
|
|
40
|
+
"@mushi-mushi/core": "^1.19.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/react": "^19.2.17",
|