1 (function(e, a) { for(var i in a) e[i] = a[i]; }(exports, /******/ (function(modules) { // webpackBootstrap
2 /******/ // The module cache
3 /******/ var installedModules = {};
5 /******/ // The require function
6 /******/ function __webpack_require__(moduleId) {
8 /******/ // Check if module is in cache
9 /******/ if(installedModules[moduleId]) {
10 /******/ return installedModules[moduleId].exports;
12 /******/ // Create a new module (and put it into the cache)
13 /******/ var module = installedModules[moduleId] = {
19 /******/ // Execute the module function
20 /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22 /******/ // Flag the module as loaded
23 /******/ module.l = true;
25 /******/ // Return the exports of the module
26 /******/ return module.exports;
30 /******/ // expose the modules object (__webpack_modules__)
31 /******/ __webpack_require__.m = modules;
33 /******/ // expose the module cache
34 /******/ __webpack_require__.c = installedModules;
36 /******/ // define getter function for harmony exports
37 /******/ __webpack_require__.d = function(exports, name, getter) {
38 /******/ if(!__webpack_require__.o(exports, name)) {
39 /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
43 /******/ // define __esModule on exports
44 /******/ __webpack_require__.r = function(exports) {
45 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48 /******/ Object.defineProperty(exports, '__esModule', { value: true });
51 /******/ // create a fake namespace object
52 /******/ // mode & 1: value is a module id, require it
53 /******/ // mode & 2: merge all properties of value into the ns
54 /******/ // mode & 4: return value when already ns object
55 /******/ // mode & 8|1: behave like require
56 /******/ __webpack_require__.t = function(value, mode) {
57 /******/ if(mode & 1) value = __webpack_require__(value);
58 /******/ if(mode & 8) return value;
59 /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60 /******/ var ns = Object.create(null);
61 /******/ __webpack_require__.r(ns);
62 /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63 /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
67 /******/ // getDefaultExport function for compatibility with non-harmony modules
68 /******/ __webpack_require__.n = function(module) {
69 /******/ var getter = module && module.__esModule ?
70 /******/ function getDefault() { return module['default']; } :
71 /******/ function getModuleExports() { return module; };
72 /******/ __webpack_require__.d(getter, 'a', getter);
73 /******/ return getter;
76 /******/ // Object.prototype.hasOwnProperty.call
77 /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79 /******/ // __webpack_public_path__
80 /******/ __webpack_require__.p = "";
83 /******/ // Load entry module and return exports
84 /******/ return __webpack_require__(__webpack_require__.s = 0);
86 /************************************************************************/
89 /***/ (function(module, exports, __webpack_require__) {
93 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
94 function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
95 return new (P || (P = Promise))(function (resolve, reject) {
96 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
97 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
98 function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
99 step((generator = generator.apply(thisArg, _arguments || [])).next());
102 var __importDefault = (this && this.__importDefault) || function (mod) {
103 return (mod && mod.__esModule) ? mod : { "default": mod };
105 Object.defineProperty(exports, "__esModule", { value: true });
106 exports.activate = void 0;
107 const path_1 = __importDefault(__webpack_require__(1));
108 const fs_1 = __importDefault(__webpack_require__(2));
109 const util_1 = __webpack_require__(3);
110 const vscode_languageserver_protocol_1 = __webpack_require__(4);
111 const catalog_json_1 = __importDefault(__webpack_require__(33));
112 const hash_1 = __webpack_require__(34);
113 const vscode_uri_1 = __webpack_require__(35);
114 const coc_nvim_1 = __webpack_require__(36);
115 const requests_1 = __webpack_require__(37);
116 const strip_bom_1 = __importDefault(__webpack_require__(38));
117 var ForceValidateRequest;
118 (function (ForceValidateRequest) {
119 ForceValidateRequest.type = new vscode_languageserver_protocol_1.RequestType('json/validate');
120 })(ForceValidateRequest || (ForceValidateRequest = {}));
121 var VSCodeContentRequest;
122 (function (VSCodeContentRequest) {
123 VSCodeContentRequest.type = new vscode_languageserver_protocol_1.RequestType('vscode/content');
124 })(VSCodeContentRequest || (VSCodeContentRequest = {}));
125 var SchemaContentChangeNotification;
126 (function (SchemaContentChangeNotification) {
127 SchemaContentChangeNotification.type = new vscode_languageserver_protocol_1.NotificationType('json/schemaContent');
128 })(SchemaContentChangeNotification || (SchemaContentChangeNotification = {}));
129 var SchemaAssociationNotification;
130 (function (SchemaAssociationNotification) {
131 SchemaAssociationNotification.type = new vscode_languageserver_protocol_1.NotificationType('json/schemaAssociations');
132 })(SchemaAssociationNotification || (SchemaAssociationNotification = {}));
134 (function (SettingIds) {
135 SettingIds.enableFormatter = 'json.format.enable';
136 SettingIds.enableSchemaDownload = 'json.schemaDownload.enable';
137 SettingIds.maxItemsComputed = 'json.maxItemsComputed';
138 })(SettingIds || (SettingIds = {}));
139 function activate(context) {
140 return __awaiter(this, void 0, void 0, function* () {
141 let { subscriptions, logger } = context;
142 const httpService = getHTTPRequestService();
143 const config = coc_nvim_1.workspace.getConfiguration().get('json', {});
146 const file = context.asAbsolutePath('lib/server.js');
147 const selector = ['json', 'jsonc'];
148 let fileSchemaErrors = new Map();
149 coc_nvim_1.events.on('BufEnter', bufnr => {
150 let doc = coc_nvim_1.workspace.getDocument(bufnr);
153 let msg = fileSchemaErrors.get(doc.uri);
155 coc_nvim_1.workspace.showMessage(`Schema error: ${msg}`, 'warning');
156 }, null, subscriptions);
157 let serverOptions = {
159 transport: coc_nvim_1.TransportKind.ipc,
161 cwd: coc_nvim_1.workspace.root,
162 execArgv: config.execArgv
165 let clientOptions = {
166 documentSelector: selector,
168 configurationSection: ['json', 'http'],
169 fileEvents: coc_nvim_1.workspace.createFileSystemWatcher('**/*.json')
171 initializationOptions: {
172 handledSchemaProtocols: ['file'],
173 customCapabilities: { rangeFormatting: { editLimit: 1000 } }
175 outputChannelName: 'json',
176 diagnosticCollectionName: 'json',
179 didChangeConfiguration: () => client.sendNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, { settings: getSettings() })
181 handleDiagnostics: (uri, diagnostics, next) => {
182 const schemaErrorIndex = diagnostics.findIndex(candidate => candidate.code === /* SchemaResolveError */ 0x300);
183 if (uri.endsWith('coc-settings.json')) {
184 diagnostics = diagnostics.filter(o => o.code != 521);
186 if (schemaErrorIndex === -1) {
187 fileSchemaErrors.delete(uri.toString());
188 return next(uri, diagnostics);
190 const schemaResolveDiagnostic = diagnostics[schemaErrorIndex];
191 fileSchemaErrors.set(uri.toString(), schemaResolveDiagnostic.message);
192 let doc = coc_nvim_1.workspace.getDocument(uri);
193 if (doc && doc.uri == uri) {
194 coc_nvim_1.workspace.showMessage(`Schema error: ${schemaResolveDiagnostic.message}`, 'warning');
196 next(uri, diagnostics);
198 resolveCompletionItem: (item, token, next) => {
199 return Promise.resolve(next(item, token)).then((item) => {
200 if (item.data.detail) {
201 item.detail = item.data.detail;
207 provideCompletionItem: (document, position, context, token, next) => {
208 return Promise.resolve(next(document, position, context, token)).then((res) => {
209 let doc = coc_nvim_1.workspace.getDocument(document.uri);
212 let items = res.hasOwnProperty('isIncomplete') ? res.items : res;
213 let line = doc.getline(position.line);
214 for (let item of items) {
215 let { textEdit, insertText, label, filterText } = item; // tslint:disable-line
216 item.insertText = null; // tslint:disable-line
217 if (textEdit && textEdit.newText) {
218 let newText = insertText || textEdit.newText;
219 textEdit.newText = newText;
220 let { start, end } = textEdit.range;
221 if (line[start.character] && line[end.character - 1] && /^".*"$/.test(label)) {
222 item.label = item.label.slice(1, -1);
225 if (filterText && /^".*"$/.test(filterText)) {
226 item.filterText = filterText.slice(1, -1);
233 if (items.length && items.every(o => o.kind == vscode_languageserver_protocol_1.CompletionItemKind.Property)) {
234 result.startcol = doc.fixStartcol(position, ['.']);
241 let client = new coc_nvim_1.LanguageClient('json', 'Json language server', serverOptions, clientOptions);
242 subscriptions.push(coc_nvim_1.services.registLanguageClient(client));
243 client.onReady().then(() => {
245 client.sendNotification(SchemaAssociationNotification.type, getSchemaAssociations(context));
246 coc_nvim_1.extensions.onDidUnloadExtension(() => {
247 client.sendNotification(SchemaAssociationNotification.type, getSchemaAssociations(context));
248 }, null, subscriptions);
249 coc_nvim_1.extensions.onDidLoadExtension(() => {
250 client.sendNotification(SchemaAssociationNotification.type, getSchemaAssociations(context));
251 }, null, subscriptions);
252 let schemaDownloadEnabled = true;
253 function updateSchemaDownloadSetting() {
254 schemaDownloadEnabled = coc_nvim_1.workspace.getConfiguration().get(SettingIds.enableSchemaDownload) !== false;
256 updateSchemaDownloadSetting();
257 coc_nvim_1.workspace.onDidChangeConfiguration(e => {
258 if (e.affectsConfiguration(SettingIds.enableSchemaDownload)) {
259 updateSchemaDownloadSetting();
261 }, null, subscriptions);
262 const schemaDocuments = {};
263 client.onRequest(VSCodeContentRequest.type, (uriPath) => __awaiter(this, void 0, void 0, function* () {
264 const uri = vscode_uri_1.URI.parse(uriPath);
265 if (uri.scheme === 'untitled') {
266 return Promise.reject(new vscode_languageserver_protocol_1.ResponseError(3, `Unable to load ${uri.scheme}`));
268 if (uriPath == 'vscode://settings') {
269 let schemaContent = yield util_1.promisify(fs_1.default.readFile)(path_1.default.join(coc_nvim_1.workspace.pluginRoot, 'data/schema.json'), 'utf8');
270 let settingsSchema = JSON.parse(schemaContent);
271 let schema = Object.assign({}, settingsSchema);
272 schema.properties = schema.properties || {};
273 if (coc_nvim_1.extensions.schemes)
274 Object.assign(schema.properties, coc_nvim_1.extensions.schemes);
275 coc_nvim_1.extensions.all.forEach(extension => {
276 let { packageJSON } = extension;
277 let { contributes } = packageJSON;
280 let { configuration } = contributes;
282 let { properties, definitions } = configuration;
284 Object.assign(schema.properties, properties);
286 Object.assign(schema.definitions, definitions);
289 return JSON.stringify(schema);
291 if (uri.scheme !== 'http' && uri.scheme !== 'https') {
292 let doc = yield coc_nvim_1.workspace.loadFile(uriPath);
293 schemaDocuments[uri.toString()] = true;
294 return doc.getDocumentContent();
296 else if (schemaDownloadEnabled) {
297 return yield Promise.resolve(httpService.getContent(uriPath));
300 logger.warn(`Schema download disabled!`);
304 const handleContentChange = (uriString) => {
305 if (schemaDocuments[uriString]) {
306 client.sendNotification(SchemaContentChangeNotification.type, uriString);
311 coc_nvim_1.workspace.onDidChangeTextDocument(e => handleContentChange(e.textDocument.uri));
312 coc_nvim_1.workspace.onDidCloseTextDocument(doc => {
313 const uriString = doc.uri;
314 if (handleContentChange(uriString)) {
315 delete schemaDocuments[uriString];
317 fileSchemaErrors.delete(doc.uri);
318 }, null, subscriptions);
322 let statusItem = coc_nvim_1.workspace.createStatusBarItem(0, { progress: true });
323 subscriptions.push(statusItem);
324 subscriptions.push(coc_nvim_1.commands.registerCommand('json.retryResolveSchema', () => __awaiter(this, void 0, void 0, function* () {
325 let doc = yield coc_nvim_1.workspace.document;
326 if (!doc || ['json', 'jsonc'].indexOf(doc.filetype) == -1)
328 statusItem.isProgress = true;
329 statusItem.text = 'loading schema';
331 client.sendRequest(ForceValidateRequest.type, doc.uri).then((diagnostics) => {
332 statusItem.text = '⚠️';
333 statusItem.isProgress = false;
334 const schemaErrorIndex = diagnostics.findIndex(candidate => candidate.code === /* SchemaResolveError */ 0x300);
335 if (schemaErrorIndex !== -1) {
336 // Show schema resolution errors in status bar only; ref: #51032
337 const schemaResolveDiagnostic = diagnostics[schemaErrorIndex];
338 fileSchemaErrors.set(doc.uri, schemaResolveDiagnostic.message);
346 statusItem.isProgress = false;
347 statusItem.text = '⚠️';
352 exports.activate = activate;
353 function getSettings() {
354 let httpSettings = coc_nvim_1.workspace.getConfiguration('http');
357 proxy: httpSettings.get('proxy'),
358 proxyStrictSSL: httpSettings.get('proxyStrictSSL')
361 format: coc_nvim_1.workspace.getConfiguration('json').get('format'),
365 let schemaSettingsById = Object.create(null);
366 let collectSchemaSettings = (schemaSettings, rootPath, fileMatchPrefix) => {
367 for (let setting of schemaSettings) {
368 let url = getSchemaId(setting, rootPath);
372 let schemaSetting = schemaSettingsById[url];
373 if (!schemaSetting) {
374 schemaSetting = schemaSettingsById[url] = { url, fileMatch: [] };
375 settings.json.schemas.push(schemaSetting);
377 let fileMatches = setting.fileMatch;
378 let resultingFileMatches = schemaSetting.fileMatch;
379 if (Array.isArray(fileMatches)) {
380 if (fileMatchPrefix) {
381 for (let fileMatch of fileMatches) {
382 if (fileMatch[0] === '/') {
383 resultingFileMatches.push(fileMatchPrefix + fileMatch);
384 resultingFileMatches.push(fileMatchPrefix + '/*' + fileMatch);
387 resultingFileMatches.push(fileMatchPrefix + '/' + fileMatch);
388 resultingFileMatches.push(fileMatchPrefix + '/*/' + fileMatch);
393 resultingFileMatches.push(...fileMatches);
396 if (setting.schema) {
397 schemaSetting.schema = setting.schema;
401 // merge global and folder settings. Qualify all file matches with the folder path.
402 let globalSettings = coc_nvim_1.workspace.getConfiguration('json', null).get('schemas');
403 if (Array.isArray(globalSettings)) {
404 collectSchemaSettings(globalSettings, coc_nvim_1.workspace.root);
408 function getSchemaId(schema, rootPath) {
409 let url = schema.url;
412 url = schema.schema.id || `vscode://schemas/custom/${encodeURIComponent(hash_1.hash(schema.schema).toString(16))}`;
415 else if (rootPath && (url[0] === '.' || url[0] === '/')) {
416 url = vscode_uri_1.URI.file(path_1.default.normalize(path_1.default.join(rootPath, url))).toString();
420 function getHTTPRequestService() {
422 getContent(uri, _encoding) {
423 const headers = { 'Accept-Encoding': 'gzip, deflate' };
424 return coc_nvim_1.fetch(uri, { headers }).then(res => {
425 if (typeof res === 'string') {
428 if (Buffer.isBuffer(res)) {
429 return strip_bom_1.default(res.toString('utf8'));
431 return JSON.stringify(res);
436 function getSchemaAssociations(_context) {
437 const associations = [];
438 associations.push({ fileMatch: ['coc-settings.json'], uri: 'vscode://settings' });
439 for (let item of catalog_json_1.default.schemas) {
440 let { fileMatch, url } = item;
441 if (Array.isArray(fileMatch)) {
442 associations.push({ fileMatch, uri: url });
444 else if (typeof fileMatch === 'string') {
445 associations.push({ fileMatch: [fileMatch], uri: url });
448 coc_nvim_1.extensions.all.forEach(extension => {
449 const packageJSON = extension.packageJSON;
450 if (packageJSON && packageJSON.contributes && packageJSON.contributes.jsonValidation) {
451 const jsonValidation = packageJSON.contributes.jsonValidation;
452 if (Array.isArray(jsonValidation)) {
453 jsonValidation.forEach(jv => {
454 let { fileMatch, url } = jv;
455 if (typeof fileMatch === 'string') {
456 fileMatch = [fileMatch];
458 if (Array.isArray(fileMatch) && typeof url === 'string') {
460 if (uri[0] === '.' && uri[1] === '/') {
461 uri = requests_1.joinPath(vscode_uri_1.URI.file(extension.extensionPath), uri).toString();
463 fileMatch = fileMatch.map(fm => {
465 fm = fm.replace(/%APP_SETTINGS_HOME%/, '/User');
466 fm = fm.replace(/%MACHINE_SETTINGS_HOME%/, '/Machine');
467 fm = fm.replace(/%APP_WORKSPACES_HOME%/, '/Workspaces');
469 else if (!fm.match(/^(\w+:\/\/|\/|!)/)) {
474 associations.push({ fileMatch, uri });
486 /***/ (function(module, exports) {
488 module.exports = require("path");
492 /***/ (function(module, exports) {
494 module.exports = require("fs");
498 /***/ (function(module, exports) {
500 module.exports = require("util");
504 /***/ (function(module, exports, __webpack_require__) {
507 /* --------------------------------------------------------------------------------------------
\r
508 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
509 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
510 * ------------------------------------------------------------------------------------------ */
\r
512 function __export(m) {
\r
513 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
\r
515 Object.defineProperty(exports, "__esModule", { value: true });
\r
516 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
517 exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes;
\r
518 exports.ResponseError = vscode_jsonrpc_1.ResponseError;
\r
519 exports.CancellationToken = vscode_jsonrpc_1.CancellationToken;
\r
520 exports.CancellationTokenSource = vscode_jsonrpc_1.CancellationTokenSource;
\r
521 exports.Disposable = vscode_jsonrpc_1.Disposable;
\r
522 exports.Event = vscode_jsonrpc_1.Event;
\r
523 exports.Emitter = vscode_jsonrpc_1.Emitter;
\r
524 exports.Trace = vscode_jsonrpc_1.Trace;
\r
525 exports.TraceFormat = vscode_jsonrpc_1.TraceFormat;
\r
526 exports.SetTraceNotification = vscode_jsonrpc_1.SetTraceNotification;
\r
527 exports.LogTraceNotification = vscode_jsonrpc_1.LogTraceNotification;
\r
528 exports.RequestType = vscode_jsonrpc_1.RequestType;
\r
529 exports.RequestType0 = vscode_jsonrpc_1.RequestType0;
\r
530 exports.NotificationType = vscode_jsonrpc_1.NotificationType;
\r
531 exports.NotificationType0 = vscode_jsonrpc_1.NotificationType0;
\r
532 exports.MessageReader = vscode_jsonrpc_1.MessageReader;
\r
533 exports.MessageWriter = vscode_jsonrpc_1.MessageWriter;
\r
534 exports.ConnectionStrategy = vscode_jsonrpc_1.ConnectionStrategy;
\r
535 exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader;
\r
536 exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter;
\r
537 exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader;
\r
538 exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter;
\r
539 exports.createClientPipeTransport = vscode_jsonrpc_1.createClientPipeTransport;
\r
540 exports.createServerPipeTransport = vscode_jsonrpc_1.createServerPipeTransport;
\r
541 exports.generateRandomPipeName = vscode_jsonrpc_1.generateRandomPipeName;
\r
542 exports.createClientSocketTransport = vscode_jsonrpc_1.createClientSocketTransport;
\r
543 exports.createServerSocketTransport = vscode_jsonrpc_1.createServerSocketTransport;
\r
544 exports.ProgressType = vscode_jsonrpc_1.ProgressType;
\r
545 __export(__webpack_require__(18));
\r
546 __export(__webpack_require__(19));
\r
547 const callHierarchy = __webpack_require__(31);
\r
548 const st = __webpack_require__(32);
\r
550 (function (Proposed) {
\r
551 let CallHierarchyPrepareRequest;
\r
552 (function (CallHierarchyPrepareRequest) {
\r
553 CallHierarchyPrepareRequest.method = callHierarchy.CallHierarchyPrepareRequest.method;
\r
554 CallHierarchyPrepareRequest.type = callHierarchy.CallHierarchyPrepareRequest.type;
\r
555 })(CallHierarchyPrepareRequest = Proposed.CallHierarchyPrepareRequest || (Proposed.CallHierarchyPrepareRequest = {}));
\r
556 let CallHierarchyIncomingCallsRequest;
\r
557 (function (CallHierarchyIncomingCallsRequest) {
\r
558 CallHierarchyIncomingCallsRequest.method = callHierarchy.CallHierarchyIncomingCallsRequest.method;
\r
559 CallHierarchyIncomingCallsRequest.type = callHierarchy.CallHierarchyIncomingCallsRequest.type;
\r
560 })(CallHierarchyIncomingCallsRequest = Proposed.CallHierarchyIncomingCallsRequest || (Proposed.CallHierarchyIncomingCallsRequest = {}));
\r
561 let CallHierarchyOutgoingCallsRequest;
\r
562 (function (CallHierarchyOutgoingCallsRequest) {
\r
563 CallHierarchyOutgoingCallsRequest.method = callHierarchy.CallHierarchyOutgoingCallsRequest.method;
\r
564 CallHierarchyOutgoingCallsRequest.type = callHierarchy.CallHierarchyOutgoingCallsRequest.type;
\r
565 })(CallHierarchyOutgoingCallsRequest = Proposed.CallHierarchyOutgoingCallsRequest || (Proposed.CallHierarchyOutgoingCallsRequest = {}));
\r
566 Proposed.SemanticTokenTypes = st.SemanticTokenTypes;
\r
567 Proposed.SemanticTokenModifiers = st.SemanticTokenModifiers;
\r
568 Proposed.SemanticTokens = st.SemanticTokens;
\r
569 let SemanticTokensRequest;
\r
570 (function (SemanticTokensRequest) {
\r
571 SemanticTokensRequest.method = st.SemanticTokensRequest.method;
\r
572 SemanticTokensRequest.type = st.SemanticTokensRequest.type;
\r
573 })(SemanticTokensRequest = Proposed.SemanticTokensRequest || (Proposed.SemanticTokensRequest = {}));
\r
574 let SemanticTokensEditsRequest;
\r
575 (function (SemanticTokensEditsRequest) {
\r
576 SemanticTokensEditsRequest.method = st.SemanticTokensEditsRequest.method;
\r
577 SemanticTokensEditsRequest.type = st.SemanticTokensEditsRequest.type;
\r
578 })(SemanticTokensEditsRequest = Proposed.SemanticTokensEditsRequest || (Proposed.SemanticTokensEditsRequest = {}));
\r
579 let SemanticTokensRangeRequest;
\r
580 (function (SemanticTokensRangeRequest) {
\r
581 SemanticTokensRangeRequest.method = st.SemanticTokensRangeRequest.method;
\r
582 SemanticTokensRangeRequest.type = st.SemanticTokensRangeRequest.type;
\r
583 })(SemanticTokensRangeRequest = Proposed.SemanticTokensRangeRequest || (Proposed.SemanticTokensRangeRequest = {}));
\r
584 })(Proposed = exports.Proposed || (exports.Proposed = {}));
\r
585 function createProtocolConnection(reader, writer, logger, strategy) {
\r
586 return vscode_jsonrpc_1.createMessageConnection(reader, writer, logger, strategy);
\r
588 exports.createProtocolConnection = createProtocolConnection;
\r
593 /***/ (function(module, exports, __webpack_require__) {
596 /* --------------------------------------------------------------------------------------------
\r
597 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
598 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
599 * ------------------------------------------------------------------------------------------ */
\r
600 /// <reference path="../typings/thenable.d.ts" />
\r
602 function __export(m) {
\r
603 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
\r
605 Object.defineProperty(exports, "__esModule", { value: true });
\r
606 const Is = __webpack_require__(6);
\r
607 const messages_1 = __webpack_require__(7);
\r
608 exports.RequestType = messages_1.RequestType;
\r
609 exports.RequestType0 = messages_1.RequestType0;
\r
610 exports.RequestType1 = messages_1.RequestType1;
\r
611 exports.RequestType2 = messages_1.RequestType2;
\r
612 exports.RequestType3 = messages_1.RequestType3;
\r
613 exports.RequestType4 = messages_1.RequestType4;
\r
614 exports.RequestType5 = messages_1.RequestType5;
\r
615 exports.RequestType6 = messages_1.RequestType6;
\r
616 exports.RequestType7 = messages_1.RequestType7;
\r
617 exports.RequestType8 = messages_1.RequestType8;
\r
618 exports.RequestType9 = messages_1.RequestType9;
\r
619 exports.ResponseError = messages_1.ResponseError;
\r
620 exports.ErrorCodes = messages_1.ErrorCodes;
\r
621 exports.NotificationType = messages_1.NotificationType;
\r
622 exports.NotificationType0 = messages_1.NotificationType0;
\r
623 exports.NotificationType1 = messages_1.NotificationType1;
\r
624 exports.NotificationType2 = messages_1.NotificationType2;
\r
625 exports.NotificationType3 = messages_1.NotificationType3;
\r
626 exports.NotificationType4 = messages_1.NotificationType4;
\r
627 exports.NotificationType5 = messages_1.NotificationType5;
\r
628 exports.NotificationType6 = messages_1.NotificationType6;
\r
629 exports.NotificationType7 = messages_1.NotificationType7;
\r
630 exports.NotificationType8 = messages_1.NotificationType8;
\r
631 exports.NotificationType9 = messages_1.NotificationType9;
\r
632 const messageReader_1 = __webpack_require__(8);
\r
633 exports.MessageReader = messageReader_1.MessageReader;
\r
634 exports.StreamMessageReader = messageReader_1.StreamMessageReader;
\r
635 exports.IPCMessageReader = messageReader_1.IPCMessageReader;
\r
636 exports.SocketMessageReader = messageReader_1.SocketMessageReader;
\r
637 const messageWriter_1 = __webpack_require__(10);
\r
638 exports.MessageWriter = messageWriter_1.MessageWriter;
\r
639 exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter;
\r
640 exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter;
\r
641 exports.SocketMessageWriter = messageWriter_1.SocketMessageWriter;
\r
642 const events_1 = __webpack_require__(9);
\r
643 exports.Disposable = events_1.Disposable;
\r
644 exports.Event = events_1.Event;
\r
645 exports.Emitter = events_1.Emitter;
\r
646 const cancellation_1 = __webpack_require__(11);
\r
647 exports.CancellationTokenSource = cancellation_1.CancellationTokenSource;
\r
648 exports.CancellationToken = cancellation_1.CancellationToken;
\r
649 const linkedMap_1 = __webpack_require__(12);
\r
650 __export(__webpack_require__(13));
\r
651 __export(__webpack_require__(17));
\r
652 var CancelNotification;
\r
653 (function (CancelNotification) {
\r
654 CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');
\r
655 })(CancelNotification || (CancelNotification = {}));
\r
656 var ProgressNotification;
\r
657 (function (ProgressNotification) {
\r
658 ProgressNotification.type = new messages_1.NotificationType('$/progress');
\r
659 })(ProgressNotification || (ProgressNotification = {}));
\r
660 class ProgressType {
\r
664 exports.ProgressType = ProgressType;
\r
665 exports.NullLogger = Object.freeze({
\r
672 (function (Trace) {
\r
673 Trace[Trace["Off"] = 0] = "Off";
\r
674 Trace[Trace["Messages"] = 1] = "Messages";
\r
675 Trace[Trace["Verbose"] = 2] = "Verbose";
\r
676 })(Trace = exports.Trace || (exports.Trace = {}));
\r
677 (function (Trace) {
\r
678 function fromString(value) {
\r
679 if (!Is.string(value)) {
\r
682 value = value.toLowerCase();
\r
687 return Trace.Messages;
\r
689 return Trace.Verbose;
\r
694 Trace.fromString = fromString;
\r
695 function toString(value) {
\r
699 case Trace.Messages:
\r
701 case Trace.Verbose:
\r
707 Trace.toString = toString;
\r
708 })(Trace = exports.Trace || (exports.Trace = {}));
\r
710 (function (TraceFormat) {
\r
711 TraceFormat["Text"] = "text";
\r
712 TraceFormat["JSON"] = "json";
\r
713 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
\r
714 (function (TraceFormat) {
\r
715 function fromString(value) {
\r
716 value = value.toLowerCase();
\r
717 if (value === 'json') {
\r
718 return TraceFormat.JSON;
\r
721 return TraceFormat.Text;
\r
724 TraceFormat.fromString = fromString;
\r
725 })(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));
\r
726 var SetTraceNotification;
\r
727 (function (SetTraceNotification) {
\r
728 SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification');
\r
729 })(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));
\r
730 var LogTraceNotification;
\r
731 (function (LogTraceNotification) {
\r
732 LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification');
\r
733 })(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
\r
734 var ConnectionErrors;
\r
735 (function (ConnectionErrors) {
\r
737 * The connection is closed.
\r
739 ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
\r
741 * The connection got disposed.
\r
743 ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
\r
745 * The connection is already in listening mode.
\r
747 ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
\r
748 })(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
\r
749 class ConnectionError extends Error {
\r
750 constructor(code, message) {
\r
753 Object.setPrototypeOf(this, ConnectionError.prototype);
\r
756 exports.ConnectionError = ConnectionError;
\r
757 var ConnectionStrategy;
\r
758 (function (ConnectionStrategy) {
\r
759 function is(value) {
\r
760 let candidate = value;
\r
761 return candidate && Is.func(candidate.cancelUndispatched);
\r
763 ConnectionStrategy.is = is;
\r
764 })(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));
\r
765 var ConnectionState;
\r
766 (function (ConnectionState) {
\r
767 ConnectionState[ConnectionState["New"] = 1] = "New";
\r
768 ConnectionState[ConnectionState["Listening"] = 2] = "Listening";
\r
769 ConnectionState[ConnectionState["Closed"] = 3] = "Closed";
\r
770 ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed";
\r
771 })(ConnectionState || (ConnectionState = {}));
\r
772 function _createMessageConnection(messageReader, messageWriter, logger, strategy) {
\r
773 let sequenceNumber = 0;
\r
774 let notificationSquenceNumber = 0;
\r
775 let unknownResponseSquenceNumber = 0;
\r
776 const version = '2.0';
\r
777 let starRequestHandler = undefined;
\r
778 let requestHandlers = Object.create(null);
\r
779 let starNotificationHandler = undefined;
\r
780 let notificationHandlers = Object.create(null);
\r
781 let progressHandlers = new Map();
\r
783 let messageQueue = new linkedMap_1.LinkedMap();
\r
784 let responsePromises = Object.create(null);
\r
785 let requestTokens = Object.create(null);
\r
786 let trace = Trace.Off;
\r
787 let traceFormat = TraceFormat.Text;
\r
789 let state = ConnectionState.New;
\r
790 let errorEmitter = new events_1.Emitter();
\r
791 let closeEmitter = new events_1.Emitter();
\r
792 let unhandledNotificationEmitter = new events_1.Emitter();
\r
793 let unhandledProgressEmitter = new events_1.Emitter();
\r
794 let disposeEmitter = new events_1.Emitter();
\r
795 function createRequestQueueKey(id) {
\r
796 return 'req-' + id.toString();
\r
798 function createResponseQueueKey(id) {
\r
800 return 'res-unknown-' + (++unknownResponseSquenceNumber).toString();
\r
803 return 'res-' + id.toString();
\r
806 function createNotificationQueueKey() {
\r
807 return 'not-' + (++notificationSquenceNumber).toString();
\r
809 function addMessageToQueue(queue, message) {
\r
810 if (messages_1.isRequestMessage(message)) {
\r
811 queue.set(createRequestQueueKey(message.id), message);
\r
813 else if (messages_1.isResponseMessage(message)) {
\r
814 queue.set(createResponseQueueKey(message.id), message);
\r
817 queue.set(createNotificationQueueKey(), message);
\r
820 function cancelUndispatched(_message) {
\r
823 function isListening() {
\r
824 return state === ConnectionState.Listening;
\r
826 function isClosed() {
\r
827 return state === ConnectionState.Closed;
\r
829 function isDisposed() {
\r
830 return state === ConnectionState.Disposed;
\r
832 function closeHandler() {
\r
833 if (state === ConnectionState.New || state === ConnectionState.Listening) {
\r
834 state = ConnectionState.Closed;
\r
835 closeEmitter.fire(undefined);
\r
837 // If the connection is disposed don't sent close events.
\r
839 function readErrorHandler(error) {
\r
840 errorEmitter.fire([error, undefined, undefined]);
\r
842 function writeErrorHandler(data) {
\r
843 errorEmitter.fire(data);
\r
845 messageReader.onClose(closeHandler);
\r
846 messageReader.onError(readErrorHandler);
\r
847 messageWriter.onClose(closeHandler);
\r
848 messageWriter.onError(writeErrorHandler);
\r
849 function triggerMessageQueue() {
\r
850 if (timer || messageQueue.size === 0) {
\r
853 timer = setImmediate(() => {
\r
855 processMessageQueue();
\r
858 function processMessageQueue() {
\r
859 if (messageQueue.size === 0) {
\r
862 let message = messageQueue.shift();
\r
864 if (messages_1.isRequestMessage(message)) {
\r
865 handleRequest(message);
\r
867 else if (messages_1.isNotificationMessage(message)) {
\r
868 handleNotification(message);
\r
870 else if (messages_1.isResponseMessage(message)) {
\r
871 handleResponse(message);
\r
874 handleInvalidMessage(message);
\r
878 triggerMessageQueue();
\r
881 let callback = (message) => {
\r
883 // We have received a cancellation message. Check if the message is still in the queue
\r
884 // and cancel it if allowed to do so.
\r
885 if (messages_1.isNotificationMessage(message) && message.method === CancelNotification.type.method) {
\r
886 let key = createRequestQueueKey(message.params.id);
\r
887 let toCancel = messageQueue.get(key);
\r
888 if (messages_1.isRequestMessage(toCancel)) {
\r
889 let response = strategy && strategy.cancelUndispatched ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);
\r
890 if (response && (response.error !== void 0 || response.result !== void 0)) {
\r
891 messageQueue.delete(key);
\r
892 response.id = toCancel.id;
\r
893 traceSendingResponse(response, message.method, Date.now());
\r
894 messageWriter.write(response);
\r
899 addMessageToQueue(messageQueue, message);
\r
902 triggerMessageQueue();
\r
905 function handleRequest(requestMessage) {
\r
906 if (isDisposed()) {
\r
907 // we return here silently since we fired an event when the
\r
908 // connection got disposed.
\r
911 function reply(resultOrError, method, startTime) {
\r
914 id: requestMessage.id
\r
916 if (resultOrError instanceof messages_1.ResponseError) {
\r
917 message.error = resultOrError.toJson();
\r
920 message.result = resultOrError === void 0 ? null : resultOrError;
\r
922 traceSendingResponse(message, method, startTime);
\r
923 messageWriter.write(message);
\r
925 function replyError(error, method, startTime) {
\r
928 id: requestMessage.id,
\r
929 error: error.toJson()
\r
931 traceSendingResponse(message, method, startTime);
\r
932 messageWriter.write(message);
\r
934 function replySuccess(result, method, startTime) {
\r
935 // The JSON RPC defines that a response must either have a result or an error
\r
936 // So we can't treat undefined as a valid response result.
\r
937 if (result === void 0) {
\r
942 id: requestMessage.id,
\r
945 traceSendingResponse(message, method, startTime);
\r
946 messageWriter.write(message);
\r
948 traceReceivedRequest(requestMessage);
\r
949 let element = requestHandlers[requestMessage.method];
\r
951 let requestHandler;
\r
953 type = element.type;
\r
954 requestHandler = element.handler;
\r
956 let startTime = Date.now();
\r
957 if (requestHandler || starRequestHandler) {
\r
958 let cancellationSource = new cancellation_1.CancellationTokenSource();
\r
959 let tokenKey = String(requestMessage.id);
\r
960 requestTokens[tokenKey] = cancellationSource;
\r
963 if (requestMessage.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
\r
964 handlerResult = requestHandler
\r
965 ? requestHandler(cancellationSource.token)
\r
966 : starRequestHandler(requestMessage.method, cancellationSource.token);
\r
968 else if (Is.array(requestMessage.params) && (type === void 0 || type.numberOfParams > 1)) {
\r
969 handlerResult = requestHandler
\r
970 ? requestHandler(...requestMessage.params, cancellationSource.token)
\r
971 : starRequestHandler(requestMessage.method, ...requestMessage.params, cancellationSource.token);
\r
974 handlerResult = requestHandler
\r
975 ? requestHandler(requestMessage.params, cancellationSource.token)
\r
976 : starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);
\r
978 let promise = handlerResult;
\r
979 if (!handlerResult) {
\r
980 delete requestTokens[tokenKey];
\r
981 replySuccess(handlerResult, requestMessage.method, startTime);
\r
983 else if (promise.then) {
\r
984 promise.then((resultOrError) => {
\r
985 delete requestTokens[tokenKey];
\r
986 reply(resultOrError, requestMessage.method, startTime);
\r
988 delete requestTokens[tokenKey];
\r
989 if (error instanceof messages_1.ResponseError) {
\r
990 replyError(error, requestMessage.method, startTime);
\r
992 else if (error && Is.string(error.message)) {
\r
993 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
\r
996 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
\r
1001 delete requestTokens[tokenKey];
\r
1002 reply(handlerResult, requestMessage.method, startTime);
\r
1006 delete requestTokens[tokenKey];
\r
1007 if (error instanceof messages_1.ResponseError) {
\r
1008 reply(error, requestMessage.method, startTime);
\r
1010 else if (error && Is.string(error.message)) {
\r
1011 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);
\r
1014 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);
\r
1019 replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);
\r
1022 function handleResponse(responseMessage) {
\r
1023 if (isDisposed()) {
\r
1024 // See handle request.
\r
1027 if (responseMessage.id === null) {
\r
1028 if (responseMessage.error) {
\r
1029 logger.error(`Received response message without id: Error is: \n${JSON.stringify(responseMessage.error, undefined, 4)}`);
\r
1032 logger.error(`Received response message without id. No further error information provided.`);
\r
1036 let key = String(responseMessage.id);
\r
1037 let responsePromise = responsePromises[key];
\r
1038 traceReceivedResponse(responseMessage, responsePromise);
\r
1039 if (responsePromise) {
\r
1040 delete responsePromises[key];
\r
1042 if (responseMessage.error) {
\r
1043 let error = responseMessage.error;
\r
1044 responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));
\r
1046 else if (responseMessage.result !== void 0) {
\r
1047 responsePromise.resolve(responseMessage.result);
\r
1050 throw new Error('Should never happen.');
\r
1054 if (error.message) {
\r
1055 logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);
\r
1058 logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);
\r
1064 function handleNotification(message) {
\r
1065 if (isDisposed()) {
\r
1066 // See handle request.
\r
1069 let type = undefined;
\r
1070 let notificationHandler;
\r
1071 if (message.method === CancelNotification.type.method) {
\r
1072 notificationHandler = (params) => {
\r
1073 let id = params.id;
\r
1074 let source = requestTokens[String(id)];
\r
1081 let element = notificationHandlers[message.method];
\r
1083 notificationHandler = element.handler;
\r
1084 type = element.type;
\r
1087 if (notificationHandler || starNotificationHandler) {
\r
1089 traceReceivedNotification(message);
\r
1090 if (message.params === void 0 || (type !== void 0 && type.numberOfParams === 0)) {
\r
1091 notificationHandler ? notificationHandler() : starNotificationHandler(message.method);
\r
1093 else if (Is.array(message.params) && (type === void 0 || type.numberOfParams > 1)) {
\r
1094 notificationHandler ? notificationHandler(...message.params) : starNotificationHandler(message.method, ...message.params);
\r
1097 notificationHandler ? notificationHandler(message.params) : starNotificationHandler(message.method, message.params);
\r
1101 if (error.message) {
\r
1102 logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);
\r
1105 logger.error(`Notification handler '${message.method}' failed unexpectedly.`);
\r
1110 unhandledNotificationEmitter.fire(message);
\r
1113 function handleInvalidMessage(message) {
\r
1115 logger.error('Received empty message.');
\r
1118 logger.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(message, null, 4)}`);
\r
1119 // Test whether we find an id to reject the promise
\r
1120 let responseMessage = message;
\r
1121 if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {
\r
1122 let key = String(responseMessage.id);
\r
1123 let responseHandler = responsePromises[key];
\r
1124 if (responseHandler) {
\r
1125 responseHandler.reject(new Error('The received response has neither a result nor an error property.'));
\r
1129 function traceSendingRequest(message) {
\r
1130 if (trace === Trace.Off || !tracer) {
\r
1133 if (traceFormat === TraceFormat.Text) {
\r
1134 let data = undefined;
\r
1135 if (trace === Trace.Verbose && message.params) {
\r
1136 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
1138 tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);
\r
1141 logLSPMessage('send-request', message);
\r
1144 function traceSendingNotification(message) {
\r
1145 if (trace === Trace.Off || !tracer) {
\r
1148 if (traceFormat === TraceFormat.Text) {
\r
1149 let data = undefined;
\r
1150 if (trace === Trace.Verbose) {
\r
1151 if (message.params) {
\r
1152 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
1155 data = 'No parameters provided.\n\n';
\r
1158 tracer.log(`Sending notification '${message.method}'.`, data);
\r
1161 logLSPMessage('send-notification', message);
\r
1164 function traceSendingResponse(message, method, startTime) {
\r
1165 if (trace === Trace.Off || !tracer) {
\r
1168 if (traceFormat === TraceFormat.Text) {
\r
1169 let data = undefined;
\r
1170 if (trace === Trace.Verbose) {
\r
1171 if (message.error && message.error.data) {
\r
1172 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
\r
1175 if (message.result) {
\r
1176 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
\r
1178 else if (message.error === void 0) {
\r
1179 data = 'No result returned.\n\n';
\r
1183 tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);
\r
1186 logLSPMessage('send-response', message);
\r
1189 function traceReceivedRequest(message) {
\r
1190 if (trace === Trace.Off || !tracer) {
\r
1193 if (traceFormat === TraceFormat.Text) {
\r
1194 let data = undefined;
\r
1195 if (trace === Trace.Verbose && message.params) {
\r
1196 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
1198 tracer.log(`Received request '${message.method} - (${message.id})'.`, data);
\r
1201 logLSPMessage('receive-request', message);
\r
1204 function traceReceivedNotification(message) {
\r
1205 if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {
\r
1208 if (traceFormat === TraceFormat.Text) {
\r
1209 let data = undefined;
\r
1210 if (trace === Trace.Verbose) {
\r
1211 if (message.params) {
\r
1212 data = `Params: ${JSON.stringify(message.params, null, 4)}\n\n`;
\r
1215 data = 'No parameters provided.\n\n';
\r
1218 tracer.log(`Received notification '${message.method}'.`, data);
\r
1221 logLSPMessage('receive-notification', message);
\r
1224 function traceReceivedResponse(message, responsePromise) {
\r
1225 if (trace === Trace.Off || !tracer) {
\r
1228 if (traceFormat === TraceFormat.Text) {
\r
1229 let data = undefined;
\r
1230 if (trace === Trace.Verbose) {
\r
1231 if (message.error && message.error.data) {
\r
1232 data = `Error data: ${JSON.stringify(message.error.data, null, 4)}\n\n`;
\r
1235 if (message.result) {
\r
1236 data = `Result: ${JSON.stringify(message.result, null, 4)}\n\n`;
\r
1238 else if (message.error === void 0) {
\r
1239 data = 'No result returned.\n\n';
\r
1243 if (responsePromise) {
\r
1244 let error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';
\r
1245 tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);
\r
1248 tracer.log(`Received response ${message.id} without active response promise.`, data);
\r
1252 logLSPMessage('receive-response', message);
\r
1255 function logLSPMessage(type, message) {
\r
1256 if (!tracer || trace === Trace.Off) {
\r
1259 const lspMessage = {
\r
1260 isLSPMessage: true,
\r
1263 timestamp: Date.now()
\r
1265 tracer.log(lspMessage);
\r
1267 function throwIfClosedOrDisposed() {
\r
1269 throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
\r
1271 if (isDisposed()) {
\r
1272 throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
\r
1275 function throwIfListening() {
\r
1276 if (isListening()) {
\r
1277 throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
\r
1280 function throwIfNotListening() {
\r
1281 if (!isListening()) {
\r
1282 throw new Error('Call listen() first.');
\r
1285 function undefinedToNull(param) {
\r
1286 if (param === void 0) {
\r
1293 function computeMessageParams(type, params) {
\r
1295 let numberOfParams = type.numberOfParams;
\r
1296 switch (numberOfParams) {
\r
1301 result = undefinedToNull(params[0]);
\r
1305 for (let i = 0; i < params.length && i < numberOfParams; i++) {
\r
1306 result.push(undefinedToNull(params[i]));
\r
1308 if (params.length < numberOfParams) {
\r
1309 for (let i = params.length; i < numberOfParams; i++) {
\r
1310 result.push(null);
\r
1317 let connection = {
\r
1318 sendNotification: (type, ...params) => {
\r
1319 throwIfClosedOrDisposed();
\r
1321 let messageParams;
\r
1322 if (Is.string(type)) {
\r
1324 switch (params.length) {
\r
1326 messageParams = null;
\r
1329 messageParams = params[0];
\r
1332 messageParams = params;
\r
1337 method = type.method;
\r
1338 messageParams = computeMessageParams(type, params);
\r
1340 let notificationMessage = {
\r
1343 params: messageParams
\r
1345 traceSendingNotification(notificationMessage);
\r
1346 messageWriter.write(notificationMessage);
\r
1348 onNotification: (type, handler) => {
\r
1349 throwIfClosedOrDisposed();
\r
1350 if (Is.func(type)) {
\r
1351 starNotificationHandler = type;
\r
1353 else if (handler) {
\r
1354 if (Is.string(type)) {
\r
1355 notificationHandlers[type] = { type: undefined, handler };
\r
1358 notificationHandlers[type.method] = { type, handler };
\r
1362 onProgress: (_type, token, handler) => {
\r
1363 if (progressHandlers.has(token)) {
\r
1364 throw new Error(`Progress handler for token ${token} already registered`);
\r
1366 progressHandlers.set(token, handler);
\r
1369 progressHandlers.delete(token);
\r
1373 sendProgress: (_type, token, value) => {
\r
1374 connection.sendNotification(ProgressNotification.type, { token, value });
\r
1376 onUnhandledProgress: unhandledProgressEmitter.event,
\r
1377 sendRequest: (type, ...params) => {
\r
1378 throwIfClosedOrDisposed();
\r
1379 throwIfNotListening();
\r
1381 let messageParams;
\r
1382 let token = undefined;
\r
1383 if (Is.string(type)) {
\r
1385 switch (params.length) {
\r
1387 messageParams = null;
\r
1390 // The cancellation token is optional so it can also be undefined.
\r
1391 if (cancellation_1.CancellationToken.is(params[0])) {
\r
1392 messageParams = null;
\r
1393 token = params[0];
\r
1396 messageParams = undefinedToNull(params[0]);
\r
1400 const last = params.length - 1;
\r
1401 if (cancellation_1.CancellationToken.is(params[last])) {
\r
1402 token = params[last];
\r
1403 if (params.length === 2) {
\r
1404 messageParams = undefinedToNull(params[0]);
\r
1407 messageParams = params.slice(0, last).map(value => undefinedToNull(value));
\r
1411 messageParams = params.map(value => undefinedToNull(value));
\r
1417 method = type.method;
\r
1418 messageParams = computeMessageParams(type, params);
\r
1419 let numberOfParams = type.numberOfParams;
\r
1420 token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;
\r
1422 let id = sequenceNumber++;
\r
1423 let result = new Promise((resolve, reject) => {
\r
1424 let requestMessage = {
\r
1428 params: messageParams
\r
1430 let responsePromise = { method: method, timerStart: Date.now(), resolve, reject };
\r
1431 traceSendingRequest(requestMessage);
\r
1433 messageWriter.write(requestMessage);
\r
1436 // Writing the message failed. So we need to reject the promise.
\r
1437 responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));
\r
1438 responsePromise = null;
\r
1440 if (responsePromise) {
\r
1441 responsePromises[String(id)] = responsePromise;
\r
1445 token.onCancellationRequested(() => {
\r
1446 connection.sendNotification(CancelNotification.type, { id });
\r
1451 onRequest: (type, handler) => {
\r
1452 throwIfClosedOrDisposed();
\r
1453 if (Is.func(type)) {
\r
1454 starRequestHandler = type;
\r
1456 else if (handler) {
\r
1457 if (Is.string(type)) {
\r
1458 requestHandlers[type] = { type: undefined, handler };
\r
1461 requestHandlers[type.method] = { type, handler };
\r
1465 trace: (_value, _tracer, sendNotificationOrTraceOptions) => {
\r
1466 let _sendNotification = false;
\r
1467 let _traceFormat = TraceFormat.Text;
\r
1468 if (sendNotificationOrTraceOptions !== void 0) {
\r
1469 if (Is.boolean(sendNotificationOrTraceOptions)) {
\r
1470 _sendNotification = sendNotificationOrTraceOptions;
\r
1473 _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;
\r
1474 _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;
\r
1478 traceFormat = _traceFormat;
\r
1479 if (trace === Trace.Off) {
\r
1480 tracer = undefined;
\r
1485 if (_sendNotification && !isClosed() && !isDisposed()) {
\r
1486 connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });
\r
1489 onError: errorEmitter.event,
\r
1490 onClose: closeEmitter.event,
\r
1491 onUnhandledNotification: unhandledNotificationEmitter.event,
\r
1492 onDispose: disposeEmitter.event,
\r
1494 if (isDisposed()) {
\r
1497 state = ConnectionState.Disposed;
\r
1498 disposeEmitter.fire(undefined);
\r
1499 let error = new Error('Connection got disposed.');
\r
1500 Object.keys(responsePromises).forEach((key) => {
\r
1501 responsePromises[key].reject(error);
\r
1503 responsePromises = Object.create(null);
\r
1504 requestTokens = Object.create(null);
\r
1505 messageQueue = new linkedMap_1.LinkedMap();
\r
1506 // Test for backwards compatibility
\r
1507 if (Is.func(messageWriter.dispose)) {
\r
1508 messageWriter.dispose();
\r
1510 if (Is.func(messageReader.dispose)) {
\r
1511 messageReader.dispose();
\r
1515 throwIfClosedOrDisposed();
\r
1516 throwIfListening();
\r
1517 state = ConnectionState.Listening;
\r
1518 messageReader.listen(callback);
\r
1521 // eslint-disable-next-line no-console
\r
1522 console.log('inspect');
\r
1525 connection.onNotification(LogTraceNotification.type, (params) => {
\r
1526 if (trace === Trace.Off || !tracer) {
\r
1529 tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined);
\r
1531 connection.onNotification(ProgressNotification.type, (params) => {
\r
1532 const handler = progressHandlers.get(params.token);
\r
1534 handler(params.value);
\r
1537 unhandledProgressEmitter.fire(params);
\r
1540 return connection;
\r
1542 function isMessageReader(value) {
\r
1543 return value.listen !== void 0 && value.read === void 0;
\r
1545 function isMessageWriter(value) {
\r
1546 return value.write !== void 0 && value.end === void 0;
\r
1548 function createMessageConnection(input, output, logger, strategy) {
\r
1550 logger = exports.NullLogger;
\r
1552 let reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input);
\r
1553 let writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output);
\r
1554 return _createMessageConnection(reader, writer, logger, strategy);
\r
1556 exports.createMessageConnection = createMessageConnection;
\r
1561 /***/ (function(module, exports, __webpack_require__) {
1564 /* --------------------------------------------------------------------------------------------
\r
1565 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
1566 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
1567 * ------------------------------------------------------------------------------------------ */
\r
1569 Object.defineProperty(exports, "__esModule", { value: true });
\r
1570 function boolean(value) {
\r
1571 return value === true || value === false;
\r
1573 exports.boolean = boolean;
\r
1574 function string(value) {
\r
1575 return typeof value === 'string' || value instanceof String;
\r
1577 exports.string = string;
\r
1578 function number(value) {
\r
1579 return typeof value === 'number' || value instanceof Number;
\r
1581 exports.number = number;
\r
1582 function error(value) {
\r
1583 return value instanceof Error;
\r
1585 exports.error = error;
\r
1586 function func(value) {
\r
1587 return typeof value === 'function';
\r
1589 exports.func = func;
\r
1590 function array(value) {
\r
1591 return Array.isArray(value);
\r
1593 exports.array = array;
\r
1594 function stringArray(value) {
\r
1595 return array(value) && value.every(elem => string(elem));
\r
1597 exports.stringArray = stringArray;
\r
1602 /***/ (function(module, exports, __webpack_require__) {
1605 /* --------------------------------------------------------------------------------------------
\r
1606 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
1607 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
1608 * ------------------------------------------------------------------------------------------ */
\r
1610 Object.defineProperty(exports, "__esModule", { value: true });
\r
1611 const is = __webpack_require__(6);
\r
1613 * Predefined error codes.
\r
1616 (function (ErrorCodes) {
\r
1617 // Defined by JSON RPC
\r
1618 ErrorCodes.ParseError = -32700;
\r
1619 ErrorCodes.InvalidRequest = -32600;
\r
1620 ErrorCodes.MethodNotFound = -32601;
\r
1621 ErrorCodes.InvalidParams = -32602;
\r
1622 ErrorCodes.InternalError = -32603;
\r
1623 ErrorCodes.serverErrorStart = -32099;
\r
1624 ErrorCodes.serverErrorEnd = -32000;
\r
1625 ErrorCodes.ServerNotInitialized = -32002;
\r
1626 ErrorCodes.UnknownErrorCode = -32001;
\r
1627 // Defined by the protocol.
\r
1628 ErrorCodes.RequestCancelled = -32800;
\r
1629 ErrorCodes.ContentModified = -32801;
\r
1630 // Defined by VSCode library.
\r
1631 ErrorCodes.MessageWriteError = 1;
\r
1632 ErrorCodes.MessageReadError = 2;
\r
1633 })(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
\r
1635 * An error object return in a response in case a request
\r
1638 class ResponseError extends Error {
\r
1639 constructor(code, message, data) {
\r
1641 this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;
\r
1643 Object.setPrototypeOf(this, ResponseError.prototype);
\r
1648 message: this.message,
\r
1653 exports.ResponseError = ResponseError;
\r
1655 * An abstract implementation of a MessageType.
\r
1657 class AbstractMessageType {
\r
1658 constructor(_method, _numberOfParams) {
\r
1659 this._method = _method;
\r
1660 this._numberOfParams = _numberOfParams;
\r
1663 return this._method;
\r
1665 get numberOfParams() {
\r
1666 return this._numberOfParams;
\r
1669 exports.AbstractMessageType = AbstractMessageType;
\r
1671 * Classes to type request response pairs
\r
1673 * The type parameter RO will be removed in the next major version
\r
1674 * of the JSON RPC library since it is a LSP concept and doesn't
\r
1675 * belong here. For now it is tagged as default never.
\r
1677 class RequestType0 extends AbstractMessageType {
\r
1678 constructor(method) {
\r
1682 exports.RequestType0 = RequestType0;
\r
1683 class RequestType extends AbstractMessageType {
\r
1684 constructor(method) {
\r
1688 exports.RequestType = RequestType;
\r
1689 class RequestType1 extends AbstractMessageType {
\r
1690 constructor(method) {
\r
1694 exports.RequestType1 = RequestType1;
\r
1695 class RequestType2 extends AbstractMessageType {
\r
1696 constructor(method) {
\r
1700 exports.RequestType2 = RequestType2;
\r
1701 class RequestType3 extends AbstractMessageType {
\r
1702 constructor(method) {
\r
1706 exports.RequestType3 = RequestType3;
\r
1707 class RequestType4 extends AbstractMessageType {
\r
1708 constructor(method) {
\r
1712 exports.RequestType4 = RequestType4;
\r
1713 class RequestType5 extends AbstractMessageType {
\r
1714 constructor(method) {
\r
1718 exports.RequestType5 = RequestType5;
\r
1719 class RequestType6 extends AbstractMessageType {
\r
1720 constructor(method) {
\r
1724 exports.RequestType6 = RequestType6;
\r
1725 class RequestType7 extends AbstractMessageType {
\r
1726 constructor(method) {
\r
1730 exports.RequestType7 = RequestType7;
\r
1731 class RequestType8 extends AbstractMessageType {
\r
1732 constructor(method) {
\r
1736 exports.RequestType8 = RequestType8;
\r
1737 class RequestType9 extends AbstractMessageType {
\r
1738 constructor(method) {
\r
1742 exports.RequestType9 = RequestType9;
\r
1744 * The type parameter RO will be removed in the next major version
\r
1745 * of the JSON RPC library since it is a LSP concept and doesn't
\r
1746 * belong here. For now it is tagged as default never.
\r
1748 class NotificationType extends AbstractMessageType {
\r
1749 constructor(method) {
\r
1751 this._ = undefined;
\r
1754 exports.NotificationType = NotificationType;
\r
1755 class NotificationType0 extends AbstractMessageType {
\r
1756 constructor(method) {
\r
1760 exports.NotificationType0 = NotificationType0;
\r
1761 class NotificationType1 extends AbstractMessageType {
\r
1762 constructor(method) {
\r
1766 exports.NotificationType1 = NotificationType1;
\r
1767 class NotificationType2 extends AbstractMessageType {
\r
1768 constructor(method) {
\r
1772 exports.NotificationType2 = NotificationType2;
\r
1773 class NotificationType3 extends AbstractMessageType {
\r
1774 constructor(method) {
\r
1778 exports.NotificationType3 = NotificationType3;
\r
1779 class NotificationType4 extends AbstractMessageType {
\r
1780 constructor(method) {
\r
1784 exports.NotificationType4 = NotificationType4;
\r
1785 class NotificationType5 extends AbstractMessageType {
\r
1786 constructor(method) {
\r
1790 exports.NotificationType5 = NotificationType5;
\r
1791 class NotificationType6 extends AbstractMessageType {
\r
1792 constructor(method) {
\r
1796 exports.NotificationType6 = NotificationType6;
\r
1797 class NotificationType7 extends AbstractMessageType {
\r
1798 constructor(method) {
\r
1802 exports.NotificationType7 = NotificationType7;
\r
1803 class NotificationType8 extends AbstractMessageType {
\r
1804 constructor(method) {
\r
1808 exports.NotificationType8 = NotificationType8;
\r
1809 class NotificationType9 extends AbstractMessageType {
\r
1810 constructor(method) {
\r
1814 exports.NotificationType9 = NotificationType9;
\r
1816 * Tests if the given message is a request message
\r
1818 function isRequestMessage(message) {
\r
1819 let candidate = message;
\r
1820 return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));
\r
1822 exports.isRequestMessage = isRequestMessage;
\r
1824 * Tests if the given message is a notification message
\r
1826 function isNotificationMessage(message) {
\r
1827 let candidate = message;
\r
1828 return candidate && is.string(candidate.method) && message.id === void 0;
\r
1830 exports.isNotificationMessage = isNotificationMessage;
\r
1832 * Tests if the given message is a response message
\r
1834 function isResponseMessage(message) {
\r
1835 let candidate = message;
\r
1836 return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);
\r
1838 exports.isResponseMessage = isResponseMessage;
\r
1843 /***/ (function(module, exports, __webpack_require__) {
1846 /* --------------------------------------------------------------------------------------------
\r
1847 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
1848 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
1849 * ------------------------------------------------------------------------------------------ */
\r
1851 Object.defineProperty(exports, "__esModule", { value: true });
\r
1852 const events_1 = __webpack_require__(9);
\r
1853 const Is = __webpack_require__(6);
\r
1854 let DefaultSize = 8192;
\r
1855 let CR = Buffer.from('\r', 'ascii')[0];
\r
1856 let LF = Buffer.from('\n', 'ascii')[0];
\r
1857 let CRLF = '\r\n';
\r
1858 class MessageBuffer {
\r
1859 constructor(encoding = 'utf8') {
\r
1860 this.encoding = encoding;
\r
1862 this.buffer = Buffer.allocUnsafe(DefaultSize);
\r
1865 var toAppend = chunk;
\r
1866 if (typeof (chunk) === 'string') {
\r
1868 var bufferLen = Buffer.byteLength(str, this.encoding);
\r
1869 toAppend = Buffer.allocUnsafe(bufferLen);
\r
1870 toAppend.write(str, 0, bufferLen, this.encoding);
\r
1872 if (this.buffer.length - this.index >= toAppend.length) {
\r
1873 toAppend.copy(this.buffer, this.index, 0, toAppend.length);
\r
1876 var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize;
\r
1877 if (this.index === 0) {
\r
1878 this.buffer = Buffer.allocUnsafe(newSize);
\r
1879 toAppend.copy(this.buffer, 0, 0, toAppend.length);
\r
1882 this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize);
\r
1885 this.index += toAppend.length;
\r
1887 tryReadHeaders() {
\r
1888 let result = undefined;
\r
1890 while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) {
\r
1893 // No header / body separator found (e.g CRLFCRLF)
\r
1894 if (current + 3 >= this.index) {
\r
1897 result = Object.create(null);
\r
1898 let headers = this.buffer.toString('ascii', 0, current).split(CRLF);
\r
1899 headers.forEach((header) => {
\r
1900 let index = header.indexOf(':');
\r
1901 if (index === -1) {
\r
1902 throw new Error('Message header must separate key and value using :');
\r
1904 let key = header.substr(0, index);
\r
1905 let value = header.substr(index + 1).trim();
\r
1906 result[key] = value;
\r
1908 let nextStart = current + 4;
\r
1909 this.buffer = this.buffer.slice(nextStart);
\r
1910 this.index = this.index - nextStart;
\r
1913 tryReadContent(length) {
\r
1914 if (this.index < length) {
\r
1917 let result = this.buffer.toString(this.encoding, 0, length);
\r
1918 let nextStart = length;
\r
1919 this.buffer.copy(this.buffer, 0, nextStart);
\r
1920 this.index = this.index - nextStart;
\r
1923 get numberOfBytes() {
\r
1924 return this.index;
\r
1927 var MessageReader;
\r
1928 (function (MessageReader) {
\r
1929 function is(value) {
\r
1930 let candidate = value;
\r
1931 return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&
\r
1932 Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);
\r
1934 MessageReader.is = is;
\r
1935 })(MessageReader = exports.MessageReader || (exports.MessageReader = {}));
\r
1936 class AbstractMessageReader {
\r
1938 this.errorEmitter = new events_1.Emitter();
\r
1939 this.closeEmitter = new events_1.Emitter();
\r
1940 this.partialMessageEmitter = new events_1.Emitter();
\r
1943 this.errorEmitter.dispose();
\r
1944 this.closeEmitter.dispose();
\r
1947 return this.errorEmitter.event;
\r
1949 fireError(error) {
\r
1950 this.errorEmitter.fire(this.asError(error));
\r
1953 return this.closeEmitter.event;
\r
1956 this.closeEmitter.fire(undefined);
\r
1958 get onPartialMessage() {
\r
1959 return this.partialMessageEmitter.event;
\r
1961 firePartialMessage(info) {
\r
1962 this.partialMessageEmitter.fire(info);
\r
1965 if (error instanceof Error) {
\r
1969 return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
\r
1973 exports.AbstractMessageReader = AbstractMessageReader;
\r
1974 class StreamMessageReader extends AbstractMessageReader {
\r
1975 constructor(readable, encoding = 'utf8') {
\r
1977 this.readable = readable;
\r
1978 this.buffer = new MessageBuffer(encoding);
\r
1979 this._partialMessageTimeout = 10000;
\r
1981 set partialMessageTimeout(timeout) {
\r
1982 this._partialMessageTimeout = timeout;
\r
1984 get partialMessageTimeout() {
\r
1985 return this._partialMessageTimeout;
\r
1987 listen(callback) {
\r
1988 this.nextMessageLength = -1;
\r
1989 this.messageToken = 0;
\r
1990 this.partialMessageTimer = undefined;
\r
1991 this.callback = callback;
\r
1992 this.readable.on('data', (data) => {
\r
1993 this.onData(data);
\r
1995 this.readable.on('error', (error) => this.fireError(error));
\r
1996 this.readable.on('close', () => this.fireClose());
\r
1999 this.buffer.append(data);
\r
2001 if (this.nextMessageLength === -1) {
\r
2002 let headers = this.buffer.tryReadHeaders();
\r
2006 let contentLength = headers['Content-Length'];
\r
2007 if (!contentLength) {
\r
2008 throw new Error('Header must provide a Content-Length property.');
\r
2010 let length = parseInt(contentLength);
\r
2011 if (isNaN(length)) {
\r
2012 throw new Error('Content-Length value must be a number.');
\r
2014 this.nextMessageLength = length;
\r
2015 // Take the encoding form the header. For compatibility
\r
2016 // treat both utf-8 and utf8 as node utf8
\r
2018 var msg = this.buffer.tryReadContent(this.nextMessageLength);
\r
2019 if (msg === null) {
\r
2020 /** We haven't received the full message yet. */
\r
2021 this.setPartialMessageTimer();
\r
2024 this.clearPartialMessageTimer();
\r
2025 this.nextMessageLength = -1;
\r
2026 this.messageToken++;
\r
2027 var json = JSON.parse(msg);
\r
2028 this.callback(json);
\r
2031 clearPartialMessageTimer() {
\r
2032 if (this.partialMessageTimer) {
\r
2033 clearTimeout(this.partialMessageTimer);
\r
2034 this.partialMessageTimer = undefined;
\r
2037 setPartialMessageTimer() {
\r
2038 this.clearPartialMessageTimer();
\r
2039 if (this._partialMessageTimeout <= 0) {
\r
2042 this.partialMessageTimer = setTimeout((token, timeout) => {
\r
2043 this.partialMessageTimer = undefined;
\r
2044 if (token === this.messageToken) {
\r
2045 this.firePartialMessage({ messageToken: token, waitingTime: timeout });
\r
2046 this.setPartialMessageTimer();
\r
2048 }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);
\r
2051 exports.StreamMessageReader = StreamMessageReader;
\r
2052 class IPCMessageReader extends AbstractMessageReader {
\r
2053 constructor(process) {
\r
2055 this.process = process;
\r
2056 let eventEmitter = this.process;
\r
2057 eventEmitter.on('error', (error) => this.fireError(error));
\r
2058 eventEmitter.on('close', () => this.fireClose());
\r
2060 listen(callback) {
\r
2061 this.process.on('message', callback);
\r
2064 exports.IPCMessageReader = IPCMessageReader;
\r
2065 class SocketMessageReader extends StreamMessageReader {
\r
2066 constructor(socket, encoding = 'utf-8') {
\r
2067 super(socket, encoding);
\r
2070 exports.SocketMessageReader = SocketMessageReader;
\r
2075 /***/ (function(module, exports, __webpack_require__) {
2078 /* --------------------------------------------------------------------------------------------
\r
2079 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2080 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2081 * ------------------------------------------------------------------------------------------ */
\r
2083 Object.defineProperty(exports, "__esModule", { value: true });
\r
2085 (function (Disposable) {
\r
2086 function create(func) {
\r
2091 Disposable.create = create;
\r
2092 })(Disposable = exports.Disposable || (exports.Disposable = {}));
\r
2094 (function (Event) {
\r
2095 const _disposable = { dispose() { } };
\r
2096 Event.None = function () { return _disposable; };
\r
2097 })(Event = exports.Event || (exports.Event = {}));
\r
2098 class CallbackList {
\r
2099 add(callback, context = null, bucket) {
\r
2100 if (!this._callbacks) {
\r
2101 this._callbacks = [];
\r
2102 this._contexts = [];
\r
2104 this._callbacks.push(callback);
\r
2105 this._contexts.push(context);
\r
2106 if (Array.isArray(bucket)) {
\r
2107 bucket.push({ dispose: () => this.remove(callback, context) });
\r
2110 remove(callback, context = null) {
\r
2111 if (!this._callbacks) {
\r
2114 var foundCallbackWithDifferentContext = false;
\r
2115 for (var i = 0, len = this._callbacks.length; i < len; i++) {
\r
2116 if (this._callbacks[i] === callback) {
\r
2117 if (this._contexts[i] === context) {
\r
2118 // callback & context match => remove it
\r
2119 this._callbacks.splice(i, 1);
\r
2120 this._contexts.splice(i, 1);
\r
2124 foundCallbackWithDifferentContext = true;
\r
2128 if (foundCallbackWithDifferentContext) {
\r
2129 throw new Error('When adding a listener with a context, you should remove it with the same context');
\r
2133 if (!this._callbacks) {
\r
2136 var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);
\r
2137 for (var i = 0, len = callbacks.length; i < len; i++) {
\r
2139 ret.push(callbacks[i].apply(contexts[i], args));
\r
2142 // eslint-disable-next-line no-console
\r
2149 return !this._callbacks || this._callbacks.length === 0;
\r
2152 this._callbacks = undefined;
\r
2153 this._contexts = undefined;
\r
2157 constructor(_options) {
\r
2158 this._options = _options;
\r
2161 * For the public to allow to subscribe
\r
2162 * to events from this Emitter
\r
2165 if (!this._event) {
\r
2166 this._event = (listener, thisArgs, disposables) => {
\r
2167 if (!this._callbacks) {
\r
2168 this._callbacks = new CallbackList();
\r
2170 if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {
\r
2171 this._options.onFirstListenerAdd(this);
\r
2173 this._callbacks.add(listener, thisArgs);
\r
2177 this._callbacks.remove(listener, thisArgs);
\r
2178 result.dispose = Emitter._noop;
\r
2179 if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {
\r
2180 this._options.onLastListenerRemove(this);
\r
2184 if (Array.isArray(disposables)) {
\r
2185 disposables.push(result);
\r
2190 return this._event;
\r
2193 * To be kept private to fire an event to
\r
2197 if (this._callbacks) {
\r
2198 this._callbacks.invoke.call(this._callbacks, event);
\r
2202 if (this._callbacks) {
\r
2203 this._callbacks.dispose();
\r
2204 this._callbacks = undefined;
\r
2208 exports.Emitter = Emitter;
\r
2209 Emitter._noop = function () { };
\r
2214 /***/ (function(module, exports, __webpack_require__) {
2217 /* --------------------------------------------------------------------------------------------
\r
2218 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2219 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2220 * ------------------------------------------------------------------------------------------ */
\r
2222 Object.defineProperty(exports, "__esModule", { value: true });
\r
2223 const events_1 = __webpack_require__(9);
\r
2224 const Is = __webpack_require__(6);
\r
2225 let ContentLength = 'Content-Length: ';
\r
2226 let CRLF = '\r\n';
\r
2227 var MessageWriter;
\r
2228 (function (MessageWriter) {
\r
2229 function is(value) {
\r
2230 let candidate = value;
\r
2231 return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&
\r
2232 Is.func(candidate.onError) && Is.func(candidate.write);
\r
2234 MessageWriter.is = is;
\r
2235 })(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));
\r
2236 class AbstractMessageWriter {
\r
2238 this.errorEmitter = new events_1.Emitter();
\r
2239 this.closeEmitter = new events_1.Emitter();
\r
2242 this.errorEmitter.dispose();
\r
2243 this.closeEmitter.dispose();
\r
2246 return this.errorEmitter.event;
\r
2248 fireError(error, message, count) {
\r
2249 this.errorEmitter.fire([this.asError(error), message, count]);
\r
2252 return this.closeEmitter.event;
\r
2255 this.closeEmitter.fire(undefined);
\r
2258 if (error instanceof Error) {
\r
2262 return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);
\r
2266 exports.AbstractMessageWriter = AbstractMessageWriter;
\r
2267 class StreamMessageWriter extends AbstractMessageWriter {
\r
2268 constructor(writable, encoding = 'utf8') {
\r
2270 this.writable = writable;
\r
2271 this.encoding = encoding;
\r
2272 this.errorCount = 0;
\r
2273 this.writable.on('error', (error) => this.fireError(error));
\r
2274 this.writable.on('close', () => this.fireClose());
\r
2277 let json = JSON.stringify(msg);
\r
2278 let contentLength = Buffer.byteLength(json, this.encoding);
\r
2280 ContentLength, contentLength.toString(), CRLF,
\r
2284 // Header must be written in ASCII encoding
\r
2285 this.writable.write(headers.join(''), 'ascii');
\r
2286 // Now write the content. This can be written in any encoding
\r
2287 this.writable.write(json, this.encoding);
\r
2288 this.errorCount = 0;
\r
2291 this.errorCount++;
\r
2292 this.fireError(error, msg, this.errorCount);
\r
2296 exports.StreamMessageWriter = StreamMessageWriter;
\r
2297 class IPCMessageWriter extends AbstractMessageWriter {
\r
2298 constructor(process) {
\r
2300 this.process = process;
\r
2301 this.errorCount = 0;
\r
2303 this.sending = false;
\r
2304 let eventEmitter = this.process;
\r
2305 eventEmitter.on('error', (error) => this.fireError(error));
\r
2306 eventEmitter.on('close', () => this.fireClose);
\r
2309 if (!this.sending && this.queue.length === 0) {
\r
2310 // See https://github.com/nodejs/node/issues/7657
\r
2311 this.doWriteMessage(msg);
\r
2314 this.queue.push(msg);
\r
2317 doWriteMessage(msg) {
\r
2319 if (this.process.send) {
\r
2320 this.sending = true;
\r
2321 this.process.send(msg, undefined, undefined, (error) => {
\r
2322 this.sending = false;
\r
2324 this.errorCount++;
\r
2325 this.fireError(error, msg, this.errorCount);
\r
2328 this.errorCount = 0;
\r
2330 if (this.queue.length > 0) {
\r
2331 this.doWriteMessage(this.queue.shift());
\r
2337 this.errorCount++;
\r
2338 this.fireError(error, msg, this.errorCount);
\r
2342 exports.IPCMessageWriter = IPCMessageWriter;
\r
2343 class SocketMessageWriter extends AbstractMessageWriter {
\r
2344 constructor(socket, encoding = 'utf8') {
\r
2346 this.socket = socket;
\r
2348 this.sending = false;
\r
2349 this.encoding = encoding;
\r
2350 this.errorCount = 0;
\r
2351 this.socket.on('error', (error) => this.fireError(error));
\r
2352 this.socket.on('close', () => this.fireClose());
\r
2356 this.socket.destroy();
\r
2359 if (!this.sending && this.queue.length === 0) {
\r
2360 // See https://github.com/nodejs/node/issues/7657
\r
2361 this.doWriteMessage(msg);
\r
2364 this.queue.push(msg);
\r
2367 doWriteMessage(msg) {
\r
2368 let json = JSON.stringify(msg);
\r
2369 let contentLength = Buffer.byteLength(json, this.encoding);
\r
2371 ContentLength, contentLength.toString(), CRLF,
\r
2375 // Header must be written in ASCII encoding
\r
2376 this.sending = true;
\r
2377 this.socket.write(headers.join(''), 'ascii', (error) => {
\r
2379 this.handleError(error, msg);
\r
2382 // Now write the content. This can be written in any encoding
\r
2383 this.socket.write(json, this.encoding, (error) => {
\r
2384 this.sending = false;
\r
2386 this.handleError(error, msg);
\r
2389 this.errorCount = 0;
\r
2391 if (this.queue.length > 0) {
\r
2392 this.doWriteMessage(this.queue.shift());
\r
2397 this.handleError(error, msg);
\r
2402 this.handleError(error, msg);
\r
2405 handleError(error, msg) {
\r
2406 this.errorCount++;
\r
2407 this.fireError(error, msg, this.errorCount);
\r
2410 exports.SocketMessageWriter = SocketMessageWriter;
\r
2415 /***/ (function(module, exports, __webpack_require__) {
2418 /*---------------------------------------------------------------------------------------------
\r
2419 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2420 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2421 *--------------------------------------------------------------------------------------------*/
\r
2423 Object.defineProperty(exports, "__esModule", { value: true });
\r
2424 const events_1 = __webpack_require__(9);
\r
2425 const Is = __webpack_require__(6);
\r
2426 var CancellationToken;
\r
2427 (function (CancellationToken) {
\r
2428 CancellationToken.None = Object.freeze({
\r
2429 isCancellationRequested: false,
\r
2430 onCancellationRequested: events_1.Event.None
\r
2432 CancellationToken.Cancelled = Object.freeze({
\r
2433 isCancellationRequested: true,
\r
2434 onCancellationRequested: events_1.Event.None
\r
2436 function is(value) {
\r
2437 let candidate = value;
\r
2438 return candidate && (candidate === CancellationToken.None
\r
2439 || candidate === CancellationToken.Cancelled
\r
2440 || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));
\r
2442 CancellationToken.is = is;
\r
2443 })(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));
\r
2444 const shortcutEvent = Object.freeze(function (callback, context) {
\r
2445 let handle = setTimeout(callback.bind(context), 0);
\r
2446 return { dispose() { clearTimeout(handle); } };
\r
2448 class MutableToken {
\r
2450 this._isCancelled = false;
\r
2453 if (!this._isCancelled) {
\r
2454 this._isCancelled = true;
\r
2455 if (this._emitter) {
\r
2456 this._emitter.fire(undefined);
\r
2461 get isCancellationRequested() {
\r
2462 return this._isCancelled;
\r
2464 get onCancellationRequested() {
\r
2465 if (this._isCancelled) {
\r
2466 return shortcutEvent;
\r
2468 if (!this._emitter) {
\r
2469 this._emitter = new events_1.Emitter();
\r
2471 return this._emitter.event;
\r
2474 if (this._emitter) {
\r
2475 this._emitter.dispose();
\r
2476 this._emitter = undefined;
\r
2480 class CancellationTokenSource {
\r
2482 if (!this._token) {
\r
2483 // be lazy and create the token only when
\r
2484 // actually needed
\r
2485 this._token = new MutableToken();
\r
2487 return this._token;
\r
2490 if (!this._token) {
\r
2491 // save an object by returning the default
\r
2492 // cancelled token when cancellation happens
\r
2493 // before someone asks for the token
\r
2494 this._token = CancellationToken.Cancelled;
\r
2497 this._token.cancel();
\r
2501 if (!this._token) {
\r
2502 // ensure to initialize with an empty token if we had none
\r
2503 this._token = CancellationToken.None;
\r
2505 else if (this._token instanceof MutableToken) {
\r
2506 // actually dispose
\r
2507 this._token.dispose();
\r
2511 exports.CancellationTokenSource = CancellationTokenSource;
\r
2516 /***/ (function(module, exports, __webpack_require__) {
2520 /*---------------------------------------------------------------------------------------------
\r
2521 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2522 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2523 *--------------------------------------------------------------------------------------------*/
\r
2524 Object.defineProperty(exports, "__esModule", { value: true });
\r
2526 (function (Touch) {
\r
2530 })(Touch = exports.Touch || (exports.Touch = {}));
\r
2533 this._map = new Map();
\r
2534 this._head = undefined;
\r
2535 this._tail = undefined;
\r
2539 this._map.clear();
\r
2540 this._head = undefined;
\r
2541 this._tail = undefined;
\r
2545 return !this._head && !this._tail;
\r
2548 return this._size;
\r
2551 return this._map.has(key);
\r
2554 const item = this._map.get(key);
\r
2558 return item.value;
\r
2560 set(key, value, touch = Touch.None) {
\r
2561 let item = this._map.get(key);
\r
2563 item.value = value;
\r
2564 if (touch !== Touch.None) {
\r
2565 this.touch(item, touch);
\r
2569 item = { key, value, next: undefined, previous: undefined };
\r
2572 this.addItemLast(item);
\r
2575 this.addItemFirst(item);
\r
2578 this.addItemLast(item);
\r
2581 this.addItemLast(item);
\r
2584 this._map.set(key, item);
\r
2589 const item = this._map.get(key);
\r
2593 this._map.delete(key);
\r
2594 this.removeItem(item);
\r
2599 if (!this._head && !this._tail) {
\r
2602 if (!this._head || !this._tail) {
\r
2603 throw new Error('Invalid list');
\r
2605 const item = this._head;
\r
2606 this._map.delete(item.key);
\r
2607 this.removeItem(item);
\r
2609 return item.value;
\r
2611 forEach(callbackfn, thisArg) {
\r
2612 let current = this._head;
\r
2615 callbackfn.bind(thisArg)(current.value, current.key, this);
\r
2618 callbackfn(current.value, current.key, this);
\r
2620 current = current.next;
\r
2623 forEachReverse(callbackfn, thisArg) {
\r
2624 let current = this._tail;
\r
2627 callbackfn.bind(thisArg)(current.value, current.key, this);
\r
2630 callbackfn(current.value, current.key, this);
\r
2632 current = current.previous;
\r
2637 let current = this._head;
\r
2639 result.push(current.value);
\r
2640 current = current.next;
\r
2646 let current = this._head;
\r
2648 result.push(current.key);
\r
2649 current = current.next;
\r
2653 /* JSON RPC run on es5 which has no Symbol.iterator
\r
2654 public keys(): IterableIterator<K> {
\r
2655 let current = this._head;
\r
2656 let iterator: IterableIterator<K> = {
\r
2657 [Symbol.iterator]() {
\r
2660 next():IteratorResult<K> {
\r
2662 let result = { value: current.key, done: false };
\r
2663 current = current.next;
\r
2666 return { value: undefined, done: true };
\r
2673 public values(): IterableIterator<V> {
\r
2674 let current = this._head;
\r
2675 let iterator: IterableIterator<V> = {
\r
2676 [Symbol.iterator]() {
\r
2679 next():IteratorResult<V> {
\r
2681 let result = { value: current.value, done: false };
\r
2682 current = current.next;
\r
2685 return { value: undefined, done: true };
\r
2692 addItemFirst(item) {
\r
2693 // First time Insert
\r
2694 if (!this._head && !this._tail) {
\r
2695 this._tail = item;
\r
2697 else if (!this._head) {
\r
2698 throw new Error('Invalid list');
\r
2701 item.next = this._head;
\r
2702 this._head.previous = item;
\r
2704 this._head = item;
\r
2706 addItemLast(item) {
\r
2707 // First time Insert
\r
2708 if (!this._head && !this._tail) {
\r
2709 this._head = item;
\r
2711 else if (!this._tail) {
\r
2712 throw new Error('Invalid list');
\r
2715 item.previous = this._tail;
\r
2716 this._tail.next = item;
\r
2718 this._tail = item;
\r
2720 removeItem(item) {
\r
2721 if (item === this._head && item === this._tail) {
\r
2722 this._head = undefined;
\r
2723 this._tail = undefined;
\r
2725 else if (item === this._head) {
\r
2726 this._head = item.next;
\r
2728 else if (item === this._tail) {
\r
2729 this._tail = item.previous;
\r
2732 const next = item.next;
\r
2733 const previous = item.previous;
\r
2734 if (!next || !previous) {
\r
2735 throw new Error('Invalid list');
\r
2737 next.previous = previous;
\r
2738 previous.next = next;
\r
2741 touch(item, touch) {
\r
2742 if (!this._head || !this._tail) {
\r
2743 throw new Error('Invalid list');
\r
2745 if ((touch !== Touch.First && touch !== Touch.Last)) {
\r
2748 if (touch === Touch.First) {
\r
2749 if (item === this._head) {
\r
2752 const next = item.next;
\r
2753 const previous = item.previous;
\r
2754 // Unlink the item
\r
2755 if (item === this._tail) {
\r
2756 // previous must be defined since item was not head but is tail
\r
2757 // So there are more than on item in the map
\r
2758 previous.next = undefined;
\r
2759 this._tail = previous;
\r
2762 // Both next and previous are not undefined since item was neither head nor tail.
\r
2763 next.previous = previous;
\r
2764 previous.next = next;
\r
2766 // Insert the node at head
\r
2767 item.previous = undefined;
\r
2768 item.next = this._head;
\r
2769 this._head.previous = item;
\r
2770 this._head = item;
\r
2772 else if (touch === Touch.Last) {
\r
2773 if (item === this._tail) {
\r
2776 const next = item.next;
\r
2777 const previous = item.previous;
\r
2778 // Unlink the item.
\r
2779 if (item === this._head) {
\r
2780 // next must be defined since item was not tail but is head
\r
2781 // So there are more than on item in the map
\r
2782 next.previous = undefined;
\r
2783 this._head = next;
\r
2786 // Both next and previous are not undefined since item was neither head nor tail.
\r
2787 next.previous = previous;
\r
2788 previous.next = next;
\r
2790 item.next = undefined;
\r
2791 item.previous = this._tail;
\r
2792 this._tail.next = item;
\r
2793 this._tail = item;
\r
2797 exports.LinkedMap = LinkedMap;
\r
2802 /***/ (function(module, exports, __webpack_require__) {
2805 /* --------------------------------------------------------------------------------------------
\r
2806 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2807 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2808 * ------------------------------------------------------------------------------------------ */
\r
2810 Object.defineProperty(exports, "__esModule", { value: true });
\r
2811 const path_1 = __webpack_require__(1);
\r
2812 const os_1 = __webpack_require__(14);
\r
2813 const crypto_1 = __webpack_require__(15);
\r
2814 const net_1 = __webpack_require__(16);
\r
2815 const messageReader_1 = __webpack_require__(8);
\r
2816 const messageWriter_1 = __webpack_require__(10);
\r
2817 function generateRandomPipeName() {
\r
2818 const randomSuffix = crypto_1.randomBytes(21).toString('hex');
\r
2819 if (process.platform === 'win32') {
\r
2820 return `\\\\.\\pipe\\vscode-jsonrpc-${randomSuffix}-sock`;
\r
2823 // Mac/Unix: use socket file
\r
2824 return path_1.join(os_1.tmpdir(), `vscode-${randomSuffix}.sock`);
\r
2827 exports.generateRandomPipeName = generateRandomPipeName;
\r
2828 function createClientPipeTransport(pipeName, encoding = 'utf-8') {
\r
2829 let connectResolve;
\r
2830 let connected = new Promise((resolve, _reject) => {
\r
2831 connectResolve = resolve;
\r
2833 return new Promise((resolve, reject) => {
\r
2834 let server = net_1.createServer((socket) => {
\r
2837 new messageReader_1.SocketMessageReader(socket, encoding),
\r
2838 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
2841 server.on('error', reject);
\r
2842 server.listen(pipeName, () => {
\r
2843 server.removeListener('error', reject);
\r
2845 onConnected: () => { return connected; }
\r
2850 exports.createClientPipeTransport = createClientPipeTransport;
\r
2851 function createServerPipeTransport(pipeName, encoding = 'utf-8') {
\r
2852 const socket = net_1.createConnection(pipeName);
\r
2854 new messageReader_1.SocketMessageReader(socket, encoding),
\r
2855 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
2858 exports.createServerPipeTransport = createServerPipeTransport;
\r
2863 /***/ (function(module, exports) {
2865 module.exports = require("os");
2869 /***/ (function(module, exports) {
2871 module.exports = require("crypto");
2875 /***/ (function(module, exports) {
2877 module.exports = require("net");
2881 /***/ (function(module, exports, __webpack_require__) {
2884 /* --------------------------------------------------------------------------------------------
\r
2885 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2886 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2887 * ------------------------------------------------------------------------------------------ */
\r
2889 Object.defineProperty(exports, "__esModule", { value: true });
\r
2890 const net_1 = __webpack_require__(16);
\r
2891 const messageReader_1 = __webpack_require__(8);
\r
2892 const messageWriter_1 = __webpack_require__(10);
\r
2893 function createClientSocketTransport(port, encoding = 'utf-8') {
\r
2894 let connectResolve;
\r
2895 let connected = new Promise((resolve, _reject) => {
\r
2896 connectResolve = resolve;
\r
2898 return new Promise((resolve, reject) => {
\r
2899 let server = net_1.createServer((socket) => {
\r
2902 new messageReader_1.SocketMessageReader(socket, encoding),
\r
2903 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
2906 server.on('error', reject);
\r
2907 server.listen(port, '127.0.0.1', () => {
\r
2908 server.removeListener('error', reject);
\r
2910 onConnected: () => { return connected; }
\r
2915 exports.createClientSocketTransport = createClientSocketTransport;
\r
2916 function createServerSocketTransport(port, encoding = 'utf-8') {
\r
2917 const socket = net_1.createConnection(port, '127.0.0.1');
\r
2919 new messageReader_1.SocketMessageReader(socket, encoding),
\r
2920 new messageWriter_1.SocketMessageWriter(socket, encoding)
\r
2923 exports.createServerSocketTransport = createServerSocketTransport;
\r
2928 /***/ (function(module, __webpack_exports__, __webpack_require__) {
2931 __webpack_require__.r(__webpack_exports__);
2932 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Position", function() { return Position; });
2933 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Range", function() { return Range; });
2934 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Location", function() { return Location; });
2935 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocationLink", function() { return LocationLink; });
2936 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
2937 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorInformation", function() { return ColorInformation; });
2938 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorPresentation", function() { return ColorPresentation; });
2939 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRangeKind", function() { return FoldingRangeKind; });
2940 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FoldingRange", function() { return FoldingRange; });
2941 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticRelatedInformation", function() { return DiagnosticRelatedInformation; });
2942 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticSeverity", function() { return DiagnosticSeverity; });
2943 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DiagnosticTag", function() { return DiagnosticTag; });
2944 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Diagnostic", function() { return Diagnostic; });
2945 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Command", function() { return Command; });
2946 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextEdit", function() { return TextEdit; });
2947 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentEdit", function() { return TextDocumentEdit; });
2948 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CreateFile", function() { return CreateFile; });
2949 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RenameFile", function() { return RenameFile; });
2950 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteFile", function() { return DeleteFile; });
2951 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceEdit", function() { return WorkspaceEdit; });
2952 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WorkspaceChange", function() { return WorkspaceChange; });
2953 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentIdentifier", function() { return TextDocumentIdentifier; });
2954 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VersionedTextDocumentIdentifier", function() { return VersionedTextDocumentIdentifier; });
2955 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocumentItem", function() { return TextDocumentItem; });
2956 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupKind", function() { return MarkupKind; });
2957 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkupContent", function() { return MarkupContent; });
2958 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemKind", function() { return CompletionItemKind; });
2959 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InsertTextFormat", function() { return InsertTextFormat; });
2960 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItemTag", function() { return CompletionItemTag; });
2961 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionItem", function() { return CompletionItem; });
2962 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CompletionList", function() { return CompletionList; });
2963 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarkedString", function() { return MarkedString; });
2964 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hover", function() { return Hover; });
2965 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ParameterInformation", function() { return ParameterInformation; });
2966 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SignatureInformation", function() { return SignatureInformation; });
2967 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlightKind", function() { return DocumentHighlightKind; });
2968 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentHighlight", function() { return DocumentHighlight; });
2969 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolKind", function() { return SymbolKind; });
2970 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolTag", function() { return SymbolTag; });
2971 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SymbolInformation", function() { return SymbolInformation; });
2972 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentSymbol", function() { return DocumentSymbol; });
2973 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionKind", function() { return CodeActionKind; });
2974 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeActionContext", function() { return CodeActionContext; });
2975 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeAction", function() { return CodeAction; });
2976 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CodeLens", function() { return CodeLens; });
2977 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormattingOptions", function() { return FormattingOptions; });
2978 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DocumentLink", function() { return DocumentLink; });
2979 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SelectionRange", function() { return SelectionRange; });
2980 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EOL", function() { return EOL; });
2981 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextDocument", function() { return TextDocument; });
2982 /* --------------------------------------------------------------------------------------------
\r
2983 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
2984 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
2985 * ------------------------------------------------------------------------------------------ */
\r
2988 * The Position namespace provides helper functions to work with
\r
2989 * [Position](#Position) literals.
\r
2992 (function (Position) {
\r
2994 * Creates a new Position literal from the given line and character.
\r
2995 * @param line The position's line.
\r
2996 * @param character The position's character.
\r
2998 function create(line, character) {
\r
2999 return { line: line, character: character };
\r
3001 Position.create = create;
\r
3003 * Checks whether the given liternal conforms to the [Position](#Position) interface.
\r
3005 function is(value) {
\r
3006 var candidate = value;
\r
3007 return Is.objectLiteral(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
\r
3010 })(Position || (Position = {}));
\r
3012 * The Range namespace provides helper functions to work with
\r
3013 * [Range](#Range) literals.
\r
3016 (function (Range) {
\r
3017 function create(one, two, three, four) {
\r
3018 if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) {
\r
3019 return { start: Position.create(one, two), end: Position.create(three, four) };
\r
3021 else if (Position.is(one) && Position.is(two)) {
\r
3022 return { start: one, end: two };
\r
3025 throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]");
\r
3028 Range.create = create;
\r
3030 * Checks whether the given literal conforms to the [Range](#Range) interface.
\r
3032 function is(value) {
\r
3033 var candidate = value;
\r
3034 return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
\r
3037 })(Range || (Range = {}));
\r
3039 * The Location namespace provides helper functions to work with
\r
3040 * [Location](#Location) literals.
\r
3043 (function (Location) {
\r
3045 * Creates a Location literal.
\r
3046 * @param uri The location's uri.
\r
3047 * @param range The location's range.
\r
3049 function create(uri, range) {
\r
3050 return { uri: uri, range: range };
\r
3052 Location.create = create;
\r
3054 * Checks whether the given literal conforms to the [Location](#Location) interface.
\r
3056 function is(value) {
\r
3057 var candidate = value;
\r
3058 return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
\r
3061 })(Location || (Location = {}));
\r
3063 * The LocationLink namespace provides helper functions to work with
\r
3064 * [LocationLink](#LocationLink) literals.
\r
3067 (function (LocationLink) {
\r
3069 * Creates a LocationLink literal.
\r
3070 * @param targetUri The definition's uri.
\r
3071 * @param targetRange The full range of the definition.
\r
3072 * @param targetSelectionRange The span of the symbol definition at the target.
\r
3073 * @param originSelectionRange The span of the symbol being defined in the originating source file.
\r
3075 function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
\r
3076 return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };
\r
3078 LocationLink.create = create;
\r
3080 * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.
\r
3082 function is(value) {
\r
3083 var candidate = value;
\r
3084 return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
\r
3085 && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))
\r
3086 && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
\r
3088 LocationLink.is = is;
\r
3089 })(LocationLink || (LocationLink = {}));
\r
3091 * The Color namespace provides helper functions to work with
\r
3092 * [Color](#Color) literals.
\r
3095 (function (Color) {
\r
3097 * Creates a new Color literal.
\r
3099 function create(red, green, blue, alpha) {
\r
3107 Color.create = create;
\r
3109 * Checks whether the given literal conforms to the [Color](#Color) interface.
\r
3111 function is(value) {
\r
3112 var candidate = value;
\r
3113 return Is.number(candidate.red)
\r
3114 && Is.number(candidate.green)
\r
3115 && Is.number(candidate.blue)
\r
3116 && Is.number(candidate.alpha);
\r
3119 })(Color || (Color = {}));
\r
3121 * The ColorInformation namespace provides helper functions to work with
\r
3122 * [ColorInformation](#ColorInformation) literals.
\r
3124 var ColorInformation;
\r
3125 (function (ColorInformation) {
\r
3127 * Creates a new ColorInformation literal.
\r
3129 function create(range, color) {
\r
3135 ColorInformation.create = create;
\r
3137 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
\r
3139 function is(value) {
\r
3140 var candidate = value;
\r
3141 return Range.is(candidate.range) && Color.is(candidate.color);
\r
3143 ColorInformation.is = is;
\r
3144 })(ColorInformation || (ColorInformation = {}));
\r
3146 * The Color namespace provides helper functions to work with
\r
3147 * [ColorPresentation](#ColorPresentation) literals.
\r
3149 var ColorPresentation;
\r
3150 (function (ColorPresentation) {
\r
3152 * Creates a new ColorInformation literal.
\r
3154 function create(label, textEdit, additionalTextEdits) {
\r
3157 textEdit: textEdit,
\r
3158 additionalTextEdits: additionalTextEdits,
\r
3161 ColorPresentation.create = create;
\r
3163 * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.
\r
3165 function is(value) {
\r
3166 var candidate = value;
\r
3167 return Is.string(candidate.label)
\r
3168 && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
\r
3169 && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
\r
3171 ColorPresentation.is = is;
\r
3172 })(ColorPresentation || (ColorPresentation = {}));
\r
3174 * Enum of known range kinds
\r
3176 var FoldingRangeKind;
\r
3177 (function (FoldingRangeKind) {
\r
3179 * Folding range for a comment
\r
3181 FoldingRangeKind["Comment"] = "comment";
\r
3183 * Folding range for a imports or includes
\r
3185 FoldingRangeKind["Imports"] = "imports";
\r
3187 * Folding range for a region (e.g. `#region`)
\r
3189 FoldingRangeKind["Region"] = "region";
\r
3190 })(FoldingRangeKind || (FoldingRangeKind = {}));
\r
3192 * The folding range namespace provides helper functions to work with
\r
3193 * [FoldingRange](#FoldingRange) literals.
\r
3196 (function (FoldingRange) {
\r
3198 * Creates a new FoldingRange literal.
\r
3200 function create(startLine, endLine, startCharacter, endCharacter, kind) {
\r
3202 startLine: startLine,
\r
3205 if (Is.defined(startCharacter)) {
\r
3206 result.startCharacter = startCharacter;
\r
3208 if (Is.defined(endCharacter)) {
\r
3209 result.endCharacter = endCharacter;
\r
3211 if (Is.defined(kind)) {
\r
3212 result.kind = kind;
\r
3216 FoldingRange.create = create;
\r
3218 * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.
\r
3220 function is(value) {
\r
3221 var candidate = value;
\r
3222 return Is.number(candidate.startLine) && Is.number(candidate.startLine)
\r
3223 && (Is.undefined(candidate.startCharacter) || Is.number(candidate.startCharacter))
\r
3224 && (Is.undefined(candidate.endCharacter) || Is.number(candidate.endCharacter))
\r
3225 && (Is.undefined(candidate.kind) || Is.string(candidate.kind));
\r
3227 FoldingRange.is = is;
\r
3228 })(FoldingRange || (FoldingRange = {}));
\r
3230 * The DiagnosticRelatedInformation namespace provides helper functions to work with
\r
3231 * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.
\r
3233 var DiagnosticRelatedInformation;
\r
3234 (function (DiagnosticRelatedInformation) {
\r
3236 * Creates a new DiagnosticRelatedInformation literal.
\r
3238 function create(location, message) {
\r
3240 location: location,
\r
3244 DiagnosticRelatedInformation.create = create;
\r
3246 * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.
\r
3248 function is(value) {
\r
3249 var candidate = value;
\r
3250 return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
\r
3252 DiagnosticRelatedInformation.is = is;
\r
3253 })(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));
\r
3255 * The diagnostic's severity.
\r
3257 var DiagnosticSeverity;
\r
3258 (function (DiagnosticSeverity) {
\r
3260 * Reports an error.
\r
3262 DiagnosticSeverity.Error = 1;
\r
3264 * Reports a warning.
\r
3266 DiagnosticSeverity.Warning = 2;
\r
3268 * Reports an information.
\r
3270 DiagnosticSeverity.Information = 3;
\r
3274 DiagnosticSeverity.Hint = 4;
\r
3275 })(DiagnosticSeverity || (DiagnosticSeverity = {}));
\r
3277 * The diagnostic tags.
\r
3281 var DiagnosticTag;
\r
3282 (function (DiagnosticTag) {
\r
3284 * Unused or unnecessary code.
\r
3286 * Clients are allowed to render diagnostics with this tag faded out instead of having
\r
3287 * an error squiggle.
\r
3289 DiagnosticTag.Unnecessary = 1;
\r
3291 * Deprecated or obsolete code.
\r
3293 * Clients are allowed to rendered diagnostics with this tag strike through.
\r
3295 DiagnosticTag.Deprecated = 2;
\r
3296 })(DiagnosticTag || (DiagnosticTag = {}));
\r
3298 * The Diagnostic namespace provides helper functions to work with
\r
3299 * [Diagnostic](#Diagnostic) literals.
\r
3302 (function (Diagnostic) {
\r
3304 * Creates a new Diagnostic literal.
\r
3306 function create(range, message, severity, code, source, relatedInformation) {
\r
3307 var result = { range: range, message: message };
\r
3308 if (Is.defined(severity)) {
\r
3309 result.severity = severity;
\r
3311 if (Is.defined(code)) {
\r
3312 result.code = code;
\r
3314 if (Is.defined(source)) {
\r
3315 result.source = source;
\r
3317 if (Is.defined(relatedInformation)) {
\r
3318 result.relatedInformation = relatedInformation;
\r
3322 Diagnostic.create = create;
\r
3324 * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.
\r
3326 function is(value) {
\r
3327 var candidate = value;
\r
3328 return Is.defined(candidate)
\r
3329 && Range.is(candidate.range)
\r
3330 && Is.string(candidate.message)
\r
3331 && (Is.number(candidate.severity) || Is.undefined(candidate.severity))
\r
3332 && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
\r
3333 && (Is.string(candidate.source) || Is.undefined(candidate.source))
\r
3334 && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
\r
3336 Diagnostic.is = is;
\r
3337 })(Diagnostic || (Diagnostic = {}));
\r
3339 * The Command namespace provides helper functions to work with
\r
3340 * [Command](#Command) literals.
\r
3343 (function (Command) {
\r
3345 * Creates a new Command literal.
\r
3347 function create(title, command) {
\r
3349 for (var _i = 2; _i < arguments.length; _i++) {
\r
3350 args[_i - 2] = arguments[_i];
\r
3352 var result = { title: title, command: command };
\r
3353 if (Is.defined(args) && args.length > 0) {
\r
3354 result.arguments = args;
\r
3358 Command.create = create;
\r
3360 * Checks whether the given literal conforms to the [Command](#Command) interface.
\r
3362 function is(value) {
\r
3363 var candidate = value;
\r
3364 return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
\r
3367 })(Command || (Command = {}));
\r
3369 * The TextEdit namespace provides helper function to create replace,
\r
3370 * insert and delete edits more easily.
\r
3373 (function (TextEdit) {
\r
3375 * Creates a replace text edit.
\r
3376 * @param range The range of text to be replaced.
\r
3377 * @param newText The new text.
\r
3379 function replace(range, newText) {
\r
3380 return { range: range, newText: newText };
\r
3382 TextEdit.replace = replace;
\r
3384 * Creates a insert text edit.
\r
3385 * @param position The position to insert the text at.
\r
3386 * @param newText The text to be inserted.
\r
3388 function insert(position, newText) {
\r
3389 return { range: { start: position, end: position }, newText: newText };
\r
3391 TextEdit.insert = insert;
\r
3393 * Creates a delete text edit.
\r
3394 * @param range The range of text to be deleted.
\r
3396 function del(range) {
\r
3397 return { range: range, newText: '' };
\r
3399 TextEdit.del = del;
\r
3400 function is(value) {
\r
3401 var candidate = value;
\r
3402 return Is.objectLiteral(candidate)
\r
3403 && Is.string(candidate.newText)
\r
3404 && Range.is(candidate.range);
\r
3407 })(TextEdit || (TextEdit = {}));
\r
3409 * The TextDocumentEdit namespace provides helper function to create
\r
3410 * an edit that manipulates a text document.
\r
3412 var TextDocumentEdit;
\r
3413 (function (TextDocumentEdit) {
\r
3415 * Creates a new `TextDocumentEdit`
\r
3417 function create(textDocument, edits) {
\r
3418 return { textDocument: textDocument, edits: edits };
\r
3420 TextDocumentEdit.create = create;
\r
3421 function is(value) {
\r
3422 var candidate = value;
\r
3423 return Is.defined(candidate)
\r
3424 && VersionedTextDocumentIdentifier.is(candidate.textDocument)
\r
3425 && Array.isArray(candidate.edits);
\r
3427 TextDocumentEdit.is = is;
\r
3428 })(TextDocumentEdit || (TextDocumentEdit = {}));
\r
3430 (function (CreateFile) {
\r
3431 function create(uri, options) {
\r
3436 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
\r
3437 result.options = options;
\r
3441 CreateFile.create = create;
\r
3442 function is(value) {
\r
3443 var candidate = value;
\r
3444 return candidate && candidate.kind === 'create' && Is.string(candidate.uri) &&
\r
3445 (candidate.options === void 0 ||
\r
3446 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
\r
3448 CreateFile.is = is;
\r
3449 })(CreateFile || (CreateFile = {}));
\r
3451 (function (RenameFile) {
\r
3452 function create(oldUri, newUri, options) {
\r
3458 if (options !== void 0 && (options.overwrite !== void 0 || options.ignoreIfExists !== void 0)) {
\r
3459 result.options = options;
\r
3463 RenameFile.create = create;
\r
3464 function is(value) {
\r
3465 var candidate = value;
\r
3466 return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) &&
\r
3467 (candidate.options === void 0 ||
\r
3468 ((candidate.options.overwrite === void 0 || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === void 0 || Is.boolean(candidate.options.ignoreIfExists))));
\r
3470 RenameFile.is = is;
\r
3471 })(RenameFile || (RenameFile = {}));
\r
3473 (function (DeleteFile) {
\r
3474 function create(uri, options) {
\r
3479 if (options !== void 0 && (options.recursive !== void 0 || options.ignoreIfNotExists !== void 0)) {
\r
3480 result.options = options;
\r
3484 DeleteFile.create = create;
\r
3485 function is(value) {
\r
3486 var candidate = value;
\r
3487 return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) &&
\r
3488 (candidate.options === void 0 ||
\r
3489 ((candidate.options.recursive === void 0 || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === void 0 || Is.boolean(candidate.options.ignoreIfNotExists))));
\r
3491 DeleteFile.is = is;
\r
3492 })(DeleteFile || (DeleteFile = {}));
\r
3493 var WorkspaceEdit;
\r
3494 (function (WorkspaceEdit) {
\r
3495 function is(value) {
\r
3496 var candidate = value;
\r
3497 return candidate &&
\r
3498 (candidate.changes !== void 0 || candidate.documentChanges !== void 0) &&
\r
3499 (candidate.documentChanges === void 0 || candidate.documentChanges.every(function (change) {
\r
3500 if (Is.string(change.kind)) {
\r
3501 return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
\r
3504 return TextDocumentEdit.is(change);
\r
3508 WorkspaceEdit.is = is;
\r
3509 })(WorkspaceEdit || (WorkspaceEdit = {}));
\r
3510 var TextEditChangeImpl = /** @class */ (function () {
\r
3511 function TextEditChangeImpl(edits) {
\r
3512 this.edits = edits;
\r
3514 TextEditChangeImpl.prototype.insert = function (position, newText) {
\r
3515 this.edits.push(TextEdit.insert(position, newText));
\r
3517 TextEditChangeImpl.prototype.replace = function (range, newText) {
\r
3518 this.edits.push(TextEdit.replace(range, newText));
\r
3520 TextEditChangeImpl.prototype.delete = function (range) {
\r
3521 this.edits.push(TextEdit.del(range));
\r
3523 TextEditChangeImpl.prototype.add = function (edit) {
\r
3524 this.edits.push(edit);
\r
3526 TextEditChangeImpl.prototype.all = function () {
\r
3527 return this.edits;
\r
3529 TextEditChangeImpl.prototype.clear = function () {
\r
3530 this.edits.splice(0, this.edits.length);
\r
3532 return TextEditChangeImpl;
\r
3535 * A workspace change helps constructing changes to a workspace.
\r
3537 var WorkspaceChange = /** @class */ (function () {
\r
3538 function WorkspaceChange(workspaceEdit) {
\r
3540 this._textEditChanges = Object.create(null);
\r
3541 if (workspaceEdit) {
\r
3542 this._workspaceEdit = workspaceEdit;
\r
3543 if (workspaceEdit.documentChanges) {
\r
3544 workspaceEdit.documentChanges.forEach(function (change) {
\r
3545 if (TextDocumentEdit.is(change)) {
\r
3546 var textEditChange = new TextEditChangeImpl(change.edits);
\r
3547 _this._textEditChanges[change.textDocument.uri] = textEditChange;
\r
3551 else if (workspaceEdit.changes) {
\r
3552 Object.keys(workspaceEdit.changes).forEach(function (key) {
\r
3553 var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
\r
3554 _this._textEditChanges[key] = textEditChange;
\r
3559 Object.defineProperty(WorkspaceChange.prototype, "edit", {
\r
3561 * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
\r
3562 * use to be returned from a workspace edit operation like rename.
\r
3564 get: function () {
\r
3565 return this._workspaceEdit;
\r
3568 configurable: true
\r
3570 WorkspaceChange.prototype.getTextEditChange = function (key) {
\r
3571 if (VersionedTextDocumentIdentifier.is(key)) {
\r
3572 if (!this._workspaceEdit) {
\r
3573 this._workspaceEdit = {
\r
3574 documentChanges: []
\r
3577 if (!this._workspaceEdit.documentChanges) {
\r
3578 throw new Error('Workspace edit is not configured for document changes.');
\r
3580 var textDocument = key;
\r
3581 var result = this._textEditChanges[textDocument.uri];
\r
3584 var textDocumentEdit = {
\r
3585 textDocument: textDocument,
\r
3588 this._workspaceEdit.documentChanges.push(textDocumentEdit);
\r
3589 result = new TextEditChangeImpl(edits);
\r
3590 this._textEditChanges[textDocument.uri] = result;
\r
3595 if (!this._workspaceEdit) {
\r
3596 this._workspaceEdit = {
\r
3597 changes: Object.create(null)
\r
3600 if (!this._workspaceEdit.changes) {
\r
3601 throw new Error('Workspace edit is not configured for normal text edit changes.');
\r
3603 var result = this._textEditChanges[key];
\r
3606 this._workspaceEdit.changes[key] = edits;
\r
3607 result = new TextEditChangeImpl(edits);
\r
3608 this._textEditChanges[key] = result;
\r
3613 WorkspaceChange.prototype.createFile = function (uri, options) {
\r
3614 this.checkDocumentChanges();
\r
3615 this._workspaceEdit.documentChanges.push(CreateFile.create(uri, options));
\r
3617 WorkspaceChange.prototype.renameFile = function (oldUri, newUri, options) {
\r
3618 this.checkDocumentChanges();
\r
3619 this._workspaceEdit.documentChanges.push(RenameFile.create(oldUri, newUri, options));
\r
3621 WorkspaceChange.prototype.deleteFile = function (uri, options) {
\r
3622 this.checkDocumentChanges();
\r
3623 this._workspaceEdit.documentChanges.push(DeleteFile.create(uri, options));
\r
3625 WorkspaceChange.prototype.checkDocumentChanges = function () {
\r
3626 if (!this._workspaceEdit || !this._workspaceEdit.documentChanges) {
\r
3627 throw new Error('Workspace edit is not configured for document changes.');
\r
3630 return WorkspaceChange;
\r
3634 * The TextDocumentIdentifier namespace provides helper functions to work with
\r
3635 * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.
\r
3637 var TextDocumentIdentifier;
\r
3638 (function (TextDocumentIdentifier) {
\r
3640 * Creates a new TextDocumentIdentifier literal.
\r
3641 * @param uri The document's uri.
\r
3643 function create(uri) {
\r
3644 return { uri: uri };
\r
3646 TextDocumentIdentifier.create = create;
\r
3648 * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.
\r
3650 function is(value) {
\r
3651 var candidate = value;
\r
3652 return Is.defined(candidate) && Is.string(candidate.uri);
\r
3654 TextDocumentIdentifier.is = is;
\r
3655 })(TextDocumentIdentifier || (TextDocumentIdentifier = {}));
\r
3657 * The VersionedTextDocumentIdentifier namespace provides helper functions to work with
\r
3658 * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.
\r
3660 var VersionedTextDocumentIdentifier;
\r
3661 (function (VersionedTextDocumentIdentifier) {
\r
3663 * Creates a new VersionedTextDocumentIdentifier literal.
\r
3664 * @param uri The document's uri.
\r
3665 * @param uri The document's text.
\r
3667 function create(uri, version) {
\r
3668 return { uri: uri, version: version };
\r
3670 VersionedTextDocumentIdentifier.create = create;
\r
3672 * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.
\r
3674 function is(value) {
\r
3675 var candidate = value;
\r
3676 return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.number(candidate.version));
\r
3678 VersionedTextDocumentIdentifier.is = is;
\r
3679 })(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));
\r
3681 * The TextDocumentItem namespace provides helper functions to work with
\r
3682 * [TextDocumentItem](#TextDocumentItem) literals.
\r
3684 var TextDocumentItem;
\r
3685 (function (TextDocumentItem) {
\r
3687 * Creates a new TextDocumentItem literal.
\r
3688 * @param uri The document's uri.
\r
3689 * @param languageId The document's language identifier.
\r
3690 * @param version The document's version number.
\r
3691 * @param text The document's text.
\r
3693 function create(uri, languageId, version, text) {
\r
3694 return { uri: uri, languageId: languageId, version: version, text: text };
\r
3696 TextDocumentItem.create = create;
\r
3698 * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.
\r
3700 function is(value) {
\r
3701 var candidate = value;
\r
3702 return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text);
\r
3704 TextDocumentItem.is = is;
\r
3705 })(TextDocumentItem || (TextDocumentItem = {}));
\r
3707 * Describes the content type that a client supports in various
\r
3708 * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.
\r
3710 * Please note that `MarkupKinds` must not start with a `$`. This kinds
\r
3711 * are reserved for internal usage.
\r
3714 (function (MarkupKind) {
\r
3716 * Plain text is supported as a content format
\r
3718 MarkupKind.PlainText = 'plaintext';
\r
3720 * Markdown is supported as a content format
\r
3722 MarkupKind.Markdown = 'markdown';
\r
3723 })(MarkupKind || (MarkupKind = {}));
\r
3724 (function (MarkupKind) {
\r
3726 * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.
\r
3728 function is(value) {
\r
3729 var candidate = value;
\r
3730 return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
\r
3732 MarkupKind.is = is;
\r
3733 })(MarkupKind || (MarkupKind = {}));
\r
3734 var MarkupContent;
\r
3735 (function (MarkupContent) {
\r
3737 * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.
\r
3739 function is(value) {
\r
3740 var candidate = value;
\r
3741 return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
\r
3743 MarkupContent.is = is;
\r
3744 })(MarkupContent || (MarkupContent = {}));
\r
3746 * The kind of a completion entry.
\r
3748 var CompletionItemKind;
\r
3749 (function (CompletionItemKind) {
\r
3750 CompletionItemKind.Text = 1;
\r
3751 CompletionItemKind.Method = 2;
\r
3752 CompletionItemKind.Function = 3;
\r
3753 CompletionItemKind.Constructor = 4;
\r
3754 CompletionItemKind.Field = 5;
\r
3755 CompletionItemKind.Variable = 6;
\r
3756 CompletionItemKind.Class = 7;
\r
3757 CompletionItemKind.Interface = 8;
\r
3758 CompletionItemKind.Module = 9;
\r
3759 CompletionItemKind.Property = 10;
\r
3760 CompletionItemKind.Unit = 11;
\r
3761 CompletionItemKind.Value = 12;
\r
3762 CompletionItemKind.Enum = 13;
\r
3763 CompletionItemKind.Keyword = 14;
\r
3764 CompletionItemKind.Snippet = 15;
\r
3765 CompletionItemKind.Color = 16;
\r
3766 CompletionItemKind.File = 17;
\r
3767 CompletionItemKind.Reference = 18;
\r
3768 CompletionItemKind.Folder = 19;
\r
3769 CompletionItemKind.EnumMember = 20;
\r
3770 CompletionItemKind.Constant = 21;
\r
3771 CompletionItemKind.Struct = 22;
\r
3772 CompletionItemKind.Event = 23;
\r
3773 CompletionItemKind.Operator = 24;
\r
3774 CompletionItemKind.TypeParameter = 25;
\r
3775 })(CompletionItemKind || (CompletionItemKind = {}));
\r
3777 * Defines whether the insert text in a completion item should be interpreted as
\r
3778 * plain text or a snippet.
\r
3780 var InsertTextFormat;
\r
3781 (function (InsertTextFormat) {
\r
3783 * The primary text to be inserted is treated as a plain string.
\r
3785 InsertTextFormat.PlainText = 1;
\r
3787 * The primary text to be inserted is treated as a snippet.
\r
3789 * A snippet can define tab stops and placeholders with `$1`, `$2`
\r
3790 * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
\r
3791 * the end of the snippet. Placeholders with equal identifiers are linked,
\r
3792 * that is typing in one will update others too.
\r
3794 * See also: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md
\r
3796 InsertTextFormat.Snippet = 2;
\r
3797 })(InsertTextFormat || (InsertTextFormat = {}));
\r
3799 * Completion item tags are extra annotations that tweak the rendering of a completion
\r
3804 var CompletionItemTag;
\r
3805 (function (CompletionItemTag) {
\r
3807 * Render a completion as obsolete, usually using a strike-out.
\r
3809 CompletionItemTag.Deprecated = 1;
\r
3810 })(CompletionItemTag || (CompletionItemTag = {}));
\r
3812 * The CompletionItem namespace provides functions to deal with
\r
3813 * completion items.
\r
3815 var CompletionItem;
\r
3816 (function (CompletionItem) {
\r
3818 * Create a completion item and seed it with a label.
\r
3819 * @param label The completion item's label
\r
3821 function create(label) {
\r
3822 return { label: label };
\r
3824 CompletionItem.create = create;
\r
3825 })(CompletionItem || (CompletionItem = {}));
\r
3827 * The CompletionList namespace provides functions to deal with
\r
3828 * completion lists.
\r
3830 var CompletionList;
\r
3831 (function (CompletionList) {
\r
3833 * Creates a new completion list.
\r
3835 * @param items The completion items.
\r
3836 * @param isIncomplete The list is not complete.
\r
3838 function create(items, isIncomplete) {
\r
3839 return { items: items ? items : [], isIncomplete: !!isIncomplete };
\r
3841 CompletionList.create = create;
\r
3842 })(CompletionList || (CompletionList = {}));
\r
3844 (function (MarkedString) {
\r
3846 * Creates a marked string from plain text.
\r
3848 * @param plainText The plain text.
\r
3850 function fromPlainText(plainText) {
\r
3851 return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, '\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash
\r
3853 MarkedString.fromPlainText = fromPlainText;
\r
3855 * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.
\r
3857 function is(value) {
\r
3858 var candidate = value;
\r
3859 return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
\r
3861 MarkedString.is = is;
\r
3862 })(MarkedString || (MarkedString = {}));
\r
3864 (function (Hover) {
\r
3866 * Checks whether the given value conforms to the [Hover](#Hover) interface.
\r
3868 function is(value) {
\r
3869 var candidate = value;
\r
3870 return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
\r
3871 MarkedString.is(candidate.contents) ||
\r
3872 Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === void 0 || Range.is(value.range));
\r
3875 })(Hover || (Hover = {}));
\r
3877 * The ParameterInformation namespace provides helper functions to work with
\r
3878 * [ParameterInformation](#ParameterInformation) literals.
\r
3880 var ParameterInformation;
\r
3881 (function (ParameterInformation) {
\r
3883 * Creates a new parameter information literal.
\r
3885 * @param label A label string.
\r
3886 * @param documentation A doc string.
\r
3888 function create(label, documentation) {
\r
3889 return documentation ? { label: label, documentation: documentation } : { label: label };
\r
3891 ParameterInformation.create = create;
\r
3892 })(ParameterInformation || (ParameterInformation = {}));
\r
3894 * The SignatureInformation namespace provides helper functions to work with
\r
3895 * [SignatureInformation](#SignatureInformation) literals.
\r
3897 var SignatureInformation;
\r
3898 (function (SignatureInformation) {
\r
3899 function create(label, documentation) {
\r
3900 var parameters = [];
\r
3901 for (var _i = 2; _i < arguments.length; _i++) {
\r
3902 parameters[_i - 2] = arguments[_i];
\r
3904 var result = { label: label };
\r
3905 if (Is.defined(documentation)) {
\r
3906 result.documentation = documentation;
\r
3908 if (Is.defined(parameters)) {
\r
3909 result.parameters = parameters;
\r
3912 result.parameters = [];
\r
3916 SignatureInformation.create = create;
\r
3917 })(SignatureInformation || (SignatureInformation = {}));
\r
3919 * A document highlight kind.
\r
3921 var DocumentHighlightKind;
\r
3922 (function (DocumentHighlightKind) {
\r
3924 * A textual occurrence.
\r
3926 DocumentHighlightKind.Text = 1;
\r
3928 * Read-access of a symbol, like reading a variable.
\r
3930 DocumentHighlightKind.Read = 2;
\r
3932 * Write-access of a symbol, like writing to a variable.
\r
3934 DocumentHighlightKind.Write = 3;
\r
3935 })(DocumentHighlightKind || (DocumentHighlightKind = {}));
\r
3937 * DocumentHighlight namespace to provide helper functions to work with
\r
3938 * [DocumentHighlight](#DocumentHighlight) literals.
\r
3940 var DocumentHighlight;
\r
3941 (function (DocumentHighlight) {
\r
3943 * Create a DocumentHighlight object.
\r
3944 * @param range The range the highlight applies to.
\r
3946 function create(range, kind) {
\r
3947 var result = { range: range };
\r
3948 if (Is.number(kind)) {
\r
3949 result.kind = kind;
\r
3953 DocumentHighlight.create = create;
\r
3954 })(DocumentHighlight || (DocumentHighlight = {}));
\r
3959 (function (SymbolKind) {
\r
3960 SymbolKind.File = 1;
\r
3961 SymbolKind.Module = 2;
\r
3962 SymbolKind.Namespace = 3;
\r
3963 SymbolKind.Package = 4;
\r
3964 SymbolKind.Class = 5;
\r
3965 SymbolKind.Method = 6;
\r
3966 SymbolKind.Property = 7;
\r
3967 SymbolKind.Field = 8;
\r
3968 SymbolKind.Constructor = 9;
\r
3969 SymbolKind.Enum = 10;
\r
3970 SymbolKind.Interface = 11;
\r
3971 SymbolKind.Function = 12;
\r
3972 SymbolKind.Variable = 13;
\r
3973 SymbolKind.Constant = 14;
\r
3974 SymbolKind.String = 15;
\r
3975 SymbolKind.Number = 16;
\r
3976 SymbolKind.Boolean = 17;
\r
3977 SymbolKind.Array = 18;
\r
3978 SymbolKind.Object = 19;
\r
3979 SymbolKind.Key = 20;
\r
3980 SymbolKind.Null = 21;
\r
3981 SymbolKind.EnumMember = 22;
\r
3982 SymbolKind.Struct = 23;
\r
3983 SymbolKind.Event = 24;
\r
3984 SymbolKind.Operator = 25;
\r
3985 SymbolKind.TypeParameter = 26;
\r
3986 })(SymbolKind || (SymbolKind = {}));
\r
3988 * Symbol tags are extra annotations that tweak the rendering of a symbol.
\r
3992 (function (SymbolTag) {
\r
3994 * Render a symbol as obsolete, usually using a strike-out.
\r
3996 SymbolTag.Deprecated = 1;
\r
3997 })(SymbolTag || (SymbolTag = {}));
\r
3998 var SymbolInformation;
\r
3999 (function (SymbolInformation) {
\r
4001 * Creates a new symbol information literal.
\r
4003 * @param name The name of the symbol.
\r
4004 * @param kind The kind of the symbol.
\r
4005 * @param range The range of the location of the symbol.
\r
4006 * @param uri The resource of the location of symbol, defaults to the current document.
\r
4007 * @param containerName The name of the symbol containing the symbol.
\r
4009 function create(name, kind, range, uri, containerName) {
\r
4013 location: { uri: uri, range: range }
\r
4015 if (containerName) {
\r
4016 result.containerName = containerName;
\r
4020 SymbolInformation.create = create;
\r
4021 })(SymbolInformation || (SymbolInformation = {}));
\r
4022 var DocumentSymbol;
\r
4023 (function (DocumentSymbol) {
\r
4025 * Creates a new symbol information literal.
\r
4027 * @param name The name of the symbol.
\r
4028 * @param detail The detail of the symbol.
\r
4029 * @param kind The kind of the symbol.
\r
4030 * @param range The range of the symbol.
\r
4031 * @param selectionRange The selectionRange of the symbol.
\r
4032 * @param children Children of the symbol.
\r
4034 function create(name, detail, kind, range, selectionRange, children) {
\r
4040 selectionRange: selectionRange
\r
4042 if (children !== void 0) {
\r
4043 result.children = children;
\r
4047 DocumentSymbol.create = create;
\r
4049 * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.
\r
4051 function is(value) {
\r
4052 var candidate = value;
\r
4053 return candidate &&
\r
4054 Is.string(candidate.name) && Is.number(candidate.kind) &&
\r
4055 Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
\r
4056 (candidate.detail === void 0 || Is.string(candidate.detail)) &&
\r
4057 (candidate.deprecated === void 0 || Is.boolean(candidate.deprecated)) &&
\r
4058 (candidate.children === void 0 || Array.isArray(candidate.children));
\r
4060 DocumentSymbol.is = is;
\r
4061 })(DocumentSymbol || (DocumentSymbol = {}));
\r
4063 * A set of predefined code action kinds
\r
4065 var CodeActionKind;
\r
4066 (function (CodeActionKind) {
\r
4070 CodeActionKind.Empty = '';
\r
4072 * Base kind for quickfix actions: 'quickfix'
\r
4074 CodeActionKind.QuickFix = 'quickfix';
\r
4076 * Base kind for refactoring actions: 'refactor'
\r
4078 CodeActionKind.Refactor = 'refactor';
\r
4080 * Base kind for refactoring extraction actions: 'refactor.extract'
\r
4082 * Example extract actions:
\r
4084 * - Extract method
\r
4085 * - Extract function
\r
4086 * - Extract variable
\r
4087 * - Extract interface from class
\r
4090 CodeActionKind.RefactorExtract = 'refactor.extract';
\r
4092 * Base kind for refactoring inline actions: 'refactor.inline'
\r
4094 * Example inline actions:
\r
4096 * - Inline function
\r
4097 * - Inline variable
\r
4098 * - Inline constant
\r
4101 CodeActionKind.RefactorInline = 'refactor.inline';
\r
4103 * Base kind for refactoring rewrite actions: 'refactor.rewrite'
\r
4105 * Example rewrite actions:
\r
4107 * - Convert JavaScript function to class
\r
4108 * - Add or remove parameter
\r
4109 * - Encapsulate field
\r
4110 * - Make method static
\r
4111 * - Move method to base class
\r
4114 CodeActionKind.RefactorRewrite = 'refactor.rewrite';
\r
4116 * Base kind for source actions: `source`
\r
4118 * Source code actions apply to the entire file.
\r
4120 CodeActionKind.Source = 'source';
\r
4122 * Base kind for an organize imports source action: `source.organizeImports`
\r
4124 CodeActionKind.SourceOrganizeImports = 'source.organizeImports';
\r
4126 * Base kind for auto-fix source actions: `source.fixAll`.
\r
4128 * Fix all actions automatically fix errors that have a clear fix that do not require user input.
\r
4129 * They should not suppress errors or perform unsafe fixes such as generating new types or classes.
\r
4133 CodeActionKind.SourceFixAll = 'source.fixAll';
\r
4134 })(CodeActionKind || (CodeActionKind = {}));
\r
4136 * The CodeActionContext namespace provides helper functions to work with
\r
4137 * [CodeActionContext](#CodeActionContext) literals.
\r
4139 var CodeActionContext;
\r
4140 (function (CodeActionContext) {
\r
4142 * Creates a new CodeActionContext literal.
\r
4144 function create(diagnostics, only) {
\r
4145 var result = { diagnostics: diagnostics };
\r
4146 if (only !== void 0 && only !== null) {
\r
4147 result.only = only;
\r
4151 CodeActionContext.create = create;
\r
4153 * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.
\r
4155 function is(value) {
\r
4156 var candidate = value;
\r
4157 return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === void 0 || Is.typedArray(candidate.only, Is.string));
\r
4159 CodeActionContext.is = is;
\r
4160 })(CodeActionContext || (CodeActionContext = {}));
\r
4162 (function (CodeAction) {
\r
4163 function create(title, commandOrEdit, kind) {
\r
4164 var result = { title: title };
\r
4165 if (Command.is(commandOrEdit)) {
\r
4166 result.command = commandOrEdit;
\r
4169 result.edit = commandOrEdit;
\r
4171 if (kind !== void 0) {
\r
4172 result.kind = kind;
\r
4176 CodeAction.create = create;
\r
4177 function is(value) {
\r
4178 var candidate = value;
\r
4179 return candidate && Is.string(candidate.title) &&
\r
4180 (candidate.diagnostics === void 0 || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
\r
4181 (candidate.kind === void 0 || Is.string(candidate.kind)) &&
\r
4182 (candidate.edit !== void 0 || candidate.command !== void 0) &&
\r
4183 (candidate.command === void 0 || Command.is(candidate.command)) &&
\r
4184 (candidate.isPreferred === void 0 || Is.boolean(candidate.isPreferred)) &&
\r
4185 (candidate.edit === void 0 || WorkspaceEdit.is(candidate.edit));
\r
4187 CodeAction.is = is;
\r
4188 })(CodeAction || (CodeAction = {}));
\r
4190 * The CodeLens namespace provides helper functions to work with
\r
4191 * [CodeLens](#CodeLens) literals.
\r
4194 (function (CodeLens) {
\r
4196 * Creates a new CodeLens literal.
\r
4198 function create(range, data) {
\r
4199 var result = { range: range };
\r
4200 if (Is.defined(data)) {
\r
4201 result.data = data;
\r
4205 CodeLens.create = create;
\r
4207 * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.
\r
4209 function is(value) {
\r
4210 var candidate = value;
\r
4211 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
\r
4214 })(CodeLens || (CodeLens = {}));
\r
4216 * The FormattingOptions namespace provides helper functions to work with
\r
4217 * [FormattingOptions](#FormattingOptions) literals.
\r
4219 var FormattingOptions;
\r
4220 (function (FormattingOptions) {
\r
4222 * Creates a new FormattingOptions literal.
\r
4224 function create(tabSize, insertSpaces) {
\r
4225 return { tabSize: tabSize, insertSpaces: insertSpaces };
\r
4227 FormattingOptions.create = create;
\r
4229 * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.
\r
4231 function is(value) {
\r
4232 var candidate = value;
\r
4233 return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
\r
4235 FormattingOptions.is = is;
\r
4236 })(FormattingOptions || (FormattingOptions = {}));
\r
4238 * The DocumentLink namespace provides helper functions to work with
\r
4239 * [DocumentLink](#DocumentLink) literals.
\r
4242 (function (DocumentLink) {
\r
4244 * Creates a new DocumentLink literal.
\r
4246 function create(range, target, data) {
\r
4247 return { range: range, target: target, data: data };
\r
4249 DocumentLink.create = create;
\r
4251 * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.
\r
4253 function is(value) {
\r
4254 var candidate = value;
\r
4255 return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
\r
4257 DocumentLink.is = is;
\r
4258 })(DocumentLink || (DocumentLink = {}));
\r
4260 * The SelectionRange namespace provides helper function to work with
\r
4261 * SelectionRange literals.
\r
4263 var SelectionRange;
\r
4264 (function (SelectionRange) {
\r
4266 * Creates a new SelectionRange
\r
4267 * @param range the range.
\r
4268 * @param parent an optional parent.
\r
4270 function create(range, parent) {
\r
4271 return { range: range, parent: parent };
\r
4273 SelectionRange.create = create;
\r
4274 function is(value) {
\r
4275 var candidate = value;
\r
4276 return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
\r
4278 SelectionRange.is = is;
\r
4279 })(SelectionRange || (SelectionRange = {}));
\r
4280 var EOL = ['\n', '\r\n', '\r'];
\r
4282 * @deprecated Use the text document from the new vscode-languageserver-textdocument package.
\r
4285 (function (TextDocument) {
\r
4287 * Creates a new ITextDocument literal from the given uri and content.
\r
4288 * @param uri The document's uri.
\r
4289 * @param languageId The document's language Id.
\r
4290 * @param content The document's content.
\r
4292 function create(uri, languageId, version, content) {
\r
4293 return new FullTextDocument(uri, languageId, version, content);
\r
4295 TextDocument.create = create;
\r
4297 * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.
\r
4299 function is(value) {
\r
4300 var candidate = value;
\r
4301 return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount)
\r
4302 && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
\r
4304 TextDocument.is = is;
\r
4305 function applyEdits(document, edits) {
\r
4306 var text = document.getText();
\r
4307 var sortedEdits = mergeSort(edits, function (a, b) {
\r
4308 var diff = a.range.start.line - b.range.start.line;
\r
4310 return a.range.start.character - b.range.start.character;
\r
4314 var lastModifiedOffset = text.length;
\r
4315 for (var i = sortedEdits.length - 1; i >= 0; i--) {
\r
4316 var e = sortedEdits[i];
\r
4317 var startOffset = document.offsetAt(e.range.start);
\r
4318 var endOffset = document.offsetAt(e.range.end);
\r
4319 if (endOffset <= lastModifiedOffset) {
\r
4320 text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
\r
4323 throw new Error('Overlapping edit');
\r
4325 lastModifiedOffset = startOffset;
\r
4329 TextDocument.applyEdits = applyEdits;
\r
4330 function mergeSort(data, compare) {
\r
4331 if (data.length <= 1) {
\r
4335 var p = (data.length / 2) | 0;
\r
4336 var left = data.slice(0, p);
\r
4337 var right = data.slice(p);
\r
4338 mergeSort(left, compare);
\r
4339 mergeSort(right, compare);
\r
4343 while (leftIdx < left.length && rightIdx < right.length) {
\r
4344 var ret = compare(left[leftIdx], right[rightIdx]);
\r
4346 // smaller_equal -> take left to preserve order
\r
4347 data[i++] = left[leftIdx++];
\r
4350 // greater -> take right
\r
4351 data[i++] = right[rightIdx++];
\r
4354 while (leftIdx < left.length) {
\r
4355 data[i++] = left[leftIdx++];
\r
4357 while (rightIdx < right.length) {
\r
4358 data[i++] = right[rightIdx++];
\r
4362 })(TextDocument || (TextDocument = {}));
\r
4363 var FullTextDocument = /** @class */ (function () {
\r
4364 function FullTextDocument(uri, languageId, version, content) {
\r
4366 this._languageId = languageId;
\r
4367 this._version = version;
\r
4368 this._content = content;
\r
4369 this._lineOffsets = undefined;
\r
4371 Object.defineProperty(FullTextDocument.prototype, "uri", {
\r
4372 get: function () {
\r
4376 configurable: true
\r
4378 Object.defineProperty(FullTextDocument.prototype, "languageId", {
\r
4379 get: function () {
\r
4380 return this._languageId;
\r
4383 configurable: true
\r
4385 Object.defineProperty(FullTextDocument.prototype, "version", {
\r
4386 get: function () {
\r
4387 return this._version;
\r
4390 configurable: true
\r
4392 FullTextDocument.prototype.getText = function (range) {
\r
4394 var start = this.offsetAt(range.start);
\r
4395 var end = this.offsetAt(range.end);
\r
4396 return this._content.substring(start, end);
\r
4398 return this._content;
\r
4400 FullTextDocument.prototype.update = function (event, version) {
\r
4401 this._content = event.text;
\r
4402 this._version = version;
\r
4403 this._lineOffsets = undefined;
\r
4405 FullTextDocument.prototype.getLineOffsets = function () {
\r
4406 if (this._lineOffsets === undefined) {
\r
4407 var lineOffsets = [];
\r
4408 var text = this._content;
\r
4409 var isLineStart = true;
\r
4410 for (var i = 0; i < text.length; i++) {
\r
4411 if (isLineStart) {
\r
4412 lineOffsets.push(i);
\r
4413 isLineStart = false;
\r
4415 var ch = text.charAt(i);
\r
4416 isLineStart = (ch === '\r' || ch === '\n');
\r
4417 if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
\r
4421 if (isLineStart && text.length > 0) {
\r
4422 lineOffsets.push(text.length);
\r
4424 this._lineOffsets = lineOffsets;
\r
4426 return this._lineOffsets;
\r
4428 FullTextDocument.prototype.positionAt = function (offset) {
\r
4429 offset = Math.max(Math.min(offset, this._content.length), 0);
\r
4430 var lineOffsets = this.getLineOffsets();
\r
4431 var low = 0, high = lineOffsets.length;
\r
4433 return Position.create(0, offset);
\r
4435 while (low < high) {
\r
4436 var mid = Math.floor((low + high) / 2);
\r
4437 if (lineOffsets[mid] > offset) {
\r
4444 // low is the least x for which the line offset is larger than the current offset
\r
4445 // or array.length if no line offset is larger than the current offset
\r
4446 var line = low - 1;
\r
4447 return Position.create(line, offset - lineOffsets[line]);
\r
4449 FullTextDocument.prototype.offsetAt = function (position) {
\r
4450 var lineOffsets = this.getLineOffsets();
\r
4451 if (position.line >= lineOffsets.length) {
\r
4452 return this._content.length;
\r
4454 else if (position.line < 0) {
\r
4457 var lineOffset = lineOffsets[position.line];
\r
4458 var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
\r
4459 return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
\r
4461 Object.defineProperty(FullTextDocument.prototype, "lineCount", {
\r
4462 get: function () {
\r
4463 return this.getLineOffsets().length;
\r
4466 configurable: true
\r
4468 return FullTextDocument;
\r
4472 var toString = Object.prototype.toString;
\r
4473 function defined(value) {
\r
4474 return typeof value !== 'undefined';
\r
4476 Is.defined = defined;
\r
4477 function undefined(value) {
\r
4478 return typeof value === 'undefined';
\r
4480 Is.undefined = undefined;
\r
4481 function boolean(value) {
\r
4482 return value === true || value === false;
\r
4484 Is.boolean = boolean;
\r
4485 function string(value) {
\r
4486 return toString.call(value) === '[object String]';
\r
4488 Is.string = string;
\r
4489 function number(value) {
\r
4490 return toString.call(value) === '[object Number]';
\r
4492 Is.number = number;
\r
4493 function func(value) {
\r
4494 return toString.call(value) === '[object Function]';
\r
4497 function objectLiteral(value) {
\r
4498 // Strictly speaking class instances pass this check as well. Since the LSP
\r
4499 // doesn't use classes we ignore this for now. If we do we need to add something
\r
4500 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
\r
4501 return value !== null && typeof value === 'object';
\r
4503 Is.objectLiteral = objectLiteral;
\r
4504 function typedArray(value, check) {
\r
4505 return Array.isArray(value) && value.every(check);
\r
4507 Is.typedArray = typedArray;
\r
4508 })(Is || (Is = {}));
\r
4513 /***/ (function(module, exports, __webpack_require__) {
4516 /* --------------------------------------------------------------------------------------------
\r
4517 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
4518 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
4519 * ------------------------------------------------------------------------------------------ */
\r
4521 Object.defineProperty(exports, "__esModule", { value: true });
\r
4522 const Is = __webpack_require__(20);
\r
4523 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
4524 const messages_1 = __webpack_require__(21);
\r
4525 const protocol_implementation_1 = __webpack_require__(22);
\r
4526 exports.ImplementationRequest = protocol_implementation_1.ImplementationRequest;
\r
4527 const protocol_typeDefinition_1 = __webpack_require__(23);
\r
4528 exports.TypeDefinitionRequest = protocol_typeDefinition_1.TypeDefinitionRequest;
\r
4529 const protocol_workspaceFolders_1 = __webpack_require__(24);
\r
4530 exports.WorkspaceFoldersRequest = protocol_workspaceFolders_1.WorkspaceFoldersRequest;
\r
4531 exports.DidChangeWorkspaceFoldersNotification = protocol_workspaceFolders_1.DidChangeWorkspaceFoldersNotification;
\r
4532 const protocol_configuration_1 = __webpack_require__(25);
\r
4533 exports.ConfigurationRequest = protocol_configuration_1.ConfigurationRequest;
\r
4534 const protocol_colorProvider_1 = __webpack_require__(26);
\r
4535 exports.DocumentColorRequest = protocol_colorProvider_1.DocumentColorRequest;
\r
4536 exports.ColorPresentationRequest = protocol_colorProvider_1.ColorPresentationRequest;
\r
4537 const protocol_foldingRange_1 = __webpack_require__(27);
\r
4538 exports.FoldingRangeRequest = protocol_foldingRange_1.FoldingRangeRequest;
\r
4539 const protocol_declaration_1 = __webpack_require__(28);
\r
4540 exports.DeclarationRequest = protocol_declaration_1.DeclarationRequest;
\r
4541 const protocol_selectionRange_1 = __webpack_require__(29);
\r
4542 exports.SelectionRangeRequest = protocol_selectionRange_1.SelectionRangeRequest;
\r
4543 const protocol_progress_1 = __webpack_require__(30);
\r
4544 exports.WorkDoneProgress = protocol_progress_1.WorkDoneProgress;
\r
4545 exports.WorkDoneProgressCreateRequest = protocol_progress_1.WorkDoneProgressCreateRequest;
\r
4546 exports.WorkDoneProgressCancelNotification = protocol_progress_1.WorkDoneProgressCancelNotification;
\r
4547 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
4548 let __noDynamicImport;
\r
4550 * The DocumentFilter namespace provides helper functions to work with
\r
4551 * [DocumentFilter](#DocumentFilter) literals.
\r
4553 var DocumentFilter;
\r
4554 (function (DocumentFilter) {
\r
4555 function is(value) {
\r
4556 const candidate = value;
\r
4557 return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);
\r
4559 DocumentFilter.is = is;
\r
4560 })(DocumentFilter = exports.DocumentFilter || (exports.DocumentFilter = {}));
\r
4562 * The DocumentSelector namespace provides helper functions to work with
\r
4563 * [DocumentSelector](#DocumentSelector)s.
\r
4565 var DocumentSelector;
\r
4566 (function (DocumentSelector) {
\r
4567 function is(value) {
\r
4568 if (!Array.isArray(value)) {
\r
4571 for (let elem of value) {
\r
4572 if (!Is.string(elem) && !DocumentFilter.is(elem)) {
\r
4578 DocumentSelector.is = is;
\r
4579 })(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));
\r
4581 * The `client/registerCapability` request is sent from the server to the client to register a new capability
\r
4582 * handler on the client side.
\r
4584 var RegistrationRequest;
\r
4585 (function (RegistrationRequest) {
\r
4586 RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');
\r
4587 })(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));
\r
4589 * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability
\r
4590 * handler on the client side.
\r
4592 var UnregistrationRequest;
\r
4593 (function (UnregistrationRequest) {
\r
4594 UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');
\r
4595 })(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));
\r
4596 var ResourceOperationKind;
\r
4597 (function (ResourceOperationKind) {
\r
4599 * Supports creating new files and folders.
\r
4601 ResourceOperationKind.Create = 'create';
\r
4603 * Supports renaming existing files and folders.
\r
4605 ResourceOperationKind.Rename = 'rename';
\r
4607 * Supports deleting existing files and folders.
\r
4609 ResourceOperationKind.Delete = 'delete';
\r
4610 })(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));
\r
4611 var FailureHandlingKind;
\r
4612 (function (FailureHandlingKind) {
\r
4614 * Applying the workspace change is simply aborted if one of the changes provided
\r
4615 * fails. All operations executed before the failing operation stay executed.
\r
4617 FailureHandlingKind.Abort = 'abort';
\r
4619 * All operations are executed transactional. That means they either all
\r
4620 * succeed or no changes at all are applied to the workspace.
\r
4622 FailureHandlingKind.Transactional = 'transactional';
\r
4624 * If the workspace edit contains only textual file changes they are executed transactional.
\r
4625 * If resource changes (create, rename or delete file) are part of the change the failure
\r
4626 * handling startegy is abort.
\r
4628 FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';
\r
4630 * The client tries to undo the operations already executed. But there is no
\r
4631 * guarantee that this is succeeding.
\r
4633 FailureHandlingKind.Undo = 'undo';
\r
4634 })(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));
\r
4636 * The StaticRegistrationOptions namespace provides helper functions to work with
\r
4637 * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.
\r
4639 var StaticRegistrationOptions;
\r
4640 (function (StaticRegistrationOptions) {
\r
4641 function hasId(value) {
\r
4642 const candidate = value;
\r
4643 return candidate && Is.string(candidate.id) && candidate.id.length > 0;
\r
4645 StaticRegistrationOptions.hasId = hasId;
\r
4646 })(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));
\r
4648 * The TextDocumentRegistrationOptions namespace provides helper functions to work with
\r
4649 * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.
\r
4651 var TextDocumentRegistrationOptions;
\r
4652 (function (TextDocumentRegistrationOptions) {
\r
4653 function is(value) {
\r
4654 const candidate = value;
\r
4655 return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));
\r
4657 TextDocumentRegistrationOptions.is = is;
\r
4658 })(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));
\r
4660 * The WorkDoneProgressOptions namespace provides helper functions to work with
\r
4661 * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.
\r
4663 var WorkDoneProgressOptions;
\r
4664 (function (WorkDoneProgressOptions) {
\r
4665 function is(value) {
\r
4666 const candidate = value;
\r
4667 return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));
\r
4669 WorkDoneProgressOptions.is = is;
\r
4670 function hasWorkDoneProgress(value) {
\r
4671 const candidate = value;
\r
4672 return candidate && Is.boolean(candidate.workDoneProgress);
\r
4674 WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;
\r
4675 })(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));
\r
4677 * The initialize request is sent from the client to the server.
\r
4678 * It is sent once as the request after starting up the server.
\r
4679 * The requests parameter is of type [InitializeParams](#InitializeParams)
\r
4680 * the response if of type [InitializeResult](#InitializeResult) of a Thenable that
\r
4681 * resolves to such.
\r
4683 var InitializeRequest;
\r
4684 (function (InitializeRequest) {
\r
4685 InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');
\r
4686 })(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));
\r
4688 * Known error codes for an `InitializeError`;
\r
4690 var InitializeError;
\r
4691 (function (InitializeError) {
\r
4693 * If the protocol version provided by the client can't be handled by the server.
\r
4694 * @deprecated This initialize error got replaced by client capabilities. There is
\r
4695 * no version handshake in version 3.0x
\r
4697 InitializeError.unknownProtocolVersion = 1;
\r
4698 })(InitializeError = exports.InitializeError || (exports.InitializeError = {}));
\r
4700 * The intialized notification is sent from the client to the
\r
4701 * server after the client is fully initialized and the server
\r
4702 * is allowed to send requests from the server to the client.
\r
4704 var InitializedNotification;
\r
4705 (function (InitializedNotification) {
\r
4706 InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');
\r
4707 })(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));
\r
4708 //---- Shutdown Method ----
\r
4710 * A shutdown request is sent from the client to the server.
\r
4711 * It is sent once when the client decides to shutdown the
\r
4712 * server. The only notification that is sent after a shutdown request
\r
4713 * is the exit event.
\r
4715 var ShutdownRequest;
\r
4716 (function (ShutdownRequest) {
\r
4717 ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');
\r
4718 })(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));
\r
4719 //---- Exit Notification ----
\r
4721 * The exit event is sent from the client to the server to
\r
4722 * ask the server to exit its process.
\r
4724 var ExitNotification;
\r
4725 (function (ExitNotification) {
\r
4726 ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');
\r
4727 })(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));
\r
4729 * The configuration change notification is sent from the client to the server
\r
4730 * when the client's configuration has changed. The notification contains
\r
4731 * the changed configuration as defined by the language client.
\r
4733 var DidChangeConfigurationNotification;
\r
4734 (function (DidChangeConfigurationNotification) {
\r
4735 DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');
\r
4736 })(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));
\r
4737 //---- Message show and log notifications ----
\r
4739 * The message type
\r
4742 (function (MessageType) {
\r
4744 * An error message.
\r
4746 MessageType.Error = 1;
\r
4748 * A warning message.
\r
4750 MessageType.Warning = 2;
\r
4752 * An information message.
\r
4754 MessageType.Info = 3;
\r
4758 MessageType.Log = 4;
\r
4759 })(MessageType = exports.MessageType || (exports.MessageType = {}));
\r
4761 * The show message notification is sent from a server to a client to ask
\r
4762 * the client to display a particular message in the user interface.
\r
4764 var ShowMessageNotification;
\r
4765 (function (ShowMessageNotification) {
\r
4766 ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');
\r
4767 })(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));
\r
4769 * The show message request is sent from the server to the client to show a message
\r
4770 * and a set of options actions to the user.
\r
4772 var ShowMessageRequest;
\r
4773 (function (ShowMessageRequest) {
\r
4774 ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');
\r
4775 })(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));
\r
4777 * The log message notification is sent from the server to the client to ask
\r
4778 * the client to log a particular message.
\r
4780 var LogMessageNotification;
\r
4781 (function (LogMessageNotification) {
\r
4782 LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');
\r
4783 })(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));
\r
4784 //---- Telemetry notification
\r
4786 * The telemetry event notification is sent from the server to the client to ask
\r
4787 * the client to log telemetry data.
\r
4789 var TelemetryEventNotification;
\r
4790 (function (TelemetryEventNotification) {
\r
4791 TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');
\r
4792 })(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));
\r
4794 * Defines how the host (editor) should sync
\r
4795 * document changes to the language server.
\r
4797 var TextDocumentSyncKind;
\r
4798 (function (TextDocumentSyncKind) {
\r
4800 * Documents should not be synced at all.
\r
4802 TextDocumentSyncKind.None = 0;
\r
4804 * Documents are synced by always sending the full content
\r
4805 * of the document.
\r
4807 TextDocumentSyncKind.Full = 1;
\r
4809 * Documents are synced by sending the full content on open.
\r
4810 * After that only incremental updates to the document are
\r
4813 TextDocumentSyncKind.Incremental = 2;
\r
4814 })(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));
\r
4816 * The document open notification is sent from the client to the server to signal
\r
4817 * newly opened text documents. The document's truth is now managed by the client
\r
4818 * and the server must not try to read the document's truth using the document's
\r
4819 * uri. Open in this sense means it is managed by the client. It doesn't necessarily
\r
4820 * mean that its content is presented in an editor. An open notification must not
\r
4821 * be sent more than once without a corresponding close notification send before.
\r
4822 * This means open and close notification must be balanced and the max open count
\r
4825 var DidOpenTextDocumentNotification;
\r
4826 (function (DidOpenTextDocumentNotification) {
\r
4827 DidOpenTextDocumentNotification.method = 'textDocument/didOpen';
\r
4828 DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);
\r
4829 })(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));
\r
4831 * The document change notification is sent from the client to the server to signal
\r
4832 * changes to a text document.
\r
4834 var DidChangeTextDocumentNotification;
\r
4835 (function (DidChangeTextDocumentNotification) {
\r
4836 DidChangeTextDocumentNotification.method = 'textDocument/didChange';
\r
4837 DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);
\r
4838 })(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));
\r
4840 * The document close notification is sent from the client to the server when
\r
4841 * the document got closed in the client. The document's truth now exists where
\r
4842 * the document's uri points to (e.g. if the document's uri is a file uri the
\r
4843 * truth now exists on disk). As with the open notification the close notification
\r
4844 * is about managing the document's content. Receiving a close notification
\r
4845 * doesn't mean that the document was open in an editor before. A close
\r
4846 * notification requires a previous open notification to be sent.
\r
4848 var DidCloseTextDocumentNotification;
\r
4849 (function (DidCloseTextDocumentNotification) {
\r
4850 DidCloseTextDocumentNotification.method = 'textDocument/didClose';
\r
4851 DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);
\r
4852 })(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));
\r
4854 * The document save notification is sent from the client to the server when
\r
4855 * the document got saved in the client.
\r
4857 var DidSaveTextDocumentNotification;
\r
4858 (function (DidSaveTextDocumentNotification) {
\r
4859 DidSaveTextDocumentNotification.method = 'textDocument/didSave';
\r
4860 DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);
\r
4861 })(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));
\r
4863 * Represents reasons why a text document is saved.
\r
4865 var TextDocumentSaveReason;
\r
4866 (function (TextDocumentSaveReason) {
\r
4868 * Manually triggered, e.g. by the user pressing save, by starting debugging,
\r
4869 * or by an API call.
\r
4871 TextDocumentSaveReason.Manual = 1;
\r
4873 * Automatic after a delay.
\r
4875 TextDocumentSaveReason.AfterDelay = 2;
\r
4877 * When the editor lost focus.
\r
4879 TextDocumentSaveReason.FocusOut = 3;
\r
4880 })(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));
\r
4882 * A document will save notification is sent from the client to the server before
\r
4883 * the document is actually saved.
\r
4885 var WillSaveTextDocumentNotification;
\r
4886 (function (WillSaveTextDocumentNotification) {
\r
4887 WillSaveTextDocumentNotification.method = 'textDocument/willSave';
\r
4888 WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);
\r
4889 })(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));
\r
4891 * A document will save request is sent from the client to the server before
\r
4892 * the document is actually saved. The request can return an array of TextEdits
\r
4893 * which will be applied to the text document before it is saved. Please note that
\r
4894 * clients might drop results if computing the text edits took too long or if a
\r
4895 * server constantly fails on this request. This is done to keep the save fast and
\r
4898 var WillSaveTextDocumentWaitUntilRequest;
\r
4899 (function (WillSaveTextDocumentWaitUntilRequest) {
\r
4900 WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';
\r
4901 WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);
\r
4902 })(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));
\r
4904 * The watched files notification is sent from the client to the server when
\r
4905 * the client detects changes to file watched by the language client.
\r
4907 var DidChangeWatchedFilesNotification;
\r
4908 (function (DidChangeWatchedFilesNotification) {
\r
4909 DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');
\r
4910 })(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));
\r
4912 * The file event type
\r
4914 var FileChangeType;
\r
4915 (function (FileChangeType) {
\r
4917 * The file got created.
\r
4919 FileChangeType.Created = 1;
\r
4921 * The file got changed.
\r
4923 FileChangeType.Changed = 2;
\r
4925 * The file got deleted.
\r
4927 FileChangeType.Deleted = 3;
\r
4928 })(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));
\r
4930 (function (WatchKind) {
\r
4932 * Interested in create events.
\r
4934 WatchKind.Create = 1;
\r
4936 * Interested in change events
\r
4938 WatchKind.Change = 2;
\r
4940 * Interested in delete events
\r
4942 WatchKind.Delete = 4;
\r
4943 })(WatchKind = exports.WatchKind || (exports.WatchKind = {}));
\r
4945 * Diagnostics notification are sent from the server to the client to signal
\r
4946 * results of validation runs.
\r
4948 var PublishDiagnosticsNotification;
\r
4949 (function (PublishDiagnosticsNotification) {
\r
4950 PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');
\r
4951 })(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));
\r
4953 * How a completion was triggered
\r
4955 var CompletionTriggerKind;
\r
4956 (function (CompletionTriggerKind) {
\r
4958 * Completion was triggered by typing an identifier (24x7 code
\r
4959 * complete), manual invocation (e.g Ctrl+Space) or via API.
\r
4961 CompletionTriggerKind.Invoked = 1;
\r
4963 * Completion was triggered by a trigger character specified by
\r
4964 * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
\r
4966 CompletionTriggerKind.TriggerCharacter = 2;
\r
4968 * Completion was re-triggered as current completion list is incomplete
\r
4970 CompletionTriggerKind.TriggerForIncompleteCompletions = 3;
\r
4971 })(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));
\r
4973 * Request to request completion at a given text document position. The request's
\r
4974 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response
\r
4975 * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)
\r
4976 * or a Thenable that resolves to such.
\r
4978 * The request can delay the computation of the [`detail`](#CompletionItem.detail)
\r
4979 * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`
\r
4980 * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,
\r
4981 * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.
\r
4983 var CompletionRequest;
\r
4984 (function (CompletionRequest) {
\r
4985 CompletionRequest.method = 'textDocument/completion';
\r
4986 CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);
\r
4987 /** @deprecated Use CompletionRequest.type */
\r
4988 CompletionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
4989 })(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));
\r
4991 * Request to resolve additional information for a given completion item.The request's
\r
4992 * parameter is of type [CompletionItem](#CompletionItem) the response
\r
4993 * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.
\r
4995 var CompletionResolveRequest;
\r
4996 (function (CompletionResolveRequest) {
\r
4997 CompletionResolveRequest.method = 'completionItem/resolve';
\r
4998 CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);
\r
4999 })(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));
\r
5001 * Request to request hover information at a given text document position. The request's
\r
5002 * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of
\r
5003 * type [Hover](#Hover) or a Thenable that resolves to such.
\r
5006 (function (HoverRequest) {
\r
5007 HoverRequest.method = 'textDocument/hover';
\r
5008 HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);
\r
5009 })(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));
\r
5011 * How a signature help was triggered.
\r
5015 var SignatureHelpTriggerKind;
\r
5016 (function (SignatureHelpTriggerKind) {
\r
5018 * Signature help was invoked manually by the user or by a command.
\r
5020 SignatureHelpTriggerKind.Invoked = 1;
\r
5022 * Signature help was triggered by a trigger character.
\r
5024 SignatureHelpTriggerKind.TriggerCharacter = 2;
\r
5026 * Signature help was triggered by the cursor moving or by the document content changing.
\r
5028 SignatureHelpTriggerKind.ContentChange = 3;
\r
5029 })(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));
\r
5030 var SignatureHelpRequest;
\r
5031 (function (SignatureHelpRequest) {
\r
5032 SignatureHelpRequest.method = 'textDocument/signatureHelp';
\r
5033 SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);
\r
5034 })(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));
\r
5036 * A request to resolve the definition location of a symbol at a given text
\r
5037 * document position. The request's parameter is of type [TextDocumentPosition]
\r
5038 * (#TextDocumentPosition) the response is of either type [Definition](#Definition)
\r
5039 * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves
\r
5042 var DefinitionRequest;
\r
5043 (function (DefinitionRequest) {
\r
5044 DefinitionRequest.method = 'textDocument/definition';
\r
5045 DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);
\r
5046 /** @deprecated Use DefinitionRequest.type */
\r
5047 DefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5048 })(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));
\r
5050 * A request to resolve project-wide references for the symbol denoted
\r
5051 * by the given text document position. The request's parameter is of
\r
5052 * type [ReferenceParams](#ReferenceParams) the response is of type
\r
5053 * [Location[]](#Location) or a Thenable that resolves to such.
\r
5055 var ReferencesRequest;
\r
5056 (function (ReferencesRequest) {
\r
5057 ReferencesRequest.method = 'textDocument/references';
\r
5058 ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);
\r
5059 /** @deprecated Use ReferencesRequest.type */
\r
5060 ReferencesRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5061 })(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));
\r
5063 * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given
\r
5064 * text document position. The request's parameter is of type [TextDocumentPosition]
\r
5065 * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]
\r
5066 * (#DocumentHighlight) or a Thenable that resolves to such.
\r
5068 var DocumentHighlightRequest;
\r
5069 (function (DocumentHighlightRequest) {
\r
5070 DocumentHighlightRequest.method = 'textDocument/documentHighlight';
\r
5071 DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);
\r
5072 /** @deprecated Use DocumentHighlightRequest.type */
\r
5073 DocumentHighlightRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5074 })(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));
\r
5076 * A request to list all symbols found in a given text document. The request's
\r
5077 * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the
\r
5078 * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable
\r
5079 * that resolves to such.
\r
5081 var DocumentSymbolRequest;
\r
5082 (function (DocumentSymbolRequest) {
\r
5083 DocumentSymbolRequest.method = 'textDocument/documentSymbol';
\r
5084 DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);
\r
5085 /** @deprecated Use DocumentSymbolRequest.type */
\r
5086 DocumentSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5087 })(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));
\r
5089 * A request to provide commands for the given text document and range.
\r
5091 var CodeActionRequest;
\r
5092 (function (CodeActionRequest) {
\r
5093 CodeActionRequest.method = 'textDocument/codeAction';
\r
5094 CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);
\r
5095 /** @deprecated Use CodeActionRequest.type */
\r
5096 CodeActionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5097 })(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));
\r
5099 * A request to list project-wide symbols matching the query string given
\r
5100 * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is
\r
5101 * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that
\r
5102 * resolves to such.
\r
5104 var WorkspaceSymbolRequest;
\r
5105 (function (WorkspaceSymbolRequest) {
\r
5106 WorkspaceSymbolRequest.method = 'workspace/symbol';
\r
5107 WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);
\r
5108 /** @deprecated Use WorkspaceSymbolRequest.type */
\r
5109 WorkspaceSymbolRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5110 })(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));
\r
5112 * A request to provide code lens for the given text document.
\r
5114 var CodeLensRequest;
\r
5115 (function (CodeLensRequest) {
\r
5116 CodeLensRequest.type = new messages_1.ProtocolRequestType('textDocument/codeLens');
\r
5117 /** @deprecated Use CodeLensRequest.type */
\r
5118 CodeLensRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5119 })(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));
\r
5121 * A request to resolve a command for a given code lens.
\r
5123 var CodeLensResolveRequest;
\r
5124 (function (CodeLensResolveRequest) {
\r
5125 CodeLensResolveRequest.type = new messages_1.ProtocolRequestType('codeLens/resolve');
\r
5126 })(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));
\r
5128 * A request to provide document links
\r
5130 var DocumentLinkRequest;
\r
5131 (function (DocumentLinkRequest) {
\r
5132 DocumentLinkRequest.method = 'textDocument/documentLink';
\r
5133 DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);
\r
5134 /** @deprecated Use DocumentLinkRequest.type */
\r
5135 DocumentLinkRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5136 })(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));
\r
5138 * Request to resolve additional information for a given document link. The request's
\r
5139 * parameter is of type [DocumentLink](#DocumentLink) the response
\r
5140 * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.
\r
5142 var DocumentLinkResolveRequest;
\r
5143 (function (DocumentLinkResolveRequest) {
\r
5144 DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType('documentLink/resolve');
\r
5145 })(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));
\r
5147 * A request to to format a whole document.
\r
5149 var DocumentFormattingRequest;
\r
5150 (function (DocumentFormattingRequest) {
\r
5151 DocumentFormattingRequest.method = 'textDocument/formatting';
\r
5152 DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);
\r
5153 })(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));
\r
5155 * A request to to format a range in a document.
\r
5157 var DocumentRangeFormattingRequest;
\r
5158 (function (DocumentRangeFormattingRequest) {
\r
5159 DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';
\r
5160 DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);
\r
5161 })(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));
\r
5163 * A request to format a document on type.
\r
5165 var DocumentOnTypeFormattingRequest;
\r
5166 (function (DocumentOnTypeFormattingRequest) {
\r
5167 DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';
\r
5168 DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);
\r
5169 })(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));
\r
5171 * A request to rename a symbol.
\r
5173 var RenameRequest;
\r
5174 (function (RenameRequest) {
\r
5175 RenameRequest.method = 'textDocument/rename';
\r
5176 RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);
\r
5177 })(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));
\r
5179 * A request to test and perform the setup necessary for a rename.
\r
5181 var PrepareRenameRequest;
\r
5182 (function (PrepareRenameRequest) {
\r
5183 PrepareRenameRequest.method = 'textDocument/prepareRename';
\r
5184 PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);
\r
5185 })(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));
\r
5187 * A request send from the client to the server to execute a command. The request might return
\r
5188 * a workspace edit which the client will apply to the workspace.
\r
5190 var ExecuteCommandRequest;
\r
5191 (function (ExecuteCommandRequest) {
\r
5192 ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');
\r
5193 })(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));
\r
5195 * A request sent from the server to the client to modified certain resources.
\r
5197 var ApplyWorkspaceEditRequest;
\r
5198 (function (ApplyWorkspaceEditRequest) {
\r
5199 ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');
\r
5200 })(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));
\r
5205 /***/ (function(module, exports, __webpack_require__) {
5208 /* --------------------------------------------------------------------------------------------
\r
5209 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5210 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5211 * ------------------------------------------------------------------------------------------ */
\r
5213 Object.defineProperty(exports, "__esModule", { value: true });
\r
5214 function boolean(value) {
\r
5215 return value === true || value === false;
\r
5217 exports.boolean = boolean;
\r
5218 function string(value) {
\r
5219 return typeof value === 'string' || value instanceof String;
\r
5221 exports.string = string;
\r
5222 function number(value) {
\r
5223 return typeof value === 'number' || value instanceof Number;
\r
5225 exports.number = number;
\r
5226 function error(value) {
\r
5227 return value instanceof Error;
\r
5229 exports.error = error;
\r
5230 function func(value) {
\r
5231 return typeof value === 'function';
\r
5233 exports.func = func;
\r
5234 function array(value) {
\r
5235 return Array.isArray(value);
\r
5237 exports.array = array;
\r
5238 function stringArray(value) {
\r
5239 return array(value) && value.every(elem => string(elem));
\r
5241 exports.stringArray = stringArray;
\r
5242 function typedArray(value, check) {
\r
5243 return Array.isArray(value) && value.every(check);
\r
5245 exports.typedArray = typedArray;
\r
5246 function objectLiteral(value) {
\r
5247 // Strictly speaking class instances pass this check as well. Since the LSP
\r
5248 // doesn't use classes we ignore this for now. If we do we need to add something
\r
5249 // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`
\r
5250 return value !== null && typeof value === 'object';
\r
5252 exports.objectLiteral = objectLiteral;
\r
5257 /***/ (function(module, exports, __webpack_require__) {
5260 /* --------------------------------------------------------------------------------------------
\r
5261 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5262 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5263 * ------------------------------------------------------------------------------------------ */
\r
5265 Object.defineProperty(exports, "__esModule", { value: true });
\r
5266 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5267 class ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {
\r
5268 constructor(method) {
\r
5272 exports.ProtocolRequestType0 = ProtocolRequestType0;
\r
5273 class ProtocolRequestType extends vscode_jsonrpc_1.RequestType {
\r
5274 constructor(method) {
\r
5278 exports.ProtocolRequestType = ProtocolRequestType;
\r
5279 class ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {
\r
5280 constructor(method) {
\r
5284 exports.ProtocolNotificationType = ProtocolNotificationType;
\r
5285 class ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {
\r
5286 constructor(method) {
\r
5290 exports.ProtocolNotificationType0 = ProtocolNotificationType0;
\r
5295 /***/ (function(module, exports, __webpack_require__) {
5298 /* --------------------------------------------------------------------------------------------
\r
5299 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5300 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5301 * ------------------------------------------------------------------------------------------ */
\r
5303 Object.defineProperty(exports, "__esModule", { value: true });
\r
5304 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5305 const messages_1 = __webpack_require__(21);
\r
5306 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
5307 let __noDynamicImport;
\r
5309 * A request to resolve the implementation locations of a symbol at a given text
\r
5310 * document position. The request's parameter is of type [TextDocumentPositioParams]
\r
5311 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
\r
5312 * Thenable that resolves to such.
\r
5314 var ImplementationRequest;
\r
5315 (function (ImplementationRequest) {
\r
5316 ImplementationRequest.method = 'textDocument/implementation';
\r
5317 ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);
\r
5318 /** @deprecated Use ImplementationRequest.type */
\r
5319 ImplementationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5320 })(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));
\r
5325 /***/ (function(module, exports, __webpack_require__) {
5328 /* --------------------------------------------------------------------------------------------
\r
5329 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5330 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5331 * ------------------------------------------------------------------------------------------ */
\r
5333 Object.defineProperty(exports, "__esModule", { value: true });
\r
5334 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5335 const messages_1 = __webpack_require__(21);
\r
5336 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
5337 let __noDynamicImport;
\r
5339 * A request to resolve the type definition locations of a symbol at a given text
\r
5340 * document position. The request's parameter is of type [TextDocumentPositioParams]
\r
5341 * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a
\r
5342 * Thenable that resolves to such.
\r
5344 var TypeDefinitionRequest;
\r
5345 (function (TypeDefinitionRequest) {
\r
5346 TypeDefinitionRequest.method = 'textDocument/typeDefinition';
\r
5347 TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);
\r
5348 /** @deprecated Use TypeDefinitionRequest.type */
\r
5349 TypeDefinitionRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5350 })(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));
\r
5355 /***/ (function(module, exports, __webpack_require__) {
5358 /* --------------------------------------------------------------------------------------------
\r
5359 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5360 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5361 * ------------------------------------------------------------------------------------------ */
\r
5363 Object.defineProperty(exports, "__esModule", { value: true });
\r
5364 const messages_1 = __webpack_require__(21);
\r
5366 * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.
\r
5368 var WorkspaceFoldersRequest;
\r
5369 (function (WorkspaceFoldersRequest) {
\r
5370 WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');
\r
5371 })(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));
\r
5373 * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace
\r
5374 * folder configuration changes.
\r
5376 var DidChangeWorkspaceFoldersNotification;
\r
5377 (function (DidChangeWorkspaceFoldersNotification) {
\r
5378 DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');
\r
5379 })(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));
\r
5384 /***/ (function(module, exports, __webpack_require__) {
5387 /* --------------------------------------------------------------------------------------------
\r
5388 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5389 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5390 * ------------------------------------------------------------------------------------------ */
\r
5392 Object.defineProperty(exports, "__esModule", { value: true });
\r
5393 const messages_1 = __webpack_require__(21);
\r
5395 * The 'workspace/configuration' request is sent from the server to the client to fetch a certain
\r
5396 * configuration setting.
\r
5398 * This pull model replaces the old push model were the client signaled configuration change via an
\r
5399 * event. If the server still needs to react to configuration changes (since the server caches the
\r
5400 * result of `workspace/configuration` requests) the server should register for an empty configuration
\r
5401 * change event and empty the cache if such an event is received.
\r
5403 var ConfigurationRequest;
\r
5404 (function (ConfigurationRequest) {
\r
5405 ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');
\r
5406 })(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));
\r
5411 /***/ (function(module, exports, __webpack_require__) {
5414 /* --------------------------------------------------------------------------------------------
\r
5415 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5416 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5417 * ------------------------------------------------------------------------------------------ */
\r
5419 Object.defineProperty(exports, "__esModule", { value: true });
\r
5420 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5421 const messages_1 = __webpack_require__(21);
\r
5423 * A request to list all color symbols found in a given text document. The request's
\r
5424 * parameter is of type [DocumentColorParams](#DocumentColorParams) the
\r
5425 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
\r
5426 * that resolves to such.
\r
5428 var DocumentColorRequest;
\r
5429 (function (DocumentColorRequest) {
\r
5430 DocumentColorRequest.method = 'textDocument/documentColor';
\r
5431 DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);
\r
5432 /** @deprecated Use DocumentColorRequest.type */
\r
5433 DocumentColorRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5434 })(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));
\r
5436 * A request to list all presentation for a color. The request's
\r
5437 * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the
\r
5438 * response is of type [ColorInformation[]](#ColorInformation) or a Thenable
\r
5439 * that resolves to such.
\r
5441 var ColorPresentationRequest;
\r
5442 (function (ColorPresentationRequest) {
\r
5443 ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');
\r
5444 })(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));
\r
5449 /***/ (function(module, exports, __webpack_require__) {
5453 /*---------------------------------------------------------------------------------------------
\r
5454 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5455 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5456 *--------------------------------------------------------------------------------------------*/
\r
5457 Object.defineProperty(exports, "__esModule", { value: true });
\r
5458 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5459 const messages_1 = __webpack_require__(21);
\r
5461 * Enum of known range kinds
\r
5463 var FoldingRangeKind;
\r
5464 (function (FoldingRangeKind) {
\r
5466 * Folding range for a comment
\r
5468 FoldingRangeKind["Comment"] = "comment";
\r
5470 * Folding range for a imports or includes
\r
5472 FoldingRangeKind["Imports"] = "imports";
\r
5474 * Folding range for a region (e.g. `#region`)
\r
5476 FoldingRangeKind["Region"] = "region";
\r
5477 })(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));
\r
5479 * A request to provide folding ranges in a document. The request's
\r
5480 * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the
\r
5481 * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable
\r
5482 * that resolves to such.
\r
5484 var FoldingRangeRequest;
\r
5485 (function (FoldingRangeRequest) {
\r
5486 FoldingRangeRequest.method = 'textDocument/foldingRange';
\r
5487 FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
\r
5488 /** @deprecated Use FoldingRangeRequest.type */
\r
5489 FoldingRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5490 })(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));
\r
5495 /***/ (function(module, exports, __webpack_require__) {
5498 /* --------------------------------------------------------------------------------------------
\r
5499 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5500 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5501 * ------------------------------------------------------------------------------------------ */
\r
5503 Object.defineProperty(exports, "__esModule", { value: true });
\r
5504 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5505 const messages_1 = __webpack_require__(21);
\r
5506 // @ts-ignore: to avoid inlining LocatioLink as dynamic import
\r
5507 let __noDynamicImport;
\r
5509 * A request to resolve the type definition locations of a symbol at a given text
\r
5510 * document position. The request's parameter is of type [TextDocumentPositioParams]
\r
5511 * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)
\r
5512 * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves
\r
5515 var DeclarationRequest;
\r
5516 (function (DeclarationRequest) {
\r
5517 DeclarationRequest.method = 'textDocument/declaration';
\r
5518 DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);
\r
5519 /** @deprecated Use DeclarationRequest.type */
\r
5520 DeclarationRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5521 })(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));
\r
5526 /***/ (function(module, exports, __webpack_require__) {
5530 /*---------------------------------------------------------------------------------------------
\r
5531 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5532 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5533 *--------------------------------------------------------------------------------------------*/
\r
5534 Object.defineProperty(exports, "__esModule", { value: true });
\r
5535 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5536 const messages_1 = __webpack_require__(21);
\r
5538 * A request to provide selection ranges in a document. The request's
\r
5539 * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the
\r
5540 * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable
\r
5541 * that resolves to such.
\r
5543 var SelectionRangeRequest;
\r
5544 (function (SelectionRangeRequest) {
\r
5545 SelectionRangeRequest.method = 'textDocument/selectionRange';
\r
5546 SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);
\r
5547 /** @deprecated Use SelectionRangeRequest.type */
\r
5548 SelectionRangeRequest.resultType = new vscode_jsonrpc_1.ProgressType();
\r
5549 })(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));
\r
5554 /***/ (function(module, exports, __webpack_require__) {
5557 /* --------------------------------------------------------------------------------------------
\r
5558 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5559 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5560 * ------------------------------------------------------------------------------------------ */
\r
5562 Object.defineProperty(exports, "__esModule", { value: true });
\r
5563 const vscode_jsonrpc_1 = __webpack_require__(5);
\r
5564 const messages_1 = __webpack_require__(21);
\r
5565 var WorkDoneProgress;
\r
5566 (function (WorkDoneProgress) {
\r
5567 WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();
\r
5568 })(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));
\r
5570 * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress
\r
5571 * reporting from the server.
\r
5573 var WorkDoneProgressCreateRequest;
\r
5574 (function (WorkDoneProgressCreateRequest) {
\r
5575 WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType('window/workDoneProgress/create');
\r
5576 })(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));
\r
5578 * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress
\r
5579 * initiated on the server side.
\r
5581 var WorkDoneProgressCancelNotification;
\r
5582 (function (WorkDoneProgressCancelNotification) {
\r
5583 WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType('window/workDoneProgress/cancel');
\r
5584 })(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));
\r
5589 /***/ (function(module, exports, __webpack_require__) {
5592 /* --------------------------------------------------------------------------------------------
\r
5593 * Copyright (c) TypeFox and others. All rights reserved.
\r
5594 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5595 * ------------------------------------------------------------------------------------------ */
\r
5597 Object.defineProperty(exports, "__esModule", { value: true });
\r
5598 const messages_1 = __webpack_require__(21);
\r
5600 * A request to result a `CallHierarchyItem` in a document at a given position.
\r
5601 * Can be used as an input to a incoming or outgoing call hierarchy.
\r
5603 * @since 3.16.0 - Proposed state
\r
5605 var CallHierarchyPrepareRequest;
\r
5606 (function (CallHierarchyPrepareRequest) {
\r
5607 CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';
\r
5608 CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);
\r
5609 })(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));
\r
5611 * A request to resolve the incoming calls for a given `CallHierarchyItem`.
\r
5613 * @since 3.16.0 - Proposed state
\r
5615 var CallHierarchyIncomingCallsRequest;
\r
5616 (function (CallHierarchyIncomingCallsRequest) {
\r
5617 CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';
\r
5618 CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);
\r
5619 })(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));
\r
5621 * A request to resolve the outgoing calls for a given `CallHierarchyItem`.
\r
5623 * @since 3.16.0 - Proposed state
\r
5625 var CallHierarchyOutgoingCallsRequest;
\r
5626 (function (CallHierarchyOutgoingCallsRequest) {
\r
5627 CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';
\r
5628 CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);
\r
5629 })(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));
\r
5634 /***/ (function(module, exports, __webpack_require__) {
5637 /* --------------------------------------------------------------------------------------------
\r
5638 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5639 * Licensed under the MIT License. See License.txt in the project root for license information.
\r
5640 * ------------------------------------------------------------------------------------------ */
\r
5642 Object.defineProperty(exports, "__esModule", { value: true });
\r
5643 const messages_1 = __webpack_require__(21);
\r
5645 * A set of predefined token types. This set is not fixed
\r
5646 * an clients can specify additional token types via the
\r
5647 * corresponding client capabilities.
\r
5649 * @since 3.16.0 - Proposed state
\r
5651 var SemanticTokenTypes;
\r
5652 (function (SemanticTokenTypes) {
\r
5653 SemanticTokenTypes["comment"] = "comment";
\r
5654 SemanticTokenTypes["keyword"] = "keyword";
\r
5655 SemanticTokenTypes["string"] = "string";
\r
5656 SemanticTokenTypes["number"] = "number";
\r
5657 SemanticTokenTypes["regexp"] = "regexp";
\r
5658 SemanticTokenTypes["operator"] = "operator";
\r
5659 SemanticTokenTypes["namespace"] = "namespace";
\r
5660 SemanticTokenTypes["type"] = "type";
\r
5661 SemanticTokenTypes["struct"] = "struct";
\r
5662 SemanticTokenTypes["class"] = "class";
\r
5663 SemanticTokenTypes["interface"] = "interface";
\r
5664 SemanticTokenTypes["enum"] = "enum";
\r
5665 SemanticTokenTypes["typeParameter"] = "typeParameter";
\r
5666 SemanticTokenTypes["function"] = "function";
\r
5667 SemanticTokenTypes["member"] = "member";
\r
5668 SemanticTokenTypes["property"] = "property";
\r
5669 SemanticTokenTypes["macro"] = "macro";
\r
5670 SemanticTokenTypes["variable"] = "variable";
\r
5671 SemanticTokenTypes["parameter"] = "parameter";
\r
5672 SemanticTokenTypes["label"] = "label";
\r
5673 })(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));
\r
5675 * A set of predefined token modifiers. This set is not fixed
\r
5676 * an clients can specify additional token types via the
\r
5677 * corresponding client capabilities.
\r
5679 * @since 3.16.0 - Proposed state
\r
5681 var SemanticTokenModifiers;
\r
5682 (function (SemanticTokenModifiers) {
\r
5683 SemanticTokenModifiers["documentation"] = "documentation";
\r
5684 SemanticTokenModifiers["declaration"] = "declaration";
\r
5685 SemanticTokenModifiers["definition"] = "definition";
\r
5686 SemanticTokenModifiers["reference"] = "reference";
\r
5687 SemanticTokenModifiers["static"] = "static";
\r
5688 SemanticTokenModifiers["abstract"] = "abstract";
\r
5689 SemanticTokenModifiers["deprecated"] = "deprecated";
\r
5690 SemanticTokenModifiers["async"] = "async";
\r
5691 SemanticTokenModifiers["volatile"] = "volatile";
\r
5692 SemanticTokenModifiers["readonly"] = "readonly";
\r
5693 })(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));
\r
5695 * @since 3.16.0 - Proposed state
\r
5697 var SemanticTokens;
\r
5698 (function (SemanticTokens) {
\r
5699 function is(value) {
\r
5700 const candidate = value;
\r
5701 return candidate !== undefined && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
\r
5702 Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
\r
5704 SemanticTokens.is = is;
\r
5705 })(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));
\r
5707 * @since 3.16.0 - Proposed state
\r
5709 var SemanticTokensRequest;
\r
5710 (function (SemanticTokensRequest) {
\r
5711 SemanticTokensRequest.method = 'textDocument/semanticTokens';
\r
5712 SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);
\r
5713 })(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));
\r
5715 * @since 3.16.0 - Proposed state
\r
5717 var SemanticTokensEditsRequest;
\r
5718 (function (SemanticTokensEditsRequest) {
\r
5719 SemanticTokensEditsRequest.method = 'textDocument/semanticTokens/edits';
\r
5720 SemanticTokensEditsRequest.type = new messages_1.ProtocolRequestType(SemanticTokensEditsRequest.method);
\r
5721 })(SemanticTokensEditsRequest = exports.SemanticTokensEditsRequest || (exports.SemanticTokensEditsRequest = {}));
\r
5723 * @since 3.16.0 - Proposed state
\r
5725 var SemanticTokensRangeRequest;
\r
5726 (function (SemanticTokensRangeRequest) {
\r
5727 SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';
\r
5728 SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);
\r
5729 })(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));
\r
5734 /***/ (function(module) {
5736 module.exports = JSON.parse("{\"$schema\":\"https://json.schemastore.org/schema-catalog\",\"version\":1,\"schemas\":[{\"name\":\".angular-cli.json\",\"description\":\"Angular CLI configuration file\",\"fileMatch\":[\".angular-cli.json\",\"angular-cli.json\"],\"url\":\"https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular/cli/lib/config/schema.json\"},{\"name\":\"Ansible Role\",\"description\":\"Ansible role task files\",\"url\":\"https://json.schemastore.org/ansible-role-2.9\",\"fileMatch\":[\"**/tasks/*.yml\",\"**/tasks/*.yaml\"],\"versions\":{\"2.0\":\"https://json.schemastore.org/ansible-role-2.0\",\"2.1\":\"https://json.schemastore.org/ansible-role-2.1\",\"2.2\":\"https://json.schemastore.org/ansible-role-2.2\",\"2.3\":\"https://json.schemastore.org/ansible-role-2.3\",\"2.4\":\"https://json.schemastore.org/ansible-role-2.4\",\"2.5\":\"https://json.schemastore.org/ansible-role-2.5\",\"2.6\":\"https://json.schemastore.org/ansible-role-2.6\",\"2.7\":\"https://json.schemastore.org/ansible-role-2.7\",\"2.9\":\"https://json.schemastore.org/ansible-role-2.9\"}},{\"name\":\"Ansible Playbook\",\"description\":\"Ansible playbook files\",\"url\":\"https://json.schemastore.org/ansible-playbook\",\"fileMatch\":[\"playbook.yml\",\"playbook.yaml\"]},{\"name\":\"Ansible Inventory\",\"description\":\"Ansible inventory files\",\"url\":\"https://json.schemastore.org/ansible-inventory\",\"fileMatch\":[\"inventory.yml\",\"inventory.yaml\"]},{\"name\":\"Ansible Collection Galaxy\",\"description\":\"Ansible Collection Galaxy metadata\",\"url\":\"https://json.schemastore.org/ansible-collection-galaxy\",\"fileMatch\":[\"galaxy.yml\",\"galaxy.yaml\"]},{\"name\":\"apple-app-site-association\",\"description\":\"Apple Universal Link, App Site Association\",\"fileMatch\":[\"apple-app-site-association\"],\"url\":\"https://json.schemastore.org/apple-app-site-association\"},{\"name\":\"appsscript.json\",\"description\":\"Google Apps Script manifest file\",\"fileMatch\":[\"appsscript.json\"],\"url\":\"https://json.schemastore.org/appsscript\"},{\"name\":\"appsettings.json\",\"description\":\"ASP.NET Core's configuration file\",\"fileMatch\":[\"appsettings.json\",\"appsettings.*.json\"],\"url\":\"https://json.schemastore.org/appsettings\"},{\"name\":\"appveyor.yml\",\"description\":\"AppVeyor CI configuration file\",\"fileMatch\":[\"appveyor.yml\"],\"url\":\"https://json.schemastore.org/appveyor\"},{\"name\":\"arc.json\",\"description\":\"A JSON schema for OpenJS Architect\",\"fileMatch\":[\"arc.json\",\"arc.yml\",\"arc.yaml\"],\"url\":\"https://raw.githubusercontent.com/architect/parser/master/schema.json\"},{\"name\":\"Avro Avsc\",\"description\":\"Avro Schema Avsc file\",\"fileMatch\":[\".avsc\"],\"url\":\"https://json.schemastore.org/avro-avsc\"},{\"name\":\"Azure IoT Edge deployment\",\"description\":\"Azure IoT Edge deployment schema\",\"url\":\"https://json.schemastore.org/azure-iot-edge-deployment-2.0\",\"versions\":{\"1.0\":\"https://json.schemastore.org/azure-iot-edge-deployment-1.0\",\"1.1\":\"https://json.schemastore.org/azure-iot-edge-deployment-2.0\"}},{\"name\":\"Azure IoT Edge deployment template\",\"description\":\"Azure IoT Edge deployment template schema\",\"fileMatch\":[\"deployment.template.json\",\"deployment.*.template.json\"],\"url\":\"https://json.schemastore.org/azure-iot-edge-deployment-template-2.0\",\"versions\":{\"1.0\":\"https://json.schemastore.org/azure-iot-edge-deployment-template-1.0\",\"1.1\":\"https://json.schemastore.org/azure-iot-edge-deployment-template-2.0\"}},{\"name\":\"Azure Pipelines\",\"description\":\"Azure Pipelines YAML pipelines definition\",\"fileMatch\":[\"azure-pipelines.yml\",\"azure-pipelines.yaml\"],\"url\":\"https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/master/service-schema.json\"},{\"name\":\"Foxx Manifest\",\"description\":\"ArangoDB Foxx service manifest file\",\"fileMatch\":[\"manifest.json\"],\"url\":\"https://json.schemastore.org/foxx-manifest\"},{\"name\":\".asmdef\",\"description\":\"Unity 3D assembly definition file\",\"fileMatch\":[\"*.asmdef\"],\"url\":\"https://json.schemastore.org/asmdef\"},{\"name\":\"babelrc.json\",\"description\":\"Babel configuration file\",\"fileMatch\":[\".babelrc\",\"babel.config.json\"],\"url\":\"https://json.schemastore.org/babelrc\"},{\"name\":\".backportrc.json\",\"description\":\"Backport configuration file\",\"fileMatch\":[\".backportrc.json\"],\"url\":\"https://json.schemastore.org/backportrc\"},{\"name\":\"batect.yml\",\"description\":\"batect configuration file\",\"fileMatch\":[\"batect.yml\",\"batect-bundle.yml\"],\"url\":\"https://batect.dev/configSchema.json\"},{\"name\":\"bamboo-spec\",\"description\":\"The Bamboo Specs allows you to define Bamboo configuration as code, and have corresponding plans/deployments created or updated automatically in Bamboo\",\"url\":\"https://json.schemastore.org/bamboo-spec\",\"fileMatch\":[\"bamboo.yaml\",\"bamboo.yml\"]},{\"name\":\"bitbucket-pipelines\",\"description\":\"Bitbucket Pipelines CI/CD manifest schema\",\"url\":\"https://bitbucket.org/atlassianlabs/atlascode/raw/main/resources/schemas/pipelines-schema.json\",\"fileMatch\":[\"bitbucket-pipelines.yml\",\"bitbucket-pipelines.yaml\"]},{\"name\":\".bootstraprc\",\"description\":\"Webpack bootstrap-loader configuration file\",\"fileMatch\":[\".bootstraprc\"],\"url\":\"https://json.schemastore.org/bootstraprc\"},{\"name\":\"bower.json\",\"description\":\"Bower package description file\",\"fileMatch\":[\"bower.json\",\".bower.json\"],\"url\":\"https://json.schemastore.org/bower\"},{\"name\":\".bowerrc\",\"description\":\"Bower configuration file\",\"fileMatch\":[\".bowerrc\"],\"url\":\"https://json.schemastore.org/bowerrc\"},{\"name\":\"behat.yml\",\"description\":\"Behat configuration file\",\"fileMatch\":[\"behat.yml\",\"*.behat.yml\"],\"url\":\"https://json.schemastore.org/behat\"},{\"name\":\"bozr.suite.json\",\"description\":\"Bozr test suite file\",\"fileMatch\":[\".suite.json\",\".xsuite.json\"],\"url\":\"https://json.schemastore.org/bozr\"},{\"name\":\"bucklescript\",\"description\":\"BuckleScript configuration file\",\"fileMatch\":[\"bsconfig.json\"],\"url\":\"https://bucklescript.github.io/bucklescript/docson/build-schema.json\"},{\"name\":\"Bukkit plugin.yml\",\"description\":\"Schema for Minecraft Bukkit plugin description files\",\"fileMatch\":[\"plugin.yml\"],\"url\":\"https://json.schemastore.org/bukkit-plugin\"},{\"name\":\"Buildkite\",\"description\":\"Schema for Buildkite pipeline.yml files\",\"fileMatch\":[\"buildkite.yml\",\"buildkite.yaml\",\"buildkite.json\",\"buildkite.*.yml\",\"buildkite.*.yaml\",\"buildkite.*.json\",\".buildkite/pipeline.yml\",\".buildkite/pipeline.yaml\",\".buildkite/pipeline.json\",\".buildkite/pipeline.*.yml\",\".buildkite/pipeline.*.yaml\",\".buildkite/pipeline.*.json\"],\"url\":\"https://raw.githubusercontent.com/buildkite/pipeline-schema/master/schema.json\"},{\"name\":\".build.yml\",\"description\":\"Sourcehut Build Manifest\",\"fileMatch\":[\".build.yml\"],\"url\":\"https://json.schemastore.org/sourcehut-build\"},{\"name\":\"bundleconfig.json\",\"description\":\"Schema for bundleconfig.json files\",\"fileMatch\":[\"bundleconfig.json\"],\"url\":\"https://json.schemastore.org/bundleconfig\"},{\"name\":\"BungeeCord plugin.yml\",\"description\":\"Schema for BungeeCord plugin description files\",\"fileMatch\":[\"plugin.yml\",\"bungee.yml\"],\"url\":\"https://json.schemastore.org/bungee-plugin\"},{\"name\":\"Camel K YAML DSL\",\"description\":\"Schema for Camel K YAML DSL\",\"fileMatch\":[\"*.camelk.yaml\"],\"url\":\"https://raw.githubusercontent.com/apache/camel-k-runtime/master/camel-k-loader-yaml/camel-k-loader-yaml/src/generated/resources/camel-yaml-dsl.json\"},{\"name\":\"Carafe\",\"description\":\"Schema for Carafe compatible JavaScript Bundles\",\"url\":\"https://carafe.fm/schema/draft-02/bundle.schema.json\",\"versions\":{\"draft-02\":\"https://carafe.fm/schema/draft-02/bundle.schema.json\",\"draft-01\":\"https://carafe.fm/schema/draft-01/bundle.schema.json\"}},{\"name\":\"CityJSON\",\"description\":\"Schema for the representation of 3D city models\",\"url\":\"https://raw.githubusercontent.com/cityjson/specs/master/schemas/cityjson.min.schema.json\"},{\"name\":\"CircleCI config.yml\",\"description\":\"Schema for CircleCI 2.0 config files\",\"fileMatch\":[\".circleci/config.yml\"],\"url\":\"https://json.schemastore.org/circleciconfig\"},{\"name\":\".cirrus.yml\",\"description\":\"Cirrus CI configuration files\",\"fileMatch\":[\".cirrus.yml\"],\"url\":\"https://json.schemastore.org/cirrus\"},{\"name\":\".clasp.json\",\"description\":\"Google Apps Script CLI project file\",\"fileMatch\":[\".clasp.json\"],\"url\":\"https://json.schemastore.org/clasp\"},{\"name\":\"cloudify\",\"description\":\"Cloudify Blueprint\",\"fileMatch\":[\"*.cfy.yaml\"],\"url\":\"https://json.schemastore.org/cloudify\"},{\"name\":\"JSON schema for Codecov configuration files\",\"description\":\"Schema for codecov.yml files.\",\"fileMatch\":[\".codecov.yml\",\"codecov.yml\"],\"url\":\"https://json.schemastore.org/codecov\"},{\"name\":\"compilerconfig.json\",\"description\":\"Schema for compilerconfig.json files\",\"fileMatch\":[\"compilerconfig.json\"],\"url\":\"https://json.schemastore.org/compilerconfig\"},{\"name\":\"compile_commands.json\",\"description\":\"LLVM compilation database\",\"fileMatch\":[\"compile_commands.json\"],\"url\":\"https://json.schemastore.org/compile-commands\"},{\"name\":\"cosmos.config.json\",\"description\":\"React Cosmos configuration file\",\"fileMatch\":[\"cosmos.config.json\"],\"url\":\"https://json.schemastore.org/cosmos-config\"},{\"name\":\"Chrome Extension\",\"description\":\"Google Chrome extension manifest file\",\"url\":\"https://json.schemastore.org/chrome-manifest\"},{\"name\":\"chutzpah.json\",\"description\":\"Chutzpah configuration file\",\"fileMatch\":[\"chutzpah.json\"],\"url\":\"https://json.schemastore.org/chutzpah\"},{\"name\":\"contentmanifest.json\",\"description\":\"Visual Studio manifest injection file\",\"fileMatch\":[\"contentmanifest.json\"],\"url\":\"https://json.schemastore.org/vsix-manifestinjection\"},{\"name\":\"cloud-sdk-pipeline-config-schema\",\"description\":\"SAP Cloud SDK Pipeline configuration\",\"fileMatch\":[\"pipeline_config.yml\"],\"url\":\"https://json.schemastore.org/cloud-sdk-pipeline-config-schema.json\"},{\"name\":\"cloudbuild.json\",\"description\":\"Google Cloud Build configuration file\",\"fileMatch\":[\"cloudbuild.json\",\"cloudbuild.yaml\",\"cloudbuild.yml\",\"*.cloudbuild.json\",\"*.cloudbuild.yaml\",\"*.cloudbuild.yml\"],\"url\":\"https://json.schemastore.org/cloudbuild\"},{\"name\":\"AWS CloudFormation\",\"description\":\"AWS CloudFormation provides a common language for you to describe and provision all the infrastructure resources in your cloud environment.\",\"fileMatch\":[\"*.cf.json\",\"*.cf.yml\",\"*.cf.yaml\",\"cloudformation.json\",\"cloudformation.yml\",\"cloudformation.yaml\"],\"url\":\"https://raw.githubusercontent.com/awslabs/goformation/master/schema/cloudformation.schema.json\"},{\"name\":\"AWS CloudFormation Serverless Application Model (SAM)\",\"description\":\"The AWS Serverless Application Model (AWS SAM, previously known as Project Flourish) extends AWS CloudFormation to provide a simplified way of defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application.\",\"fileMatch\":[\"*.sam.json\",\"*.sam.yml\",\"*.sam.yaml\",\"sam.json\",\"sam.yml\",\"sam.yaml\"],\"url\":\"https://raw.githubusercontent.com/awslabs/goformation/master/schema/sam.schema.json\"},{\"name\":\"coffeelint.json\",\"description\":\"CoffeeLint configuration file\",\"fileMatch\":[\"coffeelint.json\"],\"url\":\"https://json.schemastore.org/coffeelint\"},{\"name\":\"composer.json\",\"description\":\"PHP Composer configuration file\",\"fileMatch\":[\"composer.json\"],\"url\":\"https://json.schemastore.org/composer\"},{\"name\":\"component.json\",\"description\":\"Web component file\",\"fileMatch\":[\"component.json\"],\"url\":\"https://json.schemastore.org/component\"},{\"name\":\"config.json\",\"description\":\"ASP.NET project config file\",\"fileMatch\":[\"config.json\"],\"url\":\"https://json.schemastore.org/config\"},{\"name\":\"contribute.json\",\"description\":\"A JSON schema for open-source project contribution data by Mozilla\",\"fileMatch\":[\"contribute.json\"],\"url\":\"https://json.schemastore.org/contribute\"},{\"name\":\"cypress.json\",\"description\":\"Cypress.io test runner configuration file\",\"fileMatch\":[\"cypress.json\"],\"url\":\"https://raw.githubusercontent.com/cypress-io/cypress/develop/cli/schema/cypress.schema.json\"},{\"name\":\".creatomic\",\"description\":\"A config for Atomic Design 4 React generator\",\"fileMatch\":[\".creatomic\"],\"url\":\"https://json.schemastore.org/creatomic\"},{\"name\":\"cspell\",\"description\":\"JSON schema for cspell configuration file\",\"fileMatch\":[\".cspell.json\",\"cspell.json\",\"cSpell.json\"],\"url\":\"https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json\"},{\"name\":\".csscomb.json\",\"description\":\"A JSON schema CSS Comb's configuration file\",\"fileMatch\":[\".csscomb.json\"],\"url\":\"https://json.schemastore.org/csscomb\"},{\"name\":\".csslintrc\",\"description\":\"A JSON schema CSS Lint's configuration file\",\"fileMatch\":[\".csslintrc\"],\"url\":\"https://json.schemastore.org/csslintrc\"},{\"name\":\"Dart build configuration\",\"description\":\"Configuration for Dart's build system\",\"url\":\"https://json.schemastore.org/dart-build\"},{\"name\":\"datalogic-scan2deploy-android\",\"description\":\"Datalogic Scan2Deploy Android file\",\"fileMatch\":[\".dla.json\"],\"url\":\"https://json.schemastore.org/datalogic-scan2deploy-android\"},{\"name\":\"datalogic-scan2deploy-ce\",\"description\":\"Datalogic Scan2Deploy CE file\",\"fileMatch\":[\".dlc.json\"],\"url\":\"https://json.schemastore.org/datalogic-scan2deploy-ce\"},{\"name\":\"debugsettings.json\",\"description\":\"A JSON schema for the ASP.NET DebugSettings.json files\",\"fileMatch\":[\"debugsettings.json\"],\"url\":\"https://json.schemastore.org/debugsettings\"},{\"name\":\"dependabot.json\",\"description\":\"A JSON schema for the Dependabot config.yml files\",\"fileMatch\":[\".dependabot/config.yml\"],\"url\":\"https://json.schemastore.org/dependabot\"},{\"name\":\"dependabot-v2.json\",\"description\":\"A JSON schema for the Github Action's dependabot.yml files\",\"fileMatch\":[\".github/dependabot.yml\"],\"url\":\"https://json.schemastore.org/dependabot-2.0\"},{\"name\":\"docfx.json\",\"description\":\"A JSON schema for DocFx configuraton files\",\"fileMatch\":[\"docfx.json\"],\"url\":\"https://json.schemastore.org/docfx\",\"versions\":{\"2.8.0\":\"https://json.schemastore.org/docfx-2.8.0\"}},{\"name\":\"Dolittle Artifacts\",\"description\":\"A JSON schema for a Dolittle bounded context's artifacts\",\"fileMatch\":[\".dolittle/artifacts.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/DotNET.SDK/master/Schemas/Artifacts.Configuration/artifacts.json\"},{\"name\":\"Dolittle Bounded Context Configuration\",\"description\":\"A JSON schema for Dolittle application's bounded context configuration\",\"fileMatch\":[\"bounded-context.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Applications.Configuration/bounded-context.json\"},{\"name\":\"Dolittle Event Horizons Configuration\",\"description\":\"A JSON schema for a Dolittle bounded context's event horizon configurations\",\"fileMatch\":[\".dolittle/event-horizons.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Events/event-horizons.json\"},{\"name\":\"Dolittle Resources Configuration\",\"description\":\"A JSON schema for a Dolittle bounded context's resource configurations\",\"fileMatch\":[\".dolittle/resources.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/DotNET.Fundamentals/master/Schemas/ResourceTypes.Configuration/resources.json\"},{\"name\":\"Dolittle Server Configuration\",\"description\":\"A JSON schema for a Dolittle bounded context's event horizon's interaction server configuration\",\"fileMatch\":[\".dolittle/server.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Server/server.json\"},{\"name\":\"Dolittle Tenants Configuration\",\"description\":\"A JSON schema for a Dolittle bounded context's tenant configuration\",\"fileMatch\":[\".dolittle/tenants.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/Runtime/master/Schemas/Tenancy/tenants.json\"},{\"name\":\"Dolittle Tenant Map Configuration\",\"description\":\"A JSON schema for a Dolittle bounded context's tenant mapping configurations\",\"fileMatch\":[\".dolittle/tenant-map.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/DotNET.Fundamentals/master/Schemas/Tenancy.Configuration/tenant-map.json\"},{\"name\":\"Dolittle Topology\",\"description\":\"A JSON schema for a Dolittle bounded context's topology\",\"fileMatch\":[\".dolittle/topology.json\"],\"url\":\"https://raw.githubusercontent.com/dolittle/DotNET.SDK/master/Schemas/Applications.Configuration/topology.json\"},{\"name\":\"dotnetcli.host.json\",\"description\":\"JSON schema for .NET CLI template host files\",\"fileMatch\":[\"dotnetcli.host.json\"],\"url\":\"https://json.schemastore.org/dotnetcli.host\"},{\"name\":\"drone.json\",\"description\":\"Drone CI configuration file\",\"fileMatch\":[\".drone.yml\"],\"url\":\"https://json.schemastore.org/drone\"},{\"name\":\"Drush site aliases\",\"description\":\"JSON Schema for Drush 9 site aliases file\",\"fileMatch\":[\"sites/*.site.yml\"],\"url\":\"https://json.schemastore.org/drush.site.yml\"},{\"name\":\"dss-2.0.0.json\",\"description\":\"Digital Signature Service Core Protocols, Elements, and Bindings Version 2.0\",\"url\":\"https://json.schemastore.org/dss-2.0.0.json\"},{\"name\":\"dvc.yaml\",\"description\":\"JSON Schema for dvc.yaml file\",\"fileMatch\":[\"dvc.yaml\"],\"url\":\"https://raw.githubusercontent.com/iterative/dvcyaml-schema/master/schema.json\"},{\"name\":\"Eclipse Che Devfile\",\"description\":\"JSON schema for Eclipse Che Devfiles\",\"url\":\"https://raw.githubusercontent.com/eclipse/che/master/wsmaster/che-core-api-workspace/src/main/resources/schema/1.0.0/devfile.json\",\"fileMatch\":[\"devfile.yaml\",\".devfile.yaml\"]},{\"name\":\"Esquio\",\"description\":\"JSON schema for Esquio configuration files\",\"url\":\"https://json.schemastore.org/esquio\"},{\"name\":\"epr-manifest.json\",\"description\":\"Entry Point Regulation manifest file\",\"fileMatch\":[\"epr-manifest.json\"],\"url\":\"https://json.schemastore.org/epr-manifest\"},{\"name\":\"electron-builder configuration file.\",\"description\":\"JSON schema for electron-build configuration file.\",\"fileMatch\":[\"electron-builder.json\"],\"url\":\"https://json.schemastore.org/electron-builder\"},{\"name\":\"Expo SDK\",\"description\":\"JSON schema for Expo SDK app manifest\",\"fileMatch\":[\"app.json\"],\"url\":\"https://json.schemastore.org/expo-37.0.0.json\"},{\"name\":\".eslintrc\",\"description\":\"JSON schema for ESLint configuration files\",\"fileMatch\":[\".eslintrc\",\".eslintrc.json\",\".eslintrc.yml\",\".eslintrc.yaml\"],\"url\":\"https://json.schemastore.org/eslintrc\"},{\"name\":\"fabric.mod.json\",\"description\":\"Metadata file used by the Fabric mod loader\",\"fileMatch\":[\"fabric.mod.json\"],\"url\":\"https://json.schemastore.org/fabric.mod.json\"},{\"name\":\"function.json\",\"description\":\"JSON schema for Azure Functions function.json files\",\"fileMatch\":[\"function.json\"],\"url\":\"https://json.schemastore.org/function\"},{\"name\":\"geojson.json\",\"description\":\"GeoJSON format for representing geographic data.\",\"url\":\"https://json.schemastore.org/geojson\"},{\"name\":\"GitVersion\",\"description\":\"The output from the GitVersion tool\",\"fileMatch\":[\"gitversion.json\"],\"url\":\"https://json.schemastore.org/gitversion\"},{\"name\":\"GitHub Action\",\"description\":\"YAML schema for GitHub Actions\",\"fileMatch\":[\"action.yml\",\"action.yaml\"],\"url\":\"https://json.schemastore.org/github-action\"},{\"name\":\"GitHub Workflow\",\"description\":\"YAML schema for GitHub Workflow\",\"fileMatch\":[\".github/workflows/**.yml\",\".github/workflows/**.yaml\"],\"url\":\"https://json.schemastore.org/github-workflow\"},{\"name\":\"gitlab-ci\",\"description\":\"JSON schema for configuring Gitlab CI\",\"fileMatch\":[\".gitlab-ci.yml\"],\"url\":\"https://json.schemastore.org/gitlab-ci\"},{\"name\":\"Gitpod Configuration\",\"description\":\"JSON schema for configuring Gitpod.io\",\"fileMatch\":[\".gitpod.yml\"],\"url\":\"https://gitpod.io/schemas/gitpod-schema.json\"},{\"name\":\"global.json\",\"description\":\"ASP.NET global configuration file\",\"fileMatch\":[\"global.json\"],\"url\":\"https://json.schemastore.org/global\"},{\"name\":\"Grafana 5.x Dashboard\",\"description\":\"JSON Schema for Grafana 5.x Dashboards\",\"url\":\"https://json.schemastore.org/grafana-dashboard-5.x\"},{\"name\":\"GraphQL Mesh\",\"description\":\"JSON Schema for GraphQL Mesh config file\",\"url\":\"https://raw.githubusercontent.com/Urigo/graphql-mesh/master/packages/types/src/config-schema.json\",\"fileMatch\":[\".meshrc.yml\",\".meshrc.yaml\",\".meshrc.json\",\".meshrc.js\",\".graphql-mesh.yaml\",\".graphql-mesh.yml\"]},{\"name\":\"GraphQL Config\",\"description\":\"JSON Schema for GraphQL Config config file\",\"url\":\"https://raw.githubusercontent.com/kamilkisiela/graphql-config/master/config-schema.json\",\"fileMatch\":[\"graphql.config.json\",\"graphql.config.js\",\"graphql.config.yaml\",\"graphql.config.yml\",\".graphqlrc\",\".graphqlrc.json\",\".graphqlrc.yaml\",\".graphqlrc.yml\",\".graphqlrc.js\"]},{\"name\":\"GraphQL Code Generator\",\"description\":\"JSON Schema for GraphQL Code Generator config file\",\"url\":\"https://raw.githubusercontent.com/dotansimha/graphql-code-generator/master/website/static/config.schema.json\",\"fileMatch\":[\"codegen.yml\",\"codegen.yaml\",\"codegen.json\",\"codegen.js\",\".codegen.yml\",\".codegen.yaml\",\".codegen.json\",\".codegen.js\"]},{\"name\":\"Grunt copy task\",\"description\":\"Grunt copy task configuration file\",\"fileMatch\":[\"copy.json\"],\"url\":\"https://json.schemastore.org/grunt-copy-task\"},{\"name\":\"Grunt clean task\",\"description\":\"Grunt clean task configuration file\",\"fileMatch\":[\"clean.json\"],\"url\":\"https://json.schemastore.org/grunt-clean-task\"},{\"name\":\"Grunt cssmin task\",\"description\":\"Grunt cssmin task configuration file\",\"fileMatch\":[\"cssmin.json\"],\"url\":\"https://json.schemastore.org/grunt-cssmin-task\"},{\"name\":\"Grunt JSHint task\",\"description\":\"Grunt JSHint task configuration file\",\"fileMatch\":[\"jshint.json\"],\"url\":\"https://json.schemastore.org/grunt-jshint-task\"},{\"name\":\"Grunt Watch task\",\"description\":\"Grunt Watch task configuration file\",\"fileMatch\":[\"watch.json\"],\"url\":\"https://json.schemastore.org/grunt-watch-task\"},{\"name\":\"Grunt base task\",\"description\":\"Schema for standard Grunt tasks\",\"fileMatch\":[\"grunt/*.json\",\"*-tasks.json\"],\"url\":\"https://json.schemastore.org/grunt-task\"},{\"name\":\"haxelib.json\",\"description\":\"Haxelib manifest\",\"fileMatch\":[\"haxelib.json\"],\"url\":\"https://json.schemastore.org/haxelib\"},{\"name\":\"host.json\",\"description\":\"JSON schema for Azure Functions host.json files\",\"fileMatch\":[\"host.json\"],\"url\":\"https://json.schemastore.org/host\"},{\"name\":\"host-meta.json\",\"description\":\"Schema for host-meta JDR files\",\"fileMatch\":[\"host-meta.json\"],\"url\":\"https://json.schemastore.org/host-meta\"},{\"name\":\".htmlhintrc\",\"description\":\"HTML Hint configuration file\",\"fileMatch\":[\".htmlhintrc\"],\"url\":\"https://json.schemastore.org/htmlhint\"},{\"name\":\"hydra.yml\",\"description\":\"ORY Hydra configuration file\",\"fileMatch\":[\"hydra.json\",\"hydra.yml\",\"hydra.yaml\",\"hydra.toml\"],\"url\":\"https://raw.githubusercontent.com/ory/hydra/master/.schema/version.schema.json\"},{\"name\":\"imageoptimizer.json\",\"description\":\"Schema for imageoptimizer.json files\",\"fileMatch\":[\"imageoptimizer.json\"],\"url\":\"https://json.schemastore.org/imageoptimizer\"},{\"name\":\"Jekyll configuration\",\"description\":\"Schema for Jekyll _config.yml\",\"fileMatch\":[\"_config.yml\"],\"url\":\"https://json.schemastore.org/jekyll\"},{\"name\":\"Jenkins X Pipelines\",\"description\":\"Jenkins X Pipeline YAML configuration files\",\"fileMatch\":[\"jenkins-x*.yml\"],\"url\":\"https://jenkins-x.io/schemas/jx-schema.json\"},{\"name\":\"Jenkins X Requirements\",\"description\":\"Jenkins X Requirements YAML configuration file\",\"fileMatch\":[\"jx-requirements.yml\"],\"url\":\"https://jenkins-x.io/schemas/jx-requirements.json\"},{\"name\":\"Jovo Language Models\",\"description\":\"JSON Schema for Jovo language Models (https://www.jovo.tech/docs/model)\",\"url\":\"http://json.schemastore.org/jovo-language-model\"},{\"name\":\".jsbeautifyrc\",\"description\":\"js-beautify configuration file\",\"fileMatch\":[\".jsbeautifyrc\"],\"url\":\"https://json.schemastore.org/jsbeautifyrc\"},{\"name\":\".jsbeautifyrc-nested\",\"description\":\"js-beautify configuration file allowing nested `js`, `css`, and `html` attributes\",\"fileMatch\":[\".jsbeautifyrc\"],\"url\":\"https://json.schemastore.org/jsbeautifyrc-nested\"},{\"name\":\".jscsrc\",\"description\":\"JSCS configuration file\",\"fileMatch\":[\".jscsrc\",\"jscsrc.json\"],\"url\":\"https://json.schemastore.org/jscsrc\"},{\"name\":\".jshintrc\",\"description\":\"JSHint configuration file\",\"fileMatch\":[\".jshintrc\"],\"url\":\"https://json.schemastore.org/jshintrc\"},{\"name\":\".jsinspectrc\",\"description\":\"JSInspect configuration file\",\"fileMatch\":[\".jsinspectrc\"],\"url\":\"https://json.schemastore.org/jsinspectrc\"},{\"name\":\"JSON-API\",\"description\":\"JSON API document\",\"fileMatch\":[\"*.schema.json\"],\"url\":\"https://jsonapi.org/schema\"},{\"name\":\"JSON Document Transform\",\"description\":\"JSON Document Transofrm\",\"url\":\"https://json.schemastore.org/jdt\"},{\"name\":\"JSON Feed\",\"description\":\"JSON schema for the JSON Feed format\",\"fileMatch\":[\"feed.json\"],\"url\":\"https://json.schemastore.org/feed\",\"versions\":{\"1\":\"http://json.schemastore.org/feed-1\",\"1.1\":\"http://json.schemastore.org/feed\"}},{\"name\":\"*.jsonld\",\"description\":\"JSON Linked Data files\",\"fileMatch\":[\"*.jsonld\"],\"url\":\"https://json.schemastore.org/jsonld\"},{\"name\":\"JSONPatch\",\"description\":\"JSONPatch files\",\"fileMatch\":[\"*.patch\"],\"url\":\"https://json.schemastore.org/json-patch\"},{\"name\":\"jsconfig.json\",\"description\":\"JavaScript project configuration file\",\"fileMatch\":[\"jsconfig.json\"],\"url\":\"https://json.schemastore.org/jsconfig\"},{\"name\":\"keto.yml\",\"description\":\"ORY Keto configuration file\",\"fileMatch\":[\"keto.json\",\"keto.yml\",\"keto.yaml\",\"keto.toml\"],\"url\":\"https://raw.githubusercontent.com/ory/keto/master/.schema/version.schema.json\"},{\"name\":\"kustomization.yaml\",\"description\":\"Kubernetes native configuration management\",\"fileMatch\":[\"kustomization.yaml\",\"kustomization.yml\"],\"url\":\"https://json.schemastore.org/kustomization\"},{\"name\":\"launchsettings.json\",\"description\":\"A JSON schema for the ASP.NET LaunchSettings.json files\",\"fileMatch\":[\"launchsettings.json\"],\"url\":\"https://json.schemastore.org/launchsettings\"},{\"name\":\"lerna.json\",\"description\":\"A JSON schema for lerna.json files\",\"fileMatch\":[\"lerna.json\"],\"url\":\"https://json.schemastore.org/lerna\"},{\"name\":\"libman.json\",\"description\":\"JSON schema for client-side library config files\",\"fileMatch\":[\"libman.json\"],\"url\":\"https://json.schemastore.org/libman\"},{\"name\":\"localazy.json\",\"description\":\"JSON schema for Localazy CLI configuration file. More info at https://localazy.com/docs/cli\",\"fileMatch\":[\"localazy.json\"],\"url\":\"https://raw.githubusercontent.com/localazy/cli-schema/master/localazy.json\"},{\"name\":\"lsdlschema.json\",\"description\":\"JSON schema for Linguistic Schema Definition Language files\",\"fileMatch\":[\"*.lsdl.yaml\",\"*.lsdl.json\"],\"url\":\"https://json.schemastore.org/lsdlschema\"},{\"name\":\"Microsoft Band Web Tile\",\"description\":\"Microsoft Band Web Tile manifest file\",\"url\":\"https://json.schemastore.org/band-manifest\"},{\"name\":\"mimetypes.json\",\"description\":\"JSON Schema for mime type collections\",\"fileMatch\":[\"mimetypes.json\"],\"url\":\"https://json.schemastore.org/mimetypes\"},{\"name\":\".mocharc\",\"description\":\"JSON schema for MochaJS configuration files\",\"fileMatch\":[\".mocharc.json\",\".mocharc.jsonc\",\".mocharc.yml\",\".mocharc.yaml\"],\"url\":\"https://json.schemastore.org/mocharc\"},{\"name\":\".modernizrrc\",\"description\":\"Webpack modernizr-loader configuration file\",\"fileMatch\":[\".modernizrrc\"],\"url\":\"https://json.schemastore.org/modernizrrc\"},{\"name\":\"mycode.json\",\"description\":\"JSON schema for mycode.js files\",\"fileMatch\":[\"mycode.json\"],\"url\":\"https://json.schemastore.org/mycode\"},{\"name\":\"Netlify config schema\",\"description\":\"This schema describes the YAML config that Netlify uses\",\"fileMatch\":[\"admin/config*.yml\"],\"url\":\"http://json.schemastore.org/netlify.json\"},{\"name\":\"ninjs (News in JSON)\",\"description\":\"A JSON Schema for ninjs by the IPTC. News and publishing information. See https://iptc.org/standards/ninjs/\",\"url\":\"https://json.schemastore.org/ninjs-1.3.json\",\"versions\":{\"1.3\":\"https://json.schemastore.org/ninjs-1.3.json\",\"1.2\":\"https://json.schemastore.org/ninjs-1.2.json\",\"1.1\":\"https://json.schemastore.org/ninjs-1.1.json\",\"1.0\":\"https://json.schemastore.org/ninjs-1.0.json\"}},{\"name\":\"nest-cli\",\"description\":\"A progressive Node.js framework for building efficient and scalable server-side applications 🚀.\",\"url\":\"https://json.schemastore.org/nest-cli\",\"fileMatch\":[\".nestcli.json\",\".nest-cli.json\",\"nest-cli.json\",\"nest.json\"]},{\"name\":\".nodehawkrc\",\"description\":\"JSON schema for .nodehawkrc configuration files.\",\"url\":\"https://json.schemastore.org/nodehawkrc\",\"fileMatch\":[\".nodehawkrc\"]},{\"name\":\"nodemon.json\",\"description\":\"JSON schema for nodemon.json configuration files.\",\"url\":\"https://json.schemastore.org/nodemon\",\"fileMatch\":[\"nodemon.json\"]},{\"name\":\".npmpackagejsonlintrc\",\"description\":\"Configuration file for npm-package-json-lint\",\"fileMatch\":[\".npmpackagejsonlintrc\",\"npmpackagejsonlintrc.json\",\".npmpackagejsonlintrc.json\"],\"url\":\"https://json.schemastore.org/npmpackagejsonlintrc\"},{\"name\":\"nuget-project.json\",\"description\":\"JSON schema for NuGet project.json files.\",\"url\":\"https://json.schemastore.org/nuget-project\",\"versions\":{\"3.3.0\":\"https://json.schemastore.org/nuget-project-3.3.0\"}},{\"name\":\"nswag.json\",\"description\":\"JSON schema for nswag configuration\",\"url\":\"https://json.schemastore.org/nswag\",\"fileMatch\":[\"nswag.json\"]},{\"name\":\"oathkeeper.yml\",\"description\":\"ORY Oathkeeper configuration file\",\"fileMatch\":[\"oathkeeper.json\",\"oathkeeper.yml\",\"oathkeeper.yaml\",\"oathkeeper.toml\"],\"url\":\"https://raw.githubusercontent.com/ory/oathkeeper/master/.schema/version.schema.json\"},{\"name\":\"ocelot.json\",\"description\":\"JSON schema for the Ocelot Api Gateway.\",\"fileMatch\":[\"ocelot.json\"],\"url\":\"https://json.schemastore.org/ocelot\"},{\"name\":\"omnisharp.json\",\"description\":\"Omnisharp Configuration file\",\"fileMatch\":[\"omnisharp.json\"],\"url\":\"https://json.schemastore.org/omnisharp\"},{\"name\":\"openapi.json\",\"description\":\"A JSON schema for Open API documentation files\",\"fileMatch\":[\"openapi.json\",\"openapi.yml\",\"openapi.yaml\"],\"url\":\"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json\"},{\"name\":\"openfin.json\",\"description\":\"OpenFin application configuration file\",\"url\":\"https://json.schemastore.org/openfin\"},{\"name\":\"kratos.yml\",\"description\":\"ORY Kratos configuration file\",\"fileMatch\":[\"kratos.json\",\"kratos.yml\",\"kratos.yaml\"],\"url\":\"https://raw.githubusercontent.com/ory/kratos/master/.schema/version.schema.json\"},{\"name\":\"package.json\",\"description\":\"NPM configuration file\",\"fileMatch\":[\"package.json\"],\"url\":\"https://json.schemastore.org/package\"},{\"name\":\"package.manifest\",\"description\":\"Umbraco package configuration file\",\"fileMatch\":[\"package.manifest\"],\"url\":\"https://json.schemastore.org/package.manifest\",\"versions\":{\"8.0.0\":\"https://json.schemastore.org/package.manifest-8.0.0\",\"7.0.0\":\"https://json.schemastore.org/package.manifest-7.0.0\"}},{\"name\":\"Packer\",\"description\":\"Packer template JSON configuration\",\"fileMatch\":[\"packer.json\"],\"url\":\"https://json.schemastore.org/packer\"},{\"name\":\"pattern.json\",\"description\":\"Patternplate pattern manifest file\",\"fileMatch\":[\"pattern.json\"],\"url\":\"https://json.schemastore.org/pattern\"},{\"name\":\".pmbot.yml\",\"description\":\"Pmbot configuration file\",\"fileMatch\":[\".pmbot.yml\"],\"url\":\"https://raw.githubusercontent.com/pmbot-io/config/master/pmbot.yml.schema.json\"},{\"name\":\"PocketMine plugin.yml\",\"description\":\"PocketMine plugin manifest file\",\"fileMatch\":[\"plugin.yml\"],\"url\":\"https://json.schemastore.org/pocketmine-plugin\"},{\"name\":\".pre-commit-config.yml\",\"description\":\"pre-commit configuration file\",\"fileMatch\":[\".pre-commit-config.yml\",\".pre-commit-config.yaml\"],\"url\":\"https://json.schemastore.org/pre-commit-config\"},{\"name\":\".phraseapp.yml\",\"description\":\"PhraseApp configuration file\",\"fileMatch\":[\".phraseapp.yml\"],\"url\":\"https://json.schemastore.org/phraseapp\"},{\"name\":\"prettierrc.json\",\"description\":\".prettierrc configuration file\",\"fileMatch\":[\".prettierrc\",\".prettierrc.json\",\".prettierrc.yml\",\".prettierrc.yaml\"],\"url\":\"https://json.schemastore.org/prettierrc\",\"versions\":{\"1.8.2\":\"https://json.schemastore.org/prettierrc-1.8.2\"}},{\"name\":\"prisma.yml\",\"description\":\"prisma.yml service definition file\",\"fileMatch\":[\"prisma.yml\"],\"url\":\"https://json.schemastore.org/prisma\"},{\"name\":\"project.json\",\"description\":\"ASP.NET vNext project configuration file\",\"fileMatch\":[\"project.json\"],\"url\":\"https://json.schemastore.org/project\",\"versions\":{\"1.0.0-beta3\":\"https://json.schemastore.org/project-1.0.0-beta3\",\"1.0.0-beta4\":\"https://json.schemastore.org/project-1.0.0-beta4\",\"1.0.0-beta5\":\"https://json.schemastore.org/project-1.0.0-beta5\",\"1.0.0-beta6\":\"https://json.schemastore.org/project-1.0.0-beta6\",\"1.0.0-beta8\":\"https://json.schemastore.org/project-1.0.0-beta8\",\"1.0.0-rc1\":\"https://json.schemastore.org/project-1.0.0-rc1\",\"1.0.0-rc1-update1\":\"https://json.schemastore.org/project-1.0.0-rc1\",\"1.0.0-rc2\":\"https://json.schemastore.org/project-1.0.0-rc2\"}},{\"name\":\"project-1.0.0-beta3.json\",\"description\":\"ASP.NET vNext project configuration file\",\"url\":\"https://json.schemastore.org/project-1.0.0-beta3\"},{\"name\":\"project-1.0.0-beta4.json\",\"description\":\"ASP.NET vNext project configuration file\",\"url\":\"https://json.schemastore.org/project-1.0.0-beta4\"},{\"name\":\"project-1.0.0-beta5.json\",\"description\":\"ASP.NET vNext project configuration file\",\"url\":\"https://json.schemastore.org/project-1.0.0-beta5\"},{\"name\":\"project-1.0.0-beta6.json\",\"description\":\"ASP.NET vNext project configuration file\",\"url\":\"https://json.schemastore.org/project-1.0.0-beta6\"},{\"name\":\"project-1.0.0-beta8.json\",\"description\":\"ASP.NET vNext project configuration file\",\"url\":\"https://json.schemastore.org/project-1.0.0-beta8\"},{\"name\":\"project-1.0.0-rc1.json\",\"description\":\"ASP.NET vNext project configuration file\",\"url\":\"https://json.schemastore.org/project-1.0.0-rc1\"},{\"name\":\"project-1.0.0-rc2.json\",\"description\":\".NET Core project configuration file\",\"url\":\"https://json.schemastore.org/project-1.0.0-rc2\"},{\"name\":\"prometheus.json\",\"description\":\"Prometheus configuration file\",\"fileMatch\":[\"prometheus.yml\"],\"url\":\"https://json.schemastore.org/prometheus\"},{\"name\":\"prometheus.rules.json\",\"description\":\"Prometheus rules file\",\"fileMatch\":[\"*.rules\"],\"url\":\"https://json.schemastore.org/prometheus.rules\"},{\"name\":\"proxies.json\",\"description\":\"JSON schema for Azure Function Proxies proxies.json files\",\"fileMatch\":[\"proxies.json\"],\"url\":\"https://json.schemastore.org/proxies\"},{\"name\":\"pubspec.yaml\",\"description\":\"Schema for pubspecs, the format used by Dart's dependency manager\",\"fileMatch\":[\"pubspec.yaml\"],\"url\":\"https://json.schemastore.org/pubspec\"},{\"name\":\"pyrseas-0.8.json\",\"description\":\"Pyrseas database schema versioning for Postgres databases, v0.8\",\"fileMatch\":[\"pyrseas-0.8.json\"],\"url\":\"https://json.schemastore.org/pyrseas-0.8\"},{\"name\":\"Red-DiscordBot Сog\",\"description\":\"Red-DiscordBot Сog metadata file\",\"fileMatch\":[\"info.json\"],\"url\":\"https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/V3/develop/schema/red_cog.schema.json\"},{\"name\":\"Red-DiscordBot Сog Repo\",\"description\":\"Red-DiscordBot Сog Repo metadata file\",\"fileMatch\":[\"info.json\"],\"url\":\"https://raw.githubusercontent.com/Cog-Creators/Red-DiscordBot/V3/develop/schema/red_cog_repo.schema.json\"},{\"name\":\"*.resjson\",\"description\":\"Windows App localization file\",\"fileMatch\":[\"*.resjson\"],\"url\":\"https://json.schemastore.org/resjson\"},{\"name\":\"JSON Resume\",\"description\":\"A JSON format to describe resumes\",\"fileMatch\":[\"resume.json\"],\"url\":\"https://json.schemastore.org/resume\"},{\"name\":\"Renovate\",\"description\":\"Renovate config file (https://github.com/renovatebot/renovate)\",\"fileMatch\":[\"renovate.json\",\"renovate.json5\",\".github/renovate.json\",\".github/renovate.json5\",\".renovaterc\",\".renovaterc.json\"],\"url\":\"https://docs.renovatebot.com/renovate-schema.json\"},{\"name\":\"RoadRunner\",\"description\":\"Spiral Roadrunner config schema\",\"fileMatch\":[\".rr.yml\",\".rr.yaml\"],\"url\":\"https://json.schemastore.org/roadrunner\"},{\"name\":\"sarif-1.0.0.json\",\"description\":\"Static Analysis Results Interchange Format (SARIF) version 1\",\"url\":\"https://json.schemastore.org/sarif-1.0.0.json\"},{\"name\":\"sarif-2.0.0.json\",\"description\":\"Static Analysis Results Interchange Format (SARIF) version 2\",\"url\":\"https://json.schemastore.org/sarif-2.0.0.json\"},{\"name\":\"2.0.0-csd.2.beta.2018-10-10\",\"description\":\"Static Analysis Results Format (SARIF) Version 2.0.0-csd.2.beta-2018-10-10\",\"url\":\"https://json.schemastore.org/2.0.0-csd.2.beta.2018-10-10.json\"},{\"name\":\"sarif-2.1.0-rtm.2\",\"description\":\"Static Analysis Results Format (SARIF), Version 2.1.0-rtm.2\",\"url\":\"https://json.schemastore.org/sarif-2.1.0-rtm.2.json\"},{\"name\":\"sarif-external-property-file-2.1.0-rtm.2\",\"description\":\"Static Analysis Results Format (SARIF) External Property File Format, Version 2.1.0-rtm.2\",\"url\":\"https://json.schemastore.org/sarif-external-property-file-2.1.0-rtm.2.json\"},{\"name\":\"sarif-2.1.0-rtm.3\",\"description\":\"Static Analysis Results Format (SARIF), Version 2.1.0-rtm.3\",\"url\":\"https://json.schemastore.org/sarif-2.1.0-rtm.3.json\"},{\"name\":\"sarif-external-property-file-2.1.0-rtm.3\",\"description\":\"Static Analysis Results Format (SARIF) External Property File Format, Version 2.1.0-rtm.3\",\"url\":\"https://json.schemastore.org/sarif-external-property-file-2.1.0-rtm.3.json\"},{\"name\":\"sarif-2.1.0-rtm.4\",\"description\":\"Static Analysis Results Format (SARIF), Version 2.1.0-rtm.4\",\"url\":\"https://json.schemastore.org/sarif-2.1.0-rtm.4.json\"},{\"name\":\"sarif-external-property-file-2.1.0-rtm.4\",\"description\":\"Static Analysis Results Format (SARIF) External Property File Format, Version 2.1.0-rtm.4\",\"url\":\"https://json.schemastore.org/sarif-external-property-file-2.1.0-rtm.4.json\"},{\"name\":\"sarif-2.1.0-rtm.5\",\"description\":\"Static Analysis Results Format (SARIF), Version 2.1.0-rtm.5\",\"url\":\"https://json.schemastore.org/sarif-2.1.0-rtm.5.json\"},{\"name\":\"sarif-external-property-file-2.1.0-rtm.5\",\"description\":\"Static Analysis Results Format (SARIF) External Property File Format, Version 2.1.0-rtm.5\",\"url\":\"https://json.schemastore.org/sarif-external-property-file-2.1.0-rtm.5.json\"},{\"name\":\"Schema Catalog\",\"description\":\"JSON Schema catalog files compatible with SchemaStore.org\",\"url\":\"https://json.schemastore.org/schema-catalog\"},{\"name\":\"schema.org - Action\",\"description\":\"JSON Schema for Action as defined by schema.org\",\"url\":\"https://json.schemastore.org/schema-org-action\"},{\"name\":\"schema.org - ContactPoint\",\"description\":\"JSON Schema for ContactPoint as defined by schema.org\",\"url\":\"https://json.schemastore.org/schema-org-contact-point\"},{\"name\":\"schema.org - Place\",\"description\":\"JSON Schema for Place as defined by schema.org\",\"url\":\"https://json.schemastore.org/schema-org-place\"},{\"name\":\"schema.org - Thing\",\"description\":\"JSON Schema for Thing as defined by schema.org\",\"url\":\"https://json.schemastore.org/schema-org-thing\"},{\"name\":\"settings.job\",\"description\":\"Azure Webjob settings file\",\"fileMatch\":[\"settings.job\"],\"url\":\"https://json.schemastore.org/settings.job\"},{\"name\":\"skyuxconfig.json\",\"description\":\"SKY UX CLI configuration file\",\"fileMatch\":[\"skyuxconfig.json\",\"skyuxconfig.*.json\"],\"url\":\"https://raw.githubusercontent.com/blackbaud/skyux-builder/master/skyuxconfig-schema.json\"},{\"name\":\"snapcraft\",\"description\":\"snapcraft project (https://snapcraft.io)\",\"fileMatch\":[\".snapcraft.yaml\",\"snapcraft.yaml\"],\"url\":\"https://raw.githubusercontent.com/snapcore/snapcraft/master/schema/snapcraft.json\"},{\"name\":\"Solidarity\",\"description\":\"CLI config for enforcing environment settings\",\"fileMatch\":[\".solidarity\",\".solidarity.json\"],\"url\":\"https://json.schemastore.org/solidaritySchema\"},{\"name\":\"Source Maps v3\",\"description\":\"Source Map files version 3\",\"fileMatch\":[\"*.map\"],\"url\":\"https://json.schemastore.org/sourcemap-v3\"},{\"name\":\"Sponge Mixin configuration\",\"description\":\"Configuration file for SpongePowered's Mixin library\",\"fileMatch\":[\"*.mixins.json\"],\"url\":\"https://json.schemastore.org/sponge-mixins\"},{\"name\":\".sprite files\",\"description\":\"Schema for image sprite generation files\",\"fileMatch\":[\"*.sprite\"],\"url\":\"https://json.schemastore.org/sprite\"},{\"name\":\"Stryker Mutator\",\"description\":\"Configuration file for Stryker Mutator, the mutation testing framework for JavaScript and friends. See https://stryker-mutator.io.\",\"fileMatch\":[\"stryker.conf.json\",\"stryker-*.conf.json\"],\"url\":\"https://raw.githubusercontent.com/stryker-mutator/stryker/master/packages/api/schema/stryker-core.json\"},{\"name\":\"StyleCop Analyzers Configuration\",\"description\":\"Configuration file for StyleCop Analyzers\",\"fileMatch\":[\"stylecop.json\"],\"url\":\"https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json\"},{\"name\":\".stylelintrc\",\"description\":\"Configuration file for stylelint\",\"fileMatch\":[\".stylelintrc\",\"stylelintrc.json\",\".stylelintrc.json\"],\"url\":\"https://json.schemastore.org/stylelintrc\"},{\"name\":\"Swagger API 2.0\",\"description\":\"Swagger API 2.0 schema\",\"fileMatch\":[\"swagger.json\"],\"url\":\"https://json.schemastore.org/swagger-2.0\"},{\"name\":\"Taurus\",\"description\":\"Taurus bzt cli framework config\",\"fileMatch\":[\"bzt.yml\",\"bzt.yaml\",\"taurus.yml\",\"taurus.yaml\"],\"url\":\"https://json.schemastore.org/taurus\"},{\"name\":\"template.json\",\"description\":\"JSON schema .NET template files\",\"fileMatch\":[\".template.config/template.json\"],\"url\":\"https://json.schemastore.org/template\"},{\"name\":\"templatsources.json\",\"description\":\"SideWaffle template source schema\",\"fileMatch\":[\"templatesources.json\"],\"url\":\"https://json.schemastore.org/templatesources\"},{\"name\":\"tmLanguage\",\"description\":\"Language grammar description files in Textmate and compatible editors\",\"fileMatch\":[\"*.tmLanguage.json\"],\"url\":\"https://raw.githubusercontent.com/Septh/tmlanguage/master/tmLanguage.schema.json\"},{\"name\":\".travis.yml\",\"description\":\"Travis CI configuration file\",\"fileMatch\":[\".travis.yml\"],\"url\":\"https://json.schemastore.org/travis\"},{\"name\":\"Traefik v2\",\"description\":\"Traefik v2 YAML configuration file\",\"fileMatch\":[\"traefik.yml\",\"traefik.yaml\"],\"url\":\"https://json.schemastore.org/traefik-v2\"},{\"name\":\"tsconfig.json\",\"description\":\"TypeScript compiler configuration file\",\"fileMatch\":[\"tsconfig.json\"],\"url\":\"https://json.schemastore.org/tsconfig\"},{\"name\":\"tsd.json\",\"description\":\"JSON schema for DefinatelyTyped description manager (TSD)\",\"fileMatch\":[\"tsd.json\"],\"url\":\"https://json.schemastore.org/tsd\"},{\"name\":\"tsdrc.json\",\"description\":\"TypeScript Definition manager (tsd) global settings file\",\"fileMatch\":[\".tsdrc\"],\"url\":\"https://json.schemastore.org/tsdrc\"},{\"name\":\"ts-force-config.json\",\"description\":\"Generated Typescript classes for Salesforce\",\"fileMatch\":[\"ts-force-config.json\"],\"url\":\"https://json.schemastore.org/ts-force-config\"},{\"name\":\"tslint.json\",\"description\":\"TypeScript Lint configuration file\",\"fileMatch\":[\"tslint.json\",\"tslint.yaml\",\"tslint.yml\"],\"url\":\"https://json.schemastore.org/tslint\"},{\"name\":\"typewiz.json\",\"description\":\"Typewiz configuration file\",\"fileMatch\":[\"typewiz.json\"],\"url\":\"https://json.schemastore.org/typewiz\"},{\"name\":\"typings.json\",\"description\":\"Typings TypeScript definitions manager definition file\",\"fileMatch\":[\"typings.json\"],\"url\":\"https://json.schemastore.org/typings\"},{\"name\":\"typingsrc.json\",\"description\":\"Typings TypeScript definitions manager configuration file\",\"fileMatch\":[\".typingsrc\"],\"url\":\"https://json.schemastore.org/typingsrc\"},{\"name\":\"up.json\",\"description\":\"Up configuration file\",\"fileMatch\":[\"up.json\"],\"url\":\"https://json.schemastore.org/up.json\"},{\"name\":\"ui5-manifest\",\"description\":\"UI5/OPENUI5 descriptor file\",\"fileMatch\":[\".manifest\"],\"url\":\"https://json.schemastore.org/ui5-manifest\"},{\"name\":\"UI5 Manifest\",\"description\":\"UI5 Manifest (manifest.json)\",\"fileMatch\":[\"webapp/manifest.json\",\"src/main/webapp/manifest.json\"],\"url\":\"https://raw.githubusercontent.com/SAP/ui5-manifest/master/schema.json\"},{\"name\":\"ui5.yaml\",\"description\":\"UI5 Tooling Configuration File (ui5.yaml)\",\"fileMatch\":[\"ui5.yaml\",\"*-ui5.yaml\",\"*.ui5.yaml\"],\"url\":\"https://sap.github.io/ui5-tooling/schema/ui5.yaml.json\"},{\"name\":\"vega.json\",\"description\":\"Vega visualization specification file\",\"fileMatch\":[\"*.vg\",\"*.vg.json\"],\"url\":\"https://json.schemastore.org/vega\"},{\"name\":\"vega-lite.json\",\"description\":\"Vega-Lite visualization specification file\",\"fileMatch\":[\"*.vl\",\"*.vl.json\"],\"url\":\"https://json.schemastore.org/vega-lite\"},{\"name\":\"Vela Pipeline Configuration\",\"description\":\"Vela Pipeline Configuration File\",\"fileMatch\":[\".vela.yml\",\".vela.yaml\"],\"url\":\"https://github.com/go-vela/types/releases/latest/download/schema.json\"},{\"name\":\"version.json\",\"description\":\"A project version descriptor file used by Nerdbank.GitVersioning\",\"fileMatch\":[\"version.json\"],\"url\":\"https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json\"},{\"name\":\"vim-addon-info\",\"description\":\"JSON schema for vim plugin addon-info.json metadata files\",\"fileMatch\":[\"*vim*/addon-info.json\"],\"url\":\"https://json.schemastore.org/vim-addon-info\"},{\"name\":\"vsls.json\",\"description\":\"Visual Studio Live Share configuration file\",\"fileMatch\":[\".vsls.json\"],\"url\":\"https://json.schemastore.org/vsls\"},{\"name\":\"vs-2017.3.host.json\",\"description\":\"JSON schema for Visual Studio template host file\",\"fileMatch\":[\"vs-2017.3.host.json\"],\"url\":\"https://json.schemastore.org/vs-2017.3.host\"},{\"name\":\"vs-nesting.json\",\"description\":\"JSON schema for Visual Studio's file nesting feature\",\"fileMatch\":[\"*.filenesting.json\",\".filenesting.json\"],\"url\":\"https://json.schemastore.org/vs-nesting\"},{\"name\":\".vsconfig\",\"description\":\"JSON schema for Visual Studio component configuration files\",\"fileMatch\":[\"*.vsconfig\"],\"url\":\"https://json.schemastore.org/vsconfig\"},{\"name\":\".vsext\",\"description\":\"JSON schema for Visual Studio extension pack manifests\",\"fileMatch\":[\"*.vsext\"],\"url\":\"https://json.schemastore.org/vsext\"},{\"name\":\"VSIX CLI publishing\",\"description\":\"JSON schema for Visual Studio extension publishing\",\"fileMatch\":[\"vs-publish.json\"],\"url\":\"https://json.schemastore.org/vsix-publish\"},{\"name\":\"vss-extension.json\",\"description\":\"JSON Schema for Azure DevOps Extensions\",\"fileMatch\":[\"vss-extension.json\"],\"url\":\"https://json.schemastore.org/vss-extension\"},{\"name\":\"WebExtensions\",\"description\":\"JSON schema for WebExtension manifest files\",\"fileMatch\":[\"manifest.json\"],\"url\":\"https://json.schemastore.org/webextension\"},{\"name\":\"Web App Manifest\",\"description\":\"Web Application manifest file\",\"fileMatch\":[\"manifest.json\",\"*.webmanifest\"],\"url\":\"https://json.schemastore.org/web-manifest-combined\"},{\"name\":\"webjobs-list.json\",\"description\":\"Azure Webjob list file\",\"fileMatch\":[\"webjobs-list.json\"],\"url\":\"https://json.schemastore.org/webjobs-list\"},{\"name\":\"webjobpublishsettings.json\",\"description\":\"Azure Webjobs publish settings file\",\"fileMatch\":[\"webjobpublishsettings.json\"],\"url\":\"https://json.schemastore.org/webjob-publish-settings\"},{\"name\":\"Web types\",\"description\":\"JSON standard for web component libraries metadata\",\"fileMatch\":[\"web-types.json\",\"*.web-types.json\"],\"url\":\"https://json.schemastore.org/web-types\"},{\"name\":\"JSON-stat 2.0\",\"description\":\"JSON-stat 2.0 Schema\",\"url\":\"https://json-stat.org/format/schema/2.0/\"},{\"name\":\"KSP-AVC\",\"description\":\"The .version file format for KSP-AVC\",\"fileMatch\":[\"*.version\"],\"url\":\"https://raw.githubusercontent.com/linuxgurugamer/KSPAddonVersionChecker/master/KSP-AVC.schema.json\"},{\"name\":\"KSP-CKAN\",\"description\":\"Metadata spec for KSP-CKAN\",\"fileMatch\":[\"*.ckan\"],\"url\":\"https://raw.githubusercontent.com/KSP-CKAN/CKAN/master/CKAN.schema\"},{\"name\":\"JSON Schema Draft 4\",\"description\":\"Meta-validation schema for JSON Schema Draft 4\",\"url\":\"https://json-schema.org/draft-04/schema\"},{\"name\":\"JSON Schema Draft 7\",\"description\":\"Meta-validation schema for JSON Schema Draft 7\",\"url\":\"https://json-schema.org/draft-07/schema\"},{\"name\":\"JSON Schema Draft 8\",\"description\":\"Meta-validation schema for JSON Schema Draft 8\",\"url\":\"https://json-schema.org/draft/2019-09/schema\"},{\"name\":\"xunit.runner.json\",\"description\":\"xUnit.net runner configuration file\",\"fileMatch\":[\"xunit.runner.json\"],\"url\":\"https://json.schemastore.org/xunit.runner.schema\"},{\"name\":\"servicehub.service.json\",\"description\":\"Microsoft ServiceHub Service\",\"fileMatch\":[\"*.servicehub.service.json\"],\"url\":\"https://json.schemastore.org/servicehub.service.schema\"},{\"name\":\"servicehub.config.json\",\"description\":\"Microsoft ServiceHub Configuration\",\"fileMatch\":[\"servicehub.config.json\"],\"url\":\"https://json.schemastore.org/servicehub.config.schema\"},{\"name\":\".cryproj engine-5.2\",\"description\":\"A JSON schema for CRYENGINE projects (.cryproj files)\",\"fileMatch\":[\"*.cryproj\"],\"url\":\"https://json.schemastore.org/cryproj.52.schema\"},{\"name\":\".cryproj engine-5.3\",\"description\":\"A JSON schema for CRYENGINE projects (.cryproj files)\",\"fileMatch\":[\"*.cryproj\"],\"url\":\"https://json.schemastore.org/cryproj.53.schema\"},{\"name\":\".cryproj engine-5.4\",\"description\":\"A JSON schema for CRYENGINE projects (.cryproj files)\",\"fileMatch\":[\"*.cryproj\"],\"url\":\"https://json.schemastore.org/cryproj.54.schema\"},{\"name\":\".cryproj engine-5.5\",\"description\":\"A JSON schema for CRYENGINE projects (.cryproj files)\",\"fileMatch\":[\"*.cryproj\"],\"url\":\"https://json.schemastore.org/cryproj.55.schema\"},{\"name\":\".cryproj engine-dev\",\"description\":\"A JSON schema for CRYENGINE projects (.cryproj files)\",\"fileMatch\":[\"*.cryproj\"],\"url\":\"https://json.schemastore.org/cryproj.dev.schema\"},{\"name\":\".cryproj (generic)\",\"description\":\"A JSON schema for CRYENGINE projects (.cryproj files)\",\"fileMatch\":[\"*.cryproj\"],\"url\":\"https://json.schemastore.org/cryproj\"},{\"name\":\"typedoc.json\",\"description\":\"A JSON schema for the Typedoc configuration file\",\"fileMatch\":[\"typedoc.json\"],\"url\":\"https://json.schemastore.org/typedoc\"},{\"name\":\"huskyrc\",\"description\":\"Husky can prevent bad `git commit`, `git push` and more 🐶 woof!\",\"fileMatch\":[\".huskyrc\",\".huskyrc.json\"],\"url\":\"https://json.schemastore.org/huskyrc\"},{\"name\":\".lintstagedrc\",\"description\":\"JSON schema for lint-staged config\",\"fileMatch\":[\".lintstagedrc\",\".lintstagedrc.json\"],\"url\":\"https://json.schemastore.org/lintstagedrc.schema\"},{\"name\":\"mta.yaml\",\"description\":\"A JSON schema for MTA projects v3.3\",\"fileMatch\":[\"mta.yaml\",\"mta.yml\"],\"url\":\"https://json.schemastore.org/mta\"},{\"name\":\"mtad.yaml\",\"description\":\"A JSON schema for MTA deployment descriptors v3.3\",\"fileMatch\":[\"mtad.yaml\",\"mtad.yml\"],\"url\":\"https://json.schemastore.org/mtad\"},{\"name\":\".mtaext\",\"description\":\"A JSON schema for MTA extension descriptors v3.3\",\"fileMatch\":[\"*.mtaext\"],\"url\":\"https://json.schemastore.org/mtaext\"},{\"name\":\"xs-app.json\",\"description\":\"JSON schema for the SAP Application Router v8.2.2\",\"fileMatch\":[\"xs-app.json\"],\"url\":\"https://json.schemastore.org/xs-app.json\"},{\"name\":\"Opctl\",\"description\":\"Opctl schema for describing an op\",\"url\":\"https://json.schemastore.org/opspec-io-0.1.7\",\"fileMatch\":[\".opspec/*/*.yml\",\".opspec/*/*.yaml\"]},{\"name\":\"HEMTT\",\"description\":\"HEMTT Project File\",\"url\":\"https://json.schemastore.org/hemtt-0.6.2\",\"fileMatch\":[\"hemtt.json\",\"hemtt.toml\"],\"versions\":{\"0.6.2\":\"https://json.schemastore.org/hemtt-0.6.2\"}},{\"name\":\"now\",\"description\":\"ZEIT Now project configuration file\",\"fileMatch\":[\"now.json\"],\"url\":\"https://json.schemastore.org/now\"},{\"name\":\"taskcat\",\"description\":\"taskcat\",\"fileMatch\":[\".taskcat.yml\"],\"url\":\"https://raw.githubusercontent.com/aws-quickstart/taskcat/master/taskcat/cfg/config_schema.json\"},{\"name\":\"BizTalkServerApplicationSchema\",\"description\":\"BizTalk server application inventory json file.\",\"fileMatch\":[\"BizTalkServerInventory.json\"],\"url\":\"https://json.schemastore.org/BizTalkServerApplicationSchema\"},{\"name\":\"httpmockrc\",\"description\":\"Http-mocker is a tool for mock local requests or proxy remote requests.\",\"fileMatch\":[\".httpmockrc\",\".httpmock.json\"],\"url\":\"https://json.schemastore.org/httpmockrc\"},{\"name\":\"neoload\",\"description\":\"Neotys as-code load test specification, more at: https://github.com/Neotys-Labs/neoload-cli\",\"fileMatch\":[\".nl.yaml\",\".nl.yml\",\".nl.json\",\".neoload.yaml\",\".neoload.yml\",\".neoload.json\"],\"url\":\"https://raw.githubusercontent.com/Neotys-Labs/neoload-cli/master/resources/as-code.latest.schema.json\"},{\"name\":\"release drafter\",\"description\":\"Release Drafter configuration file\",\"fileMatch\":[\".github/release-drafter.yml\"],\"url\":\"https://raw.githubusercontent.com/release-drafter/release-drafter/master/schema.json\"},{\"name\":\"zuul\",\"description\":\"Zuul CI configuration file\",\"fileMatch\":[\"*zuul.d/*.yaml\",\"*/.zuul.yaml\"],\"url\":\"https://raw.githubusercontent.com/pycontribs/zuul-lint/master/zuul_lint/zuul-schema.json\"},{\"name\":\"Briefcase\",\"description\":\"Microsoft Briefcase configuration file\",\"fileMatch\":[\"briefcase.yaml\"],\"url\":\"https://raw.githubusercontent.com/microsoft/Briefcase/master/mlbriefcase/briefcase-schema.json\"},{\"name\":\"httparchive\",\"description\":\"HTTP Archive\",\"fileMatch\":[\"*.har\"],\"url\":\"https://raw.githubusercontent.com/ahmadnassri/har-schema/master/lib/har.json\"},{\"name\":\"jsdoc\",\"description\":\"JSDoc configuration file\",\"fileMatch\":[\"conf.js*\",\"jsdoc.js*\"],\"url\":\"https://json.schemastore.org/jsdoc-1.0.0\"},{\"name\":\"Ray\",\"description\":\"Ray autocluster configuration file\",\"fileMatch\":[\"ray-*-cluster.yaml\"],\"url\":\"https://raw.githubusercontent.com/ray-project/ray/master/python/ray/autoscaler/ray-schema.json\"},{\"name\":\"Hadolint\",\"description\":\"A smarter Dockerfile linter that helps you build best practice Docker images.\",\"fileMatch\":[\".hadolint.yaml\",\"hadolint.yaml\"],\"url\":\"https://json.schemastore.org/hadolint\"},{\"name\":\"helmfile\",\"description\":\"Helmfile is a declarative spec for deploying helm charts\",\"fileMatch\":[\"helmfile.yaml\",\"helmfile.d/**/*.yaml\"],\"url\":\"https://json.schemastore.org/helmfile\"},{\"name\":\"Container Structure Test\",\"description\":\"The Container Structure Tests provide a powerful framework to validate the structure of a container image.\",\"fileMatch\":[\"container-structure-test.yaml\",\"structure-test.yaml\"],\"url\":\"https://json.schemastore.org/container-structure-test\"},{\"name\":\"Žinoma\",\"description\":\"Žinoma incremental build configuration\",\"fileMatch\":[\"zinoma.yml\"],\"url\":\"https://github.com/fbecart/zinoma/releases/latest/download/zinoma-schema.json\"},{\"name\":\"Windows Package Manager\",\"description\":\"Windows Package Manager Manifest file\",\"url\":\"http://json.schemastore.org/winget-pkgs\",\"fileMatch\":[\"manifests/*/*/*.yaml\"]},{\"name\":\".commitlintrc\",\"description\":\"JSON schema for commitlint configuration files\",\"fileMatch\":[\".commitlintrc\",\".commitlintrc.json\"],\"url\":\"https://json.schemastore.org/commitlintrc\"},{\"name\":\"Uniswap Token List\",\"description\":\"A list of tokens compatible with the Uniswap Interface\",\"fileMatch\":[\"*.tokenlist.json\"],\"url\":\"https://uniswap.org/tokenlist.schema.json\"},{\"name\":\"Yippee-Ki-JSON configuration YML\",\"description\":\"Action and rule configuration descriptor for Yippee-Ki-JSON transformations.\",\"fileMatch\":[\"**/yippee-*.yml\",\"**/*.yippee.yml\"],\"url\":\"https://raw.githubusercontent.com/nagyesta/yippee-ki-json/main/schema/yippee-ki-json_config_schema.json\",\"versions\":{\"1.1.2\":\"https://raw.githubusercontent.com/nagyesta/yippee-ki-json/v1.1.2/schema/yippee-ki-json_config_schema.json\",\"latest\":\"https://raw.githubusercontent.com/nagyesta/yippee-ki-json/main/schema/yippee-ki-json_config_schema.json\"}},{\"name\":\"docker-compose.yml\",\"description\":\"The Compose specification establishes a standard for the definition of multi-container platform-agnostic applications. \",\"fileMatch\":[\"**/docker-compose.yml\",\"**/docker-compose.yaml\",\"**/docker-compose.*.yml\",\"**/docker-compose.*.yaml\",\"**/compose.yml\",\"**/compose.yaml\",\"**/compose.*.yml\",\"**/compose.*.yaml\"],\"url\":\"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json\"},{\"name\":\"devinit\",\"description\":\"Devinit configuration file schema.\",\"url\":\"https://json.schemastore.org/devinit.schema-2.0\",\"fileMatch\":[\"**/*devinit*.json\"],\"versions\":{\"1.0\":\"https://json.schemastore.org/devinit.schema-1.0\",\"2.0\":\"https://json.schemastore.org/devinit.schema-2.0\"}},{\"name\":\"tsoa\",\"description\":\"JSON Schema for the tsoa configuration file\",\"url\":\"https://json.schemastore.org/tsoa\",\"fileMatch\":[\"**/tsoa.json\"]},{\"name\":\"API Builder\",\"description\":\"apibuilder.io schema\",\"fileMatch\":[\"**/api.json\"],\"url\":\"http://json.schemastore.org/apibuilder.json\"}]}");
5740 /***/ (function(module, exports, __webpack_require__) {
5743 /*---------------------------------------------------------------------------------------------
5744 * Copyright (c) Microsoft Corporation. All rights reserved.
5745 * Licensed under the MIT License. See License.txt in the project root for license information.
5746 *--------------------------------------------------------------------------------------------*/
5748 Object.defineProperty(exports, "__esModule", { value: true });
5749 exports.hash = void 0;
5751 * Return a hash value for an object.
5753 function hash(obj, hashVal = 0) {
5754 switch (typeof obj) {
5757 return numberHash(349, hashVal);
5759 else if (Array.isArray(obj)) {
5760 return arrayHash(obj, hashVal);
5762 return objectHash(obj, hashVal);
5764 return stringHash(obj, hashVal);
5766 return booleanHash(obj, hashVal);
5768 return numberHash(obj, hashVal);
5770 return numberHash(obj, 937);
5772 return numberHash(obj, 617);
5775 exports.hash = hash;
5776 function numberHash(val, initialHashVal) {
5777 return (((initialHashVal << 5) - initialHashVal) + val) | 0;
5779 function booleanHash(b, initialHashVal) {
5780 return numberHash(b ? 433 : 863, initialHashVal);
5782 function stringHash(s, hashVal) {
5783 hashVal = numberHash(149417, hashVal);
5784 for (let i = 0, length = s.length; i < length; i++) {
5785 hashVal = numberHash(s.charCodeAt(i), hashVal);
5789 function arrayHash(arr, initialHashVal) {
5790 initialHashVal = numberHash(104579, initialHashVal);
5791 return arr.reduce((hashVal, item) => hash(item, hashVal), initialHashVal);
5793 function objectHash(obj, initialHashVal) {
5794 initialHashVal = numberHash(181387, initialHashVal);
5795 return Object.keys(obj).sort().reduce((hashVal, key) => {
5796 hashVal = stringHash(key, hashVal);
5797 return hash(obj[key], hashVal);
5804 /***/ (function(module, __webpack_exports__, __webpack_require__) {
5807 __webpack_require__.r(__webpack_exports__);
5808 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URI", function() { return URI; });
5809 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uriToFsPath", function() { return uriToFsPath; });
5810 /*---------------------------------------------------------------------------------------------
5811 * Copyright (c) Microsoft Corporation. All rights reserved.
5812 * Licensed under the MIT License. See License.txt in the project root for license information.
5813 *--------------------------------------------------------------------------------------------*/
5815 var __extends = (undefined && undefined.__extends) || (function () {
5816 var extendStatics = function (d, b) {
5817 extendStatics = Object.setPrototypeOf ||
5818 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5819 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5820 return extendStatics(d, b);
5822 return function (d, b) {
5823 extendStatics(d, b);
5824 function __() { this.constructor = d; }
5825 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5830 if (typeof process === 'object') {
5831 isWindows = process.platform === 'win32';
5833 else if (typeof navigator === 'object') {
5834 var userAgent = navigator.userAgent;
5835 isWindows = userAgent.indexOf('Windows') >= 0;
5837 function isHighSurrogate(charCode) {
5838 return (0xD800 <= charCode && charCode <= 0xDBFF);
5840 function isLowSurrogate(charCode) {
5841 return (0xDC00 <= charCode && charCode <= 0xDFFF);
5843 function isLowerAsciiHex(code) {
5844 return code >= 97 /* a */ && code <= 102 /* f */;
5846 function isLowerAsciiLetter(code) {
5847 return code >= 97 /* a */ && code <= 122 /* z */;
5849 function isUpperAsciiLetter(code) {
5850 return code >= 65 /* A */ && code <= 90 /* Z */;
5852 function isAsciiLetter(code) {
5853 return isLowerAsciiLetter(code) || isUpperAsciiLetter(code);
5856 var _schemePattern = /^\w[\w\d+.-]*$/;
5857 var _singleSlashStart = /^\//;
5858 var _doubleSlashStart = /^\/\//;
5859 function _validateUri(ret, _strict) {
5860 // scheme, must be set
5861 if (!ret.scheme && _strict) {
5862 throw new Error("[UriError]: Scheme is missing: {scheme: \"\", authority: \"" + ret.authority + "\", path: \"" + ret.path + "\", query: \"" + ret.query + "\", fragment: \"" + ret.fragment + "\"}");
5864 // scheme, https://tools.ietf.org/html/rfc3986#section-3.1
5865 // ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
5866 if (ret.scheme && !_schemePattern.test(ret.scheme)) {
5867 throw new Error('[UriError]: Scheme contains illegal characters.');
5869 // path, http://tools.ietf.org/html/rfc3986#section-3.3
5870 // If a URI contains an authority component, then the path component
5871 // must either be empty or begin with a slash ("/") character. If a URI
5872 // does not contain an authority component, then the path cannot begin
5873 // with two slash characters ("//").
5875 if (ret.authority) {
5876 if (!_singleSlashStart.test(ret.path)) {
5877 throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
5881 if (_doubleSlashStart.test(ret.path)) {
5882 throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
5887 // for a while we allowed uris *without* schemes and this is the migration
5888 // for them, e.g. an uri without scheme and without strict-mode warns and falls
5889 // back to the file-scheme. that should cause the least carnage and still be a
5891 function _schemeFix(scheme, _strict) {
5892 if (!scheme && !_strict) {
5897 // implements a bit of https://tools.ietf.org/html/rfc3986#section-5
5898 function _referenceResolution(scheme, path) {
5899 // the slash-character is our 'default base' as we don't
5900 // support constructing URIs relative to other URIs. This
5901 // also means that we alter and potentially break paths.
5902 // see https://tools.ietf.org/html/rfc3986#section-5.1.4
5910 else if (path[0] !== _slash) {
5911 path = _slash + path;
5919 var _regexp = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
5921 * Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
5922 * This class is a simple parser which creates the basic component parts
5923 * (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
5927 * foo://example.com:8042/over/there?name=ferret#nose
5928 * \_/ \______________/\_________/ \_________/ \__/
5930 * scheme authority path query fragment
5931 * | _____________________|__
5933 * urn:example:animal:ferret:nose
5936 var URI = /** @class */ (function () {
5940 function URI(schemeOrData, authority, path, query, fragment, _strict) {
5941 if (_strict === void 0) { _strict = false; }
5942 if (typeof schemeOrData === 'object') {
5943 this.scheme = schemeOrData.scheme || _empty;
5944 this.authority = schemeOrData.authority || _empty;
5945 this.path = schemeOrData.path || _empty;
5946 this.query = schemeOrData.query || _empty;
5947 this.fragment = schemeOrData.fragment || _empty;
5948 // no validation because it's this URI
5949 // that creates uri components.
5950 // _validateUri(this);
5953 this.scheme = _schemeFix(schemeOrData, _strict);
5954 this.authority = authority || _empty;
5955 this.path = _referenceResolution(this.scheme, path || _empty);
5956 this.query = query || _empty;
5957 this.fragment = fragment || _empty;
5958 _validateUri(this, _strict);
5961 URI.isUri = function (thing) {
5962 if (thing instanceof URI) {
5968 return typeof thing.authority === 'string'
5969 && typeof thing.fragment === 'string'
5970 && typeof thing.path === 'string'
5971 && typeof thing.query === 'string'
5972 && typeof thing.scheme === 'string'
5973 && typeof thing.fsPath === 'function'
5974 && typeof thing.with === 'function'
5975 && typeof thing.toString === 'function';
5977 Object.defineProperty(URI.prototype, "fsPath", {
5978 // ---- filesystem path -----------------------
5980 * Returns a string representing the corresponding file system path of this URI.
5981 * Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
5982 * platform specific path separator.
5984 * * Will *not* validate the path for invalid characters and semantics.
5985 * * Will *not* look at the scheme of this URI.
5986 * * The result shall *not* be used for display purposes but for accessing a file on disk.
5989 * The *difference* to `URI#path` is the use of the platform specific separator and the handling
5990 * of UNC paths. See the below sample of a file-uri with an authority (UNC path).
5993 const u = URI.parse('file://server/c$/folder/file.txt')
5994 u.authority === 'server'
5995 u.path === '/shares/c$/file.txt'
5996 u.fsPath === '\\server\c$\folder\file.txt'
5999 * Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
6000 * namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
6001 * with URIs that represent files on disk (`file` scheme).
6004 // if (this.scheme !== 'file') {
6005 // console.warn(`[UriError] calling fsPath with scheme ${this.scheme}`);
6007 return uriToFsPath(this, false);
6012 // ---- modify to new -------------------------
6013 URI.prototype.with = function (change) {
6017 var scheme = change.scheme, authority = change.authority, path = change.path, query = change.query, fragment = change.fragment;
6018 if (scheme === undefined) {
6019 scheme = this.scheme;
6021 else if (scheme === null) {
6024 if (authority === undefined) {
6025 authority = this.authority;
6027 else if (authority === null) {
6030 if (path === undefined) {
6033 else if (path === null) {
6036 if (query === undefined) {
6039 else if (query === null) {
6042 if (fragment === undefined) {
6043 fragment = this.fragment;
6045 else if (fragment === null) {
6048 if (scheme === this.scheme
6049 && authority === this.authority
6050 && path === this.path
6051 && query === this.query
6052 && fragment === this.fragment) {
6055 return new _URI(scheme, authority, path, query, fragment);
6057 // ---- parse & validate ------------------------
6059 * Creates a new URI from a string, e.g. `http://www.msft.com/some/path`,
6060 * `file:///usr/home`, or `scheme:with/path`.
6062 * @param value A string which represents an URI (see `URI#toString`).
6064 URI.parse = function (value, _strict) {
6065 if (_strict === void 0) { _strict = false; }
6066 var match = _regexp.exec(value);
6068 return new _URI(_empty, _empty, _empty, _empty, _empty);
6070 return new _URI(match[2] || _empty, percentDecode(match[4] || _empty), percentDecode(match[5] || _empty), percentDecode(match[7] || _empty), percentDecode(match[9] || _empty), _strict);
6073 * Creates a new URI from a file system path, e.g. `c:\my\files`,
6074 * `/usr/home`, or `\\server\share\some\path`.
6076 * The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
6077 * as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
6078 * `URI.parse('file://' + path)` because the path might contain characters that are
6079 * interpreted (# and ?). See the following sample:
6081 const good = URI.file('/coding/c#/project1');
6082 good.scheme === 'file';
6083 good.path === '/coding/c#/project1';
6084 good.fragment === '';
6085 const bad = URI.parse('file://' + '/coding/c#/project1');
6086 bad.scheme === 'file';
6087 bad.path === '/coding/c'; // path is now broken
6088 bad.fragment === '/project1';
6091 * @param path A file system path (see `URI#fsPath`)
6093 URI.file = function (path) {
6094 var authority = _empty;
6095 // normalize to fwd-slashes on windows,
6096 // on other systems bwd-slashes are valid
6097 // filename character, eg /f\oo/ba\r.txt
6099 path = path.replace(/\\/g, _slash);
6101 // check for authority as used in UNC shares
6102 // or use the path as given
6103 if (path[0] === _slash && path[1] === _slash) {
6104 var idx = path.indexOf(_slash, 2);
6106 authority = path.substring(2);
6110 authority = path.substring(2, idx);
6111 path = path.substring(idx) || _slash;
6114 return new _URI('file', authority, path, _empty, _empty);
6116 URI.from = function (components) {
6117 return new _URI(components.scheme, components.authority, components.path, components.query, components.fragment);
6120 // * Join a URI path with path fragments and normalizes the resulting path.
6122 // * @param uri The input URI.
6123 // * @param pathFragment The path fragment to add to the URI path.
6124 // * @returns The resulting URI.
6126 // static joinPath(uri: URI, ...pathFragment: string[]): URI {
6128 // throw new Error(`[UriError]: cannot call joinPaths on URI without path`);
6130 // let newPath: string;
6131 // if (isWindows && uri.scheme === 'file') {
6132 // newPath = URI.file(paths.win32.join(uriToFsPath(uri, true), ...pathFragment)).path;
6134 // newPath = paths.posix.join(uri.path, ...pathFragment);
6136 // return uri.with({ path: newPath });
6138 // ---- printing/externalize ---------------------------
6140 * Creates a string representation for this URI. It's guaranteed that calling
6141 * `URI.parse` with the result of this function creates an URI which is equal
6144 * * The result shall *not* be used for display purposes but for externalization or transport.
6145 * * The result will be encoded using the percentage encoding and encoding happens mostly
6146 * ignore the scheme-specific encoding rules.
6148 * @param skipEncoding Do not encode the result, default is `false`
6150 URI.prototype.toString = function (skipEncoding) {
6151 if (skipEncoding === void 0) { skipEncoding = false; }
6152 return _asFormatted(this, skipEncoding);
6154 URI.prototype.toJSON = function () {
6157 URI.revive = function (data) {
6161 else if (data instanceof URI) {
6165 var result = new _URI(data);
6166 result._formatted = data.external;
6167 result._fsPath = data._sep === _pathSepMarker ? data.fsPath : null;
6174 var _pathSepMarker = isWindows ? 1 : undefined;
6175 // eslint-disable-next-line @typescript-eslint/class-name-casing
6176 var _URI = /** @class */ (function (_super) {
6177 __extends(_URI, _super);
6179 var _this = _super !== null && _super.apply(this, arguments) || this;
6180 _this._formatted = null;
6181 _this._fsPath = null;
6184 Object.defineProperty(_URI.prototype, "fsPath", {
6186 if (!this._fsPath) {
6187 this._fsPath = uriToFsPath(this, false);
6189 return this._fsPath;
6194 _URI.prototype.toString = function (skipEncoding) {
6195 if (skipEncoding === void 0) { skipEncoding = false; }
6196 if (!skipEncoding) {
6197 if (!this._formatted) {
6198 this._formatted = _asFormatted(this, false);
6200 return this._formatted;
6203 // we don't cache that
6204 return _asFormatted(this, true);
6207 _URI.prototype.toJSON = function () {
6213 res.fsPath = this._fsPath;
6214 res._sep = _pathSepMarker;
6216 if (this._formatted) {
6217 res.external = this._formatted;
6221 res.path = this.path;
6224 res.scheme = this.scheme;
6226 if (this.authority) {
6227 res.authority = this.authority;
6230 res.query = this.query;
6232 if (this.fragment) {
6233 res.fragment = this.fragment;
6239 // reserved characters: https://tools.ietf.org/html/rfc3986#section-2.2
6240 var encodeTable = (_a = {},
6241 _a[58 /* Colon */] = '%3A',
6242 _a[47 /* Slash */] = '%2F',
6243 _a[63 /* QuestionMark */] = '%3F',
6244 _a[35 /* Hash */] = '%23',
6245 _a[91 /* OpenSquareBracket */] = '%5B',
6246 _a[93 /* CloseSquareBracket */] = '%5D',
6247 _a[64 /* AtSign */] = '%40',
6248 _a[33 /* ExclamationMark */] = '%21',
6249 _a[36 /* DollarSign */] = '%24',
6250 _a[38 /* Ampersand */] = '%26',
6251 _a[39 /* SingleQuote */] = '%27',
6252 _a[40 /* OpenParen */] = '%28',
6253 _a[41 /* CloseParen */] = '%29',
6254 _a[42 /* Asterisk */] = '%2A',
6255 _a[43 /* Plus */] = '%2B',
6256 _a[44 /* Comma */] = '%2C',
6257 _a[59 /* Semicolon */] = '%3B',
6258 _a[61 /* Equals */] = '%3D',
6259 _a[32 /* Space */] = '%20',
6261 function encodeURIComponentFast(uriComponent, allowSlash) {
6262 var res = undefined;
6263 var nativeEncodePos = -1;
6264 for (var pos = 0; pos < uriComponent.length; pos++) {
6265 var code = uriComponent.charCodeAt(pos);
6266 // unreserved characters: https://tools.ietf.org/html/rfc3986#section-2.3
6267 if ((code >= 97 /* a */ && code <= 122 /* z */)
6268 || (code >= 65 /* A */ && code <= 90 /* Z */)
6269 || (code >= 48 /* Digit0 */ && code <= 57 /* Digit9 */)
6270 || code === 45 /* Dash */
6271 || code === 46 /* Period */
6272 || code === 95 /* Underline */
6273 || code === 126 /* Tilde */
6274 || (allowSlash && code === 47 /* Slash */)) {
6275 // check if we are delaying native encode
6276 if (nativeEncodePos !== -1) {
6277 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
6278 nativeEncodePos = -1;
6280 // check if we write into a new string (by default we try to return the param)
6281 if (res !== undefined) {
6282 res += uriComponent.charAt(pos);
6286 // encoding needed, we need to allocate a new string
6287 if (res === undefined) {
6288 res = uriComponent.substr(0, pos);
6290 // check with default table first
6291 var escaped = encodeTable[code];
6292 if (escaped !== undefined) {
6293 // check if we are delaying native encode
6294 if (nativeEncodePos !== -1) {
6295 res += encodeURIComponent(uriComponent.substring(nativeEncodePos, pos));
6296 nativeEncodePos = -1;
6298 // append escaped variant to result
6301 else if (nativeEncodePos === -1) {
6302 // use native encode only when needed
6303 nativeEncodePos = pos;
6307 if (nativeEncodePos !== -1) {
6308 res += encodeURIComponent(uriComponent.substring(nativeEncodePos));
6310 return res !== undefined ? res : uriComponent;
6312 function encodeURIComponentMinimal(path) {
6313 var res = undefined;
6314 for (var pos = 0; pos < path.length; pos++) {
6315 var code = path.charCodeAt(pos);
6316 if (code === 35 /* Hash */ || code === 63 /* QuestionMark */) {
6317 if (res === undefined) {
6318 res = path.substr(0, pos);
6320 res += encodeTable[code];
6323 if (res !== undefined) {
6328 return res !== undefined ? res : path;
6331 * Compute `fsPath` for the given uri
6333 function uriToFsPath(uri, keepDriveLetterCasing) {
6335 if (uri.authority && uri.path.length > 1 && uri.scheme === 'file') {
6336 // unc path: file://shares/c$/far/boo
6337 value = "//" + uri.authority + uri.path;
6339 else if (uri.path.charCodeAt(0) === 47 /* Slash */
6340 && (uri.path.charCodeAt(1) >= 65 /* A */ && uri.path.charCodeAt(1) <= 90 /* Z */ || uri.path.charCodeAt(1) >= 97 /* a */ && uri.path.charCodeAt(1) <= 122 /* z */)
6341 && uri.path.charCodeAt(2) === 58 /* Colon */) {
6342 if (!keepDriveLetterCasing) {
6343 // windows drive letter: file:///c:/far/boo
6344 value = uri.path[1].toLowerCase() + uri.path.substr(2);
6347 value = uri.path.substr(1);
6355 value = value.replace(/\//g, '\\');
6360 * Create the external version of a uri
6362 function _asFormatted(uri, skipEncoding) {
6363 var encoder = !skipEncoding
6364 ? encodeURIComponentFast
6365 : encodeURIComponentMinimal;
6367 var scheme = uri.scheme, authority = uri.authority, path = uri.path, query = uri.query, fragment = uri.fragment;
6372 if (authority || scheme === 'file') {
6377 var idx = authority.indexOf('@');
6380 var userinfo = authority.substr(0, idx);
6381 authority = authority.substr(idx + 1);
6382 idx = userinfo.indexOf(':');
6384 res += encoder(userinfo, false);
6387 // <user>:<pass>@<auth>
6388 res += encoder(userinfo.substr(0, idx), false);
6390 res += encoder(userinfo.substr(idx + 1), false);
6394 authority = authority.toLowerCase();
6395 idx = authority.indexOf(':');
6397 res += encoder(authority, false);
6401 res += encoder(authority.substr(0, idx), false);
6402 res += authority.substr(idx);
6406 // lower-case windows drive letters in /C:/fff or C:/fff
6407 if (path.length >= 3 && path.charCodeAt(0) === 47 /* Slash */ && path.charCodeAt(2) === 58 /* Colon */) {
6408 var code = path.charCodeAt(1);
6409 if (code >= 65 /* A */ && code <= 90 /* Z */) {
6410 path = "/" + String.fromCharCode(code + 32) + ":" + path.substr(3); // "/c:".length === 3
6413 else if (path.length >= 2 && path.charCodeAt(1) === 58 /* Colon */) {
6414 var code = path.charCodeAt(0);
6415 if (code >= 65 /* A */ && code <= 90 /* Z */) {
6416 path = String.fromCharCode(code + 32) + ":" + path.substr(2); // "/c:".length === 3
6419 // encode the rest of the path
6420 res += encoder(path, true);
6424 res += encoder(query, false);
6428 res += !skipEncoding ? encodeURIComponentFast(fragment, false) : fragment;
6433 function decodeURIComponentGraceful(str) {
6435 return decodeURIComponent(str);
6438 if (str.length > 3) {
6439 return str.substr(0, 3) + decodeURIComponentGraceful(str.substr(3));
6446 var _rEncodedAsHex = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
6447 function percentDecode(str) {
6448 if (!str.match(_rEncodedAsHex)) {
6451 return str.replace(_rEncodedAsHex, function (match) { return decodeURIComponentGraceful(match); });
6457 /***/ (function(module, exports) {
6459 module.exports = require("coc.nvim");
6463 /***/ (function(module, exports, __webpack_require__) {
6467 Object.defineProperty(exports, "__esModule", { value: true });
6468 exports.joinPath = exports.normalizePath = exports.resolvePath = exports.isAbsolutePath = exports.basename = exports.dirname = exports.getScheme = void 0;
6469 function getScheme(uri) {
6470 return uri.substr(0, uri.indexOf(':'));
6472 exports.getScheme = getScheme;
6473 function dirname(uri) {
6474 const lastIndexOfSlash = uri.lastIndexOf('/');
6475 return lastIndexOfSlash !== -1 ? uri.substr(0, lastIndexOfSlash) : '';
6477 exports.dirname = dirname;
6478 function basename(uri) {
6479 const lastIndexOfSlash = uri.lastIndexOf('/');
6480 return uri.substr(lastIndexOfSlash + 1);
6482 exports.basename = basename;
6483 const Slash = '/'.charCodeAt(0);
6484 const Dot = '.'.charCodeAt(0);
6485 function isAbsolutePath(path) {
6486 return path.charCodeAt(0) === Slash;
6488 exports.isAbsolutePath = isAbsolutePath;
6489 function resolvePath(uri, path) {
6490 if (isAbsolutePath(path)) {
6491 return uri.with({ path: normalizePath(path.split('/')) });
6493 return joinPath(uri, path);
6495 exports.resolvePath = resolvePath;
6496 function normalizePath(parts) {
6497 const newParts = [];
6498 for (const part of parts) {
6499 if (part.length === 0 || part.length === 1 && part.charCodeAt(0) === Dot) {
6502 else if (part.length === 2 && part.charCodeAt(0) === Dot && part.charCodeAt(1) === Dot) {
6506 newParts.push(part);
6509 if (parts.length > 1 && parts[parts.length - 1].length === 0) {
6512 let res = newParts.join('/');
6513 if (parts[0].length === 0) {
6518 exports.normalizePath = normalizePath;
6519 function joinPath(uri, ...paths) {
6520 const parts = uri.path.split('/');
6521 for (let path of paths) {
6522 parts.push(...path.split('/'));
6524 return uri.with({ path: normalizePath(parts) });
6526 exports.joinPath = joinPath;
6531 /***/ (function(module, exports, __webpack_require__) {
6536 module.exports = string => {
6537 if (typeof string !== 'string') {
6538 throw new TypeError(`Expected a string, got ${typeof string}`);
6541 // Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
6542 // conversion translates it to FEFF (UTF-16 BOM)
6543 if (string.charCodeAt(0) === 0xFEFF) {
6544 return string.slice(1);