@hanzo/event 0.3.35 → 0.3.37
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/LICENSE.md +21 -0
- package/README.md +8 -8
- package/TAXONOMY.md +1 -1
- package/dist/attribution.d.ts +14 -0
- package/dist/attribution.d.ts.map +1 -0
- package/dist/core.d.ts +102 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/dsn.d.ts +43 -0
- package/dist/dsn.d.ts.map +1 -0
- package/dist/events.d.ts +21 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/exception.d.ts +50 -0
- package/dist/exception.d.ts.map +1 -0
- package/dist/funnels.d.ts +14 -0
- package/dist/funnels.d.ts.map +1 -0
- package/dist/goals.d.ts +24 -0
- package/dist/goals.d.ts.map +1 -0
- package/dist/index.cjs +24 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -292
- package/dist/index.d.ts +22 -292
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +24 -8
- package/dist/index.mjs.map +1 -1
- package/dist/org.d.ts +74 -0
- package/dist/org.d.ts.map +1 -0
- package/dist/react.cjs +24 -8
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +13 -14
- package/dist/react.d.ts +13 -14
- package/dist/react.d.ts.map +1 -0
- package/dist/react.mjs +24 -8
- package/dist/react.mjs.map +1 -1
- package/dist/scrub.d.ts +20 -0
- package/dist/scrub.d.ts.map +1 -0
- package/dist/sentry.d.ts +62 -0
- package/dist/sentry.d.ts.map +1 -0
- package/dist/stack.d.ts +25 -0
- package/dist/stack.d.ts.map +1 -0
- package/dist/storage.d.ts +32 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/{core-CIhI2R7S.d.cts → types.d.ts} +21 -119
- package/dist/types.d.ts.map +1 -0
- package/dist/uid.d.ts +10 -0
- package/dist/uid.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +11 -11
- package/src/anon.d.ts +1 -1
- package/src/anon.js +3 -3
- package/src/anon.test.ts +3 -3
- package/src/core.test.ts +6 -6
- package/src/core.ts +11 -11
- package/src/events.ts +1 -1
- package/src/exception.ts +1 -1
- package/src/org.test.ts +16 -0
- package/src/org.ts +17 -1
- package/src/stack.ts +1 -1
- package/src/types.ts +3 -3
- package/src/uid.ts +2 -2
- package/src/version.ts +1 -1
- package/dist/core-CIhI2R7S.d.ts +0 -380
package/dist/index.mjs
CHANGED
|
@@ -92,7 +92,23 @@ function dsnForProduct(product, key) {
|
|
|
92
92
|
|
|
93
93
|
// src/org.ts
|
|
94
94
|
var ORG_DOMAIN = Object.freeze({
|
|
95
|
-
|
|
95
|
+
// A brand's domains are not a pattern — `hanzoskills.com` is Hanzo's and does
|
|
96
|
+
// not end in `hanzo.ai`, while `hanzo.works` is a registrable domain of its own
|
|
97
|
+
// rather than a subdomain of anything here. Each is stated because each is a
|
|
98
|
+
// separate fact, which is the whole reason this is a table.
|
|
99
|
+
hanzo: Object.freeze([
|
|
100
|
+
"hanzo.ai",
|
|
101
|
+
"hanzo.app",
|
|
102
|
+
"hanzo.bot",
|
|
103
|
+
"hanzo.chat",
|
|
104
|
+
"hanzo.codes",
|
|
105
|
+
"hanzo.id",
|
|
106
|
+
"hanzo.sh",
|
|
107
|
+
"hanzo.team",
|
|
108
|
+
"hanzo.ventures",
|
|
109
|
+
"hanzo.works",
|
|
110
|
+
"hanzoskills.com"
|
|
111
|
+
]),
|
|
96
112
|
lux: Object.freeze([
|
|
97
113
|
"lux.network",
|
|
98
114
|
"lux.exchange",
|
|
@@ -375,7 +391,7 @@ function uuidv7Time(id) {
|
|
|
375
391
|
}
|
|
376
392
|
|
|
377
393
|
// src/version.ts
|
|
378
|
-
var VERSION = "0.3.
|
|
394
|
+
var VERSION = "0.3.37";
|
|
379
395
|
|
|
380
396
|
// src/sentry.ts
|
|
381
397
|
var MAX_FRAMES = 50;
|
|
@@ -845,10 +861,10 @@ var Analytics = class {
|
|
|
845
861
|
// so before this the only way to report was to commit a key literal, and the
|
|
846
862
|
// fleet grew one copy per site of a value with a single source.
|
|
847
863
|
//
|
|
848
|
-
// A surface no brand claims still has no key, and the
|
|
864
|
+
// A surface no brand claims still has no key, and the edge REFUSES an
|
|
849
865
|
// unattributed event (401 `ingest_key_required`) — the reserved `$public`
|
|
850
866
|
// tenant that once caught keyless beacons is retired, and anonymous ingest is
|
|
851
|
-
// refused at every
|
|
867
|
+
// refused at every edge on every brand host. So there is no quiet fallback to
|
|
852
868
|
// rely on: an event lands in the org a credential names, or it does not land.
|
|
853
869
|
ingestKey: config.ingestKey ?? readEnv("NEXT_PUBLIC_PUBLISHABLE_KEY") ?? keyForPage()
|
|
854
870
|
};
|
|
@@ -986,7 +1002,7 @@ var Analytics = class {
|
|
|
986
1002
|
this.cohort = mergeCohort(patch);
|
|
987
1003
|
}
|
|
988
1004
|
/** flush drains the buffer to the server as ONE batch through the ONE ingest
|
|
989
|
-
*
|
|
1005
|
+
* endpoint POST /v1/event, body { batch: [Event…] }. beacon=true selects the
|
|
990
1006
|
* unload-safe transport. Auth is orthogonal to the wire:
|
|
991
1007
|
*
|
|
992
1008
|
* • publishable key set → rides ?ingest_key=pk-… on both sends, keeping each
|
|
@@ -1183,15 +1199,15 @@ var COHORTS = {
|
|
|
1183
1199
|
*
|
|
1184
1200
|
* The two call sites:
|
|
1185
1201
|
* 1. src/storage.ts — the bundled npm client; IMPORTS this file.
|
|
1186
|
-
* 2. hanzoai/cloud apps/analytics/tag.js — the tag
|
|
1202
|
+
* 2. hanzoai/cloud apps/analytics/tag.js — the tag served at
|
|
1187
1203
|
* /v1/event.js; vendors this file and its tag.go serves the marked region
|
|
1188
|
-
* with the tag as one asset, so
|
|
1204
|
+
* with the tag as one asset, so cloud holds no second copy either.
|
|
1189
1205
|
*
|
|
1190
1206
|
* (2) has no bundler and cannot import anything, which is why the chain lives in a
|
|
1191
1207
|
* file that is plain ES5 rather than in a .ts: the region between the BEGIN and END
|
|
1192
1208
|
* markers is COPIED VERBATIM. Keep it ES5, dependency-free, `hz`-prefixed (it is
|
|
1193
1209
|
* spliced into other people's scopes) and unformatted — a reformat here is a diff
|
|
1194
|
-
* against the vendored copy. After editing, resync
|
|
1210
|
+
* against the vendored copy. After editing, resync that copy:
|
|
1195
1211
|
*
|
|
1196
1212
|
* curl -fsSL https://unpkg.com/@hanzo/event/src/anon.js -o apps/analytics/anon.js
|
|
1197
1213
|
*/
|