@codingame/monaco-vscode-api 1.69.19 → 1.69.21
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 +4 -4
- package/dist/api.js +2 -2
- package/dist/async.js +196 -0
- package/dist/configuration.d.ts +3 -2
- package/dist/configuration.js +338 -7
- package/dist/dialogs.js +1 -1
- package/dist/extHost.js +8 -28
- package/dist/files.js +113 -4
- package/dist/keybindings.js +7 -7
- package/dist/languageConfiguration.js +3 -3
- package/dist/languageService.js +3 -2
- package/dist/languages.js +3 -3
- package/dist/layout.js +1 -1
- package/dist/missing-services.js +9 -1469
- package/dist/modelEditor.js +2 -2
- package/dist/monaco.js +2 -2
- package/dist/notifications.js +4 -3
- package/dist/polyfill.js +99 -2
- package/dist/services.js +2 -2
- package/dist/services2.js +7 -9
- package/dist/snippets.js +7 -7
- package/dist/textmate.js +3 -3
- package/dist/theme.js +6 -5
- package/dist/tokenClassification.js +3 -3
- package/dist/tokenClassificationRegistry.js +1 -1
- package/dist/tools.js +822 -4
- package/dist/types.js +1 -1
- package/dist/workbenchThemeService.js +1 -1
- package/dist/workspace.js +1 -98
- package/package.json +10 -10
package/dist/missing-services.js
CHANGED
|
@@ -1,320 +1,27 @@
|
|
|
1
1
|
import { E as Emitter, _ as __decorate, a as __param } from './workspace.js';
|
|
2
|
-
import {
|
|
2
|
+
import { R as PROFILES_ENABLEMENT_CONFIG, b as IEditorService, f as IPaneCompositePartService, k as IUriIdentityService, j as ITextFileService, c as IFileService, I as IEditorGroupsService, l as IWorkbenchEnvironmentService, m as IWorkingCopyFileService, g as IPathService, S as Services, h as IProductService, e as ILanguageStatusService, d as IHostService, r as IUserDataProfilesService, i as ISnippetsService, s as refineServiceDecorator } from './services2.js';
|
|
3
3
|
import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
4
|
-
import { compare } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
5
4
|
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
6
|
-
import { ExtensionIdentifier } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
|
|
7
5
|
import { USLayoutResolvedKeybinding } from 'monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js';
|
|
8
6
|
import { SimpleKeybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
|
|
9
|
-
import { p as parseTree, f as findNodeAtLocation, c as createScanner } from './polyfill.js';
|
|
10
|
-
import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
|
|
11
|
-
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
12
|
-
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
13
|
-
import { Lazy } from 'monaco-editor/esm/vs/base/common/lazy.js';
|
|
14
|
-
import { LRUCachedFunction } from 'monaco-editor/esm/vs/base/common/cache.js';
|
|
15
|
-
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
16
|
-
import { Promises } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
17
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
18
|
-
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
19
7
|
import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
|
|
20
|
-
import {
|
|
21
|
-
import { OS } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
22
|
-
import { ExtUri, extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
23
|
-
import { onUnexpectedError, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
24
|
-
import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
25
|
-
import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
|
|
26
|
-
import { registerIcon } from 'monaco-editor/esm/vs/platform/theme/common/iconRegistry.js';
|
|
27
|
-
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
8
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
28
9
|
import { addMatchMediaChangeListener } from 'monaco-editor/esm/vs/base/browser/browser.js';
|
|
10
|
+
import { ContextKeyExpr, ContextKeyDefinedExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
|
|
29
11
|
import { ProductQualityContext } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js';
|
|
12
|
+
import { Promises } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
30
13
|
import { registerSingleton } from 'monaco-editor/esm/vs/platform/instantiation/common/extensions.js';
|
|
31
14
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
32
15
|
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
16
|
+
import { ExtUri } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
33
17
|
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
18
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
34
19
|
import { IProgressService } from 'monaco-editor/esm/vs/platform/progress/common/progress.js';
|
|
35
20
|
import { LanguageFeatureRegistry } from 'monaco-editor/esm/vs/editor/common/languageFeatureRegistry.js';
|
|
21
|
+
import { compare } from 'monaco-editor/esm/vs/base/common/strings.js';
|
|
36
22
|
import { trackFocus } from 'monaco-editor/esm/vs/base/browser/dom.js';
|
|
37
23
|
import { DomEmitter } from 'monaco-editor/esm/vs/base/browser/event.js';
|
|
38
|
-
|
|
39
|
-
const _format2Regexp = /{([^}]+)}/g;
|
|
40
|
-
function format2(template, values) {
|
|
41
|
-
return template.replace(_format2Regexp, (match, group) => (values[group] ?? match));
|
|
42
|
-
}
|
|
43
|
-
class AmbiguousCharacters {
|
|
44
|
-
constructor(confusableDictionary) {
|
|
45
|
-
this.confusableDictionary = confusableDictionary;
|
|
46
|
-
}
|
|
47
|
-
static getInstance(locales) {
|
|
48
|
-
return AmbiguousCharacters.cache.get(Array.from(locales));
|
|
49
|
-
}
|
|
50
|
-
static getLocales() {
|
|
51
|
-
return AmbiguousCharacters._locales.getValue();
|
|
52
|
-
}
|
|
53
|
-
isAmbiguous(codePoint) {
|
|
54
|
-
return this.confusableDictionary.has(codePoint);
|
|
55
|
-
}
|
|
56
|
-
getPrimaryConfusable(codePoint) {
|
|
57
|
-
return this.confusableDictionary.get(codePoint);
|
|
58
|
-
}
|
|
59
|
-
getConfusableCodePoints() {
|
|
60
|
-
return (
|
|
61
|
-
(new Set( (this.confusableDictionary.keys())))
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
_a = AmbiguousCharacters;
|
|
66
|
-
AmbiguousCharacters.ambiguousCharacterData = ( (new Lazy(() => {
|
|
67
|
-
return JSON.parse('{\"_common\":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],\"_default\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"cs\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"de\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"es\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"fr\":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"it\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ja\":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],\"ko\":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pl\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"pt-BR\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"qps-ploc\":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"ru\":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"tr\":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],\"zh-hans\":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],\"zh-hant\":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}');
|
|
68
|
-
})));
|
|
69
|
-
AmbiguousCharacters.cache = ( (new LRUCachedFunction((locales) => {
|
|
70
|
-
function arrayToMap(arr) {
|
|
71
|
-
const result = ( (new Map()));
|
|
72
|
-
for (let i = 0; i < arr.length; i += 2) {
|
|
73
|
-
result.set(arr[i], arr[i + 1]);
|
|
74
|
-
}
|
|
75
|
-
return result;
|
|
76
|
-
}
|
|
77
|
-
function mergeMaps(map1, map2) {
|
|
78
|
-
const result = ( (new Map(map1)));
|
|
79
|
-
for (const [key, value] of map2) {
|
|
80
|
-
result.set(key, value);
|
|
81
|
-
}
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
function intersectMaps(map1, map2) {
|
|
85
|
-
if (!map1) {
|
|
86
|
-
return map2;
|
|
87
|
-
}
|
|
88
|
-
const result = ( (new Map()));
|
|
89
|
-
for (const [key, value] of map1) {
|
|
90
|
-
if (map2.has(key)) {
|
|
91
|
-
result.set(key, value);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return result;
|
|
95
|
-
}
|
|
96
|
-
const data = _a.ambiguousCharacterData.getValue();
|
|
97
|
-
let filteredLocales = locales.filter((l) => !l.startsWith('_') && l in data);
|
|
98
|
-
if (filteredLocales.length === 0) {
|
|
99
|
-
filteredLocales = ['_default'];
|
|
100
|
-
}
|
|
101
|
-
let languageSpecificMap = undefined;
|
|
102
|
-
for (const locale of filteredLocales) {
|
|
103
|
-
const map = arrayToMap(data[locale]);
|
|
104
|
-
languageSpecificMap = intersectMaps(languageSpecificMap, map);
|
|
105
|
-
}
|
|
106
|
-
const commonMap = arrayToMap(data['_common']);
|
|
107
|
-
const map = mergeMaps(commonMap, languageSpecificMap);
|
|
108
|
-
return (
|
|
109
|
-
(new AmbiguousCharacters(map))
|
|
110
|
-
);
|
|
111
|
-
})));
|
|
112
|
-
AmbiguousCharacters._locales = ( (new Lazy(
|
|
113
|
-
() => ( (Object.keys(AmbiguousCharacters.ambiguousCharacterData.getValue()))).filter((k) => !k.startsWith('_'))
|
|
114
|
-
)));
|
|
115
|
-
function raceCancellationError(promise, token) {
|
|
116
|
-
return (
|
|
117
|
-
(new Promise((resolve, reject) => {
|
|
118
|
-
const ref = token.onCancellationRequested(() => {
|
|
119
|
-
ref.dispose();
|
|
120
|
-
reject(( (new CancellationError())));
|
|
121
|
-
});
|
|
122
|
-
promise.then(resolve, reject).finally(() => ref.dispose());
|
|
123
|
-
}))
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
class Sequencer {
|
|
127
|
-
constructor() {
|
|
128
|
-
this.current = Promise.resolve(null);
|
|
129
|
-
}
|
|
130
|
-
queue(promiseTask) {
|
|
131
|
-
return this.current = this.current.then(() => promiseTask(), () => promiseTask());
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
class Barrier {
|
|
135
|
-
constructor() {
|
|
136
|
-
this._isOpen = false;
|
|
137
|
-
this._promise = ( (new Promise((c, e) => {
|
|
138
|
-
this._completePromise = c;
|
|
139
|
-
})));
|
|
140
|
-
}
|
|
141
|
-
isOpen() {
|
|
142
|
-
return this._isOpen;
|
|
143
|
-
}
|
|
144
|
-
open() {
|
|
145
|
-
this._isOpen = true;
|
|
146
|
-
this._completePromise(true);
|
|
147
|
-
}
|
|
148
|
-
wait() {
|
|
149
|
-
return this._promise;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
class Limiter {
|
|
153
|
-
constructor(maxDegreeOfParalellism) {
|
|
154
|
-
this._size = 0;
|
|
155
|
-
this.maxDegreeOfParalellism = maxDegreeOfParalellism;
|
|
156
|
-
this.outstandingPromises = [];
|
|
157
|
-
this.runningPromises = 0;
|
|
158
|
-
this._onDrained = ( (new Emitter()));
|
|
159
|
-
}
|
|
160
|
-
get onDrained() {
|
|
161
|
-
return this._onDrained.event;
|
|
162
|
-
}
|
|
163
|
-
get size() {
|
|
164
|
-
return this._size;
|
|
165
|
-
}
|
|
166
|
-
queue(factory) {
|
|
167
|
-
this._size++;
|
|
168
|
-
return (
|
|
169
|
-
(new Promise((c, e) => {
|
|
170
|
-
this.outstandingPromises.push({ factory, c, e });
|
|
171
|
-
this.consume();
|
|
172
|
-
}))
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
consume() {
|
|
176
|
-
while (this.outstandingPromises.length && this.runningPromises < this.maxDegreeOfParalellism) {
|
|
177
|
-
const iLimitedTask = this.outstandingPromises.shift();
|
|
178
|
-
this.runningPromises++;
|
|
179
|
-
const promise = iLimitedTask.factory();
|
|
180
|
-
promise.then(iLimitedTask.c, iLimitedTask.e);
|
|
181
|
-
promise.then(() => this.consumed(), () => this.consumed());
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
consumed() {
|
|
185
|
-
this._size--;
|
|
186
|
-
this.runningPromises--;
|
|
187
|
-
if (this.outstandingPromises.length > 0) {
|
|
188
|
-
this.consume();
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
this._onDrained.fire();
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
dispose() {
|
|
195
|
-
this._onDrained.dispose();
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
class Queue extends Limiter {
|
|
199
|
-
constructor() {
|
|
200
|
-
super(1);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
class ResourceQueue {
|
|
204
|
-
constructor() {
|
|
205
|
-
this.queues = ( (new Map()));
|
|
206
|
-
this.drainers = ( (new Set()));
|
|
207
|
-
}
|
|
208
|
-
async whenDrained() {
|
|
209
|
-
if (this.isDrained()) {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
const promise = ( (new DeferredPromise()));
|
|
213
|
-
this.drainers.add(promise);
|
|
214
|
-
return promise.p;
|
|
215
|
-
}
|
|
216
|
-
isDrained() {
|
|
217
|
-
for (const [, queue] of this.queues) {
|
|
218
|
-
if (queue.size > 0) {
|
|
219
|
-
return false;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
return true;
|
|
223
|
-
}
|
|
224
|
-
queueFor(resource, extUri$1 = extUri) {
|
|
225
|
-
const key = extUri$1.getComparisonKey(resource);
|
|
226
|
-
let queue = this.queues.get(key);
|
|
227
|
-
if (!queue) {
|
|
228
|
-
queue = ( (new Queue()));
|
|
229
|
-
Event.once(queue.onDrained)(() => {
|
|
230
|
-
queue?.dispose();
|
|
231
|
-
this.queues.delete(key);
|
|
232
|
-
this.onDidQueueDrain();
|
|
233
|
-
});
|
|
234
|
-
this.queues.set(key, queue);
|
|
235
|
-
}
|
|
236
|
-
return queue;
|
|
237
|
-
}
|
|
238
|
-
onDidQueueDrain() {
|
|
239
|
-
if (!this.isDrained()) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
this.releaseDrainers();
|
|
243
|
-
}
|
|
244
|
-
releaseDrainers() {
|
|
245
|
-
for (const drainer of this.drainers) {
|
|
246
|
-
drainer.complete();
|
|
247
|
-
}
|
|
248
|
-
this.drainers.clear();
|
|
249
|
-
}
|
|
250
|
-
dispose() {
|
|
251
|
-
for (const [, queue] of this.queues) {
|
|
252
|
-
queue.dispose();
|
|
253
|
-
}
|
|
254
|
-
this.queues.clear();
|
|
255
|
-
this.releaseDrainers();
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
class IntervalCounter {
|
|
259
|
-
constructor(interval, nowFn = () => Date.now()) {
|
|
260
|
-
this.interval = interval;
|
|
261
|
-
this.nowFn = nowFn;
|
|
262
|
-
this.lastIncrementTime = 0;
|
|
263
|
-
this.value = 0;
|
|
264
|
-
}
|
|
265
|
-
increment() {
|
|
266
|
-
const now = this.nowFn();
|
|
267
|
-
if (now - this.lastIncrementTime > this.interval) {
|
|
268
|
-
this.lastIncrementTime = now;
|
|
269
|
-
this.value = 0;
|
|
270
|
-
}
|
|
271
|
-
this.value++;
|
|
272
|
-
return this.value;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
class DeferredPromise {
|
|
276
|
-
constructor() {
|
|
277
|
-
this.rejected = false;
|
|
278
|
-
this.resolved = false;
|
|
279
|
-
this.p = ( (new Promise((c, e) => {
|
|
280
|
-
this.completeCallback = c;
|
|
281
|
-
this.errorCallback = e;
|
|
282
|
-
})));
|
|
283
|
-
}
|
|
284
|
-
get isRejected() {
|
|
285
|
-
return this.rejected;
|
|
286
|
-
}
|
|
287
|
-
get isResolved() {
|
|
288
|
-
return this.resolved;
|
|
289
|
-
}
|
|
290
|
-
get isSettled() {
|
|
291
|
-
return this.rejected || this.resolved;
|
|
292
|
-
}
|
|
293
|
-
complete(value) {
|
|
294
|
-
return (
|
|
295
|
-
(new Promise(resolve => {
|
|
296
|
-
this.completeCallback(value);
|
|
297
|
-
this.resolved = true;
|
|
298
|
-
resolve();
|
|
299
|
-
}))
|
|
300
|
-
);
|
|
301
|
-
}
|
|
302
|
-
error(err) {
|
|
303
|
-
return (
|
|
304
|
-
(new Promise(resolve => {
|
|
305
|
-
this.errorCallback(err);
|
|
306
|
-
this.rejected = true;
|
|
307
|
-
resolve();
|
|
308
|
-
}))
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
|
-
cancel() {
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
315
|
-
function isUUID(value) {
|
|
316
|
-
return _UUIDPattern.test(value);
|
|
317
|
-
}
|
|
24
|
+
import { OS } from 'monaco-editor/esm/vs/base/common/platform.js';
|
|
318
25
|
const IPolicyService = ( (createDecorator('policy')));
|
|
319
26
|
class NullPolicyService {
|
|
320
27
|
constructor() {
|
|
@@ -324,27 +31,6 @@ class NullPolicyService {
|
|
|
324
31
|
getPolicyValue() { return undefined; }
|
|
325
32
|
serialize() { return undefined; }
|
|
326
33
|
}
|
|
327
|
-
const EXTENSION_CATEGORIES = [
|
|
328
|
-
'Azure',
|
|
329
|
-
'Data Science',
|
|
330
|
-
'Debuggers',
|
|
331
|
-
'Extension Packs',
|
|
332
|
-
'Education',
|
|
333
|
-
'Formatters',
|
|
334
|
-
'Keymaps',
|
|
335
|
-
'Language Packs',
|
|
336
|
-
'Linters',
|
|
337
|
-
'Machine Learning',
|
|
338
|
-
'Notebooks',
|
|
339
|
-
'Programming Languages',
|
|
340
|
-
'SCM Providers',
|
|
341
|
-
'Snippets',
|
|
342
|
-
'Testing',
|
|
343
|
-
'Themes',
|
|
344
|
-
'Visualization',
|
|
345
|
-
'Other',
|
|
346
|
-
];
|
|
347
|
-
const EXTENSION_IDENTIFIER_PATTERN = '^([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$';
|
|
348
34
|
const IExtensionService = ( (createDecorator('extensionService')));
|
|
349
35
|
function isProposedApiEnabled(extension, proposal) {
|
|
350
36
|
if (!extension.enabledApiProposals) {
|
|
@@ -420,1153 +106,7 @@ class MacLinuxFallbackKeyboardMapper {
|
|
|
420
106
|
return USLayoutResolvedKeybinding.resolveUserBinding(input, this._OS);
|
|
421
107
|
}
|
|
422
108
|
}
|
|
423
|
-
async function getServiceMachineId(environmentService, fileService, storageService) {
|
|
424
|
-
let uuid = storageService ? storageService.get('storage.serviceMachineId', -1 ) || null : null;
|
|
425
|
-
if (uuid) {
|
|
426
|
-
return uuid;
|
|
427
|
-
}
|
|
428
|
-
try {
|
|
429
|
-
const contents = await fileService.readFile(environmentService.serviceMachineIdResource);
|
|
430
|
-
const value = ( (contents.value.toString()));
|
|
431
|
-
uuid = isUUID(value) ? value : null;
|
|
432
|
-
}
|
|
433
|
-
catch (e) {
|
|
434
|
-
uuid = null;
|
|
435
|
-
}
|
|
436
|
-
if (!uuid) {
|
|
437
|
-
uuid = generateUuid();
|
|
438
|
-
try {
|
|
439
|
-
await fileService.writeFile(environmentService.serviceMachineIdResource, VSBuffer.fromString(uuid));
|
|
440
|
-
}
|
|
441
|
-
catch (error) {
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
storageService?.store('storage.serviceMachineId', uuid, -1 , 1 );
|
|
445
|
-
return uuid;
|
|
446
|
-
}
|
|
447
|
-
function format(documentText, range, options) {
|
|
448
|
-
let initialIndentLevel;
|
|
449
|
-
let formatText;
|
|
450
|
-
let formatTextStart;
|
|
451
|
-
let rangeStart;
|
|
452
|
-
let rangeEnd;
|
|
453
|
-
if (range) {
|
|
454
|
-
rangeStart = range.offset;
|
|
455
|
-
rangeEnd = rangeStart + range.length;
|
|
456
|
-
formatTextStart = rangeStart;
|
|
457
|
-
while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) {
|
|
458
|
-
formatTextStart--;
|
|
459
|
-
}
|
|
460
|
-
let endOffset = rangeEnd;
|
|
461
|
-
while (endOffset < documentText.length && !isEOL(documentText, endOffset)) {
|
|
462
|
-
endOffset++;
|
|
463
|
-
}
|
|
464
|
-
formatText = documentText.substring(formatTextStart, endOffset);
|
|
465
|
-
initialIndentLevel = computeIndentLevel(formatText, options);
|
|
466
|
-
}
|
|
467
|
-
else {
|
|
468
|
-
formatText = documentText;
|
|
469
|
-
initialIndentLevel = 0;
|
|
470
|
-
formatTextStart = 0;
|
|
471
|
-
rangeStart = 0;
|
|
472
|
-
rangeEnd = documentText.length;
|
|
473
|
-
}
|
|
474
|
-
const eol = getEOL(options, documentText);
|
|
475
|
-
let lineBreak = false;
|
|
476
|
-
let indentLevel = 0;
|
|
477
|
-
let indentValue;
|
|
478
|
-
if (options.insertSpaces) {
|
|
479
|
-
indentValue = repeat(' ', options.tabSize || 4);
|
|
480
|
-
}
|
|
481
|
-
else {
|
|
482
|
-
indentValue = '\t';
|
|
483
|
-
}
|
|
484
|
-
const scanner = createScanner(formatText, false);
|
|
485
|
-
let hasError = false;
|
|
486
|
-
function newLineAndIndent() {
|
|
487
|
-
return eol + repeat(indentValue, initialIndentLevel + indentLevel);
|
|
488
|
-
}
|
|
489
|
-
function scanNext() {
|
|
490
|
-
let token = scanner.scan();
|
|
491
|
-
lineBreak = false;
|
|
492
|
-
while (token === 15 || token === 14 ) {
|
|
493
|
-
lineBreak = lineBreak || ((token === 14) );
|
|
494
|
-
token = scanner.scan();
|
|
495
|
-
}
|
|
496
|
-
hasError = token === 16 || scanner.getTokenError() !== 0 ;
|
|
497
|
-
return token;
|
|
498
|
-
}
|
|
499
|
-
const editOperations = [];
|
|
500
|
-
function addEdit(text, startOffset, endOffset) {
|
|
501
|
-
if (!hasError && startOffset < rangeEnd && endOffset > rangeStart && documentText.substring(startOffset, endOffset) !== text) {
|
|
502
|
-
editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text });
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
let firstToken = scanNext();
|
|
506
|
-
if (firstToken !== 17 ) {
|
|
507
|
-
const firstTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
508
|
-
const initialIndent = repeat(indentValue, initialIndentLevel);
|
|
509
|
-
addEdit(initialIndent, formatTextStart, firstTokenStart);
|
|
510
|
-
}
|
|
511
|
-
while (firstToken !== 17 ) {
|
|
512
|
-
let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
|
|
513
|
-
let secondToken = scanNext();
|
|
514
|
-
let replaceContent = '';
|
|
515
|
-
while (!lineBreak && ((secondToken === 12 || secondToken === 13) )) {
|
|
516
|
-
const commentTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
517
|
-
addEdit(' ', firstTokenEnd, commentTokenStart);
|
|
518
|
-
firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
|
|
519
|
-
replaceContent = secondToken === 12 ? newLineAndIndent() : '';
|
|
520
|
-
secondToken = scanNext();
|
|
521
|
-
}
|
|
522
|
-
if (secondToken === 2 ) {
|
|
523
|
-
if (firstToken !== 1 ) {
|
|
524
|
-
indentLevel--;
|
|
525
|
-
replaceContent = newLineAndIndent();
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
else if (secondToken === 4 ) {
|
|
529
|
-
if (firstToken !== 3 ) {
|
|
530
|
-
indentLevel--;
|
|
531
|
-
replaceContent = newLineAndIndent();
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
else {
|
|
535
|
-
switch (firstToken) {
|
|
536
|
-
case 3 :
|
|
537
|
-
case 1 :
|
|
538
|
-
indentLevel++;
|
|
539
|
-
replaceContent = newLineAndIndent();
|
|
540
|
-
break;
|
|
541
|
-
case 5 :
|
|
542
|
-
case 12 :
|
|
543
|
-
replaceContent = newLineAndIndent();
|
|
544
|
-
break;
|
|
545
|
-
case 13 :
|
|
546
|
-
if (lineBreak) {
|
|
547
|
-
replaceContent = newLineAndIndent();
|
|
548
|
-
}
|
|
549
|
-
else {
|
|
550
|
-
replaceContent = ' ';
|
|
551
|
-
}
|
|
552
|
-
break;
|
|
553
|
-
case 6 :
|
|
554
|
-
replaceContent = ' ';
|
|
555
|
-
break;
|
|
556
|
-
case 10 :
|
|
557
|
-
if (secondToken === 6 ) {
|
|
558
|
-
replaceContent = '';
|
|
559
|
-
break;
|
|
560
|
-
}
|
|
561
|
-
case 7 :
|
|
562
|
-
case 8 :
|
|
563
|
-
case 9 :
|
|
564
|
-
case 11 :
|
|
565
|
-
case 2 :
|
|
566
|
-
case 4 :
|
|
567
|
-
if (secondToken === 12 || secondToken === 13 ) {
|
|
568
|
-
replaceContent = ' ';
|
|
569
|
-
}
|
|
570
|
-
else if (secondToken !== 5 && secondToken !== 17 ) {
|
|
571
|
-
hasError = true;
|
|
572
|
-
}
|
|
573
|
-
break;
|
|
574
|
-
case 16 :
|
|
575
|
-
hasError = true;
|
|
576
|
-
break;
|
|
577
|
-
}
|
|
578
|
-
if (lineBreak && ((secondToken === 12 || secondToken === 13) )) {
|
|
579
|
-
replaceContent = newLineAndIndent();
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
const secondTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
583
|
-
addEdit(replaceContent, firstTokenEnd, secondTokenStart);
|
|
584
|
-
firstToken = secondToken;
|
|
585
|
-
}
|
|
586
|
-
return editOperations;
|
|
587
|
-
}
|
|
588
|
-
function repeat(s, count) {
|
|
589
|
-
let result = '';
|
|
590
|
-
for (let i = 0; i < count; i++) {
|
|
591
|
-
result += s;
|
|
592
|
-
}
|
|
593
|
-
return result;
|
|
594
|
-
}
|
|
595
|
-
function computeIndentLevel(content, options) {
|
|
596
|
-
let i = 0;
|
|
597
|
-
let nChars = 0;
|
|
598
|
-
const tabSize = options.tabSize || 4;
|
|
599
|
-
while (i < content.length) {
|
|
600
|
-
const ch = content.charAt(i);
|
|
601
|
-
if (ch === ' ') {
|
|
602
|
-
nChars++;
|
|
603
|
-
}
|
|
604
|
-
else if (ch === '\t') {
|
|
605
|
-
nChars += tabSize;
|
|
606
|
-
}
|
|
607
|
-
else {
|
|
608
|
-
break;
|
|
609
|
-
}
|
|
610
|
-
i++;
|
|
611
|
-
}
|
|
612
|
-
return Math.floor(nChars / tabSize);
|
|
613
|
-
}
|
|
614
|
-
function getEOL(options, text) {
|
|
615
|
-
for (let i = 0; i < text.length; i++) {
|
|
616
|
-
const ch = text.charAt(i);
|
|
617
|
-
if (ch === '\r') {
|
|
618
|
-
if (i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
619
|
-
return '\r\n';
|
|
620
|
-
}
|
|
621
|
-
return '\r';
|
|
622
|
-
}
|
|
623
|
-
else if (ch === '\n') {
|
|
624
|
-
return '\n';
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
return (options && options.eol) || '\n';
|
|
628
|
-
}
|
|
629
|
-
function isEOL(text, offset) {
|
|
630
|
-
return '\r\n'.indexOf(text.charAt(offset)) !== -1;
|
|
631
|
-
}
|
|
632
|
-
function setProperty(text, originalPath, value, formattingOptions, getInsertionIndex) {
|
|
633
|
-
const path = originalPath.slice();
|
|
634
|
-
const errors = [];
|
|
635
|
-
const root = parseTree(text, errors);
|
|
636
|
-
let parent = undefined;
|
|
637
|
-
let lastSegment = undefined;
|
|
638
|
-
while (path.length > 0) {
|
|
639
|
-
lastSegment = path.pop();
|
|
640
|
-
parent = findNodeAtLocation(root, path);
|
|
641
|
-
if (parent === undefined && value !== undefined) {
|
|
642
|
-
if (typeof lastSegment === 'string') {
|
|
643
|
-
value = { [lastSegment]: value };
|
|
644
|
-
}
|
|
645
|
-
else {
|
|
646
|
-
value = [value];
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
else {
|
|
650
|
-
break;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
if (!parent) {
|
|
654
|
-
if (value === undefined) {
|
|
655
|
-
throw new Error('Can not delete in empty document');
|
|
656
|
-
}
|
|
657
|
-
return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, formattingOptions);
|
|
658
|
-
}
|
|
659
|
-
else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) {
|
|
660
|
-
const existing = findNodeAtLocation(parent, [lastSegment]);
|
|
661
|
-
if (existing !== undefined) {
|
|
662
|
-
if (value === undefined) {
|
|
663
|
-
if (!existing.parent) {
|
|
664
|
-
throw new Error('Malformed AST');
|
|
665
|
-
}
|
|
666
|
-
const propertyIndex = parent.children.indexOf(existing.parent);
|
|
667
|
-
let removeBegin;
|
|
668
|
-
let removeEnd = existing.parent.offset + existing.parent.length;
|
|
669
|
-
if (propertyIndex > 0) {
|
|
670
|
-
const previous = parent.children[propertyIndex - 1];
|
|
671
|
-
removeBegin = previous.offset + previous.length;
|
|
672
|
-
}
|
|
673
|
-
else {
|
|
674
|
-
removeBegin = parent.offset + 1;
|
|
675
|
-
if (parent.children.length > 1) {
|
|
676
|
-
const next = parent.children[1];
|
|
677
|
-
removeEnd = next.offset;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, formattingOptions);
|
|
681
|
-
}
|
|
682
|
-
else {
|
|
683
|
-
return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, formattingOptions);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
else {
|
|
687
|
-
if (value === undefined) {
|
|
688
|
-
return [];
|
|
689
|
-
}
|
|
690
|
-
const newProperty = `${JSON.stringify(lastSegment)}: ${JSON.stringify(value)}`;
|
|
691
|
-
const index = getInsertionIndex ? getInsertionIndex(parent.children.map(p => p.children[0].value)) : parent.children.length;
|
|
692
|
-
let edit;
|
|
693
|
-
if (index > 0) {
|
|
694
|
-
const previous = parent.children[index - 1];
|
|
695
|
-
edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };
|
|
696
|
-
}
|
|
697
|
-
else if (parent.children.length === 0) {
|
|
698
|
-
edit = { offset: parent.offset + 1, length: 0, content: newProperty };
|
|
699
|
-
}
|
|
700
|
-
else {
|
|
701
|
-
edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' };
|
|
702
|
-
}
|
|
703
|
-
return withFormatting(text, edit, formattingOptions);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) {
|
|
707
|
-
if (value !== undefined) {
|
|
708
|
-
const newProperty = `${JSON.stringify(value)}`;
|
|
709
|
-
let edit;
|
|
710
|
-
if (parent.children.length === 0 || lastSegment === 0) {
|
|
711
|
-
edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' };
|
|
712
|
-
}
|
|
713
|
-
else {
|
|
714
|
-
const index = lastSegment === -1 || lastSegment > parent.children.length ? parent.children.length : lastSegment;
|
|
715
|
-
const previous = parent.children[index - 1];
|
|
716
|
-
edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };
|
|
717
|
-
}
|
|
718
|
-
return withFormatting(text, edit, formattingOptions);
|
|
719
|
-
}
|
|
720
|
-
else {
|
|
721
|
-
const removalIndex = lastSegment;
|
|
722
|
-
const toRemove = parent.children[removalIndex];
|
|
723
|
-
let edit;
|
|
724
|
-
if (parent.children.length === 1) {
|
|
725
|
-
edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' };
|
|
726
|
-
}
|
|
727
|
-
else if (parent.children.length - 1 === removalIndex) {
|
|
728
|
-
const previous = parent.children[removalIndex - 1];
|
|
729
|
-
const offset = previous.offset + previous.length;
|
|
730
|
-
const parentEndOffset = parent.offset + parent.length;
|
|
731
|
-
edit = { offset, length: parentEndOffset - 2 - offset, content: '' };
|
|
732
|
-
}
|
|
733
|
-
else {
|
|
734
|
-
edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' };
|
|
735
|
-
}
|
|
736
|
-
return withFormatting(text, edit, formattingOptions);
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
else {
|
|
740
|
-
throw new Error(`Can not add ${typeof lastSegment !== 'number' ? 'index' : 'property'} to parent of type ${parent.type}`);
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
function withFormatting(text, edit, formattingOptions) {
|
|
744
|
-
let newText = applyEdit(text, edit);
|
|
745
|
-
let begin = edit.offset;
|
|
746
|
-
let end = edit.offset + edit.content.length;
|
|
747
|
-
if (edit.length === 0 || edit.content.length === 0) {
|
|
748
|
-
while (begin > 0 && !isEOL(newText, begin - 1)) {
|
|
749
|
-
begin--;
|
|
750
|
-
}
|
|
751
|
-
while (end < newText.length && !isEOL(newText, end)) {
|
|
752
|
-
end++;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
const edits = format(newText, { offset: begin, length: end - begin }, formattingOptions);
|
|
756
|
-
for (let i = edits.length - 1; i >= 0; i--) {
|
|
757
|
-
const curr = edits[i];
|
|
758
|
-
newText = applyEdit(newText, curr);
|
|
759
|
-
begin = Math.min(begin, curr.offset);
|
|
760
|
-
end = Math.max(end, curr.offset + curr.length);
|
|
761
|
-
end += curr.content.length - curr.length;
|
|
762
|
-
}
|
|
763
|
-
const editLength = text.length - (newText.length - end) - begin;
|
|
764
|
-
return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }];
|
|
765
|
-
}
|
|
766
|
-
function applyEdit(text, edit) {
|
|
767
|
-
return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length);
|
|
768
|
-
}
|
|
769
109
|
const IBrowserWorkbenchEnvironmentService = refineServiceDecorator(IEnvironmentService);
|
|
770
|
-
const allApiProposals = ( (Object.freeze({
|
|
771
|
-
authSession: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.authSession.d.ts',
|
|
772
|
-
badges: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.badges.d.ts',
|
|
773
|
-
commentsResolvedState: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsResolvedState.d.ts',
|
|
774
|
-
contribEditSessions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditSessions.d.ts',
|
|
775
|
-
contribLabelFormatterWorkspaceTooltip: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribLabelFormatterWorkspaceTooltip.d.ts',
|
|
776
|
-
contribMenuBarHome: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMenuBarHome.d.ts',
|
|
777
|
-
contribMergeEditorToolbar: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMergeEditorToolbar.d.ts',
|
|
778
|
-
contribRemoteHelp: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts',
|
|
779
|
-
contribShareMenu: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribShareMenu.d.ts',
|
|
780
|
-
contribViewSize: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewSize.d.ts',
|
|
781
|
-
contribViewsRemote: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsRemote.d.ts',
|
|
782
|
-
contribViewsWelcome: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribViewsWelcome.d.ts',
|
|
783
|
-
contribWebviewContext: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribWebviewContext.d.ts',
|
|
784
|
-
customEditorMove: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.customEditorMove.d.ts',
|
|
785
|
-
diffCommand: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffCommand.d.ts',
|
|
786
|
-
documentFiltersExclusive: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts',
|
|
787
|
-
documentPaste: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentPaste.d.ts',
|
|
788
|
-
editorInsets: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts',
|
|
789
|
-
extensionRuntime: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts',
|
|
790
|
-
extensionsAny: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionsAny.d.ts',
|
|
791
|
-
externalUriOpener: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts',
|
|
792
|
-
fileSearchProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fileSearchProvider.d.ts',
|
|
793
|
-
findTextInFiles: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.findTextInFiles.d.ts',
|
|
794
|
-
fsChunks: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.fsChunks.d.ts',
|
|
795
|
-
idToken: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.idToken.d.ts',
|
|
796
|
-
inlineCompletionsAdditions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts',
|
|
797
|
-
inlineCompletionsNew: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.inlineCompletionsNew.d.ts',
|
|
798
|
-
interactiveWindow: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactiveWindow.d.ts',
|
|
799
|
-
ipc: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.ipc.d.ts',
|
|
800
|
-
notebookCellExecutionState: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts',
|
|
801
|
-
notebookContentProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts',
|
|
802
|
-
notebookControllerKind: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerKind.d.ts',
|
|
803
|
-
notebookDebugOptions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDebugOptions.d.ts',
|
|
804
|
-
notebookDeprecated: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts',
|
|
805
|
-
notebookEditor: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditor.d.ts',
|
|
806
|
-
notebookEditorEdit: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditorEdit.d.ts',
|
|
807
|
-
notebookKernelSource: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookKernelSource.d.ts',
|
|
808
|
-
notebookLiveShare: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookLiveShare.d.ts',
|
|
809
|
-
notebookMessaging: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMessaging.d.ts',
|
|
810
|
-
notebookMime: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookMime.d.ts',
|
|
811
|
-
notebookWorkspaceEdit: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookWorkspaceEdit.d.ts',
|
|
812
|
-
portsAttributes: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.portsAttributes.d.ts',
|
|
813
|
-
quickPickSortByLabel: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts',
|
|
814
|
-
resolvers: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.resolvers.d.ts',
|
|
815
|
-
scmActionButton: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmActionButton.d.ts',
|
|
816
|
-
scmSelectedProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts',
|
|
817
|
-
scmValidation: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmValidation.d.ts',
|
|
818
|
-
snippetWorkspaceEdit: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.snippetWorkspaceEdit.d.ts',
|
|
819
|
-
tabInputTextMerge: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts',
|
|
820
|
-
taskPresentationGroup: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts',
|
|
821
|
-
telemetry: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts',
|
|
822
|
-
terminalDataWriteEvent: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDataWriteEvent.d.ts',
|
|
823
|
-
terminalDimensions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalDimensions.d.ts',
|
|
824
|
-
terminalExitReason: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.terminalExitReason.d.ts',
|
|
825
|
-
testCoverage: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testCoverage.d.ts',
|
|
826
|
-
testObserver: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.testObserver.d.ts',
|
|
827
|
-
textSearchProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.textSearchProvider.d.ts',
|
|
828
|
-
timeline: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.timeline.d.ts',
|
|
829
|
-
tokenInformation: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tokenInformation.d.ts',
|
|
830
|
-
treeViewReveal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts',
|
|
831
|
-
workspaceTrust: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts'
|
|
832
|
-
})));
|
|
833
|
-
const schemaRegistry = ( (Registry.as(Extensions.JSONContribution)));
|
|
834
|
-
class ExtensionMessageCollector {
|
|
835
|
-
constructor(messageHandler, extension, extensionPointId) {
|
|
836
|
-
this._messageHandler = messageHandler;
|
|
837
|
-
this._extension = extension;
|
|
838
|
-
this._extensionPointId = extensionPointId;
|
|
839
|
-
}
|
|
840
|
-
_msg(type, message) {
|
|
841
|
-
this._messageHandler({
|
|
842
|
-
type: type,
|
|
843
|
-
message: message,
|
|
844
|
-
extensionId: this._extension.identifier,
|
|
845
|
-
extensionPointId: this._extensionPointId
|
|
846
|
-
});
|
|
847
|
-
}
|
|
848
|
-
error(message) {
|
|
849
|
-
this._msg(Severity.Error, message);
|
|
850
|
-
}
|
|
851
|
-
warn(message) {
|
|
852
|
-
this._msg(Severity.Warning, message);
|
|
853
|
-
}
|
|
854
|
-
info(message) {
|
|
855
|
-
this._msg(Severity.Info, message);
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
class ExtensionPointUserDelta {
|
|
859
|
-
constructor(added, removed) {
|
|
860
|
-
this.added = added;
|
|
861
|
-
this.removed = removed;
|
|
862
|
-
}
|
|
863
|
-
static _toSet(arr) {
|
|
864
|
-
const result = ( (new Set()));
|
|
865
|
-
for (let i = 0, len = arr.length; i < len; i++) {
|
|
866
|
-
result.add(ExtensionIdentifier.toKey(arr[i].description.identifier));
|
|
867
|
-
}
|
|
868
|
-
return result;
|
|
869
|
-
}
|
|
870
|
-
static compute(previous, current) {
|
|
871
|
-
if (!previous || !previous.length) {
|
|
872
|
-
return (
|
|
873
|
-
(new ExtensionPointUserDelta(current, []))
|
|
874
|
-
);
|
|
875
|
-
}
|
|
876
|
-
if (!current || !current.length) {
|
|
877
|
-
return (
|
|
878
|
-
(new ExtensionPointUserDelta([], previous))
|
|
879
|
-
);
|
|
880
|
-
}
|
|
881
|
-
const previousSet = this._toSet(previous);
|
|
882
|
-
const currentSet = this._toSet(current);
|
|
883
|
-
const added = current.filter(user => !previousSet.has(ExtensionIdentifier.toKey(user.description.identifier)));
|
|
884
|
-
const removed = previous.filter(user => !currentSet.has(ExtensionIdentifier.toKey(user.description.identifier)));
|
|
885
|
-
return (
|
|
886
|
-
(new ExtensionPointUserDelta(added, removed))
|
|
887
|
-
);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
class ExtensionPoint {
|
|
891
|
-
constructor(name, defaultExtensionKind) {
|
|
892
|
-
this.name = name;
|
|
893
|
-
this.defaultExtensionKind = defaultExtensionKind;
|
|
894
|
-
this._handler = null;
|
|
895
|
-
this._users = null;
|
|
896
|
-
this._delta = null;
|
|
897
|
-
}
|
|
898
|
-
setHandler(handler) {
|
|
899
|
-
if (this._handler !== null) {
|
|
900
|
-
throw new Error('Handler already set!');
|
|
901
|
-
}
|
|
902
|
-
this._handler = handler;
|
|
903
|
-
this._handle();
|
|
904
|
-
}
|
|
905
|
-
acceptUsers(users) {
|
|
906
|
-
this._delta = ExtensionPointUserDelta.compute(this._users, users);
|
|
907
|
-
this._users = users;
|
|
908
|
-
this._handle();
|
|
909
|
-
}
|
|
910
|
-
_handle() {
|
|
911
|
-
if (this._handler === null || this._users === null || this._delta === null) {
|
|
912
|
-
return;
|
|
913
|
-
}
|
|
914
|
-
try {
|
|
915
|
-
this._handler(this._users, this._delta);
|
|
916
|
-
}
|
|
917
|
-
catch (err) {
|
|
918
|
-
onUnexpectedError(err);
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
const extensionKindSchema = {
|
|
923
|
-
type: 'string',
|
|
924
|
-
enum: [
|
|
925
|
-
'ui',
|
|
926
|
-
'workspace'
|
|
927
|
-
],
|
|
928
|
-
enumDescriptions: [
|
|
929
|
-
( (localize(
|
|
930
|
-
'ui',
|
|
931
|
-
"UI extension kind. In a remote window, such extensions are enabled only when available on the local machine."
|
|
932
|
-
))),
|
|
933
|
-
( (localize(
|
|
934
|
-
'workspace',
|
|
935
|
-
"Workspace extension kind. In a remote window, such extensions are enabled only when available on the remote."
|
|
936
|
-
))),
|
|
937
|
-
],
|
|
938
|
-
};
|
|
939
|
-
const schemaId = 'vscode://schemas/vscode-extensions';
|
|
940
|
-
const schema = {
|
|
941
|
-
properties: {
|
|
942
|
-
engines: {
|
|
943
|
-
type: 'object',
|
|
944
|
-
description: ( (localize('vscode.extension.engines', "Engine compatibility."))),
|
|
945
|
-
properties: {
|
|
946
|
-
'vscode': {
|
|
947
|
-
type: 'string',
|
|
948
|
-
description: ( (localize(
|
|
949
|
-
'vscode.extension.engines.vscode',
|
|
950
|
-
'For VS Code extensions, specifies the VS Code version that the extension is compatible with. Cannot be *. For example: ^0.10.5 indicates compatibility with a minimum VS Code version of 0.10.5.'
|
|
951
|
-
))),
|
|
952
|
-
default: '^1.22.0',
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
},
|
|
956
|
-
publisher: {
|
|
957
|
-
description: ( (localize('vscode.extension.publisher', 'The publisher of the VS Code extension.'))),
|
|
958
|
-
type: 'string'
|
|
959
|
-
},
|
|
960
|
-
displayName: {
|
|
961
|
-
description: ( (localize(
|
|
962
|
-
'vscode.extension.displayName',
|
|
963
|
-
'The display name for the extension used in the VS Code gallery.'
|
|
964
|
-
))),
|
|
965
|
-
type: 'string'
|
|
966
|
-
},
|
|
967
|
-
categories: {
|
|
968
|
-
description: ( (localize(
|
|
969
|
-
'vscode.extension.categories',
|
|
970
|
-
'The categories used by the VS Code gallery to categorize the extension.'
|
|
971
|
-
))),
|
|
972
|
-
type: 'array',
|
|
973
|
-
uniqueItems: true,
|
|
974
|
-
items: {
|
|
975
|
-
oneOf: [{
|
|
976
|
-
type: 'string',
|
|
977
|
-
enum: EXTENSION_CATEGORIES,
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
type: 'string',
|
|
981
|
-
const: 'Languages',
|
|
982
|
-
deprecationMessage: ( (localize(
|
|
983
|
-
'vscode.extension.category.languages.deprecated',
|
|
984
|
-
'Use \'Programming Languages\' instead'
|
|
985
|
-
))),
|
|
986
|
-
}]
|
|
987
|
-
}
|
|
988
|
-
},
|
|
989
|
-
galleryBanner: {
|
|
990
|
-
type: 'object',
|
|
991
|
-
description: ( (localize(
|
|
992
|
-
'vscode.extension.galleryBanner',
|
|
993
|
-
'Banner used in the VS Code marketplace.'
|
|
994
|
-
))),
|
|
995
|
-
properties: {
|
|
996
|
-
color: {
|
|
997
|
-
description: ( (localize(
|
|
998
|
-
'vscode.extension.galleryBanner.color',
|
|
999
|
-
'The banner color on the VS Code marketplace page header.'
|
|
1000
|
-
))),
|
|
1001
|
-
type: 'string'
|
|
1002
|
-
},
|
|
1003
|
-
theme: {
|
|
1004
|
-
description: ( (localize(
|
|
1005
|
-
'vscode.extension.galleryBanner.theme',
|
|
1006
|
-
'The color theme for the font used in the banner.'
|
|
1007
|
-
))),
|
|
1008
|
-
type: 'string',
|
|
1009
|
-
enum: ['dark', 'light']
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
},
|
|
1013
|
-
contributes: {
|
|
1014
|
-
description: ( (localize(
|
|
1015
|
-
'vscode.extension.contributes',
|
|
1016
|
-
'All contributions of the VS Code extension represented by this package.'
|
|
1017
|
-
))),
|
|
1018
|
-
type: 'object',
|
|
1019
|
-
properties: {
|
|
1020
|
-
},
|
|
1021
|
-
default: {}
|
|
1022
|
-
},
|
|
1023
|
-
preview: {
|
|
1024
|
-
type: 'boolean',
|
|
1025
|
-
description: ( (localize(
|
|
1026
|
-
'vscode.extension.preview',
|
|
1027
|
-
'Sets the extension to be flagged as a Preview in the Marketplace.'
|
|
1028
|
-
))),
|
|
1029
|
-
},
|
|
1030
|
-
enableProposedApi: {
|
|
1031
|
-
type: 'boolean',
|
|
1032
|
-
deprecationMessage: ( (localize(
|
|
1033
|
-
'vscode.extension.enableProposedApi.deprecated',
|
|
1034
|
-
'Use `enabledApiProposals` instead.'
|
|
1035
|
-
))),
|
|
1036
|
-
},
|
|
1037
|
-
enabledApiProposals: {
|
|
1038
|
-
markdownDescription: ( (localize(
|
|
1039
|
-
'vscode.extension.enabledApiProposals',
|
|
1040
|
-
'Enable API proposals to try them out. Only valid **during development**. Extensions **cannot be published** with this property. For more details visit: https://code.visualstudio.com/api/advanced-topics/using-proposed-api'
|
|
1041
|
-
))),
|
|
1042
|
-
type: 'array',
|
|
1043
|
-
uniqueItems: true,
|
|
1044
|
-
items: {
|
|
1045
|
-
type: 'string',
|
|
1046
|
-
enum: ( (Object.keys(allApiProposals))),
|
|
1047
|
-
markdownEnumDescriptions: ( (Object.values(allApiProposals)))
|
|
1048
|
-
}
|
|
1049
|
-
},
|
|
1050
|
-
activationEvents: {
|
|
1051
|
-
description: ( (localize(
|
|
1052
|
-
'vscode.extension.activationEvents',
|
|
1053
|
-
'Activation events for the VS Code extension.'
|
|
1054
|
-
))),
|
|
1055
|
-
type: 'array',
|
|
1056
|
-
items: {
|
|
1057
|
-
type: 'string',
|
|
1058
|
-
defaultSnippets: [
|
|
1059
|
-
{
|
|
1060
|
-
label: 'onWebviewPanel',
|
|
1061
|
-
description: ( (localize(
|
|
1062
|
-
'vscode.extension.activationEvents.onWebviewPanel',
|
|
1063
|
-
'An activation event emmited when a webview is loaded of a certain viewType'
|
|
1064
|
-
))),
|
|
1065
|
-
body: 'onWebviewPanel:viewType'
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
label: 'onLanguage',
|
|
1069
|
-
description: ( (localize(
|
|
1070
|
-
'vscode.extension.activationEvents.onLanguage',
|
|
1071
|
-
'An activation event emitted whenever a file that resolves to the specified language gets opened.'
|
|
1072
|
-
))),
|
|
1073
|
-
body: 'onLanguage:${1:languageId}'
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
label: 'onCommand',
|
|
1077
|
-
description: ( (localize(
|
|
1078
|
-
'vscode.extension.activationEvents.onCommand',
|
|
1079
|
-
'An activation event emitted whenever the specified command gets invoked.'
|
|
1080
|
-
))),
|
|
1081
|
-
body: 'onCommand:${2:commandId}'
|
|
1082
|
-
},
|
|
1083
|
-
{
|
|
1084
|
-
label: 'onDebug',
|
|
1085
|
-
description: ( (localize(
|
|
1086
|
-
'vscode.extension.activationEvents.onDebug',
|
|
1087
|
-
'An activation event emitted whenever a user is about to start debugging or about to setup debug configurations.'
|
|
1088
|
-
))),
|
|
1089
|
-
body: 'onDebug'
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
label: 'onDebugInitialConfigurations',
|
|
1093
|
-
description: ( (localize(
|
|
1094
|
-
'vscode.extension.activationEvents.onDebugInitialConfigurations',
|
|
1095
|
-
'An activation event emitted whenever a "launch.json" needs to be created (and all provideDebugConfigurations methods need to be called).'
|
|
1096
|
-
))),
|
|
1097
|
-
body: 'onDebugInitialConfigurations'
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
label: 'onDebugDynamicConfigurations',
|
|
1101
|
-
description: ( (localize(
|
|
1102
|
-
'vscode.extension.activationEvents.onDebugDynamicConfigurations',
|
|
1103
|
-
'An activation event emitted whenever a list of all debug configurations needs to be created (and all provideDebugConfigurations methods for the "dynamic" scope need to be called).'
|
|
1104
|
-
))),
|
|
1105
|
-
body: 'onDebugDynamicConfigurations'
|
|
1106
|
-
},
|
|
1107
|
-
{
|
|
1108
|
-
label: 'onDebugResolve',
|
|
1109
|
-
description: ( (localize(
|
|
1110
|
-
'vscode.extension.activationEvents.onDebugResolve',
|
|
1111
|
-
'An activation event emitted whenever a debug session with the specific type is about to be launched (and a corresponding resolveDebugConfiguration method needs to be called).'
|
|
1112
|
-
))),
|
|
1113
|
-
body: 'onDebugResolve:${6:type}'
|
|
1114
|
-
},
|
|
1115
|
-
{
|
|
1116
|
-
label: 'onDebugAdapterProtocolTracker',
|
|
1117
|
-
description: ( (localize(
|
|
1118
|
-
'vscode.extension.activationEvents.onDebugAdapterProtocolTracker',
|
|
1119
|
-
'An activation event emitted whenever a debug session with the specific type is about to be launched and a debug protocol tracker might be needed.'
|
|
1120
|
-
))),
|
|
1121
|
-
body: 'onDebugAdapterProtocolTracker:${6:type}'
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
label: 'workspaceContains',
|
|
1125
|
-
description: ( (localize(
|
|
1126
|
-
'vscode.extension.activationEvents.workspaceContains',
|
|
1127
|
-
'An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern.'
|
|
1128
|
-
))),
|
|
1129
|
-
body: 'workspaceContains:${4:filePattern}'
|
|
1130
|
-
},
|
|
1131
|
-
{
|
|
1132
|
-
label: 'onStartupFinished',
|
|
1133
|
-
description: ( (localize(
|
|
1134
|
-
'vscode.extension.activationEvents.onStartupFinished',
|
|
1135
|
-
'An activation event emitted after the start-up finished (after all `*` activated extensions have finished activating).'
|
|
1136
|
-
))),
|
|
1137
|
-
body: 'onStartupFinished'
|
|
1138
|
-
},
|
|
1139
|
-
{
|
|
1140
|
-
label: 'onTaskType',
|
|
1141
|
-
description: ( (localize(
|
|
1142
|
-
'vscode.extension.activationEvents.onTaskType',
|
|
1143
|
-
'An activation event emitted whenever tasks of a certain type need to be listed or resolved.'
|
|
1144
|
-
))),
|
|
1145
|
-
body: 'onTaskType:${1:taskType}'
|
|
1146
|
-
},
|
|
1147
|
-
{
|
|
1148
|
-
label: 'onFileSystem',
|
|
1149
|
-
description: ( (localize(
|
|
1150
|
-
'vscode.extension.activationEvents.onFileSystem',
|
|
1151
|
-
'An activation event emitted whenever a file or folder is accessed with the given scheme.'
|
|
1152
|
-
))),
|
|
1153
|
-
body: 'onFileSystem:${1:scheme}'
|
|
1154
|
-
},
|
|
1155
|
-
{
|
|
1156
|
-
label: 'onSearch',
|
|
1157
|
-
description: ( (localize(
|
|
1158
|
-
'vscode.extension.activationEvents.onSearch',
|
|
1159
|
-
'An activation event emitted whenever a search is started in the folder with the given scheme.'
|
|
1160
|
-
))),
|
|
1161
|
-
body: 'onSearch:${7:scheme}'
|
|
1162
|
-
},
|
|
1163
|
-
{
|
|
1164
|
-
label: 'onView',
|
|
1165
|
-
body: 'onView:${5:viewId}',
|
|
1166
|
-
description: ( (localize(
|
|
1167
|
-
'vscode.extension.activationEvents.onView',
|
|
1168
|
-
'An activation event emitted whenever the specified view is expanded.'
|
|
1169
|
-
))),
|
|
1170
|
-
},
|
|
1171
|
-
{
|
|
1172
|
-
label: 'onIdentity',
|
|
1173
|
-
body: 'onIdentity:${8:identity}',
|
|
1174
|
-
description: ( (localize(
|
|
1175
|
-
'vscode.extension.activationEvents.onIdentity',
|
|
1176
|
-
'An activation event emitted whenever the specified user identity.'
|
|
1177
|
-
))),
|
|
1178
|
-
},
|
|
1179
|
-
{
|
|
1180
|
-
label: 'onUri',
|
|
1181
|
-
body: 'onUri',
|
|
1182
|
-
description: ( (localize(
|
|
1183
|
-
'vscode.extension.activationEvents.onUri',
|
|
1184
|
-
'An activation event emitted whenever a system-wide Uri directed towards this extension is open.'
|
|
1185
|
-
))),
|
|
1186
|
-
},
|
|
1187
|
-
{
|
|
1188
|
-
label: 'onOpenExternalUri',
|
|
1189
|
-
body: 'onOpenExternalUri',
|
|
1190
|
-
description: ( (localize(
|
|
1191
|
-
'vscode.extension.activationEvents.onOpenExternalUri',
|
|
1192
|
-
'An activation event emitted whenever a external uri (such as an http or https link) is being opened.'
|
|
1193
|
-
))),
|
|
1194
|
-
},
|
|
1195
|
-
{
|
|
1196
|
-
label: 'onCustomEditor',
|
|
1197
|
-
body: 'onCustomEditor:${9:viewType}',
|
|
1198
|
-
description: ( (localize(
|
|
1199
|
-
'vscode.extension.activationEvents.onCustomEditor',
|
|
1200
|
-
'An activation event emitted whenever the specified custom editor becomes visible.'
|
|
1201
|
-
))),
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
label: 'onNotebook',
|
|
1205
|
-
body: 'onNotebook:${1:type}',
|
|
1206
|
-
description: ( (localize(
|
|
1207
|
-
'vscode.extension.activationEvents.onNotebook',
|
|
1208
|
-
'An activation event emitted whenever the specified notebook document is opened.'
|
|
1209
|
-
))),
|
|
1210
|
-
},
|
|
1211
|
-
{
|
|
1212
|
-
label: 'onAuthenticationRequest',
|
|
1213
|
-
body: 'onAuthenticationRequest:${11:authenticationProviderId}',
|
|
1214
|
-
description: ( (localize(
|
|
1215
|
-
'vscode.extension.activationEvents.onAuthenticationRequest',
|
|
1216
|
-
'An activation event emitted whenever sessions are requested from the specified authentication provider.'
|
|
1217
|
-
)))
|
|
1218
|
-
},
|
|
1219
|
-
{
|
|
1220
|
-
label: 'onRenderer',
|
|
1221
|
-
description: ( (localize(
|
|
1222
|
-
'vscode.extension.activationEvents.onRenderer',
|
|
1223
|
-
'An activation event emitted whenever a notebook output renderer is used.'
|
|
1224
|
-
))),
|
|
1225
|
-
body: 'onRenderer:${11:rendererId}'
|
|
1226
|
-
},
|
|
1227
|
-
{
|
|
1228
|
-
label: 'onTerminalProfile',
|
|
1229
|
-
body: 'onTerminalProfile:${1:terminalId}',
|
|
1230
|
-
description: ( (localize(
|
|
1231
|
-
'vscode.extension.activationEvents.onTerminalProfile',
|
|
1232
|
-
'An activation event emitted when a specific terminal profile is launched.'
|
|
1233
|
-
))),
|
|
1234
|
-
},
|
|
1235
|
-
{
|
|
1236
|
-
label: 'onWalkthrough',
|
|
1237
|
-
body: 'onWalkthrough:${1:walkthroughID}',
|
|
1238
|
-
description: ( (localize(
|
|
1239
|
-
'vscode.extension.activationEvents.onWalkthrough',
|
|
1240
|
-
'An activation event emitted when a specified walkthrough is opened.'
|
|
1241
|
-
))),
|
|
1242
|
-
},
|
|
1243
|
-
{
|
|
1244
|
-
label: '*',
|
|
1245
|
-
description: ( (localize(
|
|
1246
|
-
'vscode.extension.activationEvents.star',
|
|
1247
|
-
'An activation event emitted on VS Code startup. To ensure a great end user experience, please use this activation event in your extension only when no other activation events combination works in your use-case.'
|
|
1248
|
-
))),
|
|
1249
|
-
body: '*'
|
|
1250
|
-
}
|
|
1251
|
-
],
|
|
1252
|
-
}
|
|
1253
|
-
},
|
|
1254
|
-
badges: {
|
|
1255
|
-
type: 'array',
|
|
1256
|
-
description: ( (localize(
|
|
1257
|
-
'vscode.extension.badges',
|
|
1258
|
-
'Array of badges to display in the sidebar of the Marketplace\'s extension page.'
|
|
1259
|
-
))),
|
|
1260
|
-
items: {
|
|
1261
|
-
type: 'object',
|
|
1262
|
-
required: ['url', 'href', 'description'],
|
|
1263
|
-
properties: {
|
|
1264
|
-
url: {
|
|
1265
|
-
type: 'string',
|
|
1266
|
-
description: ( (localize('vscode.extension.badges.url', 'Badge image URL.')))
|
|
1267
|
-
},
|
|
1268
|
-
href: {
|
|
1269
|
-
type: 'string',
|
|
1270
|
-
description: ( (localize('vscode.extension.badges.href', 'Badge link.')))
|
|
1271
|
-
},
|
|
1272
|
-
description: {
|
|
1273
|
-
type: 'string',
|
|
1274
|
-
description: ( (localize('vscode.extension.badges.description', 'Badge description.')))
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
},
|
|
1279
|
-
markdown: {
|
|
1280
|
-
type: 'string',
|
|
1281
|
-
description: ( (localize(
|
|
1282
|
-
'vscode.extension.markdown',
|
|
1283
|
-
"Controls the Markdown rendering engine used in the Marketplace. Either github (default) or standard."
|
|
1284
|
-
))),
|
|
1285
|
-
enum: ['github', 'standard'],
|
|
1286
|
-
default: 'github'
|
|
1287
|
-
},
|
|
1288
|
-
qna: {
|
|
1289
|
-
default: 'marketplace',
|
|
1290
|
-
description: ( (localize(
|
|
1291
|
-
'vscode.extension.qna',
|
|
1292
|
-
"Controls the Q&A link in the Marketplace. Set to marketplace to enable the default Marketplace Q & A site. Set to a string to provide the URL of a custom Q & A site. Set to false to disable Q & A altogether."
|
|
1293
|
-
))),
|
|
1294
|
-
anyOf: [
|
|
1295
|
-
{
|
|
1296
|
-
type: ['string', 'boolean'],
|
|
1297
|
-
enum: ['marketplace', false]
|
|
1298
|
-
},
|
|
1299
|
-
{
|
|
1300
|
-
type: 'string'
|
|
1301
|
-
}
|
|
1302
|
-
]
|
|
1303
|
-
},
|
|
1304
|
-
extensionDependencies: {
|
|
1305
|
-
description: ( (localize(
|
|
1306
|
-
'vscode.extension.extensionDependencies',
|
|
1307
|
-
'Dependencies to other extensions. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp.'
|
|
1308
|
-
))),
|
|
1309
|
-
type: 'array',
|
|
1310
|
-
uniqueItems: true,
|
|
1311
|
-
items: {
|
|
1312
|
-
type: 'string',
|
|
1313
|
-
pattern: EXTENSION_IDENTIFIER_PATTERN
|
|
1314
|
-
}
|
|
1315
|
-
},
|
|
1316
|
-
extensionPack: {
|
|
1317
|
-
description: ( (localize(
|
|
1318
|
-
'vscode.extension.contributes.extensionPack',
|
|
1319
|
-
"A set of extensions that can be installed together. The identifier of an extension is always ${publisher}.${name}. For example: vscode.csharp."
|
|
1320
|
-
))),
|
|
1321
|
-
type: 'array',
|
|
1322
|
-
uniqueItems: true,
|
|
1323
|
-
items: {
|
|
1324
|
-
type: 'string',
|
|
1325
|
-
pattern: EXTENSION_IDENTIFIER_PATTERN
|
|
1326
|
-
}
|
|
1327
|
-
},
|
|
1328
|
-
extensionKind: {
|
|
1329
|
-
description: ( (localize(
|
|
1330
|
-
'extensionKind',
|
|
1331
|
-
"Define the kind of an extension. `ui` extensions are installed and run on the local machine while `workspace` extensions run on the remote."
|
|
1332
|
-
))),
|
|
1333
|
-
type: 'array',
|
|
1334
|
-
items: extensionKindSchema,
|
|
1335
|
-
default: ['workspace'],
|
|
1336
|
-
defaultSnippets: [
|
|
1337
|
-
{
|
|
1338
|
-
body: ['ui'],
|
|
1339
|
-
description: ( (localize(
|
|
1340
|
-
'extensionKind.ui',
|
|
1341
|
-
"Define an extension which can run only on the local machine when connected to remote window."
|
|
1342
|
-
)))
|
|
1343
|
-
},
|
|
1344
|
-
{
|
|
1345
|
-
body: ['workspace'],
|
|
1346
|
-
description: ( (localize(
|
|
1347
|
-
'extensionKind.workspace',
|
|
1348
|
-
"Define an extension which can run only on the remote machine when connected remote window."
|
|
1349
|
-
)))
|
|
1350
|
-
},
|
|
1351
|
-
{
|
|
1352
|
-
body: ['ui', 'workspace'],
|
|
1353
|
-
description: ( (localize(
|
|
1354
|
-
'extensionKind.ui-workspace',
|
|
1355
|
-
"Define an extension which can run on either side, with a preference towards running on the local machine."
|
|
1356
|
-
)))
|
|
1357
|
-
},
|
|
1358
|
-
{
|
|
1359
|
-
body: ['workspace', 'ui'],
|
|
1360
|
-
description: ( (localize(
|
|
1361
|
-
'extensionKind.workspace-ui',
|
|
1362
|
-
"Define an extension which can run on either side, with a preference towards running on the remote machine."
|
|
1363
|
-
)))
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
body: [],
|
|
1367
|
-
description: ( (localize(
|
|
1368
|
-
'extensionKind.empty',
|
|
1369
|
-
"Define an extension which cannot run in a remote context, neither on the local, nor on the remote machine."
|
|
1370
|
-
)))
|
|
1371
|
-
}
|
|
1372
|
-
]
|
|
1373
|
-
},
|
|
1374
|
-
capabilities: {
|
|
1375
|
-
description: ( (localize(
|
|
1376
|
-
'vscode.extension.capabilities',
|
|
1377
|
-
"Declare the set of supported capabilities by the extension."
|
|
1378
|
-
))),
|
|
1379
|
-
type: 'object',
|
|
1380
|
-
properties: {
|
|
1381
|
-
virtualWorkspaces: {
|
|
1382
|
-
description: ( (localize(
|
|
1383
|
-
'vscode.extension.capabilities.virtualWorkspaces',
|
|
1384
|
-
"Declares whether the extension should be enabled in virtual workspaces. A virtual workspace is a workspace which is not backed by any on-disk resources. When false, this extension will be automatically disabled in virtual workspaces. Default is true."
|
|
1385
|
-
))),
|
|
1386
|
-
type: ['boolean', 'object'],
|
|
1387
|
-
defaultSnippets: [
|
|
1388
|
-
{ label: 'limited', body: { supported: '${1:limited}', description: '${2}' } },
|
|
1389
|
-
{ label: 'false', body: { supported: false, description: '${2}' } },
|
|
1390
|
-
],
|
|
1391
|
-
default: true.valueOf,
|
|
1392
|
-
properties: {
|
|
1393
|
-
supported: {
|
|
1394
|
-
markdownDescription: ( (localize(
|
|
1395
|
-
'vscode.extension.capabilities.virtualWorkspaces.supported',
|
|
1396
|
-
"Declares the level of support for virtual workspaces by the extension."
|
|
1397
|
-
))),
|
|
1398
|
-
type: ['string', 'boolean'],
|
|
1399
|
-
enum: ['limited', true, false],
|
|
1400
|
-
enumDescriptions: [
|
|
1401
|
-
( (localize(
|
|
1402
|
-
'vscode.extension.capabilities.virtualWorkspaces.supported.limited',
|
|
1403
|
-
"The extension will be enabled in virtual workspaces with some functionality disabled."
|
|
1404
|
-
))),
|
|
1405
|
-
( (localize(
|
|
1406
|
-
'vscode.extension.capabilities.virtualWorkspaces.supported.true',
|
|
1407
|
-
"The extension will be enabled in virtual workspaces with all functionality enabled."
|
|
1408
|
-
))),
|
|
1409
|
-
( (localize(
|
|
1410
|
-
'vscode.extension.capabilities.virtualWorkspaces.supported.false',
|
|
1411
|
-
"The extension will not be enabled in virtual workspaces."
|
|
1412
|
-
))),
|
|
1413
|
-
]
|
|
1414
|
-
},
|
|
1415
|
-
description: {
|
|
1416
|
-
type: 'string',
|
|
1417
|
-
markdownDescription: ( (localize(
|
|
1418
|
-
'vscode.extension.capabilities.virtualWorkspaces.description',
|
|
1419
|
-
"A description of how virtual workspaces affects the extensions behavior and why it is needed. This only applies when `supported` is not `true`."
|
|
1420
|
-
))),
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
},
|
|
1424
|
-
untrustedWorkspaces: {
|
|
1425
|
-
description: ( (localize(
|
|
1426
|
-
'vscode.extension.capabilities.untrustedWorkspaces',
|
|
1427
|
-
'Declares how the extension should be handled in untrusted workspaces.'
|
|
1428
|
-
))),
|
|
1429
|
-
type: 'object',
|
|
1430
|
-
required: ['supported'],
|
|
1431
|
-
defaultSnippets: [
|
|
1432
|
-
{ body: { supported: '${1:limited}', description: '${2}' } },
|
|
1433
|
-
],
|
|
1434
|
-
properties: {
|
|
1435
|
-
supported: {
|
|
1436
|
-
markdownDescription: ( (localize(
|
|
1437
|
-
'vscode.extension.capabilities.untrustedWorkspaces.supported',
|
|
1438
|
-
"Declares the level of support for untrusted workspaces by the extension."
|
|
1439
|
-
))),
|
|
1440
|
-
type: ['string', 'boolean'],
|
|
1441
|
-
enum: ['limited', true, false],
|
|
1442
|
-
enumDescriptions: [
|
|
1443
|
-
( (localize(
|
|
1444
|
-
'vscode.extension.capabilities.untrustedWorkspaces.supported.limited',
|
|
1445
|
-
"The extension will be enabled in untrusted workspaces with some functionality disabled."
|
|
1446
|
-
))),
|
|
1447
|
-
( (localize(
|
|
1448
|
-
'vscode.extension.capabilities.untrustedWorkspaces.supported.true',
|
|
1449
|
-
"The extension will be enabled in untrusted workspaces with all functionality enabled."
|
|
1450
|
-
))),
|
|
1451
|
-
( (localize(
|
|
1452
|
-
'vscode.extension.capabilities.untrustedWorkspaces.supported.false',
|
|
1453
|
-
"The extension will not be enabled in untrusted workspaces."
|
|
1454
|
-
))),
|
|
1455
|
-
]
|
|
1456
|
-
},
|
|
1457
|
-
restrictedConfigurations: {
|
|
1458
|
-
description: ( (localize(
|
|
1459
|
-
'vscode.extension.capabilities.untrustedWorkspaces.restrictedConfigurations',
|
|
1460
|
-
"A list of configuration keys contributed by the extension that should not use workspace values in untrusted workspaces."
|
|
1461
|
-
))),
|
|
1462
|
-
type: 'array',
|
|
1463
|
-
items: {
|
|
1464
|
-
type: 'string'
|
|
1465
|
-
}
|
|
1466
|
-
},
|
|
1467
|
-
description: {
|
|
1468
|
-
type: 'string',
|
|
1469
|
-
markdownDescription: ( (localize(
|
|
1470
|
-
'vscode.extension.capabilities.untrustedWorkspaces.description',
|
|
1471
|
-
"A description of how workspace trust affects the extensions behavior and why it is needed. This only applies when `supported` is not `true`."
|
|
1472
|
-
))),
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
},
|
|
1478
|
-
sponsor: {
|
|
1479
|
-
description: ( (localize(
|
|
1480
|
-
'vscode.extension.contributes.sponsor',
|
|
1481
|
-
"Specify the location from where users can sponsor your extension."
|
|
1482
|
-
))),
|
|
1483
|
-
type: 'object',
|
|
1484
|
-
defaultSnippets: [
|
|
1485
|
-
{ body: { url: '${1:https:}' } },
|
|
1486
|
-
],
|
|
1487
|
-
properties: {
|
|
1488
|
-
'url': {
|
|
1489
|
-
description: ( (localize(
|
|
1490
|
-
'vscode.extension.contributes.sponsor.url',
|
|
1491
|
-
"URL from where users can sponsor your extension. It must be a valid URL with a HTTP or HTTPS protocol. Example value: https://github.com/sponsors/nvaccess"
|
|
1492
|
-
))),
|
|
1493
|
-
type: 'string',
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
},
|
|
1497
|
-
scripts: {
|
|
1498
|
-
type: 'object',
|
|
1499
|
-
properties: {
|
|
1500
|
-
'vscode:prepublish': {
|
|
1501
|
-
description: ( (localize(
|
|
1502
|
-
'vscode.extension.scripts.prepublish',
|
|
1503
|
-
'Script executed before the package is published as a VS Code extension.'
|
|
1504
|
-
))),
|
|
1505
|
-
type: 'string'
|
|
1506
|
-
},
|
|
1507
|
-
'vscode:uninstall': {
|
|
1508
|
-
description: ( (localize(
|
|
1509
|
-
'vscode.extension.scripts.uninstall',
|
|
1510
|
-
'Uninstall hook for VS Code extension. Script that gets executed when the extension is completely uninstalled from VS Code which is when VS Code is restarted (shutdown and start) after the extension is uninstalled. Only Node scripts are supported.'
|
|
1511
|
-
))),
|
|
1512
|
-
type: 'string'
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
},
|
|
1516
|
-
icon: {
|
|
1517
|
-
type: 'string',
|
|
1518
|
-
description: ( (localize('vscode.extension.icon', 'The path to a 128x128 pixel icon.')))
|
|
1519
|
-
}
|
|
1520
|
-
}
|
|
1521
|
-
};
|
|
1522
|
-
class ExtensionsRegistryImpl {
|
|
1523
|
-
constructor() {
|
|
1524
|
-
this._extensionPoints = ( (new Map()));
|
|
1525
|
-
}
|
|
1526
|
-
registerExtensionPoint(desc) {
|
|
1527
|
-
if (this._extensionPoints.has(desc.extensionPoint)) {
|
|
1528
|
-
throw new Error('Duplicate extension point: ' + desc.extensionPoint);
|
|
1529
|
-
}
|
|
1530
|
-
const result = ( (new ExtensionPoint(desc.extensionPoint, desc.defaultExtensionKind)));
|
|
1531
|
-
this._extensionPoints.set(desc.extensionPoint, result);
|
|
1532
|
-
schema.properties['contributes'].properties[desc.extensionPoint] = desc.jsonSchema;
|
|
1533
|
-
schemaRegistry.registerSchema(schemaId, schema);
|
|
1534
|
-
return result;
|
|
1535
|
-
}
|
|
1536
|
-
getExtensionPoints() {
|
|
1537
|
-
return Array.from(( (this._extensionPoints.values())));
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
const PRExtensions = {
|
|
1541
|
-
ExtensionsRegistry: 'ExtensionsRegistry'
|
|
1542
|
-
};
|
|
1543
|
-
Registry.add(PRExtensions.ExtensionsRegistry, ( (new ExtensionsRegistryImpl())));
|
|
1544
|
-
const ExtensionsRegistry = ( (Registry.as(PRExtensions.ExtensionsRegistry)));
|
|
1545
|
-
schemaRegistry.registerSchema(schemaId, schema);
|
|
1546
|
-
schemaRegistry.registerSchema(productSchemaId, {
|
|
1547
|
-
properties: {
|
|
1548
|
-
extensionEnabledApiProposals: {
|
|
1549
|
-
description: ( (localize(
|
|
1550
|
-
'product.extensionEnabledApiProposals',
|
|
1551
|
-
"API proposals that the respective extensions can freely use."
|
|
1552
|
-
))),
|
|
1553
|
-
type: 'object',
|
|
1554
|
-
properties: {},
|
|
1555
|
-
additionalProperties: {
|
|
1556
|
-
anyOf: [{
|
|
1557
|
-
type: 'array',
|
|
1558
|
-
uniqueItems: true,
|
|
1559
|
-
items: {
|
|
1560
|
-
type: 'string',
|
|
1561
|
-
enum: ( (Object.keys(allApiProposals))),
|
|
1562
|
-
markdownEnumDescriptions: ( (Object.values(allApiProposals)))
|
|
1563
|
-
}
|
|
1564
|
-
}]
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
});
|
|
1569
|
-
registerIcon('settings-sync-view-icon', Codicon.sync, ( (localize('syncViewIcon', 'View icon of the Settings Sync view.'))));
|
|
1570
110
|
const IUserDataInitializationService = ( (createDecorator('IUserDataInitializationService')));
|
|
1571
111
|
const IHostColorSchemeService = ( (createDecorator('hostColorSchemeService')));
|
|
1572
112
|
class BrowserHostColorSchemeService extends Disposable {
|
|
@@ -2159,4 +699,4 @@ registerSingleton(ISnippetsService, class SnippetsService {
|
|
|
2159
699
|
this.getSnippetsSync = unsupported;
|
|
2160
700
|
}
|
|
2161
701
|
});
|
|
2162
|
-
export {
|
|
702
|
+
export { ILifecycleService as I, MacLinuxFallbackKeyboardMapper as M, NullPolicyService as N, ILanguageDetectionService as a, IPolicyService as b, IKeyboardLayoutService as c, IExtensionService as d, IPreferencesService as e, IUserDataProfileService as f, getKeyboardLayoutId as g, ITextMateService as h, isProposedApiEnabled as i, IBrowserWorkbenchEnvironmentService as j, IHostColorSchemeService as k, IUserDataInitializationService as l, checkProposedApiEnabled as m, unsupported as u };
|