@theia/task 1.77.0-next.95 → 1.77.0
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 +6 -6
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +6 -9
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/process/process-task-contribution.d.ts +2 -2
- package/lib/browser/process/process-task-contribution.d.ts.map +1 -1
- package/lib/browser/process/process-task-contribution.js +8 -12
- package/lib/browser/process/process-task-contribution.js.map +1 -1
- package/lib/browser/process/process-task-frontend-module.js +7 -10
- package/lib/browser/process/process-task-frontend-module.js.map +1 -1
- package/lib/browser/process/process-task-resolver.d.ts +4 -4
- package/lib/browser/process/process-task-resolver.d.ts.map +1 -1
- package/lib/browser/process/process-task-resolver.js +18 -24
- package/lib/browser/process/process-task-resolver.js.map +1 -1
- package/lib/browser/process/process-task-resolver.spec.js +49 -52
- package/lib/browser/process/process-task-resolver.spec.js.map +1 -1
- package/lib/browser/provided-task-configurations.d.ts +3 -3
- package/lib/browser/provided-task-configurations.d.ts.map +1 -1
- package/lib/browser/provided-task-configurations.js +18 -23
- package/lib/browser/provided-task-configurations.js.map +1 -1
- package/lib/browser/provided-task-configurations.spec.js +14 -16
- package/lib/browser/provided-task-configurations.spec.js.map +1 -1
- package/lib/browser/quick-open-task.d.ts +7 -7
- package/lib/browser/quick-open-task.d.ts.map +1 -1
- package/lib/browser/quick-open-task.js +160 -199
- package/lib/browser/quick-open-task.js.map +1 -1
- package/lib/browser/task-configuration-manager.d.ts +4 -4
- package/lib/browser/task-configuration-manager.d.ts.map +1 -1
- package/lib/browser/task-configuration-manager.js +62 -78
- package/lib/browser/task-configuration-manager.js.map +1 -1
- package/lib/browser/task-configuration-model.d.ts +1 -1
- package/lib/browser/task-configuration-model.d.ts.map +1 -1
- package/lib/browser/task-configuration-model.js +9 -13
- package/lib/browser/task-configuration-model.js.map +1 -1
- package/lib/browser/task-configurations.d.ts +6 -6
- package/lib/browser/task-configurations.d.ts.map +1 -1
- package/lib/browser/task-configurations.js +41 -55
- package/lib/browser/task-configurations.js.map +1 -1
- package/lib/browser/task-context-key-service.js +13 -21
- package/lib/browser/task-context-key-service.js.map +1 -1
- package/lib/browser/task-contribution.d.ts +1 -1
- package/lib/browser/task-contribution.d.ts.map +1 -1
- package/lib/browser/task-contribution.js +20 -27
- package/lib/browser/task-contribution.js.map +1 -1
- package/lib/browser/task-definition-registry.d.ts +1 -1
- package/lib/browser/task-definition-registry.d.ts.map +1 -1
- package/lib/browser/task-definition-registry.js +12 -15
- package/lib/browser/task-definition-registry.js.map +1 -1
- package/lib/browser/task-definition-registry.spec.js +20 -22
- package/lib/browser/task-definition-registry.spec.js.map +1 -1
- package/lib/browser/task-frontend-contribution.d.ts +5 -5
- package/lib/browser/task-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/task-frontend-contribution.js +83 -106
- package/lib/browser/task-frontend-contribution.js.map +1 -1
- package/lib/browser/task-frontend-module.d.ts +1 -1
- package/lib/browser/task-frontend-module.d.ts.map +1 -1
- package/lib/browser/task-frontend-module.js +64 -66
- package/lib/browser/task-frontend-module.js.map +1 -1
- package/lib/browser/task-name-resolver.d.ts +3 -3
- package/lib/browser/task-name-resolver.d.ts.map +1 -1
- package/lib/browser/task-name-resolver.js +11 -16
- package/lib/browser/task-name-resolver.js.map +1 -1
- package/lib/browser/task-node.d.ts +1 -1
- package/lib/browser/task-node.d.ts.map +1 -1
- package/lib/browser/task-node.js +1 -5
- package/lib/browser/task-node.js.map +1 -1
- package/lib/browser/task-problem-matcher-registry.d.ts +2 -2
- package/lib/browser/task-problem-matcher-registry.d.ts.map +1 -1
- package/lib/browser/task-problem-matcher-registry.js +64 -72
- package/lib/browser/task-problem-matcher-registry.js.map +1 -1
- package/lib/browser/task-problem-pattern-registry.d.ts +1 -1
- package/lib/browser/task-problem-pattern-registry.d.ts.map +1 -1
- package/lib/browser/task-problem-pattern-registry.js +30 -37
- package/lib/browser/task-problem-pattern-registry.js.map +1 -1
- package/lib/browser/task-schema-updater.d.ts +3 -3
- package/lib/browser/task-schema-updater.d.ts.map +1 -1
- package/lib/browser/task-schema-updater.js +116 -127
- package/lib/browser/task-schema-updater.js.map +1 -1
- package/lib/browser/task-service.d.ts +19 -15
- package/lib/browser/task-service.d.ts.map +1 -1
- package/lib/browser/task-service.js +170 -203
- package/lib/browser/task-service.js.map +1 -1
- package/lib/browser/task-service.spec.js +21 -24
- package/lib/browser/task-service.spec.js.map +1 -1
- package/lib/browser/task-source-resolver.d.ts +2 -2
- package/lib/browser/task-source-resolver.d.ts.map +1 -1
- package/lib/browser/task-source-resolver.js +10 -14
- package/lib/browser/task-source-resolver.js.map +1 -1
- package/lib/browser/task-templates.js +10 -13
- package/lib/browser/task-templates.js.map +1 -1
- package/lib/browser/task-terminal-widget-manager.d.ts +2 -2
- package/lib/browser/task-terminal-widget-manager.d.ts.map +1 -1
- package/lib/browser/task-terminal-widget-manager.js +39 -50
- package/lib/browser/task-terminal-widget-manager.js.map +1 -1
- package/lib/browser/tasks-monaco-contribution.js +1 -4
- package/lib/browser/tasks-monaco-contribution.js.map +1 -1
- package/lib/common/index.d.ts +4 -4
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +4 -7
- package/lib/common/index.js.map +1 -1
- package/lib/common/problem-matcher-protocol.js +17 -20
- package/lib/common/problem-matcher-protocol.js.map +1 -1
- package/lib/common/process/task-protocol.d.ts +1 -1
- package/lib/common/process/task-protocol.d.ts.map +1 -1
- package/lib/common/process/task-protocol.js +6 -9
- package/lib/common/process/task-protocol.js.map +1 -1
- package/lib/common/task-common-module.js +3 -6
- package/lib/common/task-common-module.js.map +1 -1
- package/lib/common/task-preferences.js +10 -14
- package/lib/common/task-preferences.js.map +1 -1
- package/lib/common/task-protocol.d.ts +1 -1
- package/lib/common/task-protocol.d.ts.map +1 -1
- package/lib/common/task-protocol.js +15 -18
- package/lib/common/task-protocol.js.map +1 -1
- package/lib/common/task-util.js +2 -6
- package/lib/common/task-util.js.map +1 -1
- package/lib/common/task-watcher.d.ts +1 -1
- package/lib/common/task-watcher.d.ts.map +1 -1
- package/lib/common/task-watcher.js +12 -15
- package/lib/common/task-watcher.js.map +1 -1
- package/lib/node/custom/custom-task-runner-backend-module.js +14 -17
- package/lib/node/custom/custom-task-runner-backend-module.js.map +1 -1
- package/lib/node/custom/custom-task-runner-contribution.d.ts +2 -2
- package/lib/node/custom/custom-task-runner-contribution.d.ts.map +1 -1
- package/lib/node/custom/custom-task-runner-contribution.js +8 -12
- package/lib/node/custom/custom-task-runner-contribution.js.map +1 -1
- package/lib/node/custom/custom-task-runner.d.ts +4 -4
- package/lib/node/custom/custom-task-runner.d.ts.map +1 -1
- package/lib/node/custom/custom-task-runner.js +15 -21
- package/lib/node/custom/custom-task-runner.js.map +1 -1
- package/lib/node/custom/custom-task.d.ts +4 -4
- package/lib/node/custom/custom-task.d.ts.map +1 -1
- package/lib/node/custom/custom-task.js +15 -19
- package/lib/node/custom/custom-task.js.map +1 -1
- package/lib/node/index.d.ts +3 -3
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +3 -6
- package/lib/node/index.js.map +1 -1
- package/lib/node/process/process-task-runner-backend-module.js +14 -17
- package/lib/node/process/process-task-runner-backend-module.js.map +1 -1
- package/lib/node/process/process-task-runner-contribution.d.ts +2 -2
- package/lib/node/process/process-task-runner-contribution.d.ts.map +1 -1
- package/lib/node/process/process-task-runner-contribution.js +8 -12
- package/lib/node/process/process-task-runner-contribution.js.map +1 -1
- package/lib/node/process/process-task-runner.d.ts +5 -5
- package/lib/node/process/process-task-runner.d.ts.map +1 -1
- package/lib/node/process/process-task-runner.js +37 -44
- package/lib/node/process/process-task-runner.js.map +1 -1
- package/lib/node/process/process-task.d.ts +5 -5
- package/lib/node/process/process-task.d.ts.map +1 -1
- package/lib/node/process/process-task.js +16 -21
- package/lib/node/process/process-task.js.map +1 -1
- package/lib/node/process/process-task.spec.js +6 -8
- package/lib/node/process/process-task.spec.js.map +1 -1
- package/lib/node/task-abstract-line-matcher.d.ts +1 -1
- package/lib/node/task-abstract-line-matcher.d.ts.map +1 -1
- package/lib/node/task-abstract-line-matcher.js +28 -33
- package/lib/node/task-abstract-line-matcher.js.map +1 -1
- package/lib/node/task-backend-application-contribution.d.ts +1 -1
- package/lib/node/task-backend-application-contribution.d.ts.map +1 -1
- package/lib/node/task-backend-application-contribution.js +12 -17
- package/lib/node/task-backend-application-contribution.js.map +1 -1
- package/lib/node/task-backend-module.js +27 -29
- package/lib/node/task-backend-module.js.map +1 -1
- package/lib/node/task-line-matchers.d.ts +2 -2
- package/lib/node/task-line-matchers.d.ts.map +1 -1
- package/lib/node/task-line-matchers.js +3 -8
- package/lib/node/task-line-matchers.js.map +1 -1
- package/lib/node/task-manager.d.ts +2 -2
- package/lib/node/task-manager.d.ts.map +1 -1
- package/lib/node/task-manager.js +9 -13
- package/lib/node/task-manager.js.map +1 -1
- package/lib/node/task-problem-collector.d.ts +1 -1
- package/lib/node/task-problem-collector.d.ts.map +1 -1
- package/lib/node/task-problem-collector.js +9 -13
- package/lib/node/task-problem-collector.js.map +1 -1
- package/lib/node/task-problem-collector.spec.js +63 -65
- package/lib/node/task-problem-collector.spec.js.map +1 -1
- package/lib/node/task-runner-protocol.d.ts +2 -2
- package/lib/node/task-runner-protocol.d.ts.map +1 -1
- package/lib/node/task-runner-protocol.js +1 -4
- package/lib/node/task-runner-protocol.js.map +1 -1
- package/lib/node/task-runner.d.ts +2 -2
- package/lib/node/task-runner.d.ts.map +1 -1
- package/lib/node/task-runner.js +13 -20
- package/lib/node/task-runner.js.map +1 -1
- package/lib/node/task-server.d.ts +5 -5
- package/lib/node/task-server.d.ts.map +1 -1
- package/lib/node/task-server.js +21 -27
- package/lib/node/task-server.js.map +1 -1
- package/lib/node/task-server.slow-spec.js +58 -60
- package/lib/node/task-server.slow-spec.js.map +1 -1
- package/lib/node/task.d.ts +2 -2
- package/lib/node/task.d.ts.map +1 -1
- package/lib/node/task.js +12 -16
- package/lib/node/task.js.map +1 -1
- package/lib/node/test/task-test-container.js +28 -32
- package/lib/node/test/task-test-container.js.map +1 -1
- package/package.json +24 -13
- package/src/browser/index.ts +6 -6
- package/src/browser/process/process-task-contribution.ts +2 -2
- package/src/browser/process/process-task-frontend-module.ts +3 -3
- package/src/browser/process/process-task-resolver.spec.ts +4 -4
- package/src/browser/process/process-task-resolver.ts +4 -4
- package/src/browser/provided-task-configurations.spec.ts +4 -4
- package/src/browser/provided-task-configurations.ts +3 -3
- package/src/browser/quick-open-task.ts +8 -8
- package/src/browser/task-configuration-manager.ts +6 -6
- package/src/browser/task-configuration-model.ts +2 -2
- package/src/browser/task-configurations.ts +6 -6
- package/src/browser/task-contribution.ts +1 -1
- package/src/browser/task-definition-registry.spec.ts +2 -2
- package/src/browser/task-definition-registry.ts +1 -1
- package/src/browser/task-frontend-contribution.ts +5 -5
- package/src/browser/task-frontend-module.ts +22 -22
- package/src/browser/task-name-resolver.ts +3 -3
- package/src/browser/task-node.ts +1 -1
- package/src/browser/task-problem-matcher-registry.ts +2 -2
- package/src/browser/task-problem-pattern-registry.ts +1 -1
- package/src/browser/task-schema-updater.ts +5 -5
- package/src/browser/task-service.spec.ts +4 -4
- package/src/browser/task-service.ts +20 -16
- package/src/browser/task-source-resolver.ts +2 -2
- package/src/browser/task-terminal-widget-manager.ts +3 -3
- package/src/common/index.ts +4 -4
- package/src/common/process/task-protocol.ts +1 -1
- package/src/common/task-common-module.ts +1 -1
- package/src/common/task-protocol.ts +1 -1
- package/src/common/task-watcher.ts +1 -1
- package/src/node/custom/custom-task-runner-backend-module.ts +4 -4
- package/src/node/custom/custom-task-runner-contribution.ts +2 -2
- package/src/node/custom/custom-task-runner.ts +4 -4
- package/src/node/custom/custom-task.ts +4 -4
- package/src/node/index.ts +3 -3
- package/src/node/process/process-task-runner-backend-module.ts +4 -4
- package/src/node/process/process-task-runner-contribution.ts +2 -2
- package/src/node/process/process-task-runner.ts +5 -5
- package/src/node/process/process-task.spec.ts +1 -1
- package/src/node/process/process-task.ts +5 -5
- package/src/node/task-abstract-line-matcher.ts +1 -1
- package/src/node/task-backend-application-contribution.ts +1 -1
- package/src/node/task-backend-module.ts +9 -9
- package/src/node/task-line-matchers.ts +2 -2
- package/src/node/task-manager.ts +2 -2
- package/src/node/task-problem-collector.spec.ts +2 -2
- package/src/node/task-problem-collector.ts +3 -3
- package/src/node/task-runner-protocol.ts +2 -2
- package/src/node/task-runner.ts +2 -2
- package/src/node/task-server.slow-spec.ts +4 -4
- package/src/node/task-server.ts +8 -8
- package/src/node/task.ts +2 -2
- package/src/node/test/task-test-container.ts +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2019 Red Hat, Inc. and others.
|
|
4
3
|
//
|
|
@@ -20,27 +19,25 @@
|
|
|
20
19
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
21
20
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
22
21
|
*--------------------------------------------------------------------------------------------*/
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const browser_2 = require("@theia/workspace/lib/browser");
|
|
38
|
-
const task_preferences_1 = require("../common/task-preferences");
|
|
22
|
+
import { __decorate } from "tslib";
|
|
23
|
+
import Ajv from '@theia/core/shared/ajv';
|
|
24
|
+
import debounce from 'p-debounce';
|
|
25
|
+
import { postConstruct, injectable, inject } from '@theia/core/shared/inversify';
|
|
26
|
+
import { JsonSchemaDataStore } from '@theia/core/lib/browser/json-schema-store';
|
|
27
|
+
import { deepClone, Emitter, nls } from '@theia/core/lib/common';
|
|
28
|
+
import { inputsSchema } from '@theia/variable-resolver/lib/browser/variable-input-schema';
|
|
29
|
+
import URI from '@theia/core/lib/common/uri';
|
|
30
|
+
import { ProblemMatcherRegistry } from './task-problem-matcher-registry.js';
|
|
31
|
+
import { TaskDefinitionRegistry } from './task-definition-registry.js';
|
|
32
|
+
import { TaskServer, asVariableName } from '../common/index.js';
|
|
33
|
+
import { UserStorageUri } from '@theia/userstorage/lib/browser';
|
|
34
|
+
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
35
|
+
import { taskSchemaId } from '../common/task-preferences.js';
|
|
39
36
|
let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
40
37
|
constructor() {
|
|
41
|
-
this.onDidChangeTaskSchemaEmitter = new
|
|
38
|
+
this.onDidChangeTaskSchemaEmitter = new Emitter();
|
|
42
39
|
this.onDidChangeTaskSchema = this.onDidChangeTaskSchemaEmitter.event;
|
|
43
|
-
this.uri = new
|
|
40
|
+
this.uri = new URI(taskSchemaId);
|
|
44
41
|
this.update = debounce(() => this.doUpdate(), 0);
|
|
45
42
|
}
|
|
46
43
|
init() {
|
|
@@ -55,7 +52,7 @@ let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
|
55
52
|
}
|
|
56
53
|
registerSchemas(context) {
|
|
57
54
|
context.registerSchema({
|
|
58
|
-
fileMatch: ['tasks.json',
|
|
55
|
+
fileMatch: ['tasks.json', UserStorageUri.resolve('tasks.json').toString()],
|
|
59
56
|
url: this.uri.toString()
|
|
60
57
|
});
|
|
61
58
|
this.workspaceService.updateSchema('tasks', { $ref: this.uri.toString() });
|
|
@@ -63,7 +60,7 @@ let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
|
63
60
|
doUpdate() {
|
|
64
61
|
taskConfigurationSchema.anyOf = [processTaskConfigurationSchema, ...customizedDetectedTasks, ...customSchemas];
|
|
65
62
|
const schema = this.getTaskSchema();
|
|
66
|
-
this.doValidate = new
|
|
63
|
+
this.doValidate = new Ajv().compile(schema);
|
|
67
64
|
this.jsonSchemaData.setSchema(this.uri, schema);
|
|
68
65
|
this.onDidChangeTaskSchemaEmitter.fire(undefined);
|
|
69
66
|
}
|
|
@@ -131,7 +128,7 @@ let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
|
131
128
|
...defaultTaskType,
|
|
132
129
|
enum: [def.taskType],
|
|
133
130
|
default: def.taskType,
|
|
134
|
-
description:
|
|
131
|
+
description: nls.localizeByDefault('The task type to customize')
|
|
135
132
|
};
|
|
136
133
|
customizedDetectedTask.properties.type = taskType;
|
|
137
134
|
const required = def.properties.required || [];
|
|
@@ -160,16 +157,16 @@ let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
|
160
157
|
version: {
|
|
161
158
|
type: 'string',
|
|
162
159
|
default: '2.0.0',
|
|
163
|
-
description:
|
|
160
|
+
description: nls.localizeByDefault("The config's version number.")
|
|
164
161
|
},
|
|
165
162
|
tasks: {
|
|
166
163
|
type: 'array',
|
|
167
164
|
items: {
|
|
168
|
-
...
|
|
165
|
+
...deepClone(taskConfigurationSchema)
|
|
169
166
|
},
|
|
170
|
-
description:
|
|
167
|
+
description: nls.localizeByDefault('The task configurations. Usually these are enrichments of task already defined in the external task runner.')
|
|
171
168
|
},
|
|
172
|
-
inputs:
|
|
169
|
+
inputs: inputsSchema.definitions.inputs
|
|
173
170
|
},
|
|
174
171
|
additionalProperties: false,
|
|
175
172
|
allowComments: true,
|
|
@@ -178,7 +175,7 @@ let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
|
178
175
|
}
|
|
179
176
|
/** Gets the most up-to-date names of problem matchers from the registry and update the task schema */
|
|
180
177
|
updateProblemMatcherNames() {
|
|
181
|
-
const matcherNames = this.problemMatcherRegistry.getAll().map(m =>
|
|
178
|
+
const matcherNames = this.problemMatcherRegistry.getAll().map(m => asVariableName(m.name));
|
|
182
179
|
problemMatcherNames.length = 0;
|
|
183
180
|
problemMatcherNames.push(...matcherNames);
|
|
184
181
|
this.update();
|
|
@@ -188,71 +185,63 @@ let TaskSchemaUpdater = class TaskSchemaUpdater {
|
|
|
188
185
|
this.update();
|
|
189
186
|
}
|
|
190
187
|
};
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
(0, inversify_1.inject)(json_schema_store_1.JsonSchemaDataStore),
|
|
194
|
-
tslib_1.__metadata("design:type", json_schema_store_1.JsonSchemaDataStore)
|
|
188
|
+
__decorate([
|
|
189
|
+
inject(JsonSchemaDataStore)
|
|
195
190
|
], TaskSchemaUpdater.prototype, "jsonSchemaData", void 0);
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
tslib_1.__metadata("design:type", task_problem_matcher_registry_1.ProblemMatcherRegistry)
|
|
191
|
+
__decorate([
|
|
192
|
+
inject(ProblemMatcherRegistry)
|
|
199
193
|
], TaskSchemaUpdater.prototype, "problemMatcherRegistry", void 0);
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
tslib_1.__metadata("design:type", task_definition_registry_1.TaskDefinitionRegistry)
|
|
194
|
+
__decorate([
|
|
195
|
+
inject(TaskDefinitionRegistry)
|
|
203
196
|
], TaskSchemaUpdater.prototype, "taskDefinitionRegistry", void 0);
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
tslib_1.__metadata("design:type", Object)
|
|
197
|
+
__decorate([
|
|
198
|
+
inject(TaskServer)
|
|
207
199
|
], TaskSchemaUpdater.prototype, "taskServer", void 0);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
tslib_1.__metadata("design:type", browser_2.WorkspaceService)
|
|
200
|
+
__decorate([
|
|
201
|
+
inject(WorkspaceService)
|
|
211
202
|
], TaskSchemaUpdater.prototype, "workspaceService", void 0);
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
tslib_1.__metadata("design:type", Function),
|
|
215
|
-
tslib_1.__metadata("design:paramtypes", []),
|
|
216
|
-
tslib_1.__metadata("design:returntype", void 0)
|
|
203
|
+
__decorate([
|
|
204
|
+
postConstruct()
|
|
217
205
|
], TaskSchemaUpdater.prototype, "init", null);
|
|
218
|
-
|
|
219
|
-
|
|
206
|
+
TaskSchemaUpdater = __decorate([
|
|
207
|
+
injectable()
|
|
220
208
|
], TaskSchemaUpdater);
|
|
209
|
+
export { TaskSchemaUpdater };
|
|
221
210
|
const commandSchema = {
|
|
222
211
|
type: 'string',
|
|
223
|
-
description:
|
|
212
|
+
description: nls.localizeByDefault('The command to be executed. Can be an external program or a shell command.')
|
|
224
213
|
};
|
|
225
214
|
const commandArgSchema = {
|
|
226
215
|
type: 'array',
|
|
227
|
-
description:
|
|
216
|
+
description: nls.localizeByDefault('Arguments passed to the command when this task is invoked.'),
|
|
228
217
|
items: {
|
|
229
218
|
type: 'string'
|
|
230
219
|
}
|
|
231
220
|
};
|
|
232
221
|
const commandOptionsSchema = {
|
|
233
222
|
type: 'object',
|
|
234
|
-
description:
|
|
223
|
+
description: nls.localizeByDefault('Additional command options'),
|
|
235
224
|
properties: {
|
|
236
225
|
cwd: {
|
|
237
226
|
type: 'string',
|
|
238
|
-
description:
|
|
227
|
+
description: 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
228
|
default: '${workspaceFolder}'
|
|
240
229
|
},
|
|
241
230
|
env: {
|
|
242
231
|
type: 'object',
|
|
243
|
-
description:
|
|
232
|
+
description: nls.localizeByDefault("The environment of the executed program or shell. If omitted the parent process' environment is used.")
|
|
244
233
|
},
|
|
245
234
|
shell: {
|
|
246
235
|
type: 'object',
|
|
247
|
-
description:
|
|
236
|
+
description: nls.localizeByDefault('Configures the shell to be used.'),
|
|
248
237
|
properties: {
|
|
249
238
|
executable: {
|
|
250
239
|
type: 'string',
|
|
251
|
-
description:
|
|
240
|
+
description: nls.localizeByDefault('The shell to be used.')
|
|
252
241
|
},
|
|
253
242
|
args: {
|
|
254
243
|
type: 'array',
|
|
255
|
-
description:
|
|
244
|
+
description: nls.localizeByDefault('The shell arguments.'),
|
|
256
245
|
items: {
|
|
257
246
|
type: 'string'
|
|
258
247
|
}
|
|
@@ -266,13 +255,13 @@ const defaultTaskTypes = ['shell', 'process'];
|
|
|
266
255
|
const supportedTaskTypes = [...defaultTaskTypes];
|
|
267
256
|
const taskLabel = {
|
|
268
257
|
type: 'string',
|
|
269
|
-
description:
|
|
258
|
+
description: nls.localizeByDefault("The task's user interface label")
|
|
270
259
|
};
|
|
271
260
|
const defaultTaskType = {
|
|
272
261
|
type: 'string',
|
|
273
262
|
enum: supportedTaskTypes,
|
|
274
263
|
default: defaultTaskTypes[0],
|
|
275
|
-
description:
|
|
264
|
+
description: nls.localizeByDefault('Defines whether the task is run as a process or as a command inside a shell.')
|
|
276
265
|
};
|
|
277
266
|
const commandAndArgs = {
|
|
278
267
|
command: commandSchema,
|
|
@@ -285,9 +274,9 @@ const group = {
|
|
|
285
274
|
type: 'string',
|
|
286
275
|
enum: ['build', 'test', 'none'],
|
|
287
276
|
enumDescriptions: [
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
277
|
+
nls.localizeByDefault("Marks the task as a build task accessible through the 'Run Build Task' command."),
|
|
278
|
+
nls.localizeByDefault("Marks the task as a test task accessible through the 'Run Test Task' command."),
|
|
279
|
+
nls.localizeByDefault('Assigns the task to no group')
|
|
291
280
|
]
|
|
292
281
|
},
|
|
293
282
|
{
|
|
@@ -296,23 +285,23 @@ const group = {
|
|
|
296
285
|
kind: {
|
|
297
286
|
type: 'string',
|
|
298
287
|
default: 'none',
|
|
299
|
-
description:
|
|
288
|
+
description: nls.localizeByDefault("The task's execution group."),
|
|
300
289
|
enum: ['build', 'test', 'none'],
|
|
301
290
|
enumDescriptions: [
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
291
|
+
nls.localizeByDefault("Marks the task as a build task accessible through the 'Run Build Task' command."),
|
|
292
|
+
nls.localizeByDefault("Marks the task as a test task accessible through the 'Run Test Task' command."),
|
|
293
|
+
nls.localizeByDefault('Assigns the task to no group')
|
|
305
294
|
]
|
|
306
295
|
},
|
|
307
296
|
isDefault: {
|
|
308
297
|
type: 'boolean',
|
|
309
298
|
default: false,
|
|
310
|
-
description:
|
|
299
|
+
description: 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
300
|
}
|
|
312
301
|
}
|
|
313
302
|
}
|
|
314
303
|
],
|
|
315
|
-
description:
|
|
304
|
+
description: 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
305
|
};
|
|
317
306
|
const problemPattern = {
|
|
318
307
|
default: {
|
|
@@ -325,53 +314,53 @@ const problemPattern = {
|
|
|
325
314
|
properties: {
|
|
326
315
|
regexp: {
|
|
327
316
|
type: 'string',
|
|
328
|
-
description:
|
|
317
|
+
description: nls.localizeByDefault('The regular expression to find an error, warning or info in the output.')
|
|
329
318
|
},
|
|
330
319
|
kind: {
|
|
331
320
|
type: 'string',
|
|
332
|
-
description:
|
|
321
|
+
description: nls.localizeByDefault('whether the pattern matches a location (file and line) or only a file.')
|
|
333
322
|
},
|
|
334
323
|
file: {
|
|
335
324
|
type: 'integer',
|
|
336
|
-
description:
|
|
325
|
+
description: nls.localizeByDefault('The match group index of the filename. If omitted 1 is used.')
|
|
337
326
|
},
|
|
338
327
|
location: {
|
|
339
328
|
type: 'integer',
|
|
340
329
|
// eslint-disable-next-line max-len
|
|
341
|
-
description:
|
|
330
|
+
description: 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
331
|
},
|
|
343
332
|
line: {
|
|
344
333
|
type: 'integer',
|
|
345
|
-
description:
|
|
334
|
+
description: nls.localizeByDefault("The match group index of the problem's line. Defaults to 2")
|
|
346
335
|
},
|
|
347
336
|
column: {
|
|
348
337
|
type: 'integer',
|
|
349
|
-
description:
|
|
338
|
+
description: nls.localizeByDefault("The match group index of the problem's line character. Defaults to 3")
|
|
350
339
|
},
|
|
351
340
|
endLine: {
|
|
352
341
|
type: 'integer',
|
|
353
|
-
description:
|
|
342
|
+
description: nls.localizeByDefault("The match group index of the problem's end line. Defaults to undefined")
|
|
354
343
|
},
|
|
355
344
|
endColumn: {
|
|
356
345
|
type: 'integer',
|
|
357
|
-
description:
|
|
346
|
+
description: nls.localizeByDefault("The match group index of the problem's end line character. Defaults to undefined")
|
|
358
347
|
},
|
|
359
348
|
severity: {
|
|
360
349
|
type: 'integer',
|
|
361
|
-
description:
|
|
350
|
+
description: nls.localizeByDefault("The match group index of the problem's severity. Defaults to undefined")
|
|
362
351
|
},
|
|
363
352
|
code: {
|
|
364
353
|
type: 'integer',
|
|
365
|
-
description:
|
|
354
|
+
description: nls.localizeByDefault("The match group index of the problem's code. Defaults to undefined")
|
|
366
355
|
},
|
|
367
356
|
message: {
|
|
368
357
|
type: 'integer',
|
|
369
|
-
description:
|
|
358
|
+
description: 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
359
|
},
|
|
371
360
|
loop: {
|
|
372
361
|
type: 'boolean',
|
|
373
362
|
// eslint-disable-next-line max-len
|
|
374
|
-
description:
|
|
363
|
+
description: 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
364
|
}
|
|
376
365
|
}
|
|
377
366
|
};
|
|
@@ -385,11 +374,11 @@ const watchingPattern = {
|
|
|
385
374
|
properties: {
|
|
386
375
|
regexp: {
|
|
387
376
|
type: 'string',
|
|
388
|
-
description:
|
|
377
|
+
description: nls.localizeByDefault('The regular expression to detect the begin or end of a background task.')
|
|
389
378
|
},
|
|
390
379
|
file: {
|
|
391
380
|
type: 'integer',
|
|
392
|
-
description:
|
|
381
|
+
description: nls.localizeByDefault('The match group index of the filename. Can be omitted.')
|
|
393
382
|
},
|
|
394
383
|
}
|
|
395
384
|
};
|
|
@@ -397,12 +386,12 @@ const patternType = {
|
|
|
397
386
|
anyOf: [
|
|
398
387
|
{
|
|
399
388
|
type: 'string',
|
|
400
|
-
description:
|
|
389
|
+
description: nls.localizeByDefault('The name of a contributed or predefined pattern')
|
|
401
390
|
},
|
|
402
391
|
problemPattern,
|
|
403
392
|
multiLineProblemPattern
|
|
404
393
|
],
|
|
405
|
-
description:
|
|
394
|
+
description: nls.localizeByDefault('A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.')
|
|
406
395
|
};
|
|
407
396
|
const problemMatcherObject = {
|
|
408
397
|
type: 'object',
|
|
@@ -410,25 +399,25 @@ const problemMatcherObject = {
|
|
|
410
399
|
base: {
|
|
411
400
|
type: 'string',
|
|
412
401
|
enum: problemMatcherNames,
|
|
413
|
-
description:
|
|
402
|
+
description: nls.localizeByDefault('The name of a base problem matcher to use.')
|
|
414
403
|
},
|
|
415
404
|
owner: {
|
|
416
405
|
type: 'string',
|
|
417
|
-
description:
|
|
406
|
+
description: 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
407
|
},
|
|
419
408
|
source: {
|
|
420
409
|
type: 'string',
|
|
421
|
-
description:
|
|
410
|
+
description: nls.localizeByDefault("A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.")
|
|
422
411
|
},
|
|
423
412
|
severity: {
|
|
424
413
|
type: 'string',
|
|
425
414
|
enum: ['error', 'warning', 'info'],
|
|
426
|
-
description:
|
|
415
|
+
description: nls.localizeByDefault("The default severity for captures problems. Is used if the pattern doesn't define a match group for severity.")
|
|
427
416
|
},
|
|
428
417
|
applyTo: {
|
|
429
418
|
type: 'string',
|
|
430
419
|
enum: ['allDocuments', 'openDocuments', 'closedDocuments'],
|
|
431
|
-
description:
|
|
420
|
+
description: nls.localizeByDefault('Controls if a problem reported on a text document is applied only to open, closed or all documents.')
|
|
432
421
|
},
|
|
433
422
|
pattern: patternType,
|
|
434
423
|
fileLocation: {
|
|
@@ -445,16 +434,16 @@ const problemMatcherObject = {
|
|
|
445
434
|
}
|
|
446
435
|
],
|
|
447
436
|
// eslint-disable-next-line max-len
|
|
448
|
-
description:
|
|
437
|
+
description: 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
438
|
},
|
|
450
439
|
background: {
|
|
451
440
|
type: 'object',
|
|
452
441
|
additionalProperties: false,
|
|
453
|
-
description:
|
|
442
|
+
description: nls.localizeByDefault('Patterns to track the begin and end of a matcher active on a background task.'),
|
|
454
443
|
properties: {
|
|
455
444
|
activeOnStart: {
|
|
456
445
|
type: 'boolean',
|
|
457
|
-
description:
|
|
446
|
+
description: 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
447
|
},
|
|
459
448
|
beginsPattern: {
|
|
460
449
|
oneOf: [
|
|
@@ -463,7 +452,7 @@ const problemMatcherObject = {
|
|
|
463
452
|
},
|
|
464
453
|
watchingPattern
|
|
465
454
|
],
|
|
466
|
-
description:
|
|
455
|
+
description: nls.localizeByDefault('If matched in the output the start of a background task is signaled.')
|
|
467
456
|
},
|
|
468
457
|
endsPattern: {
|
|
469
458
|
oneOf: [
|
|
@@ -472,19 +461,19 @@ const problemMatcherObject = {
|
|
|
472
461
|
},
|
|
473
462
|
watchingPattern
|
|
474
463
|
],
|
|
475
|
-
description:
|
|
464
|
+
description: nls.localizeByDefault('If matched in the output the end of a background task is signaled.')
|
|
476
465
|
}
|
|
477
466
|
}
|
|
478
467
|
},
|
|
479
468
|
watching: {
|
|
480
469
|
type: 'object',
|
|
481
470
|
additionalProperties: false,
|
|
482
|
-
deprecationMessage:
|
|
483
|
-
description:
|
|
471
|
+
deprecationMessage: nls.localizeByDefault('The watching property is deprecated. Use background instead.'),
|
|
472
|
+
description: nls.localizeByDefault('Patterns to track the begin and end of a watching matcher.'),
|
|
484
473
|
properties: {
|
|
485
474
|
activeOnStart: {
|
|
486
475
|
type: 'boolean',
|
|
487
|
-
description:
|
|
476
|
+
description: 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
477
|
},
|
|
489
478
|
beginsPattern: {
|
|
490
479
|
oneOf: [
|
|
@@ -493,7 +482,7 @@ const problemMatcherObject = {
|
|
|
493
482
|
},
|
|
494
483
|
watchingPattern
|
|
495
484
|
],
|
|
496
|
-
description:
|
|
485
|
+
description: nls.localizeByDefault('If matched in the output the start of a watching task is signaled.')
|
|
497
486
|
},
|
|
498
487
|
endsPattern: {
|
|
499
488
|
oneOf: [
|
|
@@ -502,7 +491,7 @@ const problemMatcherObject = {
|
|
|
502
491
|
},
|
|
503
492
|
watchingPattern
|
|
504
493
|
],
|
|
505
|
-
description:
|
|
494
|
+
description: nls.localizeByDefault('If matched in the output the end of a watching task is signaled.')
|
|
506
495
|
}
|
|
507
496
|
}
|
|
508
497
|
}
|
|
@@ -527,7 +516,7 @@ const problemMatcher = {
|
|
|
527
516
|
items: problemMatcherObject
|
|
528
517
|
}
|
|
529
518
|
],
|
|
530
|
-
description:
|
|
519
|
+
description: 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
520
|
};
|
|
532
521
|
const presentation = {
|
|
533
522
|
type: 'object',
|
|
@@ -539,57 +528,57 @@ const presentation = {
|
|
|
539
528
|
showReuseMessage: true,
|
|
540
529
|
clear: false
|
|
541
530
|
},
|
|
542
|
-
description:
|
|
531
|
+
description: nls.localizeByDefault("Configures the panel that is used to present the task's output and reads its input."),
|
|
543
532
|
additionalProperties: true,
|
|
544
533
|
properties: {
|
|
545
534
|
echo: {
|
|
546
535
|
type: 'boolean',
|
|
547
536
|
default: true,
|
|
548
|
-
description:
|
|
537
|
+
description: nls.localizeByDefault('Controls whether the executed command is echoed to the panel. Default is true.')
|
|
549
538
|
},
|
|
550
539
|
focus: {
|
|
551
540
|
type: 'boolean',
|
|
552
541
|
default: false,
|
|
553
|
-
description:
|
|
542
|
+
description: nls.localizeByDefault('Controls whether the panel takes focus. Default is false. If set to true the panel is revealed as well.')
|
|
554
543
|
},
|
|
555
544
|
reveal: {
|
|
556
545
|
type: 'string',
|
|
557
546
|
enum: ['always', 'silent', 'never'],
|
|
558
547
|
enumDescriptions: [
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
548
|
+
nls.localizeByDefault('Always reveals the terminal when this task is executed.'),
|
|
549
|
+
nls.localizeByDefault('Only reveals the terminal if the task exits with an error or the problem matcher finds an error.'),
|
|
550
|
+
nls.localizeByDefault('Never reveals the terminal when this task is executed.')
|
|
562
551
|
],
|
|
563
552
|
default: 'always',
|
|
564
|
-
description:
|
|
553
|
+
description: nls.localizeByDefault('Controls whether the terminal running the task is revealed or not. May be overridden by option "revealProblems". Default is "always".')
|
|
565
554
|
},
|
|
566
555
|
panel: {
|
|
567
556
|
type: 'string',
|
|
568
557
|
enum: ['shared', 'dedicated', 'new'],
|
|
569
558
|
enumDescriptions: [
|
|
570
|
-
|
|
559
|
+
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
560
|
// eslint-disable-next-line max-len
|
|
572
|
-
|
|
573
|
-
|
|
561
|
+
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.'),
|
|
562
|
+
nls.localize('theia/task/schema/presentation/panel/new', 'Every execution of that task is using a new clean terminal.')
|
|
574
563
|
],
|
|
575
564
|
default: 'shared',
|
|
576
|
-
description:
|
|
565
|
+
description: nls.localizeByDefault('Controls if the panel is shared between tasks, dedicated to this task or a new one is created on every run.')
|
|
577
566
|
},
|
|
578
567
|
showReuseMessage: {
|
|
579
568
|
type: 'boolean',
|
|
580
569
|
default: true,
|
|
581
|
-
description:
|
|
570
|
+
description: nls.localize('theia/task/schema/presentation/showReuseMessage', 'Controls whether to show the "Terminal will be reused by tasks" message.')
|
|
582
571
|
},
|
|
583
572
|
clear: {
|
|
584
573
|
type: 'boolean',
|
|
585
574
|
default: false,
|
|
586
|
-
description:
|
|
575
|
+
description: nls.localizeByDefault('Controls whether the terminal is cleared before executing the task.')
|
|
587
576
|
}
|
|
588
577
|
}
|
|
589
578
|
};
|
|
590
579
|
const detail = {
|
|
591
580
|
type: 'string',
|
|
592
|
-
description:
|
|
581
|
+
description: nls.localizeByDefault('An optional description of a task that shows in the Run Task quick pick as a detail.')
|
|
593
582
|
};
|
|
594
583
|
const taskIdentifier = {
|
|
595
584
|
type: 'object',
|
|
@@ -597,7 +586,7 @@ const taskIdentifier = {
|
|
|
597
586
|
properties: {
|
|
598
587
|
type: {
|
|
599
588
|
type: 'string',
|
|
600
|
-
description:
|
|
589
|
+
description: nls.localizeByDefault('The task identifier.')
|
|
601
590
|
}
|
|
602
591
|
}
|
|
603
592
|
};
|
|
@@ -611,18 +600,18 @@ const processTaskConfigurationSchema = {
|
|
|
611
600
|
isBackground: {
|
|
612
601
|
type: 'boolean',
|
|
613
602
|
default: false,
|
|
614
|
-
description:
|
|
603
|
+
description: nls.localizeByDefault('Whether the executed task is kept alive and is running in the background.')
|
|
615
604
|
},
|
|
616
605
|
dependsOn: {
|
|
617
606
|
anyOf: [
|
|
618
607
|
{
|
|
619
608
|
type: 'string',
|
|
620
|
-
description:
|
|
609
|
+
description: nls.localizeByDefault('Another task this task depends on.')
|
|
621
610
|
},
|
|
622
611
|
taskIdentifier,
|
|
623
612
|
{
|
|
624
613
|
type: 'array',
|
|
625
|
-
description:
|
|
614
|
+
description: nls.localizeByDefault('The other tasks this task depends on.'),
|
|
626
615
|
items: {
|
|
627
616
|
anyOf: [
|
|
628
617
|
{
|
|
@@ -633,31 +622,31 @@ const processTaskConfigurationSchema = {
|
|
|
633
622
|
}
|
|
634
623
|
}
|
|
635
624
|
],
|
|
636
|
-
description:
|
|
625
|
+
description: nls.localizeByDefault('Either a string representing another task or an array of other tasks that this task depends on.')
|
|
637
626
|
},
|
|
638
627
|
dependsOrder: {
|
|
639
628
|
type: 'string',
|
|
640
629
|
enum: ['parallel', 'sequence'],
|
|
641
630
|
enumDescriptions: [
|
|
642
|
-
|
|
643
|
-
|
|
631
|
+
nls.localizeByDefault('Run all dependsOn tasks in parallel.'),
|
|
632
|
+
nls.localizeByDefault('Run all dependsOn tasks in sequence.')
|
|
644
633
|
],
|
|
645
634
|
default: 'parallel',
|
|
646
|
-
description:
|
|
635
|
+
description: nls.localizeByDefault('Determines the order of the dependsOn tasks for this task. Note that this property is not recursive.')
|
|
647
636
|
},
|
|
648
637
|
windows: {
|
|
649
638
|
type: 'object',
|
|
650
|
-
description:
|
|
639
|
+
description: nls.localizeByDefault('Windows specific command configuration'),
|
|
651
640
|
properties: commandAndArgs
|
|
652
641
|
},
|
|
653
642
|
osx: {
|
|
654
643
|
type: 'object',
|
|
655
|
-
description:
|
|
644
|
+
description: nls.localizeByDefault('Mac specific command configuration'),
|
|
656
645
|
properties: commandAndArgs
|
|
657
646
|
},
|
|
658
647
|
linux: {
|
|
659
648
|
type: 'object',
|
|
660
|
-
description:
|
|
649
|
+
description: nls.localizeByDefault('Linux specific command configuration'),
|
|
661
650
|
properties: commandAndArgs
|
|
662
651
|
},
|
|
663
652
|
group,
|
|
@@ -670,7 +659,7 @@ const processTaskConfigurationSchema = {
|
|
|
670
659
|
const customizedDetectedTasks = [];
|
|
671
660
|
const customSchemas = [];
|
|
672
661
|
const taskConfigurationSchema = {
|
|
673
|
-
$id:
|
|
662
|
+
$id: taskSchemaId,
|
|
674
663
|
anyOf: [processTaskConfigurationSchema, ...customizedDetectedTasks, ...customSchemas]
|
|
675
664
|
};
|
|
676
665
|
//# sourceMappingURL=task-schema-updater.js.map
|