@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/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.31";
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
- // hz.js and the door's hosted tag inline it VERBATIM and neither has a compiler.
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.31";
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
- // hz.js and the door's hosted tag inline it VERBATIM and neither has a compiler.
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.31";
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, three distributions.
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` (the npm client, the hosted tag) and `hz_id` (hz.js) — so the same
1117
- * visitor was several people depending on which snippet the surface shipped.
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 three call sites:
1119
+ * The two call sites:
1120
1120
  * 1. src/storage.ts — the bundled npm client; IMPORTS this file.
1121
- * 2. hz.js — the no-build script tag; INLINES the marked region.
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) and (3) have no bundler and cannot import anything, which is why the chain
1127
- * lives in a file that is plain ES5 rather than in a .ts: the region between the
1128
- * BEGIN and END markers is COPIED VERBATIM, and src/anon.test.ts fails if hz.js's
1129
- * copy is so much as a byte different. Keep the region ES5, dependency-free,
1130
- * `hz`-prefixed (it is spliced into other people's scopes) and unformatted — a
1131
- * reformat of one copy is a diff against the other.
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 };