@sailfish-ai/recorder 1.11.0 → 1.11.3

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.
Files changed (65) hide show
  1. package/README.md +94 -0
  2. package/dist/chunks/{chunkSerializer-ZzIoYlP2.js → chunkSerializer-CV4nkb5-.js} +1 -1
  3. package/dist/chunks/chunkSerializer-CV4nkb5-.js.br +0 -0
  4. package/dist/chunks/chunkSerializer-CV4nkb5-.js.gz +0 -0
  5. package/dist/chunks/{chunkSerializer-CRDpgzTs.js → chunkSerializer-jzbHv2wf.js} +1 -1
  6. package/dist/chunks/chunkSerializer-jzbHv2wf.js.br +0 -0
  7. package/dist/chunks/chunkSerializer-jzbHv2wf.js.gz +0 -0
  8. package/dist/chunks/{index-BQn1Q-2-.js → index-BP-kNUGS.js} +174 -134
  9. package/dist/chunks/index-BP-kNUGS.js.br +0 -0
  10. package/dist/chunks/index-BP-kNUGS.js.gz +0 -0
  11. package/dist/chunks/{index-Dq_tjmkZ.js → index-BynFTRFv.js} +130 -87
  12. package/dist/chunks/index-BynFTRFv.js.br +0 -0
  13. package/dist/chunks/index-BynFTRFv.js.gz +0 -0
  14. package/dist/chunks/rrweb-plugin-performance-record-BYWkWb25.js +188 -0
  15. package/dist/chunks/rrweb-plugin-performance-record-BYWkWb25.js.br +0 -0
  16. package/dist/chunks/rrweb-plugin-performance-record-BYWkWb25.js.gz +0 -0
  17. package/dist/chunks/rrweb-plugin-performance-record-Dekf6xUi.js +186 -0
  18. package/dist/chunks/rrweb-plugin-performance-record-Dekf6xUi.js.br +0 -0
  19. package/dist/chunks/rrweb-plugin-performance-record-Dekf6xUi.js.gz +0 -0
  20. package/dist/constants.js +1 -0
  21. package/dist/constants.js.br +0 -0
  22. package/dist/constants.js.gz +0 -0
  23. package/dist/inAppReportIssueModal/index.js +15 -14
  24. package/dist/inAppReportIssueModal/index.js.br +0 -0
  25. package/dist/inAppReportIssueModal/index.js.gz +0 -0
  26. package/dist/inAppReportIssueModal/integrations.js +56 -4
  27. package/dist/inAppReportIssueModal/integrations.js.br +0 -0
  28. package/dist/inAppReportIssueModal/integrations.js.gz +0 -0
  29. package/dist/index.js +68 -42
  30. package/dist/index.js.br +0 -0
  31. package/dist/index.js.gz +0 -0
  32. package/dist/recorder.cjs +2 -2
  33. package/dist/recorder.cjs.br +0 -0
  34. package/dist/recorder.cjs.gz +0 -0
  35. package/dist/recorder.js +27 -25
  36. package/dist/recorder.js.br +0 -0
  37. package/dist/recorder.js.gz +0 -0
  38. package/dist/recorder.umd.cjs +4994 -4776
  39. package/dist/recorder.umd.cjs.br +0 -0
  40. package/dist/recorder.umd.cjs.gz +0 -0
  41. package/dist/recording.js +33 -3
  42. package/dist/recording.js.br +0 -0
  43. package/dist/recording.js.gz +0 -0
  44. package/dist/sendSailfishMessages.js +4 -0
  45. package/dist/sendSailfishMessages.js.br +0 -0
  46. package/dist/sendSailfishMessages.js.gz +0 -0
  47. package/dist/snippet-auto-init.js +147 -18
  48. package/dist/snippet-auto-init.js.br +0 -0
  49. package/dist/snippet-auto-init.js.gz +0 -0
  50. package/dist/types/constants.d.ts +1 -0
  51. package/dist/types/inAppReportIssueModal/integrations.d.ts +7 -0
  52. package/dist/types/index.d.ts +23 -1
  53. package/dist/types/recording.d.ts +1 -0
  54. package/dist/types/sendSailfishMessages.d.ts +4 -0
  55. package/dist/types/snippet-auto-init.d.ts +30 -0
  56. package/dist/types/types.d.ts +1 -0
  57. package/package.json +7 -4
  58. package/dist/chunks/chunkSerializer-CRDpgzTs.js.br +0 -0
  59. package/dist/chunks/chunkSerializer-CRDpgzTs.js.gz +0 -0
  60. package/dist/chunks/chunkSerializer-ZzIoYlP2.js.br +0 -0
  61. package/dist/chunks/chunkSerializer-ZzIoYlP2.js.gz +0 -0
  62. package/dist/chunks/index-BQn1Q-2-.js.br +0 -0
  63. package/dist/chunks/index-BQn1Q-2-.js.gz +0 -0
  64. package/dist/chunks/index-Dq_tjmkZ.js.br +0 -0
  65. package/dist/chunks/index-Dq_tjmkZ.js.gz +0 -0
