@newtalaria/browser 0.1.4 → 0.1.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/README.md +50 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/iife.d.ts +2 -0
- package/dist/iife.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +86 -8
- package/dist/index.js.map +2 -2
- package/dist/replay/hooks.d.ts +35 -2
- package/dist/replay/hooks.d.ts.map +1 -1
- package/dist/replay/recorder.d.ts +2 -0
- package/dist/replay/recorder.d.ts.map +1 -1
- package/dist/talaria.browser.iife.js +14058 -0
- package/dist/talaria.browser.iife.js.map +7 -0
- package/dist/types.d.ts +28 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
export type SeverityLevel = 'debug' | 'info' | 'warning' | 'error' | 'fatal';
|
|
3
3
|
/** Environments accepted by Talaria wire enums. */
|
|
4
4
|
export type Environment = 'production' | 'staging' | 'development';
|
|
5
|
+
/** Single status or inclusive [min, max] range. */
|
|
6
|
+
export type FailedRequestStatusCode = number | [number, number];
|
|
5
7
|
export interface TalariaInitOptions {
|
|
6
8
|
/**
|
|
7
9
|
* Serverpod host, e.g. `http://localhost:8080` or `https://ingest.example.com`.
|
|
@@ -29,12 +31,33 @@ export interface TalariaInitOptions {
|
|
|
29
31
|
replaysErrorAfterMs?: number;
|
|
30
32
|
/** Passed to rrweb. Default `true`. */
|
|
31
33
|
maskAllInputs?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Embed accessible stylesheet rules into the snapshot (rrweb `inlineStylesheet`).
|
|
36
|
+
* Default `false` (smaller payloads; player re-fetches public CSS hrefs).
|
|
37
|
+
* Enable for auth-gated UIs (e.g. CMS admin) so same-origin CSS is captured while logged in.
|
|
38
|
+
* Cross-origin sheets without CORS still cannot be inlined.
|
|
39
|
+
*/
|
|
40
|
+
inlineStylesheet?: boolean;
|
|
32
41
|
/** CSS selectors blocked from the DOM snapshot (plus `[data-talaria-mask]`). */
|
|
33
42
|
blockSelector?: string;
|
|
34
43
|
/** Optional app user id attached to events / replay start. */
|
|
35
44
|
userId?: string;
|
|
45
|
+
/** Tags merged into every captured event (per-call tags win on key conflict). */
|
|
46
|
+
tags?: Record<string, string>;
|
|
36
47
|
/** Disable automatic `window` / `unhandledrejection` handlers. */
|
|
37
48
|
disableDefaultIntegrations?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Promote matching HTTP fetch/XHR failures to Talaria events (not just replay breadcrumbs).
|
|
51
|
+
* Default `true`.
|
|
52
|
+
*/
|
|
53
|
+
captureFailedRequests?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Status codes / ranges to promote. Default `[[500, 599]]`.
|
|
56
|
+
* Use `[[400, 599]]` for CMS admin (GridField/PJAX 404s).
|
|
57
|
+
*/
|
|
58
|
+
failedRequestStatusCodes?: FailedRequestStatusCode[];
|
|
59
|
+
/** Extra URL substrings that must never be promoted (Talaria ingest URLs are always ignored). */
|
|
60
|
+
failedRequestIgnoreUrls?: string[];
|
|
38
61
|
}
|
|
39
62
|
export interface CaptureContext {
|
|
40
63
|
tags?: Record<string, string>;
|
|
@@ -51,8 +74,13 @@ export interface ResolvedOptions {
|
|
|
51
74
|
replaysOnErrorSampleRate: number;
|
|
52
75
|
replaysErrorAfterMs: number;
|
|
53
76
|
maskAllInputs: boolean;
|
|
77
|
+
inlineStylesheet: boolean;
|
|
54
78
|
blockSelector: string;
|
|
55
79
|
userId?: string;
|
|
80
|
+
tags?: Record<string, string>;
|
|
56
81
|
disableDefaultIntegrations: boolean;
|
|
82
|
+
captureFailedRequests: boolean;
|
|
83
|
+
failedRequestStatusCodes: FailedRequestStatusCode[];
|
|
84
|
+
failedRequestIgnoreUrls: string[];
|
|
57
85
|
}
|
|
58
86
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7E,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,GAAG,MAAM,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,0BAA0B,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE7E,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,CAAC;AAEnE,mDAAmD;AACnD,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,C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O,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wBAAwB,EAAE,MAAM,CAAC;IACjC,wBAAwB,EAAE,MAAM,CAAC;IACjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wBAAwB,EAAE,uBAAuB,EAAE,CAAC;IACpD,uBAAuB,EAAE,MAAM,EAAE,CAAC;CACnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newtalaria/browser",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Talaria browser SDK — error capture and session replay (rrweb)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"README.md"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --format=esm --platform=browser --outfile=dist/index.js --sourcemap && npm run copy:example",
|
|
22
|
+
"build": "tsc -p tsconfig.json && esbuild src/index.ts --bundle --format=esm --platform=browser --outfile=dist/index.js --sourcemap && npm run build:iife && npm run copy:example",
|
|
23
|
+
"build:iife": "esbuild src/iife.ts --bundle --format=iife --platform=browser --outfile=dist/talaria.browser.iife.js --sourcemap",
|
|
23
24
|
"copy:example": "mkdir -p ../../examples/sdk-spa/vendor && cp dist/index.js ../../examples/sdk-spa/vendor/talaria.js && cp dist/index.js.map ../../examples/sdk-spa/vendor/talaria.js.map",
|
|
24
25
|
"build:types": "tsc -p tsconfig.json",
|
|
25
26
|
"clean": "rm -rf dist",
|