@rpcbase/client 0.52.0 → 0.53.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.
@@ -0,0 +1,4 @@
1
+ /* @flow */
2
+ import {DEBUG} from "env"
3
+
4
+ localStorage.debug = DEBUG
@@ -0,0 +1,35 @@
1
+ /* @flow */
2
+ import "./debug"
3
+
4
+ import {PostHogProvider} from "posthog-js/react"
5
+
6
+ import {HashStateProvider} from "../hashState"
7
+
8
+ // TODO: flags here should be optional
9
+ import {flagValues} from "config/flags"
10
+
11
+ import {POSTHOG_KEY} from "env"
12
+
13
+ const AppProvider = ({children, ...props}) => {
14
+
15
+
16
+ return (
17
+ <PostHogProvider
18
+ apiKey={POSTHOG_KEY}
19
+ options={{
20
+ api_host: "https://eu.posthog.com",
21
+ // TODO: this doesn't work
22
+ bootstrap: {
23
+ featureFlags: flagValues,
24
+ },
25
+ }}
26
+ >
27
+ <HashStateProvider>
28
+ {children}
29
+ </HashStateProvider>
30
+ </PostHogProvider>
31
+ )
32
+
33
+ }
34
+
35
+ export default AppProvider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/client",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "scripts": {
5
5
  "test": "echo \"Error: no test specified\" && exit 0"
6
6
  },
@@ -13,6 +13,7 @@
13
13
  "pouchdb-adapter-indexeddb": "8.0.1",
14
14
  "pouchdb-core": "8.0.1",
15
15
  "pouchdb-find": "8.0.1",
16
+ "posthog-js": "1.70.0",
16
17
  "react-i18next": "13.0.1",
17
18
  "socket.io-client": "4.7.1"
18
19
  }
@@ -1,8 +0,0 @@
1
- /* @flow */
2
-
3
-
4
- const AppProvider = () => {
5
-
6
- }
7
-
8
- export default AppProvider