@sailfish-ai/recorder 1.10.13 → 1.11.1
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 +309 -7
- package/dist/babel-plugin-sailfish-source.cjs.br +0 -0
- package/dist/babel-plugin-sailfish-source.cjs.gz +0 -0
- package/dist/babel-plugin-sailfish-source.js.br +0 -0
- package/dist/babel-plugin-sailfish-source.js.gz +0 -0
- package/dist/chunkSerializer.js.br +0 -0
- package/dist/chunkSerializer.js.gz +0 -0
- package/dist/chunks/{chunkSerializer-Dk1eF3S8.js → chunkSerializer-BiemuRlf.js} +1 -1
- package/dist/chunks/chunkSerializer-BiemuRlf.js.br +0 -0
- package/dist/chunks/chunkSerializer-BiemuRlf.js.gz +0 -0
- package/dist/chunks/{chunkSerializer-CodMnuS3.js → chunkSerializer-CJQCxiLD.js} +1 -1
- package/dist/chunks/chunkSerializer-CJQCxiLD.js.br +0 -0
- package/dist/chunks/chunkSerializer-CJQCxiLD.js.gz +0 -0
- package/dist/chunks/{index-DW416eVj.js → index-Cfj4Epfd.js} +126 -96
- package/dist/chunks/index-Cfj4Epfd.js.br +0 -0
- package/dist/chunks/index-Cfj4Epfd.js.gz +0 -0
- package/dist/chunks/{index-DvLh2k6O.js → index-CuXHImrI.js} +126 -94
- package/dist/chunks/index-CuXHImrI.js.br +0 -0
- package/dist/chunks/index-CuXHImrI.js.gz +0 -0
- package/dist/constants.js.br +0 -0
- package/dist/constants.js.gz +0 -0
- package/dist/deviceInfo.js.br +0 -0
- package/dist/deviceInfo.js.gz +0 -0
- package/dist/env.js.br +0 -0
- package/dist/env.js.gz +0 -0
- package/dist/errorInterceptor.js.br +0 -0
- package/dist/errorInterceptor.js.gz +0 -0
- package/dist/eventStore.js.br +0 -0
- package/dist/eventStore.js.gz +0 -0
- package/dist/exponentialBackoff.js.br +0 -0
- package/dist/exponentialBackoff.js.gz +0 -0
- package/dist/fiberHook.js.br +0 -0
- package/dist/fiberHook.js.gz +0 -0
- package/dist/frameworkDetection.js.br +0 -0
- package/dist/frameworkDetection.js.gz +0 -0
- package/dist/graphql.js.br +0 -0
- package/dist/graphql.js.gz +0 -0
- package/dist/headlessDetection.js.br +0 -0
- package/dist/headlessDetection.js.gz +0 -0
- package/dist/inAppReportIssueModal/index.js +15 -14
- package/dist/inAppReportIssueModal/index.js.br +0 -0
- package/dist/inAppReportIssueModal/index.js.gz +0 -0
- package/dist/inAppReportIssueModal/integrations.js +56 -4
- package/dist/inAppReportIssueModal/integrations.js.br +0 -0
- package/dist/inAppReportIssueModal/integrations.js.gz +0 -0
- package/dist/inAppReportIssueModal/state.js.br +0 -0
- package/dist/inAppReportIssueModal/state.js.gz +0 -0
- package/dist/inAppReportIssueModal/ui.js.br +0 -0
- package/dist/inAppReportIssueModal/ui.js.gz +0 -0
- package/dist/index.js +98 -73
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/notifyEventStore.js.br +0 -0
- package/dist/notifyEventStore.js.gz +0 -0
- package/dist/recorder.cjs +2 -2
- package/dist/recorder.cjs.br +0 -0
- package/dist/recorder.cjs.gz +0 -0
- package/dist/recorder.js +26 -25
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +8909 -0
- package/dist/recorder.umd.cjs.br +0 -0
- package/dist/recorder.umd.cjs.gz +0 -0
- package/dist/recording.js +2 -2
- package/dist/recording.js.br +0 -0
- package/dist/recording.js.gz +0 -0
- package/dist/segmentHelpers.js.br +0 -0
- package/dist/segmentHelpers.js.gz +0 -0
- package/dist/sendSailfishMessages.js +4 -0
- package/dist/sendSailfishMessages.js.br +0 -0
- package/dist/sendSailfishMessages.js.gz +0 -0
- package/dist/session.js.br +0 -0
- package/dist/session.js.gz +0 -0
- package/dist/snippet-auto-init.js +173 -0
- package/dist/snippet-auto-init.js.br +0 -0
- package/dist/snippet-auto-init.js.gz +0 -0
- package/dist/sourceLocation.js.br +0 -0
- package/dist/sourceLocation.js.gz +0 -0
- package/dist/types/inAppReportIssueModal/integrations.d.ts +7 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/sendSailfishMessages.d.ts +4 -0
- package/dist/types/snippet-auto-init.d.ts +31 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/umd-entry.d.ts +9 -0
- package/dist/umd-entry.js +11 -0
- package/dist/utils.js.br +0 -0
- package/dist/utils.js.gz +0 -0
- package/dist/uuid.js.br +0 -0
- package/dist/uuid.js.gz +0 -0
- package/dist/websocket.js.br +0 -0
- package/dist/websocket.js.gz +0 -0
- package/package.json +9 -5
- package/dist/chunks/chunkSerializer-CodMnuS3.js.br +0 -0
- package/dist/chunks/chunkSerializer-CodMnuS3.js.gz +0 -0
- package/dist/chunks/chunkSerializer-Dk1eF3S8.js.br +0 -0
- package/dist/chunks/chunkSerializer-Dk1eF3S8.js.gz +0 -0
- package/dist/chunks/index-DW416eVj.js.br +0 -0
- package/dist/chunks/index-DW416eVj.js.gz +0 -0
- package/dist/chunks/index-DvLh2k6O.js.br +0 -0
- package/dist/chunks/index-DvLh2k6O.js.gz +0 -0
|
Binary file
|
|
Binary file
|
package/dist/recording.js
CHANGED
|
@@ -320,8 +320,8 @@ backendApi, apiKey, sessionId, envValue, deferRecordingStart = true, useWsWorker
|
|
|
320
320
|
},
|
|
321
321
|
maskInputOptions: { text: true },
|
|
322
322
|
maskInputFn,
|
|
323
|
-
maskTextClass: MASK_CLASS,
|
|
324
323
|
...captureSettings,
|
|
324
|
+
maskTextClass: captureSettings.maskTextClass ?? MASK_CLASS,
|
|
325
325
|
recordDOM: false, // after spread so it can't be overridden
|
|
326
326
|
});
|
|
327
327
|
const snapshotStartTime = Date.now();
|
|
@@ -383,8 +383,8 @@ backendApi, apiKey, sessionId, envValue, deferRecordingStart = true, useWsWorker
|
|
|
383
383
|
},
|
|
384
384
|
maskInputOptions: { text: true },
|
|
385
385
|
maskInputFn,
|
|
386
|
-
maskTextClass: MASK_CLASS,
|
|
387
386
|
...captureSettings,
|
|
387
|
+
maskTextClass: captureSettings.maskTextClass ?? MASK_CLASS,
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
390
|
};
|
|
Binary file
|
|
Binary file
|
|
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
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-init from <script> data attributes (CDN / snippet mode).
|
|
3
|
+
*
|
|
4
|
+
* This file is ONLY included in the UMD build (not ES/CJS). It runs at load
|
|
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.
|
|
8
|
+
*
|
|
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.
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* <script src="https://cdn.jsdelivr.net/npm/@sailfish-ai/recorder@1.11.0"
|
|
16
|
+
* data-api-key="YOUR_API_KEY"
|
|
17
|
+
* data-service-identifier="acme-corp/web-app"
|
|
18
|
+
* data-service-version="1.0.0"
|
|
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"
|
|
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.
|
|
46
|
+
*/
|
|
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
|
+
}
|
|
97
|
+
try {
|
|
98
|
+
if (typeof document !== "undefined" && document.currentScript) {
|
|
99
|
+
const script = document.currentScript;
|
|
100
|
+
const ds = script.dataset ?? {};
|
|
101
|
+
if (ds.apiKey) {
|
|
102
|
+
const opts = {
|
|
103
|
+
apiKey: ds.apiKey,
|
|
104
|
+
};
|
|
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";
|
|
157
|
+
initRecorder(opts).catch(() => {
|
|
158
|
+
// Silently swallow — never break customer's app
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
catch (_) {
|
|
164
|
+
// Silently swallow any errors during auto-init
|
|
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
|
|
Binary file
|
|
Binary file
|
|
@@ -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;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,12 +6,13 @@ 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, }: {
|
|
9
|
+
export declare function startRecording({ apiKey, backendApi, domainsToPropagateHeaderTo, domainsToNotPropagateHeaderTo, serviceVersion, serviceIdentifier, gitSha, serviceAdditionalMetadata, enableIpTracking, captureStreamingResponseBody, captureResponseBodyMaxMb, captureStreamPrefixKb, captureStreamTimeoutMs, enableFiberTracking, deferRecording, deferRecordingStart, chunkSnapshot, useWsWorker, maskTextClass, library, }: {
|
|
10
10
|
apiKey: string;
|
|
11
11
|
backendApi?: string;
|
|
12
12
|
domainsToPropagateHeaderTo?: string[];
|
|
13
13
|
domainsToNotPropagateHeaderTo?: string[];
|
|
14
14
|
serviceVersion?: string;
|
|
15
|
+
library?: string;
|
|
15
16
|
serviceIdentifier?: string;
|
|
16
17
|
gitSha?: string;
|
|
17
18
|
serviceAdditionalMetadata?: Record<string, any>;
|
|
@@ -26,6 +27,7 @@ export declare function startRecording({ apiKey, backendApi, domainsToPropagateH
|
|
|
26
27
|
deferRecordingStart?: boolean;
|
|
27
28
|
chunkSnapshot?: boolean;
|
|
28
29
|
useWsWorker?: boolean;
|
|
30
|
+
maskTextClass?: string;
|
|
29
31
|
}): Promise<void>;
|
|
30
32
|
export declare const initRecorder: (options: {
|
|
31
33
|
apiKey: string;
|
|
@@ -38,6 +40,7 @@ export declare const initRecorder: (options: {
|
|
|
38
40
|
gitSha?: string;
|
|
39
41
|
serviceAdditionalMetadata?: Record<string, any>;
|
|
40
42
|
customBaseUrl?: string;
|
|
43
|
+
library?: string;
|
|
41
44
|
enableFiberTracking?: boolean;
|
|
42
45
|
enableIpTracking?: boolean;
|
|
43
46
|
captureStreamingResponseBody?: boolean;
|
|
@@ -75,6 +78,7 @@ export declare const initRecorder: (options: {
|
|
|
75
78
|
chunkSnapshot?: boolean;
|
|
76
79
|
useWsWorker?: boolean;
|
|
77
80
|
showEngTicketFieldsInReportIssueModalDefault?: boolean;
|
|
81
|
+
maskTextClass?: string;
|
|
78
82
|
}) => Promise<void>;
|
|
79
83
|
export * from "./graphql";
|
|
80
84
|
export { openReportIssueModal } from "./inAppReportIssueModal";
|
|
@@ -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;
|
|
@@ -0,0 +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
|
+
};
|
|
31
|
+
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UMD entry point — re-exports everything from index.tsx AND includes
|
|
3
|
+
* the auto-init code for CDN/script-tag usage.
|
|
4
|
+
*
|
|
5
|
+
* This file is ONLY used by the UMD build (vite.umd.config.ts).
|
|
6
|
+
* The ES/CJS builds use index.tsx directly (no auto-init side effects).
|
|
7
|
+
*/
|
|
8
|
+
export * from "./index";
|
|
9
|
+
import "./snippet-auto-init";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UMD entry point — re-exports everything from index.tsx AND includes
|
|
3
|
+
* the auto-init code for CDN/script-tag usage.
|
|
4
|
+
*
|
|
5
|
+
* This file is ONLY used by the UMD build (vite.umd.config.ts).
|
|
6
|
+
* The ES/CJS builds use index.tsx directly (no auto-init side effects).
|
|
7
|
+
*/
|
|
8
|
+
// Re-export all public API
|
|
9
|
+
export * from "./index";
|
|
10
|
+
// Side effect: auto-init from <script> data attributes
|
|
11
|
+
import "./snippet-auto-init";
|
package/dist/utils.js.br
ADDED
|
Binary file
|
package/dist/utils.js.gz
ADDED
|
Binary file
|
package/dist/uuid.js.br
ADDED
|
Binary file
|
package/dist/uuid.js.gz
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sailfish-ai/recorder",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"publishPublicly": true,
|
|
5
|
+
"publishToCdn": {
|
|
6
|
+
"jsdelivr": true,
|
|
7
|
+
"unpkg": true
|
|
8
|
+
},
|
|
5
9
|
"type": "module",
|
|
6
10
|
"main": "dist/recorder.cjs",
|
|
7
11
|
"module": "dist/recorder.js",
|
|
@@ -11,7 +15,7 @@
|
|
|
11
15
|
"sideEffects": false,
|
|
12
16
|
"scripts": {
|
|
13
17
|
"dev": "vite",
|
|
14
|
-
"build": "vite build && tsc --project tsconfig.json",
|
|
18
|
+
"build": "vite build && tsc --project tsconfig.json && vite build --config vite.umd.config.ts",
|
|
15
19
|
"test": "vitest run",
|
|
16
20
|
"test:watch": "vitest watch",
|
|
17
21
|
"check-types": "tsc --noEmit",
|
|
@@ -43,9 +47,9 @@
|
|
|
43
47
|
"dist"
|
|
44
48
|
],
|
|
45
49
|
"dependencies": {
|
|
46
|
-
"@sailfish-rrweb/rrweb-plugin-console-record": "0.5.
|
|
47
|
-
"@sailfish-rrweb/rrweb-record-only": "0.5.
|
|
48
|
-
"@sailfish-rrweb/types": "0.5.
|
|
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",
|
|
49
53
|
"reconnecting-websocket": "^4.4.0",
|
|
50
54
|
"source-map-js": "^1.2.1"
|
|
51
55
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|