@theia/plugin-ext 1.73.0-next.20 → 1.73.0-next.26
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/hosted/node/hosted-plugin-localization-service.d.ts +2 -1
- package/lib/hosted/node/hosted-plugin-localization-service.d.ts.map +1 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js +6 -1
- package/lib/hosted/node/hosted-plugin-localization-service.js.map +1 -1
- package/lib/hosted/node/plugin-deployer-handler-impl.js +4 -3
- package/lib/hosted/node/plugin-deployer-handler-impl.js.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.d.ts +2 -0
- package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
- package/lib/hosted/node/scanners/scanner-theia.js +55 -49
- package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
- package/lib/main/browser/debug/debug-main.d.ts +1 -11
- package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
- package/lib/main/browser/debug/debug-main.js +3 -24
- package/lib/main/browser/debug/debug-main.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts +2 -1
- package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-service.js +8 -3
- package/lib/main/browser/debug/plugin-debug-service.js.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +7 -44
- package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
- package/lib/main/browser/debug/plugin-debug-session-factory.js +29 -35
- package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts +2 -0
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js +7 -1
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.d.ts +2 -0
- package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
- package/lib/main/browser/plugin-contribution-handler.js +10 -4
- package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
- package/lib/main/browser/webview/webview-resource-cache.d.ts +2 -0
- package/lib/main/browser/webview/webview-resource-cache.d.ts.map +1 -1
- package/lib/main/browser/webview/webview-resource-cache.js +7 -1
- package/lib/main/browser/webview/webview-resource-cache.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +2 -1
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js +7 -1
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/node/plugin-deployer-impl.js +2 -1
- package/lib/main/node/plugin-deployer-impl.js.map +1 -1
- package/lib/plugin/languages/diagnostics.d.ts +4 -1
- package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
- package/lib/plugin/languages/diagnostics.js +22 -9
- package/lib/plugin/languages/diagnostics.js.map +1 -1
- package/package.json +29 -29
- package/src/hosted/node/hosted-plugin-localization-service.ts +6 -3
- package/src/hosted/node/plugin-deployer-handler-impl.ts +5 -5
- package/src/hosted/node/scanners/scanner-theia.ts +54 -50
- package/src/main/browser/debug/debug-main.ts +3 -45
- package/src/main/browser/debug/plugin-debug-service.ts +7 -5
- package/src/main/browser/debug/plugin-debug-session-factory.ts +25 -71
- package/src/main/browser/languages-main.ts +6 -2
- package/src/main/browser/plugin-contribution-handler.ts +8 -4
- package/src/main/browser/webview/webview-resource-cache.ts +6 -2
- package/src/main/browser/webview/webview.ts +6 -3
- package/src/main/node/plugin-deployer-impl.ts +2 -2
- package/src/plugin/languages/diagnostics.ts +28 -10
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/plugin-ext",
|
|
3
|
-
"version": "1.73.0-next.
|
|
3
|
+
"version": "1.73.0-next.26+d6f45631a",
|
|
4
4
|
"description": "Theia - Plugin Extension",
|
|
5
5
|
"main": "lib/common/index.js",
|
|
6
6
|
"typings": "lib/common/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@theia/ai-mcp": "1.73.0-next.
|
|
9
|
-
"@theia/bulk-edit": "1.73.0-next.
|
|
10
|
-
"@theia/callhierarchy": "1.73.0-next.
|
|
11
|
-
"@theia/console": "1.73.0-next.
|
|
12
|
-
"@theia/core": "1.73.0-next.
|
|
13
|
-
"@theia/debug": "1.73.0-next.
|
|
14
|
-
"@theia/editor": "1.73.0-next.
|
|
15
|
-
"@theia/editor-preview": "1.73.0-next.
|
|
16
|
-
"@theia/file-search": "1.73.0-next.
|
|
17
|
-
"@theia/filesystem": "1.73.0-next.
|
|
18
|
-
"@theia/markers": "1.73.0-next.
|
|
19
|
-
"@theia/messages": "1.73.0-next.
|
|
20
|
-
"@theia/monaco": "1.73.0-next.
|
|
8
|
+
"@theia/ai-mcp": "1.73.0-next.26+d6f45631a",
|
|
9
|
+
"@theia/bulk-edit": "1.73.0-next.26+d6f45631a",
|
|
10
|
+
"@theia/callhierarchy": "1.73.0-next.26+d6f45631a",
|
|
11
|
+
"@theia/console": "1.73.0-next.26+d6f45631a",
|
|
12
|
+
"@theia/core": "1.73.0-next.26+d6f45631a",
|
|
13
|
+
"@theia/debug": "1.73.0-next.26+d6f45631a",
|
|
14
|
+
"@theia/editor": "1.73.0-next.26+d6f45631a",
|
|
15
|
+
"@theia/editor-preview": "1.73.0-next.26+d6f45631a",
|
|
16
|
+
"@theia/file-search": "1.73.0-next.26+d6f45631a",
|
|
17
|
+
"@theia/filesystem": "1.73.0-next.26+d6f45631a",
|
|
18
|
+
"@theia/markers": "1.73.0-next.26+d6f45631a",
|
|
19
|
+
"@theia/messages": "1.73.0-next.26+d6f45631a",
|
|
20
|
+
"@theia/monaco": "1.73.0-next.26+d6f45631a",
|
|
21
21
|
"@theia/monaco-editor-core": "1.108.201",
|
|
22
|
-
"@theia/navigator": "1.73.0-next.
|
|
23
|
-
"@theia/notebook": "1.73.0-next.
|
|
24
|
-
"@theia/output": "1.73.0-next.
|
|
25
|
-
"@theia/plugin": "1.73.0-next.
|
|
26
|
-
"@theia/preferences": "1.73.0-next.
|
|
27
|
-
"@theia/scm": "1.73.0-next.
|
|
28
|
-
"@theia/search-in-workspace": "1.73.0-next.
|
|
29
|
-
"@theia/task": "1.73.0-next.
|
|
30
|
-
"@theia/terminal": "1.73.0-next.
|
|
31
|
-
"@theia/test": "1.73.0-next.
|
|
32
|
-
"@theia/timeline": "1.73.0-next.
|
|
33
|
-
"@theia/typehierarchy": "1.73.0-next.
|
|
34
|
-
"@theia/variable-resolver": "1.73.0-next.
|
|
35
|
-
"@theia/workspace": "1.73.0-next.
|
|
22
|
+
"@theia/navigator": "1.73.0-next.26+d6f45631a",
|
|
23
|
+
"@theia/notebook": "1.73.0-next.26+d6f45631a",
|
|
24
|
+
"@theia/output": "1.73.0-next.26+d6f45631a",
|
|
25
|
+
"@theia/plugin": "1.73.0-next.26+d6f45631a",
|
|
26
|
+
"@theia/preferences": "1.73.0-next.26+d6f45631a",
|
|
27
|
+
"@theia/scm": "1.73.0-next.26+d6f45631a",
|
|
28
|
+
"@theia/search-in-workspace": "1.73.0-next.26+d6f45631a",
|
|
29
|
+
"@theia/task": "1.73.0-next.26+d6f45631a",
|
|
30
|
+
"@theia/terminal": "1.73.0-next.26+d6f45631a",
|
|
31
|
+
"@theia/test": "1.73.0-next.26+d6f45631a",
|
|
32
|
+
"@theia/timeline": "1.73.0-next.26+d6f45631a",
|
|
33
|
+
"@theia/typehierarchy": "1.73.0-next.26+d6f45631a",
|
|
34
|
+
"@theia/variable-resolver": "1.73.0-next.26+d6f45631a",
|
|
35
|
+
"@theia/workspace": "1.73.0-next.26+d6f45631a",
|
|
36
36
|
"@types/mime": "^2.0.3",
|
|
37
37
|
"@vscode/debugprotocol": "^1.68.0",
|
|
38
38
|
"@vscode/proxy-agent": "^0.13.2",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"nyc": {
|
|
98
98
|
"extends": "../../configs/nyc.json"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "d6f45631a893ad1944a87db5aaf4bc94c64b1c60"
|
|
101
101
|
}
|
|
@@ -18,11 +18,11 @@ import * as path from 'path';
|
|
|
18
18
|
import * as fs from '@theia/core/shared/fs-extra';
|
|
19
19
|
import { LazyLocalization, LocalizationProvider } from '@theia/core/lib/node/i18n/localization-provider';
|
|
20
20
|
import { Localization } from '@theia/core/lib/common/i18n/localization';
|
|
21
|
-
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
21
|
+
import { inject, injectable, named } from '@theia/core/shared/inversify';
|
|
22
22
|
import { DeployedPlugin, Localization as PluginLocalization, PluginIdentifiers, Translation } from '../../common';
|
|
23
23
|
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
24
24
|
import { BackendApplicationContribution } from '@theia/core/lib/node';
|
|
25
|
-
import { Disposable, DisposableCollection, isObject, MaybePromise, nls, Path, URI } from '@theia/core';
|
|
25
|
+
import { Disposable, DisposableCollection, isObject, MaybePromise, nls, Path, URI, ILogger } from '@theia/core';
|
|
26
26
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
27
27
|
import { LanguagePackBundle, LanguagePackService } from '../../common/language-pack-service';
|
|
28
28
|
|
|
@@ -48,6 +48,9 @@ export class HostedPluginLocalizationService implements BackendApplicationContri
|
|
|
48
48
|
@inject(EnvVariablesServer)
|
|
49
49
|
protected readonly envVariables: EnvVariablesServer;
|
|
50
50
|
|
|
51
|
+
@inject(ILogger) @named('plugin-ext:HostedPluginLocalizationService')
|
|
52
|
+
protected readonly logger: ILogger;
|
|
53
|
+
|
|
51
54
|
protected localizationDisposeMap = new Map<string, Disposable>();
|
|
52
55
|
protected translationConfigFiles: Map<string, string> = new Map();
|
|
53
56
|
|
|
@@ -162,7 +165,7 @@ export class HostedPluginLocalizationService implements BackendApplicationContri
|
|
|
162
165
|
return Localization.localize(localization, fullKey, original);
|
|
163
166
|
}) as DeployedPlugin;
|
|
164
167
|
} catch (err) {
|
|
165
|
-
|
|
168
|
+
this.logger.error(`Failed to localize plugin '${pluginId}'.`, err);
|
|
166
169
|
}
|
|
167
170
|
return plugin;
|
|
168
171
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import * as fs from '@theia/core/shared/fs-extra';
|
|
18
|
-
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
|
+
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
19
19
|
import { ILogger } from '@theia/core';
|
|
20
20
|
import {
|
|
21
21
|
PluginDeployerHandler, PluginDeployerEntry, PluginEntryPoint, DeployedPlugin,
|
|
@@ -29,7 +29,7 @@ import { PluginUninstallationManager } from '../../main/node/plugin-uninstallati
|
|
|
29
29
|
|
|
30
30
|
@injectable()
|
|
31
31
|
export class PluginDeployerHandlerImpl implements PluginDeployerHandler {
|
|
32
|
-
@inject(ILogger)
|
|
32
|
+
@inject(ILogger) @named('plugin-ext:PluginDeployerHandlerImpl')
|
|
33
33
|
protected readonly logger: ILogger;
|
|
34
34
|
|
|
35
35
|
@inject(HostedPluginReader)
|
|
@@ -128,7 +128,7 @@ export class PluginDeployerHandlerImpl implements PluginDeployerHandler {
|
|
|
128
128
|
}
|
|
129
129
|
return dependencies;
|
|
130
130
|
} catch (e) {
|
|
131
|
-
|
|
131
|
+
this.logger.error(`Failed to load plugin dependencies from '${pluginPath}' path`, e);
|
|
132
132
|
return undefined;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -211,13 +211,13 @@ export class PluginDeployerHandlerImpl implements PluginDeployerHandler {
|
|
|
211
211
|
return false;
|
|
212
212
|
}
|
|
213
213
|
await Promise.all(Array.from(sourceLocations,
|
|
214
|
-
location => fs.remove(location).catch(err =>
|
|
214
|
+
location => fs.remove(location).catch(err => this.logger.error(`Failed to remove source for ${pluginId} at ${location}`, err))));
|
|
215
215
|
this.sourceLocations.delete(pluginId);
|
|
216
216
|
this.localizationService.undeployLocalizations(pluginId);
|
|
217
217
|
this.uninstallationManager.markAsUninstalled(pluginId);
|
|
218
218
|
return true;
|
|
219
219
|
} catch (e) {
|
|
220
|
-
|
|
220
|
+
this.logger.error('Error uninstalling plugin', e);
|
|
221
221
|
return false;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
/* eslint-disable @theia/localization-check */
|
|
18
18
|
|
|
19
|
-
import { inject, injectable, unmanaged } from '@theia/core/shared/inversify';
|
|
19
|
+
import { inject, injectable, unmanaged, named } from '@theia/core/shared/inversify';
|
|
20
20
|
import {
|
|
21
21
|
AutoClosingPair,
|
|
22
22
|
AutoClosingPairConditional,
|
|
@@ -82,6 +82,7 @@ import { ColorDefinition } from '@theia/core/lib/common/color';
|
|
|
82
82
|
import { CSSIcon } from '@theia/core/lib/common/markdown-rendering/icon-utilities';
|
|
83
83
|
import { PluginUriFactory } from './plugin-uri-factory';
|
|
84
84
|
import { PreferenceScope } from '@theia/core/lib/common/preferences/preference-scope';
|
|
85
|
+
import { ILogger } from '@theia/core';
|
|
85
86
|
|
|
86
87
|
const colorIdPattern = '^\\w+[.\\w+]*$';
|
|
87
88
|
const iconIdPattern = `^${CSSIcon.iconNameSegment}(-${CSSIcon.iconNameSegment})+$`;
|
|
@@ -284,6 +285,9 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
284
285
|
super('theiaPlugin', 'backend-init-theia');
|
|
285
286
|
}
|
|
286
287
|
|
|
288
|
+
@inject(ILogger) @named('plugin-ext:TheiaPluginScanner')
|
|
289
|
+
protected readonly logger: ILogger;
|
|
290
|
+
|
|
287
291
|
protected getEntryPoint(plugin: PluginPackage): PluginEntryPoint {
|
|
288
292
|
const result: PluginEntryPoint = {
|
|
289
293
|
frontend: plugin.theiaPlugin!.frontend,
|
|
@@ -335,7 +339,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
335
339
|
}
|
|
336
340
|
}
|
|
337
341
|
} catch (err) {
|
|
338
|
-
|
|
342
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'configuration'.`, rawPlugin.contributes.configuration, err);
|
|
339
343
|
}
|
|
340
344
|
|
|
341
345
|
const configurationDefaults = rawPlugin.contributes.configurationDefaults;
|
|
@@ -346,7 +350,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
346
350
|
contributions.submenus = this.readSubmenus(rawPlugin.contributes.submenus, rawPlugin);
|
|
347
351
|
}
|
|
348
352
|
} catch (err) {
|
|
349
|
-
|
|
353
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'submenus'.`, rawPlugin.contributes.submenus, err);
|
|
350
354
|
}
|
|
351
355
|
|
|
352
356
|
try {
|
|
@@ -355,7 +359,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
355
359
|
contributions.customEditors = customEditors;
|
|
356
360
|
}
|
|
357
361
|
} catch (err) {
|
|
358
|
-
|
|
362
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'customEditors'.`, rawPlugin.contributes.customEditors, err);
|
|
359
363
|
}
|
|
360
364
|
|
|
361
365
|
try {
|
|
@@ -374,7 +378,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
374
378
|
}
|
|
375
379
|
}
|
|
376
380
|
} catch (err) {
|
|
377
|
-
|
|
381
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'viewsContainers'.`, rawPlugin.contributes.viewsContainers, err);
|
|
378
382
|
}
|
|
379
383
|
|
|
380
384
|
try {
|
|
@@ -387,7 +391,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
387
391
|
}
|
|
388
392
|
}
|
|
389
393
|
} catch (err) {
|
|
390
|
-
|
|
394
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'views'.`, rawPlugin.contributes.views, err);
|
|
391
395
|
}
|
|
392
396
|
|
|
393
397
|
try {
|
|
@@ -395,7 +399,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
395
399
|
contributions.viewsWelcome = this.readViewsWelcome(rawPlugin.contributes!.viewsWelcome, rawPlugin.contributes.views);
|
|
396
400
|
}
|
|
397
401
|
} catch (err) {
|
|
398
|
-
|
|
402
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'viewsWelcome'.`, rawPlugin.contributes.viewsWelcome, err);
|
|
399
403
|
}
|
|
400
404
|
|
|
401
405
|
try {
|
|
@@ -405,7 +409,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
405
409
|
contributions.commands = commands.map(command => this.readCommand(command, rawPlugin));
|
|
406
410
|
}
|
|
407
411
|
} catch (err) {
|
|
408
|
-
|
|
412
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'commands'.`, rawPlugin.contributes!.commands, err);
|
|
409
413
|
}
|
|
410
414
|
|
|
411
415
|
try {
|
|
@@ -418,7 +422,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
418
422
|
}
|
|
419
423
|
}
|
|
420
424
|
} catch (err) {
|
|
421
|
-
|
|
425
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'menus'.`, rawPlugin.contributes.menus, err);
|
|
422
426
|
}
|
|
423
427
|
|
|
424
428
|
try {
|
|
@@ -427,7 +431,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
427
431
|
contributions.keybindings = rawKeybindings.map(rawKeybinding => this.readKeybinding(rawKeybinding));
|
|
428
432
|
}
|
|
429
433
|
} catch (err) {
|
|
430
|
-
|
|
434
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'keybindings'.`, rawPlugin.contributes.keybindings, err);
|
|
431
435
|
}
|
|
432
436
|
|
|
433
437
|
try {
|
|
@@ -436,7 +440,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
436
440
|
contributions.debuggers = debuggers;
|
|
437
441
|
}
|
|
438
442
|
} catch (err) {
|
|
439
|
-
|
|
443
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'debuggers'.`, rawPlugin.contributes.debuggers, err);
|
|
440
444
|
}
|
|
441
445
|
|
|
442
446
|
try {
|
|
@@ -445,91 +449,91 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
445
449
|
contributions.taskDefinitions = definitions.map(definitionContribution => this.readTaskDefinition(rawPlugin.name, definitionContribution));
|
|
446
450
|
}
|
|
447
451
|
} catch (err) {
|
|
448
|
-
|
|
452
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'taskDefinitions'.`, rawPlugin.contributes.taskDefinitions, err);
|
|
449
453
|
}
|
|
450
454
|
|
|
451
455
|
try {
|
|
452
456
|
contributions.problemMatchers = rawPlugin.contributes.problemMatchers;
|
|
453
457
|
} catch (err) {
|
|
454
|
-
|
|
458
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'problemMatchers'.`, rawPlugin.contributes.problemMatchers, err);
|
|
455
459
|
}
|
|
456
460
|
|
|
457
461
|
try {
|
|
458
462
|
contributions.problemPatterns = rawPlugin.contributes.problemPatterns;
|
|
459
463
|
} catch (err) {
|
|
460
|
-
|
|
464
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'problemPatterns'.`, rawPlugin.contributes.problemPatterns, err);
|
|
461
465
|
}
|
|
462
466
|
|
|
463
467
|
try {
|
|
464
468
|
contributions.resourceLabelFormatters = rawPlugin.contributes.resourceLabelFormatters;
|
|
465
469
|
} catch (err) {
|
|
466
|
-
|
|
470
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'resourceLabelFormatters'.`, rawPlugin.contributes.resourceLabelFormatters, err);
|
|
467
471
|
}
|
|
468
472
|
|
|
469
473
|
try {
|
|
470
474
|
contributions.authentication = rawPlugin.contributes.authentication;
|
|
471
475
|
} catch (err) {
|
|
472
|
-
|
|
476
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'authentication'.`, rawPlugin.contributes.authentication, err);
|
|
473
477
|
}
|
|
474
478
|
|
|
475
479
|
try {
|
|
476
480
|
contributions.notebooks = rawPlugin.contributes.notebooks;
|
|
477
481
|
} catch (err) {
|
|
478
|
-
|
|
482
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'notebooks'.`, rawPlugin.contributes.notebooks, err);
|
|
479
483
|
}
|
|
480
484
|
|
|
481
485
|
try {
|
|
482
486
|
contributions.notebookRenderer = rawPlugin.contributes.notebookRenderer;
|
|
483
487
|
} catch (err) {
|
|
484
|
-
|
|
488
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'notebook-renderer'.`, rawPlugin.contributes.notebookRenderer, err);
|
|
485
489
|
}
|
|
486
490
|
|
|
487
491
|
try {
|
|
488
492
|
contributions.notebookPreload = rawPlugin.contributes.notebookPreload;
|
|
489
493
|
} catch (err) {
|
|
490
|
-
|
|
494
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'notebooks-preload'.`, rawPlugin.contributes.notebookPreload, err);
|
|
491
495
|
}
|
|
492
496
|
|
|
493
497
|
try {
|
|
494
498
|
contributions.snippets = this.readSnippets(rawPlugin);
|
|
495
499
|
} catch (err) {
|
|
496
|
-
|
|
500
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'snippets'.`, rawPlugin.contributes!.snippets, err);
|
|
497
501
|
}
|
|
498
502
|
|
|
499
503
|
try {
|
|
500
504
|
contributions.themes = this.readThemes(rawPlugin);
|
|
501
505
|
} catch (err) {
|
|
502
|
-
|
|
506
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'themes'.`, rawPlugin.contributes.themes, err);
|
|
503
507
|
}
|
|
504
508
|
|
|
505
509
|
try {
|
|
506
510
|
contributions.icons = this.readIcons(rawPlugin);
|
|
507
511
|
} catch (err) {
|
|
508
|
-
|
|
512
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'icons'.`, rawPlugin.contributes.icons, err);
|
|
509
513
|
}
|
|
510
514
|
|
|
511
515
|
try {
|
|
512
516
|
contributions.iconThemes = this.readIconThemes(rawPlugin);
|
|
513
517
|
} catch (err) {
|
|
514
|
-
|
|
518
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'iconThemes'.`, rawPlugin.contributes.iconThemes, err);
|
|
515
519
|
}
|
|
516
520
|
|
|
517
521
|
try {
|
|
518
522
|
contributions.colors = this.readColors(rawPlugin);
|
|
519
523
|
} catch (err) {
|
|
520
|
-
|
|
524
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'colors'.`, rawPlugin.contributes.colors, err);
|
|
521
525
|
}
|
|
522
526
|
|
|
523
527
|
try {
|
|
524
528
|
contributions.terminalProfiles = this.readTerminals(rawPlugin);
|
|
525
529
|
} catch (err) {
|
|
526
|
-
|
|
530
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'terminals'.`, rawPlugin.contributes.terminal, err);
|
|
527
531
|
}
|
|
528
532
|
|
|
529
533
|
try {
|
|
530
534
|
contributions.localizations = this.readLocalizations(rawPlugin);
|
|
531
535
|
} catch (err) {
|
|
532
|
-
|
|
536
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'localizations'.`, rawPlugin.contributes.localizations, err);
|
|
533
537
|
}
|
|
534
538
|
|
|
535
539
|
const [languagesResult, grammarsResult] = await Promise.allSettled([
|
|
@@ -541,7 +545,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
541
545
|
if (languagesResult.status === 'fulfilled') {
|
|
542
546
|
contributions.languages = languagesResult.value;
|
|
543
547
|
} else {
|
|
544
|
-
|
|
548
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'languages'.`, rawPlugin.contributes.languages, languagesResult.reason);
|
|
545
549
|
}
|
|
546
550
|
}
|
|
547
551
|
|
|
@@ -549,7 +553,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
549
553
|
if (grammarsResult.status === 'fulfilled') {
|
|
550
554
|
contributions.grammars = grammarsResult.value;
|
|
551
555
|
} else {
|
|
552
|
-
|
|
556
|
+
this.logger.error(`Could not read '${rawPlugin.name}' contribution 'grammars'.`, rawPlugin.contributes.grammars, grammarsResult.reason);
|
|
553
557
|
}
|
|
554
558
|
}
|
|
555
559
|
|
|
@@ -624,20 +628,20 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
624
628
|
const result: ColorDefinition[] = [];
|
|
625
629
|
for (const contribution of pck.contributes.colors) {
|
|
626
630
|
if (typeof contribution.id !== 'string' || contribution.id.length === 0) {
|
|
627
|
-
|
|
631
|
+
this.logger.error("'configuration.colors.id' must be defined and can not be empty");
|
|
628
632
|
continue;
|
|
629
633
|
}
|
|
630
634
|
if (!contribution.id.match(colorIdPattern)) {
|
|
631
|
-
|
|
635
|
+
this.logger.error("'configuration.colors.id' must follow the word[.word]*");
|
|
632
636
|
continue;
|
|
633
637
|
}
|
|
634
638
|
if (typeof contribution.description !== 'string' || contribution.id.length === 0) {
|
|
635
|
-
|
|
639
|
+
this.logger.error("'configuration.colors.description' must be defined and can not be empty");
|
|
636
640
|
continue;
|
|
637
641
|
}
|
|
638
642
|
const defaults = contribution.defaults;
|
|
639
643
|
if (!defaults || typeof defaults !== 'object' || typeof defaults.light !== 'string' || typeof defaults.dark !== 'string' || typeof defaults.highContrast !== 'string') {
|
|
640
|
-
|
|
644
|
+
this.logger.error("'configuration.colors.defaults' must be defined and must contain 'light', 'dark' and 'highContrast'");
|
|
641
645
|
continue;
|
|
642
646
|
}
|
|
643
647
|
result.push({
|
|
@@ -679,11 +683,11 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
679
683
|
const result: IconThemeContribution[] = [];
|
|
680
684
|
for (const contribution of pck.contributes.iconThemes) {
|
|
681
685
|
if (typeof contribution.id !== 'string') {
|
|
682
|
-
|
|
686
|
+
this.logger.error('Expected string in `contributes.iconThemes.id`. Provided value:', contribution.id);
|
|
683
687
|
continue;
|
|
684
688
|
}
|
|
685
689
|
if (typeof contribution.path !== 'string') {
|
|
686
|
-
|
|
690
|
+
this.logger.error('Expected string in `contributes.iconThemes.path`. Provided value:', contribution.path);
|
|
687
691
|
continue;
|
|
688
692
|
}
|
|
689
693
|
result.push({
|
|
@@ -706,13 +710,13 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
706
710
|
for (const id in iconEntries) {
|
|
707
711
|
if (pck.contributes.icons.hasOwnProperty(id)) {
|
|
708
712
|
if (!id.match(iconIdPattern)) {
|
|
709
|
-
|
|
713
|
+
this.logger.error("'configuration.icons' keys represent the icon id and can only contain letter, digits and minuses. " +
|
|
710
714
|
'They need to consist of at least two segments in the form `component-iconname`.', 'extension: ', pck.name, 'icon id: ', id);
|
|
711
715
|
return;
|
|
712
716
|
}
|
|
713
717
|
const iconContribution = iconEntries[id];
|
|
714
718
|
if (typeof iconContribution.description !== 'string' || iconContribution.description['length'] === 0) {
|
|
715
|
-
|
|
719
|
+
this.logger.error('configuration.icons.description must be defined and can not be empty, ', 'extension: ', pck.name, 'icon id: ', id);
|
|
716
720
|
return;
|
|
717
721
|
}
|
|
718
722
|
|
|
@@ -727,7 +731,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
727
731
|
} else if (typeof defaultIcon === 'object' && typeof defaultIcon.fontPath === 'string' && typeof defaultIcon.fontCharacter === 'string') {
|
|
728
732
|
const format = getFileExtension(defaultIcon.fontPath);
|
|
729
733
|
if (['woff', 'woff2', 'ttf'].indexOf(format) === -1) {
|
|
730
|
-
|
|
734
|
+
this.logger.warn("Expected `contributes.icons.default.fontPath` to have file extension 'woff', woff2' or 'ttf', is '{0}'.", format);
|
|
731
735
|
return;
|
|
732
736
|
}
|
|
733
737
|
|
|
@@ -742,7 +746,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
742
746
|
}
|
|
743
747
|
});
|
|
744
748
|
} else {
|
|
745
|
-
|
|
749
|
+
this.logger.error("'configuration.icons.default' must be either a reference to the id of an other theme icon (string) or a icon definition (object) with ",
|
|
746
750
|
'properties `fontPath` and `fontCharacter`.');
|
|
747
751
|
}
|
|
748
752
|
}
|
|
@@ -777,7 +781,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
777
781
|
return content;
|
|
778
782
|
} catch (e) {
|
|
779
783
|
if (!isENOENT(e)) {
|
|
780
|
-
|
|
784
|
+
this.logger.error(e);
|
|
781
785
|
}
|
|
782
786
|
return '';
|
|
783
787
|
}
|
|
@@ -1018,7 +1022,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
1018
1022
|
return undefined;
|
|
1019
1023
|
}
|
|
1020
1024
|
if (!Array.isArray(source)) {
|
|
1021
|
-
|
|
1025
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`autoClosingPairs\` to be an array.`);
|
|
1022
1026
|
return undefined;
|
|
1023
1027
|
}
|
|
1024
1028
|
|
|
@@ -1027,27 +1031,27 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
1027
1031
|
const pair = source[i];
|
|
1028
1032
|
if (Array.isArray(pair)) {
|
|
1029
1033
|
if (!isCharacterPair(pair)) {
|
|
1030
|
-
|
|
1034
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`autoClosingPairs[${i}]\` to be an array of two strings or an object.`);
|
|
1031
1035
|
continue;
|
|
1032
1036
|
}
|
|
1033
1037
|
result = result || [];
|
|
1034
1038
|
result.push({ open: pair[0], close: pair[1] });
|
|
1035
1039
|
} else {
|
|
1036
1040
|
if (!isObject(pair)) {
|
|
1037
|
-
|
|
1041
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`autoClosingPairs[${i}]\` to be an array of two strings or an object.`);
|
|
1038
1042
|
continue;
|
|
1039
1043
|
}
|
|
1040
1044
|
if (typeof pair.open !== 'string') {
|
|
1041
|
-
|
|
1045
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`autoClosingPairs[${i}].open\` to be a string.`);
|
|
1042
1046
|
continue;
|
|
1043
1047
|
}
|
|
1044
1048
|
if (typeof pair.close !== 'string') {
|
|
1045
|
-
|
|
1049
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`autoClosingPairs[${i}].close\` to be a string.`);
|
|
1046
1050
|
continue;
|
|
1047
1051
|
}
|
|
1048
1052
|
if (typeof pair.notIn !== 'undefined') {
|
|
1049
1053
|
if (!isStringArray(pair.notIn)) {
|
|
1050
|
-
|
|
1054
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`autoClosingPairs[${i}].notIn\` to be a string array.`);
|
|
1051
1055
|
continue;
|
|
1052
1056
|
}
|
|
1053
1057
|
}
|
|
@@ -1064,7 +1068,7 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
1064
1068
|
return undefined;
|
|
1065
1069
|
}
|
|
1066
1070
|
if (!Array.isArray(source)) {
|
|
1067
|
-
|
|
1071
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`surroundingPairs\` to be an array.`);
|
|
1068
1072
|
return undefined;
|
|
1069
1073
|
}
|
|
1070
1074
|
|
|
@@ -1073,22 +1077,22 @@ export class TheiaPluginScanner extends AbstractPluginScanner {
|
|
|
1073
1077
|
const pair = source[i];
|
|
1074
1078
|
if (Array.isArray(pair)) {
|
|
1075
1079
|
if (!isCharacterPair(pair)) {
|
|
1076
|
-
|
|
1080
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`surroundingPairs[${i}]\` to be an array of two strings or an object.`);
|
|
1077
1081
|
continue;
|
|
1078
1082
|
}
|
|
1079
1083
|
result = result || [];
|
|
1080
1084
|
result.push({ open: pair[0], close: pair[1] });
|
|
1081
1085
|
} else {
|
|
1082
1086
|
if (!isObject(pair)) {
|
|
1083
|
-
|
|
1087
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`surroundingPairs[${i}]\` to be an array of two strings or an object.`);
|
|
1084
1088
|
continue;
|
|
1085
1089
|
}
|
|
1086
1090
|
if (typeof pair.open !== 'string') {
|
|
1087
|
-
|
|
1091
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`surroundingPairs[${i}].open\` to be a string.`);
|
|
1088
1092
|
continue;
|
|
1089
1093
|
}
|
|
1090
1094
|
if (typeof pair.close !== 'string') {
|
|
1091
|
-
|
|
1095
|
+
this.logger.warn(`[${langId}]: language configuration: expected \`surroundingPairs[${i}].close\` to be a string.`);
|
|
1092
1096
|
continue;
|
|
1093
1097
|
}
|
|
1094
1098
|
result = result || [];
|