-
Notifications
You must be signed in to change notification settings - Fork 964
Expand file tree
/
Copy pathtypes.ts
More file actions
188 lines (153 loc) · 4.85 KB
/
Copy pathtypes.ts
File metadata and controls
188 lines (153 loc) · 4.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
import * as vscode from 'vscode';
import { AspireDebugSession } from '../debugger/AspireDebugSession';
export interface ErrorResponse {
error: ErrorDetails;
};
export interface ErrorDetails {
code: string;
message: string;
details: ErrorDetails[];
};
type LaunchConfigurationMode = "Debug" | "NoDebug";
export interface ExecutableLaunchConfiguration {
type: string;
mode?: LaunchConfigurationMode | undefined;
}
export interface ProjectLaunchConfiguration extends ExecutableLaunchConfiguration {
type: "project";
launch_profile?: string;
disable_launch_profile?: boolean;
project_path: string;
}
export function isProjectLaunchConfiguration(obj: any): obj is ProjectLaunchConfiguration {
return obj && obj.type === 'project';
}
export interface PythonLaunchConfiguration extends ExecutableLaunchConfiguration {
type: "python";
// legacy fields
project_path?: string;
program_path?: string;
module?: string;
interpreter_path?: string;
working_directory?: string;
}
export function isPythonLaunchConfiguration(obj: any): obj is PythonLaunchConfiguration {
return obj && obj.type === 'python';
}
export interface GoLaunchConfiguration extends ExecutableLaunchConfiguration {
type: "go";
program?: string;
working_directory?: string;
build_flags?: string;
}
export function isGoLaunchConfiguration(obj: any): obj is GoLaunchConfiguration {
return obj && obj.type === 'go';
}
export interface NodeLaunchConfiguration extends ExecutableLaunchConfiguration {
type: "node"; // Provided by VS Code's built-in js-debug, no extension needed
script_path?: string;
runtime_executable?: string;
working_directory?: string;
}
export function isNodeLaunchConfiguration(obj: any): obj is NodeLaunchConfiguration {
return obj && obj.type === 'node';
}
export interface BrowserLaunchConfiguration extends ExecutableLaunchConfiguration {
type: "browser";
url?: string;
web_root?: string;
browser?: string;
}
export function isBrowserLaunchConfiguration(obj: any): obj is BrowserLaunchConfiguration {
return obj && obj.type === 'browser';
}
export interface AzureFunctionsLaunchConfiguration extends ExecutableLaunchConfiguration {
type: "azure-functions";
project_path: string;
}
export function isAzureFunctionsLaunchConfiguration(obj: any): obj is AzureFunctionsLaunchConfiguration {
return obj && obj.type === 'azure-functions';
}
export interface EnvVar {
name: string;
value: string;
}
export interface RunSessionPayload {
launch_configurations: ExecutableLaunchConfiguration[];
env?: EnvVar[];
args?: string[];
}
export interface DebugLaunchSettings {
env?: { [key: string]: string };
args?: string[];
launchProfile?: string;
disableLaunchProfile?: boolean;
}
export interface DcpServerConnectionInfo {
address: string;
token: string;
certificate: string;
}
export interface RunSessionNotification {
notification_type: 'processRestarted' | 'sessionTerminated' | 'serviceLogs' | 'sessionMessage';
session_id: string;
dcp_id: string;
}
export interface ProcessRestartedNotification extends RunSessionNotification {
notification_type: 'processRestarted';
pid?: number;
}
export interface SessionTerminatedNotification extends RunSessionNotification {
notification_type: 'sessionTerminated';
exit_code: number;
}
export interface ServiceLogsNotification extends RunSessionNotification {
notification_type: 'serviceLogs';
is_std_err: boolean;
log_message: string;
}
export interface SessionMessageNotification extends RunSessionNotification {
notification_type: 'sessionMessage';
message: string;
code?: string;
level: "error" | "info" | "debug";
details: ErrorDetails[];
}
export interface LaunchOptions {
debug: boolean;
forceBuild?: boolean;
runId: string;
debugSessionId: string;
isApphost: boolean;
debugSession: AspireDebugSession;
};
export interface StartAppHostOptions {
forceBuild: boolean;
}
export interface AspireResourceDebugSession {
id: string;
session: vscode.DebugSession;
stopSession(): void;
}
export interface AspireResourceExtendedDebugConfiguration extends vscode.DebugConfiguration {
runId: string;
debugSessionId: string | null;
projectFile?: string;
isApphost?: boolean;
}
export type AspireCommandType = 'run' | 'deploy' | 'publish' | 'do';
export interface AspireExtendedDebugConfiguration extends vscode.DebugConfiguration {
program: string;
debuggers?: AspireDebuggersConfiguration;
command?: AspireCommandType;
args?: string[];
step?: string;
env?: { [key: string]: string };
}
interface AspireDebuggersConfiguration {
[key: string]: DebugLaunchSettings;
}
export interface RunSessionInfo {
protocols_supported: string[];
supported_launch_configurations: string[];
}