@cloudflare/realtimekit-react-native 0.1.3-staging.5 → 0.1.4-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.
Files changed (28) hide show
  1. package/lib/package.json +168 -0
  2. package/lib/src/DeviceInfo.d.ts +9 -0
  3. package/lib/src/DeviceInfo.js +27 -0
  4. package/lib/{index.js → src/index.js} +6 -0
  5. package/package.json +2 -2
  6. /package/lib/{AudioSampleHandler.d.ts → src/AudioSampleHandler.d.ts} +0 -0
  7. /package/lib/{AudioSampleHandler.js → src/AudioSampleHandler.js} +0 -0
  8. /package/lib/{BackgroundHandler.d.ts → src/BackgroundHandler.d.ts} +0 -0
  9. /package/lib/{BackgroundHandler.js → src/BackgroundHandler.js} +0 -0
  10. /package/lib/{LocalMediaError.d.ts → src/LocalMediaError.d.ts} +0 -0
  11. /package/lib/{LocalMediaError.js → src/LocalMediaError.js} +0 -0
  12. /package/lib/{LocalMediaHandler.d.ts → src/LocalMediaHandler.d.ts} +0 -0
  13. /package/lib/{LocalMediaHandler.js → src/LocalMediaHandler.js} +0 -0
  14. /package/lib/{LocalMediaInterfaces.d.ts → src/LocalMediaInterfaces.d.ts} +0 -0
  15. /package/lib/{LocalMediaInterfaces.js → src/LocalMediaInterfaces.js} +0 -0
  16. /package/lib/{LocalMediaUtils.d.ts → src/LocalMediaUtils.d.ts} +0 -0
  17. /package/lib/{LocalMediaUtils.js → src/LocalMediaUtils.js} +0 -0
  18. /package/lib/{NativeAudioManager.d.ts → src/NativeAudioManager.d.ts} +0 -0
  19. /package/lib/{NativeAudioManager.js → src/NativeAudioManager.js} +0 -0
  20. /package/lib/{PermissionHandler.d.ts → src/PermissionHandler.d.ts} +0 -0
  21. /package/lib/{PermissionHandler.js → src/PermissionHandler.js} +0 -0
  22. /package/lib/{ReactContext.d.ts → src/ReactContext.d.ts} +0 -0
  23. /package/lib/{ReactContext.js → src/ReactContext.js} +0 -0
  24. /package/lib/{ReactHooks.d.ts → src/ReactHooks.d.ts} +0 -0
  25. /package/lib/{ReactHooks.js → src/ReactHooks.js} +0 -0
  26. /package/lib/{index.d.ts → src/index.d.ts} +0 -0
  27. /package/lib/{utils → src/utils}/crypto.d.ts +0 -0
  28. /package/lib/{utils → src/utils}/crypto.js +0 -0
