@cloudflare/realtimekit 1.2.0-staging.9 → 1.2.1-staging.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/realtimekit",
3
- "version": "1.2.0-staging.9",
3
+ "version": "1.2.1-staging.1",
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",
@@ -12,26 +12,49 @@
12
12
  "typesVersions": {
13
13
  "<4.0": {
14
14
  "*": [
15
- "./dist/ts3.4/index.d.ts"
15
+ "./dist/ts3.4/*"
16
16
  ]
17
17
  }
18
18
  }
19
19
  },
20
20
  "./inlined": {
21
- "default": "./dist/browser.js",
21
+ "default": "./dist/index.iife.js",
22
+ "types": "./dist/index.d.ts",
23
+ "typesVersions": {
24
+ "<4.0": {
25
+ "*": [
26
+ "./dist/ts3.4/*"
27
+ ]
28
+ }
29
+ }
30
+ },
31
+ "./compatible": {
32
+ "import": "./dist/index.es5.js",
22
33
  "types": "./dist/index.d.ts",
23
34
  "typesVersions": {
24
35
  "<4.0": {
25
36
  "*": [
26
- "./dist/ts3.4/index.d.ts"
37
+ "./dist/ts3.4/*"
38
+ ]
39
+ }
40
+ }
41
+ },
42
+ "./e2ee": {
43
+ "import": "./dist/EncryptionManager.es.js",
44
+ "default": "./dist/EncryptionManager.cjs",
45
+ "types": "./dist/EncryptionManager.d.ts",
46
+ "typesVersions": {
47
+ "<4.0": {
48
+ "*": [
49
+ "./dist/ts3.4/*"
27
50
  ]
28
51
  }
29
52
  }
30
53
  },
31
54
  "./mock": {
32
- "import": "./dist/mock.es.js",
33
- "require": "./dist/mock.cjs.js",
34
- "types": "./dist/mock.d.ts",
55
+ "import": "./dist/ClientMock.es.js",
56
+ "require": "./dist/ClientMock.cjs.js",
57
+ "types": "./dist/ClientMock.d.ts",
35
58
  "typesVersions": {
36
59
  "<4.0": {
37
60
  "*": [
@@ -51,7 +74,7 @@
51
74
  }
52
75
  },
53
76
  "bugs": {
54
- "url": "https://realtime.cloudflare.com/issues"
77
+ "url": "https://community.cloudflare.com"
55
78
  },
56
79
  "homepage": "https://realtime.cloudflare.com",
57
80
  "private": false,
@@ -65,8 +88,21 @@
65
88
  "publishConfig": {
66
89
  "tag": "staging"
67
90
  },
68
- "devDependencies": {},
91
+ "devDependencies": {
92
+ "@types/events": "^3.0.0",
93
+ "@types/lodash-es": "^4.17.6",
94
+ "@types/long": "4.0.0",
95
+ "@types/node": "^16.0.0",
96
+ "@types/sdp-transform": "^2.4.5",
97
+ "@types/uuid": "^8.3.4",
98
+ "type-fest": "^2.12.1",
99
+ "@dyteinternals/callstats": "7.2.7",
100
+ "@dyteinternals/proto-entities": "2.110.5",
101
+ "@dyteinternals/sockrates-client": "1.8.5",
102
+ "@dyteinternals/utils": "3.4.0"
103
+ },
69
104
  "scripts": {
105
+ "start": "serve -s dist -l 3000 -n",
70
106
  "postpublish": "mv package.json.bak package.json"
71
107
  }
72
108
  }
@@ -1,30 +0,0 @@
1
- import { Project, SyntaxKind, Scope } from "ts-morph";
2
-
3
- const project = new Project();
4
- const sourceFiles = project.addSourceFilesAtPaths("dist/**/*.d.ts");
5
-
6
- for (const file of sourceFiles) {
7
- file.forEachDescendant((node) => {
8
- if (node.getText().includes("DyteClient")) {
9
- node.replaceWithText(node.getText().replace("DyteClient", "RealtimeKitClient"));
10
- } else if (node.getText().includes("Dyte")) {
11
- node.replaceWithText(node.getText().replace("Dyte", "RTK"));
12
- }
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
- });
28
- }
29
-
30
- project.saveSync();
@@ -1,13 +0,0 @@
1
- import { defineConfig } from 'vite';
2
-
3
- export default defineConfig({
4
- build: {
5
- emptyOutDir: false,
6
- lib: {
7
- entry: 'src/mock.ts',
8
- formats: ['cjs', 'es'],
9
- fileName: (format) => `mock.${format}.js`
10
- },
11
- target: 'es2015'
12
- },
13
- });
package/build-types.sh DELETED
@@ -1,21 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Exit bash script if any of the commands fails
4
- set -e
5
- # Back up the original package.json
6
- cp package.json package.json.bak
7
-
8
- # Remove all dependencies starting with the prefix @dyte-in
9
- # The imported types from these dependencies will be bundled
10
- cat package.json.bak | jq '.dependencies |= delpaths([keys[] | select(contains("@dytesdk")) | [.]])' > package.json
11
-
12
- function restore {
13
- echo "Restoring package.json"
14
- mv package.json.bak package.json
15
- }
16
-
17
- # Always run the restore function on exit
18
- trap restore EXIT
19
-
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/mock.ts --external @protobuf-ts/runtime,worker-timers,bowser,lodash-es,sdp-transform --dts-resolve --dts-only --format esm