Binary file
Binary file
package/dist/recording.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // import { NetworkRecordOptions } from "@sailfish-rrweb/rrweb-plugin-network-record";
2
2
  import { EventType } from "@sailfish-rrweb/types";
3
- import { Complete, DomContentEventId, DomContentSource, Loading, } from "./constants";
3
+ import { Complete, DomContentEventId, DomContentSource, Loading, PerformanceMetricEventId, } from "./constants";
4
4
  import { getCallerLocation, getCallerLocationFromTrace, } from "./sourceLocation";
5
5
  import suppressConsoleLogsDuringCall from "./suppressConsoleLogsDuringCall";
6
6
  import { yieldToMain } from "./scheduler";
@@ -157,6 +157,36 @@ export function initializeDomContentEvents(sessionId) {
157
157
  });
158
158
  });
159
159
  }
160
+ export async function initializePerformancePlugin(sessionId) {
161
+ try {
162
+ const { getRecordPerformancePlugin } = await import("@sailfish-rrweb/rrweb-plugin-performance-record");
163
+ await yieldToMain();
164
+ const plugin = getRecordPerformancePlugin({
165
+ getPageVisitUuid: () => sessionStorage.getItem("pageVisitUUID"),
166
+ });
167
+ // `observer` is defined on the plugin (see rrweb-plugin-performance-record).
168
+ // Call it directly so the plugin can start its PerformanceObservers without
169
+ // needing to be registered through rrweb's record() lifecycle — same pattern
170
+ // as initializeConsolePlugin.
171
+ plugin.observer?.((payload) => {
172
+ const typed = payload;
173
+ sendEvent({
174
+ type: PerformanceMetricEventId,
175
+ timestamp: typed.timestamp,
176
+ sessionId,
177
+ data: {
178
+ plugin: plugin.name,
179
+ payload: typed,
180
+ },
181
+ ...getUrlAndStoredUuids(),
182
+ });
183
+ }, window, plugin.options);
184
+ }
185
+ catch (error) {
186
+ // Never let a plugin failure break the recorder.
187
+ console.warn("[Sailfish] Performance plugin failed to initialize:", error);
188
+ }
189
+ }
160
190
  export async function initializeConsolePlugin(consoleRecordSettings, sessionId) {
161
191
  const { getRecordConsolePlugin } = await import("@sailfish-rrweb/rrweb-plugin-console-record");
162
192
  // Yield between dynamic import and observer setup
@@ -320,8 +350,8 @@ backendApi, apiKey, sessionId, envValue, deferRecordingStart = true, useWsWorker
320
350
  },
321
351
  maskInputOptions: { text: true },
322
352
  maskInputFn,
323
- maskTextClass: MASK_CLASS,
324
353
  ...captureSettings,
354
+ maskTextClass: captureSettings.maskTextClass ?? MASK_CLASS,
325
355
  recordDOM: false, // after spread so it can't be overridden
326
356
  });
327
357
  const snapshotStartTime = Date.now();
@@ -383,8 +413,8 @@ backendApi, apiKey, sessionId, envValue, deferRecordingStart = true, useWsWorker
383
413
  },
