@hanzo/event 0.3.29 → 0.3.31

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/hz.js CHANGED
@@ -55,7 +55,7 @@
55
55
  }
56
56
 
57
57
  var LIB = 'hz.js'
58
- var VERSION = '0.3.29'
58
+ var VERSION = '0.3.31'
59
59
  var host = (s.getAttribute('data-host') || 'https://api.hanzo.ai').replace(/\/+$/, '')
60
60
  var product = s.getAttribute('data-product') || location.hostname
61
61
  var capture = s.getAttribute('data-capture') !== '0'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/event",
3
- "version": "0.3.29",
3
+ "version": "0.3.31",
4
4
  "description": "Hanzo Event — the ONE telemetry client. Emits pageview/event/identify/group to the Hanzo Cloud event stream (POST /v1/event), AND reports errors to Sentry as real Sentry envelopes — the error plane needs a DSN, without one nothing reaches Sentry. First-touch attribution, beacon-on-unload, auto error capture, client-side secret/PII scrubbing, a shared event + goal vocabulary. Subsumes @sentry.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
package/src/core.test.ts CHANGED
@@ -515,15 +515,6 @@ describe('Event error capture', () => {
515
515
  expect(p.$exception_fingerprint).not.toBe('forged')
516
516
  })
517
517
 
518
- it('captureException is an alias of captureError', () => {
519
- const a = mk()
520
- a.captureException(new Error('via alias'))
521
- const e = tx.all[0]
522
- expect(e.event).toBe('$exception')
523
- expect(e.type).toBe('event')
524
- expect(e.error?.message).toBe('via alias')
525
- })
526
-
527
518
  it('an error is still an event on the ONE stream — same /v1/event door + product', () => {
528
519
  const a = mk({ host: 'https://api.hanzo.ai' })
529
520
  a.captureError(new Error('x'))
package/src/core.ts CHANGED
@@ -409,9 +409,6 @@ export class Analytics {
409
409
  this.enqueue('event', event, { properties, ...commerce })
410
410
  }
411
411
 
412
- /** track is an alias of capture (Segment familiarity). */
413
- track = this.capture.bind(this)
414
-
415
412
  /** captureError reports a caught error, an unhandled rejection, a React render
416
413
  * error, or a manual report to BOTH planes, from one call:
417
414
  *
@@ -483,9 +480,6 @@ export class Analytics {
483
480
  }
484
481
  }
485
482
 
486
- /** captureException — @sentry-familiar alias of captureError. */
487
- captureException = this.captureError.bind(this)
488
-
489
483
  /** setCohort persists cohort dimensions (e.g. signupWeek at signup) so they ride
490
484
  * every subsequent event. */
491
485
  setCohort(patch: Cohort): void {
package/src/dsn.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * The product → Sentry DSN registry.
2
+ * The product → Sentinel DSN registry.
3
3
  *
4
4
  * An app declares WHAT it is (`product: 'console'`); this module knows WHERE its
5
5
  * errors go. That split is the whole point: no surface has to learn a DSN, carry
6
6
  * a build argument, or grow a config file to report errors — declaring the
7
7
  * product it already declares is enough.
8
8
  *
9
- * A Sentry DSN is PUBLIC by construction. It ships inside the client bundle and
9
+ * A Sentinel DSN is PUBLIC by construction. It ships inside the client bundle and
10
10
  * is readable in devtools on any deployed page, and it grants exactly one
11
11
  * capability: submitting new events. It cannot read issues, projects, or any
12
12
  * other data. So committing it is not leaking a secret — it is recording a public
@@ -20,11 +20,11 @@
20
20
  * exception table is the same data with a trap in it.
21
21
  *
22
22
  * Projects are org-scoped and named `<org>-<app>`. To add one: create the project
23
- * (POST /v1/sentry/projects with X-Org-Id), then add its `dsn` here keyed by the
23
+ * (POST /v1/sentinel/projects with X-Org-Id), then add its `dsn` here keyed by the
24
24
  * product name the app passes to `createAnalytics`.
25
25
  */
26
26
 
27
- /** PRODUCT_PROJECT maps a `product` to its Sentry project id. The DSN's KEY is no
27
+ /** PRODUCT_PROJECT maps a `product` to its Sentinel project id. The DSN's KEY is no
28
28
  * longer a per-project secret — it is the ONE org publishable key (below), so a
29
29
  * surface's errors ride the SAME key its events do. The id only names WHICH
30
30
  * project the errors group under, and cloud auto-provisions that project on first
@@ -37,7 +37,7 @@ export const PRODUCT_PROJECT: Readonly<Record<string, string>> = Object.freeze({
37
37
  site: '019f9b1e-5785-7359-ad0b-f75db8e58c99', // hanzo.ai (marketing; product `site`)
38
38
  })
39
39
 
40
- /** dsnForProduct builds the product's Sentry DSN from the caller's resolved
40
+ /** dsnForProduct builds the product's Sentinel DSN from the caller's resolved
41
41
  * publishable `key` and the product's project — the SAME key the event stream
42
42
  * carries, at the product's envelope endpoint. Returns undefined when there is no
43
43
  * key or no project for the product, leaving the error plane inert rather than
package/src/version.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  // The library version, stamped on every event (`libraryVersion`) and on the
2
2
  // Sentry `sdk` block. It lives alone so `sentry.ts` can read it without importing
3
3
  // `core.ts` — core imports sentry, so the reverse would be an import cycle.
4
- export const VERSION = '0.3.29'
4
+ export const VERSION = '0.3.31'