@@ -0,0 +1,168 @@
1
+ {
2
+ "name": "@cloudflare/realtimekit-react-native",
3
+ "version": "1.1.4-staging.1",
4
+ "description": "Cloudflare RealtimeKit SDK for react native",
5
+ "main": "lib/index.js",
6
+ "types": "lib/index.d.ts",
7
+ "source": "src/index",
8
+ "publishConfig": {
9
+ "registry": "https://registry.npmjs.org/",
10
+ "access": "public",
11
+ "tag": "latest"
12
+ },
13
+ "files": [
14
+ "lib",
15
+ "android",
16
+ "ios",
17
+ "cpp",
18
+ "plugin",
19
+ "app.plugin.js",
20
+ "RealtimeKitCore.podspec",
21
+ "!android/build",
22
+ "!ios/build",
23
+ "!**/__tests__",
24
+ "!**/__fixtures__",
25
+ "!**/__mocks__"
26
+ ],
27
+ "scripts": {
28
+ "test": "jest",
29
+ "typescript": "tsc -p tsconfig.build.json",
30
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
31
+ "prepare": "npm run typescript && tsc --build plugin",
32
+ "release": "release-it",
33
+ "example": "yarn --cwd example",
34
+ "pods": "cd example && pod-install --quiet",
35
+ "bootstrap": "yarn example && yarn && yarn pods",
36
+ "prepublishOnly": "cp package.json package.json.bak && node prepublish.js",
37
+ "postpublish": "mv package.json.bak package.json"
38
+ },
39
+ "keywords": [
40
+ "react-native",
41
+ "ios",
42
+ "android"
43
+ ],
44
+ "repository": "https://github.com/cloudflare",
45
+ "author": "Cloudflare",
46
+ "license": "UNLICENSED",
47
+ "bugs": {
48
+ "url": "https://realtime.cloudflare.com/issues"
49
+ },
50
+ "homepage": "https://realtime.cloudflare.com",
51
+ "dependencies": {
52
+ "@cloudflare/realtimekit": "1.1.7-staging.2",
53
+ "events": "^3.3.0",
54
+ "fast-base64-decode": "1.0.0",
55
+ "node-libs-react-native": "^1.2.1",
56
+ "react-native-url-polyfill": "1.3.0",
57
+ "text-encoding-polyfill": "^0.6.7"
58
+ },
59
+ "devDependencies": {
60
+ "@commitlint/config-conventional": "^11.0.0",
61
+ "@cloudflare/react-native-webrtc": "^125.0.1",
62
+ "@react-native-community/eslint-config": "3.0.0",
63
+ "@release-it/conventional-changelog": "^2.0.0",
64
+ "@semantic-release/changelog": "^5.0.1",
65
+ "@semantic-release/commit-analyzer": "^8.0.1",
66
+ "@semantic-release/exec": "^5.0.0",
67
+ "@semantic-release/git": "^9.0.1",
68
+ "@semantic-release/npm": "^7.1.3",
69
+ "@semantic-release/release-notes-generator": "^9.0.3",
70
+ "@types/jest": "^26.0.0",
71
+ "@types/react": "18.0.25",
72
+ "@types/react-dom": "18.0.9",
73
+ "@types/react-native": "0.67.1",
74
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
75
+ "@typescript-eslint/parser": "^6.21.0",
76
+ "babel-plugin-module-resolver": "^5.0.0",
77
+ "commitlint": "^11.0.0",
78
+ "eslint": "^7.2.0",
79
+ "eslint-config-prettier": "^7.0.0",
80
+ "eslint-plugin-prettier": "^3.1.3",
81
+ "eslint-plugin-react-native": "^4.1.0",
82
+ "expo-module-scripts": "^3.1.0",
83
+ "husky": "^6.0.0",
84
+ "i": "^0.3.7",
85
+ "jest": "^26.0.1",
86
+ "metro-react-native-babel-preset": "^0.77.0",
87
+ "npm": "^9.2.0",
88
+ "pod-install": "^0.1.0",
89
+ "prettier": "^2.0.5",
90
+ "react": "18.2.0",
91
+ "react-native": "0.73.2",
92
+ "react-native-builder-bob": "^0.18.0",
93
+ "typescript": "^5.3.3"
94
+ },
95
+ "peerDependencies": {
96
+ "@cloudflare/react-native-webrtc": "~125.0.1",
97
+ "@expo/config-plugins": "*",
98
+ "react": "*",
99
+ "react-native": "*"
100
+ },
101
+ "jest": {
102
+ "preset": "react-native",
103
+ "testEnvironment": "node",
104
+ "modulePathIgnorePatterns": [
105
+ "<rootDir>/example/node_modules",
106
+ "<rootDir>/lib/"
107
+ ]
108
+ },
109
+ "commitlint": {
110
+ "extends": [
111
+ "@commitlint/config-conventional"
112
+ ]
113
+ },
114
+ "eslintConfig": {
115
+ "root": true,
116
+ "parser": "@typescript-eslint/parser",
117
+ "plugins": [
118
+ "@typescript-eslint"
119
+ ],
120
+ "extends": [
121
+ "@react-native-community",
122
+ "prettier"
123
+ ],
124
+ "globals": {
125
+ "NodeJS": true,
126
+ "React": true,
127
+ "JSX": true
128
+ },
129
+ "rules": {
130
+ "prettier/prettier": [
131
+ "error",
132
+ {
133
+ "quoteProps": "consistent",
134
+ "singleQuote": true,
135
+ "tabWidth": 2,
136
+ "trailingComma": "es5",
137
+ "useTabs": false
138
+ }
139
+ ]
140
+ }
141
+ },
142
+ "eslintIgnore": [
143
+ "node_modules/",
144
+ "lib/",
145
+ "plugin/build"
146
+ ],
147
+ "prettier": {
148
+ "quoteProps": "consistent",
149
+ "singleQuote": true,
150
+ "tabWidth": 2,
151
+ "trailingComma": "es5",
152
+ "useTabs": false
153
+ },
154
+ "react-native-builder-bob": {
155
+ "source": "src",
156
+ "output": "lib",
157
+ "targets": [
158
+ "commonjs",
159
+ "module",
160
+ [
161
+ "typescript",
162
+ {
163
+ "project": "tsconfig.build.json"
164
+ }
165
+ ]
166
+ ]
167
+ }
168
+ }
@@ -0,0 +1,9 @@
1
+ declare class DeviceInfo {
2
+ private deviceInfo;
3
+ constructor();
4
+ private getSdkVersion;
5
+ private getReactNativeVersion;
6
+ getDeviceInfo(): any;
7
+ }
8
+ declare const _default: DeviceInfo;
9
+ export default _default;
@@ -0,0 +1,27 @@
1
+ import { Platform } from 'react-native';
2
+ import sdk_package from '../package.json';
3
+ class DeviceInfo {
4
+ constructor() {
5
+ this.deviceInfo = {
6
+ isMobile: true,
7
+ isReactNative: true,
8
+ osName: Platform.OS,
9
+ osVersion: Platform.Version,
10
+ reactNativeVersion: this.getReactNativeVersion(),
11
+ sdkType: 'realtimekit-react-native',
12
+ reactNativeSdkVersion: this.getSdkVersion(),
13
+ };
14
+ }
15
+ getSdkVersion() {
16
+ const version = sdk_package.version;
17
+ return '0.1.4' + version.slice(5);
18
+ }
19
+ getReactNativeVersion() {
20
+ const version = Platform.constants.reactNativeVersion;
21
+ return version.major + '.' + version.minor + '.' + version.patch;
22
+ }
23
+ getDeviceInfo() {
24
+ return this.deviceInfo;
25
+ }
26
+ }
27
+ export default new DeviceInfo();
@@ -8,6 +8,7 @@ import './utils/crypto';
8
8
  import 'text-encoding-polyfill';
