@cloudflare/realtimekit 0.5.0-staging.85 → 0.5.0-staging.88

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.
@@ -1,5 +1,4 @@
1
- import { Project, SyntaxKind } from "ts-morph";
2
- import fs from "fs";
1
+ import { Project, SyntaxKind, Scope } from "ts-morph";
3
2
 
4
3
  const project = new Project();
5
4
  const sourceFiles = project.addSourceFilesAtPaths("dist/**/*.d.ts");
@@ -12,6 +11,20 @@ for (const file of sourceFiles) {
12
11
  node.replaceWithText(node.getText().replace("Dyte", "RTK"));
13
12
  }
14
13
  });
14
+ file.getClasses().forEach(cls => {
15
+ cls.getProperties().forEach(prop => {
16
+ if (prop.hasModifier(SyntaxKind.PrivateKeyword) ||
17
+ prop.hasModifier(SyntaxKind.ProtectedKeyword) ||
18
+ prop.getName().startsWith("#"))
19
+ prop.remove();
20
+ });
21
+ cls.getMethods().forEach(method => {
22
+ if (method.hasScopeKeyword(Scope.Private) ||
23
+ method.hasScopeKeyword(Scope.Protected) ||
24
+ method.getName().startsWith("#"))
25
+ method.remove();
26
+ });
27
+ });
15
28
  }
16
29
 
17
30
  project.saveSync();
package/README.md CHANGED
@@ -68,21 +68,7 @@ const meeting = await RealtimeKit.init({
68
68
  });
69
69
  ```
70
70
 
71
- For React you can use the hooks wrapper
72
-
73
- ```ts
74
- const [meeting, initMeeting] = useRealtimeKitClient();
75
- useEffect(() => {
76
- await initMeeting({
77
- authToken: "<AuthTokenHere>",
78
- defaults: {
79
- audio: false,
80
- video: false,
81
- }
82
- });
83
- }, []);
84
- ```
85
-
71
+ For React you can use the hooks wrapper package `@cloudflare/realtimekit-react`
86
72
 
87
73
  The `meeting` object is used for all interaction with Cloudflare's servers. For example, the following code snippet is used for a user to join a room.
88
74
 
package/build-types.sh CHANGED
@@ -18,20 +18,4 @@ function restore {
18
18
  trap restore EXIT
19
19
 
20
20
  npx tsup src/index.ts --external @protobuf-ts/runtime,worker-timers,bowser,lodash-es,sdp-transform --dts-resolve --dts-only --format esm
21
- npx tsup src/react.ts --external @protobuf-ts/runtime,worker-timers,bowser,lodash-es,sdp-transform --dts-resolve --dts-only --format esm
22
21
  npx tsup src/mock.ts --external @protobuf-ts/runtime,worker-timers,bowser,lodash-es,sdp-transform --dts-resolve --dts-only --format esm
23
-
24
- # temp hack till we replace dyte completely with realtimekit
25
- OS="$(uname)"
26
- SED_CMD=""
27
-
28
- if [[ "$OS" == "Darwin" ]]; then
29
- # macOS (BSD sed requires backup extension or '')
30
- SED_CMD="sed -i '' '/#private;/d'"
31
- else
32
- # Linux (GNU sed)
33
- SED_CMD="sed -i '/#private;/d'"
34
- fi
35
-
36
- # Find and process all .d.ts files
37
- find dist/ -name '*.d.ts' -exec bash -c "$SED_CMD \"{}\"" \;