microsoft/vscode-react-native

Public

mirrored from https://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 · modeblame

efebb488digeff10 years ago1// 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
5Simulator to read it and simulate it.
6
7File order: This file is ordered in a top-down approach */
8
9export interface Recording {
10/* Metadata */
11title: string;
12arguments: ISpawnArguments;
13date: Date;
14configuration: MachineConfiguration;
15state: MachineState;
16
17/* Recorded events data */
18events: IEventArguments[];
19}
20
21export interface ISpawnArguments {
22command: string;
23args: string[];
24options: ISpawnOptions;
25}
26
e19edf87digeff10 years ago27export interface ISpawnOptions {
efebb488digeff10 years ago28cwd?: string;
29stdio?: any;
30env?: any;
31detached?: boolean;
32}
33
34export interface MachineConfiguration {
35os: { platform: string, release: string };
36android: {
37sdk: { tools: string, platformTools: string, buildTools: string, repositoryForSupportLibraries: string };
38intelHAXMEmulator: string;
39visualStudioEmulator: string;
40};
41reactNative: string;
42node: string;
43npm: string;
44}
45
46export interface MachineState {
47reactNative: { packager: PackagerStatus };
48devices: { android: IAndroidDevice[], ios: IIOSDevice[] };
49}
50
51export type PackagerStatus = "Running" | "NotRunning" | "TBD";
52
53export interface IAndroidDevice {
54id: string;
55type: AndroidDeviceType;
56hardware: string;
57os: string;
58api: number;
59otherSpecs: string;
60appStatus: 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 {
68id: string;
69type: IIOSDeviceType;
70appStatus: AppStatusInDevice;
71}
72
73export type IIOSDeviceType = "TBD";
74
75export type IEventArguments = IStdOutEvent | IStdErrEvent | IErrorEvent | IExitEvent | ICustomEvent;
76
27710197Vladimir Kotikov8 years ago77export interface ITimedEvent {
78after: number;
79}
80
efebb488digeff10 years ago81export interface IStdOutEvent extends ITimedEvent {
82stdout: { data: string };
83}
84
85export interface IStdErrEvent extends ITimedEvent {
86stderr: { data: string };
87}
88
89export interface IErrorEvent extends ITimedEvent {
90error: { error: any };
91}
92
93export interface IExitEvent extends ITimedEvent {
94exit: { code: number };
95}
96
97export interface ICustomEvent extends ITimedEvent {
98custom: { lambda: () => Q.Promise<void> | void };
99}