9
9
  import 'node-libs-react-native/globals';
10
10
  import 'react-native-url-polyfill/auto';
11
+ import DeviceInfo from './DeviceInfo';
11
12
  export { RealtimeKitProvider, useRealtimeKitClient, useRTKSelector, useRealtimeKitSelector, useRealtimeKitMeeting, } from './ReactHooks';
12
13
  registerGlobals();
13
14
  const LINKING_ERROR = `The package '@cloudflare/realtimekit-react-native' doesn't seem to be linked. Make sure: \n\n` +
@@ -49,4 +50,9 @@ Object.defineProperty(navigator, 'RNBackgroundTimerImpl', {
49
50
  return BackgroundTimer;
50
51
  },
51
52
  });
53
+ Object.defineProperty(navigator, 'RNDeviceInfoImpl', {
54
+ get: function () {
55
+ return DeviceInfo;
56
+ },
57
+ });
52
58
  export default RealtimeKitMeeting;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/realtimekit-react-native",
3
- "version": "0.1.3-staging.5",
3
+ "version": "0.1.4-staging.1",
4
4
  "description": "Cloudflare RealtimeKit SDK for react native",
5
5
  "main": "lib/index.js",
6
6
  "author": "Cloudflare",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "private": false,
27
27
  "dependencies": {
28
- "@cloudflare/realtimekit": "1.1.5",
28
+ "@cloudflare/realtimekit": "1.1.7-staging.2",
29
29
  "events": "^3.3.0",
30
30
  "fast-base64-decode": "1.0.0",
31
31
  "node-libs-react-native": "^1.2.1",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes