posthog-node 2.2.0 → 2.2.2
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/CHANGELOG.md +6 -0
- package/lib/index.cjs.js +18 -6
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.esm.js +18 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/posthog-core/src/index.d.ts +1 -0
- package/lib/posthog-core/src/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/posthog-node.ts +2 -2
package/package.json
CHANGED
package/src/posthog-node.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type PostHogOptions = PosthogCoreOptions & {
|
|
|
17
17
|
personalApiKey?: string
|
|
18
18
|
// The interval in milliseconds between polls for refreshing feature flag definitions
|
|
19
19
|
featureFlagsPollingInterval?: number
|
|
20
|
-
// Timeout in milliseconds for
|
|
20
|
+
// Timeout in milliseconds for any calls. Defaults to 10 seconds.
|
|
21
21
|
requestTimeout?: number
|
|
22
22
|
// Maximum size of cache that deduplicates $feature_flag_called calls per user.
|
|
23
23
|
maxCacheSize?: number
|
|
@@ -84,7 +84,7 @@ export class PostHog implements PostHogNodeV1 {
|
|
|
84
84
|
: THIRTY_SECONDS,
|
|
85
85
|
personalApiKey: options.personalApiKey,
|
|
86
86
|
projectApiKey: apiKey,
|
|
87
|
-
timeout: options.requestTimeout,
|
|
87
|
+
timeout: options.requestTimeout ?? 10,
|
|
88
88
|
host: this._sharedClient.host,
|
|
89
89
|
fetch: options.fetch,
|
|
90
90
|
})
|