@theia/task 1.67.0-next.56 → 1.67.0-next.86
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/lib/browser/index.d.ts +7 -0
- package/lib/browser/index.d.ts.map +1 -0
- package/lib/browser/index.js +25 -0
- package/lib/browser/index.js.map +1 -0
- package/lib/browser/process/process-task-contribution.d.ts +7 -0
- package/lib/browser/process/process-task-contribution.d.ts.map +1 -0
- package/lib/browser/process/process-task-contribution.js +36 -0
- package/lib/browser/process/process-task-contribution.js.map +1 -0
- package/lib/browser/process/process-task-frontend-module.d.ts +3 -0
- package/lib/browser/process/process-task-frontend-module.d.ts.map +1 -0
- package/lib/browser/process/process-task-frontend-module.js +28 -0
- package/lib/browser/process/process-task-frontend-module.js.map +1 -0
- package/lib/browser/process/process-task-resolver.d.ts +18 -0
- package/lib/browser/process/process-task-resolver.d.ts.map +1 -0
- package/lib/browser/process/process-task-resolver.js +94 -0
- package/lib/browser/process/process-task-resolver.js.map +1 -0
- package/lib/browser/provided-task-configurations.d.ts +44 -0
- package/lib/browser/provided-task-configurations.d.ts.map +1 -0
- package/lib/browser/provided-task-configurations.js +206 -0
- package/lib/browser/provided-task-configurations.js.map +1 -0
- package/lib/browser/provided-task-configurations.spec.d.ts +2 -0
- package/lib/browser/provided-task-configurations.spec.d.ts.map +1 -0
- package/lib/browser/provided-task-configurations.spec.js +44 -0
- package/lib/browser/provided-task-configurations.spec.js.map +1 -0
- package/lib/browser/quick-open-task.d.ts +146 -0
- package/lib/browser/quick-open-task.d.ts.map +1 -0
- package/lib/browser/quick-open-task.js +757 -0
- package/lib/browser/quick-open-task.js.map +1 -0
- package/lib/browser/task-configuration-manager.d.ts +63 -0
- package/lib/browser/task-configuration-manager.d.ts.map +1 -0
- package/lib/browser/task-configuration-manager.js +243 -0
- package/lib/browser/task-configuration-manager.js.map +1 -0
- package/lib/browser/task-configuration-model.d.ts +34 -0
- package/lib/browser/task-configuration-model.d.ts.map +1 -0
- package/lib/browser/task-configuration-model.js +83 -0
- package/lib/browser/task-configuration-model.js.map +1 -0
- package/lib/browser/task-configurations.d.ts +128 -0
- package/lib/browser/task-configurations.d.ts.map +1 -0
- package/lib/browser/task-configurations.js +479 -0
- package/lib/browser/task-configurations.js.map +1 -0
- package/lib/browser/task-context-key-service.d.ts +18 -0
- package/lib/browser/task-context-key-service.d.ts.map +1 -0
- package/lib/browser/task-context-key-service.js +72 -0
- package/lib/browser/task-context-key-service.js.map +1 -0
- package/lib/browser/task-contribution.d.ts +183 -0
- package/lib/browser/task-contribution.d.ts.map +1 -0
- package/lib/browser/task-contribution.js +199 -0
- package/lib/browser/task-contribution.js.map +1 -0
- package/lib/browser/task-definition-registry.d.ts +39 -0
- package/lib/browser/task-definition-registry.d.ts.map +1 -0
- package/lib/browser/task-definition-registry.js +130 -0
- package/lib/browser/task-definition-registry.js.map +1 -0
- package/lib/browser/task-definition-registry.spec.d.ts +2 -0
- package/lib/browser/task-definition-registry.spec.d.ts.map +1 -0
- package/lib/browser/task-definition-registry.spec.js +171 -0
- package/lib/browser/task-definition-registry.spec.js.map +1 -0
- package/lib/browser/task-frontend-contribution.d.ts +57 -0
- package/lib/browser/task-frontend-contribution.d.ts.map +1 -0
- package/lib/browser/task-frontend-contribution.js +351 -0
- package/lib/browser/task-frontend-contribution.js.map +1 -0
- package/lib/browser/task-frontend-module.d.ts +6 -0
- package/lib/browser/task-frontend-module.d.ts.map +1 -0
- package/lib/browser/task-frontend-module.js +82 -0
- package/lib/browser/task-frontend-module.js.map +1 -0
- package/lib/browser/task-name-resolver.d.ts +14 -0
- package/lib/browser/task-name-resolver.d.ts.map +1 -0
- package/lib/browser/task-name-resolver.js +60 -0
- package/lib/browser/task-name-resolver.js.map +1 -0
- package/lib/browser/task-node.d.ts +10 -0
- package/lib/browser/task-node.d.ts.map +1 -0
- package/lib/browser/task-node.js +18 -0
- package/lib/browser/task-node.js.map +1 -0
- package/lib/browser/task-problem-matcher-registry.d.ts +41 -0
- package/lib/browser/task-problem-matcher-registry.d.ts.map +1 -0
- package/lib/browser/task-problem-matcher-registry.js +302 -0
- package/lib/browser/task-problem-matcher-registry.js.map +1 -0
- package/lib/browser/task-problem-pattern-registry.d.ts +24 -0
- package/lib/browser/task-problem-pattern-registry.d.ts.map +1 -0
- package/lib/browser/task-problem-pattern-registry.js +203 -0
- package/lib/browser/task-problem-pattern-registry.js.map +1 -0
- package/lib/browser/task-schema-updater.d.ts +58 -0
- package/lib/browser/task-schema-updater.d.ts.map +1 -0
- package/lib/browser/task-schema-updater.js +676 -0
- package/lib/browser/task-schema-updater.js.map +1 -0
- package/lib/browser/task-service.d.ts +282 -0
- package/lib/browser/task-service.d.ts.map +1 -0
- package/lib/browser/task-service.js +1116 -0
- package/lib/browser/task-service.js.map +1 -0
- package/lib/browser/task-source-resolver.d.ts +10 -0
- package/lib/browser/task-source-resolver.d.ts.map +1 -0
- package/lib/browser/task-source-resolver.js +44 -0
- package/lib/browser/task-source-resolver.js.map +1 -0
- package/lib/browser/task-templates.d.ts +14 -0
- package/lib/browser/task-templates.d.ts.map +1 -0
- package/lib/browser/task-templates.js +158 -0
- package/lib/browser/task-templates.js.map +1 -0
- package/lib/browser/task-terminal-widget-manager.d.ts +45 -0
- package/lib/browser/task-terminal-widget-manager.d.ts.map +1 -0
- package/lib/browser/task-terminal-widget-manager.js +222 -0
- package/lib/browser/task-terminal-widget-manager.js.map +1 -0
- package/lib/browser/tasks-monaco-contribution.d.ts +2 -0
- package/lib/browser/tasks-monaco-contribution.d.ts.map +1 -0
- package/lib/browser/tasks-monaco-contribution.js +28 -0
- package/lib/browser/tasks-monaco-contribution.js.map +1 -0
- package/lib/common/index.d.ts +5 -0
- package/lib/common/index.d.ts.map +1 -0
- package/lib/common/index.js +23 -0
- package/lib/common/index.js.map +1 -0
- package/lib/common/problem-matcher-protocol.d.ts +125 -0
- package/lib/common/problem-matcher-protocol.d.ts.map +1 -0
- package/lib/common/problem-matcher-protocol.js +133 -0
- package/lib/common/problem-matcher-protocol.js.map +1 -0
- package/lib/common/process/task-protocol.d.ts +69 -0
- package/lib/common/process/task-protocol.d.ts.map +1 -0
- package/lib/common/process/task-protocol.js +34 -0
- package/lib/common/process/task-protocol.js.map +1 -0
- package/lib/common/task-common-module.d.ts +8 -0
- package/lib/common/task-common-module.d.ts.map +1 -0
- package/lib/common/task-common-module.js +29 -0
- package/lib/common/task-common-module.js.map +1 -0
- package/lib/common/task-preferences.d.ts +6 -0
- package/lib/common/task-preferences.d.ts.map +1 -0
- package/lib/common/task-preferences.js +41 -0
- package/lib/common/task-preferences.js.map +1 -0
- package/lib/common/task-protocol.d.ts +194 -0
- package/lib/common/task-protocol.d.ts.map +1 -0
- package/lib/common/task-protocol.js +138 -0
- package/lib/common/task-protocol.js.map +1 -0
- package/lib/common/task-util.d.ts +23 -0
- package/lib/common/task-util.d.ts.map +1 -0
- package/lib/common/task-util.js +47 -0
- package/lib/common/task-util.js.map +1 -0
- package/lib/common/task-watcher.d.ts +18 -0
- package/lib/common/task-watcher.d.ts.map +1 -0
- package/lib/common/task-watcher.js +82 -0
- package/lib/common/task-watcher.js.map +1 -0
- package/lib/node/custom/custom-task-runner-backend-module.d.ts +3 -0
- package/lib/node/custom/custom-task-runner-backend-module.d.ts.map +1 -0
- package/lib/node/custom/custom-task-runner-backend-module.js +37 -0
- package/lib/node/custom/custom-task-runner-backend-module.js.map +1 -0
- package/lib/node/custom/custom-task-runner-contribution.d.ts +7 -0
- package/lib/node/custom/custom-task-runner-contribution.d.ts.map +1 -0
- package/lib/node/custom/custom-task-runner-contribution.js +35 -0
- package/lib/node/custom/custom-task-runner-contribution.js.map +1 -0
- package/lib/node/custom/custom-task-runner.d.ts +16 -0
- package/lib/node/custom/custom-task-runner.d.ts.map +1 -0
- package/lib/node/custom/custom-task-runner.js +62 -0
- package/lib/node/custom/custom-task-runner.js.map +1 -0
- package/lib/node/custom/custom-task.d.ts +21 -0
- package/lib/node/custom/custom-task.d.ts.map +1 -0
- package/lib/node/custom/custom-task.js +68 -0
- package/lib/node/custom/custom-task.js.map +1 -0
- package/lib/node/index.d.ts +4 -0
- package/lib/node/index.d.ts.map +1 -0
- package/lib/node/index.js +22 -0
- package/lib/node/index.js.map +1 -0
- package/lib/node/process/process-task-runner-backend-module.d.ts +3 -0
- package/lib/node/process/process-task-runner-backend-module.d.ts.map +1 -0
- package/lib/node/process/process-task-runner-backend-module.js +37 -0
- package/lib/node/process/process-task-runner-backend-module.js.map +1 -0
- package/lib/node/process/process-task-runner-contribution.d.ts +7 -0
- package/lib/node/process/process-task-runner-contribution.d.ts.map +1 -0
- package/lib/node/process/process-task-runner-contribution.js +36 -0
- package/lib/node/process/process-task-runner-contribution.js.map +1 -0
- package/lib/node/process/process-task-runner.d.ts +61 -0
- package/lib/node/process/process-task-runner.d.ts.map +1 -0
- package/lib/node/process/process-task-runner.js +348 -0
- package/lib/node/process/process-task-runner.js.map +1 -0
- package/lib/node/process/process-task.d.ts +27 -0
- package/lib/node/process/process-task.d.ts.map +1 -0
- package/lib/node/process/process-task.js +125 -0
- package/lib/node/process/process-task.js.map +1 -0
- package/lib/node/process/process-task.spec.d.ts +2 -0
- package/lib/node/process/process-task.spec.d.ts.map +1 -0
- package/lib/node/process/process-task.spec.js +30 -0
- package/lib/node/process/process-task.spec.js.map +1 -0
- package/lib/node/task-abstract-line-matcher.d.ts +50 -0
- package/lib/node/task-abstract-line-matcher.d.ts.map +1 -0
- package/lib/node/task-abstract-line-matcher.js +274 -0
- package/lib/node/task-abstract-line-matcher.js.map +1 -0
- package/lib/node/task-backend-application-contribution.d.ts +9 -0
- package/lib/node/task-backend-application-contribution.d.ts.map +1 -0
- package/lib/node/task-backend-application-contribution.js +41 -0
- package/lib/node/task-backend-application-contribution.js.map +1 -0
- package/lib/node/task-backend-module.d.ts +4 -0
- package/lib/node/task-backend-module.d.ts.map +1 -0
- package/lib/node/task-backend-module.js +53 -0
- package/lib/node/task-backend-module.js.map +1 -0
- package/lib/node/task-line-matchers.d.ts +28 -0
- package/lib/node/task-line-matchers.d.ts.map +1 -0
- package/lib/node/task-line-matchers.js +122 -0
- package/lib/node/task-line-matchers.js.map +1 -0
- package/lib/node/task-manager.d.ts +56 -0
- package/lib/node/task-manager.d.ts.map +1 -0
- package/lib/node/task-manager.js +125 -0
- package/lib/node/task-manager.js.map +1 -0
- package/lib/node/task-problem-collector.d.ts +11 -0
- package/lib/node/task-problem-collector.d.ts.map +1 -0
- package/lib/node/task-problem-collector.js +58 -0
- package/lib/node/task-problem-collector.js.map +1 -0
- package/lib/node/task-problem-collector.spec.d.ts +2 -0
- package/lib/node/task-problem-collector.spec.d.ts.map +1 -0
- package/lib/node/task-problem-collector.spec.js +311 -0
- package/lib/node/task-problem-collector.spec.js.map +1 -0
- package/lib/node/task-runner-protocol.d.ts +17 -0
- package/lib/node/task-runner-protocol.d.ts.map +1 -0
- package/lib/node/task-runner-protocol.js +20 -0
- package/lib/node/task-runner-protocol.js.map +1 -0
- package/lib/node/task-runner.d.ts +51 -0
- package/lib/node/task-runner.d.ts.map +1 -0
- package/lib/node/task-runner.js +90 -0
- package/lib/node/task-runner.js.map +1 -0
- package/lib/node/task-server.d.ts +40 -0
- package/lib/node/task-server.d.ts.map +1 -0
- package/lib/node/task-server.js +232 -0
- package/lib/node/task-server.js.map +1 -0
- package/lib/node/task-server.slow-spec.d.ts +2 -0
- package/lib/node/task-server.slow-spec.d.ts.map +1 -0
- package/lib/node/task-server.slow-spec.js +395 -0
- package/lib/node/task-server.slow-spec.js.map +1 -0
- package/lib/node/task.d.ts +51 -0
- package/lib/node/task.d.ts.map +1 -0
- package/lib/node/task.js +73 -0
- package/lib/node/task.js.map +1 -0
- package/lib/node/test/task-test-container.d.ts +3 -0
- package/lib/node/test/task-test-container.d.ts.map +1 -0
- package/lib/node/test/task-test-container.js +59 -0
- package/lib/node/test/task-test-container.js.map +1 -0
- package/package.json +12 -12
|
@@ -0,0 +1,676 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2019 Red Hat, Inc. and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
// This file is inspired by VSCode and partially copied from https://github.com/Microsoft/vscode/blob/1.33.1/src/vs/workbench/contrib/tasks/common/problemMatcher.ts
|
|
18
|
+
// 'problemMatcher.ts' copyright:
|
|
19
|
+
/*---------------------------------------------------------------------------------------------
|
|
20
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
21
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
22
|
+
*--------------------------------------------------------------------------------------------*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.TaskSchemaUpdater = void 0;
|
|
25
|
+
const tslib_1 = require("tslib");
|
|
26
|
+
const Ajv = require("@theia/core/shared/ajv");
|
|
27
|
+
const debounce = require("p-debounce");
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const json_schema_store_1 = require("@theia/core/lib/browser/json-schema-store");
|
|
30
|
+
const common_1 = require("@theia/core/lib/common");
|
|
31
|
+
const variable_input_schema_1 = require("@theia/variable-resolver/lib/browser/variable-input-schema");
|
|
32
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
33
|
+
const task_problem_matcher_registry_1 = require("./task-problem-matcher-registry");
|
|
34
|
+
const task_definition_registry_1 = require("./task-definition-registry");
|
|
35
|
+
const common_2 = require("../common");
|
|
36
|
+
const browser_1 = require("@theia/userstorage/lib/browser");
|
|
37
|
+
const browser_2 = require("@theia/workspace/lib/browser");
|
|
38
|
+
const task_preferences_1 = require("../common/task-preferences");
|
|
39
|
+
let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
40
|
+
constructor() {
|
|
41
|
+
this.onDidChangeTaskSchemaEmitter = new common_1.Emitter();
|
|
42
|
+
this.onDidChangeTaskSchema = this.onDidChangeTaskSchemaEmitter.event;
|
|
43
|
+
this.uri = new uri_1.default(task_preferences_1.taskSchemaId);
|
|
44
|
+
this.update = debounce(() => this.doUpdate(), 0);
|
|
45
|
+
}
|
|
46
|
+
init() {
|
|
47
|
+
this.jsonSchemaData.setSchema(this.uri, '');
|
|
48
|
+
this.updateProblemMatcherNames();
|
|
49
|
+
this.updateSupportedTaskTypes();
|
|
50
|
+
// update problem matcher names in the task schema every time a problem matcher is added or disposed
|
|
51
|
+
this.problemMatcherRegistry.onDidChangeProblemMatcher(() => this.updateProblemMatcherNames());
|
|
52
|
+
// update supported task types in the task schema every time a task definition is registered or removed
|
|
53
|
+
this.taskDefinitionRegistry.onDidRegisterTaskDefinition(() => this.updateSupportedTaskTypes());
|
|
54
|
+
this.taskDefinitionRegistry.onDidUnregisterTaskDefinition(() => this.updateSupportedTaskTypes());
|
|
55
|
+
}
|
|
56
|
+
registerSchemas(context) {
|
|
57
|
+
context.registerSchema({
|
|
58
|
+
fileMatch: ['tasks.json', browser_1.UserStorageUri.resolve('tasks.json').toString()],
|
|
59
|
+
url: this.uri.toString()
|
|
60
|
+
});
|
|
61
|
+
this.workspaceService.updateSchema('tasks', { $ref: this.uri.toString() });
|
|
62
|
+
}
|
|
63
|
+
doUpdate() {
|
|
64
|
+
taskConfigurationSchema.anyOf = [processTaskConfigurationSchema, ...customizedDetectedTasks, ...customSchemas];
|
|
65
|
+
const schema = this.getTaskSchema();
|
|
66
|
+
this.doValidate = new Ajv().compile(schema);
|
|
67
|
+
this.jsonSchemaData.setSchema(this.uri, schema);
|
|
68
|
+
this.onDidChangeTaskSchemaEmitter.fire(undefined);
|
|
69
|
+
}
|
|
70
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
71
|
+
validate(data) {
|
|
72
|
+
return !!this.doValidate && !!this.doValidate(data);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Adds given task schema to `taskConfigurationSchema` as `oneOf` subschema.
|
|
76
|
+
* Replaces existed subschema by given schema if the corresponding `$id` properties are equal.
|
|
77
|
+
*
|
|
78
|
+
* Note: please provide `$id` property for subschema to have ability remove/replace it.
|
|
79
|
+
* @param schema subschema for adding to `taskConfigurationSchema`
|
|
80
|
+
*/
|
|
81
|
+
addSubschema(schema) {
|
|
82
|
+
const schemaId = schema.$id;
|
|
83
|
+
if (schemaId) {
|
|
84
|
+
this.doRemoveSubschema(schemaId);
|
|
85
|
+
}
|
|
86
|
+
customSchemas.push(schema);
|
|
87
|
+
this.update();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Removes task subschema from `taskConfigurationSchema`.
|
|
91
|
+
*
|
|
92
|
+
* @param arg `$id` property of subschema
|
|
93
|
+
*/
|
|
94
|
+
removeSubschema(arg) {
|
|
95
|
+
const isRemoved = this.doRemoveSubschema(arg);
|
|
96
|
+
if (isRemoved) {
|
|
97
|
+
this.update();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Removes task subschema from `customSchemas`, use `update()` to apply the changes for `taskConfigurationSchema`.
|
|
102
|
+
*
|
|
103
|
+
* @param arg `$id` property of subschema
|
|
104
|
+
* @returns `true` if subschema was removed, `false` otherwise
|
|
105
|
+
*/
|
|
106
|
+
doRemoveSubschema(arg) {
|
|
107
|
+
const index = customSchemas.findIndex(existed => !!existed.$id && existed.$id === arg);
|
|
108
|
+
if (index > -1) {
|
|
109
|
+
customSchemas.splice(index, 1);
|
|
110
|
+
return true;
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
/** Returns an array of task types that are registered, including the default types */
|
|
115
|
+
async getRegisteredTaskTypes() {
|
|
116
|
+
const serverSupportedTypes = await this.taskServer.getRegisteredTaskTypes();
|
|
117
|
+
const browserSupportedTypes = this.taskDefinitionRegistry.getAll().map(def => def.taskType);
|
|
118
|
+
const allTypes = new Set([...serverSupportedTypes, ...browserSupportedTypes]);
|
|
119
|
+
return Array.from(allTypes.values()).sort();
|
|
120
|
+
}
|
|
121
|
+
updateSchemasForRegisteredTasks() {
|
|
122
|
+
customizedDetectedTasks.length = 0;
|
|
123
|
+
const definitions = this.taskDefinitionRegistry.getAll();
|
|
124
|
+
definitions.forEach(def => {
|
|
125
|
+
const customizedDetectedTask = {
|
|
126
|
+
type: 'object',
|
|
127
|
+
required: ['type'],
|
|
128
|
+
properties: {}
|
|
129
|
+
};
|
|
130
|
+
const taskType = {
|
|
131
|
+
...defaultTaskType,
|
|
132
|
+
enum: [def.taskType],
|
|
133
|
+
default: def.taskType,
|
|
134
|
+
description: common_1.nls.localizeByDefault('The task type to customize')
|
|
135
|
+
};
|
|
136
|
+
customizedDetectedTask.properties.type = taskType;
|
|
137
|
+
const required = def.properties.required || [];
|
|
138
|
+
def.properties.all.forEach(taskProp => {
|
|
139
|
+
if (required.find(requiredProp => requiredProp === taskProp)) { // property is mandatory
|
|
140
|
+
customizedDetectedTask.required.push(taskProp);
|
|
141
|
+
}
|
|
142
|
+
customizedDetectedTask.properties[taskProp] = { ...def.properties.schema.properties[taskProp] };
|
|
143
|
+
});
|
|
144
|
+
customizedDetectedTask.properties.label = taskLabel;
|
|
145
|
+
customizedDetectedTask.properties.problemMatcher = problemMatcher;
|
|
146
|
+
customizedDetectedTask.properties.presentation = presentation;
|
|
147
|
+
customizedDetectedTask.properties.options = commandOptionsSchema;
|
|
148
|
+
customizedDetectedTask.properties.group = group;
|
|
149
|
+
customizedDetectedTask.properties.detail = detail;
|
|
150
|
+
customizedDetectedTask.additionalProperties = true;
|
|
151
|
+
customizedDetectedTasks.push(customizedDetectedTask);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/** Returns the task's JSON schema */
|
|
155
|
+
getTaskSchema() {
|
|
156
|
+
return {
|
|
157
|
+
type: 'object',
|
|
158
|
+
default: { version: '2.0.0', tasks: [] },
|
|
159
|
+
properties: {
|
|
160
|
+
version: {
|
|
161
|
+
type: 'string',
|
|
162
|
+
default: '2.0.0',
|
|
163
|
+
description: common_1.nls.localizeByDefault("The config's version number.")
|
|
164
|
+
},
|
|
165
|
+
tasks: {
|
|
166
|
+
type: 'array',
|
|
167
|
+
items: {
|
|
168
|
+
...(0, common_1.deepClone)(taskConfigurationSchema)
|
|
169
|
+
},
|
|
170
|
+
description: common_1.nls.localizeByDefault('The task configurations. Usually these are enrichments of task already defined in the external task runner.')
|
|
171
|
+
},
|
|
172
|
+
inputs: variable_input_schema_1.inputsSchema.definitions.inputs
|
|
173
|
+
},
|
|
174
|
+
additionalProperties: false,
|
|
175
|
+
allowComments: true,
|
|
176
|
+
allowTrailingCommas: true,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/** Gets the most up-to-date names of problem matchers from the registry and update the task schema */
|
|
180
|
+
updateProblemMatcherNames() {
|
|
181
|
+
const matcherNames = this.problemMatcherRegistry.getAll().map(m => (0, common_2.asVariableName)(m.name));
|
|
182
|
+
problemMatcherNames.length = 0;
|
|
183
|
+
problemMatcherNames.push(...matcherNames);
|
|
184
|
+
this.update();
|
|
185
|
+
}
|
|
186
|
+
async updateSupportedTaskTypes() {
|
|
187
|
+
this.updateSchemasForRegisteredTasks();
|
|
188
|
+
this.update();
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
exports.TaskSchemaUpdater = TaskSchemaUpdater;
|
|
192
|
+
tslib_1.__decorate([
|
|
193
|
+
(0, inversify_1.inject)(json_schema_store_1.JsonSchemaDataStore),
|
|
194
|
+
tslib_1.__metadata("design:type", json_schema_store_1.JsonSchemaDataStore)
|
|
195
|
+
], TaskSchemaUpdater.prototype, "jsonSchemaData", void 0);
|
|
196
|
+
tslib_1.__decorate([
|
|
197
|
+
(0, inversify_1.inject)(task_problem_matcher_registry_1.ProblemMatcherRegistry),
|
|
198
|
+
tslib_1.__metadata("design:type", task_problem_matcher_registry_1.ProblemMatcherRegistry)
|
|
199
|
+
], TaskSchemaUpdater.prototype, "problemMatcherRegistry", void 0);
|
|
200
|
+
tslib_1.__decorate([
|
|
201
|
+
(0, inversify_1.inject)(task_definition_registry_1.TaskDefinitionRegistry),
|
|
202
|
+
tslib_1.__metadata("design:type", task_definition_registry_1.TaskDefinitionRegistry)
|
|
203
|
+
], TaskSchemaUpdater.prototype, "taskDefinitionRegistry", void 0);
|
|
204
|
+
tslib_1.__decorate([
|
|
205
|
+
(0, inversify_1.inject)(common_2.TaskServer),
|
|
206
|
+
tslib_1.__metadata("design:type", Object)
|
|
207
|
+
], TaskSchemaUpdater.prototype, "taskServer", void 0);
|
|
208
|
+
tslib_1.__decorate([
|
|
209
|
+
(0, inversify_1.inject)(browser_2.WorkspaceService),
|
|
210
|
+
tslib_1.__metadata("design:type", browser_2.WorkspaceService)
|
|
211
|
+
], TaskSchemaUpdater.prototype, "workspaceService", void 0);
|
|
212
|
+
tslib_1.__decorate([
|
|
213
|
+
(0, inversify_1.postConstruct)(),
|
|
214
|
+
tslib_1.__metadata("design:type", Function),
|
|
215
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
216
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
217
|
+
], TaskSchemaUpdater.prototype, "init", null);
|
|
218
|
+
exports.TaskSchemaUpdater = TaskSchemaUpdater = tslib_1.__decorate([
|
|
219
|
+
(0, inversify_1.injectable)()
|
|
220
|
+
], TaskSchemaUpdater);
|
|
221
|
+
const commandSchema = {
|
|
222
|
+
type: 'string',
|
|
223
|
+
description: common_1.nls.localizeByDefault('The command to be executed. Can be an external program or a shell command.')
|
|
224
|
+
};
|
|
225
|
+
const commandArgSchema = {
|
|
226
|
+
type: 'array',
|
|
227
|
+
description: common_1.nls.localizeByDefault('Arguments passed to the command when this task is invoked.'),
|
|
228
|
+
items: {
|
|
229
|
+
type: 'string'
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
const commandOptionsSchema = {
|
|
233
|
+
type: 'object',
|
|
234
|
+
description: common_1.nls.localizeByDefault('Additional command options'),
|
|
235
|
+
properties: {
|
|
236
|
+
cwd: {
|
|
237
|
+
type: 'string',
|
|
238
|
+
description: common_1.nls.localize('theia/task/schema/commandOptions/cwd', "The current working directory of the executed program or script. If omitted Theia's current workspace root is used."),
|
|
239
|
+
default: '${workspaceFolder}'
|
|
240
|
+
},
|
|
241
|
+
env: {
|
|
242
|
+
type: 'object',
|
|
243
|
+
description: common_1.nls.localizeByDefault("The environment of the executed program or shell. If omitted the parent process' environment is used.")
|
|
244
|
+
},
|
|
245
|
+
shell: {
|
|
246
|
+
type: 'object',
|
|
247
|
+
description: common_1.nls.localizeByDefault('Configures the shell to be used.'),
|
|
248
|
+
properties: {
|
|
249
|
+
executable: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
description: common_1.nls.localizeByDefault('The shell to be used.')
|
|
252
|
+
},
|
|
253
|
+
args: {
|
|
254
|
+
type: 'array',
|
|
255
|
+
description: common_1.nls.localizeByDefault('The shell arguments.'),
|
|
256
|
+
items: {
|
|
257
|
+
type: 'string'
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
const problemMatcherNames = [];
|
|
265
|
+
const defaultTaskTypes = ['shell', 'process'];
|
|
266
|
+
const supportedTaskTypes = [...defaultTaskTypes];
|
|
267
|
+
const taskLabel = {
|
|
268
|
+
type: 'string',
|
|
269
|
+
description: common_1.nls.localizeByDefault("The task's user interface label")
|
|
270
|
+
};
|
|
271
|
+
const defaultTaskType = {
|
|
272
|
+
type: 'string',
|
|
273
|
+
enum: supportedTaskTypes,
|
|
274
|
+
default: defaultTaskTypes[0],
|
|
275
|
+
description: common_1.nls.localizeByDefault('Defines whether the task is run as a process or as a command inside a shell.')
|
|
276
|
+
};
|
|
277
|
+
const commandAndArgs = {
|
|
278
|
+
command: commandSchema,
|
|
279
|
+
args: commandArgSchema,
|
|
280
|
+
options: commandOptionsSchema
|
|
281
|
+
};
|
|
282
|
+
const group = {
|
|
283
|
+
oneOf: [
|
|
284
|
+
{
|
|
285
|
+
type: 'string',
|
|
286
|
+
enum: ['build', 'test', 'none'],
|
|
287
|
+
enumDescriptions: [
|
|
288
|
+
common_1.nls.localizeByDefault("Marks the task as a build task accessible through the 'Run Build Task' command."),
|
|
289
|
+
common_1.nls.localizeByDefault("Marks the task as a test task accessible through the 'Run Test Task' command."),
|
|
290
|
+
common_1.nls.localizeByDefault('Assigns the task to no group')
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
type: 'object',
|
|
295
|
+
properties: {
|
|
296
|
+
kind: {
|
|
297
|
+
type: 'string',
|
|
298
|
+
default: 'none',
|
|
299
|
+
description: common_1.nls.localizeByDefault("The task's execution group."),
|
|
300
|
+
enum: ['build', 'test', 'none'],
|
|
301
|
+
enumDescriptions: [
|
|
302
|
+
common_1.nls.localizeByDefault("Marks the task as a build task accessible through the 'Run Build Task' command."),
|
|
303
|
+
common_1.nls.localizeByDefault("Marks the task as a test task accessible through the 'Run Test Task' command."),
|
|
304
|
+
common_1.nls.localizeByDefault('Assigns the task to no group')
|
|
305
|
+
]
|
|
306
|
+
},
|
|
307
|
+
isDefault: {
|
|
308
|
+
type: 'boolean',
|
|
309
|
+
default: false,
|
|
310
|
+
description: common_1.nls.localizeByDefault('Defines if this task is the default task in the group, or a glob to match the file which should trigger this task.')
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
],
|
|
315
|
+
description: common_1.nls.localizeByDefault('Defines to which execution group this task belongs to. It supports "build" to add it to the build group and "test" to add it to the test group.')
|
|
316
|
+
};
|
|
317
|
+
const problemPattern = {
|
|
318
|
+
default: {
|
|
319
|
+
regexp: '^([^\\\\s].*)\\\\((\\\\d+,\\\\d+)\\\\):\\\\s*(.*)$',
|
|
320
|
+
file: 1,
|
|
321
|
+
location: 2,
|
|
322
|
+
message: 3
|
|
323
|
+
},
|
|
324
|
+
type: 'object',
|
|
325
|
+
properties: {
|
|
326
|
+
regexp: {
|
|
327
|
+
type: 'string',
|
|
328
|
+
description: common_1.nls.localizeByDefault('The regular expression to find an error, warning or info in the output.')
|
|
329
|
+
},
|
|
330
|
+
kind: {
|
|
331
|
+
type: 'string',
|
|
332
|
+
description: common_1.nls.localizeByDefault('whether the pattern matches a location (file and line) or only a file.')
|
|
333
|
+
},
|
|
334
|
+
file: {
|
|
335
|
+
type: 'integer',
|
|
336
|
+
description: common_1.nls.localizeByDefault('The match group index of the filename. If omitted 1 is used.')
|
|
337
|
+
},
|
|
338
|
+
location: {
|
|
339
|
+
type: 'integer',
|
|
340
|
+
// eslint-disable-next-line max-len
|
|
341
|
+
description: common_1.nls.localizeByDefault("The match group index of the problem's location. Valid location patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). If omitted (line,column) is assumed.")
|
|
342
|
+
},
|
|
343
|
+
line: {
|
|
344
|
+
type: 'integer',
|
|
345
|
+
description: common_1.nls.localizeByDefault("The match group index of the problem's line. Defaults to 2")
|
|
346
|
+
},
|
|
347
|
+
column: {
|
|
348
|
+
type: 'integer',
|
|
349
|
+
description: common_1.nls.localizeByDefault("The match group index of the problem's line character. Defaults to 3")
|
|
350
|
+
},
|
|
351
|
+
endLine: {
|
|
352
|
+
type: 'integer',
|
|
353
|
+
description: common_1.nls.localizeByDefault("The match group index of the problem's end line. Defaults to undefined")
|
|
354
|
+
},
|
|
355
|
+
endColumn: {
|
|
356
|
+
type: 'integer',
|
|
357
|
+
description: common_1.nls.localizeByDefault("The match group index of the problem's end line character. Defaults to undefined")
|
|
358
|
+
},
|
|
359
|
+
severity: {
|
|
360
|
+
type: 'integer',
|
|
361
|
+
description: common_1.nls.localizeByDefault("The match group index of the problem's severity. Defaults to undefined")
|
|
362
|
+
},
|
|
363
|
+
code: {
|
|
364
|
+
type: 'integer',
|
|
365
|
+
description: common_1.nls.localizeByDefault("The match group index of the problem's code. Defaults to undefined")
|
|
366
|
+
},
|
|
367
|
+
message: {
|
|
368
|
+
type: 'integer',
|
|
369
|
+
description: common_1.nls.localizeByDefault('The match group index of the message. If omitted it defaults to 4 if location is specified. Otherwise it defaults to 5.')
|
|
370
|
+
},
|
|
371
|
+
loop: {
|
|
372
|
+
type: 'boolean',
|
|
373
|
+
// eslint-disable-next-line max-len
|
|
374
|
+
description: common_1.nls.localizeByDefault('In a multi line matcher loop indicated whether this pattern is executed in a loop as long as it matches. Can only specified on a last pattern in a multi line pattern.')
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
const multiLineProblemPattern = {
|
|
379
|
+
type: 'array',
|
|
380
|
+
items: problemPattern
|
|
381
|
+
};
|
|
382
|
+
const watchingPattern = {
|
|
383
|
+
type: 'object',
|
|
384
|
+
additionalProperties: false,
|
|
385
|
+
properties: {
|
|
386
|
+
regexp: {
|
|
387
|
+
type: 'string',
|
|
388
|
+
description: common_1.nls.localizeByDefault('The regular expression to detect the begin or end of a background task.')
|
|
389
|
+
},
|
|
390
|
+
file: {
|
|
391
|
+
type: 'integer',
|
|
392
|
+
description: common_1.nls.localizeByDefault('The match group index of the filename. Can be omitted.')
|
|
393
|
+
},
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
const patternType = {
|
|
397
|
+
anyOf: [
|
|
398
|
+
{
|
|
399
|
+
type: 'string',
|
|
400
|
+
description: common_1.nls.localizeByDefault('The name of a contributed or predefined pattern')
|
|
401
|
+
},
|
|
402
|
+
problemPattern,
|
|
403
|
+
multiLineProblemPattern
|
|
404
|
+
],
|
|
405
|
+
description: common_1.nls.localizeByDefault('A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.')
|
|
406
|
+
};
|
|
407
|
+
const problemMatcherObject = {
|
|
408
|
+
type: 'object',
|
|
409
|
+
properties: {
|
|
410
|
+
base: {
|
|
411
|
+
type: 'string',
|
|
412
|
+
enum: problemMatcherNames,
|
|
413
|
+
description: common_1.nls.localizeByDefault('The name of a base problem matcher to use.')
|
|
414
|
+
},
|
|
415
|
+
owner: {
|
|
416
|
+
type: 'string',
|
|
417
|
+
description: common_1.nls.localize('theia/task/schema/problemMatcherObject/owner', "The owner of the problem inside Theia. Can be omitted if base is specified. Defaults to 'external' if omitted and base is not specified.")
|
|
418
|
+
},
|
|
419
|
+
source: {
|
|
420
|
+
type: 'string',
|
|
421
|
+
description: common_1.nls.localizeByDefault("A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.")
|
|
422
|
+
},
|
|
423
|
+
severity: {
|
|
424
|
+
type: 'string',
|
|
425
|
+
enum: ['error', 'warning', 'info'],
|
|
426
|
+
description: common_1.nls.localizeByDefault("The default severity for captures problems. Is used if the pattern doesn't define a match group for severity.")
|
|
427
|
+
},
|
|
428
|
+
applyTo: {
|
|
429
|
+
type: 'string',
|
|
430
|
+
enum: ['allDocuments', 'openDocuments', 'closedDocuments'],
|
|
431
|
+
description: common_1.nls.localizeByDefault('Controls if a problem reported on a text document is applied only to open, closed or all documents.')
|
|
432
|
+
},
|
|
433
|
+
pattern: patternType,
|
|
434
|
+
fileLocation: {
|
|
435
|
+
oneOf: [
|
|
436
|
+
{
|
|
437
|
+
type: 'string',
|
|
438
|
+
enum: ['absolute', 'relative', 'autoDetect']
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
type: 'array',
|
|
442
|
+
items: {
|
|
443
|
+
type: 'string'
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
],
|
|
447
|
+
// eslint-disable-next-line max-len
|
|
448
|
+
description: common_1.nls.localizeByDefault('Defines how file names reported in a problem pattern should be interpreted. A relative fileLocation may be an array, where the second element of the array is the path of the relative file location. The search fileLocation mode, performs a deep (and, possibly, heavy) file system search within the directories specified by the include/exclude properties of the second element (or the current workspace directory if not specified).')
|
|
449
|
+
},
|
|
450
|
+
background: {
|
|
451
|
+
type: 'object',
|
|
452
|
+
additionalProperties: false,
|
|
453
|
+
description: common_1.nls.localizeByDefault('Patterns to track the begin and end of a matcher active on a background task.'),
|
|
454
|
+
properties: {
|
|
455
|
+
activeOnStart: {
|
|
456
|
+
type: 'boolean',
|
|
457
|
+
description: common_1.nls.localizeByDefault('If set to true the background monitor starts in active mode. This is the same as outputting a line that matches beginsPattern when the task starts.')
|
|
458
|
+
},
|
|
459
|
+
beginsPattern: {
|
|
460
|
+
oneOf: [
|
|
461
|
+
{
|
|
462
|
+
type: 'string'
|
|
463
|
+
},
|
|
464
|
+
watchingPattern
|
|
465
|
+
],
|
|
466
|
+
description: common_1.nls.localizeByDefault('If matched in the output the start of a background task is signaled.')
|
|
467
|
+
},
|
|
468
|
+
endsPattern: {
|
|
469
|
+
oneOf: [
|
|
470
|
+
{
|
|
471
|
+
type: 'string'
|
|
472
|
+
},
|
|
473
|
+
watchingPattern
|
|
474
|
+
],
|
|
475
|
+
description: common_1.nls.localizeByDefault('If matched in the output the end of a background task is signaled.')
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
watching: {
|
|
480
|
+
type: 'object',
|
|
481
|
+
additionalProperties: false,
|
|
482
|
+
deprecationMessage: common_1.nls.localizeByDefault('The watching property is deprecated. Use background instead.'),
|
|
483
|
+
description: common_1.nls.localizeByDefault('Patterns to track the begin and end of a watching matcher.'),
|
|
484
|
+
properties: {
|
|
485
|
+
activeOnStart: {
|
|
486
|
+
type: 'boolean',
|
|
487
|
+
description: common_1.nls.localizeByDefault('If set to true the watcher starts in active mode. This is the same as outputting a line that matches beginsPattern when the task starts.')
|
|
488
|
+
},
|
|
489
|
+
beginsPattern: {
|
|
490
|
+
oneOf: [
|
|
491
|
+
{
|
|
492
|
+
type: 'string'
|
|
493
|
+
},
|
|
494
|
+
watchingPattern
|
|
495
|
+
],
|
|
496
|
+
description: common_1.nls.localizeByDefault('If matched in the output the start of a watching task is signaled.')
|
|
497
|
+
},
|
|
498
|
+
endsPattern: {
|
|
499
|
+
oneOf: [
|
|
500
|
+
{
|
|
501
|
+
type: 'string'
|
|
502
|
+
},
|
|
503
|
+
watchingPattern
|
|
504
|
+
],
|
|
505
|
+
description: common_1.nls.localizeByDefault('If matched in the output the end of a watching task is signaled.')
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
const problemMatcher = {
|
|
512
|
+
anyOf: [
|
|
513
|
+
{
|
|
514
|
+
type: 'string',
|
|
515
|
+
enum: problemMatcherNames
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
type: 'array',
|
|
519
|
+
items: {
|
|
520
|
+
type: 'string',
|
|
521
|
+
enum: problemMatcherNames
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
problemMatcherObject,
|
|
525
|
+
{
|
|
526
|
+
type: 'array',
|
|
527
|
+
items: problemMatcherObject
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
description: common_1.nls.localizeByDefault('The problem matcher(s) to use. Can either be a string or a problem matcher definition or an array of strings and problem matchers.')
|
|
531
|
+
};
|
|
532
|
+
const presentation = {
|
|
533
|
+
type: 'object',
|
|
534
|
+
default: {
|
|
535
|
+
echo: true,
|
|
536
|
+
reveal: 'always',
|
|
537
|
+
focus: false,
|
|
538
|
+
panel: 'shared',
|
|
539
|
+
showReuseMessage: true,
|
|
540
|
+
clear: false
|
|
541
|
+
},
|
|
542
|
+
description: common_1.nls.localizeByDefault("Configures the panel that is used to present the task's output and reads its input."),
|
|
543
|
+
additionalProperties: true,
|
|
544
|
+
properties: {
|
|
545
|
+
echo: {
|
|
546
|
+
type: 'boolean',
|
|
547
|
+
default: true,
|
|
548
|
+
description: common_1.nls.localizeByDefault('Controls whether the executed command is echoed to the panel. Default is true.')
|
|
549
|
+
},
|
|
550
|
+
focus: {
|
|
551
|
+
type: 'boolean',
|
|
552
|
+
default: false,
|
|
553
|
+
description: common_1.nls.localizeByDefault('Controls whether the panel takes focus. Default is false. If set to true the panel is revealed as well.')
|
|
554
|
+
},
|
|
555
|
+
reveal: {
|
|
556
|
+
type: 'string',
|
|
557
|
+
enum: ['always', 'silent', 'never'],
|
|
558
|
+
enumDescriptions: [
|
|
559
|
+
common_1.nls.localizeByDefault('Always reveals the terminal when this task is executed.'),
|
|
560
|
+
common_1.nls.localizeByDefault('Only reveals the terminal if the task exits with an error or the problem matcher finds an error.'),
|
|
561
|
+
common_1.nls.localizeByDefault('Never reveals the terminal when this task is executed.')
|
|
562
|
+
],
|
|
563
|
+
default: 'always',
|
|
564
|
+
description: common_1.nls.localizeByDefault('Controls whether the terminal running the task is revealed or not. May be overridden by option "revealProblems". Default is "always".')
|
|
565
|
+
},
|
|
566
|
+
panel: {
|
|
567
|
+
type: 'string',
|
|
568
|
+
enum: ['shared', 'dedicated', 'new'],
|
|
569
|
+
enumDescriptions: [
|
|
570
|
+
common_1.nls.localize('theia/task/schema/presentation/panel/shared', 'The terminal is shared and the output of other task runs are added to the same terminal.'),
|
|
571
|
+
// eslint-disable-next-line max-len
|
|
572
|
+
common_1.nls.localize('theia/task/schema/presentation/panel/dedicated', 'The terminal is dedicated to a specific task. If that task is executed again, the terminal is reused. However, the output of a different task is presented in a different terminal.'),
|
|
573
|
+
common_1.nls.localize('theia/task/schema/presentation/panel/new', 'Every execution of that task is using a new clean terminal.')
|
|
574
|
+
],
|
|
575
|
+
default: 'shared',
|
|
576
|
+
description: common_1.nls.localizeByDefault('Controls if the panel is shared between tasks, dedicated to this task or a new one is created on every run.')
|
|
577
|
+
},
|
|
578
|
+
showReuseMessage: {
|
|
579
|
+
type: 'boolean',
|
|
580
|
+
default: true,
|
|
581
|
+
description: common_1.nls.localize('theia/task/schema/presentation/showReuseMessage', 'Controls whether to show the "Terminal will be reused by tasks" message.')
|
|
582
|
+
},
|
|
583
|
+
clear: {
|
|
584
|
+
type: 'boolean',
|
|
585
|
+
default: false,
|
|
586
|
+
description: common_1.nls.localizeByDefault('Controls whether the terminal is cleared before executing the task.')
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
};
|
|
590
|
+
const detail = {
|
|
591
|
+
type: 'string',
|
|
592
|
+
description: common_1.nls.localizeByDefault('An optional description of a task that shows in the Run Task quick pick as a detail.')
|
|
593
|
+
};
|
|
594
|
+
const taskIdentifier = {
|
|
595
|
+
type: 'object',
|
|
596
|
+
additionalProperties: true,
|
|
597
|
+
properties: {
|
|
598
|
+
type: {
|
|
599
|
+
type: 'string',
|
|
600
|
+
description: common_1.nls.localizeByDefault('The task identifier.')
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
};
|
|
604
|
+
const processTaskConfigurationSchema = {
|
|
605
|
+
type: 'object',
|
|
606
|
+
required: ['type', 'label', 'command'],
|
|
607
|
+
properties: {
|
|
608
|
+
label: taskLabel,
|
|
609
|
+
type: defaultTaskType,
|
|
610
|
+
...commandAndArgs,
|
|
611
|
+
isBackground: {
|
|
612
|
+
type: 'boolean',
|
|
613
|
+
default: false,
|
|
614
|
+
description: common_1.nls.localizeByDefault('Whether the executed task is kept alive and is running in the background.')
|
|
615
|
+
},
|
|
616
|
+
dependsOn: {
|
|
617
|
+
anyOf: [
|
|
618
|
+
{
|
|
619
|
+
type: 'string',
|
|
620
|
+
description: common_1.nls.localizeByDefault('Another task this task depends on.')
|
|
621
|
+
},
|
|
622
|
+
taskIdentifier,
|
|
623
|
+
{
|
|
624
|
+
type: 'array',
|
|
625
|
+
description: common_1.nls.localizeByDefault('The other tasks this task depends on.'),
|
|
626
|
+
items: {
|
|
627
|
+
anyOf: [
|
|
628
|
+
{
|
|
629
|
+
type: 'string'
|
|
630
|
+
},
|
|
631
|
+
taskIdentifier
|
|
632
|
+
]
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
],
|
|
636
|
+
description: common_1.nls.localizeByDefault('Either a string representing another task or an array of other tasks that this task depends on.')
|
|
637
|
+
},
|
|
638
|
+
dependsOrder: {
|
|
639
|
+
type: 'string',
|
|
640
|
+
enum: ['parallel', 'sequence'],
|
|
641
|
+
enumDescriptions: [
|
|
642
|
+
common_1.nls.localizeByDefault('Run all dependsOn tasks in parallel.'),
|
|
643
|
+
common_1.nls.localizeByDefault('Run all dependsOn tasks in sequence.')
|
|
644
|
+
],
|
|
645
|
+
default: 'parallel',
|
|
646
|
+
description: common_1.nls.localizeByDefault('Determines the order of the dependsOn tasks for this task. Note that this property is not recursive.')
|
|
647
|
+
},
|
|
648
|
+
windows: {
|
|
649
|
+
type: 'object',
|
|
650
|
+
description: common_1.nls.localizeByDefault('Windows specific command configuration'),
|
|
651
|
+
properties: commandAndArgs
|
|
652
|
+
},
|
|
653
|
+
osx: {
|
|
654
|
+
type: 'object',
|
|
655
|
+
description: common_1.nls.localizeByDefault('Mac specific command configuration'),
|
|
656
|
+
properties: commandAndArgs
|
|
657
|
+
},
|
|
658
|
+
linux: {
|
|
659
|
+
type: 'object',
|
|
660
|
+
description: common_1.nls.localizeByDefault('Linux specific command configuration'),
|
|
661
|
+
properties: commandAndArgs
|
|
662
|
+
},
|
|
663
|
+
group,
|
|
664
|
+
problemMatcher,
|
|
665
|
+
presentation,
|
|
666
|
+
detail,
|
|
667
|
+
},
|
|
668
|
+
additionalProperties: true
|
|
669
|
+
};
|
|
670
|
+
const customizedDetectedTasks = [];
|
|
671
|
+
const customSchemas = [];
|
|
672
|
+
const taskConfigurationSchema = {
|
|
673
|
+
$id: task_preferences_1.taskSchemaId,
|
|
674
|
+
anyOf: [processTaskConfigurationSchema, ...customizedDetectedTasks, ...customSchemas]
|
|
675
|
+
};
|
|
676
|
+
//# sourceMappingURL=task-schema-updater.js.map
|