@sailfish-ai/recorder 1.10.13 → 1.11.0
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-CodMnuS3.js → chunkSerializer-CRDpgzTs.js} +1 -1
- package/dist/chunks/chunkSerializer-CRDpgzTs.js.br +0 -0
- package/dist/chunks/chunkSerializer-CRDpgzTs.js.gz +0 -0
- package/dist/chunks/{chunkSerializer-Dk1eF3S8.js → chunkSerializer-ZzIoYlP2.js} +1 -1
- package/dist/chunks/chunkSerializer-ZzIoYlP2.js.br +0 -0
- package/dist/chunks/chunkSerializer-ZzIoYlP2.js.gz +0 -0
- package/dist/chunks/{index-DW416eVj.js → index-BQn1Q-2-.js} +36 -32
- package/dist/chunks/index-BQn1Q-2-.js.br +0 -0
- package/dist/chunks/index-BQn1Q-2-.js.gz +0 -0
- package/dist/chunks/{index-DvLh2k6O.js → index-Dq_tjmkZ.js} +30 -26
- package/dist/chunks/index-Dq_tjmkZ.js.br +0 -0
- package/dist/chunks/index-Dq_tjmkZ.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.br +0 -0
- package/dist/inAppReportIssueModal/index.js.gz +0 -0
- 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 +44 -34
- 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 +1 -1
- package/dist/recorder.cjs.br +0 -0
- package/dist/recorder.cjs.gz +0 -0
- package/dist/recorder.js +1 -1
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +8883 -0
- package/dist/recorder.umd.cjs.br +0 -0
- package/dist/recorder.umd.cjs.gz +0 -0
- 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.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 +44 -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/index.d.ts +3 -1
- package/dist/types/snippet-auto-init.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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,44 @@
|
|
|
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 and checks document.currentScript for data-api-key to auto-initialize.
|
|
6
|
+
*
|
|
7
|
+
* CRITICAL: Everything is wrapped in try/catch. A Sailfish error must
|
|
8
|
+
* NEVER break the customer's application.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* <script src="https://cdn.jsdelivr.net/npm/@sailfish-ai/recorder@1/dist/recorder.umd.js"
|
|
12
|
+
* data-api-key="YOUR_API_KEY"
|
|
13
|
+
* data-service-identifier="my-app"
|
|
14
|
+
* data-service-version="1.0.0"
|
|
15
|
+
* data-backend-api="https://api-service.sailfish.ai"
|
|
16
|
+
* ></script>
|
|
17
|
+
*/
|
|
18
|
+
import { initRecorder } from "./index";
|
|
19
|
+
try {
|
|
20
|
+
if (typeof document !== "undefined" && document.currentScript) {
|
|
21
|
+
const script = document.currentScript;
|
|
22
|
+
if (script.dataset?.apiKey) {
|
|
23
|
+
const opts = {
|
|
24
|
+
apiKey: script.dataset.apiKey,
|
|
25
|
+
};
|
|
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";
|
|
36
|
+
initRecorder(opts).catch(() => {
|
|
37
|
+
// Silently swallow — never break customer's app
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
catch (_) {
|
|
43
|
+
// Silently swallow any errors during auto-init
|
|
44
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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, 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>;
|
|
@@ -38,6 +39,7 @@ export declare const initRecorder: (options: {
|
|
|
38
39
|
gitSha?: string;
|
|
39
40
|
serviceAdditionalMetadata?: Record<string, any>;
|
|
40
41
|
customBaseUrl?: string;
|
|
42
|
+
library?: string;
|
|
41
43
|
enableFiberTracking?: boolean;
|
|
42
44
|
enableIpTracking?: boolean;
|
|
43
45
|
captureStreamingResponseBody?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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.0",
|
|
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
|