@codingame/monaco-vscode-task-service-override 1.85.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.
Files changed (25) hide show
  1. package/external/tslib/tslib.es6.js +11 -0
  2. package/index.d.ts +1 -0
  3. package/index.js +1 -0
  4. package/override/vs/platform/dialogs/common/dialogs.js +8 -0
  5. package/package.json +24 -0
  6. package/task.d.ts +5 -0
  7. package/task.js +12 -0
  8. package/vscode/src/vs/base/common/parsers.js +44 -0
  9. package/vscode/src/vs/workbench/contrib/tasks/browser/abstractTaskService.js +3851 -0
  10. package/vscode/src/vs/workbench/contrib/tasks/browser/runAutomaticTasks.js +167 -0
  11. package/vscode/src/vs/workbench/contrib/tasks/browser/task.contribution.js +694 -0
  12. package/vscode/src/vs/workbench/contrib/tasks/browser/taskQuickPick.js +452 -0
  13. package/vscode/src/vs/workbench/contrib/tasks/browser/taskService.js +36 -0
  14. package/vscode/src/vs/workbench/contrib/tasks/browser/taskTerminalStatus.js +191 -0
  15. package/vscode/src/vs/workbench/contrib/tasks/browser/tasksQuickAccess.js +121 -0
  16. package/vscode/src/vs/workbench/contrib/tasks/browser/terminalTaskSystem.js +1713 -0
  17. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchemaCommon.js +440 -0
  18. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v1.js +125 -0
  19. package/vscode/src/vs/workbench/contrib/tasks/common/jsonSchema_v2.js +901 -0
  20. package/vscode/src/vs/workbench/contrib/tasks/common/problemCollectors.js +464 -0
  21. package/vscode/src/vs/workbench/contrib/tasks/common/problemMatcher.js +1796 -0
  22. package/vscode/src/vs/workbench/contrib/tasks/common/taskConfiguration.js +1581 -0
  23. package/vscode/src/vs/workbench/contrib/tasks/common/taskSystem.js +15 -0
  24. package/vscode/src/vs/workbench/contrib/tasks/common/taskTemplates.js +145 -0
  25. package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEscapeSequences.js +13 -0
@@ -0,0 +1,121 @@
1
+ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
+ import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
3
+ import { IQuickInputService } from 'monaco-editor/esm/vs/platform/quickinput/common/quickInput.js';
4
+ import { PickerQuickAccessProvider, TriggerAction } from 'vscode/vscode/vs/platform/quickinput/browser/pickerQuickAccess';
5
+ import { matchesFuzzy } from 'monaco-editor/esm/vs/base/common/filters.js';
6
+ import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
7
+ import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService';
8
+ import { ContributedTask, CustomTask, ConfiguringTask } from 'vscode/vscode/vs/workbench/contrib/tasks/common/tasks';
9
+ import { TaskQuickPick } from './taskQuickPick.js';
10
+ import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
11
+ import { isString } from 'monaco-editor/esm/vs/base/common/types.js';
12
+ import { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
13
+ import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
14
+ import { IThemeService } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
15
+ import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
16
+ import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
17
+
18
+ var TasksQuickAccessProvider_1;
19
+ let TasksQuickAccessProvider = class TasksQuickAccessProvider extends PickerQuickAccessProvider {
20
+ static { TasksQuickAccessProvider_1 = this; }
21
+ static { this.PREFIX = 'task '; }
22
+ constructor(extensionService, _taskService, _configurationService, _quickInputService, _notificationService, _dialogService, _themeService, _storageService) {
23
+ super(TasksQuickAccessProvider_1.PREFIX, {
24
+ noResultsPick: {
25
+ label: ( localizeWithPath(
26
+ 'vs/workbench/contrib/tasks/browser/tasksQuickAccess',
27
+ 'noTaskResults',
28
+ "No matching tasks"
29
+ ))
30
+ }
31
+ });
32
+ this._taskService = _taskService;
33
+ this._configurationService = _configurationService;
34
+ this._quickInputService = _quickInputService;
35
+ this._notificationService = _notificationService;
36
+ this._dialogService = _dialogService;
37
+ this._themeService = _themeService;
38
+ this._storageService = _storageService;
39
+ }
40
+ async _getPicks(filter, disposables, token) {
41
+ if (token.isCancellationRequested) {
42
+ return [];
43
+ }
44
+ const taskQuickPick = ( new TaskQuickPick(
45
+ this._taskService,
46
+ this._configurationService,
47
+ this._quickInputService,
48
+ this._notificationService,
49
+ this._themeService,
50
+ this._dialogService,
51
+ this._storageService
52
+ ));
53
+ const topLevelPicks = await taskQuickPick.getTopLevelEntries();
54
+ const taskPicks = [];
55
+ for (const entry of topLevelPicks.entries) {
56
+ const highlights = matchesFuzzy(filter, entry.label);
57
+ if (!highlights) {
58
+ continue;
59
+ }
60
+ if (entry.type === 'separator') {
61
+ taskPicks.push(entry);
62
+ }
63
+ const task = entry.task;
64
+ const quickAccessEntry = entry;
65
+ quickAccessEntry.highlights = { label: highlights };
66
+ quickAccessEntry.trigger = (index) => {
67
+ if ((index === 1) && (quickAccessEntry.buttons?.length === 2)) {
68
+ const key = (task && !isString(task)) ? task.getKey() : undefined;
69
+ if (key) {
70
+ this._taskService.removeRecentlyUsedTask(key);
71
+ }
72
+ return TriggerAction.REFRESH_PICKER;
73
+ }
74
+ else {
75
+ if (ContributedTask.is(task)) {
76
+ this._taskService.customize(task, undefined, true);
77
+ }
78
+ else if (CustomTask.is(task)) {
79
+ this._taskService.openConfig(task);
80
+ }
81
+ return TriggerAction.CLOSE_PICKER;
82
+ }
83
+ };
84
+ quickAccessEntry.accept = async () => {
85
+ if (isString(task)) {
86
+ const showResult = await taskQuickPick.show(( localizeWithPath(
87
+ 'vs/workbench/contrib/tasks/browser/tasksQuickAccess',
88
+ 'TaskService.pickRunTask',
89
+ 'Select the task to run'
90
+ )), undefined, task);
91
+ if (showResult) {
92
+ this._taskService.run(showResult, { attachProblemMatcher: true });
93
+ }
94
+ }
95
+ else {
96
+ this._taskService.run(await this._toTask(task), { attachProblemMatcher: true });
97
+ }
98
+ };
99
+ taskPicks.push(quickAccessEntry);
100
+ }
101
+ return taskPicks;
102
+ }
103
+ async _toTask(task) {
104
+ if (!ConfiguringTask.is(task)) {
105
+ return task;
106
+ }
107
+ return this._taskService.tryResolveTask(task);
108
+ }
109
+ };
110
+ TasksQuickAccessProvider = TasksQuickAccessProvider_1 = ( __decorate([
111
+ ( __param(0, IExtensionService)),
112
+ ( __param(1, ITaskService)),
113
+ ( __param(2, IConfigurationService)),
114
+ ( __param(3, IQuickInputService)),
115
+ ( __param(4, INotificationService)),
116
+ ( __param(5, IDialogService)),
117
+ ( __param(6, IThemeService)),
118
+ ( __param(7, IStorageService))
119
+ ], TasksQuickAccessProvider));
120
+
121
+ export { TasksQuickAccessProvider };