@cloudflare/realtimekit 1.2.0-staging.9 → 1.2.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/.config/build-types.sh +40 -0
- package/.config/vite.e2ee.es.ts +28 -0
- package/.config/vite.mock.es.ts +25 -3
- package/LICENSE.txt +201 -1
- package/README.md +1 -2
- package/dist/ClientMock.cjs.js +6 -0
- package/dist/ClientMock.d.ts +13 -0
- package/dist/{mock.es.js → ClientMock.es.js} +924 -2486
- package/dist/EncryptionManager.cjs.js +1 -0
- package/dist/EncryptionManager.d.ts +6036 -0
- package/dist/EncryptionManager.es.js +669 -0
- package/dist/dependencies.txt +772 -0
- package/dist/index.cjs.js +13 -21
- package/dist/index.d.ts +1307 -1167
- package/dist/index.es.js +9589 -11701
- package/dist/index.es5.js +29874 -0
- package/dist/index.iife.js +23 -0
- package/dist/index.rn.js +14 -21
- package/dist/ts3.4/dist/ClientMock.d.ts +11 -0
- package/dist/ts3.4/dist/EncryptionManager.d.ts +5980 -0
- package/dist/ts3.4/dist/index.d.ts +2294 -2155
- package/package.json +47 -10
- package/.config/rewrite-types.mjs +0 -30
- package/build-types.sh +0 -21
- package/dist/browser.js +0 -22
- package/dist/mock.cjs.js +0 -7
- package/dist/mock.d.ts +0 -1
- package/dist/ts3.4/dist/mock.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/realtimekit",
|
|
3
|
-
"version": "1.2.0
|
|
3
|
+
"version": "1.2.0",
|
|
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
|
|
15
|
+
"./dist/ts3.4/*"
|
|
16
16
|
]
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"./inlined": {
|
|
21
|
-
"default": "./dist/
|
|
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
|
|
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/
|
|
33
|
-
"require": "./dist/
|
|
34
|
-
"types": "./dist/
|
|
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://
|
|
77
|
+
"url": "https://community.cloudflare.com"
|
|
55
78
|
},
|
|
56
79
|
"homepage": "https://realtime.cloudflare.com",
|
|
57
80
|
"private": false,
|
|
@@ -63,10 +86,24 @@
|
|
|
63
86
|
"worker-timers": "7.0.60"
|
|
64
87
|
},
|
|
65
88
|
"publishConfig": {
|
|
66
|
-
"
|
|
89
|
+
"access": "public",
|
|
90
|
+
"tag": "latest"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@types/events": "^3.0.0",
|
|
94
|
+
"@types/lodash-es": "^4.17.6",
|
|
95
|
+
"@types/long": "4.0.0",
|
|
96
|
+
"@types/node": "^16.0.0",
|
|
97
|
+
"@types/sdp-transform": "^2.4.5",
|
|
98
|
+
"@types/uuid": "^8.3.4",
|
|
99
|
+
"type-fest": "^2.12.1",
|
|
100
|
+
"@dyteinternals/callstats": "7.2.7",
|
|
101
|
+
"@dyteinternals/proto-entities": "2.110.5",
|
|
102
|
+
"@dyteinternals/sockrates-client": "1.8.5",
|
|
103
|
+
"@dyteinternals/utils": "3.4.0"
|
|
67
104
|
},
|
|
68
|
-
"devDependencies": {},
|
|
69
105
|
"scripts": {
|
|
106
|
+
"start": "serve -s dist -l 3000 -n",
|
|
70
107
|
"postpublish": "mv package.json.bak package.json"
|
|
71
108
|
}
|
|
72
109
|
}
|
|
@@ -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();
|
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
|