@cloudflare/realtimekit-react 2.0.3-staging.1 → 2.0.3-staging.10
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/build-types.sh +0 -2
- package/example/App.tsx +7 -10
- package/package.json +2 -2
package/build-types.sh
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
# Back up the original package.json
|
|
3
3
|
cp package.json package.json.bak
|
|
4
4
|
|
|
5
|
-
# Remove all dependencies starting with the prefix @dyte-in
|
|
6
5
|
# The imported types from these dependencies will be bundled
|
|
7
|
-
# cat package.json.bak | jq '.dependencies |= delpaths([keys[] | select(contains("@dytesdk")) | [.]])' > package.json
|
|
8
6
|
|
|
9
7
|
npx tsup src/index.ts --external @protobuf-ts/runtime --external axios --dts-resolve --dts-only --format esm
|
|
10
8
|
|
package/example/App.tsx
CHANGED
|
@@ -7,18 +7,15 @@ import Chat from './components/Chat';
|
|
|
7
7
|
|
|
8
8
|
function App() {
|
|
9
9
|
const [client, loadClient] = useRealtimeKitClient();
|
|
10
|
+
const authToken = new URLSearchParams(window.location.search).get('authToken');
|
|
10
11
|
|
|
11
12
|
useEffect(() => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
defaults: { video: false, audio: false },
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
}, []);
|
|
13
|
+
if (!authToken) return;
|
|
14
|
+
loadClient({
|
|
15
|
+
authToken,
|
|
16
|
+
defaults: { video: false, audio: false },
|
|
17
|
+
});
|
|
18
|
+
}, [authToken, loadClient]);
|
|
22
19
|
|
|
23
20
|
Object.assign(window, { client });
|
|
24
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/realtimekit-react",
|
|
3
|
-
"version": "2.0.3-staging.
|
|
3
|
+
"version": "2.0.3-staging.10",
|
|
4
4
|
"description": "A real-time video and audio SDK for building custom, collaborative communication experiences.",
|
|
5
5
|
"main": "./dist/index.cjs.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"private": false,
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@cloudflare/realtimekit": "2.0.3-staging.
|
|
20
|
+
"@cloudflare/realtimekit": "2.0.3-staging.10"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": ">=16.8.6"
|