@react-native-harness/platform-android 1.0.0 → 1.1.0-rc.2
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/__tests__/adb.test.d.ts +2 -0
- package/dist/__tests__/adb.test.d.ts.map +1 -0
- package/dist/__tests__/adb.test.js +72 -0
- package/dist/__tests__/app-monitor.test.d.ts +2 -0
- package/dist/__tests__/app-monitor.test.d.ts.map +1 -0
- package/dist/__tests__/app-monitor.test.js +202 -0
- package/dist/__tests__/crash-parser.test.d.ts +2 -0
- package/dist/__tests__/crash-parser.test.d.ts.map +1 -0
- package/dist/__tests__/crash-parser.test.js +45 -0
- package/dist/__tests__/shared-prefs.test.d.ts +2 -0
- package/dist/__tests__/shared-prefs.test.d.ts.map +1 -0
- package/dist/__tests__/shared-prefs.test.js +87 -0
- package/dist/adb.d.ts +6 -1
- package/dist/adb.d.ts.map +1 -1
- package/dist/adb.js +84 -18
- package/dist/app-monitor.d.ts +13 -0
- package/dist/app-monitor.d.ts.map +1 -0
- package/dist/app-monitor.js +359 -0
- package/dist/config.d.ts +21 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -0
- package/dist/crash-parser.d.ts +11 -0
- package/dist/crash-parser.d.ts.map +1 -0
- package/dist/crash-parser.js +39 -0
- package/dist/runner.d.ts +2 -2
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +21 -5
- package/dist/shared-prefs.d.ts +3 -0
- package/dist/shared-prefs.d.ts.map +1 -0
- package/dist/shared-prefs.js +92 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/eslint.config.mjs +4 -1
- package/package.json +4 -4
- package/src/__tests__/adb.test.ts +89 -0
- package/src/__tests__/app-monitor.test.ts +273 -0
- package/src/__tests__/crash-parser.test.ts +52 -0
- package/src/__tests__/shared-prefs.test.ts +144 -0
- package/src/adb.ts +111 -18
- package/src/app-monitor.ts +544 -0
- package/src/config.ts +10 -0
- package/src/crash-parser.ts +66 -0
- package/src/runner.ts +31 -7
- package/src/shared-prefs.ts +205 -0
- package/tsconfig.json +2 -2
- package/tsconfig.lib.json +2 -2
- package/tsconfig.tsbuildinfo +1 -0
- package/dist/assertions.d.ts +0 -5
- package/dist/assertions.d.ts.map +0 -1
- package/dist/assertions.js +0 -6
- package/dist/emulator.d.ts +0 -6
- package/dist/emulator.d.ts.map +0 -1
- package/dist/emulator.js +0 -27
- package/dist/errors.d.ts +0 -15
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -28
- package/dist/reader.d.ts +0 -6
- package/dist/reader.d.ts.map +0 -1
- package/dist/reader.js +0 -57
- package/dist/types.d.ts +0 -381
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -107
package/dist/types.d.ts
DELETED
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const PlatformSchema: z.ZodEnum<["ios", "android", "web", "vega"]>;
|
|
3
|
-
export declare const ReporterSchema: z.ZodObject<{
|
|
4
|
-
report: z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodAny, "many">], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
7
|
-
}, {
|
|
8
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const BrowserTypeSchema: z.ZodEnum<["chrome", "firefox", "safari"]>;
|
|
11
|
-
export declare const AndroidTestRunnerConfigSchema: z.ZodObject<{
|
|
12
|
-
name: z.ZodString;
|
|
13
|
-
platform: z.ZodLiteral<"android">;
|
|
14
|
-
deviceId: z.ZodString;
|
|
15
|
-
bundleId: z.ZodString;
|
|
16
|
-
activityName: z.ZodDefault<z.ZodString>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
name: string;
|
|
19
|
-
platform: "android";
|
|
20
|
-
deviceId: string;
|
|
21
|
-
bundleId: string;
|
|
22
|
-
activityName: string;
|
|
23
|
-
}, {
|
|
24
|
-
name: string;
|
|
25
|
-
platform: "android";
|
|
26
|
-
deviceId: string;
|
|
27
|
-
bundleId: string;
|
|
28
|
-
activityName?: string | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
export declare const iOSTestRunnerConfigSchema: z.ZodObject<{
|
|
31
|
-
name: z.ZodString;
|
|
32
|
-
platform: z.ZodLiteral<"ios">;
|
|
33
|
-
deviceId: z.ZodString;
|
|
34
|
-
bundleId: z.ZodString;
|
|
35
|
-
systemVersion: z.ZodString;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
name: string;
|
|
38
|
-
platform: "ios";
|
|
39
|
-
deviceId: string;
|
|
40
|
-
bundleId: string;
|
|
41
|
-
systemVersion: string;
|
|
42
|
-
}, {
|
|
43
|
-
name: string;
|
|
44
|
-
platform: "ios";
|
|
45
|
-
deviceId: string;
|
|
46
|
-
bundleId: string;
|
|
47
|
-
systemVersion: string;
|
|
48
|
-
}>;
|
|
49
|
-
export declare const WebTestRunnerConfigSchema: z.ZodObject<{
|
|
50
|
-
name: z.ZodString;
|
|
51
|
-
platform: z.ZodLiteral<"web">;
|
|
52
|
-
browser: z.ZodEnum<["chrome", "firefox", "safari"]>;
|
|
53
|
-
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
name: string;
|
|
55
|
-
platform: "web";
|
|
56
|
-
browser: "chrome" | "firefox" | "safari";
|
|
57
|
-
}, {
|
|
58
|
-
name: string;
|
|
59
|
-
platform: "web";
|
|
60
|
-
browser: "chrome" | "firefox" | "safari";
|
|
61
|
-
}>;
|
|
62
|
-
export declare const VegaTestRunnerConfigSchema: z.ZodObject<{
|
|
63
|
-
name: z.ZodString;
|
|
64
|
-
platform: z.ZodLiteral<"vega">;
|
|
65
|
-
deviceId: z.ZodString;
|
|
66
|
-
bundleId: z.ZodString;
|
|
67
|
-
buildType: z.ZodDefault<z.ZodEnum<["Debug", "Release"]>>;
|
|
68
|
-
target: z.ZodDefault<z.ZodEnum<["sim_tv_x86_64", "sim_tv_aarch64"]>>;
|
|
69
|
-
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
name: string;
|
|
71
|
-
platform: "vega";
|
|
72
|
-
deviceId: string;
|
|
73
|
-
bundleId: string;
|
|
74
|
-
buildType: "Debug" | "Release";
|
|
75
|
-
target: "sim_tv_x86_64" | "sim_tv_aarch64";
|
|
76
|
-
}, {
|
|
77
|
-
name: string;
|
|
78
|
-
platform: "vega";
|
|
79
|
-
deviceId: string;
|
|
80
|
-
bundleId: string;
|
|
81
|
-
buildType?: "Debug" | "Release" | undefined;
|
|
82
|
-
target?: "sim_tv_x86_64" | "sim_tv_aarch64" | undefined;
|
|
83
|
-
}>;
|
|
84
|
-
export declare const TestRunnerConfigSchema: z.ZodDiscriminatedUnion<"platform", [z.ZodObject<{
|
|
85
|
-
name: z.ZodString;
|
|
86
|
-
platform: z.ZodLiteral<"android">;
|
|
87
|
-
deviceId: z.ZodString;
|
|
88
|
-
bundleId: z.ZodString;
|
|
89
|
-
activityName: z.ZodDefault<z.ZodString>;
|
|
90
|
-
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
name: string;
|
|
92
|
-
platform: "android";
|
|
93
|
-
deviceId: string;
|
|
94
|
-
bundleId: string;
|
|
95
|
-
activityName: string;
|
|
96
|
-
}, {
|
|
97
|
-
name: string;
|
|
98
|
-
platform: "android";
|
|
99
|
-
deviceId: string;
|
|
100
|
-
bundleId: string;
|
|
101
|
-
activityName?: string | undefined;
|
|
102
|
-
}>, z.ZodObject<{
|
|
103
|
-
name: z.ZodString;
|
|
104
|
-
platform: z.ZodLiteral<"ios">;
|
|
105
|
-
deviceId: z.ZodString;
|
|
106
|
-
bundleId: z.ZodString;
|
|
107
|
-
systemVersion: z.ZodString;
|
|
108
|
-
}, "strip", z.ZodTypeAny, {
|
|
109
|
-
name: string;
|
|
110
|
-
platform: "ios";
|
|
111
|
-
deviceId: string;
|
|
112
|
-
bundleId: string;
|
|
113
|
-
systemVersion: string;
|
|
114
|
-
}, {
|
|
115
|
-
name: string;
|
|
116
|
-
platform: "ios";
|
|
117
|
-
deviceId: string;
|
|
118
|
-
bundleId: string;
|
|
119
|
-
systemVersion: string;
|
|
120
|
-
}>, z.ZodObject<{
|
|
121
|
-
name: z.ZodString;
|
|
122
|
-
platform: z.ZodLiteral<"web">;
|
|
123
|
-
browser: z.ZodEnum<["chrome", "firefox", "safari"]>;
|
|
124
|
-
}, "strip", z.ZodTypeAny, {
|
|
125
|
-
name: string;
|
|
126
|
-
platform: "web";
|
|
127
|
-
browser: "chrome" | "firefox" | "safari";
|
|
128
|
-
}, {
|
|
129
|
-
name: string;
|
|
130
|
-
platform: "web";
|
|
131
|
-
browser: "chrome" | "firefox" | "safari";
|
|
132
|
-
}>, z.ZodObject<{
|
|
133
|
-
name: z.ZodString;
|
|
134
|
-
platform: z.ZodLiteral<"vega">;
|
|
135
|
-
deviceId: z.ZodString;
|
|
136
|
-
bundleId: z.ZodString;
|
|
137
|
-
buildType: z.ZodDefault<z.ZodEnum<["Debug", "Release"]>>;
|
|
138
|
-
target: z.ZodDefault<z.ZodEnum<["sim_tv_x86_64", "sim_tv_aarch64"]>>;
|
|
139
|
-
}, "strip", z.ZodTypeAny, {
|
|
140
|
-
name: string;
|
|
141
|
-
platform: "vega";
|
|
142
|
-
deviceId: string;
|
|
143
|
-
bundleId: string;
|
|
144
|
-
buildType: "Debug" | "Release";
|
|
145
|
-
target: "sim_tv_x86_64" | "sim_tv_aarch64";
|
|
146
|
-
}, {
|
|
147
|
-
name: string;
|
|
148
|
-
platform: "vega";
|
|
149
|
-
deviceId: string;
|
|
150
|
-
bundleId: string;
|
|
151
|
-
buildType?: "Debug" | "Release" | undefined;
|
|
152
|
-
target?: "sim_tv_x86_64" | "sim_tv_aarch64" | undefined;
|
|
153
|
-
}>]>;
|
|
154
|
-
export declare const ConfigSchema: z.ZodEffects<z.ZodObject<{
|
|
155
|
-
include: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string | string[], string | string[]>;
|
|
156
|
-
runners: z.ZodArray<z.ZodDiscriminatedUnion<"platform", [z.ZodObject<{
|
|
157
|
-
name: z.ZodString;
|
|
158
|
-
platform: z.ZodLiteral<"android">;
|
|
159
|
-
deviceId: z.ZodString;
|
|
160
|
-
bundleId: z.ZodString;
|
|
161
|
-
activityName: z.ZodDefault<z.ZodString>;
|
|
162
|
-
}, "strip", z.ZodTypeAny, {
|
|
163
|
-
name: string;
|
|
164
|
-
platform: "android";
|
|
165
|
-
deviceId: string;
|
|
166
|
-
bundleId: string;
|
|
167
|
-
activityName: string;
|
|
168
|
-
}, {
|
|
169
|
-
name: string;
|
|
170
|
-
platform: "android";
|
|
171
|
-
deviceId: string;
|
|
172
|
-
bundleId: string;
|
|
173
|
-
activityName?: string | undefined;
|
|
174
|
-
}>, z.ZodObject<{
|
|
175
|
-
name: z.ZodString;
|
|
176
|
-
platform: z.ZodLiteral<"ios">;
|
|
177
|
-
deviceId: z.ZodString;
|
|
178
|
-
bundleId: z.ZodString;
|
|
179
|
-
systemVersion: z.ZodString;
|
|
180
|
-
}, "strip", z.ZodTypeAny, {
|
|
181
|
-
name: string;
|
|
182
|
-
platform: "ios";
|
|
183
|
-
deviceId: string;
|
|
184
|
-
bundleId: string;
|
|
185
|
-
systemVersion: string;
|
|
186
|
-
}, {
|
|
187
|
-
name: string;
|
|
188
|
-
platform: "ios";
|
|
189
|
-
deviceId: string;
|
|
190
|
-
bundleId: string;
|
|
191
|
-
systemVersion: string;
|
|
192
|
-
}>, z.ZodObject<{
|
|
193
|
-
name: z.ZodString;
|
|
194
|
-
platform: z.ZodLiteral<"web">;
|
|
195
|
-
browser: z.ZodEnum<["chrome", "firefox", "safari"]>;
|
|
196
|
-
}, "strip", z.ZodTypeAny, {
|
|
197
|
-
name: string;
|
|
198
|
-
platform: "web";
|
|
199
|
-
browser: "chrome" | "firefox" | "safari";
|
|
200
|
-
}, {
|
|
201
|
-
name: string;
|
|
202
|
-
platform: "web";
|
|
203
|
-
browser: "chrome" | "firefox" | "safari";
|
|
204
|
-
}>, z.ZodObject<{
|
|
205
|
-
name: z.ZodString;
|
|
206
|
-
platform: z.ZodLiteral<"vega">;
|
|
207
|
-
deviceId: z.ZodString;
|
|
208
|
-
bundleId: z.ZodString;
|
|
209
|
-
buildType: z.ZodDefault<z.ZodEnum<["Debug", "Release"]>>;
|
|
210
|
-
target: z.ZodDefault<z.ZodEnum<["sim_tv_x86_64", "sim_tv_aarch64"]>>;
|
|
211
|
-
}, "strip", z.ZodTypeAny, {
|
|
212
|
-
name: string;
|
|
213
|
-
platform: "vega";
|
|
214
|
-
deviceId: string;
|
|
215
|
-
bundleId: string;
|
|
216
|
-
buildType: "Debug" | "Release";
|
|
217
|
-
target: "sim_tv_x86_64" | "sim_tv_aarch64";
|
|
218
|
-
}, {
|
|
219
|
-
name: string;
|
|
220
|
-
platform: "vega";
|
|
221
|
-
deviceId: string;
|
|
222
|
-
bundleId: string;
|
|
223
|
-
buildType?: "Debug" | "Release" | undefined;
|
|
224
|
-
target?: "sim_tv_x86_64" | "sim_tv_aarch64" | undefined;
|
|
225
|
-
}>]>, "many">;
|
|
226
|
-
defaultRunner: z.ZodOptional<z.ZodString>;
|
|
227
|
-
reporter: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
228
|
-
report: z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodAny, "many">], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
|
|
229
|
-
}, "strip", z.ZodTypeAny, {
|
|
230
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
231
|
-
}, {
|
|
232
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
233
|
-
}>>>;
|
|
234
|
-
bridgeTimeout: z.ZodDefault<z.ZodNumber>;
|
|
235
|
-
unstable__skipAlreadyIncludedModules: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
236
|
-
}, "strip", z.ZodTypeAny, {
|
|
237
|
-
include: string | string[];
|
|
238
|
-
runners: ({
|
|
239
|
-
name: string;
|
|
240
|
-
platform: "android";
|
|
241
|
-
deviceId: string;
|
|
242
|
-
bundleId: string;
|
|
243
|
-
activityName: string;
|
|
244
|
-
} | {
|
|
245
|
-
name: string;
|
|
246
|
-
platform: "ios";
|
|
247
|
-
deviceId: string;
|
|
248
|
-
bundleId: string;
|
|
249
|
-
systemVersion: string;
|
|
250
|
-
} | {
|
|
251
|
-
name: string;
|
|
252
|
-
platform: "web";
|
|
253
|
-
browser: "chrome" | "firefox" | "safari";
|
|
254
|
-
} | {
|
|
255
|
-
name: string;
|
|
256
|
-
platform: "vega";
|
|
257
|
-
deviceId: string;
|
|
258
|
-
bundleId: string;
|
|
259
|
-
buildType: "Debug" | "Release";
|
|
260
|
-
target: "sim_tv_x86_64" | "sim_tv_aarch64";
|
|
261
|
-
})[];
|
|
262
|
-
reporter: {
|
|
263
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
264
|
-
};
|
|
265
|
-
bridgeTimeout: number;
|
|
266
|
-
unstable__skipAlreadyIncludedModules: boolean;
|
|
267
|
-
defaultRunner?: string | undefined;
|
|
268
|
-
}, {
|
|
269
|
-
include: string | string[];
|
|
270
|
-
runners: ({
|
|
271
|
-
name: string;
|
|
272
|
-
platform: "android";
|
|
273
|
-
deviceId: string;
|
|
274
|
-
bundleId: string;
|
|
275
|
-
activityName?: string | undefined;
|
|
276
|
-
} | {
|
|
277
|
-
name: string;
|
|
278
|
-
platform: "ios";
|
|
279
|
-
deviceId: string;
|
|
280
|
-
bundleId: string;
|
|
281
|
-
systemVersion: string;
|
|
282
|
-
} | {
|
|
283
|
-
name: string;
|
|
284
|
-
platform: "web";
|
|
285
|
-
browser: "chrome" | "firefox" | "safari";
|
|
286
|
-
} | {
|
|
287
|
-
name: string;
|
|
288
|
-
platform: "vega";
|
|
289
|
-
deviceId: string;
|
|
290
|
-
bundleId: string;
|
|
291
|
-
buildType?: "Debug" | "Release" | undefined;
|
|
292
|
-
target?: "sim_tv_x86_64" | "sim_tv_aarch64" | undefined;
|
|
293
|
-
})[];
|
|
294
|
-
defaultRunner?: string | undefined;
|
|
295
|
-
reporter?: {
|
|
296
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
297
|
-
} | undefined;
|
|
298
|
-
bridgeTimeout?: number | undefined;
|
|
299
|
-
unstable__skipAlreadyIncludedModules?: boolean | undefined;
|
|
300
|
-
}>, {
|
|
301
|
-
include: string | string[];
|
|
302
|
-
runners: ({
|
|
303
|
-
name: string;
|
|
304
|
-
platform: "android";
|
|
305
|
-
deviceId: string;
|
|
306
|
-
bundleId: string;
|
|
307
|
-
activityName: string;
|
|
308
|
-
} | {
|
|
309
|
-
name: string;
|
|
310
|
-
platform: "ios";
|
|
311
|
-
deviceId: string;
|
|
312
|
-
bundleId: string;
|
|
313
|
-
systemVersion: string;
|
|
314
|
-
} | {
|
|
315
|
-
name: string;
|
|
316
|
-
platform: "web";
|
|
317
|
-
browser: "chrome" | "firefox" | "safari";
|
|
318
|
-
} | {
|
|
319
|
-
name: string;
|
|
320
|
-
platform: "vega";
|
|
321
|
-
deviceId: string;
|
|
322
|
-
bundleId: string;
|
|
323
|
-
buildType: "Debug" | "Release";
|
|
324
|
-
target: "sim_tv_x86_64" | "sim_tv_aarch64";
|
|
325
|
-
})[];
|
|
326
|
-
reporter: {
|
|
327
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
328
|
-
};
|
|
329
|
-
bridgeTimeout: number;
|
|
330
|
-
unstable__skipAlreadyIncludedModules: boolean;
|
|
331
|
-
defaultRunner?: string | undefined;
|
|
332
|
-
}, {
|
|
333
|
-
include: string | string[];
|
|
334
|
-
runners: ({
|
|
335
|
-
name: string;
|
|
336
|
-
platform: "android";
|
|
337
|
-
deviceId: string;
|
|
338
|
-
bundleId: string;
|
|
339
|
-
activityName?: string | undefined;
|
|
340
|
-
} | {
|
|
341
|
-
name: string;
|
|
342
|
-
platform: "ios";
|
|
343
|
-
deviceId: string;
|
|
344
|
-
bundleId: string;
|
|
345
|
-
systemVersion: string;
|
|
346
|
-
} | {
|
|
347
|
-
name: string;
|
|
348
|
-
platform: "web";
|
|
349
|
-
browser: "chrome" | "firefox" | "safari";
|
|
350
|
-
} | {
|
|
351
|
-
name: string;
|
|
352
|
-
platform: "vega";
|
|
353
|
-
deviceId: string;
|
|
354
|
-
bundleId: string;
|
|
355
|
-
buildType?: "Debug" | "Release" | undefined;
|
|
356
|
-
target?: "sim_tv_x86_64" | "sim_tv_aarch64" | undefined;
|
|
357
|
-
})[];
|
|
358
|
-
defaultRunner?: string | undefined;
|
|
359
|
-
reporter?: {
|
|
360
|
-
report: (args_0: any[], ...args: unknown[]) => Promise<void>;
|
|
361
|
-
} | undefined;
|
|
362
|
-
bridgeTimeout?: number | undefined;
|
|
363
|
-
unstable__skipAlreadyIncludedModules?: boolean | undefined;
|
|
364
|
-
}>;
|
|
365
|
-
export type Platform = z.infer<typeof PlatformSchema>;
|
|
366
|
-
export type BrowserType = z.infer<typeof BrowserTypeSchema>;
|
|
367
|
-
export type AndroidTestRunnerConfig = z.infer<typeof AndroidTestRunnerConfigSchema>;
|
|
368
|
-
export type iOSTestRunnerConfig = z.infer<typeof iOSTestRunnerConfigSchema>;
|
|
369
|
-
export type WebTestRunnerConfig = z.infer<typeof WebTestRunnerConfigSchema>;
|
|
370
|
-
export type VegaTestRunnerConfig = z.infer<typeof VegaTestRunnerConfigSchema>;
|
|
371
|
-
export type TestRunnerConfig = z.infer<typeof TestRunnerConfigSchema>;
|
|
372
|
-
export type Config = z.infer<typeof ConfigSchema>;
|
|
373
|
-
export declare function isIOSRunnerConfig(config: TestRunnerConfig): config is iOSTestRunnerConfig;
|
|
374
|
-
export declare function isAndroidRunnerConfig(config: TestRunnerConfig): config is AndroidTestRunnerConfig;
|
|
375
|
-
export declare function isWebRunnerConfig(config: TestRunnerConfig): config is WebTestRunnerConfig;
|
|
376
|
-
export declare function isVegaRunnerConfig(config: TestRunnerConfig): config is VegaTestRunnerConfig;
|
|
377
|
-
export declare function assertAndroidRunnerConfig(config: TestRunnerConfig): asserts config is AndroidTestRunnerConfig;
|
|
378
|
-
export declare function assertIOSRunnerConfig(config: TestRunnerConfig): asserts config is iOSTestRunnerConfig;
|
|
379
|
-
export declare function assertWebRunnerConfig(config: TestRunnerConfig): asserts config is WebTestRunnerConfig;
|
|
380
|
-
export declare function assertVegaRunnerConfig(config: TestRunnerConfig): asserts config is VegaTestRunnerConfig;
|
|
381
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc,8CAA4C,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;EAEzB,CAAC;AAEH,eAAO,MAAM,iBAAiB,4CAA0C,CAAC;AAEzE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;EASxC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;EAMpC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAIpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;EAcrC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKjC,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCtB,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,GACvB,MAAM,IAAI,mBAAmB,CAE/B;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,GACvB,MAAM,IAAI,uBAAuB,CAEnC;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,GACvB,MAAM,IAAI,mBAAmB,CAE/B;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,GACvB,MAAM,IAAI,oBAAoB,CAEhC;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,MAAM,IAAI,uBAAuB,CAM3C;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,MAAM,IAAI,mBAAmB,CAMvC;AACD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,MAAM,IAAI,mBAAmB,CAMvC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,MAAM,IAAI,oBAAoB,CAMxC"}
|
package/dist/types.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { defaultReporter } from '@react-native-harness/reporters';
|
|
3
|
-
export const PlatformSchema = z.enum(['ios', 'android', 'web', 'vega']);
|
|
4
|
-
export const ReporterSchema = z.object({
|
|
5
|
-
report: z.function().args(z.array(z.any())).returns(z.promise(z.void())),
|
|
6
|
-
});
|
|
7
|
-
export const BrowserTypeSchema = z.enum(['chrome', 'firefox', 'safari']);
|
|
8
|
-
export const AndroidTestRunnerConfigSchema = z.object({
|
|
9
|
-
name: z.string().min(1, 'Runner name is required'),
|
|
10
|
-
platform: z.literal('android'),
|
|
11
|
-
deviceId: z.string().min(1, 'Device ID is required'),
|
|
12
|
-
bundleId: z.string().min(1, 'Bundle ID is required'),
|
|
13
|
-
activityName: z
|
|
14
|
-
.string()
|
|
15
|
-
.min(1, 'Activity name is required')
|
|
16
|
-
.default('.MainActivity'),
|
|
17
|
-
});
|
|
18
|
-
export const iOSTestRunnerConfigSchema = z.object({
|
|
19
|
-
name: z.string().min(1, 'Runner name is required'),
|
|
20
|
-
platform: z.literal('ios'),
|
|
21
|
-
deviceId: z.string().min(1, 'Device ID is required'),
|
|
22
|
-
bundleId: z.string().min(1, 'Bundle ID is required'),
|
|
23
|
-
systemVersion: z.string().min(1, 'System version is required'),
|
|
24
|
-
});
|
|
25
|
-
export const WebTestRunnerConfigSchema = z.object({
|
|
26
|
-
name: z.string().min(1, 'Runner name is required'),
|
|
27
|
-
platform: z.literal('web'),
|
|
28
|
-
browser: BrowserTypeSchema,
|
|
29
|
-
});
|
|
30
|
-
export const VegaTestRunnerConfigSchema = z.object({
|
|
31
|
-
name: z.string().min(1, 'Runner name is required'),
|
|
32
|
-
platform: z.literal('vega'),
|
|
33
|
-
deviceId: z
|
|
34
|
-
.string()
|
|
35
|
-
.min(1, 'Virtual device instance name is required (e.g., "VegaTV_1", "VegaTV_Debug")'),
|
|
36
|
-
bundleId: z
|
|
37
|
-
.string()
|
|
38
|
-
.min(1, 'Bundle ID is required (package identifier from manifest.toml)'),
|
|
39
|
-
buildType: z.enum(['Debug', 'Release']).default('Release'),
|
|
40
|
-
target: z.enum(['sim_tv_x86_64', 'sim_tv_aarch64']).default('sim_tv_x86_64'),
|
|
41
|
-
});
|
|
42
|
-
export const TestRunnerConfigSchema = z.discriminatedUnion('platform', [
|
|
43
|
-
AndroidTestRunnerConfigSchema,
|
|
44
|
-
iOSTestRunnerConfigSchema,
|
|
45
|
-
WebTestRunnerConfigSchema,
|
|
46
|
-
VegaTestRunnerConfigSchema,
|
|
47
|
-
]);
|
|
48
|
-
export const ConfigSchema = z
|
|
49
|
-
.object({
|
|
50
|
-
include: z.union([z.string(), z.array(z.string())]).refine((val) => {
|
|
51
|
-
if (Array.isArray(val)) {
|
|
52
|
-
return val.length > 0;
|
|
53
|
-
}
|
|
54
|
-
return val.length > 0;
|
|
55
|
-
}, { message: 'Include patterns cannot be empty' }),
|
|
56
|
-
runners: z
|
|
57
|
-
.array(TestRunnerConfigSchema)
|
|
58
|
-
.min(1, 'At least one runner is required'),
|
|
59
|
-
defaultRunner: z.string().optional(),
|
|
60
|
-
reporter: ReporterSchema.optional().default(defaultReporter),
|
|
61
|
-
bridgeTimeout: z
|
|
62
|
-
.number()
|
|
63
|
-
.min(1000, 'Bridge timeout must be at least 1 second')
|
|
64
|
-
.default(60000),
|
|
65
|
-
unstable__skipAlreadyIncludedModules: z.boolean().optional().default(false),
|
|
66
|
-
})
|
|
67
|
-
.refine((config) => {
|
|
68
|
-
if (config.defaultRunner) {
|
|
69
|
-
return config.runners.some((runner) => runner.name === config.defaultRunner);
|
|
70
|
-
}
|
|
71
|
-
return true;
|
|
72
|
-
}, {
|
|
73
|
-
message: 'Default runner must match one of the configured runner names',
|
|
74
|
-
path: ['defaultRunner'],
|
|
75
|
-
});
|
|
76
|
-
export function isIOSRunnerConfig(config) {
|
|
77
|
-
return config.platform === 'ios';
|
|
78
|
-
}
|
|
79
|
-
export function isAndroidRunnerConfig(config) {
|
|
80
|
-
return config.platform === 'android';
|
|
81
|
-
}
|
|
82
|
-
export function isWebRunnerConfig(config) {
|
|
83
|
-
return config.platform === 'web';
|
|
84
|
-
}
|
|
85
|
-
export function isVegaRunnerConfig(config) {
|
|
86
|
-
return config.platform === 'vega';
|
|
87
|
-
}
|
|
88
|
-
export function assertAndroidRunnerConfig(config) {
|
|
89
|
-
if (!isAndroidRunnerConfig(config)) {
|
|
90
|
-
throw new Error(`Expected Android runner config but got platform: ${config.platform}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
export function assertIOSRunnerConfig(config) {
|
|
94
|
-
if (!isIOSRunnerConfig(config)) {
|
|
95
|
-
throw new Error(`Expected iOS runner config but got platform: ${config.platform}`);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
export function assertWebRunnerConfig(config) {
|
|
99
|
-
if (!isWebRunnerConfig(config)) {
|
|
100
|
-
throw new Error(`Expected web runner config but got platform: ${config.platform}`);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
export function assertVegaRunnerConfig(config) {
|
|
104
|
-
if (!isVegaRunnerConfig(config)) {
|
|
105
|
-
throw new Error(`Expected Vega runner config but got platform: ${config.platform}`);
|
|
106
|
-
}
|
|
107
|
-
}
|