@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/{core-usULsfUB.d.cts → core-ZXDaPEyY.d.cts} +5 -1
- package/dist/{core-usULsfUB.d.ts → core-ZXDaPEyY.d.ts} +5 -1
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +6 -5
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.mjs +6 -5
- package/dist/react.mjs.map +1 -1
- package/hz.js +1 -1
- package/package.json +1 -1
- package/src/core.test.ts +3 -3
- package/src/core.ts +1 -1
- package/src/dsn.test.ts +4 -4
- package/src/dsn.ts +6 -6
- package/src/sentry.test.ts +3 -3
- package/src/sentry.ts +11 -7
- package/src/types.ts +5 -1
- package/src/version.ts +1 -1
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-
|
|
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-
|
|
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/
|
|
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.
|
|
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
|
|
340
|
-
|
|
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:
|
|
490
|
+
dsn: dsn.base,
|
|
490
491
|
sent_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
491
492
|
});
|
|
492
493
|
const itemHeader = JSON.stringify({
|