@rpcbase/server 0.565.0 → 0.567.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.
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/posthog.d.ts +2 -0
- package/dist/posthog.d.ts.map +1 -1
- package/package.json +14 -2
package/dist/index.js
CHANGED
|
@@ -3754,17 +3754,17 @@ class PostHog extends PostHogBackendClient {
|
|
|
3754
3754
|
}
|
|
3755
3755
|
let client;
|
|
3756
3756
|
let shutdownHookBound = false;
|
|
3757
|
-
const
|
|
3758
|
-
const
|
|
3757
|
+
const resolvePosthogApiKey = (env2) => env2.RB_PUBLIC_POSTHOG_KEY;
|
|
3758
|
+
const resolvePosthogHost = () => "https://eu.i.posthog.com";
|
|
3759
3759
|
const getPosthogClient = (env2) => {
|
|
3760
3760
|
if (client !== void 0) return client;
|
|
3761
|
-
const apiKey =
|
|
3761
|
+
const apiKey = resolvePosthogApiKey(env2);
|
|
3762
3762
|
if (!apiKey) {
|
|
3763
3763
|
client = null;
|
|
3764
3764
|
return client;
|
|
3765
3765
|
}
|
|
3766
3766
|
client = new PostHog(apiKey, {
|
|
3767
|
-
host:
|
|
3767
|
+
host: resolvePosthogHost(),
|
|
3768
3768
|
enableExceptionAutocapture: true,
|
|
3769
3769
|
flushAt: 1,
|
|
3770
3770
|
flushInterval: 1e3
|