mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
* use glob on tasks otherwise fallback to default * add support for test commands also * try to find one globbed task otherwise fallback to defaults * - get relativePath (but fallback to absolute if outside of workspace) - bring back json schema * Refactor and reduce duplicate code * remove glob, make isDefault a string or boolean * update taskConfig * - rebase - type updates - splitPerGroupType should check explicitly for true on isDefault - hygiene check * Remove task glob from API * Task group DTO updates * Make sure globs run ahead of default task if there's multiple globs matching * Style and name changes * More naming and code re-use * Glob doesn't work when only 1 glob match Co-authored-by: Alex Ross <alros@microsoft.com>
This commit is contained in:
@@ -29,7 +29,7 @@ import { ExtHostContext, MainThreadTaskShape, ExtHostTaskShape, MainContext } fr
|
||||
import {
|
||||
TaskDefinitionDTO, TaskExecutionDTO, ProcessExecutionOptionsDTO, TaskPresentationOptionsDTO,
|
||||
ProcessExecutionDTO, ShellExecutionDTO, ShellExecutionOptionsDTO, CustomExecutionDTO, TaskDTO, TaskSourceDTO, TaskHandleDTO, TaskFilterDTO, TaskProcessStartedDTO, TaskProcessEndedDTO, TaskSystemInfoDTO,
|
||||
RunOptionsDTO
|
||||
RunOptionsDTO, TaskGroupDTO
|
||||
} from 'vs/workbench/api/common/shared/tasks';
|
||||
import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver';
|
||||
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
|
||||
@@ -320,7 +320,7 @@ namespace TaskDTO {
|
||||
hasDefinedMatchers: ContributedTask.is(task) ? task.hasDefinedMatchers : false,
|
||||
runOptions: RunOptionsDTO.from(task.runOptions),
|
||||
};
|
||||
result.group = TaskGroup.from(task.configurationProperties.group);
|
||||
result.group = TaskGroupDTO.from(task.configurationProperties.group);
|
||||
|
||||
if (task.configurationProperties.detail) {
|
||||
result.detail = task.configurationProperties.detail;
|
||||
@@ -389,6 +389,18 @@ namespace TaskDTO {
|
||||
}
|
||||
}
|
||||
|
||||
namespace TaskGroupDTO {
|
||||
export function from(value: string | TaskGroup | undefined): TaskGroupDTO | undefined {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
_id: (typeof value === 'string') ? value : value._id,
|
||||
isDefault: (typeof value === 'string') ? false : ((typeof value.isDefault === 'string') ? false : value.isDefault)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
namespace TaskFilterDTO {
|
||||
export function from(value: TaskFilter): TaskFilterDTO {
|
||||
return value;
|
||||
|
||||
@@ -320,7 +320,7 @@ export namespace TaskDTO {
|
||||
result.group = types.TaskGroup.from(value.group._id);
|
||||
if (result.group && value.group.isDefault) {
|
||||
result.group = new types.TaskGroup(result.group.id, result.group.label);
|
||||
if (value.group.isDefault) {
|
||||
if (value.group.isDefault === true) {
|
||||
result.group.isDefault = value.group.isDefault;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user