@hanzo/event 0.3.31 → 0.3.33
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/README.md +17 -19
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +14 -14
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +14 -14
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -2
- package/src/anon.d.ts +1 -1
- package/src/anon.js +18 -18
- package/src/anon.test.ts +17 -38
- package/src/stack.ts +144 -0
- package/src/storage.test.ts +2 -2
- package/src/storage.ts +1 -1
- package/src/uid.ts +1 -1
- package/src/version.ts +1 -1
- package/hz.js +0 -553
- package/src/hz.test.ts +0 -376
package/dist/index.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ declare function getFirstTouch(): Attribution | undefined;
|
|
|
8
8
|
/** Read persisted cohort dimensions. */
|
|
9
9
|
declare function getCohort(): Cohort | undefined;
|
|
10
10
|
|
|
11
|
-
declare const VERSION = "0.3.
|
|
11
|
+
declare const VERSION = "0.3.33";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* parseDsn parses "https://<version>:<hmac>@<host>/v1/event/<projectId>" into its
|
|
@@ -63,7 +63,7 @@ declare function buildSentryEvent(input: BuildEventInput): SentryEvent;
|
|
|
63
63
|
declare function buildEnvelope(event: SentryEvent, dsn: Dsn, sentAt?: string): string;
|
|
64
64
|
|
|
65
65
|
// Types for anon.js, which is hand-written ES5 rather than TypeScript because
|
|
66
|
-
//
|
|
66
|
+
// The door's hosted tag inlines it VERBATIM and has no compiler.
|
|
67
67
|
// The declarations are here so the bundled client still imports it typed.
|
|
68
68
|
|
|
69
69
|
/** Mints a time-ordered UUIDv7 (RFC 9562 §5.7) for `now` in epoch milliseconds. */
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare function getFirstTouch(): Attribution | undefined;
|
|
|
8
8
|
/** Read persisted cohort dimensions. */
|
|
9
9
|
declare function getCohort(): Cohort | undefined;
|
|
10
10
|
|
|
11
|
-
declare const VERSION = "0.3.
|
|
11
|
+
declare const VERSION = "0.3.33";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* parseDsn parses "https://<version>:<hmac>@<host>/v1/event/<projectId>" into its
|
|
@@ -63,7 +63,7 @@ declare function buildSentryEvent(input: BuildEventInput): SentryEvent;
|
|
|
63
63
|
declare function buildEnvelope(event: SentryEvent, dsn: Dsn, sentAt?: string): string;
|
|
64
64
|
|
|
65
65
|
// Types for anon.js, which is hand-written ES5 rather than TypeScript because
|
|
66
|
-
//
|
|
66
|
+
// The door's hosted tag inlines it VERBATIM and has no compiler.
|
|
67
67
|
// The declarations are here so the bundled client still imports it typed.
|
|
68
68
|
|
|
69
69
|
/** Mints a time-ordered UUIDv7 (RFC 9562 §5.7) for `now` in epoch milliseconds. */
|
package/dist/index.mjs
CHANGED
|
@@ -318,7 +318,7 @@ function uuidv7Time(id) {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
// src/version.ts
|
|
321
|
-
var VERSION = "0.3.
|
|
321
|
+
var VERSION = "0.3.33";
|
|
322
322
|
|
|
323
323
|
// src/sentry.ts
|
|
324
324
|
var MAX_FRAMES = 50;
|
|
@@ -1109,26 +1109,26 @@ var COHORTS = {
|
|
|
1109
1109
|
channel: { field: "channel", label: "Acquisition channel" },
|
|
1110
1110
|
refCode: { field: "ref_code", label: "Referral code" }
|
|
1111
1111
|
};
|
|
1112
|
-
/*! anon.js — THE anonymous-identity chain. ONE implementation,
|
|
1112
|
+
/*! anon.js — THE anonymous-identity chain. ONE implementation, two distributions.
|
|
1113
1113
|
*
|
|
1114
1114
|
* One browser is ONE person on every Hanzo surface, whichever client a page
|
|
1115
|
-
* happens to have loaded. There were three implementations writing TWO keys —
|
|
1116
|
-
* `hz_anon_id`
|
|
1117
|
-
*
|
|
1115
|
+
* happens to have loaded. There were once three implementations writing TWO keys —
|
|
1116
|
+
* `hz_anon_id` and `hz_id` — so the same visitor was several people depending on
|
|
1117
|
+
* which snippet the surface shipped.
|
|
1118
1118
|
*
|
|
1119
|
-
* The
|
|
1119
|
+
* The two call sites:
|
|
1120
1120
|
* 1. src/storage.ts — the bundled npm client; IMPORTS this file.
|
|
1121
|
-
* 2.
|
|
1122
|
-
* 3. hanzoai/cloud apps/analytics/tag.js — the tag the door hosts at
|
|
1121
|
+
* 2. hanzoai/cloud apps/analytics/tag.js — the tag the door hosts at
|
|
1123
1122
|
* /v1/event.js; vendors this file and its tag.go serves the marked region
|
|
1124
1123
|
* with the tag as one asset, so the door holds no second copy either.
|
|
1125
1124
|
*
|
|
1126
|
-
* (2)
|
|
1127
|
-
*
|
|
1128
|
-
*
|
|
1129
|
-
*
|
|
1130
|
-
*
|
|
1131
|
-
*
|
|
1125
|
+
* (2) has no bundler and cannot import anything, which is why the chain lives in a
|
|
1126
|
+
* file that is plain ES5 rather than in a .ts: the region between the BEGIN and END
|
|
1127
|
+
* markers is COPIED VERBATIM. Keep it ES5, dependency-free, `hz`-prefixed (it is
|
|
1128
|
+
* spliced into other people's scopes) and unformatted — a reformat here is a diff
|
|
1129
|
+
* against the vendored copy. After editing, resync the door:
|
|
1130
|
+
*
|
|
1131
|
+
* curl -fsSL https://unpkg.com/@hanzo/event/src/anon.js -o apps/analytics/anon.js
|
|
1132
1132
|
*/
|
|
1133
1133
|
|
|
1134
1134
|
export { Analytics, COHORTS, GOALS, PRODUCT_PROJECT, VERSION, buildEnvelope, buildSentryEvent, createAnalytics, deriveChannel, digest, dsnForProduct, exceptionEntry, exceptionProperties, fingerprint, framesFromStack, getCohort, getFirstTouch, hasAttribution, hostOf, isoWeek, parseAttribution, parseDsn, redactSecrets, scrubPII, scrubText, hzUuidv7 as uuidv7, uuidv7Time };
|