Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/contrib/extensions/common/extensionsFileTemplate.ts
3296 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { localize } from '../../../../nls.js';
7
import { IJSONSchema } from '../../../../base/common/jsonSchema.js';
8
import { EXTENSION_IDENTIFIER_PATTERN } from '../../../../platform/extensionManagement/common/extensionManagement.js';
9
10
export const ExtensionsConfigurationSchemaId = 'vscode://schemas/extensions';
11
export const ExtensionsConfigurationSchema: IJSONSchema = {
12
id: ExtensionsConfigurationSchemaId,
13
allowComments: true,
14
allowTrailingCommas: true,
15
type: 'object',
16
title: localize('app.extensions.json.title', "Extensions"),
17
additionalProperties: false,
18
properties: {
19
recommendations: {
20
type: 'array',
21
description: localize('app.extensions.json.recommendations', "List of extensions which should be recommended for users of this workspace. The identifier of an extension is always '${publisher}.${name}'. For example: 'vscode.csharp'."),
22
items: {
23
type: 'string',
24
pattern: EXTENSION_IDENTIFIER_PATTERN,
25
errorMessage: localize('app.extension.identifier.errorMessage', "Expected format '${publisher}.${name}'. Example: 'vscode.csharp'.")
26
},
27
},
28
unwantedRecommendations: {
29
type: 'array',
30
description: localize('app.extensions.json.unwantedRecommendations', "List of extensions recommended by VS Code that should not be recommended for users of this workspace. The identifier of an extension is always '${publisher}.${name}'. For example: 'vscode.csharp'."),
31
items: {
32
type: 'string',
33
pattern: EXTENSION_IDENTIFIER_PATTERN,
34
errorMessage: localize('app.extension.identifier.errorMessage', "Expected format '${publisher}.${name}'. Example: 'vscode.csharp'.")
35
},
36
},
37
}
38
};
39
40
export const ExtensionsConfigurationInitialContent: string = [
41
'{',
42
'\t// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.',
43
'\t// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp',
44
'',
45
'\t// List of extensions which should be recommended for users of this workspace.',
46
'\t"recommendations": [',
47
'\t\t',
48
'\t],',
49
'\t// List of extensions recommended by VS Code that should not be recommended for users of this workspace.',
50
'\t"unwantedRecommendations": [',
51
'\t\t',
52
'\t]',
53
'}'
54
].join('\n');
55
56