@hanzo/event 0.3.29 → 0.3.30
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.mjs +1 -1
- package/dist/react.mjs.map +1 -1
- package/hz.js +1 -1
- package/package.json +1 -1
- package/src/dsn.ts +5 -5
- package/src/version.ts +1 -1
package/hz.js
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
var LIB = 'hz.js'
|
|
58
|
-
var VERSION = '0.3.
|
|
58
|
+
var VERSION = '0.3.30'
|
|
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.
|
|
3
|
+
"version": "0.3.30",
|
|
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/dsn.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The product →
|
|
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
|
|
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/
|
|
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
|
|
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
|
|
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.
|
|
4
|
+
export const VERSION = '0.3.30'
|