@extn/segi-js 0.2.17 → 0.2.18

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.
@@ -7,7 +7,7 @@
7
7
  * server-side /api/trace/heatmap/* endpoints.)
8
8
  */
9
9
  interface ReplayOptions {
10
- /** Toggle the whole module. Setting `false` causes withReplay() to return null. */
10
+ /** Default `true`. `false` keeps replay off (error capture is unaffected). */
11
11
  enabled?: boolean;
12
12
  /** 0..100 probabilistic gate — only this percent of sessions get recorded. */
13
13
  sample?: number;
@@ -20,6 +20,15 @@ interface ReplayOptions {
20
20
  };
21
21
  /** Override default endpoint base. Defaults to SegiClientOptions.endpoint. */
22
22
  endpoint?: string;
23
+ /**
24
+ * Emit a page_view automatically on History API navigation
25
+ * (pushState / replaceState / popstate) when the URL path or query changes.
26
+ * Default: `true` for replay enabled through the CDN bundle
27
+ * (`window.SegiConfig.replay`, `data-replay`, `Segi.withReplay` on the CDN
28
+ * global); `false` for npm imports, where frameworks call
29
+ * `Segi.replay.notifyRouteChange()` (SegiReplayProvider does this).
30
+ */
31
+ trackRoutes?: boolean;
23
32
  }
24
33
  interface ReplayConfig {
25
34
  /** Internal sentinel — set by withReplay(); main init imports the runtime. */
@@ -7,7 +7,7 @@
7
7
  * server-side /api/trace/heatmap/* endpoints.)
8
8
  */
9
9
  interface ReplayOptions {
10
- /** Toggle the whole module. Setting `false` causes withReplay() to return null. */
10
+ /** Default `true`. `false` keeps replay off (error capture is unaffected). */
11
11
  enabled?: boolean;
12
12
  /** 0..100 probabilistic gate — only this percent of sessions get recorded. */
13
13
  sample?: number;
@@ -20,6 +20,15 @@ interface ReplayOptions {
20
20
  };
21
21
  /** Override default endpoint base. Defaults to SegiClientOptions.endpoint. */
22
22
  endpoint?: string;
23
+ /**
24
+ * Emit a page_view automatically on History API navigation
25
+ * (pushState / replaceState / popstate) when the URL path or query changes.
26
+ * Default: `true` for replay enabled through the CDN bundle
27
+ * (`window.SegiConfig.replay`, `data-replay`, `Segi.withReplay` on the CDN
28
+ * global); `false` for npm imports, where frameworks call
29
+ * `Segi.replay.notifyRouteChange()` (SegiReplayProvider does this).
30
+ */
31
+ trackRoutes?: boolean;
23
32
  }
24
33
  interface ReplayConfig {
25
34
  /** Internal sentinel — set by withReplay(); main init imports the runtime. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extn/segi-js",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "Browser JavaScript SDK for the segi error monitoring service",
5
5
  "license": "UNLICENSED",
6
6
  "main": "./dist/index.js",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "rrweb": "2.0.0-alpha.20",
32
- "@extn/segi-shared": "0.2.0"
32
+ "@extn/segi-shared": "0.2.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "tsup": "^8.3.0",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "scripts": {
39
39
  "build": "tsup",
40
- "test": "node --test test/normalize-error.test.cjs",
40
+ "test": "node --test test/normalize-error.test.cjs test/replay-token.test.cjs",
41
41
  "test:browser": "node test/browser-runtime.cjs",
42
42
  "dev": "tsup --watch",
43
43
  "typecheck": "tsc -p tsconfig.json --noEmit",