@hanzo/event 0.3.16 → 0.3.17
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/TAXONOMY.md +1 -1
- package/dist/{core-BZraSvcr.d.cts → core-D4PaPlOB.d.cts} +3 -3
- package/dist/{core-BZraSvcr.d.ts → core-D4PaPlOB.d.ts} +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/react.cjs +5 -5
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.mjs +5 -5
- package/dist/react.mjs.map +1 -1
- package/hz.js +5 -3
- package/package.json +1 -1
- package/src/core.test.ts +8 -8
- package/src/core.ts +4 -4
- package/src/hz.test.ts +3 -3
- package/src/types.ts +3 -3
- package/src/version.ts +1 -1
package/TAXONOMY.md
CHANGED
|
@@ -239,7 +239,7 @@ Verified against the trees at the time of writing. ✅ = emitting, ❌ = not emi
|
|
|
239
239
|
no org today; chat funnels are person-scoped only.
|
|
240
240
|
5. **Logged-out reach depends on a publishable key.** Anonymous events need
|
|
241
241
|
`ingestKey` (`pk_…`, write-only) or they fail closed at the door.
|
|
242
|
-
`NEXT_PUBLIC_HANZO_INGEST_KEY` (hanzo.ai), `
|
|
242
|
+
`NEXT_PUBLIC_HANZO_INGEST_KEY` (hanzo.ai), `NEXT_PUBLIC_PUBLISHABLE_KEY`
|
|
243
243
|
(hanzo.app), `VITE_HANZO_INGEST_KEY` (hanzo.chat) are read but must be
|
|
244
244
|
provisioned per org via `POST /v1/ingest/keys`. Config, not code.
|
|
245
245
|
|
|
@@ -108,11 +108,11 @@ interface AnalyticsConfig {
|
|
|
108
108
|
* a reading principal — so it is safe to ship in a bundle. Mint one per org with
|
|
109
109
|
* POST /v1/keys {"type":"publishable"}.
|
|
110
110
|
*
|
|
111
|
-
* Omit it and the client reads
|
|
111
|
+
* Omit it and the client reads NEXT_PUBLIC_PUBLISHABLE_KEY from the inlined
|
|
112
112
|
* build env, the same way `dsn` falls back — so a surface declares BOTH planes
|
|
113
113
|
* in its build and neither needs code to switch on. That is the ONE spelling
|
|
114
|
-
* the fleet already carries: KMS holds deploy/
|
|
115
|
-
* Dockerfile takes
|
|
114
|
+
* the fleet already carries: KMS holds deploy/PUBLISHABLE_KEY, and each
|
|
115
|
+
* Dockerfile takes PUBLISHABLE_KEY as a build-arg and re-exports it with the
|
|
116
116
|
* NEXT_PUBLIC_ prefix that makes Next inline it.
|
|
117
117
|
*
|
|
118
118
|
* A surface with no key at all still reports for whoever is SIGNED IN (the
|
|
@@ -108,11 +108,11 @@ interface AnalyticsConfig {
|
|
|
108
108
|
* a reading principal — so it is safe to ship in a bundle. Mint one per org with
|
|
109
109
|
* POST /v1/keys {"type":"publishable"}.
|
|
110
110
|
*
|
|
111
|
-
* Omit it and the client reads
|
|
111
|
+
* Omit it and the client reads NEXT_PUBLIC_PUBLISHABLE_KEY from the inlined
|
|
112
112
|
* build env, the same way `dsn` falls back — so a surface declares BOTH planes
|
|
113
113
|
* in its build and neither needs code to switch on. That is the ONE spelling
|
|
114
|
-
* the fleet already carries: KMS holds deploy/
|
|
115
|
-
* Dockerfile takes
|
|
114
|
+
* the fleet already carries: KMS holds deploy/PUBLISHABLE_KEY, and each
|
|
115
|
+
* Dockerfile takes PUBLISHABLE_KEY as a build-arg and re-exports it with the
|
|
116
116
|
* NEXT_PUBLIC_ prefix that makes Next inline it.
|
|
117
117
|
*
|
|
118
118
|
* A surface with no key at all still reports for whoever is SIGNED IN (the
|
package/dist/index.cjs
CHANGED
|
@@ -367,7 +367,7 @@ function uuidv7Time(id) {
|
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
// src/version.ts
|
|
370
|
-
var VERSION = "0.3.
|
|
370
|
+
var VERSION = "0.3.17";
|
|
371
371
|
|
|
372
372
|
// src/sentry.ts
|
|
373
373
|
var MAX_FRAMES = 50;
|
|
@@ -733,9 +733,9 @@ var Analytics = class {
|
|
|
733
733
|
// The publishable key resolves the SAME way the DSN below does: an explicit
|
|
734
734
|
// config wins, else the inlined build-time env.
|
|
735
735
|
//
|
|
736
|
-
//
|
|
737
|
-
// ALREADY carries end to end — KMS holds deploy/
|
|
738
|
-
// Dockerfile takes it as the
|
|
736
|
+
// NEXT_PUBLIC_PUBLISHABLE_KEY is that env, and it is the name the fleet
|
|
737
|
+
// ALREADY carries end to end — KMS holds deploy/PUBLISHABLE_KEY, each
|
|
738
|
+
// Dockerfile takes it as the PUBLISHABLE_KEY build-arg and re-exports it
|
|
739
739
|
// with the NEXT_PUBLIC_ prefix Next needs to inline it. Reading anything
|
|
740
740
|
// else here would add a fourth spelling of one value.
|
|
741
741
|
//
|
|
@@ -745,7 +745,7 @@ var Analytics = class {
|
|
|
745
745
|
// unattributed write is refused (401 ingest_key_required), which is silent
|
|
746
746
|
// in the page and invisible until you read the warehouse and find the host
|
|
747
747
|
// missing entirely.
|
|
748
|
-
ingestKey: config.ingestKey ?? readEnv("
|
|
748
|
+
ingestKey: config.ingestKey ?? readEnv("NEXT_PUBLIC_PUBLISHABLE_KEY")
|
|
749
749
|
};
|
|
750
750
|
this.transport = config.transport ?? new DefaultTransport();
|
|
751
751
|
this.dsn = parseDsn(config.dsn ?? readEnvDsn() ?? dsnForProduct(this.cfg.product));
|