@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.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  var reporterUi = require('@mushi-mushi/core/reporter-ui');
4
4
  var core = require('@mushi-mushi/core');
5
+ var diagnostics = require('@mushi-mushi/core/diagnostics');
5
6
  var reporterChannels = require('@mushi-mushi/core/reporter-channels');
6
7
 
7
8
  var __defProp = Object.defineProperty;
@@ -6834,7 +6835,7 @@ function createProactiveManager(config = {}) {
6834
6835
 
6835
6836
  // src/version.ts
6836
6837
  var MUSHI_SDK_PACKAGE = "@mushi-mushi/web";
6837
- var MUSHI_SDK_VERSION = "1.35.0" ;
6838
+ var MUSHI_SDK_VERSION = "1.37.0" ;
6838
6839
  function resolveReportAppVersion(config, environment) {
6839
6840
  if (config.appVersion) return config.appVersion;
6840
6841
  const vercelId = config.integrations?.vercel?.analyticsId;
@@ -7171,6 +7172,7 @@ function createInstance(config) {
7171
7172
  let userInfo = null;
7172
7173
  let lastIdentifySig = null;
7173
7174
  const customMetadata = {};
7175
+ let diagnosticsProvider = null;
7174
7176
  const stickyTags = {};
7175
7177
  const breadcrumbs = core.createBreadcrumbBuffer({ max: 50 });
7176
7178
  breadcrumbs.add({
@@ -7846,6 +7848,7 @@ function createInstance(config) {
7846
7848
  log.warn("Screenshot dropped \u2014 could not compress under wire budget");
7847
7849
  }
7848
7850
  const capturedEnvironment = core.captureEnvironment();
7851
+ const hostDiagnostics = await diagnostics.collectDiagnostics(diagnosticsProvider);
7849
7852
  const report = {
7850
7853
  id: core.newUuid(),
7851
7854
  projectId: config.projectId,
@@ -7863,6 +7866,7 @@ function createInstance(config) {
7863
7866
  ...replayCap ? { replayEvents: replayCap.flush() } : {},
7864
7867
  metadata: {
7865
7868
  ...customMetadata,
7869
+ ...hostDiagnostics ?? {},
7866
7870
  ...userInfo ? { user: userInfo } : {},
7867
7871
  ...sentryCtx?.release ? { sentryRelease: sentryCtx.release } : {}
7868
7872
  },
@@ -8047,6 +8051,9 @@ function createInstance(config) {
8047
8051
  setMetadata(key, value) {
8048
8052
  customMetadata[key] = value;
8049
8053
  },
8054
+ setDiagnosticsProvider(provider) {
8055
+ diagnosticsProvider = provider;
8056
+ },
8050
8057
  setScreen(screen) {
8051
8058
  timelineCap.setScreen(screen);
8052
8059
  },
@@ -8657,6 +8664,8 @@ function createNoopInstance() {
8657
8664
  },
8658
8665
  setMetadata: () => {
8659
8666
  },
8667
+ setDiagnosticsProvider: () => {
8668
+ },
8660
8669
  setScreen: () => {
8661
8670
  },
8662
8671
  isOpen: () => false,