@codingame/monaco-vscode-api 1.76.9 → 1.78.0-next.1
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/README.md +87 -49
- package/dist/Bibtex.tmLanguage.js +2 -0
- package/dist/Handlebars.tmLanguage.js +2 -0
- package/dist/JSON.tmLanguage.js +2 -0
- package/dist/JSONC.tmLanguage.js +2 -0
- package/dist/JavaScript.tmLanguage.js +2 -0
- package/dist/JavaScriptReact.tmLanguage.js +2 -0
- package/dist/LaTeX.tmLanguage.js +2 -0
- package/dist/MagicPython.tmLanguage.js +2 -0
- package/dist/MagicRegExp.tmLanguage.js +2 -0
- package/dist/Red-color-theme.js +2 -0
- package/dist/Regular Expressions (JavaScript).js +2 -0
- package/dist/TeX.tmLanguage.js +2 -0
- package/dist/TypeScript.tmLanguage.js +2 -0
- package/dist/TypeScriptReact.tmLanguage.js +2 -0
- package/dist/_.contribution.js +1 -1
- package/dist/abyss-color-theme.js +2 -0
- package/dist/api.js +1 -3
- package/dist/api2.js +421 -18091
- package/dist/asp-vb-net.tmlanguage.js +2 -0
- package/dist/assets/diffLineDeleted.mp3 +0 -0
- package/dist/assets/diffLineInserted.mp3 +0 -0
- package/dist/assets/diffLineModified.mp3 +0 -0
- package/dist/audioCue.js +108 -478
- package/dist/bat.js +9 -0
- package/dist/batchfile.js +2 -0
- package/dist/batchfile.tmLanguage.js +2 -0
- package/dist/button.js +35 -8
- package/dist/c.js +2 -0
- package/dist/c.tmLanguage.js +2 -0
- package/dist/clojure.js +8 -0
- package/dist/clojure.tmLanguage.js +2 -0
- package/dist/coffeescript.js +9 -0
- package/dist/coffeescript.tmLanguage.js +2 -0
- package/dist/coffeescript2.js +2 -0
- package/dist/configuration.d.ts +269 -4
- package/dist/configuration.js +4326 -328
- package/dist/configuration2.js +14 -324
- package/dist/cpp-grammar-bailout.tmLanguage.js +2 -0
- package/dist/cpp.embedded.macro.tmLanguage.js +2 -0
- package/dist/cpp.js +16 -0
- package/dist/cpp.tmLanguage.js +2 -0
- package/dist/cpp2.js +2 -0
- package/dist/csharp.js +9 -0
- package/dist/csharp.tmLanguage.js +2 -0
- package/dist/csharp2.js +2 -0
- package/dist/cshtml.tmLanguage.js +2 -0
- package/dist/css.js +8 -0
- package/dist/css.tmLanguage.js +2 -0
- package/dist/cuda-cpp.tmLanguage.js +2 -0
- package/dist/dark_plus.js +2 -0
- package/dist/dark_plus_experimental.js +2 -0
- package/dist/dark_vs.js +2 -0
- package/dist/dart.js +8 -0
- package/dist/dart.tmLanguage.js +2 -0
- package/dist/debug.js +12113 -12209
- package/dist/default-extensions/bat.js +12 -0
- package/dist/default-extensions/clojure.js +11 -0
- package/dist/default-extensions/coffeescript.js +12 -0
- package/dist/default-extensions/cpp.js +19 -0
- package/dist/default-extensions/csharp.js +12 -0
- package/dist/default-extensions/css.js +11 -0
- package/dist/default-extensions/dart.js +11 -0
- package/dist/default-extensions/diff.js +11 -0
- package/dist/default-extensions/docker.js +11 -0
- package/dist/default-extensions/fsharp.js +12 -0
- package/dist/default-extensions/go.js +11 -0
- package/dist/default-extensions/groovy.js +12 -0
- package/dist/default-extensions/handlebars.js +11 -0
- package/dist/default-extensions/hlsl.js +11 -0
- package/dist/default-extensions/html.js +13 -0
- package/dist/default-extensions/ini.js +13 -0
- package/dist/default-extensions/java.js +12 -0
- package/dist/default-extensions/javascript.js +17 -0
- package/dist/default-extensions/json.js +13 -0
- package/dist/default-extensions/julia.js +11 -0
- package/dist/default-extensions/latex.js +14 -0
- package/dist/default-extensions/less.js +11 -0
- package/dist/default-extensions/log.js +10 -0
- package/dist/default-extensions/lua.js +11 -0
- package/dist/default-extensions/make.js +11 -0
- package/dist/default-extensions/markdown-basics.js +12 -0
- package/dist/default-extensions/objective-c.js +13 -0
- package/dist/default-extensions/perl.js +13 -0
- package/dist/default-extensions/php.js +13 -0
- package/dist/default-extensions/powershell.js +11 -0
- package/dist/default-extensions/pug.js +11 -0
- package/dist/default-extensions/python.js +12 -0
- package/dist/default-extensions/r.js +11 -0
- package/dist/default-extensions/razor.js +11 -0
- package/dist/default-extensions/ruby.js +11 -0
- package/dist/default-extensions/rust.js +11 -0
- package/dist/default-extensions/scss.js +12 -0
- package/dist/default-extensions/shaderlab.js +11 -0
- package/dist/default-extensions/shellscript.js +11 -0
- package/dist/default-extensions/sql.js +11 -0
- package/dist/default-extensions/swift.js +12 -0
- package/dist/default-extensions/theme-abyss.js +10 -0
- package/dist/default-extensions/theme-defaults.js +18 -0
- package/dist/default-extensions/theme-kimbie-dark.js +10 -0
- package/dist/default-extensions/theme-monokai-dimmed.js +10 -0
- package/dist/default-extensions/theme-monokai.js +10 -0
- package/dist/default-extensions/theme-quietlight.js +10 -0
- package/dist/default-extensions/theme-red.js +10 -0
- package/dist/default-extensions/theme-seti.js +10 -0
- package/dist/default-extensions/theme-solarized-dark.js +10 -0
- package/dist/default-extensions/theme-solarized-light.js +10 -0
- package/dist/default-extensions/theme-tomorrow-night-blue.js +10 -0
- package/dist/default-extensions/typescript-basics.js +17 -0
- package/dist/default-extensions/vb.js +12 -0
- package/dist/default-extensions/xml.js +13 -0
- package/dist/default-extensions/yaml.js +13 -0
- package/dist/dialogs.js +11 -216
- package/dist/diff.js +8 -0
- package/dist/diff.tmLanguage.js +2 -0
- package/dist/dimmed-monokai-color-theme.js +2 -0
- package/dist/docker.js +8 -0
- package/dist/docker.tmLanguage.js +2 -0
- package/dist/dom.js +101 -0
- package/dist/extensionManagement.js +4 -0
- package/dist/extensions.d.ts +368 -23
- package/dist/extensions.js +4 -85
- package/dist/extensionsRegistry.js +63 -64
- package/dist/files.d.ts +845 -0
- package/dist/files.js +1805 -1151
- package/dist/files2.js +32 -0
- package/dist/fsharp.js +9 -0
- package/dist/fsharp.tmLanguage.js +2 -0
- package/dist/fsharp2.js +2 -0
- package/dist/go.js +8 -0
- package/dist/go.tmLanguage.js +2 -0
- package/dist/groovy.js +9 -0
- package/dist/groovy.tmLanguage.js +2 -0
- package/dist/groovy2.js +2 -0
- package/dist/handlebars.js +8 -0
- package/dist/hc_black.js +2 -0
- package/dist/hc_light.js +2 -0
- package/dist/hlsl.js +8 -0
- package/dist/hlsl.tmLanguage.js +2 -0
- package/dist/html-derivative.tmLanguage.js +2 -0
- package/dist/html.js +10 -0
- package/dist/html.tmLanguage.js +2 -0
- package/dist/html.tmLanguage2.js +2 -0
- package/dist/html2.js +2 -0
- package/dist/ini.js +10 -0
- package/dist/ini.language-configuration.js +2 -0
- package/dist/ini.tmLanguage.js +2 -0
- package/dist/injection.js +1 -1
- package/dist/java.js +9 -0
- package/dist/java.tmLanguage.js +2 -0
- package/dist/java2.js +2 -0
- package/dist/javascript-language-configuration.js +2 -0
- package/dist/javascript.js +14 -0
- package/dist/javascript2.js +2 -0
- package/dist/jsdoc.js.injection.tmLanguage.js +2 -0
- package/dist/jsdoc.ts.injection.tmLanguage.js +2 -0
- package/dist/json.js +10 -0
- package/dist/jsonErrorMessages.js +1 -1
- package/dist/julia.js +8 -0
- package/dist/julia.tmLanguage.js +2 -0
- package/dist/keybindings.d.ts +1 -10
- package/dist/keybindings.js +291 -353
- package/dist/kimbie-dark-color-theme.js +2 -0
- package/dist/language-configuration.js +2 -0
- package/dist/language-configuration10.js +2 -0
- package/dist/language-configuration11.js +2 -0
- package/dist/language-configuration12.js +2 -0
- package/dist/language-configuration13.js +2 -0
- package/dist/language-configuration14.js +2 -0
- package/dist/language-configuration15.js +2 -0
- package/dist/language-configuration16.js +2 -0
- package/dist/language-configuration17.js +2 -0
- package/dist/language-configuration18.js +2 -0
- package/dist/language-configuration19.js +2 -0
- package/dist/language-configuration2.js +2 -0
- package/dist/language-configuration20.js +2 -0
- package/dist/language-configuration21.js +2 -0
- package/dist/language-configuration22.js +2 -0
- package/dist/language-configuration23.js +2 -0
- package/dist/language-configuration24.js +2 -0
- package/dist/language-configuration25.js +2 -0
- package/dist/language-configuration26.js +2 -0
- package/dist/language-configuration27.js +2 -0
- package/dist/language-configuration28.js +2 -0
- package/dist/language-configuration29.js +2 -0
- package/dist/language-configuration3.js +2 -0
- package/dist/language-configuration30.js +2 -0
- package/dist/language-configuration31.js +2 -0
- package/dist/language-configuration32.js +2 -0
- package/dist/language-configuration33.js +2 -0
- package/dist/language-configuration34.js +2 -0
- package/dist/language-configuration35.js +2 -0
- package/dist/language-configuration36.js +2 -0
- package/dist/language-configuration37.js +2 -0
- package/dist/language-configuration38.js +2 -0
- package/dist/language-configuration39.js +2 -0
- package/dist/language-configuration4.js +2 -0
- package/dist/language-configuration5.js +2 -0
- package/dist/language-configuration6.js +2 -0
- package/dist/language-configuration7.js +2 -0
- package/dist/language-configuration8.js +2 -0
- package/dist/language-configuration9.js +2 -0
- package/dist/languageService.js +5 -6
- package/dist/languages.d.ts +66 -1
- package/dist/languages.js +924 -5
- package/dist/latex.js +11 -0
- package/dist/layout.contribution.darwin.js +1 -1
- package/dist/layout.contribution.linux.js +1 -1
- package/dist/layout.contribution.win.js +1 -1
- package/dist/less.js +8 -0
- package/dist/less.tmLanguage.js +2 -0
- package/dist/light_plus.js +2 -0
- package/dist/light_plus_experimental.js +2 -0
- package/dist/light_vs.js +2 -0
- package/dist/log.js +7 -0
- package/dist/log.tmLanguage.js +2 -0
- package/dist/lua.js +8 -0
- package/dist/lua.tmLanguage.js +2 -0
- package/dist/make.js +8 -0
- package/dist/make.tmLanguage.js +2 -0
- package/dist/markdown-basics.js +9 -0
- package/dist/markdown-latex-combined.tmLanguage.js +2 -0
- package/dist/markdown.js +2 -0
- package/dist/markdown.tmLanguage.js +2 -0
- package/dist/memento.js +91 -0
- package/dist/modelEditor.d.ts +1480 -138
- package/dist/modelEditor.js +8699 -326
- package/dist/monaco.d.ts +987 -15
- package/dist/monaco.js +40 -10
- package/dist/monokai-color-theme.js +2 -0
- package/dist/notifications.js +84 -64
- package/dist/objective-c.js +10 -0
- package/dist/objective-c.tmLanguage.js +2 -0
- package/dist/objective-c__.tmLanguage.js +2 -0
- package/dist/perl.js +10 -0
- package/dist/perl.language-configuration.js +2 -0
- package/dist/perl.tmLanguage.js +2 -0
- package/dist/perl6.language-configuration.js +2 -0
- package/dist/perl6.tmLanguage.js +2 -0
- package/dist/php.js +10 -0
- package/dist/php.tmLanguage.js +2 -0
- package/dist/php2.js +2 -0
- package/dist/platform.js +105 -0
- package/dist/platform.tmLanguage.js +2 -0
- package/dist/polyfill.js +52064 -11100
- package/dist/powershell.js +8 -0
- package/dist/powershell.tmLanguage.js +2 -0
- package/dist/preferences.js +2532 -0
- package/dist/properties.language-configuration.js +2 -0
- package/dist/pug.js +8 -0
- package/dist/pug.tmLanguage.js +2 -0
- package/dist/python.js +9 -0
- package/dist/quietlight-color-theme.js +2 -0
- package/dist/r.js +8 -0
- package/dist/r.tmLanguage.js +2 -0
- package/dist/razor.js +8 -0
- package/dist/rollup-vsix-plugin.d.ts +8 -0
- package/dist/rollup-vsix-plugin.js +104 -0
- package/dist/ruby.js +8 -0
- package/dist/ruby.tmLanguage.js +2 -0
- package/dist/rust.js +8 -0
- package/dist/rust.tmLanguage.js +2 -0
- package/dist/sassdoc.tmLanguage.js +2 -0
- package/dist/scss.js +9 -0
- package/dist/scss.tmLanguage.js +2 -0
- package/dist/services.d.ts +12988 -12840
- package/dist/services.js +1 -1
- package/dist/shaderlab.js +8 -0
- package/dist/shaderlab.tmLanguage.js +2 -0
- package/dist/shell-unix-bash.tmLanguage.js +2 -0
- package/dist/shellscript.js +8 -0
- package/dist/snippets.js +6 -11
- package/dist/snippetsService.js +7 -10
- package/dist/solarized-dark-color-theme.js +2 -0
- package/dist/solarized-light-color-theme.js +2 -0
- package/dist/sql.js +8 -0
- package/dist/sql.tmLanguage.js +2 -0
- package/dist/swift.js +9 -0
- package/dist/swift.tmLanguage.js +2 -0
- package/dist/swift2.js +2 -0
- package/dist/tags-language-configuration.js +2 -0
- package/dist/textmate.d.ts +0 -264
- package/dist/textmate.js +402 -66
- package/dist/theme-abyss.js +7 -0
- package/dist/theme-defaults.js +15 -0
- package/dist/theme-kimbie-dark.js +7 -0
- package/dist/theme-monokai-dimmed.js +7 -0
- package/dist/theme-monokai.js +7 -0
- package/dist/theme-quietlight.js +7 -0
- package/dist/theme-red.js +7 -0
- package/dist/theme-seti.js +7 -0
- package/dist/theme-solarized-dark.js +7 -0
- package/dist/theme-solarized-light.js +7 -0
- package/dist/theme-tomorrow-night-blue.js +7 -0
- package/dist/theme.js +5 -11
- package/dist/{contextkeys.js → theme2.js} +165 -143
- package/dist/tokenClassificationRegistry.js +46 -2
- package/dist/tomorrow-night-blue-color-theme.js +2 -0
- package/dist/typescript-basics.js +14 -0
- package/dist/typescript.js +2 -0
- package/dist/unboundCommands.js +41 -0
- package/dist/utils.js +345 -0
- package/dist/vb.js +9 -0
- package/dist/vb2.js +2 -0
- package/dist/vs-seti-icon-theme.js +2 -0
- package/dist/vs_minimal-icon-theme.js +2 -0
- package/dist/xml.js +10 -0
- package/dist/xml.language-configuration.js +2 -0
- package/dist/xml.tmLanguage.js +2 -0
- package/dist/xsl.language-configuration.js +2 -0
- package/dist/xsl.tmLanguage.js +2 -0
- package/dist/yaml.js +10 -0
- package/dist/yaml.tmLanguage.js +2 -0
- package/package.json +50 -33
- package/dist/async.js +0 -301
- package/dist/cancellation.js +0 -3
- package/dist/configurationRegistry.js +0 -441
- package/dist/extensionResourceLoader.js +0 -96
- package/dist/labels.js +0 -14
- package/dist/languageConfiguration.js +0 -919
- package/dist/layout.js +0 -47
- package/dist/layoutService.js +0 -4
- package/dist/missing-services.js +0 -5554
- package/dist/resources.js +0 -197
- package/dist/services2.js +0 -3467
- package/dist/textFileEditorModel.js +0 -2985
- package/dist/tokenClassification.d.ts +0 -7
- package/dist/tokenClassification.js +0 -277
- package/dist/variableResolver.js +0 -1711
- package/dist/workbenchThemeService.js +0 -46
- package/dist/workspaceContext.js +0 -50
- /package/dist/{languageConfiguration.d.ts → preferences.d.ts} +0 -0
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
import { E as Emitter } from './services2.js';
|
|
2
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
-
import { getLanguageTagSettingPlainKey } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
4
|
-
import { isString, isUndefinedOrNull, isUndefined } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
5
|
-
import { distinct } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
6
|
-
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
7
|
-
import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
8
|
-
var ConfigurationScope;
|
|
9
|
-
( (function(ConfigurationScope) {
|
|
10
|
-
ConfigurationScope[ConfigurationScope["APPLICATION"] = 1] = "APPLICATION";
|
|
11
|
-
ConfigurationScope[ConfigurationScope["MACHINE"] = 2] = "MACHINE";
|
|
12
|
-
ConfigurationScope[ConfigurationScope["WINDOW"] = 3] = "WINDOW";
|
|
13
|
-
ConfigurationScope[ConfigurationScope["RESOURCE"] = 4] = "RESOURCE";
|
|
14
|
-
ConfigurationScope[ConfigurationScope["LANGUAGE_OVERRIDABLE"] = 5] = "LANGUAGE_OVERRIDABLE";
|
|
15
|
-
ConfigurationScope[ConfigurationScope["MACHINE_OVERRIDABLE"] = 6] = "MACHINE_OVERRIDABLE";
|
|
16
|
-
})(ConfigurationScope || (ConfigurationScope = {})));
|
|
17
|
-
const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';
|
|
18
|
-
const configurationDefaultsSchemaId = 'vscode://schemas/settings/configurationDefaults';
|
|
19
|
-
const contributionRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
20
|
-
class ConfigurationRegistry {
|
|
21
|
-
constructor() {
|
|
22
|
-
this.overrideIdentifiers = ( new Set());
|
|
23
|
-
this._onDidSchemaChange = ( new Emitter());
|
|
24
|
-
this.onDidSchemaChange = this._onDidSchemaChange.event;
|
|
25
|
-
this._onDidUpdateConfiguration = ( new Emitter());
|
|
26
|
-
this.onDidUpdateConfiguration = this._onDidUpdateConfiguration.event;
|
|
27
|
-
this.configurationDefaultsOverrides = ( new Map());
|
|
28
|
-
this.defaultLanguageConfigurationOverridesNode = {
|
|
29
|
-
id: 'defaultOverrides',
|
|
30
|
-
title: ( localize(
|
|
31
|
-
'defaultLanguageConfigurationOverrides.title',
|
|
32
|
-
"Default Language Configuration Overrides"
|
|
33
|
-
)),
|
|
34
|
-
properties: {}
|
|
35
|
-
};
|
|
36
|
-
this.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];
|
|
37
|
-
this.resourceLanguageSettingsSchema = {
|
|
38
|
-
properties: {},
|
|
39
|
-
patternProperties: {},
|
|
40
|
-
additionalProperties: true,
|
|
41
|
-
allowTrailingCommas: true,
|
|
42
|
-
allowComments: true
|
|
43
|
-
};
|
|
44
|
-
this.configurationProperties = {};
|
|
45
|
-
this.policyConfigurations = ( new Map());
|
|
46
|
-
this.excludedConfigurationProperties = {};
|
|
47
|
-
contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
|
|
48
|
-
this.registerOverridePropertyPatternKey();
|
|
49
|
-
}
|
|
50
|
-
registerConfiguration(configuration, validate = true) {
|
|
51
|
-
this.registerConfigurations([configuration], validate);
|
|
52
|
-
}
|
|
53
|
-
registerConfigurations(configurations, validate = true) {
|
|
54
|
-
const properties = ( new Set());
|
|
55
|
-
this.doRegisterConfigurations(configurations, validate, properties);
|
|
56
|
-
contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
|
|
57
|
-
this._onDidSchemaChange.fire();
|
|
58
|
-
this._onDidUpdateConfiguration.fire({ properties });
|
|
59
|
-
}
|
|
60
|
-
deregisterConfigurations(configurations) {
|
|
61
|
-
const properties = ( new Set());
|
|
62
|
-
this.doDeregisterConfigurations(configurations, properties);
|
|
63
|
-
contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
|
|
64
|
-
this._onDidSchemaChange.fire();
|
|
65
|
-
this._onDidUpdateConfiguration.fire({ properties });
|
|
66
|
-
}
|
|
67
|
-
updateConfigurations({ add, remove }) {
|
|
68
|
-
const properties = ( new Set());
|
|
69
|
-
this.doDeregisterConfigurations(remove, properties);
|
|
70
|
-
this.doRegisterConfigurations(add, false, properties);
|
|
71
|
-
contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
|
|
72
|
-
this._onDidSchemaChange.fire();
|
|
73
|
-
this._onDidUpdateConfiguration.fire({ properties });
|
|
74
|
-
}
|
|
75
|
-
registerDefaultConfigurations(configurationDefaults) {
|
|
76
|
-
const properties = ( new Set());
|
|
77
|
-
this.doRegisterDefaultConfigurations(configurationDefaults, properties);
|
|
78
|
-
this._onDidSchemaChange.fire();
|
|
79
|
-
this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });
|
|
80
|
-
}
|
|
81
|
-
doRegisterDefaultConfigurations(configurationDefaults, bucket) {
|
|
82
|
-
const overrideIdentifiers = [];
|
|
83
|
-
for (const { overrides, source } of configurationDefaults) {
|
|
84
|
-
for (const key in overrides) {
|
|
85
|
-
bucket.add(key);
|
|
86
|
-
if (OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
87
|
-
const configurationDefaultOverride = this.configurationDefaultsOverrides.get(key);
|
|
88
|
-
const valuesSources = configurationDefaultOverride?.valuesSources ?? ( new Map());
|
|
89
|
-
if (source) {
|
|
90
|
-
for (const configuration of ( Object.keys(overrides[key]))) {
|
|
91
|
-
valuesSources.set(configuration, source);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
const defaultValue = { ...(configurationDefaultOverride?.value || {}), ...overrides[key] };
|
|
95
|
-
this.configurationDefaultsOverrides.set(key, { source, value: defaultValue, valuesSources });
|
|
96
|
-
const plainKey = getLanguageTagSettingPlainKey(key);
|
|
97
|
-
const property = {
|
|
98
|
-
type: 'object',
|
|
99
|
-
default: defaultValue,
|
|
100
|
-
description: ( localize(
|
|
101
|
-
'defaultLanguageConfiguration.description',
|
|
102
|
-
"Configure settings to be overridden for the {0} language.",
|
|
103
|
-
plainKey
|
|
104
|
-
)),
|
|
105
|
-
$ref: resourceLanguageSettingsSchemaId,
|
|
106
|
-
defaultDefaultValue: defaultValue,
|
|
107
|
-
source: isString(source) ? undefined : source,
|
|
108
|
-
defaultValueSource: source
|
|
109
|
-
};
|
|
110
|
-
overrideIdentifiers.push(...overrideIdentifiersFromKey(key));
|
|
111
|
-
this.configurationProperties[key] = property;
|
|
112
|
-
this.defaultLanguageConfigurationOverridesNode.properties[key] = property;
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
this.configurationDefaultsOverrides.set(key, { value: overrides[key], source });
|
|
116
|
-
const property = this.configurationProperties[key];
|
|
117
|
-
if (property) {
|
|
118
|
-
this.updatePropertyDefaultValue(key, property);
|
|
119
|
-
this.updateSchema(key, property);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
this.doRegisterOverrideIdentifiers(overrideIdentifiers);
|
|
125
|
-
}
|
|
126
|
-
deregisterDefaultConfigurations(defaultConfigurations) {
|
|
127
|
-
const properties = ( new Set());
|
|
128
|
-
this.doDeregisterDefaultConfigurations(defaultConfigurations, properties);
|
|
129
|
-
this._onDidSchemaChange.fire();
|
|
130
|
-
this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });
|
|
131
|
-
}
|
|
132
|
-
doDeregisterDefaultConfigurations(defaultConfigurations, bucket) {
|
|
133
|
-
for (const { overrides, source } of defaultConfigurations) {
|
|
134
|
-
for (const key in overrides) {
|
|
135
|
-
const configurationDefaultsOverride = this.configurationDefaultsOverrides.get(key);
|
|
136
|
-
const id = isString(source) ? source : source?.id;
|
|
137
|
-
const configurationDefaultsOverrideSourceId = isString(configurationDefaultsOverride?.source) ? configurationDefaultsOverride?.source : configurationDefaultsOverride?.source?.id;
|
|
138
|
-
if (id !== configurationDefaultsOverrideSourceId) {
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
bucket.add(key);
|
|
142
|
-
this.configurationDefaultsOverrides.delete(key);
|
|
143
|
-
if (OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
144
|
-
delete this.configurationProperties[key];
|
|
145
|
-
delete this.defaultLanguageConfigurationOverridesNode.properties[key];
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
const property = this.configurationProperties[key];
|
|
149
|
-
if (property) {
|
|
150
|
-
this.updatePropertyDefaultValue(key, property);
|
|
151
|
-
this.updateSchema(key, property);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
this.updateOverridePropertyPatternKey();
|
|
157
|
-
}
|
|
158
|
-
deltaConfiguration(delta) {
|
|
159
|
-
let defaultsOverrides = false;
|
|
160
|
-
const properties = ( new Set());
|
|
161
|
-
if (delta.removedDefaults) {
|
|
162
|
-
this.doDeregisterDefaultConfigurations(delta.removedDefaults, properties);
|
|
163
|
-
defaultsOverrides = true;
|
|
164
|
-
}
|
|
165
|
-
if (delta.addedDefaults) {
|
|
166
|
-
this.doRegisterDefaultConfigurations(delta.addedDefaults, properties);
|
|
167
|
-
defaultsOverrides = true;
|
|
168
|
-
}
|
|
169
|
-
if (delta.removedConfigurations) {
|
|
170
|
-
this.doDeregisterConfigurations(delta.removedConfigurations, properties);
|
|
171
|
-
}
|
|
172
|
-
if (delta.addedConfigurations) {
|
|
173
|
-
this.doRegisterConfigurations(delta.addedConfigurations, false, properties);
|
|
174
|
-
}
|
|
175
|
-
this._onDidSchemaChange.fire();
|
|
176
|
-
this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides });
|
|
177
|
-
}
|
|
178
|
-
notifyConfigurationSchemaUpdated(...configurations) {
|
|
179
|
-
this._onDidSchemaChange.fire();
|
|
180
|
-
}
|
|
181
|
-
registerOverrideIdentifiers(overrideIdentifiers) {
|
|
182
|
-
this.doRegisterOverrideIdentifiers(overrideIdentifiers);
|
|
183
|
-
this._onDidSchemaChange.fire();
|
|
184
|
-
}
|
|
185
|
-
doRegisterOverrideIdentifiers(overrideIdentifiers) {
|
|
186
|
-
for (const overrideIdentifier of overrideIdentifiers) {
|
|
187
|
-
this.overrideIdentifiers.add(overrideIdentifier);
|
|
188
|
-
}
|
|
189
|
-
this.updateOverridePropertyPatternKey();
|
|
190
|
-
}
|
|
191
|
-
doRegisterConfigurations(configurations, validate, bucket) {
|
|
192
|
-
configurations.forEach(configuration => {
|
|
193
|
-
this.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);
|
|
194
|
-
this.configurationContributors.push(configuration);
|
|
195
|
-
this.registerJSONConfiguration(configuration);
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
doDeregisterConfigurations(configurations, bucket) {
|
|
199
|
-
const deregisterConfiguration = (configuration) => {
|
|
200
|
-
if (configuration.properties) {
|
|
201
|
-
for (const key in configuration.properties) {
|
|
202
|
-
bucket.add(key);
|
|
203
|
-
const property = this.configurationProperties[key];
|
|
204
|
-
if (property?.policy?.name) {
|
|
205
|
-
this.policyConfigurations.delete(property.policy.name);
|
|
206
|
-
}
|
|
207
|
-
delete this.configurationProperties[key];
|
|
208
|
-
this.removeFromSchema(key, configuration.properties[key]);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
configuration.allOf?.forEach(node => deregisterConfiguration(node));
|
|
212
|
-
};
|
|
213
|
-
for (const configuration of configurations) {
|
|
214
|
-
deregisterConfiguration(configuration);
|
|
215
|
-
const index = this.configurationContributors.indexOf(configuration);
|
|
216
|
-
if (index !== -1) {
|
|
217
|
-
this.configurationContributors.splice(index, 1);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
validateAndRegisterProperties(configuration, validate = true, extensionInfo, restrictedProperties, scope = 3 , bucket) {
|
|
222
|
-
scope = isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;
|
|
223
|
-
const properties = configuration.properties;
|
|
224
|
-
if (properties) {
|
|
225
|
-
for (const key in properties) {
|
|
226
|
-
const property = properties[key];
|
|
227
|
-
if (validate && validateProperty(key, property)) {
|
|
228
|
-
delete properties[key];
|
|
229
|
-
continue;
|
|
230
|
-
}
|
|
231
|
-
property.source = extensionInfo;
|
|
232
|
-
property.defaultDefaultValue = properties[key].default;
|
|
233
|
-
this.updatePropertyDefaultValue(key, property);
|
|
234
|
-
if (OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
235
|
-
property.scope = undefined;
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
property.scope = isUndefinedOrNull(property.scope) ? scope : property.scope;
|
|
239
|
-
property.restricted = isUndefinedOrNull(property.restricted) ? !!restrictedProperties?.includes(key) : property.restricted;
|
|
240
|
-
}
|
|
241
|
-
if (properties[key].hasOwnProperty('included') && !properties[key].included) {
|
|
242
|
-
this.excludedConfigurationProperties[key] = properties[key];
|
|
243
|
-
delete properties[key];
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
this.configurationProperties[key] = properties[key];
|
|
248
|
-
if (properties[key].policy?.name) {
|
|
249
|
-
this.policyConfigurations.set(properties[key].policy.name, key);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
if (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {
|
|
253
|
-
properties[key].deprecationMessage = properties[key].markdownDeprecationMessage;
|
|
254
|
-
}
|
|
255
|
-
bucket.add(key);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
const subNodes = configuration.allOf;
|
|
259
|
-
if (subNodes) {
|
|
260
|
-
for (const node of subNodes) {
|
|
261
|
-
this.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
getConfigurations() {
|
|
266
|
-
return this.configurationContributors;
|
|
267
|
-
}
|
|
268
|
-
getConfigurationProperties() {
|
|
269
|
-
return this.configurationProperties;
|
|
270
|
-
}
|
|
271
|
-
getPolicyConfigurations() {
|
|
272
|
-
return this.policyConfigurations;
|
|
273
|
-
}
|
|
274
|
-
getExcludedConfigurationProperties() {
|
|
275
|
-
return this.excludedConfigurationProperties;
|
|
276
|
-
}
|
|
277
|
-
getConfigurationDefaultsOverrides() {
|
|
278
|
-
return this.configurationDefaultsOverrides;
|
|
279
|
-
}
|
|
280
|
-
registerJSONConfiguration(configuration) {
|
|
281
|
-
const register = (configuration) => {
|
|
282
|
-
const properties = configuration.properties;
|
|
283
|
-
if (properties) {
|
|
284
|
-
for (const key in properties) {
|
|
285
|
-
this.updateSchema(key, properties[key]);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
const subNodes = configuration.allOf;
|
|
289
|
-
subNodes?.forEach(register);
|
|
290
|
-
};
|
|
291
|
-
register(configuration);
|
|
292
|
-
}
|
|
293
|
-
updateSchema(key, property) {
|
|
294
|
-
switch (property.scope) {
|
|
295
|
-
case 1 :
|
|
296
|
-
break;
|
|
297
|
-
case 2 :
|
|
298
|
-
break;
|
|
299
|
-
case 6 :
|
|
300
|
-
break;
|
|
301
|
-
case 3 :
|
|
302
|
-
break;
|
|
303
|
-
case 4 :
|
|
304
|
-
break;
|
|
305
|
-
case 5 :
|
|
306
|
-
this.resourceLanguageSettingsSchema.properties[key] = property;
|
|
307
|
-
break;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
removeFromSchema(key, property) {
|
|
311
|
-
switch (property.scope) {
|
|
312
|
-
case 1 :
|
|
313
|
-
break;
|
|
314
|
-
case 2 :
|
|
315
|
-
break;
|
|
316
|
-
case 6 :
|
|
317
|
-
break;
|
|
318
|
-
case 3 :
|
|
319
|
-
break;
|
|
320
|
-
case 4 :
|
|
321
|
-
case 5 :
|
|
322
|
-
delete this.resourceLanguageSettingsSchema.properties[key];
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
updateOverridePropertyPatternKey() {
|
|
327
|
-
for (const overrideIdentifier of ( this.overrideIdentifiers.values())) {
|
|
328
|
-
const overrideIdentifierProperty = `[${overrideIdentifier}]`;
|
|
329
|
-
const resourceLanguagePropertiesSchema = {
|
|
330
|
-
type: 'object',
|
|
331
|
-
description: ( localize(
|
|
332
|
-
'overrideSettings.defaultDescription',
|
|
333
|
-
"Configure editor settings to be overridden for a language."
|
|
334
|
-
)),
|
|
335
|
-
errorMessage: ( localize(
|
|
336
|
-
'overrideSettings.errorMessage',
|
|
337
|
-
"This setting does not support per-language configuration."
|
|
338
|
-
)),
|
|
339
|
-
$ref: resourceLanguageSettingsSchemaId,
|
|
340
|
-
};
|
|
341
|
-
this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
registerOverridePropertyPatternKey() {
|
|
345
|
-
this._onDidSchemaChange.fire();
|
|
346
|
-
}
|
|
347
|
-
updatePropertyDefaultValue(key, property) {
|
|
348
|
-
const configurationdefaultOverride = this.configurationDefaultsOverrides.get(key);
|
|
349
|
-
let defaultValue = configurationdefaultOverride?.value;
|
|
350
|
-
let defaultSource = configurationdefaultOverride?.source;
|
|
351
|
-
if (isUndefined(defaultValue)) {
|
|
352
|
-
defaultValue = property.defaultDefaultValue;
|
|
353
|
-
defaultSource = undefined;
|
|
354
|
-
}
|
|
355
|
-
if (isUndefined(defaultValue)) {
|
|
356
|
-
defaultValue = getDefaultValue(property.type);
|
|
357
|
-
}
|
|
358
|
-
property.default = defaultValue;
|
|
359
|
-
property.defaultValueSource = defaultSource;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
const OVERRIDE_IDENTIFIER_PATTERN = `\\[([^\\]]+)\\]`;
|
|
363
|
-
const OVERRIDE_IDENTIFIER_REGEX = ( new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g'));
|
|
364
|
-
const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;
|
|
365
|
-
const OVERRIDE_PROPERTY_REGEX = ( new RegExp(OVERRIDE_PROPERTY_PATTERN));
|
|
366
|
-
function overrideIdentifiersFromKey(key) {
|
|
367
|
-
const identifiers = [];
|
|
368
|
-
if (OVERRIDE_PROPERTY_REGEX.test(key)) {
|
|
369
|
-
let matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);
|
|
370
|
-
while (matches?.length) {
|
|
371
|
-
const identifier = matches[1].trim();
|
|
372
|
-
if (identifier) {
|
|
373
|
-
identifiers.push(identifier);
|
|
374
|
-
}
|
|
375
|
-
matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
return distinct(identifiers);
|
|
379
|
-
}
|
|
380
|
-
function keyFromOverrideIdentifiers(overrideIdentifiers) {
|
|
381
|
-
return overrideIdentifiers.reduce((result, overrideIdentifier) => `${result}[${overrideIdentifier}]`, '');
|
|
382
|
-
}
|
|
383
|
-
function getDefaultValue(type) {
|
|
384
|
-
const t = Array.isArray(type) ? type[0] : type;
|
|
385
|
-
switch (t) {
|
|
386
|
-
case 'boolean':
|
|
387
|
-
return false;
|
|
388
|
-
case 'integer':
|
|
389
|
-
case 'number':
|
|
390
|
-
return 0;
|
|
391
|
-
case 'string':
|
|
392
|
-
return '';
|
|
393
|
-
case 'array':
|
|
394
|
-
return [];
|
|
395
|
-
case 'object':
|
|
396
|
-
return {};
|
|
397
|
-
default:
|
|
398
|
-
return null;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
const configurationRegistry = ( new ConfigurationRegistry());
|
|
402
|
-
function validateProperty(property, schema) {
|
|
403
|
-
if (!property.trim()) {
|
|
404
|
-
return ( localize('config.property.empty', "Cannot register an empty property"));
|
|
405
|
-
}
|
|
406
|
-
if (OVERRIDE_PROPERTY_REGEX.test(property)) {
|
|
407
|
-
return ( localize(
|
|
408
|
-
'config.property.languageDefault',
|
|
409
|
-
"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",
|
|
410
|
-
property
|
|
411
|
-
));
|
|
412
|
-
}
|
|
413
|
-
if (configurationRegistry.getConfigurationProperties()[property] !== undefined) {
|
|
414
|
-
return ( localize(
|
|
415
|
-
'config.property.duplicate',
|
|
416
|
-
"Cannot register '{0}'. This property is already registered.",
|
|
417
|
-
property
|
|
418
|
-
));
|
|
419
|
-
}
|
|
420
|
-
if (schema.policy?.name && configurationRegistry.getPolicyConfigurations().get(schema.policy?.name) !== undefined) {
|
|
421
|
-
return ( localize(
|
|
422
|
-
'config.policy.duplicate',
|
|
423
|
-
"Cannot register '{0}'. The associated policy {1} is already registered with {2}.",
|
|
424
|
-
property,
|
|
425
|
-
schema.policy?.name,
|
|
426
|
-
configurationRegistry.getPolicyConfigurations().get(schema.policy?.name)
|
|
427
|
-
));
|
|
428
|
-
}
|
|
429
|
-
return null;
|
|
430
|
-
}
|
|
431
|
-
function getScopes() {
|
|
432
|
-
const scopes = [];
|
|
433
|
-
const configurationProperties = configurationRegistry.getConfigurationProperties();
|
|
434
|
-
for (const key of ( Object.keys(configurationProperties))) {
|
|
435
|
-
scopes.push([key, configurationProperties[key].scope]);
|
|
436
|
-
}
|
|
437
|
-
scopes.push(['launch', 4 ]);
|
|
438
|
-
scopes.push(['task', 4 ]);
|
|
439
|
-
return scopes;
|
|
440
|
-
}
|
|
441
|
-
export { ConfigurationScope as C, configurationDefaultsSchemaId as c, getScopes as g, keyFromOverrideIdentifiers as k };
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
|
|
2
|
-
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
3
|
-
import { cq as getRemoteServerRootPath, h as format2, s as supportsTelemetry, cr as getTelemetryLevel } from './missing-services.js';
|
|
4
|
-
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
5
|
-
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
6
|
-
import { RemoteAuthorities } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
7
|
-
import { isWeb } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
8
|
-
const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9
|
-
function isUUID(value) {
|
|
10
|
-
return _UUIDPattern.test(value);
|
|
11
|
-
}
|
|
12
|
-
async function getServiceMachineId(environmentService, fileService, storageService) {
|
|
13
|
-
let uuid = storageService ? storageService.get('storage.serviceMachineId', -1 ) || null : null;
|
|
14
|
-
if (uuid) {
|
|
15
|
-
return uuid;
|
|
16
|
-
}
|
|
17
|
-
try {
|
|
18
|
-
const contents = await fileService.readFile(environmentService.serviceMachineIdResource);
|
|
19
|
-
const value = ( contents.value.toString());
|
|
20
|
-
uuid = isUUID(value) ? value : null;
|
|
21
|
-
}
|
|
22
|
-
catch (e) {
|
|
23
|
-
uuid = null;
|
|
24
|
-
}
|
|
25
|
-
if (!uuid) {
|
|
26
|
-
uuid = generateUuid();
|
|
27
|
-
try {
|
|
28
|
-
await fileService.writeFile(environmentService.serviceMachineIdResource, VSBuffer.fromString(uuid));
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
storageService?.store('storage.serviceMachineId', uuid, -1 , 1 );
|
|
34
|
-
return uuid;
|
|
35
|
-
}
|
|
36
|
-
const WEB_EXTENSION_RESOURCE_END_POINT = 'web-extension-resource';
|
|
37
|
-
const IExtensionResourceLoaderService = ( createDecorator('extensionResourceLoaderService'));
|
|
38
|
-
class AbstractExtensionResourceLoaderService {
|
|
39
|
-
constructor(_fileService, _storageService, _productService, _environmentService, _configurationService) {
|
|
40
|
-
this._fileService = _fileService;
|
|
41
|
-
this._storageService = _storageService;
|
|
42
|
-
this._productService = _productService;
|
|
43
|
-
this._environmentService = _environmentService;
|
|
44
|
-
this._configurationService = _configurationService;
|
|
45
|
-
this._webExtensionResourceEndPoint = `${getRemoteServerRootPath(_productService)}/${WEB_EXTENSION_RESOURCE_END_POINT}/`;
|
|
46
|
-
if (_productService.extensionsGallery) {
|
|
47
|
-
this._extensionGalleryResourceUrlTemplate = _productService.extensionsGallery.resourceUrlTemplate;
|
|
48
|
-
this._extensionGalleryAuthority = this._extensionGalleryResourceUrlTemplate ? this._getExtensionGalleryAuthority(( URI.parse(this._extensionGalleryResourceUrlTemplate))) : undefined;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
get supportsExtensionGalleryResources() {
|
|
52
|
-
return this._extensionGalleryResourceUrlTemplate !== undefined;
|
|
53
|
-
}
|
|
54
|
-
getExtensionGalleryResourceURL(galleryExtension, path) {
|
|
55
|
-
if (this._extensionGalleryResourceUrlTemplate) {
|
|
56
|
-
const uri = ( URI.parse(
|
|
57
|
-
format2(this._extensionGalleryResourceUrlTemplate, { publisher: galleryExtension.publisher, name: galleryExtension.name, version: galleryExtension.version, path: 'extension' })
|
|
58
|
-
));
|
|
59
|
-
return this._isWebExtensionResourceEndPoint(uri) ? uri.with({ scheme: RemoteAuthorities.getPreferredWebSchema() }) : uri;
|
|
60
|
-
}
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
isExtensionGalleryResource(uri) {
|
|
64
|
-
return this._extensionGalleryAuthority && this._extensionGalleryAuthority === this._getExtensionGalleryAuthority(uri);
|
|
65
|
-
}
|
|
66
|
-
async getExtensionGalleryRequestHeaders() {
|
|
67
|
-
const headers = {
|
|
68
|
-
'X-Client-Name': `${this._productService.applicationName}${isWeb ? '-web' : ''}`,
|
|
69
|
-
'X-Client-Version': this._productService.version
|
|
70
|
-
};
|
|
71
|
-
if (supportsTelemetry(this._productService, this._environmentService) && getTelemetryLevel(this._configurationService) === 3 ) {
|
|
72
|
-
headers['X-Machine-Id'] = await this._getServiceMachineId();
|
|
73
|
-
}
|
|
74
|
-
if (this._productService.commit) {
|
|
75
|
-
headers['X-Client-Commit'] = this._productService.commit;
|
|
76
|
-
}
|
|
77
|
-
return headers;
|
|
78
|
-
}
|
|
79
|
-
_getServiceMachineId() {
|
|
80
|
-
if (!this._serviceMachineIdPromise) {
|
|
81
|
-
this._serviceMachineIdPromise = getServiceMachineId(this._environmentService, this._fileService, this._storageService);
|
|
82
|
-
}
|
|
83
|
-
return this._serviceMachineIdPromise;
|
|
84
|
-
}
|
|
85
|
-
_getExtensionGalleryAuthority(uri) {
|
|
86
|
-
if (this._isWebExtensionResourceEndPoint(uri)) {
|
|
87
|
-
return uri.authority;
|
|
88
|
-
}
|
|
89
|
-
const index = uri.authority.indexOf('.');
|
|
90
|
-
return index !== -1 ? uri.authority.substring(index + 1) : undefined;
|
|
91
|
-
}
|
|
92
|
-
_isWebExtensionResourceEndPoint(uri) {
|
|
93
|
-
return uri.path.startsWith(this._webExtensionResourceEndPoint);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
export { AbstractExtensionResourceLoaderService as A, IExtensionResourceLoaderService as I };
|
package/dist/labels.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { isMacintosh, isWindows } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
2
|
-
function untildify(path, userHome) {
|
|
3
|
-
return path.replace(/^~($|\/|\\)/, `${userHome}$1`);
|
|
4
|
-
}
|
|
5
|
-
function mnemonicButtonLabel(label, forceDisableMnemonics) {
|
|
6
|
-
if (isMacintosh || forceDisableMnemonics) {
|
|
7
|
-
return label.replace(/\(&&\w\)|&&/g, '');
|
|
8
|
-
}
|
|
9
|
-
if (isWindows) {
|
|
10
|
-
return label.replace(/&&|&/g, m => m === '&' ? '&&' : '&');
|
|
11
|
-
}
|
|
12
|
-
return label.replace(/&&/g, '_');
|
|
13
|
-
}
|
|
14
|
-
export { mnemonicButtonLabel as m, untildify as u };
|