@hanzo/event 0.3.28 → 0.3.30

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/react.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, Component, ErrorInfo } from 'react';
3
- import { e as Analytics, f as AnalyticsConfig } from './core-usULsfUB.cjs';
3
+ import { e as Analytics, f as AnalyticsConfig } from './core-ZXDaPEyY.cjs';
4
4
 
5
5
  declare const Ctx: react.Context<Analytics | null>;
6
6
  interface AnalyticsProviderProps {
package/dist/react.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, Component, ErrorInfo } from 'react';
3
- import { e as Analytics, f as AnalyticsConfig } from './core-usULsfUB.js';
3
+ import { e as Analytics, f as AnalyticsConfig } from './core-ZXDaPEyY.js';
4
4
 
5
5
  declare const Ctx: react.Context<Analytics | null>;
6
6
  interface AnalyticsProviderProps {
package/dist/react.mjs CHANGED
@@ -81,7 +81,7 @@ function dsnForProduct(product, key) {
81
81
  if (!product || !key) return void 0;
82
82
  const projectId = PRODUCT_PROJECT[product];
83
83
  if (!projectId) return void 0;
84
- return `https://${key}@api.hanzo.ai/v1/sentry/${projectId}`;
84
+ return `https://${key}@api.hanzo.ai/v1/event/${projectId}`;
85
85
  }
86
86
 
87
87
  // src/scrub.ts
@@ -307,7 +307,7 @@ function hzAnonId() {
307
307
  }
308
308
 
309
309
  // src/version.ts
310
- var VERSION = "0.3.28";
310
+ var VERSION = "0.3.30";
311
311
 
312
312
  // src/sentry.ts
313
313
  var MAX_FRAMES = 50;
@@ -336,8 +336,9 @@ function parseDsn(dsn) {
336
336
  const projectId = segs.length > 0 ? segs[segs.length - 1] : "";
337
337
  if (!projectId) return null;
338
338
  const origin = `${scheme}://${host}`;
339
- const ingestUrl = `${origin}/v1/sentry/${encodeURIComponent(projectId)}/envelope/?sentry_key=${encodeURIComponent(publicKey)}`;
340
- return { publicKey, origin, projectId, ingestUrl };
339
+ const base = `${origin}/${segs.map(encodeURIComponent).join("/")}`;
340
+ const ingestUrl = `${base}/envelope/?sentry_key=${encodeURIComponent(publicKey)}`;
341
+ return { publicKey, origin, projectId, base, ingestUrl };
341
342
  }
342
343
  var V8_FRAME = /^\s*at\s+(?:(.+?)\s+\()?(?:(.+?):(\d+):(\d+)|([^)]+))\)?\s*$/;
343
344
  var MOZ_FRAME = /^\s*(?:(.*?)@)?(.+?):(\d+):(\d+)\s*$/;
@@ -486,7 +487,7 @@ function buildEnvelope(event, dsn, sentAt) {
486
487
  const payload = JSON.stringify(event);
487
488
  const header = JSON.stringify({
488
489
  event_id: event.event_id,
489
- dsn: `${dsn.origin}/v1/sentry/${dsn.projectId}`,
490
+ dsn: dsn.base,
490
491
  sent_at: (/* @__PURE__ */ new Date()).toISOString()
491
492
  });
492
493
  const itemHeader = JSON.stringify({