@sailfish-ai/recorder 1.0.4 → 1.0.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.
@@ -4,6 +4,7 @@ import { CaptureSettings } from "./types";
4
4
  export declare const DEFAULT_CAPTURE_SETTINGS: CaptureSettings;
5
5
  export declare const DEFAULT_CONSOLE_RECORDING_SETTINGS: LogRecordOptions;
6
6
  export declare const DEFAULT_NETWORK_CAPTURE_SETTINGS: NetworkRecordOptions;
7
+ export declare function matchUrlWithWildcard(url: string, patterns: string[]): boolean;
7
8
  export declare function startRecording({ apiKey, backendApi, domainsToNotPropagateHeaderTo, }: {
8
9
  apiKey: string;
9
10
  backendApi: string;
package/dist/websocket.js CHANGED
@@ -16,7 +16,8 @@ function flushMessageQueue() {
16
16
  }
17
17
  export function initializeWebSocket(backendApi, apiKey, sessionId) {
18
18
  const wsHost = getWebSocketHost(backendApi);
19
- const wsScheme = window.location.protocol === "https:" ? "wss" : "ws";
19
+ const apiProtocol = new URL(backendApi).protocol;
20
+ const wsScheme = apiProtocol === "https:" ? "wss" : "ws";
20
21
  const wsUrl = `${wsScheme}://${wsHost}/ws/notify/?apiKey=${apiKey}&sessionId=${sessionId}&sender=JS%2FTS&version=${version}`;
21
22
  const options = {
22
23
  connectionTimeout: 10000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailfish-ai/recorder",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "publishPublicly": true,
5
5
  "main": "dist/sailfish-recorder.umd.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -38,8 +38,10 @@
38
38
  "@vitejs/plugin-vue": "^5.1.3",
39
39
  "jest": "^29.7.0",
40
40
  "jest-transform-stub": "^2.0.0",
41
+ "jsdom": "^25.0.0",
41
42
  "ts-jest": "^29.2.3",
42
43
  "typescript": "^5.0.0",
44
+ "vitest": "^2.1.1",
43
45
  "vue": "^3.4.33"
44
46
  }
45
47
  }