@mushi-mushi/web 1.35.0 → 1.37.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/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { mushiPalette, resolveWidgetAccent, MUSHI_REPORTER_STATUS, MUSHI_GEOMETRY, MUSHI_Z, MUSHI_MOTION, MUSHI_TYPE, MUSHI_BANNER_BRAND_BORDER, MUSHI_BANNER_NEON, MUSHI_INVERSE, MUSHI_ON_ACCENT, MUSHI_ACCENT_SHADOW, MUSHI_COPY, MUSHI_TIER_COLORS, readPageFaviconHref, scrubUrl, resolveEnvConfig, diagnoseEnvConfig, validateConfig, expandPreset, createLogger, noopLogger, createApiClient, createPreFilter, createOfflineQueue, createRateLimiter, createPiiScrubber, initEventTracker, getSessionId, createBreadcrumbBuffer, sha256Hex, getReporterToken, trackEvent, flushEvents, getDeviceFingerprintHash, MAX_SCREENSHOT_DATA_URL_BYTES, captureEnvironment, newUuid, getEventAnonymousId, setEventConsent, parseIdentityToken, updateSessionIdentity, updateEventIdentity, normaliseThrown, shouldDropCapturedError, destroyEventTracker, destroySessionTracker, markPageUnloading, flushLastOutboundOnUnload, DEFAULT_API_ENDPOINT, MUSHI_INTERNAL_INIT_MARKER, MUSHI_DURATION, MUSHI_SPACING, MUSHI_RADIUS, isLikelyGenericFavicon, MUSHI_INTERNAL_HEADER, MUSHI_COLORS_LIGHT, resolveProjectDomain, projectInitials, projectFaviconUrlCandidates, initSessionTracker, trackPageView } from '@mushi-mushi/core';
2
+ import { collectDiagnostics } from '@mushi-mushi/core/diagnostics';
2
3
  import { isPlausibleReporterEmail, reporterToastMessage, reporterCopy } from '@mushi-mushi/core/reporter-ui';
3
4
  import { reporterChannels, subscribeBrowserPush } from '@mushi-mushi/core/reporter-channels';
4
5
 
@@ -6354,7 +6355,7 @@ function createProactiveManager(config = {}) {
6354
6355
 
6355
6356
  // src/version.ts
6356
6357
  var MUSHI_SDK_PACKAGE = "@mushi-mushi/web";
6357
- var MUSHI_SDK_VERSION = "1.35.0" ;
6358
+ var MUSHI_SDK_VERSION = "1.37.0" ;
6358
6359
  function resolveReportAppVersion(config, environment) {
6359
6360
  if (config.appVersion) return config.appVersion;
6360
6361
  const vercelId = config.integrations?.vercel?.analyticsId;
@@ -6691,6 +6692,7 @@ function createInstance(config) {
6691
6692
  let userInfo = null;
6692
6693
  let lastIdentifySig = null;
6693
6694
  const customMetadata = {};
6695
+ let diagnosticsProvider = null;
6694
6696
  const stickyTags = {};
6695
6697
  const breadcrumbs = createBreadcrumbBuffer({ max: 50 });
6696
6698
  breadcrumbs.add({
@@ -7366,6 +7368,7 @@ function createInstance(config) {
7366
7368
  log.warn("Screenshot dropped \u2014 could not compress under wire budget");
7367
7369
  }
7368
7370
  const capturedEnvironment = captureEnvironment();
7371
+ const hostDiagnostics = await collectDiagnostics(diagnosticsProvider);
7369
7372
  const report = {
7370
7373
  id: newUuid(),
7371
7374
  projectId: config.projectId,
@@ -7383,6 +7386,7 @@ function createInstance(config) {
7383
7386
  ...replayCap ? { replayEvents: replayCap.flush() } : {},
7384
7387
  metadata: {
7385
7388
  ...customMetadata,
7389
+ ...hostDiagnostics ?? {},
7386
7390
  ...userInfo ? { user: userInfo } : {},
7387
7391
  ...sentryCtx?.release ? { sentryRelease: sentryCtx.release } : {}
7388
7392
  },
@@ -7567,6 +7571,9 @@ function createInstance(config) {
7567
7571
  setMetadata(key, value) {
7568
7572
  customMetadata[key] = value;
7569
7573
  },
7574
+ setDiagnosticsProvider(provider) {
7575
+ diagnosticsProvider = provider;
7576
+ },
7570
7577
  setScreen(screen) {
7571
7578
  timelineCap.setScreen(screen);
7572
7579
  },
@@ -8177,6 +8184,8 @@ function createNoopInstance() {
8177
8184
  },
8178
8185
  setMetadata: () => {
8179
8186
  },
8187
+ setDiagnosticsProvider: () => {
8188
+ },
8180
8189
  setScreen: () => {
8181
8190
  },
8182
8191
  isOpen: () => false,