@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.
Files changed (62) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +8 -8
  3. package/TAXONOMY.md +1 -1
  4. package/dist/attribution.d.ts +14 -0
  5. package/dist/attribution.d.ts.map +1 -0
  6. package/dist/core.d.ts +102 -0
  7. package/dist/core.d.ts.map +1 -0
  8. package/dist/dsn.d.ts +43 -0
  9. package/dist/dsn.d.ts.map +1 -0
  10. package/dist/events.d.ts +21 -0
  11. package/dist/events.d.ts.map +1 -0
  12. package/dist/exception.d.ts +50 -0
  13. package/dist/exception.d.ts.map +1 -0
  14. package/dist/funnels.d.ts +14 -0
  15. package/dist/funnels.d.ts.map +1 -0
  16. package/dist/goals.d.ts +24 -0
  17. package/dist/goals.d.ts.map +1 -0
  18. package/dist/index.cjs +24 -8
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +22 -292
  21. package/dist/index.d.ts +22 -292
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.mjs +24 -8
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/org.d.ts +74 -0
  26. package/dist/org.d.ts.map +1 -0
  27. package/dist/react.cjs +24 -8
  28. package/dist/react.cjs.map +1 -1
  29. package/dist/react.d.cts +13 -14
  30. package/dist/react.d.ts +13 -14
  31. package/dist/react.d.ts.map +1 -0
  32. package/dist/react.mjs +24 -8
  33. package/dist/react.mjs.map +1 -1
  34. package/dist/scrub.d.ts +20 -0
  35. package/dist/scrub.d.ts.map +1 -0
  36. package/dist/sentry.d.ts +62 -0
  37. package/dist/sentry.d.ts.map +1 -0
  38. package/dist/stack.d.ts +25 -0
  39. package/dist/stack.d.ts.map +1 -0
  40. package/dist/storage.d.ts +32 -0
  41. package/dist/storage.d.ts.map +1 -0
  42. package/dist/{core-CIhI2R7S.d.cts → types.d.ts} +21 -119
  43. package/dist/types.d.ts.map +1 -0
  44. package/dist/uid.d.ts +10 -0
  45. package/dist/uid.d.ts.map +1 -0
  46. package/dist/version.d.ts +2 -0
  47. package/dist/version.d.ts.map +1 -0
  48. package/package.json +11 -11
  49. package/src/anon.d.ts +1 -1
  50. package/src/anon.js +3 -3
  51. package/src/anon.test.ts +3 -3
  52. package/src/core.test.ts +6 -6
  53. package/src/core.ts +11 -11
  54. package/src/events.ts +1 -1
  55. package/src/exception.ts +1 -1
  56. package/src/org.test.ts +16 -0
  57. package/src/org.ts +17 -1
  58. package/src/stack.ts +1 -1
  59. package/src/types.ts +3 -3
  60. package/src/uid.ts +2 -2
  61. package/src/version.ts +1 -1
  62. 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
- hanzo: Object.freeze(["hanzo.ai", "hanzo.app", "hanzo.chat", "hanzo.id", "hanzo.bot", "hanzo.sh"]),
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.35";
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 door REFUSES an
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 door on every brand host. So there is no quiet fallback to
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
- * front door POST /v1/event, body { batch: [Event…] }. beacon=true selects the
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 the door hosts at
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 the door holds no second copy either.
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 the door:
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
  */