@temps-sdk/analytics-browser 0.0.1 → 0.0.6
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/auto-full.d.ts.map +1 -1
- package/dist/auto-full.js +2 -0
- package/dist/auto.js +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/temps.js +12525 -16664
- package/dist/temps.min.js +44 -45
- package/package.json +2 -2
package/dist/auto-full.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-full.d.ts","sourceRoot":"","sources":["../src/auto-full.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auto-full.d.ts","sourceRoot":"","sources":["../src/auto-full.ts"],"names":[],"mappings":"AAiBA,OAAO,QAAQ,CAAC"}
|
package/dist/auto-full.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2024-2026 Temps Contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT OR Apache-2.0
|
|
1
3
|
// Full build entry: force bun to inline rrweb + @rrweb/packer into this single-file IIFE.
|
|
2
4
|
//
|
|
3
5
|
// `@temps-sdk/analytics-core`'s barrel (index.ts) statically re-exports SessionRecorder, so
|
package/dist/auto.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2024-2026 Temps Contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT OR Apache-2.0
|
|
1
3
|
import { init } from "./index";
|
|
2
4
|
/**
|
|
3
5
|
* Auto-init entrypoint. Reads configuration from the currently-executing
|
|
@@ -15,7 +17,9 @@ function readDataset() {
|
|
|
15
17
|
return {};
|
|
16
18
|
const script = document.currentScript
|
|
17
19
|
?? document.querySelector("script[data-temps]")
|
|
18
|
-
?? Array.from(document.scripts)
|
|
20
|
+
?? Array.from(document.scripts)
|
|
21
|
+
.reverse()
|
|
22
|
+
.find((s) => !!s.dataset?.domain || !!s.dataset?.basePath || !!s.dataset?.ingestKey)
|
|
19
23
|
?? null;
|
|
20
24
|
if (!script)
|
|
21
25
|
return {};
|
|
@@ -24,6 +28,10 @@ function readDataset() {
|
|
|
24
28
|
const recording = {};
|
|
25
29
|
if (ds.basePath)
|
|
26
30
|
opts.basePath = ds.basePath;
|
|
31
|
+
// `data-ingest-key="pa_…"`. Needed when the page is not served by Temps, so
|
|
32
|
+
// there is no Host-based route-table entry to attribute the events with.
|
|
33
|
+
if (ds.ingestKey)
|
|
34
|
+
opts.ingestKey = ds.ingestKey;
|
|
27
35
|
if (ds.domain)
|
|
28
36
|
opts.domain = ds.domain;
|
|
29
37
|
if (ds.disabled)
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACf,MAAM,2BAA2B,CAAC;AAEnC,cAAc,2BAA2B,CAAC;AAS1C;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,gBAAqB,GAAG,YAAY,CASjE;AAED,0EAA0E;AAC1E,wBAAgB,YAAY,IAAI,YAAY,CAO3C;AAED,qDAAqD;AACrD,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,qDAAqD;AACrD,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED,mDAAmD;AACnD,wBAAgB,OAAO,IAAI,IAAI,CAM9B"}
|