@mushi-mushi/web 1.27.0 → 1.28.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/README.md +24 -2
- package/dist/headless.cjs +9 -8
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.js +10 -9
- package/dist/headless.js.map +1 -1
- package/dist/i18n/index.cjs +44 -4
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +18 -0
- package/dist/i18n/index.d.ts +18 -0
- package/dist/i18n/index.js +44 -4
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.cjs +95 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +96 -18
- package/dist/index.js.map +1 -1
- package/dist/mushi.loader.global.js +432 -432
- package/dist/mushi.loader.global.js.map +1 -1
- package/dist/otel.cjs +7 -6
- package/dist/otel.cjs.map +1 -1
- package/dist/otel.js +7 -6
- package/dist/otel.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -30,6 +30,28 @@ Mushi.init({
|
|
|
30
30
|
|
|
31
31
|
That's the whole integration. A floating 🐛 launcher appears; a report is one click away.
|
|
32
32
|
|
|
33
|
+
### Same-origin tunnel (ad blockers)
|
|
34
|
+
|
|
35
|
+
Point ingest at a first-party proxy — the same pattern as Sentry `tunnel`.
|
|
36
|
+
Host APIs must allowlist host + project + `/v1/` (empty project list → 503).
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
Mushi.init({
|
|
40
|
+
projectId: '00000000-0000-0000-0000-000000000000',
|
|
41
|
+
apiKey: 'mushi_xxx',
|
|
42
|
+
tunnel: '/api/mushi-tunnel',
|
|
43
|
+
// Published SDKs that ignore `tunnel` still honor apiEndpoint:
|
|
44
|
+
apiEndpoint: '/api/mushi-tunnel',
|
|
45
|
+
ignoreErrors: ['ResizeObserver loop', /^Script error\.?$/],
|
|
46
|
+
denyUrls: [/chrome-extension:/i],
|
|
47
|
+
replaysOnErrorSampleRate: 0,
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
`ignoreErrors` / `denyUrls` apply to **automatic** captures only. User widget
|
|
52
|
+
feedback always sends. Pagehide uses `fetch({ keepalive: true })`, then a
|
|
53
|
+
same-origin `sendBeacon` envelope the tunnel unwraps.
|
|
54
|
+
|
|
33
55
|
## Runtime config
|
|
34
56
|
|
|
35
57
|
With `runtimeConfig: 'auto'` (default), the SDK fetches console settings from
|
|
@@ -263,7 +285,7 @@ Screenshot capture uses canvas / SVG `foreignObject` serialization — it does n
|
|
|
263
285
|
|
|
264
286
|
## Bundle size
|
|
265
287
|
|
|
266
|
-
~7 KB brotli, enforced at
|
|
288
|
+
~7 KB brotli, enforced at 89 KB gzipped (105 KB uncompressed) in CI. Requires `@mushi-mushi/core` (installed automatically, not bundled inline). The widget's visual system — washi paper, sumi ink, vermillion 朱 accent, system serif — lives in [`src/styles.ts`](./src/styles.ts).
|
|
267
289
|
|
|
268
290
|
## License
|
|
269
291
|
|
|
@@ -272,4 +294,4 @@ MIT
|
|
|
272
294
|
<!-- mushi-readme-stats-footer -->
|
|
273
295
|
---
|
|
274
296
|
|
|
275
|
-
<sub>Monorepo scale (July 2026):
|
|
297
|
+
<sub>Monorepo scale (July 2026): 58 edge functions · 347 SQL migrations · 13 outbound plugins · 11 inbound adapters · 19 pipeline agents. Canonical counts: <a href="https://github.com/kensaurus/mushi-mushi/blob/master/docs/stats.md">docs/stats.md</a> · <code>pnpm docs-stats</code></sub>
|
package/dist/headless.cjs
CHANGED
|
@@ -106,8 +106,7 @@ function createNetworkCapture(options = {}) {
|
|
|
106
106
|
const originalXhrSend = OriginalXHR ? XMLHttpRequest.prototype.send : null;
|
|
107
107
|
const originalXhrSetRequestHeader = OriginalXHR ? XMLHttpRequest.prototype.setRequestHeader : null;
|
|
108
108
|
let activeOptions = options;
|
|
109
|
-
|
|
110
|
-
globalThis.fetch = fetchWrapper = async function mushiFetchInterceptor(input, init) {
|
|
109
|
+
const fetchWrapper = async function mushiFetchInterceptor(input, init) {
|
|
111
110
|
const startTime = Date.now();
|
|
112
111
|
const method = init?.method?.toUpperCase() ?? "GET";
|
|
113
112
|
const url = getRequestUrl(input);
|
|
@@ -165,6 +164,7 @@ function createNetworkCapture(options = {}) {
|
|
|
165
164
|
}
|
|
166
165
|
}
|
|
167
166
|
};
|
|
167
|
+
globalThis.fetch = fetchWrapper;
|
|
168
168
|
const xhrStateMap = typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : null;
|
|
169
169
|
if (OriginalXHR && originalXhrOpen && originalXhrSend && originalXhrSetRequestHeader && xhrStateMap) {
|
|
170
170
|
const _originalOpen = originalXhrOpen;
|
|
@@ -1062,15 +1062,17 @@ function textSnippet(el) {
|
|
|
1062
1062
|
// src/otel.ts
|
|
1063
1063
|
var SPAN_STATUS_ERROR = 2;
|
|
1064
1064
|
var warnedMissing = false;
|
|
1065
|
+
var noopOnStart = (_span, _parentContext) => {
|
|
1066
|
+
};
|
|
1067
|
+
var noopOnEnd = (_span) => {
|
|
1068
|
+
};
|
|
1065
1069
|
function createBrowserOtelSpanProcessor(mushi, options = {}) {
|
|
1066
1070
|
const errorsOnly = options.errorsOnly ?? true;
|
|
1067
1071
|
const noOp = {
|
|
1068
1072
|
// mushi-mushi-allowlist: OTel SpanProcessor requires onStart/onEnd; this no-op processor intentionally does nothing
|
|
1069
|
-
onStart:
|
|
1070
|
-
},
|
|
1073
|
+
onStart: noopOnStart,
|
|
1071
1074
|
// mushi-mushi-allowlist: no-op processor — nothing to forward
|
|
1072
|
-
onEnd:
|
|
1073
|
-
},
|
|
1075
|
+
onEnd: noopOnEnd,
|
|
1074
1076
|
shutdown: () => Promise.resolve(),
|
|
1075
1077
|
forceFlush: () => Promise.resolve()
|
|
1076
1078
|
};
|
|
@@ -1085,8 +1087,7 @@ function createBrowserOtelSpanProcessor(mushi, options = {}) {
|
|
|
1085
1087
|
}
|
|
1086
1088
|
return {
|
|
1087
1089
|
// mushi-mushi-allowlist: OTel SpanProcessor requires onStart; this processor only acts on onEnd
|
|
1088
|
-
onStart:
|
|
1089
|
-
},
|
|
1090
|
+
onStart: noopOnStart,
|
|
1090
1091
|
onEnd(span) {
|
|
1091
1092
|
try {
|
|
1092
1093
|
const isError = span.status.code === SPAN_STATUS_ERROR;
|