@react-native-harness/cli 1.0.0-canary.1761046904277 → 1.0.0-canary.1761733411323
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/dist/errors/errorHandler.d.ts +1 -1
- package/dist/errors/errorHandler.d.ts.map +1 -1
- package/dist/errors/errorHandler.js +101 -123
- package/dist/errors/errors.d.ts +2 -7
- package/dist/errors/errors.d.ts.map +1 -1
- package/dist/errors/errors.js +0 -17
- package/dist/external.d.ts +1 -8
- package/dist/external.d.ts.map +1 -1
- package/dist/external.js +1 -25
- package/dist/index.js +58 -49
- package/dist/jest.d.ts +2 -0
- package/dist/jest.d.ts.map +1 -0
- package/dist/jest.js +7 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/src/external.ts +0 -44
- package/src/index.ts +65 -72
- package/tsconfig.json +0 -3
- package/tsconfig.lib.json +1 -12
- package/src/bundlers/metro.ts +0 -102
- package/src/commands/test.ts +0 -232
- package/src/discovery/index.ts +0 -2
- package/src/discovery/testDiscovery.ts +0 -50
- package/src/errors/errorHandler.ts +0 -226
- package/src/errors/errors.ts +0 -131
- package/src/platforms/android/build.ts +0 -49
- package/src/platforms/android/device.ts +0 -48
- package/src/platforms/android/emulator.ts +0 -137
- package/src/platforms/android/index.ts +0 -87
- package/src/platforms/ios/build.ts +0 -71
- package/src/platforms/ios/device.ts +0 -79
- package/src/platforms/ios/index.ts +0 -66
- package/src/platforms/ios/simulator.ts +0 -171
- package/src/platforms/platform-adapter.ts +0 -11
- package/src/platforms/platform-registry.ts +0 -26
- package/src/platforms/vega/build.ts +0 -85
- package/src/platforms/vega/device.ts +0 -258
- package/src/platforms/vega/index.ts +0 -107
- package/src/platforms/web/index.ts +0 -16
- package/src/process.ts +0 -33
- package/src/utils.ts +0 -29
package/src/utils.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import net from 'node:net';
|
|
2
|
-
|
|
3
|
-
export function assert(condition: boolean, message: string): asserts condition {
|
|
4
|
-
if (!condition) {
|
|
5
|
-
throw new AssertionError(message);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export class AssertionError extends Error {
|
|
10
|
-
constructor(message: string) {
|
|
11
|
-
super(message);
|
|
12
|
-
this.name = 'AssertionError';
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const isPortAvailable = (port: number): Promise<boolean> => {
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
const server = net.createServer();
|
|
19
|
-
server.once('error', () => {
|
|
20
|
-
server.close();
|
|
21
|
-
resolve(false);
|
|
22
|
-
});
|
|
23
|
-
server.once('listening', () => {
|
|
24
|
-
server.close();
|
|
25
|
-
resolve(true);
|
|
26
|
-
});
|
|
27
|
-
server.listen(port);
|
|
28
|
-
});
|
|
29
|
-
};
|