384
414
  maskInputOptions: { text: true },
385
415
  maskInputFn,
386
- maskTextClass: MASK_CLASS,
387
416
  ...captureSettings,
417
+ maskTextClass: captureSettings.maskTextClass ?? MASK_CLASS,
388
418
  });
389
419
  }
390
420
  };
Binary file
Binary file
@@ -4,6 +4,10 @@ import { sendMessage } from "./websocket";
4
4
  let lastIdentifyMessage = null;
5
5
  let lastMetadataMessage = null;
6
6
  let deviceInfoSent = false;
7
+ // Get the last identified user (for matching reporter in Report Issue modal)
8
+ export function getIdentifiedUser() {
9
+ return lastIdentifyMessage;
10
+ }
7
11
  // Function to send identify message
8
12
  export function identify(userId, traits = {}, overwrite = false) {
9
13
  const message = {
Binary file
Binary file
@@ -2,37 +2,158 @@
2
2
  * Auto-init from <script> data attributes (CDN / snippet mode).
3
3
  *
4
4
  * This file is ONLY included in the UMD build (not ES/CJS). It runs at load
5
- * time and checks document.currentScript for data-api-key to auto-initialize.
5
+ * time, reads `data-*` attributes off the currently-executing <script> tag,
6
+ * coerces them to their proper TypeScript-typed `initRecorder` options,
7
+ * and invokes the recorder.
6
8
  *
7
- * CRITICAL: Everything is wrapped in try/catch. A Sailfish error must
8
- * NEVER break the customer's application.
9
+ * CRITICAL: Everything is wrapped in try/catch. A Sailfish error must NEVER
10
+ * break the customer's application. Malformed attribute values are silently
11
+ * ignored rather than thrown — the SDK's own defaults take over in that
12
+ * case.
9
13
  *
10
14
  * Usage:
11
- * <script src="https://cdn.jsdelivr.net/npm/@sailfish-ai/recorder@1/dist/recorder.umd.js"
15
+ * <script src="https://cdn.jsdelivr.net/npm/@sailfish-ai/recorder@1.11.0"
12
16
  * data-api-key="YOUR_API_KEY"
13
- * data-service-identifier="my-app"
17
+ * data-service-identifier="acme-corp/web-app"
14
18
  * data-service-version="1.0.0"
15
- * data-backend-api="https://api-service.sailfish.ai"
19
+ * data-domains-to-propagate-header-to="*.acme.com,api.acme.com"
20
+ * data-domains-to-not-propagate-header-to="analytics.google.com,sentry.io"
21
+ * data-enable-fiber-tracking="true"
22
+ * data-enable-ip-tracking="false"
23
+ * data-capture-streaming-response-body="true"
24
+ * data-capture-response-body-max-mb="10"
25
+ * data-capture-stream-prefix-kb="64"
26
+ * data-capture-stream-timeout-ms="10000"
27
+ * data-defer-recording="true"
28
+ * data-chunk-snapshot="false"
29
+ * data-use-ws-worker="false"
30
+ * data-custom-base-url="https://triage.acme.com"
31
+ * data-git-sha="abc1234"
32
+ * data-show-eng-ticket-fields-in-report-issue-modal-default="false"
33
+ * data-library="JS/TS SNIPPET"
16
34
  * ></script>
35
+ *
36
+ * Attribute name convention: HTML5 `dataset` kebab-case. Each camelCase
37
+ * option on `initRecorder({ ... })` maps to `data-<kebab-case>`. See
38
+ * docs/docs-enterprise/integrate-with-your-code/frontend/javascript-typescript-cdn.md
39
+ * for the authoritative mapping table.
40
+ *
41
+ * Options NOT supported via data attributes (require npm install):
42
+ * - serviceAdditionalMetadata (Record<string, any>) — JSON in HTML attrs
43
+ * is error-prone; use initRecorder({ serviceAdditionalMetadata }) instead.
44
+ * - reportIssueShortcuts (Partial<ShortcutsConfig>) — same reason.
45
+ * - backendApi — Enterprise customers should use the SDK default.
17
46
  */
18
47
  import { initRecorder } from "./index";
48
+ /**
49
+ * Split a CSV attribute value into a trimmed, non-empty string array.
50
+ * Returns `null` if the value is falsy or produces no entries so the
51
+ * caller can skip setting the option (letting the SDK default apply).
52
+ */
53
+ function parseCsv(raw) {
54
+ if (!raw)
55
+ return null;
56
+ try {
57
+ const parts = raw
58
+ .split(",")
59
+ .map((s) => s.trim())
60
+ .filter(Boolean);
61
+ return parts.length > 0 ? parts : null;
62
+ }
63
+ catch {
64
+ return null;
65
+ }
66
+ }
67
+ /**
68
+ * Parse a boolean attribute. Only the literal string `"true"` is
69
+ * treated as true; anything else (including `"false"`, absent values,
70
+ * numeric strings) returns `null` so the caller can skip setting the
71
+ * option and let the SDK default apply.
72
+ */
73
+ function parseBool(raw) {
74
+ if (raw === undefined)
75
+ return null;
76
+ if (raw === "true")
77
+ return true;
78
+ if (raw === "false")
79
+ return false;
80
+ return null;
81
+ }
82
+ /**
83
+ * Parse a numeric attribute. Non-finite results (NaN, Infinity) return
84
+ * `null` so the caller skips setting the option.
85
+ */
86
+ function parseNumber(raw) {
87
+ if (raw === undefined || raw === "")
88
+ return null;
89
+ try {
90
+ const n = Number(raw);
91
+ return Number.isFinite(n) ? n : null;
92
+ }
93
+ catch {
94
+ return null;
95
+ }
96
+ }
19
97
  try {
20
98
  if (typeof document !== "undefined" && document.currentScript) {
21
99
  const script = document.currentScript;
22
- if (script.dataset?.apiKey) {
100
+ const ds = script.dataset ?? {};
101
+ if (ds.apiKey) {
23
102
  const opts = {
24
- apiKey: script.dataset.apiKey,
103
+ apiKey: ds.apiKey,
25
104
  };
26
- if (script.dataset.backendApi)
27
- opts.backendApi = script.dataset.backendApi;
28
- if (script.dataset.serviceIdentifier)
29
- opts.serviceIdentifier = script.dataset.serviceIdentifier;
30
- if (script.dataset.serviceVersion)
31
- opts.serviceVersion = script.dataset.serviceVersion;
32
- if (script.dataset.library)
33
- opts.library = script.dataset.library;
34
- if (!opts.library)
35
- opts.library = "JS/TS SNIPPET";
105
+ // ── Service identification (strings) ──────────────────────────
106
+ if (ds.serviceIdentifier)
107
+ opts.serviceIdentifier = ds.serviceIdentifier;
108
+ if (ds.serviceVersion)
109
+ opts.serviceVersion = ds.serviceVersion;
110
+ if (ds.gitSha)
111
+ opts.gitSha = ds.gitSha;
112
+ if (ds.customBaseUrl)
113
+ opts.customBaseUrl = ds.customBaseUrl;
114
+ // ── Domain allowlist/blocklist (CSV → string[]) ───────────────
115
+ const propagate = parseCsv(ds.domainsToPropagateHeaderTo);
116
+ if (propagate)
117
+ opts.domainsToPropagateHeaderTo = propagate;
118
+ const noPropagate = parseCsv(ds.domainsToNotPropagateHeaderTo);
119
+ if (noPropagate)
120
+ opts.domainsToNotPropagateHeaderTo = noPropagate;
121
+ // ── Tracking flags (boolean) ──────────────────────────────────
122
+ const enableFiber = parseBool(ds.enableFiberTracking);
123
+ if (enableFiber !== null)
124
+ opts.enableFiberTracking = enableFiber;
125
+ const enableIp = parseBool(ds.enableIpTracking);
126
+ if (enableIp !== null)
127
+ opts.enableIpTracking = enableIp;
128
+ // ── Network body capture (boolean + number) ───────────────────
129
+ const captureStream = parseBool(ds.captureStreamingResponseBody);
130
+ if (captureStream !== null)
131
+ opts.captureStreamingResponseBody = captureStream;
132
+ const maxMb = parseNumber(ds.captureResponseBodyMaxMb);
133
+ if (maxMb !== null)
134
+ opts.captureResponseBodyMaxMb = maxMb;
135
+ const prefixKb = parseNumber(ds.captureStreamPrefixKb);
136
+ if (prefixKb !== null)
137
+ opts.captureStreamPrefixKb = prefixKb;
138
+ const timeoutMs = parseNumber(ds.captureStreamTimeoutMs);
139
+ if (timeoutMs !== null)
140
+ opts.captureStreamTimeoutMs = timeoutMs;
141
+ // ── Performance knobs (boolean) ───────────────────────────────
142
+ const defer = parseBool(ds.deferRecording);
143
+ if (defer !== null)
144
+ opts.deferRecording = defer;
145
+ const chunk = parseBool(ds.chunkSnapshot);
146
+ if (chunk !== null)
147
+ opts.chunkSnapshot = chunk;
148
+ const wsWorker = parseBool(ds.useWsWorker);
149
+ if (wsWorker !== null)
150
+ opts.useWsWorker = wsWorker;
151
+ // ── Issue reporting (boolean) ─────────────────────────────────
152
+ const showEngTicket = parseBool(ds.showEngTicketFieldsInReportIssueModalDefault);
153
+ if (showEngTicket !== null)
154
+ opts.showEngTicketFieldsInReportIssueModalDefault = showEngTicket;
155
+ // ── Library tag (string) ──────────────────────────────────────
156
+ opts.library = ds.library || "JS/TS SNIPPET";
36
157
  initRecorder(opts).catch(() => {
37
158
  // Silently swallow — never break customer's app
38
159
  });
@@ -42,3 +163,11 @@ try {
42
163
  catch (_) {
43
164
  // Silently swallow any errors during auto-init
44
165
  }
166
+ /**
167
+ * Internal helpers are exported for the test suite only. The UMD
168
+ * bundle is the entry point for customers — they should never `import`
169
+ * from this module.
170
+ *
171
+ * @internal
172
+ */
173
+ export const __testing = { parseCsv, parseBool, parseNumber };
Binary file
Binary file
@@ -1,5 +1,6 @@
1
1
  export declare const DomContentEventId = 24;
2
2
  export declare const NetworkRequestEventId = 27;
3
+ export declare const PerformanceMetricEventId = 28;
3
4
  export declare const xSf3RidHeader = "X-Sf3-Rid";
4
5
  export declare const DomContentSource: {
5
6
  loading: number;
@@ -16,5 +16,12 @@ export declare function getSprintFieldId(): string;
16
16
  export declare function updateIssueTypeOptions(selectElement: HTMLSelectElement, projectId: string): void;
17
17
  export declare function getFieldsForProject(projectId: string, issueTypeId?: string): any[];
18
18
  export declare function getUsers(): any[];
19
+ /**
20
+ * Match the current identified user against the Jira users list and
21
+ * return their accountId. Uses email, name, and email-prefix matching
22
+ * (same logic as the dashboard). Only returns a match when exactly one
23
+ * user matches to avoid ambiguity.
24
+ */
25
+ export declare function getDefaultReporterAccountId(): string | null;
19
26
  export declare function getProjectsForTeam(teamId?: string): any[];
20
27
  export declare function updateFormWithIntegrationData(currentState: IssueReportState): IssueReportState;
@@ -6,7 +6,7 @@ export declare const DEFAULT_CAPTURE_SETTINGS: CaptureSettings;
6
6
  export declare const DEFAULT_CONSOLE_RECORDING_SETTINGS: LogRecordOptions;
7
7
  export declare function matchUrlWithWildcard(input: unknown, patterns: string[]): boolean;
8
8
  export declare function createSkipHeadersPropagationChecker(domainsToNotPropagateHeaderTo?: string[], domainsToPropagateHeaderTo?: string[]): (url: string) => boolean;
9
- export declare function startRecording({ apiKey, backendApi, domainsToPropagateHeaderTo, domainsToNotPropagateHeaderTo, serviceVersion, serviceIdentifier, gitSha, serviceAdditionalMetadata, enableIpTracking, captureStreamingResponseBody, captureResponseBodyMaxMb, captureStreamPrefixKb, captureStreamTimeoutMs, enableFiberTracking, deferRecording, deferRecordingStart, chunkSnapshot, useWsWorker, library, }: {
9
+ export declare function startRecording({ apiKey, backendApi, domainsToPropagateHeaderTo, domainsToNotPropagateHeaderTo, serviceVersion, serviceIdentifier, gitSha, serviceAdditionalMetadata, enableIpTracking, captureStreamingResponseBody, captureResponseBodyMaxMb, captureStreamPrefixKb, captureStreamTimeoutMs, enableFiberTracking, deferRecording, deferRecordingStart, chunkSnapshot, useWsWorker, capturePerformanceMetrics, maskTextClass, library, headlessRecording, }: {
10
10
  apiKey: string;
11
11
  backendApi?: string;
12
12
  domainsToPropagateHeaderTo?: string[];
@@ -27,6 +27,9 @@ export declare function startRecording({ apiKey, backendApi, domainsToPropagateH
27
27
  deferRecordingStart?: boolean;
28
28
  chunkSnapshot?: boolean;
29
29
  useWsWorker?: boolean;
30
+ capturePerformanceMetrics?: boolean;
31
+ maskTextClass?: string;
32
+ headlessRecording?: boolean;
30
33
  }): Promise<void>;
31
34
  export declare const initRecorder: (options: {
32
35
  apiKey: string;
@@ -76,7 +79,26 @@ export declare const initRecorder: (options: {
76
79
  */
77
80
  chunkSnapshot?: boolean;
78
81
  useWsWorker?: boolean;
82
+ /**
83
+ * Capture browser performance metrics (FCP, LCP, TBT, DCL, LOAD) per
84
+ * page_visit_uuid via the `@sailfish-rrweb/rrweb-plugin-performance-record`
85
+ * plugin. Set to `false` to skip the plugin entirely — the plugin code is
86
+ * dynamically imported, so opting out also avoids loading `web-vitals` and
87
+ * the metric observers. Useful for benchmarking the recorder's own
88
+ * overhead, or for sites that already collect RUM through another vendor.
89
+ * @default true
90
+ */
91
+ capturePerformanceMetrics?: boolean;
79
92
  showEngTicketFieldsInReportIssueModalDefault?: boolean;
93
+ maskTextClass?: string;
94
+ /**
95
+ * When true, recording proceeds even inside headless / automated browser
96
+ * environments (Puppeteer, Playwright, Cypress, etc.), bypassing the
97
+ * `isHeadlessOrLighthouse()` guard in `startRecording`.
98
+ * When false (default), those environments are silently skipped.
99
+ * @default false
100
+ */
101
+ headlessRecording?: boolean;
80
102
  }) => Promise<void>;
81
103
  export * from "./graphql";
82
104
  export { openReportIssueModal } from "./inAppReportIssueModal";
@@ -10,6 +10,7 @@ export declare const getUrlAndStoredUuids: () => {
10
10
  tabVisibilityState: string;
11
11
  };
12
12
  export declare function initializeDomContentEvents(sessionId: string): void;
13
+ export declare function initializePerformancePlugin(sessionId: string): Promise<void>;
13
14
  export declare function initializeConsolePlugin(consoleRecordSettings: LogRecordOptions, sessionId: string): Promise<void>;
14
15
  export declare function initializeRecording(captureSettings: any, // TODO - Sibyl post-launch - replace type
15
16
  backendApi: string, apiKey: string, sessionId: string, envValue?: string, deferRecordingStart?: boolean, useWsWorker?: boolean, chunkSnapshot?: boolean): Promise<WsHandle>;
@@ -1,3 +1,7 @@
1
+ export declare function getIdentifiedUser(): {
2
+ userId: string;
3
+ traits: Record<string, any>;
4
+ } | null;
1
5
  export declare function identify(userId: string, traits?: Record<string, any>, overwrite?: boolean): void;
2
6
  export declare function addOrUpdateMetadata(metadata: Record<string, any>): void;
3
7
  export declare function trackingEvent(trackingData: Record<string, any>): void;
@@ -1 +1,31 @@
1
+ /**
2
+ * Split a CSV attribute value into a trimmed, non-empty string array.
3
+ * Returns `null` if the value is falsy or produces no entries so the
4
+ * caller can skip setting the option (letting the SDK default apply).
5
+ */
6
+ declare function parseCsv(raw: string | undefined): string[] | null;
7
+ /**
8
+ * Parse a boolean attribute. Only the literal string `"true"` is
9
+ * treated as true; anything else (including `"false"`, absent values,
10
+ * numeric strings) returns `null` so the caller can skip setting the
11
+ * option and let the SDK default apply.
12
+ */
13
+ declare function parseBool(raw: string | undefined): boolean | null;
14
+ /**
15
+ * Parse a numeric attribute. Non-finite results (NaN, Infinity) return
16
+ * `null` so the caller skips setting the option.
17
+ */
18
+ declare function parseNumber(raw: string | undefined): number | null;
19
+ /**
20
+ * Internal helpers are exported for the test suite only. The UMD
21
+ * bundle is the entry point for customers — they should never `import`
22
+ * from this module.
23
+ *
24
+ * @internal
25
+ */
26
+ export declare const __testing: {
27
+ parseCsv: typeof parseCsv;
28
+ parseBool: typeof parseBool;
29
+ parseNumber: typeof parseNumber;
30
+ };
1
31
  export {};
@@ -11,6 +11,7 @@ export interface CaptureSettings {
11
11
  sampling: object;
12
12
  textEditThrottleEnabled?: boolean;
13
13
  enableFiberTracking?: boolean;
14
+ maskTextClass?: string;
14
15
  }
15
16
  export interface ConsoleRecordSettings {
16
17
  level: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailfish-ai/recorder",
3
- "version": "1.11.0",
3
+ "version": "1.11.3",
4
4
  "publishPublicly": true,
5
5
  "publishToCdn": {
6
6
  "jsdelivr": true,
@@ -19,6 +19,7 @@
19
19
  "test": "vitest run",
20
20
  "test:watch": "vitest watch",
21
21
  "check-types": "tsc --noEmit",
22
+ "bench-perf": "node scripts/bench-perf.js",
22
23
  "prepublish": "npm run check-types && npm run build",
23
24
  "artifactregistry-login": "npx google-artifactregistry-auth",
24
25
  "publish-local": "npm publish --tag latest --registry http://localhost:4873 --//localhost:4873/:_authToken=none"
@@ -47,9 +48,10 @@
47
48
  "dist"
48
49
  ],
49
50
  "dependencies": {
50
- "@sailfish-rrweb/rrweb-plugin-console-record": "0.5.9",
51
- "@sailfish-rrweb/rrweb-record-only": "0.5.9",
52
- "@sailfish-rrweb/types": "0.5.9",
51
+ "@sailfish-rrweb/rrweb-plugin-console-record": "0.5.11",
52
+ "@sailfish-rrweb/rrweb-plugin-performance-record": "0.5.11",
53
+ "@sailfish-rrweb/rrweb-record-only": "0.5.11",
54
+ "@sailfish-rrweb/types": "0.5.11",
53
55
  "reconnecting-websocket": "^4.4.0",
54
56
  "source-map-js": "^1.2.1"
55
57
  },
@@ -74,6 +76,7 @@
74
76
  "jest-localstorage-mock": "^2.4.26",
75
77
  "jest-transform-stub": "^2.0.0",
76
78
  "jsdom": "^25.0.0",
79
+ "puppeteer": "^23.0.0",
77
80
  "rollup-plugin-dts": "^6.1.1",
78
81
  "rollup-plugin-visualizer": "^5.12.0",
79
82
  "ts-jest": "^29.4.0",
Binary file
Binary file
Binary file
Binary file