@codingame/monaco-vscode-extensions-service-override 1.85.1 → 1.85.3
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/extensions.js +3 -3
- package/package.json +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +8 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +1 -1
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +0 -506
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy.js +0 -132
package/extensions.js
CHANGED
|
@@ -32,13 +32,12 @@ import { IWorkspaceTrustManagementService } from 'monaco-editor/esm/vs/platform/
|
|
|
32
32
|
import { IRemoteExplorerService } from 'vscode/vscode/vs/workbench/services/remote/common/remoteExplorerService';
|
|
33
33
|
import { ExtensionResourceLoaderService } from './vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js';
|
|
34
34
|
import { IExtensionResourceLoaderService } from 'vscode/vscode/vs/platform/extensionResourceLoader/common/extensionResourceLoader';
|
|
35
|
+
import { IExtensionBisectService, ExtensionBisectService } from 'vscode/vscode/vs/workbench/services/extensionManagement/browser/extensionBisect';
|
|
35
36
|
import { changeUrlDomain } from './tools/url.js';
|
|
36
37
|
import { CustomSchemas } from '@codingame/monaco-vscode-files-service-override';
|
|
37
38
|
import { registerAssets } from 'vscode/assets';
|
|
38
39
|
import 'vscode/vscode/vs/workbench/services/themes/common/colorExtensionPoint';
|
|
39
40
|
import 'vscode/vscode/vs/workbench/services/themes/common/iconExtensionPoint';
|
|
40
|
-
import 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
41
|
-
import 'vscode/vscode/vs/platform/theme/common/tokenClassificationRegistry';
|
|
42
41
|
import 'vscode/vscode/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint';
|
|
43
42
|
import 'vscode/vscode/vs/workbench/api/browser/statusBarExtensionPoint';
|
|
44
43
|
import './vscode/src/vs/workbench/api/browser/mainThreadLocalization.js';
|
|
@@ -280,7 +279,8 @@ function getServiceOverride(workerConfig, _iframeAlternateDomains) {
|
|
|
280
279
|
return {
|
|
281
280
|
[( IExtensionService.toString())]: new SyncDescriptor(ExtensionServiceOverride, [_workerConfig], false),
|
|
282
281
|
[( IExtensionManifestPropertiesService.toString())]: new SyncDescriptor(ExtensionManifestPropertiesService, [], true),
|
|
283
|
-
[( IExtensionResourceLoaderService.toString())]: new SyncDescriptor(ExtensionResourceLoaderServiceOverride, [], true)
|
|
282
|
+
[( IExtensionResourceLoaderService.toString())]: new SyncDescriptor(ExtensionResourceLoaderServiceOverride, [], true),
|
|
283
|
+
[( IExtensionBisectService.toString())]: new SyncDescriptor(ExtensionBisectService, [], true)
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
286
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-extensions-service-override",
|
|
3
|
-
"version": "1.85.
|
|
3
|
+
"version": "1.85.3",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@1.85.
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@1.85.3",
|
|
22
22
|
"monaco-editor": "0.45.0",
|
|
23
23
|
"vscode-semver": "npm:semver@=5.5.0",
|
|
24
|
-
"@codingame/monaco-vscode-files-service-override": "1.85.
|
|
24
|
+
"@codingame/monaco-vscode-files-service-override": "1.85.3"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -2,10 +2,10 @@ import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.
|
|
|
2
2
|
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
3
3
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
4
4
|
import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
|
|
5
|
-
import * as
|
|
5
|
+
import * as Types from 'monaco-editor/esm/vs/base/common/types.js';
|
|
6
6
|
import * as platform from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
7
7
|
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
8
|
-
import { TaskDefinition, PresentationOptions, RunOptions, CommandOptions, RuntimeType, TaskSourceKind, CustomTask, ContributedTask, ConfiguringTask } from '
|
|
8
|
+
import { TaskDefinition, PresentationOptions, RunOptions, CommandOptions, RuntimeType, TaskSourceKind, CustomTask, ContributedTask, ConfiguringTask } from 'vscode/vscode/vs/workbench/contrib/tasks/common/tasks';
|
|
9
9
|
import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService';
|
|
10
10
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
11
11
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
@@ -127,8 +127,8 @@ var ProcessExecutionDTO;
|
|
|
127
127
|
}
|
|
128
128
|
ProcessExecutionDTO.is = is;
|
|
129
129
|
function from(value) {
|
|
130
|
-
const process =
|
|
131
|
-
const args = value.args ? ( value.args.map(value =>
|
|
130
|
+
const process = Types.isString(value.name) ? value.name : value.name.value;
|
|
131
|
+
const args = value.args ? ( value.args.map(value => Types.isString(value) ? value : value.value)) : [];
|
|
132
132
|
const result = {
|
|
133
133
|
process: process,
|
|
134
134
|
args: args
|
|
@@ -201,7 +201,7 @@ var ShellExecutionDTO;
|
|
|
201
201
|
ShellExecutionDTO.is = is;
|
|
202
202
|
function from(value) {
|
|
203
203
|
const result = {};
|
|
204
|
-
if (value.name &&
|
|
204
|
+
if (value.name && Types.isString(value.name) && (value.args === undefined || value.args === null || value.args.length === 0)) {
|
|
205
205
|
result.commandLine = value.name;
|
|
206
206
|
}
|
|
207
207
|
else {
|
|
@@ -306,7 +306,7 @@ var TaskHandleDTO;
|
|
|
306
306
|
( (function(TaskHandleDTO) {
|
|
307
307
|
function is(value) {
|
|
308
308
|
const candidate = value;
|
|
309
|
-
return candidate &&
|
|
309
|
+
return candidate && Types.isString(candidate.id) && !!candidate.workspaceFolder;
|
|
310
310
|
}
|
|
311
311
|
TaskHandleDTO.is = is;
|
|
312
312
|
})(TaskHandleDTO || (TaskHandleDTO = {})));
|
|
@@ -347,7 +347,7 @@ var TaskDTO;
|
|
|
347
347
|
}
|
|
348
348
|
if (task.configurationProperties.problemMatchers) {
|
|
349
349
|
for (const matcher of task.configurationProperties.problemMatchers) {
|
|
350
|
-
if (
|
|
350
|
+
if (Types.isString(matcher)) {
|
|
351
351
|
result.problemMatchers.push(matcher);
|
|
352
352
|
}
|
|
353
353
|
}
|
|
@@ -702,7 +702,7 @@ let MainThreadTask = class MainThreadTask {
|
|
|
702
702
|
result.variables.set(variableName, partiallyResolvedVars[i]);
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
if (
|
|
705
|
+
if (Types.isString(values.process)) {
|
|
706
706
|
result.process = values.process;
|
|
707
707
|
}
|
|
708
708
|
resolve(result);
|
|
@@ -8,7 +8,7 @@ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
|
8
8
|
import { TerminalLocation, TerminalExitReason } from 'vscode/vscode/vs/platform/terminal/common/terminal';
|
|
9
9
|
import { TerminalDataBufferer } from 'vscode/vscode/vs/platform/terminal/common/terminalDataBuffering';
|
|
10
10
|
import { ITerminalService, ITerminalGroupService, ITerminalEditorService } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminal';
|
|
11
|
-
import { TerminalProcessExtHostProxy } from '
|
|
11
|
+
import { TerminalProcessExtHostProxy } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminalProcessExtHostProxy';
|
|
12
12
|
import { IEnvironmentVariableService } from 'vscode/vscode/vs/workbench/contrib/terminal/common/environmentVariable';
|
|
13
13
|
import { serializeEnvironmentVariableCollection, deserializeEnvironmentVariableCollection, deserializeEnvironmentDescriptionMap } from 'vscode/vscode/vs/platform/terminal/common/environmentVariableShared';
|
|
14
14
|
import { ITerminalProfileResolverService, ITerminalProfileService } from 'vscode/vscode/vs/workbench/contrib/terminal/common/terminal';
|
|
@@ -1,506 +0,0 @@
|
|
|
1
|
-
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
-
import * as types from 'monaco-editor/esm/vs/base/common/types.js';
|
|
3
|
-
import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
4
|
-
import * as objects from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
5
|
-
import { TaskDefinitionRegistry } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskDefinitionRegistry';
|
|
6
|
-
|
|
7
|
-
const USER_TASKS_GROUP_KEY = 'settings';
|
|
8
|
-
const CUSTOMIZED_TASK_TYPE = '$customized';
|
|
9
|
-
var CommandOptions;
|
|
10
|
-
( (function(CommandOptions) {
|
|
11
|
-
CommandOptions.defaults = { cwd: '${workspaceFolder}' };
|
|
12
|
-
})(CommandOptions || (CommandOptions = {})));
|
|
13
|
-
var RevealKind;
|
|
14
|
-
( (function(RevealKind) {
|
|
15
|
-
RevealKind[RevealKind["Always"] = 1] = "Always";
|
|
16
|
-
RevealKind[RevealKind["Silent"] = 2] = "Silent";
|
|
17
|
-
RevealKind[RevealKind["Never"] = 3] = "Never";
|
|
18
|
-
})(RevealKind || (RevealKind = {})));
|
|
19
|
-
( (function(RevealKind) {
|
|
20
|
-
function fromString(value) {
|
|
21
|
-
switch (value.toLowerCase()) {
|
|
22
|
-
case 'always':
|
|
23
|
-
return RevealKind.Always;
|
|
24
|
-
case 'silent':
|
|
25
|
-
return RevealKind.Silent;
|
|
26
|
-
case 'never':
|
|
27
|
-
return RevealKind.Never;
|
|
28
|
-
default:
|
|
29
|
-
return RevealKind.Always;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
RevealKind.fromString = fromString;
|
|
33
|
-
})(RevealKind || (RevealKind = {})));
|
|
34
|
-
var RevealProblemKind;
|
|
35
|
-
( (function(RevealProblemKind) {
|
|
36
|
-
RevealProblemKind[RevealProblemKind["Never"] = 1] = "Never";
|
|
37
|
-
RevealProblemKind[RevealProblemKind["OnProblem"] = 2] = "OnProblem";
|
|
38
|
-
RevealProblemKind[RevealProblemKind["Always"] = 3] = "Always";
|
|
39
|
-
})(RevealProblemKind || (RevealProblemKind = {})));
|
|
40
|
-
( (function(RevealProblemKind) {
|
|
41
|
-
function fromString(value) {
|
|
42
|
-
switch (value.toLowerCase()) {
|
|
43
|
-
case 'always':
|
|
44
|
-
return RevealProblemKind.Always;
|
|
45
|
-
case 'never':
|
|
46
|
-
return RevealProblemKind.Never;
|
|
47
|
-
case 'onproblem':
|
|
48
|
-
return RevealProblemKind.OnProblem;
|
|
49
|
-
default:
|
|
50
|
-
return RevealProblemKind.OnProblem;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
RevealProblemKind.fromString = fromString;
|
|
54
|
-
})(RevealProblemKind || (RevealProblemKind = {})));
|
|
55
|
-
var PanelKind;
|
|
56
|
-
( (function(PanelKind) {
|
|
57
|
-
PanelKind[PanelKind["Shared"] = 1] = "Shared";
|
|
58
|
-
PanelKind[PanelKind["Dedicated"] = 2] = "Dedicated";
|
|
59
|
-
PanelKind[PanelKind["New"] = 3] = "New";
|
|
60
|
-
})(PanelKind || (PanelKind = {})));
|
|
61
|
-
( (function(PanelKind) {
|
|
62
|
-
function fromString(value) {
|
|
63
|
-
switch (value.toLowerCase()) {
|
|
64
|
-
case 'shared':
|
|
65
|
-
return PanelKind.Shared;
|
|
66
|
-
case 'dedicated':
|
|
67
|
-
return PanelKind.Dedicated;
|
|
68
|
-
case 'new':
|
|
69
|
-
return PanelKind.New;
|
|
70
|
-
default:
|
|
71
|
-
return PanelKind.Shared;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
PanelKind.fromString = fromString;
|
|
75
|
-
})(PanelKind || (PanelKind = {})));
|
|
76
|
-
var PresentationOptions;
|
|
77
|
-
( (function(PresentationOptions) {
|
|
78
|
-
PresentationOptions.defaults = {
|
|
79
|
-
echo: true, reveal: RevealKind.Always, revealProblems: RevealProblemKind.Never, focus: false, panel: PanelKind.Shared, showReuseMessage: true, clear: false
|
|
80
|
-
};
|
|
81
|
-
})(PresentationOptions || (PresentationOptions = {})));
|
|
82
|
-
var RuntimeType;
|
|
83
|
-
( (function(RuntimeType) {
|
|
84
|
-
RuntimeType[RuntimeType["Shell"] = 1] = "Shell";
|
|
85
|
-
RuntimeType[RuntimeType["Process"] = 2] = "Process";
|
|
86
|
-
RuntimeType[RuntimeType["CustomExecution"] = 3] = "CustomExecution";
|
|
87
|
-
})(RuntimeType || (RuntimeType = {})));
|
|
88
|
-
( (function(RuntimeType) {
|
|
89
|
-
function fromString(value) {
|
|
90
|
-
switch (value.toLowerCase()) {
|
|
91
|
-
case 'shell':
|
|
92
|
-
return RuntimeType.Shell;
|
|
93
|
-
case 'process':
|
|
94
|
-
return RuntimeType.Process;
|
|
95
|
-
case 'customExecution':
|
|
96
|
-
return RuntimeType.CustomExecution;
|
|
97
|
-
default:
|
|
98
|
-
return RuntimeType.Process;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
RuntimeType.fromString = fromString;
|
|
102
|
-
function toString(value) {
|
|
103
|
-
switch (value) {
|
|
104
|
-
case RuntimeType.Shell: return 'shell';
|
|
105
|
-
case RuntimeType.Process: return 'process';
|
|
106
|
-
case RuntimeType.CustomExecution: return 'customExecution';
|
|
107
|
-
default: return 'process';
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
RuntimeType.toString = toString;
|
|
111
|
-
})(RuntimeType || (RuntimeType = {})));
|
|
112
|
-
var TaskSourceKind;
|
|
113
|
-
( (function(TaskSourceKind) {
|
|
114
|
-
TaskSourceKind.Workspace = 'workspace';
|
|
115
|
-
TaskSourceKind.Extension = 'extension';
|
|
116
|
-
TaskSourceKind.InMemory = 'inMemory';
|
|
117
|
-
TaskSourceKind.WorkspaceFile = 'workspaceFile';
|
|
118
|
-
TaskSourceKind.User = 'user';
|
|
119
|
-
function toConfigurationTarget(kind) {
|
|
120
|
-
switch (kind) {
|
|
121
|
-
case TaskSourceKind.User: return 2 ;
|
|
122
|
-
case TaskSourceKind.WorkspaceFile: return 5 ;
|
|
123
|
-
default: return 6 ;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
TaskSourceKind.toConfigurationTarget = toConfigurationTarget;
|
|
127
|
-
})(TaskSourceKind || (TaskSourceKind = {})));
|
|
128
|
-
var RunOnOptions;
|
|
129
|
-
( (function(RunOnOptions) {
|
|
130
|
-
RunOnOptions[RunOnOptions["default"] = 1] = "default";
|
|
131
|
-
RunOnOptions[RunOnOptions["folderOpen"] = 2] = "folderOpen";
|
|
132
|
-
})(RunOnOptions || (RunOnOptions = {})));
|
|
133
|
-
var RunOptions;
|
|
134
|
-
( (function(RunOptions) {
|
|
135
|
-
RunOptions.defaults = { reevaluateOnRerun: true, runOn: RunOnOptions.default, instanceLimit: 1 };
|
|
136
|
-
})(RunOptions || (RunOptions = {})));
|
|
137
|
-
class CommonTask {
|
|
138
|
-
constructor(id, label, type, runOptions, configurationProperties, source) {
|
|
139
|
-
this._label = '';
|
|
140
|
-
this._id = id;
|
|
141
|
-
if (label) {
|
|
142
|
-
this._label = label;
|
|
143
|
-
}
|
|
144
|
-
if (type) {
|
|
145
|
-
this.type = type;
|
|
146
|
-
}
|
|
147
|
-
this.runOptions = runOptions;
|
|
148
|
-
this.configurationProperties = configurationProperties;
|
|
149
|
-
this._source = source;
|
|
150
|
-
}
|
|
151
|
-
getDefinition(useSource) {
|
|
152
|
-
return undefined;
|
|
153
|
-
}
|
|
154
|
-
getMapKey() {
|
|
155
|
-
return this._id;
|
|
156
|
-
}
|
|
157
|
-
getKey() {
|
|
158
|
-
return undefined;
|
|
159
|
-
}
|
|
160
|
-
getCommonTaskId() {
|
|
161
|
-
const key = { folder: this.getFolderId(), id: this._id };
|
|
162
|
-
return JSON.stringify(key);
|
|
163
|
-
}
|
|
164
|
-
clone() {
|
|
165
|
-
return this.fromObject(Object.assign({}, this));
|
|
166
|
-
}
|
|
167
|
-
getWorkspaceFolder() {
|
|
168
|
-
return undefined;
|
|
169
|
-
}
|
|
170
|
-
getWorkspaceFileName() {
|
|
171
|
-
return undefined;
|
|
172
|
-
}
|
|
173
|
-
getTelemetryKind() {
|
|
174
|
-
return 'unknown';
|
|
175
|
-
}
|
|
176
|
-
matches(key, compareId = false) {
|
|
177
|
-
if (key === undefined) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
if (types.isString(key)) {
|
|
181
|
-
return key === this._label || key === this.configurationProperties.identifier || (compareId && key === this._id);
|
|
182
|
-
}
|
|
183
|
-
const identifier = this.getDefinition(true);
|
|
184
|
-
return identifier !== undefined && identifier._key === key._key;
|
|
185
|
-
}
|
|
186
|
-
getQualifiedLabel() {
|
|
187
|
-
const workspaceFolder = this.getWorkspaceFolder();
|
|
188
|
-
if (workspaceFolder) {
|
|
189
|
-
return `${this._label} (${workspaceFolder.name})`;
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
return this._label;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
getTaskExecution() {
|
|
196
|
-
const result = {
|
|
197
|
-
id: this._id,
|
|
198
|
-
task: this
|
|
199
|
-
};
|
|
200
|
-
return result;
|
|
201
|
-
}
|
|
202
|
-
addTaskLoadMessages(messages) {
|
|
203
|
-
if (this._taskLoadMessages === undefined) {
|
|
204
|
-
this._taskLoadMessages = [];
|
|
205
|
-
}
|
|
206
|
-
if (messages) {
|
|
207
|
-
this._taskLoadMessages = this._taskLoadMessages.concat(messages);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
get taskLoadMessages() {
|
|
211
|
-
return this._taskLoadMessages;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
class CustomTask extends CommonTask {
|
|
215
|
-
constructor(id, source, label, type, command, hasDefinedMatchers, runOptions, configurationProperties) {
|
|
216
|
-
super(id, label, undefined, runOptions, configurationProperties, source);
|
|
217
|
-
this.command = {};
|
|
218
|
-
this._source = source;
|
|
219
|
-
this.hasDefinedMatchers = hasDefinedMatchers;
|
|
220
|
-
if (command) {
|
|
221
|
-
this.command = command;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
clone() {
|
|
225
|
-
return ( new CustomTask(
|
|
226
|
-
this._id,
|
|
227
|
-
this._source,
|
|
228
|
-
this._label,
|
|
229
|
-
this.type,
|
|
230
|
-
this.command,
|
|
231
|
-
this.hasDefinedMatchers,
|
|
232
|
-
this.runOptions,
|
|
233
|
-
this.configurationProperties
|
|
234
|
-
));
|
|
235
|
-
}
|
|
236
|
-
customizes() {
|
|
237
|
-
if (this._source && this._source.customizes) {
|
|
238
|
-
return this._source.customizes;
|
|
239
|
-
}
|
|
240
|
-
return undefined;
|
|
241
|
-
}
|
|
242
|
-
getDefinition(useSource = false) {
|
|
243
|
-
if (useSource && this._source.customizes !== undefined) {
|
|
244
|
-
return this._source.customizes;
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
let type;
|
|
248
|
-
const commandRuntime = this.command ? this.command.runtime : undefined;
|
|
249
|
-
switch (commandRuntime) {
|
|
250
|
-
case RuntimeType.Shell:
|
|
251
|
-
type = 'shell';
|
|
252
|
-
break;
|
|
253
|
-
case RuntimeType.Process:
|
|
254
|
-
type = 'process';
|
|
255
|
-
break;
|
|
256
|
-
case RuntimeType.CustomExecution:
|
|
257
|
-
type = 'customExecution';
|
|
258
|
-
break;
|
|
259
|
-
case undefined:
|
|
260
|
-
type = '$composite';
|
|
261
|
-
break;
|
|
262
|
-
default:
|
|
263
|
-
throw new Error('Unexpected task runtime');
|
|
264
|
-
}
|
|
265
|
-
const result = {
|
|
266
|
-
type,
|
|
267
|
-
_key: this._id,
|
|
268
|
-
id: this._id
|
|
269
|
-
};
|
|
270
|
-
return result;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
static is(value) {
|
|
274
|
-
return value instanceof CustomTask;
|
|
275
|
-
}
|
|
276
|
-
getMapKey() {
|
|
277
|
-
const workspaceFolder = this._source.config.workspaceFolder;
|
|
278
|
-
return workspaceFolder ? `${( workspaceFolder.uri.toString())}|${this._id}|${this.instance}` : `${this._id}|${this.instance}`;
|
|
279
|
-
}
|
|
280
|
-
getFolderId() {
|
|
281
|
-
return this._source.kind === TaskSourceKind.User ? USER_TASKS_GROUP_KEY : this._source.config.workspaceFolder?.uri.toString();
|
|
282
|
-
}
|
|
283
|
-
getCommonTaskId() {
|
|
284
|
-
return this._source.customizes ? super.getCommonTaskId() : (this.getKey() ?? super.getCommonTaskId());
|
|
285
|
-
}
|
|
286
|
-
getKey() {
|
|
287
|
-
const workspaceFolder = this.getFolderId();
|
|
288
|
-
if (!workspaceFolder) {
|
|
289
|
-
return undefined;
|
|
290
|
-
}
|
|
291
|
-
let id = this.configurationProperties.identifier;
|
|
292
|
-
if (this._source.kind !== TaskSourceKind.Workspace) {
|
|
293
|
-
id += this._source.kind;
|
|
294
|
-
}
|
|
295
|
-
const key = { type: CUSTOMIZED_TASK_TYPE, folder: workspaceFolder, id };
|
|
296
|
-
return JSON.stringify(key);
|
|
297
|
-
}
|
|
298
|
-
getWorkspaceFolder() {
|
|
299
|
-
return this._source.config.workspaceFolder;
|
|
300
|
-
}
|
|
301
|
-
getWorkspaceFileName() {
|
|
302
|
-
return (this._source.config.workspace && this._source.config.workspace.configuration) ? resources.basename(this._source.config.workspace.configuration) : undefined;
|
|
303
|
-
}
|
|
304
|
-
getTelemetryKind() {
|
|
305
|
-
if (this._source.customizes) {
|
|
306
|
-
return 'workspace>extension';
|
|
307
|
-
}
|
|
308
|
-
else {
|
|
309
|
-
return 'workspace';
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
fromObject(object) {
|
|
313
|
-
return ( new CustomTask(
|
|
314
|
-
object._id,
|
|
315
|
-
object._source,
|
|
316
|
-
object._label,
|
|
317
|
-
object.type,
|
|
318
|
-
object.command,
|
|
319
|
-
object.hasDefinedMatchers,
|
|
320
|
-
object.runOptions,
|
|
321
|
-
object.configurationProperties
|
|
322
|
-
));
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
class ConfiguringTask extends CommonTask {
|
|
326
|
-
constructor(id, source, label, type, configures, runOptions, configurationProperties) {
|
|
327
|
-
super(id, label, type, runOptions, configurationProperties, source);
|
|
328
|
-
this._source = source;
|
|
329
|
-
this.configures = configures;
|
|
330
|
-
}
|
|
331
|
-
static is(value) {
|
|
332
|
-
return value instanceof ConfiguringTask;
|
|
333
|
-
}
|
|
334
|
-
fromObject(object) {
|
|
335
|
-
return object;
|
|
336
|
-
}
|
|
337
|
-
getDefinition() {
|
|
338
|
-
return this.configures;
|
|
339
|
-
}
|
|
340
|
-
getWorkspaceFileName() {
|
|
341
|
-
return (this._source.config.workspace && this._source.config.workspace.configuration) ? resources.basename(this._source.config.workspace.configuration) : undefined;
|
|
342
|
-
}
|
|
343
|
-
getWorkspaceFolder() {
|
|
344
|
-
return this._source.config.workspaceFolder;
|
|
345
|
-
}
|
|
346
|
-
getFolderId() {
|
|
347
|
-
return this._source.kind === TaskSourceKind.User ? USER_TASKS_GROUP_KEY : this._source.config.workspaceFolder?.uri.toString();
|
|
348
|
-
}
|
|
349
|
-
getKey() {
|
|
350
|
-
const workspaceFolder = this.getFolderId();
|
|
351
|
-
if (!workspaceFolder) {
|
|
352
|
-
return undefined;
|
|
353
|
-
}
|
|
354
|
-
let id = this.configurationProperties.identifier;
|
|
355
|
-
if (this._source.kind !== TaskSourceKind.Workspace) {
|
|
356
|
-
id += this._source.kind;
|
|
357
|
-
}
|
|
358
|
-
const key = { type: CUSTOMIZED_TASK_TYPE, folder: workspaceFolder, id };
|
|
359
|
-
return JSON.stringify(key);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
class ContributedTask extends CommonTask {
|
|
363
|
-
constructor(id, source, label, type, defines, command, hasDefinedMatchers, runOptions, configurationProperties) {
|
|
364
|
-
super(id, label, type, runOptions, configurationProperties, source);
|
|
365
|
-
this.defines = defines;
|
|
366
|
-
this.hasDefinedMatchers = hasDefinedMatchers;
|
|
367
|
-
this.command = command;
|
|
368
|
-
this.icon = configurationProperties.icon;
|
|
369
|
-
this.hide = configurationProperties.hide;
|
|
370
|
-
}
|
|
371
|
-
clone() {
|
|
372
|
-
return ( new ContributedTask(
|
|
373
|
-
this._id,
|
|
374
|
-
this._source,
|
|
375
|
-
this._label,
|
|
376
|
-
this.type,
|
|
377
|
-
this.defines,
|
|
378
|
-
this.command,
|
|
379
|
-
this.hasDefinedMatchers,
|
|
380
|
-
this.runOptions,
|
|
381
|
-
this.configurationProperties
|
|
382
|
-
));
|
|
383
|
-
}
|
|
384
|
-
getDefinition() {
|
|
385
|
-
return this.defines;
|
|
386
|
-
}
|
|
387
|
-
static is(value) {
|
|
388
|
-
return value instanceof ContributedTask;
|
|
389
|
-
}
|
|
390
|
-
getMapKey() {
|
|
391
|
-
const workspaceFolder = this._source.workspaceFolder;
|
|
392
|
-
return workspaceFolder
|
|
393
|
-
? `${( this._source.scope.toString())}|${( workspaceFolder.uri.toString())}|${this._id}|${this.instance}`
|
|
394
|
-
: `${( this._source.scope.toString())}|${this._id}|${this.instance}`;
|
|
395
|
-
}
|
|
396
|
-
getFolderId() {
|
|
397
|
-
if (this._source.scope === 3 && this._source.workspaceFolder) {
|
|
398
|
-
return ( this._source.workspaceFolder.uri.toString());
|
|
399
|
-
}
|
|
400
|
-
return undefined;
|
|
401
|
-
}
|
|
402
|
-
getKey() {
|
|
403
|
-
const key = { type: 'contributed', scope: this._source.scope, id: this._id };
|
|
404
|
-
key.folder = this.getFolderId();
|
|
405
|
-
return JSON.stringify(key);
|
|
406
|
-
}
|
|
407
|
-
getWorkspaceFolder() {
|
|
408
|
-
return this._source.workspaceFolder;
|
|
409
|
-
}
|
|
410
|
-
getTelemetryKind() {
|
|
411
|
-
return 'extension';
|
|
412
|
-
}
|
|
413
|
-
fromObject(object) {
|
|
414
|
-
return ( new ContributedTask(
|
|
415
|
-
object._id,
|
|
416
|
-
object._source,
|
|
417
|
-
object._label,
|
|
418
|
-
object.type,
|
|
419
|
-
object.defines,
|
|
420
|
-
object.command,
|
|
421
|
-
object.hasDefinedMatchers,
|
|
422
|
-
object.runOptions,
|
|
423
|
-
object.configurationProperties
|
|
424
|
-
));
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
var KeyedTaskIdentifier;
|
|
428
|
-
( (function(KeyedTaskIdentifier) {
|
|
429
|
-
function sortedStringify(literal) {
|
|
430
|
-
const keys = ( Object.keys(literal)).sort();
|
|
431
|
-
let result = '';
|
|
432
|
-
for (const key of keys) {
|
|
433
|
-
let stringified = literal[key];
|
|
434
|
-
if (stringified instanceof Object) {
|
|
435
|
-
stringified = sortedStringify(stringified);
|
|
436
|
-
}
|
|
437
|
-
else if (typeof stringified === 'string') {
|
|
438
|
-
stringified = stringified.replace(/,/g, ',,');
|
|
439
|
-
}
|
|
440
|
-
result += key + ',' + stringified + ',';
|
|
441
|
-
}
|
|
442
|
-
return result;
|
|
443
|
-
}
|
|
444
|
-
function create(value) {
|
|
445
|
-
const resultKey = sortedStringify(value);
|
|
446
|
-
const result = { _key: resultKey, type: value.taskType };
|
|
447
|
-
Object.assign(result, value);
|
|
448
|
-
return result;
|
|
449
|
-
}
|
|
450
|
-
KeyedTaskIdentifier.create = create;
|
|
451
|
-
})(KeyedTaskIdentifier || (KeyedTaskIdentifier = {})));
|
|
452
|
-
var TaskDefinition;
|
|
453
|
-
( (function(TaskDefinition) {
|
|
454
|
-
function createTaskIdentifier(external, reporter) {
|
|
455
|
-
const definition = TaskDefinitionRegistry.get(external.type);
|
|
456
|
-
if (definition === undefined) {
|
|
457
|
-
const copy = objects.deepClone(external);
|
|
458
|
-
delete copy._key;
|
|
459
|
-
return KeyedTaskIdentifier.create(copy);
|
|
460
|
-
}
|
|
461
|
-
const literal = Object.create(null);
|
|
462
|
-
literal.type = definition.taskType;
|
|
463
|
-
const required = ( new Set());
|
|
464
|
-
definition.required.forEach(element => required.add(element));
|
|
465
|
-
const properties = definition.properties;
|
|
466
|
-
for (const property of ( Object.keys(properties))) {
|
|
467
|
-
const value = external[property];
|
|
468
|
-
if (value !== undefined && value !== null) {
|
|
469
|
-
literal[property] = value;
|
|
470
|
-
}
|
|
471
|
-
else if (( required.has(property))) {
|
|
472
|
-
const schema = properties[property];
|
|
473
|
-
if (schema.default !== undefined) {
|
|
474
|
-
literal[property] = objects.deepClone(schema.default);
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
switch (schema.type) {
|
|
478
|
-
case 'boolean':
|
|
479
|
-
literal[property] = false;
|
|
480
|
-
break;
|
|
481
|
-
case 'number':
|
|
482
|
-
case 'integer':
|
|
483
|
-
literal[property] = 0;
|
|
484
|
-
break;
|
|
485
|
-
case 'string':
|
|
486
|
-
literal[property] = '';
|
|
487
|
-
break;
|
|
488
|
-
default:
|
|
489
|
-
reporter.error(( nls.localizeWithPath(
|
|
490
|
-
'vs/workbench/contrib/tasks/common/tasks',
|
|
491
|
-
'TaskDefinition.missingRequiredProperty',
|
|
492
|
-
'Error: the task identifier \'{0}\' is missing the required property \'{1}\'. The task identifier will be ignored.',
|
|
493
|
-
JSON.stringify(external, undefined, 0),
|
|
494
|
-
property
|
|
495
|
-
)));
|
|
496
|
-
return undefined;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
return KeyedTaskIdentifier.create(literal);
|
|
502
|
-
}
|
|
503
|
-
TaskDefinition.createTaskIdentifier = createTaskIdentifier;
|
|
504
|
-
})(TaskDefinition || (TaskDefinition = {})));
|
|
505
|
-
|
|
506
|
-
export { CUSTOMIZED_TASK_TYPE, CommandOptions, CommonTask, ConfiguringTask, ContributedTask, CustomTask, KeyedTaskIdentifier, PanelKind, PresentationOptions, RevealKind, RevealProblemKind, RunOnOptions, RunOptions, RuntimeType, TaskDefinition, TaskSourceKind, USER_TASKS_GROUP_KEY };
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
3
|
-
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
-
import { ITerminalService } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminal';
|
|
5
|
-
|
|
6
|
-
let TerminalProcessExtHostProxy = class TerminalProcessExtHostProxy extends Disposable {
|
|
7
|
-
get onProcessReady() { return this._onProcessReady.event; }
|
|
8
|
-
constructor(instanceId, _cols, _rows, _terminalService) {
|
|
9
|
-
super();
|
|
10
|
-
this.instanceId = instanceId;
|
|
11
|
-
this._cols = _cols;
|
|
12
|
-
this._rows = _rows;
|
|
13
|
-
this._terminalService = _terminalService;
|
|
14
|
-
this.id = 0;
|
|
15
|
-
this.shouldPersist = false;
|
|
16
|
-
this._onProcessData = this._register(( new Emitter()));
|
|
17
|
-
this.onProcessData = this._onProcessData.event;
|
|
18
|
-
this._onProcessReady = this._register(( new Emitter()));
|
|
19
|
-
this._onStart = this._register(( new Emitter()));
|
|
20
|
-
this.onStart = this._onStart.event;
|
|
21
|
-
this._onInput = this._register(( new Emitter()));
|
|
22
|
-
this.onInput = this._onInput.event;
|
|
23
|
-
this._onBinary = this._register(( new Emitter()));
|
|
24
|
-
this.onBinary = this._onBinary.event;
|
|
25
|
-
this._onResize = this._register(( new Emitter()));
|
|
26
|
-
this.onResize = this._onResize.event;
|
|
27
|
-
this._onAcknowledgeDataEvent = this._register(( new Emitter()));
|
|
28
|
-
this.onAcknowledgeDataEvent = this._onAcknowledgeDataEvent.event;
|
|
29
|
-
this._onShutdown = this._register(( new Emitter()));
|
|
30
|
-
this.onShutdown = this._onShutdown.event;
|
|
31
|
-
this._onRequestInitialCwd = this._register(( new Emitter()));
|
|
32
|
-
this.onRequestInitialCwd = this._onRequestInitialCwd.event;
|
|
33
|
-
this._onRequestCwd = this._register(( new Emitter()));
|
|
34
|
-
this.onRequestCwd = this._onRequestCwd.event;
|
|
35
|
-
this._onDidChangeProperty = this._register(( new Emitter()));
|
|
36
|
-
this.onDidChangeProperty = this._onDidChangeProperty.event;
|
|
37
|
-
this._onProcessExit = this._register(( new Emitter()));
|
|
38
|
-
this.onProcessExit = this._onProcessExit.event;
|
|
39
|
-
this._pendingInitialCwdRequests = [];
|
|
40
|
-
this._pendingCwdRequests = [];
|
|
41
|
-
}
|
|
42
|
-
emitData(data) {
|
|
43
|
-
this._onProcessData.fire(data);
|
|
44
|
-
}
|
|
45
|
-
emitTitle(title) {
|
|
46
|
-
this._onDidChangeProperty.fire({ type: "title" , value: title });
|
|
47
|
-
}
|
|
48
|
-
emitReady(pid, cwd) {
|
|
49
|
-
this._onProcessReady.fire({ pid, cwd, windowsPty: undefined });
|
|
50
|
-
}
|
|
51
|
-
emitProcessProperty({ type, value }) {
|
|
52
|
-
switch (type) {
|
|
53
|
-
case "cwd" :
|
|
54
|
-
this.emitCwd(value);
|
|
55
|
-
break;
|
|
56
|
-
case "initialCwd" :
|
|
57
|
-
this.emitInitialCwd(value);
|
|
58
|
-
break;
|
|
59
|
-
case "title" :
|
|
60
|
-
this.emitTitle(value);
|
|
61
|
-
break;
|
|
62
|
-
case "overrideDimensions" :
|
|
63
|
-
this.emitOverrideDimensions(value);
|
|
64
|
-
break;
|
|
65
|
-
case "resolvedShellLaunchConfig" :
|
|
66
|
-
this.emitResolvedShellLaunchConfig(value);
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
emitExit(exitCode) {
|
|
71
|
-
this._onProcessExit.fire(exitCode);
|
|
72
|
-
this.dispose();
|
|
73
|
-
}
|
|
74
|
-
emitOverrideDimensions(dimensions) {
|
|
75
|
-
this._onDidChangeProperty.fire({ type: "overrideDimensions" , value: dimensions });
|
|
76
|
-
}
|
|
77
|
-
emitResolvedShellLaunchConfig(shellLaunchConfig) {
|
|
78
|
-
this._onDidChangeProperty.fire({ type: "resolvedShellLaunchConfig" , value: shellLaunchConfig });
|
|
79
|
-
}
|
|
80
|
-
emitInitialCwd(initialCwd) {
|
|
81
|
-
while (this._pendingInitialCwdRequests.length > 0) {
|
|
82
|
-
this._pendingInitialCwdRequests.pop()(initialCwd);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
emitCwd(cwd) {
|
|
86
|
-
while (this._pendingCwdRequests.length > 0) {
|
|
87
|
-
this._pendingCwdRequests.pop()(cwd);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async start() {
|
|
91
|
-
return this._terminalService.requestStartExtensionTerminal(this, this._cols, this._rows);
|
|
92
|
-
}
|
|
93
|
-
shutdown(immediate) {
|
|
94
|
-
this._onShutdown.fire(immediate);
|
|
95
|
-
}
|
|
96
|
-
input(data) {
|
|
97
|
-
this._onInput.fire(data);
|
|
98
|
-
}
|
|
99
|
-
resize(cols, rows) {
|
|
100
|
-
this._onResize.fire({ cols, rows });
|
|
101
|
-
}
|
|
102
|
-
clearBuffer() {
|
|
103
|
-
}
|
|
104
|
-
acknowledgeDataEvent() {
|
|
105
|
-
}
|
|
106
|
-
async setUnicodeVersion(version) {
|
|
107
|
-
}
|
|
108
|
-
async processBinary(data) {
|
|
109
|
-
this._onBinary.fire(data);
|
|
110
|
-
}
|
|
111
|
-
getInitialCwd() {
|
|
112
|
-
return ( new Promise(resolve => {
|
|
113
|
-
this._onRequestInitialCwd.fire();
|
|
114
|
-
this._pendingInitialCwdRequests.push(resolve);
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
|
-
getCwd() {
|
|
118
|
-
return ( new Promise(resolve => {
|
|
119
|
-
this._onRequestCwd.fire();
|
|
120
|
-
this._pendingCwdRequests.push(resolve);
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
|
-
async refreshProperty(type) {
|
|
124
|
-
}
|
|
125
|
-
async updateProperty(type, value) {
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
TerminalProcessExtHostProxy = ( __decorate([
|
|
129
|
-
( __param(3, ITerminalService))
|
|
130
|
-
], TerminalProcessExtHostProxy));
|
|
131
|
-
|
|
132
|
-
export { TerminalProcessExtHostProxy };
|