posthog-js-lite 3.0.0-beta.2 → 3.0.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.
@@ -8,6 +8,7 @@ export declare abstract class PostHogCoreStateless {
8
8
  host: string;
9
9
  private flushAt;
10
10
  private maxBatchSize;
11
+ private maxQueueSize;
11
12
  private flushInterval;
12
13
  private flushPromise;
13
14
  private requestTimeout;
@@ -78,6 +79,9 @@ export declare abstract class PostHogCoreStateless {
78
79
  */
79
80
  private flushBackground;
80
81
  flush(): Promise<any[]>;
82
+ protected getCustomHeaders(): {
83
+ [key: string]: string;
84
+ };
81
85
  private _flush;
82
86
  private fetchWithRetry;
83
87
  shutdown(shutdownTimeoutMs?: number): Promise<void>;
@@ -7,6 +7,10 @@ export declare type PostHogCoreOptions = {
7
7
  flushInterval?: number;
8
8
  /** The maximum number of queued messages to be flushed as part of a single batch (must be higher than `flushAt`) */
9
9
  maxBatchSize?: number;
10
+ /** The maximum number of cached messages either in memory or on the local storage.
11
+ * Defaults to 1000, (must be higher than `flushAt`)
12
+ */
13
+ maxQueueSize?: number;
10
14
  /** If set to true the SDK is essentially disabled (useful for local environments where you don't want to track anything) */
11
15
  disabled?: boolean;
12
16
  /** If set to false the SDK will not track until the `optIn` function is called. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-js-lite",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0",
4
4
  "main": "lib/index.cjs.js",
5
5
  "module": "lib/index.esm.js",
6
6
  "types": "lib/index.d.ts",