@hanzo/event 0.3.15 → 0.3.17
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/TAXONOMY.md +1 -1
- package/dist/{core-BZraSvcr.d.cts → core-D4PaPlOB.d.cts} +3 -3
- package/dist/{core-BZraSvcr.d.ts → core-D4PaPlOB.d.ts} +3 -3
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +6 -6
- 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 -6
- package/dist/react.mjs.map +1 -1
- package/hz.js +5 -3
- package/package.json +1 -1
- package/src/core.test.ts +8 -8
- package/src/core.ts +12 -5
- package/src/hz.test.ts +3 -3
- package/src/types.ts +3 -3
- package/src/version.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as Cohort, A as Attribution, S as SentryEvent, D as Dsn, a as CaptureErrorOptions, b as SentryFrame } from './core-
|
|
2
|
-
export { c as Analytics, d as AnalyticsConfig, E as EventKind, e as Exception, f as SentryLevel, T as Transport, W as WireEvent, g as createAnalytics } from './core-
|
|
1
|
+
import { C as Cohort, A as Attribution, S as SentryEvent, D as Dsn, a as CaptureErrorOptions, b as SentryFrame } from './core-D4PaPlOB.js';
|
|
2
|
+
export { c as Analytics, d as AnalyticsConfig, E as EventKind, e as Exception, f as SentryLevel, T as Transport, W as WireEvent, g as createAnalytics } from './core-D4PaPlOB.js';
|
|
3
3
|
|
|
4
4
|
/** Read the persisted first-touch attribution. */
|
|
5
5
|
declare function getFirstTouch(): Attribution | undefined;
|
|
6
6
|
/** Read persisted cohort dimensions. */
|
|
7
7
|
declare function getCohort(): Cohort | undefined;
|
|
8
8
|
|
|
9
|
-
declare const VERSION = "0.3.
|
|
9
|
+
declare const VERSION = "0.3.17";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* parseDsn parses "https://<version>:<hmac>@<host>/v1/sentry/<projectId>" into its
|
package/dist/index.mjs
CHANGED
|
@@ -365,7 +365,7 @@ function uuidv7Time(id) {
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
// src/version.ts
|
|
368
|
-
var VERSION = "0.3.
|
|
368
|
+
var VERSION = "0.3.17";
|
|
369
369
|
|
|
370
370
|
// src/sentry.ts
|
|
371
371
|
var MAX_FRAMES = 50;
|
|
@@ -659,7 +659,7 @@ function normalizeError2(err) {
|
|
|
659
659
|
const n = normalizeError(err);
|
|
660
660
|
return { type: n.name, message: n.message, stack: n.stack };
|
|
661
661
|
}
|
|
662
|
-
var isBrowser = () => typeof window !== "undefined";
|
|
662
|
+
var isBrowser = () => typeof window !== "undefined" && typeof document !== "undefined";
|
|
663
663
|
function serializeBatch(batch) {
|
|
664
664
|
try {
|
|
665
665
|
return JSON.stringify({ batch });
|
|
@@ -731,9 +731,9 @@ var Analytics = class {
|
|
|
731
731
|
// The publishable key resolves the SAME way the DSN below does: an explicit
|
|
732
732
|
// config wins, else the inlined build-time env.
|
|
733
733
|
//
|
|
734
|
-
//
|
|
735
|
-
// ALREADY carries end to end — KMS holds deploy/
|
|
736
|
-
// Dockerfile takes it as the
|
|
734
|
+
// NEXT_PUBLIC_PUBLISHABLE_KEY is that env, and it is the name the fleet
|
|
735
|
+
// ALREADY carries end to end — KMS holds deploy/PUBLISHABLE_KEY, each
|
|
736
|
+
// Dockerfile takes it as the PUBLISHABLE_KEY build-arg and re-exports it
|
|
737
737
|
// with the NEXT_PUBLIC_ prefix Next needs to inline it. Reading anything
|
|
738
738
|
// else here would add a fourth spelling of one value.
|
|
739
739
|
//
|
|
@@ -743,7 +743,7 @@ var Analytics = class {
|
|
|
743
743
|
// unattributed write is refused (401 ingest_key_required), which is silent
|
|
744
744
|
// in the page and invisible until you read the warehouse and find the host
|
|
745
745
|
// missing entirely.
|
|
746
|
-
ingestKey: config.ingestKey ?? readEnv("
|
|
746
|
+
ingestKey: config.ingestKey ?? readEnv("NEXT_PUBLIC_PUBLISHABLE_KEY")
|
|
747
747
|
};
|
|
748
748
|
this.transport = config.transport ?? new DefaultTransport();
|
|
749
749
|
this.dsn = parseDsn(config.dsn ?? readEnvDsn() ?? dsnForProduct(this.cfg.product));
|