@brainfish-ai/web-tracker 0.0.9 → 0.0.11-alpha.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.
@@ -1 +1,8 @@
1
- export default function canDiscover(recordingBlocklist: string[]): boolean;
1
+ /**
2
+ * Determines if the current page can be discovered for recording purposes.
3
+ *
4
+ * @param recordingBlocklist - List of path patterns that should not be recorded
5
+ * @param allowLocalhostRecording - Override to allow recording on localhost/127.0.0.1
6
+ * @returns boolean - true if the current page can be discovered, false otherwise
7
+ */
8
+ export default function canDiscover(recordingBlocklist: string[], allowLocalhostRecording?: boolean): boolean;
@@ -1 +1,6 @@
1
+ /**
2
+ * Checks if the current hostname is a local development environment
3
+ *
4
+ * @returns boolean - true if the hostname is localhost or 127.0.0.1, false otherwise
5
+ */
1
6
  export default function isLocal(): boolean;
@@ -7,6 +7,7 @@ export type TrackerOptions = TrackerSdkOptions & {
7
7
  trackHashChanges?: boolean;
8
8
  enableRecording?: boolean;
9
9
  recordingBlocklist?: string[];
10
+ _allowLocalhostRecording?: boolean;
10
11
  };
11
12
  export declare const VERSION: string;
12
13
  export declare class Tracker extends TrackerSdk {
@@ -9,11 +9,13 @@ export default class Agent {
9
9
  timer: Timer | undefined;
10
10
  sendEvents: ((events: any[]) => Promise<void>) | undefined;
11
11
  recordingBlocklist: string[];
12
+ _allowLocalhostRecording?: boolean;
12
13
  constructor();
13
- start({ endpoint, sendEvents, recordingBlocklist, }: {
14
+ start({ endpoint, sendEvents, recordingBlocklist, _allowLocalhostRecording, }: {
14
15
  endpoint: string;
15
16
  sendEvents: (events: any[]) => Promise<void>;
16
17
  recordingBlocklist: string[];
18
+ _allowLocalhostRecording?: boolean;
17
19
  }): Promise<void>;
18
20
  handleTimeout(): void;
19
21
  takeFullSnapshot(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainfish-ai/web-tracker",
3
- "version": "0.0.9",
3
+ "version": "0.0.11-alpha.1",
4
4
  "main": "dist/index.js",
5
5
  "description": "Brainfish Tracker for Web",
6
6
  "files": [