microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.6.9

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

test/resources/processExecution/recording.ts

99lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4/* The recording is used by Recorder to store a recording, and by
5 Simulator to read it and simulate it.
6
7 File order: This file is ordered in a top-down approach */
8
9export interface Recording {
10 /* Metadata */
11 title: string;
12 arguments: ISpawnArguments;
13 date: Date;
14 configuration: MachineConfiguration;
15 state: MachineState;
16
17 /* Recorded events data */
18 events: IEventArguments[];
19}
20
21export interface ISpawnArguments {
22 command: string;
23 args: string[];
24 options: ISpawnOptions;
25}
26
27export interface ISpawnOptions {
28 cwd?: string;
29 stdio?: any;
30 env?: any;
31 detached?: boolean;
32}
33
34export interface MachineConfiguration {
35 os: { platform: string, release: string };
36 android: {
37 sdk: { tools: string, platformTools: string, buildTools: string, repositoryForSupportLibraries: string };
38 intelHAXMEmulator: string;
39 visualStudioEmulator: string;
40 };
41 reactNative: string;
42 node: string;
43 npm: string;
44}
45
46export interface MachineState {
47 reactNative: { packager: PackagerStatus };
48 devices: { android: IAndroidDevice[], ios: IIOSDevice[] };
49}
50
51export type PackagerStatus = "Running" | "NotRunning" | "TBD";
52
53export interface IAndroidDevice {
54 id: string;
55 type: AndroidDeviceType;
56 hardware: string;
57 os: string;
58 api: number;
59 otherSpecs: string;
60 appStatus: AppStatusInDevice;
61}
62
63export type AndroidDeviceType = "SDKEmulator" | "VisualStudioEmulator" | "IntelHAXMEmulator_x86" | "IntelHAXMEmulator_x64" | "PhysicalDevice";
64
65export type AppStatusInDevice = "NotInstalled" | "Installed" | "Running" | "Debugging" | "TBD";
66
67export interface IIOSDevice {
68 id: string;
69 type: IIOSDeviceType;
70 appStatus: AppStatusInDevice;
71}
72
73export type IIOSDeviceType = "TBD";
74
75export type IEventArguments = IStdOutEvent | IStdErrEvent | IErrorEvent | IExitEvent | ICustomEvent;
76
77export interface ITimedEvent {
78 after: number;
79}
80
81export interface IStdOutEvent extends ITimedEvent {
82 stdout: { data: string };
83}
84
85export interface IStdErrEvent extends ITimedEvent {
86 stderr: { data: string };
87}
88
89export interface IErrorEvent extends ITimedEvent {
90 error: { error: any };
91}
92
93export interface IExitEvent extends ITimedEvent {
94 exit: { code: number };
95}
96
97export interface ICustomEvent extends ITimedEvent {
98 custom: { lambda: () => Q.Promise<void> | void };
99}
100