@sailfish-ai/recorder 1.7.50 → 1.8.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.
Binary file
Binary file
@@ -0,0 +1,2 @@
1
+ export declare function readDebugFlag(): boolean;
2
+ export declare function readGitSha(): string | undefined;
package/dist/websocket.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import ReconnectingWebSocket from "reconnecting-websocket";
2
+ import { readDebugFlag } from "./env";
2
3
  import { deleteEventsByIds, getAllIndexedEvents, saveEventToIDB, } from "./eventStore";
3
4
  import { deleteNotifyMessageById, getAllNotifyMessages, saveNotifyMessageToIDB, } from "./notifyEventStore";
4
5
  import { getOrSetSessionId } from "./session";
5
6
  import { buildBatches, eventSize } from "./utils";
6
7
  import version from "./version";
8
+ const DEBUG = readDebugFlag(); // A wrapper around fetch that suppresses connection refused errors
7
9
  const MAX_MESSAGE_SIZE_MB = 50;
8
10
  const MAX_MESSAGE_SIZE_BYTES = MAX_MESSAGE_SIZE_MB * 1024 * 1024;
9
- const DEBUG = import.meta.env.VITE_DEBUG ? import.meta.env.VITE_DEBUG : false;
10
11
  let webSocket = null;
11
12
  let isDraining = false;
12
13
  let inFlightFlush = null;
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@sailfish-ai/recorder",
3
- "version": "1.7.50",
3
+ "version": "1.8.1",
4
4
  "publishPublicly": true,
5
- "main": "dist/sailfish-recorder.umd.js",
5
+ "main": "dist/sailfish-recorder.cjs.js",
6
+ "module": "dist/sailfish-recorder.es.js",
6
7
  "types": "dist/types/index.d.ts",
7
8
  "scripts": {
8
9
  "dev": "vite",
@@ -19,9 +20,12 @@
19
20
  ],
20
21
  "exports": {
21
22
  ".": {
23
+ "types": "./dist/types/index.d.ts",
22
24
  "import": "./dist/sailfish-recorder.es.js",
23
- "require": "./dist/sailfish-recorder.cjs.js"
24
- }
25
+ "require": "./dist/sailfish-recorder.cjs.js",
26
+ "default": "./dist/sailfish-recorder.es.js"
27
+ },
28
+ "./package.json": "./package.json"
25
29
  },
26
30
  "dependencies": {
27
31
  "@sailfish-rrweb/rrweb-plugin-console-record": "0.5.2",
@@ -29,19 +33,14 @@
29
33
  "@sailfish-rrweb/types": "0.5.2",
30
34
  "async-mutex": "^0.5.0",
31
35
  "idb": "^8.0.3",
32
- "react-zendesk": "^0.1.13",
33
36
  "reconnecting-websocket": "^4.4.0",
34
37
  "source-map-js": "^1.2.1",
35
- "uuid": "^10.0.0",
36
- "vite": "^6.2.0",
37
- "vite-tsconfig-paths": "^4.3.2"
38
+ "uuid": "^10.0.0"
38
39
  },
39
40
  "devDependencies": {
40
41
  "@rollup/plugin-terser": "^0.4.4",
41
42
  "@types/jest": "^30.0.0",
42
43
  "@types/node": "^20.19.10",
43
- "@types/react": "^19.1.8",
44
- "@types/react-dom": "^19.1.6",
45
44
  "@types/uuid": "^10.0.0",
46
45
  "fake-indexeddb": "^6.0.1",
47
46
  "jest": "^30.0.4",
@@ -49,13 +48,13 @@
49
48
  "jest-localstorage-mock": "^2.4.26",
50
49
  "jest-transform-stub": "^2.0.0",
51
50
  "jsdom": "^25.0.0",
52
- "react": "^19.1.0",
53
- "react-dom": "^19.1.0",
54
51
  "rollup-plugin-dts": "^6.1.1",
55
52
  "rollup-plugin-visualizer": "^5.12.0",
56
53
  "ts-jest": "^29.4.0",
57
54
  "typescript": "^5.0.0",
55
+ "vite": "^6.2.0",
58
56
  "vite-plugin-compression": "^0.5.1",
57
+ "vite-tsconfig-paths": "^4.3.2",
59
58
  "vitest": "^3.0.8"
60
59
  }
61
60
  }