react-native-tcp-windows 0.2.0 → 0.2.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/lib/commonjs/ReactNativeTcpWindows.js.map +1 -1
- package/lib/commonjs/index.js +37 -37
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/ReactNativeTcpWindows.js.map +1 -1
- package/lib/module/index.js +37 -37
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/ReactNativeTcpWindows.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/module/ReactNativeTcpWindows.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/package.json +205 -204
- package/src/ReactNativeTcpWindows.ts +14 -14
- package/src/index.tsx +124 -124
- package/windows/ExperimentalFeatures.props +33 -33
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.cpp +206 -206
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.def +3 -3
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.h +83 -83
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.vcxproj +145 -145
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.vcxproj.filters +43 -43
- package/windows/ReactNativeTcpWindows/ReactPackageProvider.cpp +20 -20
- package/windows/ReactNativeTcpWindows/ReactPackageProvider.h +24 -24
- package/windows/ReactNativeTcpWindows/ReactPackageProvider.idl +9 -9
- package/windows/ReactNativeTcpWindows/TcpSocket.cpp +564 -564
- package/windows/ReactNativeTcpWindows/codegen/NativeReactNativeTcpWindowsSpec.g.h +71 -71
- package/windows/ReactNativeTcpWindows/packages.lock.json +59 -59
- package/windows/ReactNativeTcpWindows/pch.cpp +1 -1
- package/windows/ReactNativeTcpWindows/pch.h +30 -30
- package/windows/ReactNativeTcpWindows/resource.h +5 -5
- package/windows/ReactNativeTcpWindows/targetver.h +8 -8
- package/windows/ReactNativeTcpWindows.sln +43 -43
- package/lib/typescript/commonjs/src/ReactNativeTcpWindows.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/__tests__/index.test.d.ts +0 -1
- package/lib/typescript/commonjs/src/__tests__/index.test.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/ReactNativeTcpWindows.d.ts.map +0 -1
- package/lib/typescript/module/src/__tests__/index.test.d.ts +0 -1
- package/lib/typescript/module/src/__tests__/index.test.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- /package/lib/typescript/commonjs/{src/ReactNativeTcpWindows.d.ts → ReactNativeTcpWindows.d.ts} +0 -0
- /package/lib/typescript/commonjs/{src/index.d.ts → index.d.ts} +0 -0
- /package/lib/typescript/module/{src/ReactNativeTcpWindows.d.ts → ReactNativeTcpWindows.d.ts} +0 -0
- /package/lib/typescript/module/{src/index.d.ts → index.d.ts} +0 -0
package/package.json
CHANGED
@@ -1,204 +1,205 @@
|
|
1
|
-
{
|
2
|
-
"name": "react-native-tcp-windows",
|
3
|
-
"version": "0.2.
|
4
|
-
"description": "TCP sockets communication for RNW",
|
5
|
-
"source": "./src/index.tsx",
|
6
|
-
"main": "./lib/commonjs/index.js",
|
7
|
-
"module": "./lib/module/index.js",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": {
|
11
|
-
"types": "./lib/typescript/module/
|
12
|
-
"default": "./lib/module/index.js"
|
13
|
-
},
|
14
|
-
"require": {
|
15
|
-
"types": "./lib/typescript/commonjs/
|
16
|
-
"default": "./lib/commonjs/index.js"
|
17
|
-
}
|
18
|
-
},
|
19
|
-
"./package.json": "./package.json"
|
20
|
-
},
|
21
|
-
"files": [
|
22
|
-
"src",
|
23
|
-
"lib",
|
24
|
-
"cpp",
|
25
|
-
"react-native.config.js",
|
26
|
-
"windows"
|
27
|
-
],
|
28
|
-
"scripts": {
|
29
|
-
"example": "yarn workspace react-native-tcp-windows-example",
|
30
|
-
"test": "jest",
|
31
|
-
"typecheck": "tsc",
|
32
|
-
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
33
|
-
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
34
|
-
"prepare": "bob build",
|
35
|
-
"codegen": "react-native codegen-windows",
|
36
|
-
"release": "release-it"
|
37
|
-
},
|
38
|
-
"keywords": [
|
39
|
-
"react-native",
|
40
|
-
"react-native-windows",
|
41
|
-
"tcp"
|
42
|
-
],
|
43
|
-
"repository": {
|
44
|
-
"type": "git",
|
45
|
-
"url": "git+https://github.com/KGGrande/react-native-tcp-windows.git"
|
46
|
-
},
|
47
|
-
"author": "Kyle Grande <KGGrande@hormel.com> (https://github.com/KGGrande)",
|
48
|
-
"license": "MIT",
|
49
|
-
"bugs": {
|
50
|
-
"url": "https://github.com/KGGrande/react-native-tcp-windows/issues"
|
51
|
-
},
|
52
|
-
"homepage": "https://github.com/KGGrande/react-native-tcp-windows#readme",
|
53
|
-
"publishConfig": {
|
54
|
-
"registry": "https://registry.npmjs.org/"
|
55
|
-
},
|
56
|
-
"devDependencies": {
|
57
|
-
"@commitlint/config-conventional": "^19.6.0",
|
58
|
-
"@evilmartians/lefthook": "^1.5.0",
|
59
|
-
"@react-native-community/cli": "18.0.0",
|
60
|
-
"@react-native/eslint-config": "^0.73.1",
|
61
|
-
"@release-it/conventional-changelog": "^9.0.2",
|
62
|
-
"@types/jest": "^29.5.5",
|
63
|
-
"@types/react": "^19.0.0",
|
64
|
-
"commitlint": "^19.6.1",
|
65
|
-
"del-cli": "^5.1.0",
|
66
|
-
"eslint": "^8.51.0",
|
67
|
-
"eslint-config-prettier": "^9.0.0",
|
68
|
-
"eslint-plugin-prettier": "^5.0.1",
|
69
|
-
"jest": "^29.7.0",
|
70
|
-
"prettier": "^3.0.3",
|
71
|
-
"react": "19.0.0",
|
72
|
-
"react-native": "0.79.0",
|
73
|
-
"react-native-builder-bob": "^0.38.3",
|
74
|
-
"react-native-windows": "0.79.0",
|
75
|
-
"release-it": "^17.10.0",
|
76
|
-
"turbo": "^1.10.7",
|
77
|
-
"typescript": "^5.
|
78
|
-
},
|
79
|
-
"peerDependencies": {
|
80
|
-
"react": "*",
|
81
|
-
"react-native": "*",
|
82
|
-
"react-native-windows": "*"
|
83
|
-
},
|
84
|
-
"workspaces": [
|
85
|
-
"example"
|
86
|
-
],
|
87
|
-
"packageManager": "yarn@3.6.1",
|
88
|
-
"jest": {
|
89
|
-
"preset": "react-native",
|
90
|
-
"modulePathIgnorePatterns": [
|
91
|
-
"<rootDir>/example/node_modules",
|
92
|
-
"<rootDir>/lib/"
|
93
|
-
]
|
94
|
-
},
|
95
|
-
"commitlint": {
|
96
|
-
"extends": [
|
97
|
-
"@commitlint/config-conventional"
|
98
|
-
]
|
99
|
-
},
|
100
|
-
"release-it": {
|
101
|
-
"git": {
|
102
|
-
"commitMessage": "chore: release ${version}",
|
103
|
-
"tagName": "v${version}"
|
104
|
-
},
|
105
|
-
"npm": {
|
106
|
-
"publish": true
|
107
|
-
},
|
108
|
-
"github": {
|
109
|
-
"release": true
|
110
|
-
},
|
111
|
-
"plugins": {
|
112
|
-
"@release-it/conventional-changelog": {
|
113
|
-
"preset": {
|
114
|
-
"name": "angular"
|
115
|
-
}
|
116
|
-
}
|
117
|
-
}
|
118
|
-
},
|
119
|
-
"eslintConfig": {
|
120
|
-
"root": true,
|
121
|
-
"extends": [
|
122
|
-
"@react-native",
|
123
|
-
"prettier"
|
124
|
-
],
|
125
|
-
"rules": {
|
126
|
-
"react/react-in-jsx-scope": "off",
|
127
|
-
"prettier/prettier": [
|
128
|
-
"error",
|
129
|
-
{
|
130
|
-
"quoteProps": "consistent",
|
131
|
-
"singleQuote": true,
|
132
|
-
"tabWidth": 2,
|
133
|
-
"trailingComma": "es5",
|
134
|
-
"useTabs": false
|
135
|
-
}
|
136
|
-
]
|
137
|
-
}
|
138
|
-
},
|
139
|
-
"eslintIgnore": [
|
140
|
-
"node_modules/",
|
141
|
-
"lib/"
|
142
|
-
],
|
143
|
-
"prettier": {
|
144
|
-
"quoteProps": "consistent",
|
145
|
-
"singleQuote": true,
|
146
|
-
"tabWidth": 2,
|
147
|
-
"trailingComma": "es5",
|
148
|
-
"useTabs": false
|
149
|
-
},
|
150
|
-
"react-native-builder-bob": {
|
151
|
-
"source": "src",
|
152
|
-
"output": "lib",
|
153
|
-
"targets": [
|
154
|
-
[
|
155
|
-
"module",
|
156
|
-
{
|
157
|
-
"esm": true
|
158
|
-
}
|
159
|
-
],
|
160
|
-
[
|
161
|
-
"commonjs",
|
162
|
-
{
|
163
|
-
"esm": true
|
164
|
-
}
|
165
|
-
],
|
166
|
-
[
|
167
|
-
"typescript",
|
168
|
-
{
|
169
|
-
"
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
"
|
177
|
-
"
|
178
|
-
"
|
179
|
-
|
180
|
-
"
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
"
|
187
|
-
|
188
|
-
"
|
189
|
-
"
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
"
|
195
|
-
"
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
"
|
201
|
-
"
|
202
|
-
|
203
|
-
|
204
|
-
}
|
1
|
+
{
|
2
|
+
"name": "react-native-tcp-windows",
|
3
|
+
"version": "0.2.1",
|
4
|
+
"description": "TCP sockets communication for RNW",
|
5
|
+
"source": "./src/index.tsx",
|
6
|
+
"main": "./lib/commonjs/index.js",
|
7
|
+
"module": "./lib/module/index.js",
|
8
|
+
"exports": {
|
9
|
+
".": {
|
10
|
+
"import": {
|
11
|
+
"types": "./lib/typescript/module/index.d.ts",
|
12
|
+
"default": "./lib/module/index.js"
|
13
|
+
},
|
14
|
+
"require": {
|
15
|
+
"types": "./lib/typescript/commonjs/index.d.ts",
|
16
|
+
"default": "./lib/commonjs/index.js"
|
17
|
+
}
|
18
|
+
},
|
19
|
+
"./package.json": "./package.json"
|
20
|
+
},
|
21
|
+
"files": [
|
22
|
+
"src",
|
23
|
+
"lib",
|
24
|
+
"cpp",
|
25
|
+
"react-native.config.js",
|
26
|
+
"windows"
|
27
|
+
],
|
28
|
+
"scripts": {
|
29
|
+
"example": "yarn workspace react-native-tcp-windows-example",
|
30
|
+
"test": "jest",
|
31
|
+
"typecheck": "tsc",
|
32
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
33
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
34
|
+
"prepare": "bob build",
|
35
|
+
"codegen": "react-native codegen-windows",
|
36
|
+
"release": "release-it"
|
37
|
+
},
|
38
|
+
"keywords": [
|
39
|
+
"react-native",
|
40
|
+
"react-native-windows",
|
41
|
+
"tcp"
|
42
|
+
],
|
43
|
+
"repository": {
|
44
|
+
"type": "git",
|
45
|
+
"url": "git+https://github.com/KGGrande/react-native-tcp-windows.git"
|
46
|
+
},
|
47
|
+
"author": "Kyle Grande <KGGrande@hormel.com> (https://github.com/KGGrande)",
|
48
|
+
"license": "MIT",
|
49
|
+
"bugs": {
|
50
|
+
"url": "https://github.com/KGGrande/react-native-tcp-windows/issues"
|
51
|
+
},
|
52
|
+
"homepage": "https://github.com/KGGrande/react-native-tcp-windows#readme",
|
53
|
+
"publishConfig": {
|
54
|
+
"registry": "https://registry.npmjs.org/"
|
55
|
+
},
|
56
|
+
"devDependencies": {
|
57
|
+
"@commitlint/config-conventional": "^19.6.0",
|
58
|
+
"@evilmartians/lefthook": "^1.5.0",
|
59
|
+
"@react-native-community/cli": "18.0.0",
|
60
|
+
"@react-native/eslint-config": "^0.73.1",
|
61
|
+
"@release-it/conventional-changelog": "^9.0.2",
|
62
|
+
"@types/jest": "^29.5.5",
|
63
|
+
"@types/react": "^19.0.0",
|
64
|
+
"commitlint": "^19.6.1",
|
65
|
+
"del-cli": "^5.1.0",
|
66
|
+
"eslint": "^8.51.0",
|
67
|
+
"eslint-config-prettier": "^9.0.0",
|
68
|
+
"eslint-plugin-prettier": "^5.0.1",
|
69
|
+
"jest": "^29.7.0",
|
70
|
+
"prettier": "^3.0.3",
|
71
|
+
"react": "19.0.0",
|
72
|
+
"react-native": "0.79.0",
|
73
|
+
"react-native-builder-bob": "^0.38.3",
|
74
|
+
"react-native-windows": "0.79.0",
|
75
|
+
"release-it": "^17.10.0",
|
76
|
+
"turbo": "^1.10.7",
|
77
|
+
"typescript": "^5.9.2"
|
78
|
+
},
|
79
|
+
"peerDependencies": {
|
80
|
+
"react": "*",
|
81
|
+
"react-native": "*",
|
82
|
+
"react-native-windows": "*"
|
83
|
+
},
|
84
|
+
"workspaces": [
|
85
|
+
"example"
|
86
|
+
],
|
87
|
+
"packageManager": "yarn@3.6.1",
|
88
|
+
"jest": {
|
89
|
+
"preset": "react-native",
|
90
|
+
"modulePathIgnorePatterns": [
|
91
|
+
"<rootDir>/example/node_modules",
|
92
|
+
"<rootDir>/lib/"
|
93
|
+
]
|
94
|
+
},
|
95
|
+
"commitlint": {
|
96
|
+
"extends": [
|
97
|
+
"@commitlint/config-conventional"
|
98
|
+
]
|
99
|
+
},
|
100
|
+
"release-it": {
|
101
|
+
"git": {
|
102
|
+
"commitMessage": "chore: release ${version}",
|
103
|
+
"tagName": "v${version}"
|
104
|
+
},
|
105
|
+
"npm": {
|
106
|
+
"publish": true
|
107
|
+
},
|
108
|
+
"github": {
|
109
|
+
"release": true
|
110
|
+
},
|
111
|
+
"plugins": {
|
112
|
+
"@release-it/conventional-changelog": {
|
113
|
+
"preset": {
|
114
|
+
"name": "angular"
|
115
|
+
}
|
116
|
+
}
|
117
|
+
}
|
118
|
+
},
|
119
|
+
"eslintConfig": {
|
120
|
+
"root": true,
|
121
|
+
"extends": [
|
122
|
+
"@react-native",
|
123
|
+
"prettier"
|
124
|
+
],
|
125
|
+
"rules": {
|
126
|
+
"react/react-in-jsx-scope": "off",
|
127
|
+
"prettier/prettier": [
|
128
|
+
"error",
|
129
|
+
{
|
130
|
+
"quoteProps": "consistent",
|
131
|
+
"singleQuote": true,
|
132
|
+
"tabWidth": 2,
|
133
|
+
"trailingComma": "es5",
|
134
|
+
"useTabs": false
|
135
|
+
}
|
136
|
+
]
|
137
|
+
}
|
138
|
+
},
|
139
|
+
"eslintIgnore": [
|
140
|
+
"node_modules/",
|
141
|
+
"lib/"
|
142
|
+
],
|
143
|
+
"prettier": {
|
144
|
+
"quoteProps": "consistent",
|
145
|
+
"singleQuote": true,
|
146
|
+
"tabWidth": 2,
|
147
|
+
"trailingComma": "es5",
|
148
|
+
"useTabs": false
|
149
|
+
},
|
150
|
+
"react-native-builder-bob": {
|
151
|
+
"source": "src",
|
152
|
+
"output": "lib",
|
153
|
+
"targets": [
|
154
|
+
[
|
155
|
+
"module",
|
156
|
+
{
|
157
|
+
"esm": true
|
158
|
+
}
|
159
|
+
],
|
160
|
+
[
|
161
|
+
"commonjs",
|
162
|
+
{
|
163
|
+
"esm": true
|
164
|
+
}
|
165
|
+
],
|
166
|
+
[
|
167
|
+
"typescript",
|
168
|
+
{
|
169
|
+
"tsc": "./node_modules/.bin/tsc",
|
170
|
+
"project": "tsconfig.build.json"
|
171
|
+
}
|
172
|
+
]
|
173
|
+
]
|
174
|
+
},
|
175
|
+
"codegenConfig": {
|
176
|
+
"name": "ReactNativeTcpWindowsSpec",
|
177
|
+
"type": "modules",
|
178
|
+
"jsSrcsDir": "src",
|
179
|
+
"outputDir": {
|
180
|
+
"ios": "ios/generated",
|
181
|
+
"android": "android/generated"
|
182
|
+
},
|
183
|
+
"android": {
|
184
|
+
"javaPackageName": "com.tcpwindows"
|
185
|
+
},
|
186
|
+
"includesGeneratedCode": true,
|
187
|
+
"windows": {
|
188
|
+
"namespace": "ReactNativeTcpWindowsCodegen",
|
189
|
+
"outputDirectory": "windows/ReactNativeTcpWindows/codegen",
|
190
|
+
"separateDataTypes": false
|
191
|
+
}
|
192
|
+
},
|
193
|
+
"create-react-native-library": {
|
194
|
+
"type": "turbo-module",
|
195
|
+
"languages": "kotlin-objc",
|
196
|
+
"version": "0.48.9"
|
197
|
+
},
|
198
|
+
"react-native-windows": {
|
199
|
+
"init-windows": {
|
200
|
+
"name": "ReactNativeTcpWindows",
|
201
|
+
"namespace": "ReactNativeTcpWindows",
|
202
|
+
"template": "cpp-lib"
|
203
|
+
}
|
204
|
+
}
|
205
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import type { TurboModule } from 'react-native';
|
2
|
-
import { TurboModuleRegistry } from 'react-native';
|
3
|
-
|
4
|
-
export interface Spec extends TurboModule {
|
5
|
-
connectToServer(address: string, port: number): Promise<string>;
|
6
|
-
startServer(port: number): Promise<string>;
|
7
|
-
closeConnection(): Promise<string>;
|
8
|
-
write(data: Array<number>): Promise<boolean>;
|
9
|
-
getConnectionStatus(): Promise<boolean>;
|
10
|
-
addListener(eventType: string): void;
|
11
|
-
removeListeners(count: number): void;
|
12
|
-
}
|
13
|
-
|
14
|
-
export default TurboModuleRegistry.getEnforcing<Spec>('ReactNativeTcpWindows');
|
1
|
+
import type { TurboModule } from 'react-native';
|
2
|
+
import { TurboModuleRegistry } from 'react-native';
|
3
|
+
|
4
|
+
export interface Spec extends TurboModule {
|
5
|
+
connectToServer(address: string, port: number): Promise<string>;
|
6
|
+
startServer(port: number): Promise<string>;
|
7
|
+
closeConnection(): Promise<string>;
|
8
|
+
write(data: Array<number>): Promise<boolean>;
|
9
|
+
getConnectionStatus(): Promise<boolean>;
|
10
|
+
addListener(eventType: string): void;
|
11
|
+
removeListeners(count: number): void;
|
12
|
+
}
|
13
|
+
|
14
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('ReactNativeTcpWindows');
|